diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 440627d7e6b..92069d97599 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: @@ -123475,6 +123899,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. @@ -123659,6 +124355,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. @@ -145912,6 +146697,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.java b/examples/v2/rum-replay-analysis/GetReplayAnalysisIssue.java new file mode 100644 index 00000000000..9cfffa31aa4 --- /dev/null +++ b/examples/v2/rum-replay-analysis/GetReplayAnalysisIssue.java @@ -0,0 +1,26 @@ +// Get replay analysis issue returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumReplayAnalysisApi; +import com.datadog.api.client.v2.model.ReplayAnalysisIssueResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getReplayAnalysisIssue", true); + RumReplayAnalysisApi apiInstance = new RumReplayAnalysisApi(defaultClient); + + try { + ReplayAnalysisIssueResponse result = + apiInstance.getReplayAnalysisIssue("00000000-0000-0000-0000-000000000001"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumReplayAnalysisApi#getReplayAnalysisIssue"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum-replay-analysis/ListReplayAnalysisIssueSessions.java b/examples/v2/rum-replay-analysis/ListReplayAnalysisIssueSessions.java new file mode 100644 index 00000000000..6784674fcc8 --- /dev/null +++ b/examples/v2/rum-replay-analysis/ListReplayAnalysisIssueSessions.java @@ -0,0 +1,27 @@ +// List replay analysis issue sessions returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumReplayAnalysisApi; +import com.datadog.api.client.v2.model.ReplayAnalysisIssueSessionsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listReplayAnalysisIssueSessions", true); + RumReplayAnalysisApi apiInstance = new RumReplayAnalysisApi(defaultClient); + + try { + ReplayAnalysisIssueSessionsResponse result = + apiInstance.listReplayAnalysisIssueSessions("00000000-0000-0000-0000-000000000001"); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling RumReplayAnalysisApi#listReplayAnalysisIssueSessions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum-replay-analysis/ListReplayAnalysisIssues.java b/examples/v2/rum-replay-analysis/ListReplayAnalysisIssues.java new file mode 100644 index 00000000000..53016d4757c --- /dev/null +++ b/examples/v2/rum-replay-analysis/ListReplayAnalysisIssues.java @@ -0,0 +1,25 @@ +// List replay analysis issues returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumReplayAnalysisApi; +import com.datadog.api.client.v2.model.ReplayAnalysisIssuesResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listReplayAnalysisIssues", true); + RumReplayAnalysisApi apiInstance = new RumReplayAnalysisApi(defaultClient); + + try { + ReplayAnalysisIssuesResponse result = apiInstance.listReplayAnalysisIssues(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumReplayAnalysisApi#listReplayAnalysisIssues"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum-replay/GenerateReplaySummary.java b/examples/v2/rum-replay/GenerateReplaySummary.java new file mode 100644 index 00000000000..1549e7bc03b --- /dev/null +++ b/examples/v2/rum-replay/GenerateReplaySummary.java @@ -0,0 +1,35 @@ +// Generate replay summary returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumReplayApi; +import com.datadog.api.client.v2.model.ReplaySummaryDataRequest; +import com.datadog.api.client.v2.model.ReplaySummaryRequest; +import com.datadog.api.client.v2.model.ReplaySummaryRequestType; +import com.datadog.api.client.v2.model.ReplaySummaryResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.generateReplaySummary", true); + RumReplayApi apiInstance = new RumReplayApi(defaultClient); + + ReplaySummaryRequest body = + new ReplaySummaryRequest() + .data( + new ReplaySummaryDataRequest() + .type(ReplaySummaryRequestType.REPLAY_SUMMARY_REQUEST)); + + try { + ReplaySummaryResponse result = + apiInstance.generateReplaySummary("00000000-0000-0000-0000-000000000001", "rum", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumReplayApi#generateReplaySummary"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index e50cdd037c4..14384650e35 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -1000,6 +1000,10 @@ public class ApiClient { put("v2.queryEventFilteredUsers", false); put("v2.queryUsers", false); put("v2.updateConnection", false); + put("v2.getReplayAnalysisIssue", false); + put("v2.listReplayAnalysisIssues", false); + put("v2.listReplayAnalysisIssueSessions", false); + put("v2.generateReplaySummary", false); put("v2.createScorecardOutcomesBatch", false); put("v2.listEntityRiskScores", false); put("v2.createIncidentService", false); diff --git a/src/main/java/com/datadog/api/client/v2/api/RumReplayAnalysisApi.java b/src/main/java/com/datadog/api/client/v2/api/RumReplayAnalysisApi.java new file mode 100644 index 00000000000..538e0828c79 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/RumReplayAnalysisApi.java @@ -0,0 +1,764 @@ +package com.datadog.api.client.v2.api; + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiResponse; +import com.datadog.api.client.Pair; +import com.datadog.api.client.v2.model.ReplayAnalysisIssueResponse; +import com.datadog.api.client.v2.model.ReplayAnalysisIssueSessionsResponse; +import com.datadog.api.client.v2.model.ReplayAnalysisIssuesResponse; +import jakarta.ws.rs.client.Invocation; +import jakarta.ws.rs.core.GenericType; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.CompletableFuture; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumReplayAnalysisApi { + private ApiClient apiClient; + + public RumReplayAnalysisApi() { + this(ApiClient.getDefaultApiClient()); + } + + public RumReplayAnalysisApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client. + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client. + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get replay analysis issue. + * + *

