From 000ef62498b460861aec41838cfe02b0c710e68d Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 8 May 2026 08:20:21 +0000 Subject: [PATCH] Regenerate client from commit 5d07320 of spec repo --- .generator/schemas/v2/openapi.yaml | 789 ++++++++++++++++++ .../GetReplayAnalysisIssue.rb | 8 + .../ListReplayAnalysisIssueSessions.rb | 8 + .../ListReplayAnalysisIssues.rb | 8 + .../v2/rum-replay/GenerateReplaySummary.rb | 14 + features/scenarios_model_mapping.rb | 24 + features/v2/rum_replay.feature | 32 + features/v2/rum_replay_analysis.feature | 72 ++ features/v2/undo.json | 24 + lib/datadog_api_client/configuration.rb | 4 + lib/datadog_api_client/inflector.rb | 26 + .../v2/api/rum_replay_analysis_api.rb | 272 ++++++ .../v2/api/rum_replay_api.rb | 112 +++ .../replay_analysis_affected_session.rb | 141 ++++ .../v2/models/replay_analysis_issue_data.rb | 165 ++++ .../replay_analysis_issue_data_attributes.rb | 332 ++++++++ .../models/replay_analysis_issue_data_type.rb | 26 + .../v2/models/replay_analysis_issue_meta.rb | 123 +++ .../models/replay_analysis_issue_response.rb | 123 +++ .../replay_analysis_issue_session_data.rb | 165 ++++ ..._analysis_issue_session_data_attributes.rb | 167 ++++ ...replay_analysis_issue_session_data_type.rb | 26 + ...replay_analysis_issue_sessions_response.rb | 146 ++++ .../models/replay_analysis_issues_response.rb | 146 ++++ .../v2/models/replay_analysis_llm_details.rb | 146 ++++ .../v2/models/replay_analysis_page_meta.rb | 123 +++ .../replay_analysis_representative_session.rb | 237 ++++++ .../v2/models/replay_analysis_screenshot.rb | 186 +++++ .../v2/models/replay_analysis_signal.rb | 186 +++++ .../v2/models/replay_summary_chapter.rb | 165 ++++ ...replay_summary_data_attributes_response.rb | 209 +++++ .../v2/models/replay_summary_data_request.rb | 123 +++ .../v2/models/replay_summary_data_response.rb | 165 ++++ .../v2/models/replay_summary_request.rb | 123 +++ .../v2/models/replay_summary_request_type.rb | 26 + .../v2/models/replay_summary_response.rb | 123 +++ .../v2/models/replay_summary_response_type.rb | 26 + 37 files changed, 4791 insertions(+) create mode 100644 examples/v2/rum-replay-analysis/GetReplayAnalysisIssue.rb create mode 100644 examples/v2/rum-replay-analysis/ListReplayAnalysisIssueSessions.rb create mode 100644 examples/v2/rum-replay-analysis/ListReplayAnalysisIssues.rb create mode 100644 examples/v2/rum-replay/GenerateReplaySummary.rb create mode 100644 features/v2/rum_replay.feature create mode 100644 features/v2/rum_replay_analysis.feature create mode 100644 lib/datadog_api_client/v2/api/rum_replay_analysis_api.rb create mode 100644 lib/datadog_api_client/v2/api/rum_replay_api.rb create mode 100644 lib/datadog_api_client/v2/models/replay_analysis_affected_session.rb create mode 100644 lib/datadog_api_client/v2/models/replay_analysis_issue_data.rb create mode 100644 lib/datadog_api_client/v2/models/replay_analysis_issue_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/replay_analysis_issue_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/replay_analysis_issue_meta.rb create mode 100644 lib/datadog_api_client/v2/models/replay_analysis_issue_response.rb create mode 100644 lib/datadog_api_client/v2/models/replay_analysis_issue_session_data.rb create mode 100644 lib/datadog_api_client/v2/models/replay_analysis_issue_session_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/replay_analysis_issue_session_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/replay_analysis_issue_sessions_response.rb create mode 100644 lib/datadog_api_client/v2/models/replay_analysis_issues_response.rb create mode 100644 lib/datadog_api_client/v2/models/replay_analysis_llm_details.rb create mode 100644 lib/datadog_api_client/v2/models/replay_analysis_page_meta.rb create mode 100644 lib/datadog_api_client/v2/models/replay_analysis_representative_session.rb create mode 100644 lib/datadog_api_client/v2/models/replay_analysis_screenshot.rb create mode 100644 lib/datadog_api_client/v2/models/replay_analysis_signal.rb create mode 100644 lib/datadog_api_client/v2/models/replay_summary_chapter.rb create mode 100644 lib/datadog_api_client/v2/models/replay_summary_data_attributes_response.rb create mode 100644 lib/datadog_api_client/v2/models/replay_summary_data_request.rb create mode 100644 lib/datadog_api_client/v2/models/replay_summary_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/replay_summary_request.rb create mode 100644 lib/datadog_api_client/v2/models/replay_summary_request_type.rb create mode 100644 lib/datadog_api_client/v2/models/replay_summary_response.rb create mode 100644 lib/datadog_api_client/v2/models/replay_summary_response_type.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index ecadd5414e63..d71c0845fbcb 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -58474,6 +58474,430 @@ components: type: string x-enum-varnames: - RULESET + ReplayAnalysisAffectedSession: + description: A session affected by a replay analysis issue. + properties: + session_id: + description: Unique identifier of the affected session. + example: 00000000-0000-0000-0000-000000000001 + type: string + session_start_timestamp_ms: + description: Session start timestamp in milliseconds. + example: 1776415149520 + format: int64 + nullable: true + type: integer + required: + - session_id + type: object + ReplayAnalysisIssueData: + description: Data object representing a RUM replay analysis issue. + properties: + attributes: + $ref: "#/components/schemas/ReplayAnalysisIssueDataAttributes" + id: + description: Unique identifier of the issue. + example: 00000000-0000-0000-0000-000000000001 + type: string + type: + $ref: "#/components/schemas/ReplayAnalysisIssueDataType" + required: + - id + - type + - attributes + type: object + ReplayAnalysisIssueDataAttributes: + description: Attributes of a RUM replay analysis issue. + properties: + affected_sessions: + description: Up to three sample sessions affected by this issue. + items: + $ref: "#/components/schemas/ReplayAnalysisAffectedSession" + type: array + application_id: + description: Unique identifier of the application where the issue was detected. + example: 00000000-0000-0000-0000-000000000001 + type: string + created_at: + description: Timestamp when the issue was first detected. + example: "2025-01-01T00:00:00Z" + format: date-time + type: string + description: + description: Human-readable description of the issue. + example: User is unable to complete checkout. + type: string + journey_query: + additionalProperties: {} + description: Journey query associated with the issue. + nullable: true + type: object + name: + description: Name of the issue. + example: Checkout failure + type: string + representative_session: + $ref: "#/components/schemas/ReplayAnalysisRepresentativeSession" + session_count: + description: Total number of sessions affected by this issue. + example: 42 + format: int64 + type: integer + severity: + description: Severity level of the issue. Valid values are `high`, `medium`, and `low`. + example: high + type: string + updated_at: + description: Timestamp when the issue was last updated. + example: "2025-01-01T00:00:00Z" + format: date-time + type: string + validation_verdict: + description: Validation status of the issue. + example: confirmed + type: string + required: + - application_id + - name + - description + - severity + - validation_verdict + - created_at + - updated_at + - session_count + - affected_sessions + - representative_session + type: object + ReplayAnalysisIssueDataType: + default: issues + description: RUM replay analysis issue resource type. + enum: + - issues + example: issues + type: string + x-enum-varnames: + - ISSUES + ReplayAnalysisIssueMeta: + description: Metadata object for paginated issue list responses. + properties: + page: + $ref: "#/components/schemas/ReplayAnalysisPageMeta" + required: + - page + type: object + ReplayAnalysisIssueResponse: + description: A single RUM replay analysis issue. + properties: + data: + $ref: "#/components/schemas/ReplayAnalysisIssueData" + required: + - data + type: object + ReplayAnalysisIssueSessionData: + description: Data object representing a session related to a RUM replay analysis issue. + properties: + attributes: + $ref: "#/components/schemas/ReplayAnalysisIssueSessionDataAttributes" + id: + description: Unique identifier of the session. + example: 00000000-0000-0000-0000-000000000001 + type: string + type: + $ref: "#/components/schemas/ReplayAnalysisIssueSessionDataType" + required: + - id + - type + - attributes + type: object + ReplayAnalysisIssueSessionDataAttributes: + description: Attributes of a session related to a RUM replay analysis issue. + properties: + session_start_timestamp_ms: + description: Session start timestamp in milliseconds. + example: 1776415149520 + format: int64 + type: integer + signals: + description: List of signals observed in this session. + items: + $ref: "#/components/schemas/ReplayAnalysisSignal" + type: array + view_name: + description: Name of the view where the issue was observed. + example: checkout + type: string + required: + - session_start_timestamp_ms + - view_name + - signals + type: object + ReplayAnalysisIssueSessionDataType: + default: sessions + description: RUM replay analysis issue session resource type. + enum: + - sessions + example: sessions + type: string + x-enum-varnames: + - SESSIONS + ReplayAnalysisIssueSessionsResponse: + description: A paginated list of sessions related to a RUM replay analysis issue. + properties: + data: + description: Array of session data objects related to the issue. + items: + $ref: "#/components/schemas/ReplayAnalysisIssueSessionData" + type: array + meta: + $ref: "#/components/schemas/ReplayAnalysisIssueMeta" + required: + - data + - meta + type: object + ReplayAnalysisIssuesResponse: + description: A paginated list of RUM replay analysis issues. + properties: + data: + description: Array of RUM replay analysis issue data objects. + items: + $ref: "#/components/schemas/ReplayAnalysisIssueData" + type: array + meta: + $ref: "#/components/schemas/ReplayAnalysisIssueMeta" + required: + - data + - meta + type: object + ReplayAnalysisLLMDetails: + description: AI-generated analysis details for a replay issue. + properties: + intent: + description: Interpreted user intent derived from session analysis. + example: Add item to cart. + type: string + user_pattern: + description: List of user behavior steps observed in the session. + example: + - Navigated to checkout + - Clicked buy button + items: + type: string + type: array + required: + - intent + - user_pattern + type: object + ReplayAnalysisPageMeta: + description: Pagination metadata for a RUM replay analysis response. + properties: + total_filtered_count: + description: Total number of items matching the current filters. + example: 100 + format: int64 + type: integer + required: + - total_filtered_count + type: object + ReplayAnalysisRepresentativeSession: + description: A representative session illustrating a replay analysis issue. + properties: + issue_category: + description: Category of the issue observed in this session. + example: usability + type: string + llm_analysis_details: + $ref: "#/components/schemas/ReplayAnalysisLLMDetails" + screenshot: + $ref: "#/components/schemas/ReplayAnalysisScreenshot" + session_id: + description: Unique identifier of the representative session. + example: 00000000-0000-0000-0000-000000000001 + type: string + session_start_timestamp_ms: + description: Session start timestamp in milliseconds. + example: 1776415149520 + format: int64 + type: integer + signals: + description: List of signals observed in the representative session. + items: + $ref: "#/components/schemas/ReplayAnalysisSignal" + type: array + view_name: + description: Name of the view where the issue was observed. + example: checkout + nullable: true + type: string + required: + - session_id + - issue_category + - session_start_timestamp_ms + - llm_analysis_details + - signals + type: object + ReplayAnalysisScreenshot: + description: A screenshot captured during a replay session. + properties: + screenshot_key: + description: Filename or key identifier of the screenshot. + example: ts.webp + type: string + session_id: + description: Unique identifier of the session where the screenshot was taken. + example: 00000000-0000-0000-0000-000000000001 + type: string + timestamp_ms: + description: Timestamp of the screenshot in milliseconds. + example: 1700000000000 + format: int64 + type: integer + view_id: + description: Unique identifier of the view where the screenshot was taken. + example: 00000000-0000-0000-0000-000000000002 + type: string + required: + - session_id + - view_id + - screenshot_key + - timestamp_ms + type: object + ReplayAnalysisSignal: + description: A signal associated with a replay issue, capturing user interaction details. + properties: + event: + description: Event name associated with the signal. + example: button + type: string + signal_type: + description: Type of signal captured. + example: click + type: string + timestamp_ms: + description: Absolute timestamp of the signal in milliseconds. + example: 1776415149620 + format: int64 + type: integer + user_pattern: + description: User behavior pattern identified for the signal. + example: rage click + type: string + required: + - signal_type + - event + - user_pattern + - timestamp_ms + type: object + ReplaySummaryChapter: + description: A chapter within a RUM replay summary, representing a distinct segment of user activity. + properties: + end_ms: + description: End time of the chapter in milliseconds. + example: 60000 + format: int64 + type: integer + start_ms: + description: Start time of the chapter in milliseconds. + example: 0 + format: int64 + type: integer + text: + description: Description of user activity during this chapter. + example: Browsing + type: string + required: + - text + - start_ms + - end_ms + type: object + ReplaySummaryDataAttributesResponse: + description: Attributes of a RUM replay summary response. + properties: + chapters: + description: List of chapters breaking down the session into distinct activity segments. + items: + $ref: "#/components/schemas/ReplaySummaryChapter" + type: array + has_enough_activity: + description: Whether the session contained sufficient user activity to generate a summary. + example: true + type: boolean + has_too_many_events: + description: Whether the session exceeded the event count limit for summary generation. + example: false + type: boolean + summary: + description: AI-generated summary of the replay session. + example: User browsed the home page and attempted to add an item to the cart. + type: string + version: + description: Version of the prompt used to generate the summary. + example: 3-65f24320d95eb8d3 + type: string + required: + - summary + - chapters + - version + - has_enough_activity + - has_too_many_events + type: object + ReplaySummaryDataRequest: + description: Data object for a RUM replay summary request. + properties: + type: + $ref: "#/components/schemas/ReplaySummaryRequestType" + required: + - type + type: object + ReplaySummaryDataResponse: + description: Data object for a RUM replay summary response. + properties: + attributes: + $ref: "#/components/schemas/ReplaySummaryDataAttributesResponse" + id: + description: Unique identifier of the generated summary. + example: 00000000-0000-0000-0000-000000000001 + type: string + type: + $ref: "#/components/schemas/ReplaySummaryResponseType" + required: + - id + - type + - attributes + type: object + ReplaySummaryRequest: + description: Request body for generating a RUM replay summary. + properties: + data: + $ref: "#/components/schemas/ReplaySummaryDataRequest" + required: + - data + type: object + ReplaySummaryRequestType: + default: replay_summary_request + description: RUM replay summary request resource type. + enum: + - replay_summary_request + example: replay_summary_request + type: string + x-enum-varnames: + - REPLAY_SUMMARY_REQUEST + ReplaySummaryResponse: + description: Response containing a generated RUM replay summary. + properties: + data: + $ref: "#/components/schemas/ReplaySummaryDataResponse" + required: + - data + type: object + ReplaySummaryResponseType: + default: summary_response + description: RUM replay summary response resource type. + enum: + - summary_response + example: summary_response + type: string + x-enum-varnames: + - SUMMARY_RESPONSE ResolveVulnerableSymbolsRequest: description: The top-level request object for resolving vulnerable symbols in a set of packages. properties: @@ -123854,6 +124278,278 @@ paths: summary: Update a Workload Protection policy tags: ["CSM Threats"] x-codegen-request-body-name: body + /api/v2/replay/analysis/issues: + get: + description: Retrieve a paginated list of RUM replay analysis issues, optionally filtered by application, severity, view name, or issue category. + operationId: ListReplayAnalysisIssues + parameters: + - description: Filter issues by application UUID. + in: query + name: filter[application_id] + schema: + example: 00000000-0000-0000-0000-000000000001 + type: string + - description: Filter issues by comma-separated severity values. Valid values are `high`, `medium`, and `low`. + in: query + name: filter[severity] + schema: + example: high,medium + type: string + - description: Filter issues by comma-separated view names. + in: query + name: filter[view_name] + schema: + example: checkout,cart + type: string + - description: Filter issues by comma-separated issue categories. + in: query + name: filter[issue_category] + schema: + example: user_confusion,system_failure + type: string + - description: Sort order for the results. Valid values are `created_at`, `-created_at`, `severity`, `-severity`, `session_count`, and `-session_count`. Defaults to `-created_at`. + in: query + name: sort + schema: + default: -created_at + example: -created_at + type: string + - description: Page number for pagination (0-indexed). + in: query + name: page[number] + schema: + default: 0 + example: 0 + minimum: 0 + type: integer + - description: Number of items per page. Must be between 1 and 100. + in: query + name: page[size] + schema: + default: 15 + example: 15 + maximum: 100 + minimum: 1 + type: integer + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + affected_sessions: + - session_id: 00000000-0000-0000-0000-000000000002 + session_start_timestamp_ms: 1776415149520 + application_id: 00000000-0000-0000-0000-000000000001 + created_at: "2025-01-01T00:00:00Z" + description: User is unable to complete checkout. + name: Checkout failure + representative_session: + issue_category: usability + llm_analysis_details: + intent: Add item to cart. + user_pattern: + - Navigated to checkout + - Clicked buy button + session_id: 00000000-0000-0000-0000-000000000002 + session_start_timestamp_ms: 1776415149520 + signals: + - event: button + signal_type: click + timestamp_ms: 1776415149620 + user_pattern: rage click + session_count: 42 + severity: high + updated_at: "2025-01-01T00:00:00Z" + validation_verdict: confirmed + id: 00000000-0000-0000-0000-000000000001 + type: issues + meta: + page: + total_filtered_count: 100 + schema: + $ref: "#/components/schemas/ReplayAnalysisIssuesResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: List replay analysis issues + tags: + - Rum Replay Analysis + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/replay/analysis/issues/{issue_id}: + get: + description: Retrieve details of a specific RUM replay analysis issue by its identifier. + operationId: GetReplayAnalysisIssue + parameters: + - description: Unique identifier of the issue. + in: path + name: issue_id + required: true + schema: + example: 00000000-0000-0000-0000-000000000001 + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + affected_sessions: + - session_id: 00000000-0000-0000-0000-000000000002 + session_start_timestamp_ms: 1776415149520 + application_id: 00000000-0000-0000-0000-000000000001 + created_at: "2025-01-01T00:00:00Z" + description: User is unable to complete checkout. + name: Checkout failure + representative_session: + issue_category: usability + llm_analysis_details: + intent: Add item to cart. + user_pattern: + - Navigated to checkout + - Clicked buy button + session_id: 00000000-0000-0000-0000-000000000002 + session_start_timestamp_ms: 1776415149520 + signals: + - event: button + signal_type: click + timestamp_ms: 1776415149620 + user_pattern: rage click + session_count: 42 + severity: high + updated_at: "2025-01-01T00:00:00Z" + validation_verdict: confirmed + id: 00000000-0000-0000-0000-000000000001 + type: issues + schema: + $ref: "#/components/schemas/ReplayAnalysisIssueResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get replay analysis issue + tags: + - Rum Replay Analysis + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/replay/analysis/issues/{issue_id}/sessions: + get: + description: Retrieve a paginated list of sessions related to a specific RUM replay analysis issue. + operationId: ListReplayAnalysisIssueSessions + parameters: + - description: Unique identifier of the issue. + in: path + name: issue_id + required: true + schema: + example: 00000000-0000-0000-0000-000000000001 + type: string + - description: Sort order for the results. Valid values are `last_seen_at`, `-last_seen_at`, `proximity`, and `-proximity`. Defaults to `-last_seen_at`. + in: query + name: sort + schema: + default: -last_seen_at + example: -last_seen_at + type: string + - description: Page number for pagination (0-indexed). + in: query + name: page[number] + schema: + default: 0 + example: 0 + minimum: 0 + type: integer + - description: Number of items per page. Must be between 1 and 100. + in: query + name: page[size] + schema: + default: 15 + example: 15 + maximum: 100 + minimum: 1 + type: integer + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + session_start_timestamp_ms: 1776415149520 + signals: + - event: button + signal_type: click + timestamp_ms: 1776415149620 + user_pattern: rage click + view_name: checkout + id: 00000000-0000-0000-0000-000000000001 + type: sessions + meta: + page: + total_filtered_count: 100 + schema: + $ref: "#/components/schemas/ReplayAnalysisIssueSessionsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: List replay analysis issue sessions + tags: + - Rum Replay Analysis + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/replay/heatmap/snapshots: get: description: List heatmap snapshots. @@ -124038,6 +124734,95 @@ paths: summary: Update replay heatmap snapshot tags: - Rum Replay Heatmaps + /api/v2/replay/summary/{session_id}: + post: + description: Generate an AI-powered summary for a RUM replay session, including chapter breakdowns and behavioral analysis. + operationId: GenerateReplaySummary + parameters: + - description: Unique identifier of the session. + in: path + name: session_id + required: true + schema: + example: 00000000-0000-0000-0000-000000000001 + type: string + - description: Data source for the session. Valid values are `rum`, `product_analytics`, and `replay`. + in: query + name: data_source + required: true + schema: + example: rum + type: string + - description: Server-side timestamp in milliseconds. + in: query + name: ts + schema: + example: 1704067200000 + format: int64 + type: integer + requestBody: + content: + application/json: + examples: + default: + value: + data: + type: replay_summary_request + schema: + $ref: "#/components/schemas/ReplaySummaryRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + chapters: + - end_ms: 60000 + start_ms: 0 + text: Browsing + has_enough_activity: true + has_too_many_events: false + summary: User browsed the home page and attempted to add an item to the cart. + version: 3-65f24320d95eb8d3 + id: 00000000-0000-0000-0000-000000000001 + type: summary_response + schema: + $ref: "#/components/schemas/ReplaySummaryResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Generate replay summary + tags: + - Rum Replay + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/restriction_policy/{resource_id}: delete: description: Deletes the restriction policy associated with a specified resource. @@ -146293,6 +147078,10 @@ tags: description: Find out more at url: https://docs.datadoghq.com/real_user_monitoring/platform/generate_metrics/ name: Rum Metrics + - description: Generate and retrieve AI-powered summaries of RUM replay sessions. + name: Rum Replay + - description: Analyze RUM replay sessions to identify and investigate user-facing issues. Retrieve issues detected by AI analysis, get details for individual issues, and explore the sessions associated with each issue. + name: Rum Replay Analysis - description: Manage heatmap snapshots for RUM replay sessions. Create, update, delete, and retrieve snapshots to visualize user interactions on specific views. name: Rum Replay Heatmaps - description: Create and manage playlists of RUM replay sessions. Organize, categorize, and share collections of replay sessions for analysis and collaboration. diff --git a/examples/v2/rum-replay-analysis/GetReplayAnalysisIssue.rb b/examples/v2/rum-replay-analysis/GetReplayAnalysisIssue.rb new file mode 100644 index 000000000000..3df1910a80bf --- /dev/null +++ b/examples/v2/rum-replay-analysis/GetReplayAnalysisIssue.rb @@ -0,0 +1,8 @@ +# Get replay analysis issue returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_replay_analysis_issue".to_sym] = true +end +api_instance = DatadogAPIClient::V2::RumReplayAnalysisAPI.new +p api_instance.get_replay_analysis_issue("00000000-0000-0000-0000-000000000001") diff --git a/examples/v2/rum-replay-analysis/ListReplayAnalysisIssueSessions.rb b/examples/v2/rum-replay-analysis/ListReplayAnalysisIssueSessions.rb new file mode 100644 index 000000000000..6e305d2f1464 --- /dev/null +++ b/examples/v2/rum-replay-analysis/ListReplayAnalysisIssueSessions.rb @@ -0,0 +1,8 @@ +# List replay analysis issue sessions returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_replay_analysis_issue_sessions".to_sym] = true +end +api_instance = DatadogAPIClient::V2::RumReplayAnalysisAPI.new +p api_instance.list_replay_analysis_issue_sessions("00000000-0000-0000-0000-000000000001") diff --git a/examples/v2/rum-replay-analysis/ListReplayAnalysisIssues.rb b/examples/v2/rum-replay-analysis/ListReplayAnalysisIssues.rb new file mode 100644 index 000000000000..a72e66fb793d --- /dev/null +++ b/examples/v2/rum-replay-analysis/ListReplayAnalysisIssues.rb @@ -0,0 +1,8 @@ +# List replay analysis issues returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_replay_analysis_issues".to_sym] = true +end +api_instance = DatadogAPIClient::V2::RumReplayAnalysisAPI.new +p api_instance.list_replay_analysis_issues() diff --git a/examples/v2/rum-replay/GenerateReplaySummary.rb b/examples/v2/rum-replay/GenerateReplaySummary.rb new file mode 100644 index 000000000000..c7ed52c6275c --- /dev/null +++ b/examples/v2/rum-replay/GenerateReplaySummary.rb @@ -0,0 +1,14 @@ +# Generate replay summary returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.generate_replay_summary".to_sym] = true +end +api_instance = DatadogAPIClient::V2::RumReplayAPI.new + +body = DatadogAPIClient::V2::ReplaySummaryRequest.new({ + data: DatadogAPIClient::V2::ReplaySummaryDataRequest.new({ + type: DatadogAPIClient::V2::ReplaySummaryRequestType::REPLAY_SUMMARY_REQUEST, + }), +}) +p api_instance.generate_replay_summary("00000000-0000-0000-0000-000000000001", "rum", body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index a0c4193084bc..d45343f89690 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -3768,6 +3768,24 @@ "agent_rule_id" => "String", "body" => "CloudWorkloadSecurityAgentRuleUpdateRequest", }, + "v2.ListReplayAnalysisIssues" => { + "filter_application_id" => "String", + "filter_severity" => "String", + "filter_view_name" => "String", + "filter_issue_category" => "String", + "sort" => "String", + "page_number" => "Integer", + "page_size" => "Integer", + }, + "v2.GetReplayAnalysisIssue" => { + "issue_id" => "String", + }, + "v2.ListReplayAnalysisIssueSessions" => { + "issue_id" => "String", + "sort" => "String", + "page_number" => "Integer", + "page_size" => "Integer", + }, "v2.ListReplayHeatmapSnapshots" => { "filter_device_type" => "String", "filter_view_name" => "String", @@ -3784,6 +3802,12 @@ "snapshot_id" => "String", "body" => "SnapshotUpdateRequest", }, + "v2.GenerateReplaySummary" => { + "session_id" => "String", + "data_source" => "String", + "ts" => "Integer", + "body" => "ReplaySummaryRequest", + }, "v2.DeleteRestrictionPolicy" => { "resource_id" => "String", }, diff --git a/features/v2/rum_replay.feature b/features/v2/rum_replay.feature new file mode 100644 index 000000000000..f051e15370a5 --- /dev/null +++ b/features/v2/rum_replay.feature @@ -0,0 +1,32 @@ +@endpoint(rum-replay) @endpoint(rum-replay-v2) +Feature: Rum Replay + Generate and retrieve AI-powered summaries of RUM replay sessions. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "RumReplay" API + And operation "GenerateReplaySummary" enabled + And new "GenerateReplaySummary" request + And body with value {"data": {"type": "replay_summary_request"}} + + @generated @skip @team:DataDog/product-analytics-backend @team:DataDog/rum-backend @team:DataDog/session-replay-backend + Scenario: Generate replay summary returns "Bad Request" response + Given request contains "session_id" parameter from "REPLACE.ME" + And request contains "data_source" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/product-analytics-backend @team:DataDog/rum-backend @team:DataDog/session-replay-backend + Scenario: Generate replay summary returns "Not Found" response + Given request contains "session_id" parameter from "REPLACE.ME" + And request contains "data_source" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/product-analytics-backend @team:DataDog/rum-backend @team:DataDog/session-replay-backend + Scenario: Generate replay summary returns "OK" response + Given request contains "session_id" parameter from "REPLACE.ME" + And request contains "data_source" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK diff --git a/features/v2/rum_replay_analysis.feature b/features/v2/rum_replay_analysis.feature new file mode 100644 index 000000000000..e1556fcebfc7 --- /dev/null +++ b/features/v2/rum_replay_analysis.feature @@ -0,0 +1,72 @@ +@endpoint(rum-replay-analysis) @endpoint(rum-replay-analysis-v2) +Feature: Rum Replay Analysis + Analyze RUM replay sessions to identify and investigate user-facing + issues. Retrieve issues detected by AI analysis, get details for + individual issues, and explore the sessions associated with each issue. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "RumReplayAnalysis" API + + @generated @skip @team:DataDog/product-analytics-backend @team:DataDog/rum-backend @team:DataDog/session-replay-backend + Scenario: Get replay analysis issue returns "Bad Request" response + Given operation "GetReplayAnalysisIssue" enabled + And new "GetReplayAnalysisIssue" request + And request contains "issue_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/product-analytics-backend @team:DataDog/rum-backend @team:DataDog/session-replay-backend + Scenario: Get replay analysis issue returns "Not Found" response + Given operation "GetReplayAnalysisIssue" enabled + And new "GetReplayAnalysisIssue" request + And request contains "issue_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/product-analytics-backend @team:DataDog/rum-backend @team:DataDog/session-replay-backend + Scenario: Get replay analysis issue returns "OK" response + Given operation "GetReplayAnalysisIssue" enabled + And new "GetReplayAnalysisIssue" request + And request contains "issue_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/product-analytics-backend @team:DataDog/rum-backend @team:DataDog/session-replay-backend + Scenario: List replay analysis issue sessions returns "Bad Request" response + Given operation "ListReplayAnalysisIssueSessions" enabled + And new "ListReplayAnalysisIssueSessions" request + And request contains "issue_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/product-analytics-backend @team:DataDog/rum-backend @team:DataDog/session-replay-backend + Scenario: List replay analysis issue sessions returns "Not Found" response + Given operation "ListReplayAnalysisIssueSessions" enabled + And new "ListReplayAnalysisIssueSessions" request + And request contains "issue_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/product-analytics-backend @team:DataDog/rum-backend @team:DataDog/session-replay-backend + Scenario: List replay analysis issue sessions returns "OK" response + Given operation "ListReplayAnalysisIssueSessions" enabled + And new "ListReplayAnalysisIssueSessions" request + And request contains "issue_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/product-analytics-backend @team:DataDog/rum-backend @team:DataDog/session-replay-backend + Scenario: List replay analysis issues returns "Bad Request" response + Given operation "ListReplayAnalysisIssues" enabled + And new "ListReplayAnalysisIssues" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/product-analytics-backend @team:DataDog/rum-backend @team:DataDog/session-replay-backend + Scenario: List replay analysis issues returns "OK" response + Given operation "ListReplayAnalysisIssues" enabled + And new "ListReplayAnalysisIssues" request + When the request is sent + Then the response status is 200 OK diff --git a/features/v2/undo.json b/features/v2/undo.json index 96d9f3eb5d14..2732c40dfb60 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -4792,6 +4792,24 @@ "type": "idempotent" } }, + "ListReplayAnalysisIssues": { + "tag": "Rum Replay Analysis", + "undo": { + "type": "safe" + } + }, + "GetReplayAnalysisIssue": { + "tag": "Rum Replay Analysis", + "undo": { + "type": "safe" + } + }, + "ListReplayAnalysisIssueSessions": { + "tag": "Rum Replay Analysis", + "undo": { + "type": "safe" + } + }, "ListReplayHeatmapSnapshots": { "tag": "Rum Replay Heatmaps", "undo": { @@ -4823,6 +4841,12 @@ "type": "idempotent" } }, + "GenerateReplaySummary": { + "tag": "Rum Replay", + "undo": { + "type": "idempotent" + } + }, "DeleteRestrictionPolicy": { "tag": "Restriction Policies", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index 5ecf38d58d02..63cf7fcb3a94 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -435,6 +435,10 @@ def initialize "v2.query_event_filtered_users": false, "v2.query_users": false, "v2.update_connection": false, + "v2.get_replay_analysis_issue": false, + "v2.list_replay_analysis_issues": false, + "v2.list_replay_analysis_issue_sessions": false, + "v2.generate_replay_summary": false, "v2.create_scorecard_outcomes_batch": false, "v2.list_entity_risk_scores": false, "v2.create_incident_service": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index fe048900613d..87778de2a456 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -4732,6 +4732,30 @@ def overrides "v2.reorder_ruleset_resource_array" => "ReorderRulesetResourceArray", "v2.reorder_ruleset_resource_data" => "ReorderRulesetResourceData", "v2.reorder_ruleset_resource_data_type" => "ReorderRulesetResourceDataType", + "v2.replay_analysis_affected_session" => "ReplayAnalysisAffectedSession", + "v2.replay_analysis_issue_data" => "ReplayAnalysisIssueData", + "v2.replay_analysis_issue_data_attributes" => "ReplayAnalysisIssueDataAttributes", + "v2.replay_analysis_issue_data_type" => "ReplayAnalysisIssueDataType", + "v2.replay_analysis_issue_meta" => "ReplayAnalysisIssueMeta", + "v2.replay_analysis_issue_response" => "ReplayAnalysisIssueResponse", + "v2.replay_analysis_issue_session_data" => "ReplayAnalysisIssueSessionData", + "v2.replay_analysis_issue_session_data_attributes" => "ReplayAnalysisIssueSessionDataAttributes", + "v2.replay_analysis_issue_session_data_type" => "ReplayAnalysisIssueSessionDataType", + "v2.replay_analysis_issue_sessions_response" => "ReplayAnalysisIssueSessionsResponse", + "v2.replay_analysis_issues_response" => "ReplayAnalysisIssuesResponse", + "v2.replay_analysis_llm_details" => "ReplayAnalysisLLMDetails", + "v2.replay_analysis_page_meta" => "ReplayAnalysisPageMeta", + "v2.replay_analysis_representative_session" => "ReplayAnalysisRepresentativeSession", + "v2.replay_analysis_screenshot" => "ReplayAnalysisScreenshot", + "v2.replay_analysis_signal" => "ReplayAnalysisSignal", + "v2.replay_summary_chapter" => "ReplaySummaryChapter", + "v2.replay_summary_data_attributes_response" => "ReplaySummaryDataAttributesResponse", + "v2.replay_summary_data_request" => "ReplaySummaryDataRequest", + "v2.replay_summary_data_response" => "ReplaySummaryDataResponse", + "v2.replay_summary_request" => "ReplaySummaryRequest", + "v2.replay_summary_request_type" => "ReplaySummaryRequestType", + "v2.replay_summary_response" => "ReplaySummaryResponse", + "v2.replay_summary_response_type" => "ReplaySummaryResponseType", "v2.resolve_vulnerable_symbols_request" => "ResolveVulnerableSymbolsRequest", "v2.resolve_vulnerable_symbols_request_data" => "ResolveVulnerableSymbolsRequestData", "v2.resolve_vulnerable_symbols_request_data_attributes" => "ResolveVulnerableSymbolsRequestDataAttributes", @@ -6470,6 +6494,8 @@ def overrides "v2.rum_api" => "RUMAPI", "v2.rum_audience_management_api" => "RumAudienceManagementAPI", "v2.rum_metrics_api" => "RumMetricsAPI", + "v2.rum_replay_api" => "RumReplayAPI", + "v2.rum_replay_analysis_api" => "RumReplayAnalysisAPI", "v2.rum_replay_heatmaps_api" => "RumReplayHeatmapsAPI", "v2.rum_replay_playlists_api" => "RumReplayPlaylistsAPI", "v2.rum_replay_sessions_api" => "RumReplaySessionsAPI", diff --git a/lib/datadog_api_client/v2/api/rum_replay_analysis_api.rb b/lib/datadog_api_client/v2/api/rum_replay_analysis_api.rb new file mode 100644 index 000000000000..f1584885506e --- /dev/null +++ b/lib/datadog_api_client/v2/api/rum_replay_analysis_api.rb @@ -0,0 +1,272 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'cgi' + +module DatadogAPIClient::V2 + class RumReplayAnalysisAPI + attr_accessor :api_client + + def initialize(api_client = DatadogAPIClient::APIClient.default) + @api_client = api_client + end + + # Get replay analysis issue. + # + # @see #get_replay_analysis_issue_with_http_info + def get_replay_analysis_issue(issue_id, opts = {}) + data, _status_code, _headers = get_replay_analysis_issue_with_http_info(issue_id, opts) + data + end + + # Get replay analysis issue. + # + # Retrieve details of a specific RUM replay analysis issue by its identifier. + # + # @param issue_id [String] Unique identifier of the issue. + # @param opts [Hash] the optional parameters + # @return [Array<(ReplayAnalysisIssueResponse, Integer, Hash)>] ReplayAnalysisIssueResponse data, response status code and response headers + def get_replay_analysis_issue_with_http_info(issue_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_replay_analysis_issue".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_replay_analysis_issue") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_replay_analysis_issue")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumReplayAnalysisAPI.get_replay_analysis_issue ...' + end + # verify the required parameter 'issue_id' is set + if @api_client.config.client_side_validation && issue_id.nil? + fail ArgumentError, "Missing the required parameter 'issue_id' when calling RumReplayAnalysisAPI.get_replay_analysis_issue" + end + # resource path + local_var_path = '/api/v2/replay/analysis/issues/{issue_id}'.sub('{issue_id}', CGI.escape(issue_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ReplayAnalysisIssueResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_replay_analysis_issue, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumReplayAnalysisAPI#get_replay_analysis_issue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List replay analysis issues. + # + # @see #list_replay_analysis_issues_with_http_info + def list_replay_analysis_issues(opts = {}) + data, _status_code, _headers = list_replay_analysis_issues_with_http_info(opts) + data + end + + # List replay analysis issues. + # + # Retrieve a paginated list of RUM replay analysis issues, optionally filtered by application, severity, view name, or issue category. + # + # @param opts [Hash] the optional parameters + # @option opts [String] :filter_application_id Filter issues by application UUID. + # @option opts [String] :filter_severity Filter issues by comma-separated severity values. Valid values are `high`, `medium`, and `low`. + # @option opts [String] :filter_view_name Filter issues by comma-separated view names. + # @option opts [String] :filter_issue_category Filter issues by comma-separated issue categories. + # @option opts [String] :sort Sort order for the results. Valid values are `created_at`, `-created_at`, `severity`, `-severity`, `session_count`, and `-session_count`. Defaults to `-created_at`. + # @option opts [Integer] :page_number Page number for pagination (0-indexed). + # @option opts [Integer] :page_size Number of items per page. Must be between 1 and 100. + # @return [Array<(ReplayAnalysisIssuesResponse, Integer, Hash)>] ReplayAnalysisIssuesResponse data, response status code and response headers + def list_replay_analysis_issues_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_replay_analysis_issues".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_replay_analysis_issues") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_replay_analysis_issues")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumReplayAnalysisAPI.list_replay_analysis_issues ...' + end + if @api_client.config.client_side_validation && !opts[:'page_number'].nil? && opts[:'page_number'] < 0 + fail ArgumentError, 'invalid value for "opts[:"page_number"]" when calling RumReplayAnalysisAPI.list_replay_analysis_issues, must be greater than or equal to 0.' + end + if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 + fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling RumReplayAnalysisAPI.list_replay_analysis_issues, must be smaller than or equal to 100.' + end + if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 + fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling RumReplayAnalysisAPI.list_replay_analysis_issues, must be greater than or equal to 1.' + end + # resource path + local_var_path = '/api/v2/replay/analysis/issues' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'filter[application_id]'] = opts[:'filter_application_id'] if !opts[:'filter_application_id'].nil? + query_params[:'filter[severity]'] = opts[:'filter_severity'] if !opts[:'filter_severity'].nil? + query_params[:'filter[view_name]'] = opts[:'filter_view_name'] if !opts[:'filter_view_name'].nil? + query_params[:'filter[issue_category]'] = opts[:'filter_issue_category'] if !opts[:'filter_issue_category'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? + query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? + query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ReplayAnalysisIssuesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_replay_analysis_issues, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumReplayAnalysisAPI#list_replay_analysis_issues\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List replay analysis issue sessions. + # + # @see #list_replay_analysis_issue_sessions_with_http_info + def list_replay_analysis_issue_sessions(issue_id, opts = {}) + data, _status_code, _headers = list_replay_analysis_issue_sessions_with_http_info(issue_id, opts) + data + end + + # List replay analysis issue sessions. + # + # Retrieve a paginated list of sessions related to a specific RUM replay analysis issue. + # + # @param issue_id [String] Unique identifier of the issue. + # @param opts [Hash] the optional parameters + # @option opts [String] :sort Sort order for the results. Valid values are `last_seen_at`, `-last_seen_at`, `proximity`, and `-proximity`. Defaults to `-last_seen_at`. + # @option opts [Integer] :page_number Page number for pagination (0-indexed). + # @option opts [Integer] :page_size Number of items per page. Must be between 1 and 100. + # @return [Array<(ReplayAnalysisIssueSessionsResponse, Integer, Hash)>] ReplayAnalysisIssueSessionsResponse data, response status code and response headers + def list_replay_analysis_issue_sessions_with_http_info(issue_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_replay_analysis_issue_sessions".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_replay_analysis_issue_sessions") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_replay_analysis_issue_sessions")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumReplayAnalysisAPI.list_replay_analysis_issue_sessions ...' + end + # verify the required parameter 'issue_id' is set + if @api_client.config.client_side_validation && issue_id.nil? + fail ArgumentError, "Missing the required parameter 'issue_id' when calling RumReplayAnalysisAPI.list_replay_analysis_issue_sessions" + end + if @api_client.config.client_side_validation && !opts[:'page_number'].nil? && opts[:'page_number'] < 0 + fail ArgumentError, 'invalid value for "opts[:"page_number"]" when calling RumReplayAnalysisAPI.list_replay_analysis_issue_sessions, must be greater than or equal to 0.' + end + if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 + fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling RumReplayAnalysisAPI.list_replay_analysis_issue_sessions, must be smaller than or equal to 100.' + end + if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 + fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling RumReplayAnalysisAPI.list_replay_analysis_issue_sessions, must be greater than or equal to 1.' + end + # resource path + local_var_path = '/api/v2/replay/analysis/issues/{issue_id}/sessions'.sub('{issue_id}', CGI.escape(issue_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? + query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? + query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ReplayAnalysisIssueSessionsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_replay_analysis_issue_sessions, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumReplayAnalysisAPI#list_replay_analysis_issue_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/datadog_api_client/v2/api/rum_replay_api.rb b/lib/datadog_api_client/v2/api/rum_replay_api.rb new file mode 100644 index 000000000000..04ed202ae99f --- /dev/null +++ b/lib/datadog_api_client/v2/api/rum_replay_api.rb @@ -0,0 +1,112 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'cgi' + +module DatadogAPIClient::V2 + class RumReplayAPI + attr_accessor :api_client + + def initialize(api_client = DatadogAPIClient::APIClient.default) + @api_client = api_client + end + + # Generate replay summary. + # + # @see #generate_replay_summary_with_http_info + def generate_replay_summary(session_id, data_source, body, opts = {}) + data, _status_code, _headers = generate_replay_summary_with_http_info(session_id, data_source, body, opts) + data + end + + # Generate replay summary. + # + # Generate an AI-powered summary for a RUM replay session, including chapter breakdowns and behavioral analysis. + # + # @param session_id [String] Unique identifier of the session. + # @param data_source [String] Data source for the session. Valid values are `rum`, `product_analytics`, and `replay`. + # @param body [ReplaySummaryRequest] + # @param opts [Hash] the optional parameters + # @option opts [Integer] :ts Server-side timestamp in milliseconds. + # @return [Array<(ReplaySummaryResponse, Integer, Hash)>] ReplaySummaryResponse data, response status code and response headers + def generate_replay_summary_with_http_info(session_id, data_source, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.generate_replay_summary".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.generate_replay_summary") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.generate_replay_summary")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumReplayAPI.generate_replay_summary ...' + end + # verify the required parameter 'session_id' is set + if @api_client.config.client_side_validation && session_id.nil? + fail ArgumentError, "Missing the required parameter 'session_id' when calling RumReplayAPI.generate_replay_summary" + end + # verify the required parameter 'data_source' is set + if @api_client.config.client_side_validation && data_source.nil? + fail ArgumentError, "Missing the required parameter 'data_source' when calling RumReplayAPI.generate_replay_summary" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling RumReplayAPI.generate_replay_summary" + end + # resource path + local_var_path = '/api/v2/replay/summary/{session_id}'.sub('{session_id}', CGI.escape(session_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'data_source'] = data_source + query_params[:'ts'] = opts[:'ts'] if !opts[:'ts'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'ReplaySummaryResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :generate_replay_summary, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumReplayAPI#generate_replay_summary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/datadog_api_client/v2/models/replay_analysis_affected_session.rb b/lib/datadog_api_client/v2/models/replay_analysis_affected_session.rb new file mode 100644 index 000000000000..38fb328892b0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/replay_analysis_affected_session.rb @@ -0,0 +1,141 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A session affected by a replay analysis issue. + class ReplayAnalysisAffectedSession + include BaseGenericModel + + # Unique identifier of the affected session. + attr_reader :session_id + + # Session start timestamp in milliseconds. + attr_accessor :session_start_timestamp_ms + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'session_id' => :'session_id', + :'session_start_timestamp_ms' => :'session_start_timestamp_ms' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'session_id' => :'String', + :'session_start_timestamp_ms' => :'Integer' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'session_start_timestamp_ms', + ]) + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ReplayAnalysisAffectedSession` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'session_id') + self.session_id = attributes[:'session_id'] + end + + if attributes.key?(:'session_start_timestamp_ms') + self.session_start_timestamp_ms = attributes[:'session_start_timestamp_ms'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @session_id.nil? + true + end + + # Custom attribute writer method with validation + # @param session_id [Object] Object to be assigned + # @!visibility private + def session_id=(session_id) + if session_id.nil? + fail ArgumentError, 'invalid value for "session_id", session_id cannot be nil.' + end + @session_id = session_id + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + session_id == o.session_id && + session_start_timestamp_ms == o.session_start_timestamp_ms && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [session_id, session_start_timestamp_ms, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/replay_analysis_issue_data.rb b/lib/datadog_api_client/v2/models/replay_analysis_issue_data.rb new file mode 100644 index 000000000000..30974a67afe5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/replay_analysis_issue_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data object representing a RUM replay analysis issue. + class ReplayAnalysisIssueData + include BaseGenericModel + + # Attributes of a RUM replay analysis issue. + attr_reader :attributes + + # Unique identifier of the issue. + attr_reader :id + + # RUM replay analysis issue resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'ReplayAnalysisIssueDataAttributes', + :'id' => :'String', + :'type' => :'ReplayAnalysisIssueDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ReplayAnalysisIssueData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/replay_analysis_issue_data_attributes.rb b/lib/datadog_api_client/v2/models/replay_analysis_issue_data_attributes.rb new file mode 100644 index 000000000000..5a08f21e90c4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/replay_analysis_issue_data_attributes.rb @@ -0,0 +1,332 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a RUM replay analysis issue. + class ReplayAnalysisIssueDataAttributes + include BaseGenericModel + + # Up to three sample sessions affected by this issue. + attr_reader :affected_sessions + + # Unique identifier of the application where the issue was detected. + attr_reader :application_id + + # Timestamp when the issue was first detected. + attr_reader :created_at + + # Human-readable description of the issue. + attr_reader :description + + # Journey query associated with the issue. + attr_accessor :journey_query + + # Name of the issue. + attr_reader :name + + # A representative session illustrating a replay analysis issue. + attr_reader :representative_session + + # Total number of sessions affected by this issue. + attr_reader :session_count + + # Severity level of the issue. Valid values are `high`, `medium`, and `low`. + attr_reader :severity + + # Timestamp when the issue was last updated. + attr_reader :updated_at + + # Validation status of the issue. + attr_reader :validation_verdict + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'affected_sessions' => :'affected_sessions', + :'application_id' => :'application_id', + :'created_at' => :'created_at', + :'description' => :'description', + :'journey_query' => :'journey_query', + :'name' => :'name', + :'representative_session' => :'representative_session', + :'session_count' => :'session_count', + :'severity' => :'severity', + :'updated_at' => :'updated_at', + :'validation_verdict' => :'validation_verdict' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'affected_sessions' => :'Array', + :'application_id' => :'String', + :'created_at' => :'Time', + :'description' => :'String', + :'journey_query' => :'Hash', + :'name' => :'String', + :'representative_session' => :'ReplayAnalysisRepresentativeSession', + :'session_count' => :'Integer', + :'severity' => :'String', + :'updated_at' => :'Time', + :'validation_verdict' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'journey_query', + ]) + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ReplayAnalysisIssueDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'affected_sessions') + if (value = attributes[:'affected_sessions']).is_a?(Array) + self.affected_sessions = value + end + end + + if attributes.key?(:'application_id') + self.application_id = attributes[:'application_id'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'journey_query') + self.journey_query = attributes[:'journey_query'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'representative_session') + self.representative_session = attributes[:'representative_session'] + end + + if attributes.key?(:'session_count') + self.session_count = attributes[:'session_count'] + end + + if attributes.key?(:'severity') + self.severity = attributes[:'severity'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + + if attributes.key?(:'validation_verdict') + self.validation_verdict = attributes[:'validation_verdict'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @affected_sessions.nil? + return false if @application_id.nil? + return false if @created_at.nil? + return false if @description.nil? + return false if @name.nil? + return false if @representative_session.nil? + return false if @session_count.nil? + return false if @severity.nil? + return false if @updated_at.nil? + return false if @validation_verdict.nil? + true + end + + # Custom attribute writer method with validation + # @param affected_sessions [Object] Object to be assigned + # @!visibility private + def affected_sessions=(affected_sessions) + if affected_sessions.nil? + fail ArgumentError, 'invalid value for "affected_sessions", affected_sessions cannot be nil.' + end + @affected_sessions = affected_sessions + end + + # Custom attribute writer method with validation + # @param application_id [Object] Object to be assigned + # @!visibility private + def application_id=(application_id) + if application_id.nil? + fail ArgumentError, 'invalid value for "application_id", application_id cannot be nil.' + end + @application_id = application_id + end + + # Custom attribute writer method with validation + # @param created_at [Object] Object to be assigned + # @!visibility private + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'invalid value for "created_at", created_at cannot be nil.' + end + @created_at = created_at + end + + # Custom attribute writer method with validation + # @param description [Object] Object to be assigned + # @!visibility private + def description=(description) + if description.nil? + fail ArgumentError, 'invalid value for "description", description cannot be nil.' + end + @description = description + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param representative_session [Object] Object to be assigned + # @!visibility private + def representative_session=(representative_session) + if representative_session.nil? + fail ArgumentError, 'invalid value for "representative_session", representative_session cannot be nil.' + end + @representative_session = representative_session + end + + # Custom attribute writer method with validation + # @param session_count [Object] Object to be assigned + # @!visibility private + def session_count=(session_count) + if session_count.nil? + fail ArgumentError, 'invalid value for "session_count", session_count cannot be nil.' + end + @session_count = session_count + end + + # Custom attribute writer method with validation + # @param severity [Object] Object to be assigned + # @!visibility private + def severity=(severity) + if severity.nil? + fail ArgumentError, 'invalid value for "severity", severity cannot be nil.' + end + @severity = severity + end + + # Custom attribute writer method with validation + # @param updated_at [Object] Object to be assigned + # @!visibility private + def updated_at=(updated_at) + if updated_at.nil? + fail ArgumentError, 'invalid value for "updated_at", updated_at cannot be nil.' + end + @updated_at = updated_at + end + + # Custom attribute writer method with validation + # @param validation_verdict [Object] Object to be assigned + # @!visibility private + def validation_verdict=(validation_verdict) + if validation_verdict.nil? + fail ArgumentError, 'invalid value for "validation_verdict", validation_verdict cannot be nil.' + end + @validation_verdict = validation_verdict + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + affected_sessions == o.affected_sessions && + application_id == o.application_id && + created_at == o.created_at && + description == o.description && + journey_query == o.journey_query && + name == o.name && + representative_session == o.representative_session && + session_count == o.session_count && + severity == o.severity && + updated_at == o.updated_at && + validation_verdict == o.validation_verdict && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [affected_sessions, application_id, created_at, description, journey_query, name, representative_session, session_count, severity, updated_at, validation_verdict, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/replay_analysis_issue_data_type.rb b/lib/datadog_api_client/v2/models/replay_analysis_issue_data_type.rb new file mode 100644 index 000000000000..1aeb20820afd --- /dev/null +++ b/lib/datadog_api_client/v2/models/replay_analysis_issue_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # RUM replay analysis issue resource type. + class ReplayAnalysisIssueDataType + include BaseEnumModel + + ISSUES = "issues".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/replay_analysis_issue_meta.rb b/lib/datadog_api_client/v2/models/replay_analysis_issue_meta.rb new file mode 100644 index 000000000000..09036a6af8ba --- /dev/null +++ b/lib/datadog_api_client/v2/models/replay_analysis_issue_meta.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Metadata object for paginated issue list responses. + class ReplayAnalysisIssueMeta + include BaseGenericModel + + # Pagination metadata for a RUM replay analysis response. + attr_reader :page + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'page' => :'page' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'page' => :'ReplayAnalysisPageMeta' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ReplayAnalysisIssueMeta` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'page') + self.page = attributes[:'page'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @page.nil? + true + end + + # Custom attribute writer method with validation + # @param page [Object] Object to be assigned + # @!visibility private + def page=(page) + if page.nil? + fail ArgumentError, 'invalid value for "page", page cannot be nil.' + end + @page = page + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + page == o.page && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [page, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/replay_analysis_issue_response.rb b/lib/datadog_api_client/v2/models/replay_analysis_issue_response.rb new file mode 100644 index 000000000000..3badeaf618f9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/replay_analysis_issue_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A single RUM replay analysis issue. + class ReplayAnalysisIssueResponse + include BaseGenericModel + + # Data object representing a RUM replay analysis issue. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'ReplayAnalysisIssueData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ReplayAnalysisIssueResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/replay_analysis_issue_session_data.rb b/lib/datadog_api_client/v2/models/replay_analysis_issue_session_data.rb new file mode 100644 index 000000000000..013e28f7d61a --- /dev/null +++ b/lib/datadog_api_client/v2/models/replay_analysis_issue_session_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data object representing a session related to a RUM replay analysis issue. + class ReplayAnalysisIssueSessionData + include BaseGenericModel + + # Attributes of a session related to a RUM replay analysis issue. + attr_reader :attributes + + # Unique identifier of the session. + attr_reader :id + + # RUM replay analysis issue session resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'ReplayAnalysisIssueSessionDataAttributes', + :'id' => :'String', + :'type' => :'ReplayAnalysisIssueSessionDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ReplayAnalysisIssueSessionData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/replay_analysis_issue_session_data_attributes.rb b/lib/datadog_api_client/v2/models/replay_analysis_issue_session_data_attributes.rb new file mode 100644 index 000000000000..822301f13b6d --- /dev/null +++ b/lib/datadog_api_client/v2/models/replay_analysis_issue_session_data_attributes.rb @@ -0,0 +1,167 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a session related to a RUM replay analysis issue. + class ReplayAnalysisIssueSessionDataAttributes + include BaseGenericModel + + # Session start timestamp in milliseconds. + attr_reader :session_start_timestamp_ms + + # List of signals observed in this session. + attr_reader :signals + + # Name of the view where the issue was observed. + attr_reader :view_name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'session_start_timestamp_ms' => :'session_start_timestamp_ms', + :'signals' => :'signals', + :'view_name' => :'view_name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'session_start_timestamp_ms' => :'Integer', + :'signals' => :'Array', + :'view_name' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ReplayAnalysisIssueSessionDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'session_start_timestamp_ms') + self.session_start_timestamp_ms = attributes[:'session_start_timestamp_ms'] + end + + if attributes.key?(:'signals') + if (value = attributes[:'signals']).is_a?(Array) + self.signals = value + end + end + + if attributes.key?(:'view_name') + self.view_name = attributes[:'view_name'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @session_start_timestamp_ms.nil? + return false if @signals.nil? + return false if @view_name.nil? + true + end + + # Custom attribute writer method with validation + # @param session_start_timestamp_ms [Object] Object to be assigned + # @!visibility private + def session_start_timestamp_ms=(session_start_timestamp_ms) + if session_start_timestamp_ms.nil? + fail ArgumentError, 'invalid value for "session_start_timestamp_ms", session_start_timestamp_ms cannot be nil.' + end + @session_start_timestamp_ms = session_start_timestamp_ms + end + + # Custom attribute writer method with validation + # @param signals [Object] Object to be assigned + # @!visibility private + def signals=(signals) + if signals.nil? + fail ArgumentError, 'invalid value for "signals", signals cannot be nil.' + end + @signals = signals + end + + # Custom attribute writer method with validation + # @param view_name [Object] Object to be assigned + # @!visibility private + def view_name=(view_name) + if view_name.nil? + fail ArgumentError, 'invalid value for "view_name", view_name cannot be nil.' + end + @view_name = view_name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + session_start_timestamp_ms == o.session_start_timestamp_ms && + signals == o.signals && + view_name == o.view_name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [session_start_timestamp_ms, signals, view_name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/replay_analysis_issue_session_data_type.rb b/lib/datadog_api_client/v2/models/replay_analysis_issue_session_data_type.rb new file mode 100644 index 000000000000..a94f164871db --- /dev/null +++ b/lib/datadog_api_client/v2/models/replay_analysis_issue_session_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # RUM replay analysis issue session resource type. + class ReplayAnalysisIssueSessionDataType + include BaseEnumModel + + SESSIONS = "sessions".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/replay_analysis_issue_sessions_response.rb b/lib/datadog_api_client/v2/models/replay_analysis_issue_sessions_response.rb new file mode 100644 index 000000000000..0dc638ee0838 --- /dev/null +++ b/lib/datadog_api_client/v2/models/replay_analysis_issue_sessions_response.rb @@ -0,0 +1,146 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A paginated list of sessions related to a RUM replay analysis issue. + class ReplayAnalysisIssueSessionsResponse + include BaseGenericModel + + # Array of session data objects related to the issue. + attr_reader :data + + # Metadata object for paginated issue list responses. + attr_reader :meta + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'meta' => :'meta' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array', + :'meta' => :'ReplayAnalysisIssueMeta' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ReplayAnalysisIssueSessionsResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + return false if @meta.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Custom attribute writer method with validation + # @param meta [Object] Object to be assigned + # @!visibility private + def meta=(meta) + if meta.nil? + fail ArgumentError, 'invalid value for "meta", meta cannot be nil.' + end + @meta = meta + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + meta == o.meta && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, meta, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/replay_analysis_issues_response.rb b/lib/datadog_api_client/v2/models/replay_analysis_issues_response.rb new file mode 100644 index 000000000000..4935f6ef9d74 --- /dev/null +++ b/lib/datadog_api_client/v2/models/replay_analysis_issues_response.rb @@ -0,0 +1,146 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A paginated list of RUM replay analysis issues. + class ReplayAnalysisIssuesResponse + include BaseGenericModel + + # Array of RUM replay analysis issue data objects. + attr_reader :data + + # Metadata object for paginated issue list responses. + attr_reader :meta + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'meta' => :'meta' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array', + :'meta' => :'ReplayAnalysisIssueMeta' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ReplayAnalysisIssuesResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + return false if @meta.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Custom attribute writer method with validation + # @param meta [Object] Object to be assigned + # @!visibility private + def meta=(meta) + if meta.nil? + fail ArgumentError, 'invalid value for "meta", meta cannot be nil.' + end + @meta = meta + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + meta == o.meta && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, meta, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/replay_analysis_llm_details.rb b/lib/datadog_api_client/v2/models/replay_analysis_llm_details.rb new file mode 100644 index 000000000000..ce67d384a55a --- /dev/null +++ b/lib/datadog_api_client/v2/models/replay_analysis_llm_details.rb @@ -0,0 +1,146 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # AI-generated analysis details for a replay issue. + class ReplayAnalysisLLMDetails + include BaseGenericModel + + # Interpreted user intent derived from session analysis. + attr_reader :intent + + # List of user behavior steps observed in the session. + attr_reader :user_pattern + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'intent' => :'intent', + :'user_pattern' => :'user_pattern' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'intent' => :'String', + :'user_pattern' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ReplayAnalysisLLMDetails` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'intent') + self.intent = attributes[:'intent'] + end + + if attributes.key?(:'user_pattern') + if (value = attributes[:'user_pattern']).is_a?(Array) + self.user_pattern = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @intent.nil? + return false if @user_pattern.nil? + true + end + + # Custom attribute writer method with validation + # @param intent [Object] Object to be assigned + # @!visibility private + def intent=(intent) + if intent.nil? + fail ArgumentError, 'invalid value for "intent", intent cannot be nil.' + end + @intent = intent + end + + # Custom attribute writer method with validation + # @param user_pattern [Object] Object to be assigned + # @!visibility private + def user_pattern=(user_pattern) + if user_pattern.nil? + fail ArgumentError, 'invalid value for "user_pattern", user_pattern cannot be nil.' + end + @user_pattern = user_pattern + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + intent == o.intent && + user_pattern == o.user_pattern && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [intent, user_pattern, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/replay_analysis_page_meta.rb b/lib/datadog_api_client/v2/models/replay_analysis_page_meta.rb new file mode 100644 index 000000000000..04bcd5c03c89 --- /dev/null +++ b/lib/datadog_api_client/v2/models/replay_analysis_page_meta.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Pagination metadata for a RUM replay analysis response. + class ReplayAnalysisPageMeta + include BaseGenericModel + + # Total number of items matching the current filters. + attr_reader :total_filtered_count + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'total_filtered_count' => :'total_filtered_count' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'total_filtered_count' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ReplayAnalysisPageMeta` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'total_filtered_count') + self.total_filtered_count = attributes[:'total_filtered_count'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @total_filtered_count.nil? + true + end + + # Custom attribute writer method with validation + # @param total_filtered_count [Object] Object to be assigned + # @!visibility private + def total_filtered_count=(total_filtered_count) + if total_filtered_count.nil? + fail ArgumentError, 'invalid value for "total_filtered_count", total_filtered_count cannot be nil.' + end + @total_filtered_count = total_filtered_count + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + total_filtered_count == o.total_filtered_count && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [total_filtered_count, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/replay_analysis_representative_session.rb b/lib/datadog_api_client/v2/models/replay_analysis_representative_session.rb new file mode 100644 index 000000000000..ac5953b0f532 --- /dev/null +++ b/lib/datadog_api_client/v2/models/replay_analysis_representative_session.rb @@ -0,0 +1,237 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A representative session illustrating a replay analysis issue. + class ReplayAnalysisRepresentativeSession + include BaseGenericModel + + # Category of the issue observed in this session. + attr_reader :issue_category + + # AI-generated analysis details for a replay issue. + attr_reader :llm_analysis_details + + # A screenshot captured during a replay session. + attr_accessor :screenshot + + # Unique identifier of the representative session. + attr_reader :session_id + + # Session start timestamp in milliseconds. + attr_reader :session_start_timestamp_ms + + # List of signals observed in the representative session. + attr_reader :signals + + # Name of the view where the issue was observed. + attr_accessor :view_name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'issue_category' => :'issue_category', + :'llm_analysis_details' => :'llm_analysis_details', + :'screenshot' => :'screenshot', + :'session_id' => :'session_id', + :'session_start_timestamp_ms' => :'session_start_timestamp_ms', + :'signals' => :'signals', + :'view_name' => :'view_name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'issue_category' => :'String', + :'llm_analysis_details' => :'ReplayAnalysisLLMDetails', + :'screenshot' => :'ReplayAnalysisScreenshot', + :'session_id' => :'String', + :'session_start_timestamp_ms' => :'Integer', + :'signals' => :'Array', + :'view_name' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'view_name', + ]) + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ReplayAnalysisRepresentativeSession` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'issue_category') + self.issue_category = attributes[:'issue_category'] + end + + if attributes.key?(:'llm_analysis_details') + self.llm_analysis_details = attributes[:'llm_analysis_details'] + end + + if attributes.key?(:'screenshot') + self.screenshot = attributes[:'screenshot'] + end + + if attributes.key?(:'session_id') + self.session_id = attributes[:'session_id'] + end + + if attributes.key?(:'session_start_timestamp_ms') + self.session_start_timestamp_ms = attributes[:'session_start_timestamp_ms'] + end + + if attributes.key?(:'signals') + if (value = attributes[:'signals']).is_a?(Array) + self.signals = value + end + end + + if attributes.key?(:'view_name') + self.view_name = attributes[:'view_name'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @issue_category.nil? + return false if @llm_analysis_details.nil? + return false if @session_id.nil? + return false if @session_start_timestamp_ms.nil? + return false if @signals.nil? + true + end + + # Custom attribute writer method with validation + # @param issue_category [Object] Object to be assigned + # @!visibility private + def issue_category=(issue_category) + if issue_category.nil? + fail ArgumentError, 'invalid value for "issue_category", issue_category cannot be nil.' + end + @issue_category = issue_category + end + + # Custom attribute writer method with validation + # @param llm_analysis_details [Object] Object to be assigned + # @!visibility private + def llm_analysis_details=(llm_analysis_details) + if llm_analysis_details.nil? + fail ArgumentError, 'invalid value for "llm_analysis_details", llm_analysis_details cannot be nil.' + end + @llm_analysis_details = llm_analysis_details + end + + # Custom attribute writer method with validation + # @param session_id [Object] Object to be assigned + # @!visibility private + def session_id=(session_id) + if session_id.nil? + fail ArgumentError, 'invalid value for "session_id", session_id cannot be nil.' + end + @session_id = session_id + end + + # Custom attribute writer method with validation + # @param session_start_timestamp_ms [Object] Object to be assigned + # @!visibility private + def session_start_timestamp_ms=(session_start_timestamp_ms) + if session_start_timestamp_ms.nil? + fail ArgumentError, 'invalid value for "session_start_timestamp_ms", session_start_timestamp_ms cannot be nil.' + end + @session_start_timestamp_ms = session_start_timestamp_ms + end + + # Custom attribute writer method with validation + # @param signals [Object] Object to be assigned + # @!visibility private + def signals=(signals) + if signals.nil? + fail ArgumentError, 'invalid value for "signals", signals cannot be nil.' + end + @signals = signals + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + issue_category == o.issue_category && + llm_analysis_details == o.llm_analysis_details && + screenshot == o.screenshot && + session_id == o.session_id && + session_start_timestamp_ms == o.session_start_timestamp_ms && + signals == o.signals && + view_name == o.view_name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [issue_category, llm_analysis_details, screenshot, session_id, session_start_timestamp_ms, signals, view_name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/replay_analysis_screenshot.rb b/lib/datadog_api_client/v2/models/replay_analysis_screenshot.rb new file mode 100644 index 000000000000..82b599e613aa --- /dev/null +++ b/lib/datadog_api_client/v2/models/replay_analysis_screenshot.rb @@ -0,0 +1,186 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A screenshot captured during a replay session. + class ReplayAnalysisScreenshot + include BaseGenericModel + + # Filename or key identifier of the screenshot. + attr_reader :screenshot_key + + # Unique identifier of the session where the screenshot was taken. + attr_reader :session_id + + # Timestamp of the screenshot in milliseconds. + attr_reader :timestamp_ms + + # Unique identifier of the view where the screenshot was taken. + attr_reader :view_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'screenshot_key' => :'screenshot_key', + :'session_id' => :'session_id', + :'timestamp_ms' => :'timestamp_ms', + :'view_id' => :'view_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'screenshot_key' => :'String', + :'session_id' => :'String', + :'timestamp_ms' => :'Integer', + :'view_id' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ReplayAnalysisScreenshot` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'screenshot_key') + self.screenshot_key = attributes[:'screenshot_key'] + end + + if attributes.key?(:'session_id') + self.session_id = attributes[:'session_id'] + end + + if attributes.key?(:'timestamp_ms') + self.timestamp_ms = attributes[:'timestamp_ms'] + end + + if attributes.key?(:'view_id') + self.view_id = attributes[:'view_id'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @screenshot_key.nil? + return false if @session_id.nil? + return false if @timestamp_ms.nil? + return false if @view_id.nil? + true + end + + # Custom attribute writer method with validation + # @param screenshot_key [Object] Object to be assigned + # @!visibility private + def screenshot_key=(screenshot_key) + if screenshot_key.nil? + fail ArgumentError, 'invalid value for "screenshot_key", screenshot_key cannot be nil.' + end + @screenshot_key = screenshot_key + end + + # Custom attribute writer method with validation + # @param session_id [Object] Object to be assigned + # @!visibility private + def session_id=(session_id) + if session_id.nil? + fail ArgumentError, 'invalid value for "session_id", session_id cannot be nil.' + end + @session_id = session_id + end + + # Custom attribute writer method with validation + # @param timestamp_ms [Object] Object to be assigned + # @!visibility private + def timestamp_ms=(timestamp_ms) + if timestamp_ms.nil? + fail ArgumentError, 'invalid value for "timestamp_ms", timestamp_ms cannot be nil.' + end + @timestamp_ms = timestamp_ms + end + + # Custom attribute writer method with validation + # @param view_id [Object] Object to be assigned + # @!visibility private + def view_id=(view_id) + if view_id.nil? + fail ArgumentError, 'invalid value for "view_id", view_id cannot be nil.' + end + @view_id = view_id + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + screenshot_key == o.screenshot_key && + session_id == o.session_id && + timestamp_ms == o.timestamp_ms && + view_id == o.view_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [screenshot_key, session_id, timestamp_ms, view_id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/replay_analysis_signal.rb b/lib/datadog_api_client/v2/models/replay_analysis_signal.rb new file mode 100644 index 000000000000..c6c17dfc5b4c --- /dev/null +++ b/lib/datadog_api_client/v2/models/replay_analysis_signal.rb @@ -0,0 +1,186 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A signal associated with a replay issue, capturing user interaction details. + class ReplayAnalysisSignal + include BaseGenericModel + + # Event name associated with the signal. + attr_reader :event + + # Type of signal captured. + attr_reader :signal_type + + # Absolute timestamp of the signal in milliseconds. + attr_reader :timestamp_ms + + # User behavior pattern identified for the signal. + attr_reader :user_pattern + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'event' => :'event', + :'signal_type' => :'signal_type', + :'timestamp_ms' => :'timestamp_ms', + :'user_pattern' => :'user_pattern' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'event' => :'String', + :'signal_type' => :'String', + :'timestamp_ms' => :'Integer', + :'user_pattern' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ReplayAnalysisSignal` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'event') + self.event = attributes[:'event'] + end + + if attributes.key?(:'signal_type') + self.signal_type = attributes[:'signal_type'] + end + + if attributes.key?(:'timestamp_ms') + self.timestamp_ms = attributes[:'timestamp_ms'] + end + + if attributes.key?(:'user_pattern') + self.user_pattern = attributes[:'user_pattern'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @event.nil? + return false if @signal_type.nil? + return false if @timestamp_ms.nil? + return false if @user_pattern.nil? + true + end + + # Custom attribute writer method with validation + # @param event [Object] Object to be assigned + # @!visibility private + def event=(event) + if event.nil? + fail ArgumentError, 'invalid value for "event", event cannot be nil.' + end + @event = event + end + + # Custom attribute writer method with validation + # @param signal_type [Object] Object to be assigned + # @!visibility private + def signal_type=(signal_type) + if signal_type.nil? + fail ArgumentError, 'invalid value for "signal_type", signal_type cannot be nil.' + end + @signal_type = signal_type + end + + # Custom attribute writer method with validation + # @param timestamp_ms [Object] Object to be assigned + # @!visibility private + def timestamp_ms=(timestamp_ms) + if timestamp_ms.nil? + fail ArgumentError, 'invalid value for "timestamp_ms", timestamp_ms cannot be nil.' + end + @timestamp_ms = timestamp_ms + end + + # Custom attribute writer method with validation + # @param user_pattern [Object] Object to be assigned + # @!visibility private + def user_pattern=(user_pattern) + if user_pattern.nil? + fail ArgumentError, 'invalid value for "user_pattern", user_pattern cannot be nil.' + end + @user_pattern = user_pattern + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + event == o.event && + signal_type == o.signal_type && + timestamp_ms == o.timestamp_ms && + user_pattern == o.user_pattern && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [event, signal_type, timestamp_ms, user_pattern, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/replay_summary_chapter.rb b/lib/datadog_api_client/v2/models/replay_summary_chapter.rb new file mode 100644 index 000000000000..78629cd67721 --- /dev/null +++ b/lib/datadog_api_client/v2/models/replay_summary_chapter.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A chapter within a RUM replay summary, representing a distinct segment of user activity. + class ReplaySummaryChapter + include BaseGenericModel + + # End time of the chapter in milliseconds. + attr_reader :end_ms + + # Start time of the chapter in milliseconds. + attr_reader :start_ms + + # Description of user activity during this chapter. + attr_reader :text + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'end_ms' => :'end_ms', + :'start_ms' => :'start_ms', + :'text' => :'text' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'end_ms' => :'Integer', + :'start_ms' => :'Integer', + :'text' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ReplaySummaryChapter` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'end_ms') + self.end_ms = attributes[:'end_ms'] + end + + if attributes.key?(:'start_ms') + self.start_ms = attributes[:'start_ms'] + end + + if attributes.key?(:'text') + self.text = attributes[:'text'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @end_ms.nil? + return false if @start_ms.nil? + return false if @text.nil? + true + end + + # Custom attribute writer method with validation + # @param end_ms [Object] Object to be assigned + # @!visibility private + def end_ms=(end_ms) + if end_ms.nil? + fail ArgumentError, 'invalid value for "end_ms", end_ms cannot be nil.' + end + @end_ms = end_ms + end + + # Custom attribute writer method with validation + # @param start_ms [Object] Object to be assigned + # @!visibility private + def start_ms=(start_ms) + if start_ms.nil? + fail ArgumentError, 'invalid value for "start_ms", start_ms cannot be nil.' + end + @start_ms = start_ms + end + + # Custom attribute writer method with validation + # @param text [Object] Object to be assigned + # @!visibility private + def text=(text) + if text.nil? + fail ArgumentError, 'invalid value for "text", text cannot be nil.' + end + @text = text + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + end_ms == o.end_ms && + start_ms == o.start_ms && + text == o.text && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [end_ms, start_ms, text, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/replay_summary_data_attributes_response.rb b/lib/datadog_api_client/v2/models/replay_summary_data_attributes_response.rb new file mode 100644 index 000000000000..b76a681e0cdf --- /dev/null +++ b/lib/datadog_api_client/v2/models/replay_summary_data_attributes_response.rb @@ -0,0 +1,209 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a RUM replay summary response. + class ReplaySummaryDataAttributesResponse + include BaseGenericModel + + # List of chapters breaking down the session into distinct activity segments. + attr_reader :chapters + + # Whether the session contained sufficient user activity to generate a summary. + attr_reader :has_enough_activity + + # Whether the session exceeded the event count limit for summary generation. + attr_reader :has_too_many_events + + # AI-generated summary of the replay session. + attr_reader :summary + + # Version of the prompt used to generate the summary. + attr_reader :version + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'chapters' => :'chapters', + :'has_enough_activity' => :'has_enough_activity', + :'has_too_many_events' => :'has_too_many_events', + :'summary' => :'summary', + :'version' => :'version' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'chapters' => :'Array', + :'has_enough_activity' => :'Boolean', + :'has_too_many_events' => :'Boolean', + :'summary' => :'String', + :'version' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ReplaySummaryDataAttributesResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'chapters') + if (value = attributes[:'chapters']).is_a?(Array) + self.chapters = value + end + end + + if attributes.key?(:'has_enough_activity') + self.has_enough_activity = attributes[:'has_enough_activity'] + end + + if attributes.key?(:'has_too_many_events') + self.has_too_many_events = attributes[:'has_too_many_events'] + end + + if attributes.key?(:'summary') + self.summary = attributes[:'summary'] + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @chapters.nil? + return false if @has_enough_activity.nil? + return false if @has_too_many_events.nil? + return false if @summary.nil? + return false if @version.nil? + true + end + + # Custom attribute writer method with validation + # @param chapters [Object] Object to be assigned + # @!visibility private + def chapters=(chapters) + if chapters.nil? + fail ArgumentError, 'invalid value for "chapters", chapters cannot be nil.' + end + @chapters = chapters + end + + # Custom attribute writer method with validation + # @param has_enough_activity [Object] Object to be assigned + # @!visibility private + def has_enough_activity=(has_enough_activity) + if has_enough_activity.nil? + fail ArgumentError, 'invalid value for "has_enough_activity", has_enough_activity cannot be nil.' + end + @has_enough_activity = has_enough_activity + end + + # Custom attribute writer method with validation + # @param has_too_many_events [Object] Object to be assigned + # @!visibility private + def has_too_many_events=(has_too_many_events) + if has_too_many_events.nil? + fail ArgumentError, 'invalid value for "has_too_many_events", has_too_many_events cannot be nil.' + end + @has_too_many_events = has_too_many_events + end + + # Custom attribute writer method with validation + # @param summary [Object] Object to be assigned + # @!visibility private + def summary=(summary) + if summary.nil? + fail ArgumentError, 'invalid value for "summary", summary cannot be nil.' + end + @summary = summary + end + + # Custom attribute writer method with validation + # @param version [Object] Object to be assigned + # @!visibility private + def version=(version) + if version.nil? + fail ArgumentError, 'invalid value for "version", version cannot be nil.' + end + @version = version + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + chapters == o.chapters && + has_enough_activity == o.has_enough_activity && + has_too_many_events == o.has_too_many_events && + summary == o.summary && + version == o.version && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [chapters, has_enough_activity, has_too_many_events, summary, version, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/replay_summary_data_request.rb b/lib/datadog_api_client/v2/models/replay_summary_data_request.rb new file mode 100644 index 000000000000..4a0129187060 --- /dev/null +++ b/lib/datadog_api_client/v2/models/replay_summary_data_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data object for a RUM replay summary request. + class ReplaySummaryDataRequest + include BaseGenericModel + + # RUM replay summary request resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'type' => :'ReplaySummaryRequestType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ReplaySummaryDataRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/replay_summary_data_response.rb b/lib/datadog_api_client/v2/models/replay_summary_data_response.rb new file mode 100644 index 000000000000..1daabbdca554 --- /dev/null +++ b/lib/datadog_api_client/v2/models/replay_summary_data_response.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data object for a RUM replay summary response. + class ReplaySummaryDataResponse + include BaseGenericModel + + # Attributes of a RUM replay summary response. + attr_reader :attributes + + # Unique identifier of the generated summary. + attr_reader :id + + # RUM replay summary response resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'ReplaySummaryDataAttributesResponse', + :'id' => :'String', + :'type' => :'ReplaySummaryResponseType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ReplaySummaryDataResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/replay_summary_request.rb b/lib/datadog_api_client/v2/models/replay_summary_request.rb new file mode 100644 index 000000000000..404dee9c95aa --- /dev/null +++ b/lib/datadog_api_client/v2/models/replay_summary_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request body for generating a RUM replay summary. + class ReplaySummaryRequest + include BaseGenericModel + + # Data object for a RUM replay summary request. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'ReplaySummaryDataRequest' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ReplaySummaryRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/replay_summary_request_type.rb b/lib/datadog_api_client/v2/models/replay_summary_request_type.rb new file mode 100644 index 000000000000..ed642f4c5dd5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/replay_summary_request_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # RUM replay summary request resource type. + class ReplaySummaryRequestType + include BaseEnumModel + + REPLAY_SUMMARY_REQUEST = "replay_summary_request".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/replay_summary_response.rb b/lib/datadog_api_client/v2/models/replay_summary_response.rb new file mode 100644 index 000000000000..a9d4e15ee69d --- /dev/null +++ b/lib/datadog_api_client/v2/models/replay_summary_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response containing a generated RUM replay summary. + class ReplaySummaryResponse + include BaseGenericModel + + # Data object for a RUM replay summary response. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'ReplaySummaryDataResponse' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ReplaySummaryResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/replay_summary_response_type.rb b/lib/datadog_api_client/v2/models/replay_summary_response_type.rb new file mode 100644 index 000000000000..66bc0be07faa --- /dev/null +++ b/lib/datadog_api_client/v2/models/replay_summary_response_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # RUM replay summary response resource type. + class ReplaySummaryResponseType + include BaseEnumModel + + SUMMARY_RESPONSE = "summary_response".freeze + end +end