See {@link #getReplayAnalysisIssueWithHttpInfo}. + * + * @param issueId Unique identifier of the issue. (required) + * @return ReplayAnalysisIssueResponse + * @throws ApiException if fails to make API call + */ + public ReplayAnalysisIssueResponse getReplayAnalysisIssue(String issueId) throws ApiException { + return getReplayAnalysisIssueWithHttpInfo(issueId).getData(); + } + + /** + * Get replay analysis issue. + * + *

See {@link #getReplayAnalysisIssueWithHttpInfoAsync}. + * + * @param issueId Unique identifier of the issue. (required) + * @return CompletableFuture<ReplayAnalysisIssueResponse> + */ + public CompletableFuture getReplayAnalysisIssueAsync( + String issueId) { + return getReplayAnalysisIssueWithHttpInfoAsync(issueId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve details of a specific RUM replay analysis issue by its identifier. + * + * @param issueId Unique identifier of the issue. (required) + * @return ApiResponse<ReplayAnalysisIssueResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getReplayAnalysisIssueWithHttpInfo(String issueId) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getReplayAnalysisIssue"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'issueId' is set + if (issueId == null) { + throw new ApiException( + 400, "Missing the required parameter 'issueId' when calling getReplayAnalysisIssue"); + } + // create path and map variables + String localVarPath = + "/api/v2/replay/analysis/issues/{issue_id}" + .replaceAll("\\{" + "issue_id" + "\\}", apiClient.escapeString(issueId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumReplayAnalysisApi.getReplayAnalysisIssue", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get replay analysis issue. + * + *

See {@link #getReplayAnalysisIssueWithHttpInfo}. + * + * @param issueId Unique identifier of the issue. (required) + * @return CompletableFuture<ApiResponse<ReplayAnalysisIssueResponse>> + */ + public CompletableFuture> + getReplayAnalysisIssueWithHttpInfoAsync(String issueId) { + // Check if unstable operation is enabled + String operationId = "getReplayAnalysisIssue"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'issueId' is set + if (issueId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'issueId' when calling getReplayAnalysisIssue")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/replay/analysis/issues/{issue_id}" + .replaceAll("\\{" + "issue_id" + "\\}", apiClient.escapeString(issueId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumReplayAnalysisApi.getReplayAnalysisIssue", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listReplayAnalysisIssues. */ + public static class ListReplayAnalysisIssuesOptionalParameters { + private String filterApplicationId; + private String filterSeverity; + private String filterViewName; + private String filterIssueCategory; + private String sort; + private Integer pageNumber; + private Integer pageSize; + + /** + * Set filterApplicationId. + * + * @param filterApplicationId Filter issues by application UUID. (optional) + * @return ListReplayAnalysisIssuesOptionalParameters + */ + public ListReplayAnalysisIssuesOptionalParameters filterApplicationId( + String filterApplicationId) { + this.filterApplicationId = filterApplicationId; + return this; + } + + /** + * Set filterSeverity. + * + * @param filterSeverity Filter issues by comma-separated severity values. Valid values are + * high, medium, and low. (optional) + * @return ListReplayAnalysisIssuesOptionalParameters + */ + public ListReplayAnalysisIssuesOptionalParameters filterSeverity(String filterSeverity) { + this.filterSeverity = filterSeverity; + return this; + } + + /** + * Set filterViewName. + * + * @param filterViewName Filter issues by comma-separated view names. (optional) + * @return ListReplayAnalysisIssuesOptionalParameters + */ + public ListReplayAnalysisIssuesOptionalParameters filterViewName(String filterViewName) { + this.filterViewName = filterViewName; + return this; + } + + /** + * Set filterIssueCategory. + * + * @param filterIssueCategory Filter issues by comma-separated issue categories. (optional) + * @return ListReplayAnalysisIssuesOptionalParameters + */ + public ListReplayAnalysisIssuesOptionalParameters filterIssueCategory( + String filterIssueCategory) { + this.filterIssueCategory = filterIssueCategory; + return this; + } + + /** + * Set sort. + * + * @param sort Sort order for the results. Valid values are created_at, + * -created_at, severity, -severity, session_count + * , and -session_count. Defaults to -created_at. + * (optional, default to "-created_at") + * @return ListReplayAnalysisIssuesOptionalParameters + */ + public ListReplayAnalysisIssuesOptionalParameters sort(String sort) { + this.sort = sort; + return this; + } + + /** + * Set pageNumber. + * + * @param pageNumber Page number for pagination (0-indexed). (optional, default to 0) + * @return ListReplayAnalysisIssuesOptionalParameters + */ + public ListReplayAnalysisIssuesOptionalParameters pageNumber(Integer pageNumber) { + this.pageNumber = pageNumber; + return this; + } + + /** + * Set pageSize. + * + * @param pageSize Number of items per page. Must be between 1 and 100. (optional, default to + * 15) + * @return ListReplayAnalysisIssuesOptionalParameters + */ + public ListReplayAnalysisIssuesOptionalParameters pageSize(Integer pageSize) { + this.pageSize = pageSize; + return this; + } + } + + /** + * List replay analysis issues. + * + *

See {@link #listReplayAnalysisIssuesWithHttpInfo}. + * + * @return ReplayAnalysisIssuesResponse + * @throws ApiException if fails to make API call + */ + public ReplayAnalysisIssuesResponse listReplayAnalysisIssues() throws ApiException { + return listReplayAnalysisIssuesWithHttpInfo(new ListReplayAnalysisIssuesOptionalParameters()) + .getData(); + } + + /** + * List replay analysis issues. + * + *

See {@link #listReplayAnalysisIssuesWithHttpInfoAsync}. + * + * @return CompletableFuture<ReplayAnalysisIssuesResponse> + */ + public CompletableFuture listReplayAnalysisIssuesAsync() { + return listReplayAnalysisIssuesWithHttpInfoAsync( + new ListReplayAnalysisIssuesOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List replay analysis issues. + * + *

See {@link #listReplayAnalysisIssuesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return ReplayAnalysisIssuesResponse + * @throws ApiException if fails to make API call + */ + public ReplayAnalysisIssuesResponse listReplayAnalysisIssues( + ListReplayAnalysisIssuesOptionalParameters parameters) throws ApiException { + return listReplayAnalysisIssuesWithHttpInfo(parameters).getData(); + } + + /** + * List replay analysis issues. + * + *

See {@link #listReplayAnalysisIssuesWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ReplayAnalysisIssuesResponse> + */ + public CompletableFuture listReplayAnalysisIssuesAsync( + ListReplayAnalysisIssuesOptionalParameters parameters) { + return listReplayAnalysisIssuesWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve a paginated list of RUM replay analysis issues, optionally filtered by application, + * severity, view name, or issue category. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<ReplayAnalysisIssuesResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
429 Too many requests -
+ */ + public ApiResponse listReplayAnalysisIssuesWithHttpInfo( + ListReplayAnalysisIssuesOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listReplayAnalysisIssues"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + String filterApplicationId = parameters.filterApplicationId; + String filterSeverity = parameters.filterSeverity; + String filterViewName = parameters.filterViewName; + String filterIssueCategory = parameters.filterIssueCategory; + String sort = parameters.sort; + Integer pageNumber = parameters.pageNumber; + Integer pageSize = parameters.pageSize; + // create path and map variables + String localVarPath = "/api/v2/replay/analysis/issues"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[application_id]", filterApplicationId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[severity]", filterSeverity)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[view_name]", filterViewName)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[issue_category]", filterIssueCategory)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumReplayAnalysisApi.listReplayAnalysisIssues", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List replay analysis issues. + * + *

See {@link #listReplayAnalysisIssuesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<ReplayAnalysisIssuesResponse>> + */ + public CompletableFuture> + listReplayAnalysisIssuesWithHttpInfoAsync( + ListReplayAnalysisIssuesOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listReplayAnalysisIssues"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + String filterApplicationId = parameters.filterApplicationId; + String filterSeverity = parameters.filterSeverity; + String filterViewName = parameters.filterViewName; + String filterIssueCategory = parameters.filterIssueCategory; + String sort = parameters.sort; + Integer pageNumber = parameters.pageNumber; + Integer pageSize = parameters.pageSize; + // create path and map variables + String localVarPath = "/api/v2/replay/analysis/issues"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[application_id]", filterApplicationId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[severity]", filterSeverity)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[view_name]", filterViewName)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[issue_category]", filterIssueCategory)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumReplayAnalysisApi.listReplayAnalysisIssues", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listReplayAnalysisIssueSessions. */ + public static class ListReplayAnalysisIssueSessionsOptionalParameters { + private String sort; + private Integer pageNumber; + private Integer pageSize; + + /** + * Set sort. + * + * @param sort Sort order for the results. Valid values are last_seen_at, + * -last_seen_at, proximity, and -proximity. Defaults to + * -last_seen_at. (optional, default to "-last_seen_at") + * @return ListReplayAnalysisIssueSessionsOptionalParameters + */ + public ListReplayAnalysisIssueSessionsOptionalParameters sort(String sort) { + this.sort = sort; + return this; + } + + /** + * Set pageNumber. + * + * @param pageNumber Page number for pagination (0-indexed). (optional, default to 0) + * @return ListReplayAnalysisIssueSessionsOptionalParameters + */ + public ListReplayAnalysisIssueSessionsOptionalParameters pageNumber(Integer pageNumber) { + this.pageNumber = pageNumber; + return this; + } + + /** + * Set pageSize. + * + * @param pageSize Number of items per page. Must be between 1 and 100. (optional, default to + * 15) + * @return ListReplayAnalysisIssueSessionsOptionalParameters + */ + public ListReplayAnalysisIssueSessionsOptionalParameters pageSize(Integer pageSize) { + this.pageSize = pageSize; + return this; + } + } + + /** + * List replay analysis issue sessions. + * + *

See {@link #listReplayAnalysisIssueSessionsWithHttpInfo}. + * + * @param issueId Unique identifier of the issue. (required) + * @return ReplayAnalysisIssueSessionsResponse + * @throws ApiException if fails to make API call + */ + public ReplayAnalysisIssueSessionsResponse listReplayAnalysisIssueSessions(String issueId) + throws ApiException { + return listReplayAnalysisIssueSessionsWithHttpInfo( + issueId, new ListReplayAnalysisIssueSessionsOptionalParameters()) + .getData(); + } + + /** + * List replay analysis issue sessions. + * + *

See {@link #listReplayAnalysisIssueSessionsWithHttpInfoAsync}. + * + * @param issueId Unique identifier of the issue. (required) + * @return CompletableFuture<ReplayAnalysisIssueSessionsResponse> + */ + public CompletableFuture + listReplayAnalysisIssueSessionsAsync(String issueId) { + return listReplayAnalysisIssueSessionsWithHttpInfoAsync( + issueId, new ListReplayAnalysisIssueSessionsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List replay analysis issue sessions. + * + *

See {@link #listReplayAnalysisIssueSessionsWithHttpInfo}. + * + * @param issueId Unique identifier of the issue. (required) + * @param parameters Optional parameters for the request. + * @return ReplayAnalysisIssueSessionsResponse + * @throws ApiException if fails to make API call + */ + public ReplayAnalysisIssueSessionsResponse listReplayAnalysisIssueSessions( + String issueId, ListReplayAnalysisIssueSessionsOptionalParameters parameters) + throws ApiException { + return listReplayAnalysisIssueSessionsWithHttpInfo(issueId, parameters).getData(); + } + + /** + * List replay analysis issue sessions. + * + *

See {@link #listReplayAnalysisIssueSessionsWithHttpInfoAsync}. + * + * @param issueId Unique identifier of the issue. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ReplayAnalysisIssueSessionsResponse> + */ + public CompletableFuture + listReplayAnalysisIssueSessionsAsync( + String issueId, ListReplayAnalysisIssueSessionsOptionalParameters parameters) { + return listReplayAnalysisIssueSessionsWithHttpInfoAsync(issueId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve a paginated list of sessions related to a specific RUM replay analysis issue. + * + * @param issueId Unique identifier of the issue. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<ReplayAnalysisIssueSessionsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse + listReplayAnalysisIssueSessionsWithHttpInfo( + String issueId, ListReplayAnalysisIssueSessionsOptionalParameters parameters) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "listReplayAnalysisIssueSessions"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'issueId' is set + if (issueId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'issueId' when calling listReplayAnalysisIssueSessions"); + } + String sort = parameters.sort; + Integer pageNumber = parameters.pageNumber; + Integer pageSize = parameters.pageSize; + // create path and map variables + String localVarPath = + "/api/v2/replay/analysis/issues/{issue_id}/sessions" + .replaceAll("\\{" + "issue_id" + "\\}", apiClient.escapeString(issueId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumReplayAnalysisApi.listReplayAnalysisIssueSessions", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List replay analysis issue sessions. + * + *

See {@link #listReplayAnalysisIssueSessionsWithHttpInfo}. + * + * @param issueId Unique identifier of the issue. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<ReplayAnalysisIssueSessionsResponse>> + */ + public CompletableFuture> + listReplayAnalysisIssueSessionsWithHttpInfoAsync( + String issueId, ListReplayAnalysisIssueSessionsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listReplayAnalysisIssueSessions"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'issueId' is set + if (issueId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'issueId' when calling" + + " listReplayAnalysisIssueSessions")); + return result; + } + String sort = parameters.sort; + Integer pageNumber = parameters.pageNumber; + Integer pageSize = parameters.pageSize; + // create path and map variables + String localVarPath = + "/api/v2/replay/analysis/issues/{issue_id}/sessions" + .replaceAll("\\{" + "issue_id" + "\\}", apiClient.escapeString(issueId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumReplayAnalysisApi.listReplayAnalysisIssueSessions", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/api/RumReplayApi.java b/src/main/java/com/datadog/api/client/v2/api/RumReplayApi.java new file mode 100644 index 00000000000..11e4308e92c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/RumReplayApi.java @@ -0,0 +1,332 @@ +package com.datadog.api.client.v2.api; + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiResponse; +import com.datadog.api.client.Pair; +import com.datadog.api.client.v2.model.ReplaySummaryRequest; +import com.datadog.api.client.v2.model.ReplaySummaryResponse; +import jakarta.ws.rs.client.Invocation; +import jakarta.ws.rs.core.GenericType; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.CompletableFuture; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumReplayApi { + private ApiClient apiClient; + + public RumReplayApi() { + this(ApiClient.getDefaultApiClient()); + } + + public RumReplayApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client. + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client. + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** Manage optional parameters to generateReplaySummary. */ + public static class GenerateReplaySummaryOptionalParameters { + private Long ts; + + /** + * Set ts. + * + * @param ts Server-side timestamp in milliseconds. (optional) + * @return GenerateReplaySummaryOptionalParameters + */ + public GenerateReplaySummaryOptionalParameters ts(Long ts) { + this.ts = ts; + return this; + } + } + + /** + * Generate replay summary. + * + *

See {@link #generateReplaySummaryWithHttpInfo}. + * + * @param sessionId Unique identifier of the session. (required) + * @param dataSource Data source for the session. Valid values are rum, + * product_analytics, and replay. (required) + * @param body (required) + * @return ReplaySummaryResponse + * @throws ApiException if fails to make API call + */ + public ReplaySummaryResponse generateReplaySummary( + String sessionId, String dataSource, ReplaySummaryRequest body) throws ApiException { + return generateReplaySummaryWithHttpInfo( + sessionId, dataSource, body, new GenerateReplaySummaryOptionalParameters()) + .getData(); + } + + /** + * Generate replay summary. + * + *

See {@link #generateReplaySummaryWithHttpInfoAsync}. + * + * @param sessionId Unique identifier of the session. (required) + * @param dataSource Data source for the session. Valid values are rum, + * product_analytics, and replay. (required) + * @param body (required) + * @return CompletableFuture<ReplaySummaryResponse> + */ + public CompletableFuture generateReplaySummaryAsync( + String sessionId, String dataSource, ReplaySummaryRequest body) { + return generateReplaySummaryWithHttpInfoAsync( + sessionId, dataSource, body, new GenerateReplaySummaryOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Generate replay summary. + * + *

See {@link #generateReplaySummaryWithHttpInfo}. + * + * @param sessionId Unique identifier of the session. (required) + * @param dataSource Data source for the session. Valid values are rum, + * product_analytics, and replay. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return ReplaySummaryResponse + * @throws ApiException if fails to make API call + */ + public ReplaySummaryResponse generateReplaySummary( + String sessionId, + String dataSource, + ReplaySummaryRequest body, + GenerateReplaySummaryOptionalParameters parameters) + throws ApiException { + return generateReplaySummaryWithHttpInfo(sessionId, dataSource, body, parameters).getData(); + } + + /** + * Generate replay summary. + * + *

See {@link #generateReplaySummaryWithHttpInfoAsync}. + * + * @param sessionId Unique identifier of the session. (required) + * @param dataSource Data source for the session. Valid values are rum, + * product_analytics, and replay. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ReplaySummaryResponse> + */ + public CompletableFuture generateReplaySummaryAsync( + String sessionId, + String dataSource, + ReplaySummaryRequest body, + GenerateReplaySummaryOptionalParameters parameters) { + return generateReplaySummaryWithHttpInfoAsync(sessionId, dataSource, body, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Generate an AI-powered summary for a RUM replay session, including chapter breakdowns and + * behavioral analysis. + * + * @param sessionId Unique identifier of the session. (required) + * @param dataSource Data source for the session. Valid values are rum, + * product_analytics, and replay. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<ReplaySummaryResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse generateReplaySummaryWithHttpInfo( + String sessionId, + String dataSource, + ReplaySummaryRequest body, + GenerateReplaySummaryOptionalParameters parameters) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "generateReplaySummary"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'sessionId' is set + if (sessionId == null) { + throw new ApiException( + 400, "Missing the required parameter 'sessionId' when calling generateReplaySummary"); + } + + // verify the required parameter 'dataSource' is set + if (dataSource == null) { + throw new ApiException( + 400, "Missing the required parameter 'dataSource' when calling generateReplaySummary"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling generateReplaySummary"); + } + Long ts = parameters.ts; + // create path and map variables + String localVarPath = + "/api/v2/replay/summary/{session_id}" + .replaceAll("\\{" + "session_id" + "\\}", apiClient.escapeString(sessionId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "data_source", dataSource)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "ts", ts)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumReplayApi.generateReplaySummary", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Generate replay summary. + * + *

See {@link #generateReplaySummaryWithHttpInfo}. + * + * @param sessionId Unique identifier of the session. (required) + * @param dataSource Data source for the session. Valid values are rum, + * product_analytics, and replay. (required) + * @param body (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<ReplaySummaryResponse>> + */ + public CompletableFuture> + generateReplaySummaryWithHttpInfoAsync( + String sessionId, + String dataSource, + ReplaySummaryRequest body, + GenerateReplaySummaryOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "generateReplaySummary"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'sessionId' is set + if (sessionId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'sessionId' when calling generateReplaySummary")); + return result; + } + + // verify the required parameter 'dataSource' is set + if (dataSource == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'dataSource' when calling generateReplaySummary")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling generateReplaySummary")); + return result; + } + Long ts = parameters.ts; + // create path and map variables + String localVarPath = + "/api/v2/replay/summary/{session_id}" + .replaceAll("\\{" + "session_id" + "\\}", apiClient.escapeString(sessionId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "data_source", dataSource)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "ts", ts)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumReplayApi.generateReplaySummary", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisAffectedSession.java b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisAffectedSession.java new file mode 100644 index 00000000000..677a104d87d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisAffectedSession.java @@ -0,0 +1,188 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** A session affected by a replay analysis issue. */ +@JsonPropertyOrder({ + ReplayAnalysisAffectedSession.JSON_PROPERTY_SESSION_ID, + ReplayAnalysisAffectedSession.JSON_PROPERTY_SESSION_START_TIMESTAMP_MS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReplayAnalysisAffectedSession { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_SESSION_ID = "session_id"; + private String sessionId; + + public static final String JSON_PROPERTY_SESSION_START_TIMESTAMP_MS = + "session_start_timestamp_ms"; + private JsonNullable sessionStartTimestampMs = JsonNullable.undefined(); + + public ReplayAnalysisAffectedSession() {} + + @JsonCreator + public ReplayAnalysisAffectedSession( + @JsonProperty(required = true, value = JSON_PROPERTY_SESSION_ID) String sessionId) { + this.sessionId = sessionId; + } + + public ReplayAnalysisAffectedSession sessionId(String sessionId) { + this.sessionId = sessionId; + return this; + } + + /** + * Unique identifier of the affected session. + * + * @return sessionId + */ + @JsonProperty(JSON_PROPERTY_SESSION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSessionId() { + return sessionId; + } + + public void setSessionId(String sessionId) { + this.sessionId = sessionId; + } + + public ReplayAnalysisAffectedSession sessionStartTimestampMs(Long sessionStartTimestampMs) { + this.sessionStartTimestampMs = JsonNullable.of(sessionStartTimestampMs); + return this; + } + + /** + * Session start timestamp in milliseconds. + * + * @return sessionStartTimestampMs + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getSessionStartTimestampMs() { + return sessionStartTimestampMs.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SESSION_START_TIMESTAMP_MS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getSessionStartTimestampMs_JsonNullable() { + return sessionStartTimestampMs; + } + + @JsonProperty(JSON_PROPERTY_SESSION_START_TIMESTAMP_MS) + public void setSessionStartTimestampMs_JsonNullable(JsonNullable sessionStartTimestampMs) { + this.sessionStartTimestampMs = sessionStartTimestampMs; + } + + public void setSessionStartTimestampMs(Long sessionStartTimestampMs) { + this.sessionStartTimestampMs = JsonNullable.of(sessionStartTimestampMs); + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReplayAnalysisAffectedSession + */ + @JsonAnySetter + public ReplayAnalysisAffectedSession putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReplayAnalysisAffectedSession object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReplayAnalysisAffectedSession replayAnalysisAffectedSession = (ReplayAnalysisAffectedSession) o; + return Objects.equals(this.sessionId, replayAnalysisAffectedSession.sessionId) + && Objects.equals( + this.sessionStartTimestampMs, replayAnalysisAffectedSession.sessionStartTimestampMs) + && Objects.equals( + this.additionalProperties, replayAnalysisAffectedSession.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(sessionId, sessionStartTimestampMs, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReplayAnalysisAffectedSession {\n"); + sb.append(" sessionId: ").append(toIndentedString(sessionId)).append("\n"); + sb.append(" sessionStartTimestampMs: ") + .append(toIndentedString(sessionStartTimestampMs)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisIssueData.java b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisIssueData.java new file mode 100644 index 00000000000..be7ada00a1e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisIssueData.java @@ -0,0 +1,209 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object representing a RUM replay analysis issue. */ +@JsonPropertyOrder({ + ReplayAnalysisIssueData.JSON_PROPERTY_ATTRIBUTES, + ReplayAnalysisIssueData.JSON_PROPERTY_ID, + ReplayAnalysisIssueData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReplayAnalysisIssueData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ReplayAnalysisIssueDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ReplayAnalysisIssueDataType type = ReplayAnalysisIssueDataType.ISSUES; + + public ReplayAnalysisIssueData() {} + + @JsonCreator + public ReplayAnalysisIssueData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + ReplayAnalysisIssueDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ReplayAnalysisIssueDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public ReplayAnalysisIssueData attributes(ReplayAnalysisIssueDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a RUM replay analysis issue. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReplayAnalysisIssueDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(ReplayAnalysisIssueDataAttributes attributes) { + this.attributes = attributes; + } + + public ReplayAnalysisIssueData id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the issue. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public ReplayAnalysisIssueData type(ReplayAnalysisIssueDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * RUM replay analysis issue resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReplayAnalysisIssueDataType getType() { + return type; + } + + public void setType(ReplayAnalysisIssueDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReplayAnalysisIssueData + */ + @JsonAnySetter + public ReplayAnalysisIssueData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReplayAnalysisIssueData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReplayAnalysisIssueData replayAnalysisIssueData = (ReplayAnalysisIssueData) o; + return Objects.equals(this.attributes, replayAnalysisIssueData.attributes) + && Objects.equals(this.id, replayAnalysisIssueData.id) + && Objects.equals(this.type, replayAnalysisIssueData.type) + && Objects.equals(this.additionalProperties, replayAnalysisIssueData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReplayAnalysisIssueData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisIssueDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisIssueDataAttributes.java new file mode 100644 index 00000000000..21913b16429 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisIssueDataAttributes.java @@ -0,0 +1,488 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes of a RUM replay analysis issue. */ +@JsonPropertyOrder({ + ReplayAnalysisIssueDataAttributes.JSON_PROPERTY_AFFECTED_SESSIONS, + ReplayAnalysisIssueDataAttributes.JSON_PROPERTY_APPLICATION_ID, + ReplayAnalysisIssueDataAttributes.JSON_PROPERTY_CREATED_AT, + ReplayAnalysisIssueDataAttributes.JSON_PROPERTY_DESCRIPTION, + ReplayAnalysisIssueDataAttributes.JSON_PROPERTY_JOURNEY_QUERY, + ReplayAnalysisIssueDataAttributes.JSON_PROPERTY_NAME, + ReplayAnalysisIssueDataAttributes.JSON_PROPERTY_REPRESENTATIVE_SESSION, + ReplayAnalysisIssueDataAttributes.JSON_PROPERTY_SESSION_COUNT, + ReplayAnalysisIssueDataAttributes.JSON_PROPERTY_SEVERITY, + ReplayAnalysisIssueDataAttributes.JSON_PROPERTY_UPDATED_AT, + ReplayAnalysisIssueDataAttributes.JSON_PROPERTY_VALIDATION_VERDICT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReplayAnalysisIssueDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AFFECTED_SESSIONS = "affected_sessions"; + private List affectedSessions = new ArrayList<>(); + + public static final String JSON_PROPERTY_APPLICATION_ID = "application_id"; + private String applicationId; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_JOURNEY_QUERY = "journey_query"; + private JsonNullable> journeyQuery = + JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_REPRESENTATIVE_SESSION = "representative_session"; + private ReplayAnalysisRepresentativeSession representativeSession; + + public static final String JSON_PROPERTY_SESSION_COUNT = "session_count"; + private Long sessionCount; + + public static final String JSON_PROPERTY_SEVERITY = "severity"; + private String severity; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_VALIDATION_VERDICT = "validation_verdict"; + private String validationVerdict; + + public ReplayAnalysisIssueDataAttributes() {} + + @JsonCreator + public ReplayAnalysisIssueDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_AFFECTED_SESSIONS) + List affectedSessions, + @JsonProperty(required = true, value = JSON_PROPERTY_APPLICATION_ID) String applicationId, + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_DESCRIPTION) String description, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_REPRESENTATIVE_SESSION) + ReplayAnalysisRepresentativeSession representativeSession, + @JsonProperty(required = true, value = JSON_PROPERTY_SESSION_COUNT) Long sessionCount, + @JsonProperty(required = true, value = JSON_PROPERTY_SEVERITY) String severity, + @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt, + @JsonProperty(required = true, value = JSON_PROPERTY_VALIDATION_VERDICT) + String validationVerdict) { + this.affectedSessions = affectedSessions; + this.applicationId = applicationId; + this.createdAt = createdAt; + this.description = description; + this.name = name; + this.representativeSession = representativeSession; + this.unparsed |= representativeSession.unparsed; + this.sessionCount = sessionCount; + this.severity = severity; + this.updatedAt = updatedAt; + this.validationVerdict = validationVerdict; + } + + public ReplayAnalysisIssueDataAttributes affectedSessions( + List affectedSessions) { + this.affectedSessions = affectedSessions; + for (ReplayAnalysisAffectedSession item : affectedSessions) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ReplayAnalysisIssueDataAttributes addAffectedSessionsItem( + ReplayAnalysisAffectedSession affectedSessionsItem) { + this.affectedSessions.add(affectedSessionsItem); + this.unparsed |= affectedSessionsItem.unparsed; + return this; + } + + /** + * Up to three sample sessions affected by this issue. + * + * @return affectedSessions + */ + @JsonProperty(JSON_PROPERTY_AFFECTED_SESSIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getAffectedSessions() { + return affectedSessions; + } + + public void setAffectedSessions(List affectedSessions) { + this.affectedSessions = affectedSessions; + } + + public ReplayAnalysisIssueDataAttributes applicationId(String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * Unique identifier of the application where the issue was detected. + * + * @return applicationId + */ + @JsonProperty(JSON_PROPERTY_APPLICATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getApplicationId() { + return applicationId; + } + + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + public ReplayAnalysisIssueDataAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp when the issue was first detected. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public ReplayAnalysisIssueDataAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Human-readable description of the issue. + * + * @return description + */ + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public ReplayAnalysisIssueDataAttributes journeyQuery(Map journeyQuery) { + this.journeyQuery = JsonNullable.>of(journeyQuery); + return this; + } + + public ReplayAnalysisIssueDataAttributes putJourneyQueryItem( + String key, Object journeyQueryItem) { + if (this.journeyQuery == null || !this.journeyQuery.isPresent()) { + this.journeyQuery = JsonNullable.>of(new HashMap<>()); + } + try { + this.journeyQuery.get().put(key, journeyQueryItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Journey query associated with the issue. + * + * @return journeyQuery + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Map getJourneyQuery() { + return journeyQuery.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_JOURNEY_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getJourneyQuery_JsonNullable() { + return journeyQuery; + } + + @JsonProperty(JSON_PROPERTY_JOURNEY_QUERY) + public void setJourneyQuery_JsonNullable(JsonNullable> journeyQuery) { + this.journeyQuery = journeyQuery; + } + + public void setJourneyQuery(Map journeyQuery) { + this.journeyQuery = JsonNullable.>of(journeyQuery); + } + + public ReplayAnalysisIssueDataAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Name of the issue. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public ReplayAnalysisIssueDataAttributes representativeSession( + ReplayAnalysisRepresentativeSession representativeSession) { + this.representativeSession = representativeSession; + this.unparsed |= representativeSession.unparsed; + return this; + } + + /** + * A representative session illustrating a replay analysis issue. + * + * @return representativeSession + */ + @JsonProperty(JSON_PROPERTY_REPRESENTATIVE_SESSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReplayAnalysisRepresentativeSession getRepresentativeSession() { + return representativeSession; + } + + public void setRepresentativeSession(ReplayAnalysisRepresentativeSession representativeSession) { + this.representativeSession = representativeSession; + } + + public ReplayAnalysisIssueDataAttributes sessionCount(Long sessionCount) { + this.sessionCount = sessionCount; + return this; + } + + /** + * Total number of sessions affected by this issue. + * + * @return sessionCount + */ + @JsonProperty(JSON_PROPERTY_SESSION_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getSessionCount() { + return sessionCount; + } + + public void setSessionCount(Long sessionCount) { + this.sessionCount = sessionCount; + } + + public ReplayAnalysisIssueDataAttributes severity(String severity) { + this.severity = severity; + return this; + } + + /** + * Severity level of the issue. Valid values are high, medium, and + * low. + * + * @return severity + */ + @JsonProperty(JSON_PROPERTY_SEVERITY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSeverity() { + return severity; + } + + public void setSeverity(String severity) { + this.severity = severity; + } + + public ReplayAnalysisIssueDataAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Timestamp when the issue was last updated. + * + * @return updatedAt + */ + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + public ReplayAnalysisIssueDataAttributes validationVerdict(String validationVerdict) { + this.validationVerdict = validationVerdict; + return this; + } + + /** + * Validation status of the issue. + * + * @return validationVerdict + */ + @JsonProperty(JSON_PROPERTY_VALIDATION_VERDICT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getValidationVerdict() { + return validationVerdict; + } + + public void setValidationVerdict(String validationVerdict) { + this.validationVerdict = validationVerdict; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReplayAnalysisIssueDataAttributes + */ + @JsonAnySetter + public ReplayAnalysisIssueDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReplayAnalysisIssueDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReplayAnalysisIssueDataAttributes replayAnalysisIssueDataAttributes = + (ReplayAnalysisIssueDataAttributes) o; + return Objects.equals(this.affectedSessions, replayAnalysisIssueDataAttributes.affectedSessions) + && Objects.equals(this.applicationId, replayAnalysisIssueDataAttributes.applicationId) + && Objects.equals(this.createdAt, replayAnalysisIssueDataAttributes.createdAt) + && Objects.equals(this.description, replayAnalysisIssueDataAttributes.description) + && Objects.equals(this.journeyQuery, replayAnalysisIssueDataAttributes.journeyQuery) + && Objects.equals(this.name, replayAnalysisIssueDataAttributes.name) + && Objects.equals( + this.representativeSession, replayAnalysisIssueDataAttributes.representativeSession) + && Objects.equals(this.sessionCount, replayAnalysisIssueDataAttributes.sessionCount) + && Objects.equals(this.severity, replayAnalysisIssueDataAttributes.severity) + && Objects.equals(this.updatedAt, replayAnalysisIssueDataAttributes.updatedAt) + && Objects.equals( + this.validationVerdict, replayAnalysisIssueDataAttributes.validationVerdict) + && Objects.equals( + this.additionalProperties, replayAnalysisIssueDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + affectedSessions, + applicationId, + createdAt, + description, + journeyQuery, + name, + representativeSession, + sessionCount, + severity, + updatedAt, + validationVerdict, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReplayAnalysisIssueDataAttributes {\n"); + sb.append(" affectedSessions: ").append(toIndentedString(affectedSessions)).append("\n"); + sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" journeyQuery: ").append(toIndentedString(journeyQuery)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" representativeSession: ") + .append(toIndentedString(representativeSession)) + .append("\n"); + sb.append(" sessionCount: ").append(toIndentedString(sessionCount)).append("\n"); + sb.append(" severity: ").append(toIndentedString(severity)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" validationVerdict: ").append(toIndentedString(validationVerdict)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisIssueDataType.java b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisIssueDataType.java new file mode 100644 index 00000000000..b47430f3ca1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisIssueDataType.java @@ -0,0 +1,56 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** RUM replay analysis issue resource type. */ +@JsonSerialize(using = ReplayAnalysisIssueDataType.ReplayAnalysisIssueDataTypeSerializer.class) +public class ReplayAnalysisIssueDataType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("issues")); + + public static final ReplayAnalysisIssueDataType ISSUES = + new ReplayAnalysisIssueDataType("issues"); + + ReplayAnalysisIssueDataType(String value) { + super(value, allowedValues); + } + + public static class ReplayAnalysisIssueDataTypeSerializer + extends StdSerializer { + public ReplayAnalysisIssueDataTypeSerializer(Class t) { + super(t); + } + + public ReplayAnalysisIssueDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + ReplayAnalysisIssueDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ReplayAnalysisIssueDataType fromValue(String value) { + return new ReplayAnalysisIssueDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisIssueMeta.java b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisIssueMeta.java new file mode 100644 index 00000000000..635e62b2ab2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisIssueMeta.java @@ -0,0 +1,145 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Metadata object for paginated issue list responses. */ +@JsonPropertyOrder({ReplayAnalysisIssueMeta.JSON_PROPERTY_PAGE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReplayAnalysisIssueMeta { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_PAGE = "page"; + private ReplayAnalysisPageMeta page; + + public ReplayAnalysisIssueMeta() {} + + @JsonCreator + public ReplayAnalysisIssueMeta( + @JsonProperty(required = true, value = JSON_PROPERTY_PAGE) ReplayAnalysisPageMeta page) { + this.page = page; + this.unparsed |= page.unparsed; + } + + public ReplayAnalysisIssueMeta page(ReplayAnalysisPageMeta page) { + this.page = page; + this.unparsed |= page.unparsed; + return this; + } + + /** + * Pagination metadata for a RUM replay analysis response. + * + * @return page + */ + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReplayAnalysisPageMeta getPage() { + return page; + } + + public void setPage(ReplayAnalysisPageMeta page) { + this.page = page; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReplayAnalysisIssueMeta + */ + @JsonAnySetter + public ReplayAnalysisIssueMeta putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReplayAnalysisIssueMeta object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReplayAnalysisIssueMeta replayAnalysisIssueMeta = (ReplayAnalysisIssueMeta) o; + return Objects.equals(this.page, replayAnalysisIssueMeta.page) + && Objects.equals(this.additionalProperties, replayAnalysisIssueMeta.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(page, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReplayAnalysisIssueMeta {\n"); + sb.append(" page: ").append(toIndentedString(page)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisIssueResponse.java b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisIssueResponse.java new file mode 100644 index 00000000000..92dc1e27209 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisIssueResponse.java @@ -0,0 +1,146 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A single RUM replay analysis issue. */ +@JsonPropertyOrder({ReplayAnalysisIssueResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReplayAnalysisIssueResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private ReplayAnalysisIssueData data; + + public ReplayAnalysisIssueResponse() {} + + @JsonCreator + public ReplayAnalysisIssueResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) ReplayAnalysisIssueData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public ReplayAnalysisIssueResponse data(ReplayAnalysisIssueData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object representing a RUM replay analysis issue. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReplayAnalysisIssueData getData() { + return data; + } + + public void setData(ReplayAnalysisIssueData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReplayAnalysisIssueResponse + */ + @JsonAnySetter + public ReplayAnalysisIssueResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReplayAnalysisIssueResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReplayAnalysisIssueResponse replayAnalysisIssueResponse = (ReplayAnalysisIssueResponse) o; + return Objects.equals(this.data, replayAnalysisIssueResponse.data) + && Objects.equals( + this.additionalProperties, replayAnalysisIssueResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReplayAnalysisIssueResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisIssueSessionData.java b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisIssueSessionData.java new file mode 100644 index 00000000000..28c15139f0e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisIssueSessionData.java @@ -0,0 +1,213 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object representing a session related to a RUM replay analysis issue. */ +@JsonPropertyOrder({ + ReplayAnalysisIssueSessionData.JSON_PROPERTY_ATTRIBUTES, + ReplayAnalysisIssueSessionData.JSON_PROPERTY_ID, + ReplayAnalysisIssueSessionData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReplayAnalysisIssueSessionData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ReplayAnalysisIssueSessionDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ReplayAnalysisIssueSessionDataType type = ReplayAnalysisIssueSessionDataType.SESSIONS; + + public ReplayAnalysisIssueSessionData() {} + + @JsonCreator + public ReplayAnalysisIssueSessionData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + ReplayAnalysisIssueSessionDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + ReplayAnalysisIssueSessionDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public ReplayAnalysisIssueSessionData attributes( + ReplayAnalysisIssueSessionDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a session related to a RUM replay analysis issue. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReplayAnalysisIssueSessionDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(ReplayAnalysisIssueSessionDataAttributes attributes) { + this.attributes = attributes; + } + + public ReplayAnalysisIssueSessionData id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the session. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public ReplayAnalysisIssueSessionData type(ReplayAnalysisIssueSessionDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * RUM replay analysis issue session resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReplayAnalysisIssueSessionDataType getType() { + return type; + } + + public void setType(ReplayAnalysisIssueSessionDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReplayAnalysisIssueSessionData + */ + @JsonAnySetter + public ReplayAnalysisIssueSessionData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReplayAnalysisIssueSessionData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReplayAnalysisIssueSessionData replayAnalysisIssueSessionData = + (ReplayAnalysisIssueSessionData) o; + return Objects.equals(this.attributes, replayAnalysisIssueSessionData.attributes) + && Objects.equals(this.id, replayAnalysisIssueSessionData.id) + && Objects.equals(this.type, replayAnalysisIssueSessionData.type) + && Objects.equals( + this.additionalProperties, replayAnalysisIssueSessionData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReplayAnalysisIssueSessionData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisIssueSessionDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisIssueSessionDataAttributes.java new file mode 100644 index 00000000000..5dc841227ee --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisIssueSessionDataAttributes.java @@ -0,0 +1,223 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a session related to a RUM replay analysis issue. */ +@JsonPropertyOrder({ + ReplayAnalysisIssueSessionDataAttributes.JSON_PROPERTY_SESSION_START_TIMESTAMP_MS, + ReplayAnalysisIssueSessionDataAttributes.JSON_PROPERTY_SIGNALS, + ReplayAnalysisIssueSessionDataAttributes.JSON_PROPERTY_VIEW_NAME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReplayAnalysisIssueSessionDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_SESSION_START_TIMESTAMP_MS = + "session_start_timestamp_ms"; + private Long sessionStartTimestampMs; + + public static final String JSON_PROPERTY_SIGNALS = "signals"; + private List signals = new ArrayList<>(); + + public static final String JSON_PROPERTY_VIEW_NAME = "view_name"; + private String viewName; + + public ReplayAnalysisIssueSessionDataAttributes() {} + + @JsonCreator + public ReplayAnalysisIssueSessionDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_SESSION_START_TIMESTAMP_MS) + Long sessionStartTimestampMs, + @JsonProperty(required = true, value = JSON_PROPERTY_SIGNALS) + List signals, + @JsonProperty(required = true, value = JSON_PROPERTY_VIEW_NAME) String viewName) { + this.sessionStartTimestampMs = sessionStartTimestampMs; + this.signals = signals; + this.viewName = viewName; + } + + public ReplayAnalysisIssueSessionDataAttributes sessionStartTimestampMs( + Long sessionStartTimestampMs) { + this.sessionStartTimestampMs = sessionStartTimestampMs; + return this; + } + + /** + * Session start timestamp in milliseconds. + * + * @return sessionStartTimestampMs + */ + @JsonProperty(JSON_PROPERTY_SESSION_START_TIMESTAMP_MS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getSessionStartTimestampMs() { + return sessionStartTimestampMs; + } + + public void setSessionStartTimestampMs(Long sessionStartTimestampMs) { + this.sessionStartTimestampMs = sessionStartTimestampMs; + } + + public ReplayAnalysisIssueSessionDataAttributes signals(List signals) { + this.signals = signals; + for (ReplayAnalysisSignal item : signals) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ReplayAnalysisIssueSessionDataAttributes addSignalsItem(ReplayAnalysisSignal signalsItem) { + this.signals.add(signalsItem); + this.unparsed |= signalsItem.unparsed; + return this; + } + + /** + * List of signals observed in this session. + * + * @return signals + */ + @JsonProperty(JSON_PROPERTY_SIGNALS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getSignals() { + return signals; + } + + public void setSignals(List signals) { + this.signals = signals; + } + + public ReplayAnalysisIssueSessionDataAttributes viewName(String viewName) { + this.viewName = viewName; + return this; + } + + /** + * Name of the view where the issue was observed. + * + * @return viewName + */ + @JsonProperty(JSON_PROPERTY_VIEW_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getViewName() { + return viewName; + } + + public void setViewName(String viewName) { + this.viewName = viewName; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReplayAnalysisIssueSessionDataAttributes + */ + @JsonAnySetter + public ReplayAnalysisIssueSessionDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReplayAnalysisIssueSessionDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReplayAnalysisIssueSessionDataAttributes replayAnalysisIssueSessionDataAttributes = + (ReplayAnalysisIssueSessionDataAttributes) o; + return Objects.equals( + this.sessionStartTimestampMs, + replayAnalysisIssueSessionDataAttributes.sessionStartTimestampMs) + && Objects.equals(this.signals, replayAnalysisIssueSessionDataAttributes.signals) + && Objects.equals(this.viewName, replayAnalysisIssueSessionDataAttributes.viewName) + && Objects.equals( + this.additionalProperties, + replayAnalysisIssueSessionDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(sessionStartTimestampMs, signals, viewName, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReplayAnalysisIssueSessionDataAttributes {\n"); + sb.append(" sessionStartTimestampMs: ") + .append(toIndentedString(sessionStartTimestampMs)) + .append("\n"); + sb.append(" signals: ").append(toIndentedString(signals)).append("\n"); + sb.append(" viewName: ").append(toIndentedString(viewName)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisIssueSessionDataType.java b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisIssueSessionDataType.java new file mode 100644 index 00000000000..7ea4179f8a4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisIssueSessionDataType.java @@ -0,0 +1,58 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** RUM replay analysis issue session resource type. */ +@JsonSerialize( + using = ReplayAnalysisIssueSessionDataType.ReplayAnalysisIssueSessionDataTypeSerializer.class) +public class ReplayAnalysisIssueSessionDataType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("sessions")); + + public static final ReplayAnalysisIssueSessionDataType SESSIONS = + new ReplayAnalysisIssueSessionDataType("sessions"); + + ReplayAnalysisIssueSessionDataType(String value) { + super(value, allowedValues); + } + + public static class ReplayAnalysisIssueSessionDataTypeSerializer + extends StdSerializer { + public ReplayAnalysisIssueSessionDataTypeSerializer( + Class t) { + super(t); + } + + public ReplayAnalysisIssueSessionDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + ReplayAnalysisIssueSessionDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ReplayAnalysisIssueSessionDataType fromValue(String value) { + return new ReplayAnalysisIssueSessionDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisIssueSessionsResponse.java b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisIssueSessionsResponse.java new file mode 100644 index 00000000000..ad32a2613b3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisIssueSessionsResponse.java @@ -0,0 +1,189 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** A paginated list of sessions related to a RUM replay analysis issue. */ +@JsonPropertyOrder({ + ReplayAnalysisIssueSessionsResponse.JSON_PROPERTY_DATA, + ReplayAnalysisIssueSessionsResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReplayAnalysisIssueSessionsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_META = "meta"; + private ReplayAnalysisIssueMeta meta; + + public ReplayAnalysisIssueSessionsResponse() {} + + @JsonCreator + public ReplayAnalysisIssueSessionsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data, + @JsonProperty(required = true, value = JSON_PROPERTY_META) ReplayAnalysisIssueMeta meta) { + this.data = data; + this.meta = meta; + this.unparsed |= meta.unparsed; + } + + public ReplayAnalysisIssueSessionsResponse data(List data) { + this.data = data; + for (ReplayAnalysisIssueSessionData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ReplayAnalysisIssueSessionsResponse addDataItem(ReplayAnalysisIssueSessionData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Array of session data objects related to the issue. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public ReplayAnalysisIssueSessionsResponse meta(ReplayAnalysisIssueMeta meta) { + this.meta = meta; + this.unparsed |= meta.unparsed; + return this; + } + + /** + * Metadata object for paginated issue list responses. + * + * @return meta + */ + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReplayAnalysisIssueMeta getMeta() { + return meta; + } + + public void setMeta(ReplayAnalysisIssueMeta meta) { + this.meta = meta; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReplayAnalysisIssueSessionsResponse + */ + @JsonAnySetter + public ReplayAnalysisIssueSessionsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReplayAnalysisIssueSessionsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReplayAnalysisIssueSessionsResponse replayAnalysisIssueSessionsResponse = + (ReplayAnalysisIssueSessionsResponse) o; + return Objects.equals(this.data, replayAnalysisIssueSessionsResponse.data) + && Objects.equals(this.meta, replayAnalysisIssueSessionsResponse.meta) + && Objects.equals( + this.additionalProperties, replayAnalysisIssueSessionsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReplayAnalysisIssueSessionsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisIssuesResponse.java b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisIssuesResponse.java new file mode 100644 index 00000000000..7bac51cf804 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisIssuesResponse.java @@ -0,0 +1,187 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** A paginated list of RUM replay analysis issues. */ +@JsonPropertyOrder({ + ReplayAnalysisIssuesResponse.JSON_PROPERTY_DATA, + ReplayAnalysisIssuesResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReplayAnalysisIssuesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_META = "meta"; + private ReplayAnalysisIssueMeta meta; + + public ReplayAnalysisIssuesResponse() {} + + @JsonCreator + public ReplayAnalysisIssuesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data, + @JsonProperty(required = true, value = JSON_PROPERTY_META) ReplayAnalysisIssueMeta meta) { + this.data = data; + this.meta = meta; + this.unparsed |= meta.unparsed; + } + + public ReplayAnalysisIssuesResponse data(List data) { + this.data = data; + for (ReplayAnalysisIssueData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ReplayAnalysisIssuesResponse addDataItem(ReplayAnalysisIssueData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Array of RUM replay analysis issue data objects. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public ReplayAnalysisIssuesResponse meta(ReplayAnalysisIssueMeta meta) { + this.meta = meta; + this.unparsed |= meta.unparsed; + return this; + } + + /** + * Metadata object for paginated issue list responses. + * + * @return meta + */ + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReplayAnalysisIssueMeta getMeta() { + return meta; + } + + public void setMeta(ReplayAnalysisIssueMeta meta) { + this.meta = meta; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReplayAnalysisIssuesResponse + */ + @JsonAnySetter + public ReplayAnalysisIssuesResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReplayAnalysisIssuesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReplayAnalysisIssuesResponse replayAnalysisIssuesResponse = (ReplayAnalysisIssuesResponse) o; + return Objects.equals(this.data, replayAnalysisIssuesResponse.data) + && Objects.equals(this.meta, replayAnalysisIssuesResponse.meta) + && Objects.equals( + this.additionalProperties, replayAnalysisIssuesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReplayAnalysisIssuesResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisLLMDetails.java b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisLLMDetails.java new file mode 100644 index 00000000000..ccf24c7eb72 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisLLMDetails.java @@ -0,0 +1,180 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** AI-generated analysis details for a replay issue. */ +@JsonPropertyOrder({ + ReplayAnalysisLLMDetails.JSON_PROPERTY_INTENT, + ReplayAnalysisLLMDetails.JSON_PROPERTY_USER_PATTERN +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReplayAnalysisLLMDetails { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INTENT = "intent"; + private String intent; + + public static final String JSON_PROPERTY_USER_PATTERN = "user_pattern"; + private List userPattern = new ArrayList<>(); + + public ReplayAnalysisLLMDetails() {} + + @JsonCreator + public ReplayAnalysisLLMDetails( + @JsonProperty(required = true, value = JSON_PROPERTY_INTENT) String intent, + @JsonProperty(required = true, value = JSON_PROPERTY_USER_PATTERN) List userPattern) { + this.intent = intent; + this.userPattern = userPattern; + } + + public ReplayAnalysisLLMDetails intent(String intent) { + this.intent = intent; + return this; + } + + /** + * Interpreted user intent derived from session analysis. + * + * @return intent + */ + @JsonProperty(JSON_PROPERTY_INTENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getIntent() { + return intent; + } + + public void setIntent(String intent) { + this.intent = intent; + } + + public ReplayAnalysisLLMDetails userPattern(List userPattern) { + this.userPattern = userPattern; + return this; + } + + public ReplayAnalysisLLMDetails addUserPatternItem(String userPatternItem) { + this.userPattern.add(userPatternItem); + return this; + } + + /** + * List of user behavior steps observed in the session. + * + * @return userPattern + */ + @JsonProperty(JSON_PROPERTY_USER_PATTERN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getUserPattern() { + return userPattern; + } + + public void setUserPattern(List userPattern) { + this.userPattern = userPattern; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReplayAnalysisLLMDetails + */ + @JsonAnySetter + public ReplayAnalysisLLMDetails putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReplayAnalysisLLMDetails object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReplayAnalysisLLMDetails replayAnalysisLlmDetails = (ReplayAnalysisLLMDetails) o; + return Objects.equals(this.intent, replayAnalysisLlmDetails.intent) + && Objects.equals(this.userPattern, replayAnalysisLlmDetails.userPattern) + && Objects.equals(this.additionalProperties, replayAnalysisLlmDetails.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(intent, userPattern, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReplayAnalysisLLMDetails {\n"); + sb.append(" intent: ").append(toIndentedString(intent)).append("\n"); + sb.append(" userPattern: ").append(toIndentedString(userPattern)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisPageMeta.java b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisPageMeta.java new file mode 100644 index 00000000000..8e2d605b00b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisPageMeta.java @@ -0,0 +1,144 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Pagination metadata for a RUM replay analysis response. */ +@JsonPropertyOrder({ReplayAnalysisPageMeta.JSON_PROPERTY_TOTAL_FILTERED_COUNT}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReplayAnalysisPageMeta { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_TOTAL_FILTERED_COUNT = "total_filtered_count"; + private Long totalFilteredCount; + + public ReplayAnalysisPageMeta() {} + + @JsonCreator + public ReplayAnalysisPageMeta( + @JsonProperty(required = true, value = JSON_PROPERTY_TOTAL_FILTERED_COUNT) + Long totalFilteredCount) { + this.totalFilteredCount = totalFilteredCount; + } + + public ReplayAnalysisPageMeta totalFilteredCount(Long totalFilteredCount) { + this.totalFilteredCount = totalFilteredCount; + return this; + } + + /** + * Total number of items matching the current filters. + * + * @return totalFilteredCount + */ + @JsonProperty(JSON_PROPERTY_TOTAL_FILTERED_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getTotalFilteredCount() { + return totalFilteredCount; + } + + public void setTotalFilteredCount(Long totalFilteredCount) { + this.totalFilteredCount = totalFilteredCount; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReplayAnalysisPageMeta + */ + @JsonAnySetter + public ReplayAnalysisPageMeta putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReplayAnalysisPageMeta object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReplayAnalysisPageMeta replayAnalysisPageMeta = (ReplayAnalysisPageMeta) o; + return Objects.equals(this.totalFilteredCount, replayAnalysisPageMeta.totalFilteredCount) + && Objects.equals(this.additionalProperties, replayAnalysisPageMeta.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(totalFilteredCount, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReplayAnalysisPageMeta {\n"); + sb.append(" totalFilteredCount: ").append(toIndentedString(totalFilteredCount)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisRepresentativeSession.java b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisRepresentativeSession.java new file mode 100644 index 00000000000..1c64a4ab677 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisRepresentativeSession.java @@ -0,0 +1,356 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** A representative session illustrating a replay analysis issue. */ +@JsonPropertyOrder({ + ReplayAnalysisRepresentativeSession.JSON_PROPERTY_ISSUE_CATEGORY, + ReplayAnalysisRepresentativeSession.JSON_PROPERTY_LLM_ANALYSIS_DETAILS, + ReplayAnalysisRepresentativeSession.JSON_PROPERTY_SCREENSHOT, + ReplayAnalysisRepresentativeSession.JSON_PROPERTY_SESSION_ID, + ReplayAnalysisRepresentativeSession.JSON_PROPERTY_SESSION_START_TIMESTAMP_MS, + ReplayAnalysisRepresentativeSession.JSON_PROPERTY_SIGNALS, + ReplayAnalysisRepresentativeSession.JSON_PROPERTY_VIEW_NAME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReplayAnalysisRepresentativeSession { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ISSUE_CATEGORY = "issue_category"; + private String issueCategory; + + public static final String JSON_PROPERTY_LLM_ANALYSIS_DETAILS = "llm_analysis_details"; + private ReplayAnalysisLLMDetails llmAnalysisDetails; + + public static final String JSON_PROPERTY_SCREENSHOT = "screenshot"; + private ReplayAnalysisScreenshot screenshot; + + public static final String JSON_PROPERTY_SESSION_ID = "session_id"; + private String sessionId; + + public static final String JSON_PROPERTY_SESSION_START_TIMESTAMP_MS = + "session_start_timestamp_ms"; + private Long sessionStartTimestampMs; + + public static final String JSON_PROPERTY_SIGNALS = "signals"; + private List signals = new ArrayList<>(); + + public static final String JSON_PROPERTY_VIEW_NAME = "view_name"; + private JsonNullable viewName = JsonNullable.undefined(); + + public ReplayAnalysisRepresentativeSession() {} + + @JsonCreator + public ReplayAnalysisRepresentativeSession( + @JsonProperty(required = true, value = JSON_PROPERTY_ISSUE_CATEGORY) String issueCategory, + @JsonProperty(required = true, value = JSON_PROPERTY_LLM_ANALYSIS_DETAILS) + ReplayAnalysisLLMDetails llmAnalysisDetails, + @JsonProperty(required = true, value = JSON_PROPERTY_SESSION_ID) String sessionId, + @JsonProperty(required = true, value = JSON_PROPERTY_SESSION_START_TIMESTAMP_MS) + Long sessionStartTimestampMs, + @JsonProperty(required = true, value = JSON_PROPERTY_SIGNALS) + List signals) { + this.issueCategory = issueCategory; + this.llmAnalysisDetails = llmAnalysisDetails; + this.unparsed |= llmAnalysisDetails.unparsed; + this.sessionId = sessionId; + this.sessionStartTimestampMs = sessionStartTimestampMs; + this.signals = signals; + } + + public ReplayAnalysisRepresentativeSession issueCategory(String issueCategory) { + this.issueCategory = issueCategory; + return this; + } + + /** + * Category of the issue observed in this session. + * + * @return issueCategory + */ + @JsonProperty(JSON_PROPERTY_ISSUE_CATEGORY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getIssueCategory() { + return issueCategory; + } + + public void setIssueCategory(String issueCategory) { + this.issueCategory = issueCategory; + } + + public ReplayAnalysisRepresentativeSession llmAnalysisDetails( + ReplayAnalysisLLMDetails llmAnalysisDetails) { + this.llmAnalysisDetails = llmAnalysisDetails; + this.unparsed |= llmAnalysisDetails.unparsed; + return this; + } + + /** + * AI-generated analysis details for a replay issue. + * + * @return llmAnalysisDetails + */ + @JsonProperty(JSON_PROPERTY_LLM_ANALYSIS_DETAILS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReplayAnalysisLLMDetails getLlmAnalysisDetails() { + return llmAnalysisDetails; + } + + public void setLlmAnalysisDetails(ReplayAnalysisLLMDetails llmAnalysisDetails) { + this.llmAnalysisDetails = llmAnalysisDetails; + } + + public ReplayAnalysisRepresentativeSession screenshot(ReplayAnalysisScreenshot screenshot) { + this.screenshot = screenshot; + this.unparsed |= screenshot.unparsed; + return this; + } + + /** + * A screenshot captured during a replay session. + * + * @return screenshot + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCREENSHOT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ReplayAnalysisScreenshot getScreenshot() { + return screenshot; + } + + public void setScreenshot(ReplayAnalysisScreenshot screenshot) { + this.screenshot = screenshot; + } + + public ReplayAnalysisRepresentativeSession sessionId(String sessionId) { + this.sessionId = sessionId; + return this; + } + + /** + * Unique identifier of the representative session. + * + * @return sessionId + */ + @JsonProperty(JSON_PROPERTY_SESSION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSessionId() { + return sessionId; + } + + public void setSessionId(String sessionId) { + this.sessionId = sessionId; + } + + public ReplayAnalysisRepresentativeSession sessionStartTimestampMs(Long sessionStartTimestampMs) { + this.sessionStartTimestampMs = sessionStartTimestampMs; + return this; + } + + /** + * Session start timestamp in milliseconds. + * + * @return sessionStartTimestampMs + */ + @JsonProperty(JSON_PROPERTY_SESSION_START_TIMESTAMP_MS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getSessionStartTimestampMs() { + return sessionStartTimestampMs; + } + + public void setSessionStartTimestampMs(Long sessionStartTimestampMs) { + this.sessionStartTimestampMs = sessionStartTimestampMs; + } + + public ReplayAnalysisRepresentativeSession signals(List signals) { + this.signals = signals; + for (ReplayAnalysisSignal item : signals) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ReplayAnalysisRepresentativeSession addSignalsItem(ReplayAnalysisSignal signalsItem) { + this.signals.add(signalsItem); + this.unparsed |= signalsItem.unparsed; + return this; + } + + /** + * List of signals observed in the representative session. + * + * @return signals + */ + @JsonProperty(JSON_PROPERTY_SIGNALS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getSignals() { + return signals; + } + + public void setSignals(List signals) { + this.signals = signals; + } + + public ReplayAnalysisRepresentativeSession viewName(String viewName) { + this.viewName = JsonNullable.of(viewName); + return this; + } + + /** + * Name of the view where the issue was observed. + * + * @return viewName + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getViewName() { + return viewName.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_VIEW_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getViewName_JsonNullable() { + return viewName; + } + + @JsonProperty(JSON_PROPERTY_VIEW_NAME) + public void setViewName_JsonNullable(JsonNullable viewName) { + this.viewName = viewName; + } + + public void setViewName(String viewName) { + this.viewName = JsonNullable.of(viewName); + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReplayAnalysisRepresentativeSession + */ + @JsonAnySetter + public ReplayAnalysisRepresentativeSession putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReplayAnalysisRepresentativeSession object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReplayAnalysisRepresentativeSession replayAnalysisRepresentativeSession = + (ReplayAnalysisRepresentativeSession) o; + return Objects.equals(this.issueCategory, replayAnalysisRepresentativeSession.issueCategory) + && Objects.equals( + this.llmAnalysisDetails, replayAnalysisRepresentativeSession.llmAnalysisDetails) + && Objects.equals(this.screenshot, replayAnalysisRepresentativeSession.screenshot) + && Objects.equals(this.sessionId, replayAnalysisRepresentativeSession.sessionId) + && Objects.equals( + this.sessionStartTimestampMs, + replayAnalysisRepresentativeSession.sessionStartTimestampMs) + && Objects.equals(this.signals, replayAnalysisRepresentativeSession.signals) + && Objects.equals(this.viewName, replayAnalysisRepresentativeSession.viewName) + && Objects.equals( + this.additionalProperties, replayAnalysisRepresentativeSession.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + issueCategory, + llmAnalysisDetails, + screenshot, + sessionId, + sessionStartTimestampMs, + signals, + viewName, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReplayAnalysisRepresentativeSession {\n"); + sb.append(" issueCategory: ").append(toIndentedString(issueCategory)).append("\n"); + sb.append(" llmAnalysisDetails: ").append(toIndentedString(llmAnalysisDetails)).append("\n"); + sb.append(" screenshot: ").append(toIndentedString(screenshot)).append("\n"); + sb.append(" sessionId: ").append(toIndentedString(sessionId)).append("\n"); + sb.append(" sessionStartTimestampMs: ") + .append(toIndentedString(sessionStartTimestampMs)) + .append("\n"); + sb.append(" signals: ").append(toIndentedString(signals)).append("\n"); + sb.append(" viewName: ").append(toIndentedString(viewName)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisScreenshot.java b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisScreenshot.java new file mode 100644 index 00000000000..aeb2bbd3e2a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisScreenshot.java @@ -0,0 +1,229 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A screenshot captured during a replay session. */ +@JsonPropertyOrder({ + ReplayAnalysisScreenshot.JSON_PROPERTY_SCREENSHOT_KEY, + ReplayAnalysisScreenshot.JSON_PROPERTY_SESSION_ID, + ReplayAnalysisScreenshot.JSON_PROPERTY_TIMESTAMP_MS, + ReplayAnalysisScreenshot.JSON_PROPERTY_VIEW_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReplayAnalysisScreenshot { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_SCREENSHOT_KEY = "screenshot_key"; + private String screenshotKey; + + public static final String JSON_PROPERTY_SESSION_ID = "session_id"; + private String sessionId; + + public static final String JSON_PROPERTY_TIMESTAMP_MS = "timestamp_ms"; + private Long timestampMs; + + public static final String JSON_PROPERTY_VIEW_ID = "view_id"; + private String viewId; + + public ReplayAnalysisScreenshot() {} + + @JsonCreator + public ReplayAnalysisScreenshot( + @JsonProperty(required = true, value = JSON_PROPERTY_SCREENSHOT_KEY) String screenshotKey, + @JsonProperty(required = true, value = JSON_PROPERTY_SESSION_ID) String sessionId, + @JsonProperty(required = true, value = JSON_PROPERTY_TIMESTAMP_MS) Long timestampMs, + @JsonProperty(required = true, value = JSON_PROPERTY_VIEW_ID) String viewId) { + this.screenshotKey = screenshotKey; + this.sessionId = sessionId; + this.timestampMs = timestampMs; + this.viewId = viewId; + } + + public ReplayAnalysisScreenshot screenshotKey(String screenshotKey) { + this.screenshotKey = screenshotKey; + return this; + } + + /** + * Filename or key identifier of the screenshot. + * + * @return screenshotKey + */ + @JsonProperty(JSON_PROPERTY_SCREENSHOT_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getScreenshotKey() { + return screenshotKey; + } + + public void setScreenshotKey(String screenshotKey) { + this.screenshotKey = screenshotKey; + } + + public ReplayAnalysisScreenshot sessionId(String sessionId) { + this.sessionId = sessionId; + return this; + } + + /** + * Unique identifier of the session where the screenshot was taken. + * + * @return sessionId + */ + @JsonProperty(JSON_PROPERTY_SESSION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSessionId() { + return sessionId; + } + + public void setSessionId(String sessionId) { + this.sessionId = sessionId; + } + + public ReplayAnalysisScreenshot timestampMs(Long timestampMs) { + this.timestampMs = timestampMs; + return this; + } + + /** + * Timestamp of the screenshot in milliseconds. + * + * @return timestampMs + */ + @JsonProperty(JSON_PROPERTY_TIMESTAMP_MS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getTimestampMs() { + return timestampMs; + } + + public void setTimestampMs(Long timestampMs) { + this.timestampMs = timestampMs; + } + + public ReplayAnalysisScreenshot viewId(String viewId) { + this.viewId = viewId; + return this; + } + + /** + * Unique identifier of the view where the screenshot was taken. + * + * @return viewId + */ + @JsonProperty(JSON_PROPERTY_VIEW_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getViewId() { + return viewId; + } + + public void setViewId(String viewId) { + this.viewId = viewId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReplayAnalysisScreenshot + */ + @JsonAnySetter + public ReplayAnalysisScreenshot putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReplayAnalysisScreenshot object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReplayAnalysisScreenshot replayAnalysisScreenshot = (ReplayAnalysisScreenshot) o; + return Objects.equals(this.screenshotKey, replayAnalysisScreenshot.screenshotKey) + && Objects.equals(this.sessionId, replayAnalysisScreenshot.sessionId) + && Objects.equals(this.timestampMs, replayAnalysisScreenshot.timestampMs) + && Objects.equals(this.viewId, replayAnalysisScreenshot.viewId) + && Objects.equals(this.additionalProperties, replayAnalysisScreenshot.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(screenshotKey, sessionId, timestampMs, viewId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReplayAnalysisScreenshot {\n"); + sb.append(" screenshotKey: ").append(toIndentedString(screenshotKey)).append("\n"); + sb.append(" sessionId: ").append(toIndentedString(sessionId)).append("\n"); + sb.append(" timestampMs: ").append(toIndentedString(timestampMs)).append("\n"); + sb.append(" viewId: ").append(toIndentedString(viewId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisSignal.java b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisSignal.java new file mode 100644 index 00000000000..31c98ed296f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReplayAnalysisSignal.java @@ -0,0 +1,229 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A signal associated with a replay issue, capturing user interaction details. */ +@JsonPropertyOrder({ + ReplayAnalysisSignal.JSON_PROPERTY_EVENT, + ReplayAnalysisSignal.JSON_PROPERTY_SIGNAL_TYPE, + ReplayAnalysisSignal.JSON_PROPERTY_TIMESTAMP_MS, + ReplayAnalysisSignal.JSON_PROPERTY_USER_PATTERN +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReplayAnalysisSignal { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_EVENT = "event"; + private String event; + + public static final String JSON_PROPERTY_SIGNAL_TYPE = "signal_type"; + private String signalType; + + public static final String JSON_PROPERTY_TIMESTAMP_MS = "timestamp_ms"; + private Long timestampMs; + + public static final String JSON_PROPERTY_USER_PATTERN = "user_pattern"; + private String userPattern; + + public ReplayAnalysisSignal() {} + + @JsonCreator + public ReplayAnalysisSignal( + @JsonProperty(required = true, value = JSON_PROPERTY_EVENT) String event, + @JsonProperty(required = true, value = JSON_PROPERTY_SIGNAL_TYPE) String signalType, + @JsonProperty(required = true, value = JSON_PROPERTY_TIMESTAMP_MS) Long timestampMs, + @JsonProperty(required = true, value = JSON_PROPERTY_USER_PATTERN) String userPattern) { + this.event = event; + this.signalType = signalType; + this.timestampMs = timestampMs; + this.userPattern = userPattern; + } + + public ReplayAnalysisSignal event(String event) { + this.event = event; + return this; + } + + /** + * Event name associated with the signal. + * + * @return event + */ + @JsonProperty(JSON_PROPERTY_EVENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEvent() { + return event; + } + + public void setEvent(String event) { + this.event = event; + } + + public ReplayAnalysisSignal signalType(String signalType) { + this.signalType = signalType; + return this; + } + + /** + * Type of signal captured. + * + * @return signalType + */ + @JsonProperty(JSON_PROPERTY_SIGNAL_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSignalType() { + return signalType; + } + + public void setSignalType(String signalType) { + this.signalType = signalType; + } + + public ReplayAnalysisSignal timestampMs(Long timestampMs) { + this.timestampMs = timestampMs; + return this; + } + + /** + * Absolute timestamp of the signal in milliseconds. + * + * @return timestampMs + */ + @JsonProperty(JSON_PROPERTY_TIMESTAMP_MS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getTimestampMs() { + return timestampMs; + } + + public void setTimestampMs(Long timestampMs) { + this.timestampMs = timestampMs; + } + + public ReplayAnalysisSignal userPattern(String userPattern) { + this.userPattern = userPattern; + return this; + } + + /** + * User behavior pattern identified for the signal. + * + * @return userPattern + */ + @JsonProperty(JSON_PROPERTY_USER_PATTERN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getUserPattern() { + return userPattern; + } + + public void setUserPattern(String userPattern) { + this.userPattern = userPattern; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReplayAnalysisSignal + */ + @JsonAnySetter + public ReplayAnalysisSignal putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReplayAnalysisSignal object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReplayAnalysisSignal replayAnalysisSignal = (ReplayAnalysisSignal) o; + return Objects.equals(this.event, replayAnalysisSignal.event) + && Objects.equals(this.signalType, replayAnalysisSignal.signalType) + && Objects.equals(this.timestampMs, replayAnalysisSignal.timestampMs) + && Objects.equals(this.userPattern, replayAnalysisSignal.userPattern) + && Objects.equals(this.additionalProperties, replayAnalysisSignal.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(event, signalType, timestampMs, userPattern, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReplayAnalysisSignal {\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append(" signalType: ").append(toIndentedString(signalType)).append("\n"); + sb.append(" timestampMs: ").append(toIndentedString(timestampMs)).append("\n"); + sb.append(" userPattern: ").append(toIndentedString(userPattern)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReplaySummaryChapter.java b/src/main/java/com/datadog/api/client/v2/model/ReplaySummaryChapter.java new file mode 100644 index 00000000000..432fb0a3231 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReplaySummaryChapter.java @@ -0,0 +1,201 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A chapter within a RUM replay summary, representing a distinct segment of user activity. */ +@JsonPropertyOrder({ + ReplaySummaryChapter.JSON_PROPERTY_END_MS, + ReplaySummaryChapter.JSON_PROPERTY_START_MS, + ReplaySummaryChapter.JSON_PROPERTY_TEXT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReplaySummaryChapter { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_END_MS = "end_ms"; + private Long endMs; + + public static final String JSON_PROPERTY_START_MS = "start_ms"; + private Long startMs; + + public static final String JSON_PROPERTY_TEXT = "text"; + private String text; + + public ReplaySummaryChapter() {} + + @JsonCreator + public ReplaySummaryChapter( + @JsonProperty(required = true, value = JSON_PROPERTY_END_MS) Long endMs, + @JsonProperty(required = true, value = JSON_PROPERTY_START_MS) Long startMs, + @JsonProperty(required = true, value = JSON_PROPERTY_TEXT) String text) { + this.endMs = endMs; + this.startMs = startMs; + this.text = text; + } + + public ReplaySummaryChapter endMs(Long endMs) { + this.endMs = endMs; + return this; + } + + /** + * End time of the chapter in milliseconds. + * + * @return endMs + */ + @JsonProperty(JSON_PROPERTY_END_MS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getEndMs() { + return endMs; + } + + public void setEndMs(Long endMs) { + this.endMs = endMs; + } + + public ReplaySummaryChapter startMs(Long startMs) { + this.startMs = startMs; + return this; + } + + /** + * Start time of the chapter in milliseconds. + * + * @return startMs + */ + @JsonProperty(JSON_PROPERTY_START_MS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getStartMs() { + return startMs; + } + + public void setStartMs(Long startMs) { + this.startMs = startMs; + } + + public ReplaySummaryChapter text(String text) { + this.text = text; + return this; + } + + /** + * Description of user activity during this chapter. + * + * @return text + */ + @JsonProperty(JSON_PROPERTY_TEXT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getText() { + return text; + } + + public void setText(String text) { + this.text = text; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReplaySummaryChapter + */ + @JsonAnySetter + public ReplaySummaryChapter putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReplaySummaryChapter object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReplaySummaryChapter replaySummaryChapter = (ReplaySummaryChapter) o; + return Objects.equals(this.endMs, replaySummaryChapter.endMs) + && Objects.equals(this.startMs, replaySummaryChapter.startMs) + && Objects.equals(this.text, replaySummaryChapter.text) + && Objects.equals(this.additionalProperties, replaySummaryChapter.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(endMs, startMs, text, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReplaySummaryChapter {\n"); + sb.append(" endMs: ").append(toIndentedString(endMs)).append("\n"); + sb.append(" startMs: ").append(toIndentedString(startMs)).append("\n"); + sb.append(" text: ").append(toIndentedString(text)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReplaySummaryDataAttributesResponse.java b/src/main/java/com/datadog/api/client/v2/model/ReplaySummaryDataAttributesResponse.java new file mode 100644 index 00000000000..3069a8cec65 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReplaySummaryDataAttributesResponse.java @@ -0,0 +1,276 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a RUM replay summary response. */ +@JsonPropertyOrder({ + ReplaySummaryDataAttributesResponse.JSON_PROPERTY_CHAPTERS, + ReplaySummaryDataAttributesResponse.JSON_PROPERTY_HAS_ENOUGH_ACTIVITY, + ReplaySummaryDataAttributesResponse.JSON_PROPERTY_HAS_TOO_MANY_EVENTS, + ReplaySummaryDataAttributesResponse.JSON_PROPERTY_SUMMARY, + ReplaySummaryDataAttributesResponse.JSON_PROPERTY_VERSION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReplaySummaryDataAttributesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CHAPTERS = "chapters"; + private List chapters = new ArrayList<>(); + + public static final String JSON_PROPERTY_HAS_ENOUGH_ACTIVITY = "has_enough_activity"; + private Boolean hasEnoughActivity; + + public static final String JSON_PROPERTY_HAS_TOO_MANY_EVENTS = "has_too_many_events"; + private Boolean hasTooManyEvents; + + public static final String JSON_PROPERTY_SUMMARY = "summary"; + private String summary; + + public static final String JSON_PROPERTY_VERSION = "version"; + private String version; + + public ReplaySummaryDataAttributesResponse() {} + + @JsonCreator + public ReplaySummaryDataAttributesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_CHAPTERS) + List chapters, + @JsonProperty(required = true, value = JSON_PROPERTY_HAS_ENOUGH_ACTIVITY) + Boolean hasEnoughActivity, + @JsonProperty(required = true, value = JSON_PROPERTY_HAS_TOO_MANY_EVENTS) + Boolean hasTooManyEvents, + @JsonProperty(required = true, value = JSON_PROPERTY_SUMMARY) String summary, + @JsonProperty(required = true, value = JSON_PROPERTY_VERSION) String version) { + this.chapters = chapters; + this.hasEnoughActivity = hasEnoughActivity; + this.hasTooManyEvents = hasTooManyEvents; + this.summary = summary; + this.version = version; + } + + public ReplaySummaryDataAttributesResponse chapters(List chapters) { + this.chapters = chapters; + for (ReplaySummaryChapter item : chapters) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ReplaySummaryDataAttributesResponse addChaptersItem(ReplaySummaryChapter chaptersItem) { + this.chapters.add(chaptersItem); + this.unparsed |= chaptersItem.unparsed; + return this; + } + + /** + * List of chapters breaking down the session into distinct activity segments. + * + * @return chapters + */ + @JsonProperty(JSON_PROPERTY_CHAPTERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getChapters() { + return chapters; + } + + public void setChapters(List chapters) { + this.chapters = chapters; + } + + public ReplaySummaryDataAttributesResponse hasEnoughActivity(Boolean hasEnoughActivity) { + this.hasEnoughActivity = hasEnoughActivity; + return this; + } + + /** + * Whether the session contained sufficient user activity to generate a summary. + * + * @return hasEnoughActivity + */ + @JsonProperty(JSON_PROPERTY_HAS_ENOUGH_ACTIVITY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getHasEnoughActivity() { + return hasEnoughActivity; + } + + public void setHasEnoughActivity(Boolean hasEnoughActivity) { + this.hasEnoughActivity = hasEnoughActivity; + } + + public ReplaySummaryDataAttributesResponse hasTooManyEvents(Boolean hasTooManyEvents) { + this.hasTooManyEvents = hasTooManyEvents; + return this; + } + + /** + * Whether the session exceeded the event count limit for summary generation. + * + * @return hasTooManyEvents + */ + @JsonProperty(JSON_PROPERTY_HAS_TOO_MANY_EVENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getHasTooManyEvents() { + return hasTooManyEvents; + } + + public void setHasTooManyEvents(Boolean hasTooManyEvents) { + this.hasTooManyEvents = hasTooManyEvents; + } + + public ReplaySummaryDataAttributesResponse summary(String summary) { + this.summary = summary; + return this; + } + + /** + * AI-generated summary of the replay session. + * + * @return summary + */ + @JsonProperty(JSON_PROPERTY_SUMMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSummary() { + return summary; + } + + public void setSummary(String summary) { + this.summary = summary; + } + + public ReplaySummaryDataAttributesResponse version(String version) { + this.version = version; + return this; + } + + /** + * Version of the prompt used to generate the summary. + * + * @return version + */ + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReplaySummaryDataAttributesResponse + */ + @JsonAnySetter + public ReplaySummaryDataAttributesResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReplaySummaryDataAttributesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReplaySummaryDataAttributesResponse replaySummaryDataAttributesResponse = + (ReplaySummaryDataAttributesResponse) o; + return Objects.equals(this.chapters, replaySummaryDataAttributesResponse.chapters) + && Objects.equals( + this.hasEnoughActivity, replaySummaryDataAttributesResponse.hasEnoughActivity) + && Objects.equals( + this.hasTooManyEvents, replaySummaryDataAttributesResponse.hasTooManyEvents) + && Objects.equals(this.summary, replaySummaryDataAttributesResponse.summary) + && Objects.equals(this.version, replaySummaryDataAttributesResponse.version) + && Objects.equals( + this.additionalProperties, replaySummaryDataAttributesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + chapters, hasEnoughActivity, hasTooManyEvents, summary, version, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReplaySummaryDataAttributesResponse {\n"); + sb.append(" chapters: ").append(toIndentedString(chapters)).append("\n"); + sb.append(" hasEnoughActivity: ").append(toIndentedString(hasEnoughActivity)).append("\n"); + sb.append(" hasTooManyEvents: ").append(toIndentedString(hasTooManyEvents)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReplaySummaryDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/ReplaySummaryDataRequest.java new file mode 100644 index 00000000000..794615dcdb6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReplaySummaryDataRequest.java @@ -0,0 +1,148 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object for a RUM replay summary request. */ +@JsonPropertyOrder({ReplaySummaryDataRequest.JSON_PROPERTY_TYPE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReplaySummaryDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_TYPE = "type"; + private ReplaySummaryRequestType type = ReplaySummaryRequestType.REPLAY_SUMMARY_REQUEST; + + public ReplaySummaryDataRequest() {} + + @JsonCreator + public ReplaySummaryDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ReplaySummaryRequestType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public ReplaySummaryDataRequest type(ReplaySummaryRequestType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * RUM replay summary request resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReplaySummaryRequestType getType() { + return type; + } + + public void setType(ReplaySummaryRequestType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReplaySummaryDataRequest + */ + @JsonAnySetter + public ReplaySummaryDataRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReplaySummaryDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReplaySummaryDataRequest replaySummaryDataRequest = (ReplaySummaryDataRequest) o; + return Objects.equals(this.type, replaySummaryDataRequest.type) + && Objects.equals(this.additionalProperties, replaySummaryDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReplaySummaryDataRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReplaySummaryDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/ReplaySummaryDataResponse.java new file mode 100644 index 00000000000..db8aab449a6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReplaySummaryDataResponse.java @@ -0,0 +1,210 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object for a RUM replay summary response. */ +@JsonPropertyOrder({ + ReplaySummaryDataResponse.JSON_PROPERTY_ATTRIBUTES, + ReplaySummaryDataResponse.JSON_PROPERTY_ID, + ReplaySummaryDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReplaySummaryDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ReplaySummaryDataAttributesResponse attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ReplaySummaryResponseType type = ReplaySummaryResponseType.SUMMARY_RESPONSE; + + public ReplaySummaryDataResponse() {} + + @JsonCreator + public ReplaySummaryDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + ReplaySummaryDataAttributesResponse attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ReplaySummaryResponseType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public ReplaySummaryDataResponse attributes(ReplaySummaryDataAttributesResponse attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a RUM replay summary response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReplaySummaryDataAttributesResponse getAttributes() { + return attributes; + } + + public void setAttributes(ReplaySummaryDataAttributesResponse attributes) { + this.attributes = attributes; + } + + public ReplaySummaryDataResponse id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the generated summary. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public ReplaySummaryDataResponse type(ReplaySummaryResponseType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * RUM replay summary response resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReplaySummaryResponseType getType() { + return type; + } + + public void setType(ReplaySummaryResponseType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReplaySummaryDataResponse + */ + @JsonAnySetter + public ReplaySummaryDataResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReplaySummaryDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReplaySummaryDataResponse replaySummaryDataResponse = (ReplaySummaryDataResponse) o; + return Objects.equals(this.attributes, replaySummaryDataResponse.attributes) + && Objects.equals(this.id, replaySummaryDataResponse.id) + && Objects.equals(this.type, replaySummaryDataResponse.type) + && Objects.equals( + this.additionalProperties, replaySummaryDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReplaySummaryDataResponse {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReplaySummaryRequest.java b/src/main/java/com/datadog/api/client/v2/model/ReplaySummaryRequest.java new file mode 100644 index 00000000000..99dc1a54700 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReplaySummaryRequest.java @@ -0,0 +1,145 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request body for generating a RUM replay summary. */ +@JsonPropertyOrder({ReplaySummaryRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReplaySummaryRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private ReplaySummaryDataRequest data; + + public ReplaySummaryRequest() {} + + @JsonCreator + public ReplaySummaryRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) ReplaySummaryDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public ReplaySummaryRequest data(ReplaySummaryDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object for a RUM replay summary request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReplaySummaryDataRequest getData() { + return data; + } + + public void setData(ReplaySummaryDataRequest data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReplaySummaryRequest + */ + @JsonAnySetter + public ReplaySummaryRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReplaySummaryRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReplaySummaryRequest replaySummaryRequest = (ReplaySummaryRequest) o; + return Objects.equals(this.data, replaySummaryRequest.data) + && Objects.equals(this.additionalProperties, replaySummaryRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReplaySummaryRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReplaySummaryRequestType.java b/src/main/java/com/datadog/api/client/v2/model/ReplaySummaryRequestType.java new file mode 100644 index 00000000000..e4441281ec5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReplaySummaryRequestType.java @@ -0,0 +1,57 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** RUM replay summary request resource type. */ +@JsonSerialize(using = ReplaySummaryRequestType.ReplaySummaryRequestTypeSerializer.class) +public class ReplaySummaryRequestType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("replay_summary_request")); + + public static final ReplaySummaryRequestType REPLAY_SUMMARY_REQUEST = + new ReplaySummaryRequestType("replay_summary_request"); + + ReplaySummaryRequestType(String value) { + super(value, allowedValues); + } + + public static class ReplaySummaryRequestTypeSerializer + extends StdSerializer { + public ReplaySummaryRequestTypeSerializer(Class t) { + super(t); + } + + public ReplaySummaryRequestTypeSerializer() { + this(null); + } + + @Override + public void serialize( + ReplaySummaryRequestType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ReplaySummaryRequestType fromValue(String value) { + return new ReplaySummaryRequestType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReplaySummaryResponse.java b/src/main/java/com/datadog/api/client/v2/model/ReplaySummaryResponse.java new file mode 100644 index 00000000000..69b7c62f6b2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReplaySummaryResponse.java @@ -0,0 +1,145 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing a generated RUM replay summary. */ +@JsonPropertyOrder({ReplaySummaryResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReplaySummaryResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private ReplaySummaryDataResponse data; + + public ReplaySummaryResponse() {} + + @JsonCreator + public ReplaySummaryResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) ReplaySummaryDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public ReplaySummaryResponse data(ReplaySummaryDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object for a RUM replay summary response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReplaySummaryDataResponse getData() { + return data; + } + + public void setData(ReplaySummaryDataResponse data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReplaySummaryResponse + */ + @JsonAnySetter + public ReplaySummaryResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReplaySummaryResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReplaySummaryResponse replaySummaryResponse = (ReplaySummaryResponse) o; + return Objects.equals(this.data, replaySummaryResponse.data) + && Objects.equals(this.additionalProperties, replaySummaryResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReplaySummaryResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReplaySummaryResponseType.java b/src/main/java/com/datadog/api/client/v2/model/ReplaySummaryResponseType.java new file mode 100644 index 00000000000..a0ecb80acd8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReplaySummaryResponseType.java @@ -0,0 +1,57 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** RUM replay summary response resource type. */ +@JsonSerialize(using = ReplaySummaryResponseType.ReplaySummaryResponseTypeSerializer.class) +public class ReplaySummaryResponseType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("summary_response")); + + public static final ReplaySummaryResponseType SUMMARY_RESPONSE = + new ReplaySummaryResponseType("summary_response"); + + ReplaySummaryResponseType(String value) { + super(value, allowedValues); + } + + public static class ReplaySummaryResponseTypeSerializer + extends StdSerializer { + public ReplaySummaryResponseTypeSerializer(Class t) { + super(t); + } + + public ReplaySummaryResponseTypeSerializer() { + this(null); + } + + @Override + public void serialize( + ReplaySummaryResponseType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ReplaySummaryResponseType fromValue(String value) { + return new ReplaySummaryResponseType(value); + } +} diff --git a/src/test/resources/com/datadog/api/client/v2/api/rum_replay.feature b/src/test/resources/com/datadog/api/client/v2/api/rum_replay.feature new file mode 100644 index 00000000000..f051e15370a --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/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/src/test/resources/com/datadog/api/client/v2/api/rum_replay_analysis.feature b/src/test/resources/com/datadog/api/client/v2/api/rum_replay_analysis.feature new file mode 100644 index 00000000000..e1556fcebfc --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/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/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index d5a8323e270..3763cb5b595 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/undo.json +++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json @@ -4786,6 +4786,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": { @@ -4817,6 +4835,12 @@ "type": "idempotent" } }, + "GenerateReplaySummary": { + "tag": "Rum Replay", + "undo": { + "type": "idempotent" + } + }, "DeleteRestrictionPolicy": { "tag": "Restriction Policies", "undo": {