diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index b8dc06e8386..0bb0d8932be 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -109726,6 +109726,354 @@ components: type: string x-enum-varnames: - RULESET_STATUS + RumArchiveConfig: + description: JSON:API resource. + properties: + attributes: + $ref: "#/components/schemas/RumArchiveConfigAttributes" + id: + description: Resource identifier. + example: a33671aa-24fd-4dcd-ba4b-5bbdbafe7690 + type: string + type: + $ref: "#/components/schemas/RumArchiveConfigType" + required: + - id + - type + - attributes + type: object + RumArchiveConfigAttributes: + description: Archive configuration. + properties: + enabled: + description: Whether archiving is enabled. + example: true + type: boolean + org_id: + description: Organization ID. + example: 123 + format: int64 + type: integer + retention_days: + description: Configured retention in days; omitted when unset. + example: 90 + format: int32 + maximum: 2147483647 + type: integer + updated_at: + description: Last update time. + example: "2026-09-21T12:00:00Z" + format: date-time + type: string + updated_by: + description: Handle of the user who last updated the configuration. + example: user@example.com + type: string + required: + - org_id + - enabled + type: object + RumArchiveConfigListResponse: + description: JSON:API document. + properties: + data: + description: Configurations in page order. + items: + $ref: "#/components/schemas/RumArchiveConfig" + type: array + meta: + $ref: "#/components/schemas/RumArchiveConfigMeta" + required: + - data + - meta + type: object + RumArchiveConfigMeta: + description: Pagination metadata. + properties: + page: + $ref: "#/components/schemas/RumArchiveConfigPage" + required: + - page + type: object + RumArchiveConfigPage: + description: Page information. + properties: + total_filtered_count: + description: Total configurations for the organization. + example: 0 + format: int64 + minimum: 0 + type: integer + required: + - total_filtered_count + type: object + RumArchiveConfigResponse: + description: JSON:API document. + properties: + data: + $ref: "#/components/schemas/RumArchiveConfig" + required: + - data + type: object + RumArchiveConfigType: + description: JSON:API resource type. + enum: + - rum_archive_config + example: rum_archive_config + type: string + x-enum-varnames: + - RUM_ARCHIVE_CONFIG + RumArchiveConfigUpsertAttributes: + description: >- + Archive configuration to save. When enabled is true, retention_days is required and must be 30, 90, or 180. When disabled, retention_days can be omitted. + properties: + enabled: + description: Whether archiving is enabled. + example: true + type: boolean + retention_days: + description: Retention in days. Required and restricted to 30, 90, or 180 only when enabled is true. + example: 90 + format: int32 + maximum: 2147483647 + type: integer + required: + - enabled + type: object + RumArchiveConfigUpsertData: + description: JSON:API resource. + properties: + attributes: + $ref: "#/components/schemas/RumArchiveConfigUpsertAttributes" + id: + description: Resource identifier. + example: a33671aa-24fd-4dcd-ba4b-5bbdbafe7690 + type: string + type: + $ref: "#/components/schemas/RumArchiveConfigType" + required: + - id + - type + - attributes + type: object + RumArchiveConfigUpsertRequest: + description: JSON:API document. + properties: + data: + $ref: "#/components/schemas/RumArchiveConfigUpsertData" + required: + - data + type: object + RumArchiveSession: + description: JSON:API resource. + properties: + attributes: + $ref: "#/components/schemas/RumArchiveSessionAttributes" + id: + description: Resource identifier. + example: 11111111-1111-4111-8111-111111111111 + type: string + type: + $ref: "#/components/schemas/RumArchiveSessionType" + required: + - id + - type + - attributes + type: object + RumArchiveSessionAttributes: + description: Archived session metadata. + properties: + account_id: + description: Session account id, or null when unavailable. + example: account-123 + nullable: true + type: string + anonymous_id: + description: Session anonymous id, or null when unavailable. + example: anonymous-123 + nullable: true + type: string + application_id: + description: Application UUID. + example: a33671aa-24fd-4dcd-ba4b-5bbdbafe7690 + format: uuid + type: string + country: + description: Session country, or null when unavailable. + example: US + nullable: true + type: string + recovery_status: + $ref: "#/components/schemas/RumArchiveSessionRecoveryStatus" + service: + description: Service name. + example: web + type: string + session_id: + description: Session identifier. + example: 00000000-0000-4000-8000-000000000001 + type: string + timestamp: + description: Session timestamp in Unix milliseconds. + example: 1789905600000 + format: int64 + type: integer + user_id: + description: Session user id, or null when unavailable. + example: user-123 + nullable: true + type: string + version: + description: Session version, or null when unavailable. + example: 1.0.0 + nullable: true + type: string + required: + - session_id + - application_id + - timestamp + - service + - user_id + - anonymous_id + - account_id + - country + - version + - recovery_status + type: object + RumArchiveSessionRecoveryStatus: + description: >- + Session recovery state. A missing recovery record can be represented as null. Optional request_id and recovered_at are omitted when unavailable. + nullable: true + properties: + recovered_at: + description: Recovery timestamp, when available. + example: example + format: date-time + type: string + request_id: + description: Associated recovery request ID. + example: 11111111-1111-4111-8111-111111111111 + type: string + status: + $ref: "#/components/schemas/RumRecoverySessionStatus" + required: + - status + type: object + RumArchiveSessionType: + description: JSON:API resource type. + enum: + - rum_archive_session + example: rum_archive_session + type: string + x-enum-varnames: + - RUM_ARCHIVE_SESSION + RumArchiveSessionsMeta: + description: Search metadata. + properties: + page: + $ref: "#/components/schemas/RumArchiveSessionsPage" + required: + - page + type: object + RumArchiveSessionsPage: + description: Search pagination. + properties: + next_cursor: + description: Opaque continuation cursor. Omitted when no further page is available. + example: example + type: string + total_count: + description: >- + Search result count. Can be zero on continuation pages even when sessions are returned. Use `next_cursor` to determine whether more pages are available. + example: 0 + format: int64 + minimum: 0 + type: integer + required: + - total_count + type: object + RumArchiveSessionsResponse: + description: JSON:API document. + properties: + data: + description: Archived sessions. + items: + $ref: "#/components/schemas/RumArchiveSession" + type: array + meta: + $ref: "#/components/schemas/RumArchiveSessionsMeta" + required: + - data + - meta + type: object + RumArchiveSessionsSearchAttributes: + description: >- + Archived-session query. A window wider than configured archive retention is narrowed before searching. + properties: + cursor: + description: Opaque next-page cursor. Keep the query, time range, and hide_retained value unchanged. + example: example + type: string + from: + description: Start of the range in Unix milliseconds. Must be positive and earlier than to. + example: 1789905600000 + format: int64 + minimum: 1 + type: integer + hide_retained: + default: false + description: >- + When true, exclude sessions already present in hot RUM storage. When false, those sessions can appear in the results. Keep this value unchanged when continuing with a cursor. + example: false + type: boolean + limit: + default: 50 + description: Page size. Values at or below zero use 50; values above 1000 are clamped to 1000. + example: 0 + format: int32 + maximum: 2147483647 + type: integer + query: + description: RUM search query. Must not be empty. + example: service:web + type: string + to: + description: End of the range in Unix milliseconds. + example: 1789992000000 + format: int64 + minimum: 1 + type: integer + required: + - query + - from + - to + type: object + RumArchiveSessionsSearchData: + description: JSON:API resource. + properties: + attributes: + $ref: "#/components/schemas/RumArchiveSessionsSearchAttributes" + id: + description: >- + Optional resource identifier. + example: 11111111-1111-4111-8111-111111111111 + type: string + type: + description: >- + JSON:API resource type. + example: rum_archive_sessions_request + type: string + required: + - attributes + type: object + RumArchiveSessionsSearchRequest: + description: JSON:API document. + properties: + data: + $ref: "#/components/schemas/RumArchiveSessionsSearchData" + required: + - data + type: object RumConfigAttributes: description: Attributes of the RUM configuration. properties: @@ -110090,6 +110438,19 @@ components: $ref: "#/components/schemas/RumExclusionFilterData" type: array type: object + RumManagedArchiveErrorResponse: + description: API error response. + properties: + errors: + description: Errors as plain-text messages or JSON:API error objects containing status, title, and detail. + example: + - Forbidden + items: + description: A plain-text message or a JSON:API error object. + type: array + required: + - errors + type: object RumMetricCompute: description: The compute rule to compute the RUM-based metric. It is set at creation and only `include_percentiles` can be updated afterward. properties: @@ -110448,6 +110809,753 @@ components: $ref: "#/components/schemas/RumPermanentRetentionFilterData" type: array type: object + RumRecoveredSession: + description: Progress for one targeted session. + properties: + application_id: + description: Application UUID. + example: a33671aa-24fd-4dcd-ba4b-5bbdbafe7690 + format: uuid + type: string + error_message: + description: Failure details, if present. + example: example + type: string + events_recovered: + description: Recovered event count. + example: 0 + format: int64 + minimum: 0 + type: integer + session_id: + description: Session identifier. + example: 00000000-0000-4000-8000-000000000001 + format: uuid + type: string + status: + $ref: "#/components/schemas/RumRecoverySessionStatus" + required: + - session_id + - application_id + - status + - events_recovered + type: object + RumRecoveryBatchCreateAttributes: + description: >- + Recover sessions selected by a query. The range cannot exceed 180 days; from cannot be more than 4 years ago and to cannot be more than 1 hour in the future. Session availability depends on the configured archive retention. + properties: + estimated_count: + description: >- + Optional client estimate. Creation validates and stores a fresh server estimate instead of this value. + example: 0 + format: int64 + minimum: 0 + type: integer + from: + description: Start of the range in Unix milliseconds. Must be positive and earlier than to. + example: 1789905600000 + format: int64 + minimum: 1 + type: integer + query: + description: RUM search query. Not blank, at most 4096 bytes for batch creation and count. + example: service:web + type: string + request_type: + $ref: "#/components/schemas/RumRecoveryBatchRequestType" + to: + description: End of the range in Unix milliseconds. + example: 1789992000000 + format: int64 + minimum: 1 + type: integer + required: + - request_type + - query + - from + - to + type: object + RumRecoveryBatchListAttributes: + description: >- + Batch recovery progress. Status updates can appear here before they appear in request details. + properties: + created_at: + description: Creation time. + example: "2026-09-21T12:00:00Z" + format: date-time + type: string + discovery_status: + $ref: "#/components/schemas/RumRecoveryDiscoveryStatus" + estimated_count: + description: >- + Batch estimate stored at creation, when present. New batches use a fresh server estimate; older batches may contain a client-supplied estimate. + example: 0 + format: int64 + minimum: 0 + type: integer + from: + description: Start of the range in Unix milliseconds. Must be positive and earlier than to. + example: 1789905600000 + format: int64 + minimum: 1 + type: integer + query: + description: RUM search query. Not blank, at most 4096 bytes for batch creation and count. + example: service:web + type: string + sessions_discovered: + description: Discovered sessions. + example: 0 + format: int64 + minimum: 0 + type: integer + sessions_failed: + description: Failed sessions. + example: 0 + format: int64 + minimum: 0 + type: integer + sessions_processed: + description: Processed sessions. + example: 0 + format: int64 + minimum: 0 + type: integer + slices_completed: + description: Completed slices. + example: 0 + format: int64 + minimum: 0 + type: integer + slices_failed: + description: Failed slices. + example: 0 + format: int64 + minimum: 0 + type: integer + status: + $ref: "#/components/schemas/RumRecoveryRequestStatus" + to: + description: End of the range in Unix milliseconds. + example: 1789992000000 + format: int64 + minimum: 1 + type: integer + total_slices: + description: Total discovery slices. + example: 0 + format: int64 + minimum: 0 + type: integer + updated_at: + description: Last update time. + example: "2026-09-21T12:00:00Z" + format: date-time + type: string + required: + - status + - discovery_status + - created_at + - updated_at + - query + - from + - to + - total_slices + - slices_completed + - slices_failed + - sessions_discovered + - sessions_processed + - sessions_failed + type: object + RumRecoveryBatchListData: + description: JSON:API resource. + properties: + attributes: + $ref: "#/components/schemas/RumRecoveryBatchListAttributes" + id: + description: Resource identifier. + example: 11111111-1111-4111-8111-111111111111 + type: string + type: + $ref: "#/components/schemas/RumRecoveryBatchListDataType" + required: + - id + - type + - attributes + type: object + RumRecoveryBatchListDataType: + description: JSON:API resource type. + enum: + - rum_batch_recovery_request + example: rum_batch_recovery_request + type: string + x-enum-varnames: + - RUM_BATCH_RECOVERY_REQUEST + RumRecoveryBatchListMeta: + description: Batch-list pagination metadata. + properties: + next_cursor: + description: Opaque next-page cursor. Omitted on the final page. + example: example + type: string + type: object + RumRecoveryBatchListResponse: + description: JSON:API document. + properties: + data: + description: >- + Batch requests ordered newest first. A filtered page can be empty while meta.next_cursor is present. + items: + $ref: "#/components/schemas/RumRecoveryBatchListData" + type: array + meta: + $ref: "#/components/schemas/RumRecoveryBatchListMeta" + required: + - data + - meta + type: object + RumRecoveryBatchRequestType: + description: Query-based batch recovery. + enum: + - batch + example: batch + type: string + x-enum-varnames: + - BATCH + RumRecoveryCancelAttributes: + description: Batch cancellation. + properties: + status: + $ref: "#/components/schemas/RumRecoveryCancelStatus" + required: + - status + type: object + RumRecoveryCancelData: + description: JSON:API resource. + properties: + attributes: + $ref: "#/components/schemas/RumRecoveryCancelAttributes" + id: + description: >- + Optional resource identifier. + example: 11111111-1111-4111-8111-111111111111 + type: string + type: + description: >- + JSON:API resource type. + example: rum_recovery_request + type: string + required: + - attributes + type: object + RumRecoveryCancelRequest: + description: JSON:API document. + properties: + data: + $ref: "#/components/schemas/RumRecoveryCancelData" + required: + - data + type: object + RumRecoveryCancelResponse: + description: JSON:API document. + properties: + data: + $ref: "#/components/schemas/RumRecoveryCancelResponseData" + required: + - data + type: object + RumRecoveryCancelResponseAttributes: + description: >- + Batch cancellation acknowledgment. + properties: + cancelled_at: + description: Cancellation time. + example: "2026-09-21T12:00:00Z" + format: date-time + type: string + cancelled_by: + description: Handle of the user who canceled the batch. + example: user@example.com + type: string + discovery_status: + $ref: "#/components/schemas/RumRecoveryDiscoveryStatus" + required: + - discovery_status + - cancelled_at + - cancelled_by + type: object + RumRecoveryCancelResponseData: + description: JSON:API resource. + properties: + attributes: + $ref: "#/components/schemas/RumRecoveryCancelResponseAttributes" + id: + description: Resource identifier. + example: 11111111-1111-4111-8111-111111111111 + type: string + type: + $ref: "#/components/schemas/RumRecoveryRequestType" + required: + - id + - type + - attributes + type: object + RumRecoveryCancelStatus: + description: Requested cancellation state. + enum: + - cancelled + example: cancelled + type: string + x-enum-varnames: + - CANCELLED + RumRecoveryCountAttributes: + description: >- + Query for a recovery estimate. The range cannot exceed 180 days; from cannot be more than 4 years ago and to cannot be more than 1 hour in the future. Session availability depends on the configured archive retention. + properties: + from: + description: Start of the range in Unix milliseconds. Must be positive and earlier than to. + example: 1789905600000 + format: int64 + minimum: 1 + type: integer + query: + description: RUM search query. Not blank, at most 4096 bytes for batch creation and count. + example: service:web + type: string + to: + description: End of the range in Unix milliseconds. + example: 1789992000000 + format: int64 + minimum: 1 + type: integer + required: + - query + - from + - to + type: object + RumRecoveryCountRequest: + description: JSON:API document. + properties: + data: + $ref: "#/components/schemas/RumRecoveryCountRequestData" + required: + - data + type: object + RumRecoveryCountRequestData: + description: JSON:API resource. + properties: + attributes: + $ref: "#/components/schemas/RumRecoveryCountAttributes" + id: + description: >- + Optional resource identifier. + example: 11111111-1111-4111-8111-111111111111 + type: string + type: + description: >- + JSON:API resource type. + example: rum_recovery_count + type: string + required: + - attributes + type: object + RumRecoveryCountResponse: + description: JSON:API document. + properties: + data: + $ref: "#/components/schemas/RumRecoveryCountResponseData" + required: + - data + type: object + RumRecoveryCountResponseAttributes: + description: Approximate recoverable count. + properties: + estimated_count: + description: >- + Estimated distinct recoverable sessions not already retained in hot storage. This can exceed max_recoverable_sessions. + example: 0 + format: int64 + minimum: 0 + type: integer + max_recoverable_sessions: + description: >- + Configured maximum estimated recoverable sessions per batch (100,000 by default). Estimates equal to this value are accepted at creation. + example: 100000 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + required: + - estimated_count + - max_recoverable_sessions + type: object + RumRecoveryCountResponseData: + description: JSON:API resource. + properties: + attributes: + $ref: "#/components/schemas/RumRecoveryCountResponseAttributes" + id: + description: Resource identifier. + example: count + type: string + type: + $ref: "#/components/schemas/RumRecoveryCountResponseDataType" + required: + - id + - type + - attributes + type: object + RumRecoveryCountResponseDataType: + description: JSON:API resource type. + enum: + - rum_recovery_count + example: rum_recovery_count + type: string + x-enum-varnames: + - RUM_RECOVERY_COUNT + RumRecoveryCreateAttributes: + description: Targeted recovery (the default) or query-based batch recovery. + oneOf: + - $ref: "#/components/schemas/RumRecoverySessionsCreateAttributes" + - $ref: "#/components/schemas/RumRecoveryBatchCreateAttributes" + RumRecoveryCreateData: + description: JSON:API resource. + properties: + attributes: + $ref: "#/components/schemas/RumRecoveryCreateAttributes" + type: + description: >- + JSON:API resource type. + example: rum_recovery_request + type: string + required: + - attributes + type: object + RumRecoveryCreateRequest: + description: JSON:API document. + properties: + data: + $ref: "#/components/schemas/RumRecoveryCreateData" + required: + - data + type: object + RumRecoveryCreateResponse: + description: JSON:API document. + properties: + data: + $ref: "#/components/schemas/RumRecoveryCreateResponseData" + required: + - data + type: object + RumRecoveryCreateResponseAttributes: + description: Accepted recovery request. + properties: + created_at: + description: Creation time. + example: "2026-09-21T12:00:00Z" + format: date-time + type: string + discovery_status: + $ref: "#/components/schemas/RumRecoveryDiscoveryStatus" + estimated_count: + description: >- + Batch estimate stored at creation, when present. New batches use a fresh server estimate; older batches may contain a client-supplied estimate. + example: 0 + format: int64 + minimum: 0 + type: integer + failed_sessions: + description: Failed session count. + example: 0 + format: int64 + minimum: 0 + type: integer + processed_sessions: + description: Processed session count. + example: 0 + format: int64 + minimum: 0 + type: integer + status: + $ref: "#/components/schemas/RumRecoveryRequestStatus" + total_sessions: + description: Total targeted sessions. Omitted while a batch total is unknown. + example: 0 + format: int64 + minimum: 0 + type: integer + required: + - status + - processed_sessions + - failed_sessions + - created_at + type: object + RumRecoveryCreateResponseData: + description: JSON:API resource. + properties: + attributes: + $ref: "#/components/schemas/RumRecoveryCreateResponseAttributes" + id: + description: Resource identifier. + example: 11111111-1111-4111-8111-111111111111 + type: string + type: + $ref: "#/components/schemas/RumRecoveryRequestType" + required: + - id + - type + - attributes + type: object + RumRecoveryDiscoveryStatus: + description: Batch discovery state. QUEUED indicates that the request is waiting for processing capacity. + enum: + - QUEUED + - PENDING + - SLICING + - DISCOVERED + - PROCESSING + - COMPLETED + - FAILED + - CANCELLED + example: QUEUED + type: string + x-enum-varnames: + - QUEUED + - PENDING + - SLICING + - DISCOVERED + - PROCESSING + - COMPLETED + - FAILED + - CANCELLED + RumRecoveryRequestAttributes: + description: >- + Recovery progress. Batch-only attributes are omitted for targeted requests; request_type is also omitted for targeted requests. + properties: + created_at: + description: Creation time. + example: "2026-09-21T12:00:00Z" + format: date-time + type: string + discovery_status: + $ref: "#/components/schemas/RumRecoveryDiscoveryStatus" + error_message: + description: Failure details, if present. + example: example + type: string + estimated_count: + description: >- + Batch estimate stored at creation, when present. New batches use a fresh server estimate; older batches may contain a client-supplied estimate. + example: 0 + format: int64 + minimum: 0 + type: integer + failed_sessions: + description: Failed session count. + example: 0 + format: int64 + minimum: 0 + type: integer + from: + description: Start of the range in Unix milliseconds. Must be positive and earlier than to. + example: 1789905600000 + format: int64 + minimum: 1 + type: integer + processed_sessions: + description: Processed session count. + example: 0 + format: int64 + minimum: 0 + type: integer + query: + description: RUM search query. Not blank, at most 4096 bytes for batch creation and count. + example: service:web + type: string + request_type: + $ref: "#/components/schemas/RumRecoveryBatchRequestType" + sessions: + description: Targeted session progress. Omitted when empty or not applicable. + items: + $ref: "#/components/schemas/RumRecoveredSession" + type: array + sessions_discovered: + description: Discovered sessions. + example: 0 + format: int64 + minimum: 0 + type: integer + sessions_failed: + description: Failed sessions. + example: 0 + format: int64 + minimum: 0 + type: integer + sessions_processed: + description: Processed sessions. + example: 0 + format: int64 + minimum: 0 + type: integer + slices_completed: + description: Completed slices. + example: 0 + format: int64 + minimum: 0 + type: integer + slices_failed: + description: Failed slices. + example: 0 + format: int64 + minimum: 0 + type: integer + status: + $ref: "#/components/schemas/RumRecoveryRequestStatus" + to: + description: End of the range in Unix milliseconds. + example: 1789992000000 + format: int64 + minimum: 1 + type: integer + total_sessions: + description: Total targeted sessions. Omitted while a batch total is unknown. + example: 0 + format: int64 + minimum: 0 + type: integer + total_slices: + description: Total discovery slices. + example: 0 + format: int64 + minimum: 0 + type: integer + updated_at: + description: Last update time. + example: "2026-09-21T12:00:00Z" + format: date-time + type: string + required: + - status + - processed_sessions + - failed_sessions + - created_at + - updated_at + type: object + RumRecoveryRequestData: + description: JSON:API resource. + properties: + attributes: + $ref: "#/components/schemas/RumRecoveryRequestAttributes" + id: + description: Resource identifier. + example: 11111111-1111-4111-8111-111111111111 + type: string + type: + $ref: "#/components/schemas/RumRecoveryRequestType" + required: + - id + - type + - attributes + type: object + RumRecoveryRequestResponse: + description: JSON:API document. + properties: + data: + $ref: "#/components/schemas/RumRecoveryRequestData" + required: + - data + type: object + RumRecoveryRequestStatus: + description: >- + Recovery request state. + enum: + - PENDING + - PROCESSING + - COMPLETED + - FAILED + - CANCELLED + - EXPIRED + example: PENDING + type: string + x-enum-varnames: + - PENDING + - PROCESSING + - COMPLETED + - FAILED + - CANCELLED + - EXPIRED + RumRecoveryRequestType: + description: JSON:API resource type. + enum: + - rum_recovery_request + example: rum_recovery_request + type: string + x-enum-varnames: + - RUM_RECOVERY_REQUEST + RumRecoverySessionInput: + description: Archived session to recover. + properties: + application_id: + description: Application UUID. + example: a33671aa-24fd-4dcd-ba4b-5bbdbafe7690 + format: uuid + type: string + session_id: + description: Session UUID. + example: 00000000-0000-4000-8000-000000000001 + format: uuid + type: string + required: + - application_id + - session_id + type: object + RumRecoverySessionStatus: + description: >- + Session availability or recovery state. `RECOVERED` indicates that the session is ready to query. + enum: + - AVAILABLE + - PENDING + - PROCESSING + - RECOVERED + - FAILED + - RETAINED + - EXPIRED + - CANCELLED + example: AVAILABLE + type: string + x-enum-varnames: + - AVAILABLE + - PENDING + - PROCESSING + - RECOVERED + - FAILED + - RETAINED + - EXPIRED + - CANCELLED + RumRecoverySessionsCreateAttributes: + description: Recover 1 to 100 explicit archived sessions. Session IDs must be unique within the request. + properties: + request_type: + $ref: "#/components/schemas/RumRecoverySessionsRequestType" + sessions: + description: Sessions to recover. + items: + $ref: "#/components/schemas/RumRecoverySessionInput" + maxItems: 100 + minItems: 1 + type: array + required: + - sessions + type: object + RumRecoverySessionsRequestType: + default: sessions + description: Targeted recovery. Omitted request_type defaults to sessions. + enum: + - sessions + example: sessions + type: string + x-enum-varnames: + - SESSIONS RumRetentionFilterAttributes: description: The object describing attributes of a RUM retention filter. properties: @@ -223944,6 +225052,306 @@ paths: 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/rum/config/archive: + get: + description: >- + Get the list of archive configurations for your organization. + operationId: ListRUMArchiveConfigs + parameters: + - description: Page number. + in: query + name: page[number] + required: false + schema: + default: 0 + format: int32 + maximum: 10000 + minimum: 0 + type: integer + - description: Configurations per page. + in: query + name: page[size] + required: false + schema: + default: 20 + format: int32 + maximum: 100 + minimum: 1 + type: integer + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + enabled: true + org_id: 123 + retention_days: 90 + updated_at: "2026-09-21T12:00:00Z" + updated_by: user@example.com + id: a33671aa-24fd-4dcd-ba4b-5bbdbafe7690 + type: rum_archive_config + meta: + page: + total_filtered_count: 1 + empty: + value: + data: [] + meta: + page: + total_filtered_count: 0 + schema: + $ref: "#/components/schemas/RumArchiveConfigListResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/RumManagedArchiveErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/RumManagedArchiveErrorResponse" + description: Forbidden + "429": + content: + application/json: + schema: + $ref: "#/components/schemas/RumManagedArchiveErrorResponse" + description: Too Many Requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List archive configurations + tags: + - RUM Managed Archives + /api/v2/rum/config/archive/{app_id}: + delete: + description: >- + Delete the archive configuration for a RUM application. Archived and recovered session data is not deleted. + operationId: DeleteRUMArchiveConfig + parameters: + - description: RUM application ID. + in: path + name: app_id + required: true + schema: + description: Application UUID. + example: a33671aa-24fd-4dcd-ba4b-5bbdbafe7690 + format: uuid + type: string + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/RumManagedArchiveErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/RumManagedArchiveErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + content: + application/json: + schema: + $ref: "#/components/schemas/RumManagedArchiveErrorResponse" + description: Too Many Requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Delete an archive configuration + tags: + - RUM Managed Archives + get: + description: >- + Get the archive configuration for a RUM application. + operationId: GetRUMArchiveConfig + parameters: + - description: RUM application ID. + in: path + name: app_id + required: true + schema: + description: Application UUID. + example: a33671aa-24fd-4dcd-ba4b-5bbdbafe7690 + format: uuid + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + enabled: true + org_id: 123 + retention_days: 90 + updated_at: "2026-09-21T12:00:00Z" + updated_by: user@example.com + id: a33671aa-24fd-4dcd-ba4b-5bbdbafe7690 + type: rum_archive_config + schema: + $ref: "#/components/schemas/RumArchiveConfigResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/RumManagedArchiveErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/RumManagedArchiveErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + content: + application/json: + schema: + $ref: "#/components/schemas/RumManagedArchiveErrorResponse" + description: Too Many Requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get an archive configuration + tags: + - RUM Managed Archives + put: + description: >- + Create or update the archive configuration for a RUM application. The application ID in the path must match `data.id`. Disabling archiving does not delete archived sessions. + operationId: UpdateRUMArchiveConfig + parameters: + - description: RUM application ID. Must match data.id for PUT. + in: path + name: app_id + required: true + schema: + description: Application UUID. + example: a33671aa-24fd-4dcd-ba4b-5bbdbafe7690 + format: uuid + type: string + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + enabled: true + retention_days: 90 + id: a33671aa-24fd-4dcd-ba4b-5bbdbafe7690 + type: rum_archive_config + disabled: + value: + data: + attributes: + enabled: false + id: a33671aa-24fd-4dcd-ba4b-5bbdbafe7690 + type: rum_archive_config + schema: + $ref: "#/components/schemas/RumArchiveConfigUpsertRequest" + description: JSON:API request body. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + enabled: true + org_id: 123 + retention_days: 90 + updated_at: "2026-09-21T12:00:00Z" + updated_by: user@example.com + id: a33671aa-24fd-4dcd-ba4b-5bbdbafe7690 + type: rum_archive_config + schema: + $ref: "#/components/schemas/RumArchiveConfigResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/RumManagedArchiveErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/RumManagedArchiveErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + content: + application/json: + schema: + $ref: "#/components/schemas/RumManagedArchiveErrorResponse" + description: Too Many Requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Create or update an archive configuration + tags: + - RUM Managed Archives + x-codegen-request-body-name: body /api/v2/rum/config/metrics: get: description: |- @@ -225822,6 +227230,690 @@ paths: 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/rum/recover/count: + post: + description: >- + Estimate the number of sessions available for batch recovery and return the configured maximum per batch. Estimates above the maximum are returned unchanged. Creation checks a fresh estimate, so the estimate can change between counting and creating a request. + operationId: GetRUMRecoverySessionCount + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + from: 1789905600000 + query: service:web + to: 1789992000000 + type: rum_recovery_count + schema: + $ref: "#/components/schemas/RumRecoveryCountRequest" + description: JSON:API request body. + required: true + responses: + "200": + content: + application/json: + examples: + above_maximum: + summary: A count above the batch maximum is still returned successfully + value: + data: + attributes: + estimated_count: 100001 + max_recoverable_sessions: 100000 + id: count + type: rum_recovery_count + default: + value: + data: + attributes: + estimated_count: 100 + max_recoverable_sessions: 100000 + id: count + type: rum_recovery_count + schema: + $ref: "#/components/schemas/RumRecoveryCountResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/RumManagedArchiveErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/RumManagedArchiveErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + content: + application/json: + schema: + $ref: "#/components/schemas/RumManagedArchiveErrorResponse" + description: Too Many Requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Estimate recoverable sessions + tags: + - RUM Recovery + x-codegen-request-body-name: body + /api/v2/rum/recover/requests: + get: + description: >- + List batch recovery requests for your organization. Set `type=batch`. Optional `from` and `to` bounds filter request creation time; `query` filters the queries stored on recovery requests. + + A filtered page can be empty or contain fewer than `limit` results and still include `meta.next_cursor`. Continue until the cursor is absent, keeping the filters unchanged between pages. + operationId: ListRUMRecoveryBatchRequests + parameters: + - description: Must equal batch. + in: query + name: type + required: true + schema: + $ref: "#/components/schemas/RumRecoveryBatchRequestType" + - description: >- + Page size. Omitted, zero, or negative values use 50; values above 100 are clamped to 100. Invalid integers return 400. + in: query + name: limit + required: false + schema: + default: 50 + format: int32 + maximum: 2147483647 + type: integer + - description: Opaque next-page cursor. Keep type, from, to, and query unchanged between pages. + in: query + name: cursor + required: false + schema: + type: string + - description: >- + Start of the request creation-time range in Unix milliseconds, inclusive. This filters created_at, not the time range of the sessions being recovered. Must be earlier than to when both are provided. + example: 1789905600000 + in: query + name: from + required: false + schema: + format: int64 + maximum: 253402300799999 + minimum: 1 + type: integer + - description: >- + End of the request creation-time range in Unix milliseconds, exclusive. This filters created_at, not the time range of the sessions being recovered. Must be later than from when both are provided. + example: 1789992000000 + in: query + name: to + required: false + schema: + format: int64 + maximum: 253402300799999 + minimum: 1 + type: integer + - description: >- + Filter recovery requests whose stored query selects matching facet values. Supports facet:value and facet:(A OR B) terms combined with AND, including * and ? wildcards in filter values. Attribute facets keep their leading @. At most 4096 bytes. Exclusions, repeated facets, free text, ranges, and OR between terms return 400. Stored queries that cannot be matched unambiguously are excluded. Blank values apply no query filter. + example: "service:checkout AND @usr.id:(123 OR 456)" + in: query + name: query + required: false + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + created_at: "2026-09-21T12:00:00Z" + discovery_status: PROCESSING + from: 1789905600000 + query: service:checkout + sessions_discovered: 84200 + sessions_failed: 0 + sessions_processed: 56000 + slices_completed: 8 + slices_failed: 0 + status: PROCESSING + to: 1789992000000 + total_slices: 12 + updated_at: "2026-09-21T12:05:00Z" + id: 11111111-1111-4111-8111-111111111111 + type: rum_batch_recovery_request + meta: {} + empty: + value: + data: [] + meta: {} + filtered_page: + summary: An empty filtered page with more history to scan + value: + data: [] + meta: + next_cursor: example + schema: + $ref: "#/components/schemas/RumRecoveryBatchListResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/RumManagedArchiveErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/RumManagedArchiveErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + content: + application/json: + schema: + $ref: "#/components/schemas/RumManagedArchiveErrorResponse" + description: Too Many Requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List batch recovery requests + tags: + - RUM Recovery + post: + description: >- + Start targeted or query-based batch recovery. Use the returned `data.id` to poll the recovery request for progress. Batch creation checks a fresh recoverable-session estimate against the configured maximum (100,000 by default), accepting estimates equal to the maximum. Use the count operation to check the current maximum; creation can still reject a changed estimate. Narrow the query or time range if the maximum is exceeded. + + + Creation is not idempotent. After an uncertain response, check session search or batch listing before retrying. + operationId: CreateRUMRecoveryRequest + requestBody: + content: + application/json: + examples: + batch: + value: + data: + attributes: + estimated_count: 100 + from: 1789905600000 + query: service:web + request_type: batch + to: 1789992000000 + type: rum_recovery_request + default: + value: + data: + attributes: + sessions: + - application_id: a33671aa-24fd-4dcd-ba4b-5bbdbafe7690 + session_id: 00000000-0000-4000-8000-000000000001 + type: rum_recovery_request + targeted: + value: + data: + attributes: + sessions: + - application_id: a33671aa-24fd-4dcd-ba4b-5bbdbafe7690 + session_id: 00000000-0000-4000-8000-000000000001 + type: rum_recovery_request + schema: + $ref: "#/components/schemas/RumRecoveryCreateRequest" + description: JSON:API request body. + required: true + responses: + "202": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2026-09-21T12:00:00Z" + failed_sessions: 0 + processed_sessions: 0 + status: PENDING + total_sessions: 1 + id: 11111111-1111-4111-8111-111111111111 + type: rum_recovery_request + pending_batch: + value: + data: + attributes: + created_at: "2026-09-21T12:00:00Z" + discovery_status: PENDING + estimated_count: 100 + failed_sessions: 0 + processed_sessions: 0 + status: PENDING + id: 11111111-1111-4111-8111-111111111111 + type: rum_recovery_request + queued_batch: + value: + data: + attributes: + created_at: "2026-09-21T12:00:00Z" + discovery_status: QUEUED + estimated_count: 100 + failed_sessions: 0 + processed_sessions: 0 + status: PENDING + id: 11111111-1111-4111-8111-111111111111 + type: rum_recovery_request + targeted: + value: + data: + attributes: + created_at: "2026-09-21T12:00:00Z" + failed_sessions: 0 + processed_sessions: 0 + status: PENDING + total_sessions: 1 + id: 11111111-1111-4111-8111-111111111111 + type: rum_recovery_request + schema: + $ref: "#/components/schemas/RumRecoveryCreateResponse" + description: Accepted + "400": + content: + application/json: + examples: + limit_exceeded: + summary: The server estimate exceeds the configured batch maximum + value: + errors: + - code: batch_recovery_limit_exceeded + detail: >- + Estimated recoverable sessions exceed the batch maximum. Narrow the query or time range. + meta: + estimated_count: 100001 + max_recoverable_sessions: 100000 + status: "400" + title: Bad Request + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/RumManagedArchiveErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/RumManagedArchiveErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: >- + Conflict. Targeted sessions are already retained, in flight, or previously failed, or a concurrent batch was created. + "429": + content: + application/json: + schema: + $ref: "#/components/schemas/RumManagedArchiveErrorResponse" + description: >- + Too many requests, or the batch recovery queue is full. + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Create a recovery request + tags: + - RUM Recovery + x-codegen-request-body-name: body + /api/v2/rum/recover/requests/{request_id}: + get: + description: >- + Get progress for a targeted or batch recovery request. A `COMPLETED` request can include failed sessions; check individual session statuses for targeted recovery. + operationId: GetRUMRecoveryRequest + parameters: + - description: Recovery request UUID. + in: path + name: request_id + required: true + schema: + description: Request identifier. + example: 11111111-1111-4111-8111-111111111111 + format: uuid + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2026-09-21T12:00:00Z" + failed_sessions: 0 + processed_sessions: 1 + sessions: + - application_id: a33671aa-24fd-4dcd-ba4b-5bbdbafe7690 + events_recovered: 17 + session_id: 00000000-0000-4000-8000-000000000001 + status: RECOVERED + status: COMPLETED + total_sessions: 1 + updated_at: "2026-09-21T12:00:00Z" + id: 11111111-1111-4111-8111-111111111111 + type: rum_recovery_request + targeted: + value: + data: + attributes: + created_at: "2026-09-21T12:00:00Z" + failed_sessions: 0 + processed_sessions: 1 + sessions: + - application_id: a33671aa-24fd-4dcd-ba4b-5bbdbafe7690 + events_recovered: 17 + session_id: 00000000-0000-4000-8000-000000000001 + status: RECOVERED + status: COMPLETED + total_sessions: 1 + updated_at: "2026-09-21T12:00:00Z" + id: 11111111-1111-4111-8111-111111111111 + type: rum_recovery_request + schema: + $ref: "#/components/schemas/RumRecoveryRequestResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/RumManagedArchiveErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/RumManagedArchiveErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + content: + application/json: + schema: + $ref: "#/components/schemas/RumManagedArchiveErrorResponse" + description: Too Many Requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get recovery request progress + tags: + - RUM Recovery + patch: + description: >- + Cancel pending work for a batch recovery request. Work already in progress can finish, and recovered data is not removed. Requests in a terminal state return `409`. + operationId: UpdateRUMRecoveryBatchRequest + parameters: + - description: Recovery request UUID. + in: path + name: request_id + required: true + schema: + description: Request identifier. + example: 11111111-1111-4111-8111-111111111111 + format: uuid + type: string + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + status: cancelled + type: rum_recovery_request + minimal: + value: + data: + attributes: + status: cancelled + schema: + $ref: "#/components/schemas/RumRecoveryCancelRequest" + description: JSON:API request body. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + cancelled_at: "2026-09-21T12:00:00Z" + cancelled_by: user@example.com + discovery_status: CANCELLED + id: 11111111-1111-4111-8111-111111111111 + type: rum_recovery_request + schema: + $ref: "#/components/schemas/RumRecoveryCancelResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/RumManagedArchiveErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/RumManagedArchiveErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Conflict + "429": + content: + application/json: + schema: + $ref: "#/components/schemas/RumManagedArchiveErrorResponse" + description: Too Many Requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Cancel a batch recovery request + tags: + - RUM Recovery + x-codegen-request-body-name: body + /api/v2/rum/recover/sessions: + post: + description: >- + Search archived RUM sessions. Use `meta.page.next_cursor` to retrieve the next page. + operationId: SearchRUMArchiveSessions + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + from: 1789905600000 + limit: 50 + query: service:web + to: 1789992000000 + type: rum_archive_sessions_request + schema: + $ref: "#/components/schemas/RumArchiveSessionsSearchRequest" + description: JSON:API request body. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + account_id: + anonymous_id: + application_id: a33671aa-24fd-4dcd-ba4b-5bbdbafe7690 + country: + recovery_status: + status: AVAILABLE + service: web + session_id: 00000000-0000-4000-8000-000000000001 + timestamp: 1789905600000 + user_id: + version: + id: 00000000-0000-4000-8000-000000000001 + type: rum_archive_session + meta: + page: + total_count: 1 + empty: + value: + data: [] + meta: + page: + total_count: 0 + recovered: + value: + data: + - attributes: + account_id: + anonymous_id: + application_id: a33671aa-24fd-4dcd-ba4b-5bbdbafe7690 + country: + recovery_status: + recovered_at: "2026-09-21T12:00:00Z" + request_id: 11111111-1111-4111-8111-111111111111 + status: RECOVERED + service: web + session_id: 00000000-0000-4000-8000-000000000001 + timestamp: 1789905600000 + user_id: + version: + id: 00000000-0000-4000-8000-000000000001 + type: rum_archive_session + meta: + page: + total_count: 1 + unavailable_status: + value: + data: + - attributes: + account_id: + anonymous_id: + application_id: a33671aa-24fd-4dcd-ba4b-5bbdbafe7690 + country: + recovery_status: + service: web + session_id: 00000000-0000-4000-8000-000000000001 + timestamp: 1789905600000 + user_id: + version: + id: 00000000-0000-4000-8000-000000000001 + type: rum_archive_session + meta: + page: + total_count: 1 + schema: + $ref: "#/components/schemas/RumArchiveSessionsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/RumManagedArchiveErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/RumManagedArchiveErrorResponse" + description: Forbidden + "429": + content: + application/json: + schema: + $ref: "#/components/schemas/RumManagedArchiveErrorResponse" + description: Too Many Requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Search archived sessions + tags: + - RUM Recovery + x-codegen-request-body-name: body /api/v2/rum/replay/playlists: get: description: List playlists. @@ -260494,12 +262586,24 @@ tags: - description: |- Get insights into the performance of your Real User Monitoring (RUM) applications over HTTP. See the [RUM & Session Replay page](https://docs.datadoghq.com/real_user_monitoring/) for more information name: RUM Insights + - description: >- + Configure Managed Archives for RUM applications. Your organization must have Managed Archives enabled. + + + Requires `rum_rehydration_filter_read` to list or get configurations, or `rum_rehydration_filter_write` to create, update, or delete them. + name: RUM Managed Archives - description: |- Manage [RUM Operations](https://docs.datadoghq.com/real_user_monitoring/), business transactions detected from RUM events through a configurable journey, and their links to journeys. See the [RUM & Session Replay page](https://docs.datadoghq.com/real_user_monitoring/) for more information. name: RUM Operations + - description: >- + Search archived RUM sessions and recover individual sessions or query-based batches. Your organization must have Managed Archives enabled. Creating, counting, listing, and canceling batches also require batch recovery enablement. + + + Requires `rum_rehydration_filter_read` for search and request details, or `rum_rehydration_index` to create, estimate recoverable sessions, list batches, or cancel recovery requests. + name: RUM Recovery - description: |- Manage [RUM SDK configurations](https://docs.datadoghq.com/real_user_monitoring/) delivered to RUM applications via Remote Configuration. externalDocs: diff --git a/examples/v2/rum-managed-archives/DeleteRUMArchiveConfig.java b/examples/v2/rum-managed-archives/DeleteRUMArchiveConfig.java new file mode 100644 index 00000000000..a131fa88e8f --- /dev/null +++ b/examples/v2/rum-managed-archives/DeleteRUMArchiveConfig.java @@ -0,0 +1,23 @@ +// Delete an archive configuration returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumManagedArchivesApi; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + RumManagedArchivesApi apiInstance = new RumManagedArchivesApi(defaultClient); + + try { + apiInstance.deleteRUMArchiveConfig(UUID.fromString("a33671aa-24fd-4dcd-ba4b-5bbdbafe7690")); + } catch (ApiException e) { + System.err.println("Exception when calling RumManagedArchivesApi#deleteRUMArchiveConfig"); + 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-managed-archives/GetRUMArchiveConfig.java b/examples/v2/rum-managed-archives/GetRUMArchiveConfig.java new file mode 100644 index 00000000000..5731fc62d84 --- /dev/null +++ b/examples/v2/rum-managed-archives/GetRUMArchiveConfig.java @@ -0,0 +1,26 @@ +// Get an archive configuration returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumManagedArchivesApi; +import com.datadog.api.client.v2.model.RumArchiveConfigResponse; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + RumManagedArchivesApi apiInstance = new RumManagedArchivesApi(defaultClient); + + try { + RumArchiveConfigResponse result = + apiInstance.getRUMArchiveConfig(UUID.fromString("a33671aa-24fd-4dcd-ba4b-5bbdbafe7690")); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumManagedArchivesApi#getRUMArchiveConfig"); + 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-managed-archives/ListRUMArchiveConfigs.java b/examples/v2/rum-managed-archives/ListRUMArchiveConfigs.java new file mode 100644 index 00000000000..71757da1715 --- /dev/null +++ b/examples/v2/rum-managed-archives/ListRUMArchiveConfigs.java @@ -0,0 +1,27 @@ +// List archive configurations returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumManagedArchivesApi; +import com.datadog.api.client.v2.api.RumManagedArchivesApi.ListRUMArchiveConfigsOptionalParameters; +import com.datadog.api.client.v2.model.RumArchiveConfigListResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + RumManagedArchivesApi apiInstance = new RumManagedArchivesApi(defaultClient); + + try { + RumArchiveConfigListResponse result = + apiInstance.listRUMArchiveConfigs( + new ListRUMArchiveConfigsOptionalParameters().pageNumber(0).pageSize(1)); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumManagedArchivesApi#listRUMArchiveConfigs"); + 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-managed-archives/UpdateRUMArchiveConfig.java b/examples/v2/rum-managed-archives/UpdateRUMArchiveConfig.java new file mode 100644 index 00000000000..9bfb19aeca0 --- /dev/null +++ b/examples/v2/rum-managed-archives/UpdateRUMArchiveConfig.java @@ -0,0 +1,40 @@ +// Create or update an archive configuration returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumManagedArchivesApi; +import com.datadog.api.client.v2.model.RumArchiveConfigResponse; +import com.datadog.api.client.v2.model.RumArchiveConfigType; +import com.datadog.api.client.v2.model.RumArchiveConfigUpsertAttributes; +import com.datadog.api.client.v2.model.RumArchiveConfigUpsertData; +import com.datadog.api.client.v2.model.RumArchiveConfigUpsertRequest; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + RumManagedArchivesApi apiInstance = new RumManagedArchivesApi(defaultClient); + + RumArchiveConfigUpsertRequest body = + new RumArchiveConfigUpsertRequest() + .data( + new RumArchiveConfigUpsertData() + .attributes( + new RumArchiveConfigUpsertAttributes().enabled(true).retentionDays(90)) + .id("a33671aa-24fd-4dcd-ba4b-5bbdbafe7690") + .type(RumArchiveConfigType.RUM_ARCHIVE_CONFIG)); + + try { + RumArchiveConfigResponse result = + apiInstance.updateRUMArchiveConfig( + UUID.fromString("a33671aa-24fd-4dcd-ba4b-5bbdbafe7690"), body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumManagedArchivesApi#updateRUMArchiveConfig"); + 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-recovery/CreateRUMRecoveryRequest.java b/examples/v2/rum-recovery/CreateRUMRecoveryRequest.java new file mode 100644 index 00000000000..89cdffaa9e3 --- /dev/null +++ b/examples/v2/rum-recovery/CreateRUMRecoveryRequest.java @@ -0,0 +1,51 @@ +// Create a recovery request returns "Accepted" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumRecoveryApi; +import com.datadog.api.client.v2.model.RumRecoveryCreateAttributes; +import com.datadog.api.client.v2.model.RumRecoveryCreateData; +import com.datadog.api.client.v2.model.RumRecoveryCreateRequest; +import com.datadog.api.client.v2.model.RumRecoveryCreateResponse; +import com.datadog.api.client.v2.model.RumRecoverySessionInput; +import com.datadog.api.client.v2.model.RumRecoverySessionsCreateAttributes; +import com.datadog.api.client.v2.model.RumRecoverySessionsRequestType; +import java.util.Collections; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + RumRecoveryApi apiInstance = new RumRecoveryApi(defaultClient); + + RumRecoveryCreateRequest body = + new RumRecoveryCreateRequest() + .data( + new RumRecoveryCreateData() + .attributes( + new RumRecoveryCreateAttributes( + new RumRecoverySessionsCreateAttributes() + .requestType(RumRecoverySessionsRequestType.SESSIONS) + .sessions( + Collections.singletonList( + new RumRecoverySessionInput() + .applicationId( + UUID.fromString( + "a33671aa-24fd-4dcd-ba4b-5bbdbafe7690")) + .sessionId( + UUID.fromString( + "00000000-0000-4000-8000-000000000001")))))) + .type("rum_recovery_request")); + + try { + RumRecoveryCreateResponse result = apiInstance.createRUMRecoveryRequest(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumRecoveryApi#createRUMRecoveryRequest"); + 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-recovery/GetRUMRecoveryRequest.java b/examples/v2/rum-recovery/GetRUMRecoveryRequest.java new file mode 100644 index 00000000000..c9f2251923b --- /dev/null +++ b/examples/v2/rum-recovery/GetRUMRecoveryRequest.java @@ -0,0 +1,27 @@ +// Get recovery request progress returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumRecoveryApi; +import com.datadog.api.client.v2.model.RumRecoveryRequestResponse; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + RumRecoveryApi apiInstance = new RumRecoveryApi(defaultClient); + + try { + RumRecoveryRequestResponse result = + apiInstance.getRUMRecoveryRequest( + UUID.fromString("11111111-1111-4111-8111-111111111111")); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumRecoveryApi#getRUMRecoveryRequest"); + 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-recovery/GetRUMRecoverySessionCount.java b/examples/v2/rum-recovery/GetRUMRecoverySessionCount.java new file mode 100644 index 00000000000..ade02977251 --- /dev/null +++ b/examples/v2/rum-recovery/GetRUMRecoverySessionCount.java @@ -0,0 +1,39 @@ +// Estimate recoverable sessions returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumRecoveryApi; +import com.datadog.api.client.v2.model.RumRecoveryCountAttributes; +import com.datadog.api.client.v2.model.RumRecoveryCountRequest; +import com.datadog.api.client.v2.model.RumRecoveryCountRequestData; +import com.datadog.api.client.v2.model.RumRecoveryCountResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + RumRecoveryApi apiInstance = new RumRecoveryApi(defaultClient); + + RumRecoveryCountRequest body = + new RumRecoveryCountRequest() + .data( + new RumRecoveryCountRequestData() + .attributes( + new RumRecoveryCountAttributes() + .from(1789905600000L) + .query("service:web") + .to(1789992000000L)) + .id("11111111-1111-4111-8111-111111111111") + .type("rum_recovery_count")); + + try { + RumRecoveryCountResponse result = apiInstance.getRUMRecoverySessionCount(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumRecoveryApi#getRUMRecoverySessionCount"); + 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-recovery/GetRUMRecoverySessionCount_4221178610.java b/examples/v2/rum-recovery/GetRUMRecoverySessionCount_4221178610.java new file mode 100644 index 00000000000..c9677ef781c --- /dev/null +++ b/examples/v2/rum-recovery/GetRUMRecoverySessionCount_4221178610.java @@ -0,0 +1,38 @@ +// Count recoverable sessions accepts exactly 180 days + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumRecoveryApi; +import com.datadog.api.client.v2.model.RumRecoveryCountAttributes; +import com.datadog.api.client.v2.model.RumRecoveryCountRequest; +import com.datadog.api.client.v2.model.RumRecoveryCountRequestData; +import com.datadog.api.client.v2.model.RumRecoveryCountResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + RumRecoveryApi apiInstance = new RumRecoveryApi(defaultClient); + + RumRecoveryCountRequest body = + new RumRecoveryCountRequest() + .data( + new RumRecoveryCountRequestData() + .type("rum_recovery_count") + .attributes( + new RumRecoveryCountAttributes() + .query("service:rum18600-fixture") + .from(1621077071000L) + .to(1636629071000L))); + + try { + RumRecoveryCountResponse result = apiInstance.getRUMRecoverySessionCount(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumRecoveryApi#getRUMRecoverySessionCount"); + 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-recovery/ListRUMRecoveryBatchRequests.java b/examples/v2/rum-recovery/ListRUMRecoveryBatchRequests.java new file mode 100644 index 00000000000..85dc5638a24 --- /dev/null +++ b/examples/v2/rum-recovery/ListRUMRecoveryBatchRequests.java @@ -0,0 +1,26 @@ +// List batch recovery requests returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumRecoveryApi; +import com.datadog.api.client.v2.model.RumRecoveryBatchListResponse; +import com.datadog.api.client.v2.model.RumRecoveryBatchRequestType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + RumRecoveryApi apiInstance = new RumRecoveryApi(defaultClient); + + try { + RumRecoveryBatchListResponse result = + apiInstance.listRUMRecoveryBatchRequests(RumRecoveryBatchRequestType.BATCH); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumRecoveryApi#listRUMRecoveryBatchRequests"); + 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-recovery/ListRUMRecoveryBatchRequests_2586058226.java b/examples/v2/rum-recovery/ListRUMRecoveryBatchRequests_2586058226.java new file mode 100644 index 00000000000..183de52c4d8 --- /dev/null +++ b/examples/v2/rum-recovery/ListRUMRecoveryBatchRequests_2586058226.java @@ -0,0 +1,32 @@ +// List batch history filters request creation time independently of session time + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumRecoveryApi; +import com.datadog.api.client.v2.api.RumRecoveryApi.ListRUMRecoveryBatchRequestsOptionalParameters; +import com.datadog.api.client.v2.model.RumRecoveryBatchListResponse; +import com.datadog.api.client.v2.model.RumRecoveryBatchRequestType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + RumRecoveryApi apiInstance = new RumRecoveryApi(defaultClient); + + try { + RumRecoveryBatchListResponse result = + apiInstance.listRUMRecoveryBatchRequests( + RumRecoveryBatchRequestType.BATCH, + new ListRUMRecoveryBatchRequestsOptionalParameters() + .from(1L) + .to(2L) + .query("service:rum18600-fixture AND @usr.id:(123 OR 456)")); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumRecoveryApi#listRUMRecoveryBatchRequests"); + 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-recovery/SearchRUMArchiveSessions.java b/examples/v2/rum-recovery/SearchRUMArchiveSessions.java new file mode 100644 index 00000000000..957fcfa7ece --- /dev/null +++ b/examples/v2/rum-recovery/SearchRUMArchiveSessions.java @@ -0,0 +1,42 @@ +// Search archived sessions returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumRecoveryApi; +import com.datadog.api.client.v2.model.RumArchiveSessionsResponse; +import com.datadog.api.client.v2.model.RumArchiveSessionsSearchAttributes; +import com.datadog.api.client.v2.model.RumArchiveSessionsSearchData; +import com.datadog.api.client.v2.model.RumArchiveSessionsSearchRequest; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + RumRecoveryApi apiInstance = new RumRecoveryApi(defaultClient); + + RumArchiveSessionsSearchRequest body = + new RumArchiveSessionsSearchRequest() + .data( + new RumArchiveSessionsSearchData() + .attributes( + new RumArchiveSessionsSearchAttributes() + .cursor("example") + .from(1789905600000L) + .hideRetained(false) + .limit(0) + .query("service:web") + .to(1789992000000L)) + .id("11111111-1111-4111-8111-111111111111") + .type("rum_archive_sessions_request")); + + try { + RumArchiveSessionsResponse result = apiInstance.searchRUMArchiveSessions(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumRecoveryApi#searchRUMArchiveSessions"); + 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-recovery/SearchRUMArchiveSessions_3394116303.java b/examples/v2/rum-recovery/SearchRUMArchiveSessions_3394116303.java new file mode 100644 index 00000000000..cc475f45479 --- /dev/null +++ b/examples/v2/rum-recovery/SearchRUMArchiveSessions_3394116303.java @@ -0,0 +1,39 @@ +// Search archived sessions returns canonical data and first-page metadata + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumRecoveryApi; +import com.datadog.api.client.v2.model.RumArchiveSessionsResponse; +import com.datadog.api.client.v2.model.RumArchiveSessionsSearchAttributes; +import com.datadog.api.client.v2.model.RumArchiveSessionsSearchData; +import com.datadog.api.client.v2.model.RumArchiveSessionsSearchRequest; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + RumRecoveryApi apiInstance = new RumRecoveryApi(defaultClient); + + RumArchiveSessionsSearchRequest body = + new RumArchiveSessionsSearchRequest() + .data( + new RumArchiveSessionsSearchData() + .type("rum_archive_sessions_request") + .attributes( + new RumArchiveSessionsSearchAttributes() + .query("service:rum18600-fixture") + .from(1636024271000L) + .to(1636629071000L) + .limit(1))); + + try { + RumArchiveSessionsResponse result = apiInstance.searchRUMArchiveSessions(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumRecoveryApi#searchRUMArchiveSessions"); + 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-recovery/UpdateRUMRecoveryBatchRequest.java b/examples/v2/rum-recovery/UpdateRUMRecoveryBatchRequest.java new file mode 100644 index 00000000000..01b66625fb0 --- /dev/null +++ b/examples/v2/rum-recovery/UpdateRUMRecoveryBatchRequest.java @@ -0,0 +1,40 @@ +// Cancel a batch recovery request returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumRecoveryApi; +import com.datadog.api.client.v2.model.RumRecoveryCancelAttributes; +import com.datadog.api.client.v2.model.RumRecoveryCancelData; +import com.datadog.api.client.v2.model.RumRecoveryCancelRequest; +import com.datadog.api.client.v2.model.RumRecoveryCancelResponse; +import com.datadog.api.client.v2.model.RumRecoveryCancelStatus; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + RumRecoveryApi apiInstance = new RumRecoveryApi(defaultClient); + + RumRecoveryCancelRequest body = + new RumRecoveryCancelRequest() + .data( + new RumRecoveryCancelData() + .attributes( + new RumRecoveryCancelAttributes().status(RumRecoveryCancelStatus.CANCELLED)) + .id("11111111-1111-4111-8111-111111111111") + .type("rum_recovery_request")); + + try { + RumRecoveryCancelResponse result = + apiInstance.updateRUMRecoveryBatchRequest( + UUID.fromString("11111111-1111-4111-8111-111111111111"), body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumRecoveryApi#updateRUMRecoveryBatchRequest"); + 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/v2/api/RumManagedArchivesApi.java b/src/main/java/com/datadog/api/client/v2/api/RumManagedArchivesApi.java new file mode 100644 index 00000000000..7ff0afa811c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/RumManagedArchivesApi.java @@ -0,0 +1,668 @@ +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.RumArchiveConfigListResponse; +import com.datadog.api.client.v2.model.RumArchiveConfigResponse; +import com.datadog.api.client.v2.model.RumArchiveConfigUpsertRequest; +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.UUID; +import java.util.concurrent.CompletableFuture; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumManagedArchivesApi { + private ApiClient apiClient; + + public RumManagedArchivesApi() { + this(ApiClient.getDefaultApiClient()); + } + + public RumManagedArchivesApi(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; + } + + /** + * Delete an archive configuration. + * + *

See {@link #deleteRUMArchiveConfigWithHttpInfo}. + * + * @param appId RUM application ID. (required) + * @throws ApiException if fails to make API call + */ + public void deleteRUMArchiveConfig(UUID appId) throws ApiException { + deleteRUMArchiveConfigWithHttpInfo(appId); + } + + /** + * Delete an archive configuration. + * + *

See {@link #deleteRUMArchiveConfigWithHttpInfoAsync}. + * + * @param appId RUM application ID. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteRUMArchiveConfigAsync(UUID appId) { + return deleteRUMArchiveConfigWithHttpInfoAsync(appId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete the archive configuration for a RUM application. Archived and recovered session data is + * not deleted. + * + * @param appId RUM application ID. (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too Many Requests -
+ */ + public ApiResponse deleteRUMArchiveConfigWithHttpInfo(UUID appId) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException( + 400, "Missing the required parameter 'appId' when calling deleteRUMArchiveConfig"); + } + // create path and map variables + String localVarPath = + "/api/v2/rum/config/archive/{app_id}" + .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumManagedArchivesApi.deleteRUMArchiveConfig", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete an archive configuration. + * + *

See {@link #deleteRUMArchiveConfigWithHttpInfo}. + * + * @param appId RUM application ID. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteRUMArchiveConfigWithHttpInfoAsync(UUID appId) { + Object localVarPostBody = null; + + // verify the required parameter 'appId' is set + if (appId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'appId' when calling deleteRUMArchiveConfig")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/rum/config/archive/{app_id}" + .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumManagedArchivesApi.deleteRUMArchiveConfig", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Get an archive configuration. + * + *

See {@link #getRUMArchiveConfigWithHttpInfo}. + * + * @param appId RUM application ID. (required) + * @return RumArchiveConfigResponse + * @throws ApiException if fails to make API call + */ + public RumArchiveConfigResponse getRUMArchiveConfig(UUID appId) throws ApiException { + return getRUMArchiveConfigWithHttpInfo(appId).getData(); + } + + /** + * Get an archive configuration. + * + *

See {@link #getRUMArchiveConfigWithHttpInfoAsync}. + * + * @param appId RUM application ID. (required) + * @return CompletableFuture<RumArchiveConfigResponse> + */ + public CompletableFuture getRUMArchiveConfigAsync(UUID appId) { + return getRUMArchiveConfigWithHttpInfoAsync(appId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the archive configuration for a RUM application. + * + * @param appId RUM application ID. (required) + * @return ApiResponse<RumArchiveConfigResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too Many Requests -
+ */ + public ApiResponse getRUMArchiveConfigWithHttpInfo(UUID appId) + throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException( + 400, "Missing the required parameter 'appId' when calling getRUMArchiveConfig"); + } + // create path and map variables + String localVarPath = + "/api/v2/rum/config/archive/{app_id}" + .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumManagedArchivesApi.getRUMArchiveConfig", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get an archive configuration. + * + *

See {@link #getRUMArchiveConfigWithHttpInfo}. + * + * @param appId RUM application ID. (required) + * @return CompletableFuture<ApiResponse<RumArchiveConfigResponse>> + */ + public CompletableFuture> + getRUMArchiveConfigWithHttpInfoAsync(UUID appId) { + Object localVarPostBody = null; + + // verify the required parameter 'appId' is set + if (appId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'appId' when calling getRUMArchiveConfig")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/rum/config/archive/{app_id}" + .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumManagedArchivesApi.getRUMArchiveConfig", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } 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 listRUMArchiveConfigs. */ + public static class ListRUMArchiveConfigsOptionalParameters { + private Integer pageNumber; + private Integer pageSize; + + /** + * Set pageNumber. + * + * @param pageNumber Page number. (optional, default to 0) + * @return ListRUMArchiveConfigsOptionalParameters + */ + public ListRUMArchiveConfigsOptionalParameters pageNumber(Integer pageNumber) { + this.pageNumber = pageNumber; + return this; + } + + /** + * Set pageSize. + * + * @param pageSize Configurations per page. (optional, default to 20) + * @return ListRUMArchiveConfigsOptionalParameters + */ + public ListRUMArchiveConfigsOptionalParameters pageSize(Integer pageSize) { + this.pageSize = pageSize; + return this; + } + } + + /** + * List archive configurations. + * + *

See {@link #listRUMArchiveConfigsWithHttpInfo}. + * + * @return RumArchiveConfigListResponse + * @throws ApiException if fails to make API call + */ + public RumArchiveConfigListResponse listRUMArchiveConfigs() throws ApiException { + return listRUMArchiveConfigsWithHttpInfo(new ListRUMArchiveConfigsOptionalParameters()) + .getData(); + } + + /** + * List archive configurations. + * + *

See {@link #listRUMArchiveConfigsWithHttpInfoAsync}. + * + * @return CompletableFuture<RumArchiveConfigListResponse> + */ + public CompletableFuture listRUMArchiveConfigsAsync() { + return listRUMArchiveConfigsWithHttpInfoAsync(new ListRUMArchiveConfigsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List archive configurations. + * + *

See {@link #listRUMArchiveConfigsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return RumArchiveConfigListResponse + * @throws ApiException if fails to make API call + */ + public RumArchiveConfigListResponse listRUMArchiveConfigs( + ListRUMArchiveConfigsOptionalParameters parameters) throws ApiException { + return listRUMArchiveConfigsWithHttpInfo(parameters).getData(); + } + + /** + * List archive configurations. + * + *

See {@link #listRUMArchiveConfigsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<RumArchiveConfigListResponse> + */ + public CompletableFuture listRUMArchiveConfigsAsync( + ListRUMArchiveConfigsOptionalParameters parameters) { + return listRUMArchiveConfigsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the list of archive configurations for your organization. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<RumArchiveConfigListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too Many Requests -
+ */ + public ApiResponse listRUMArchiveConfigsWithHttpInfo( + ListRUMArchiveConfigsOptionalParameters parameters) throws ApiException { + Object localVarPostBody = null; + Integer pageNumber = parameters.pageNumber; + Integer pageSize = parameters.pageSize; + // create path and map variables + String localVarPath = "/api/v2/rum/config/archive"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumManagedArchivesApi.listRUMArchiveConfigs", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List archive configurations. + * + *

See {@link #listRUMArchiveConfigsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<RumArchiveConfigListResponse>> + */ + public CompletableFuture> + listRUMArchiveConfigsWithHttpInfoAsync(ListRUMArchiveConfigsOptionalParameters parameters) { + Object localVarPostBody = null; + Integer pageNumber = parameters.pageNumber; + Integer pageSize = parameters.pageSize; + // create path and map variables + String localVarPath = "/api/v2/rum/config/archive"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumManagedArchivesApi.listRUMArchiveConfigs", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } 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() {}); + } + + /** + * Create or update an archive configuration. + * + *

See {@link #updateRUMArchiveConfigWithHttpInfo}. + * + * @param appId RUM application ID. Must match data.id for PUT. (required) + * @param body JSON:API request body. (required) + * @return RumArchiveConfigResponse + * @throws ApiException if fails to make API call + */ + public RumArchiveConfigResponse updateRUMArchiveConfig( + UUID appId, RumArchiveConfigUpsertRequest body) throws ApiException { + return updateRUMArchiveConfigWithHttpInfo(appId, body).getData(); + } + + /** + * Create or update an archive configuration. + * + *

See {@link #updateRUMArchiveConfigWithHttpInfoAsync}. + * + * @param appId RUM application ID. Must match data.id for PUT. (required) + * @param body JSON:API request body. (required) + * @return CompletableFuture<RumArchiveConfigResponse> + */ + public CompletableFuture updateRUMArchiveConfigAsync( + UUID appId, RumArchiveConfigUpsertRequest body) { + return updateRUMArchiveConfigWithHttpInfoAsync(appId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create or update the archive configuration for a RUM application. The application ID in the + * path must match data.id. Disabling archiving does not delete archived sessions. + * + * @param appId RUM application ID. Must match data.id for PUT. (required) + * @param body JSON:API request body. (required) + * @return ApiResponse<RumArchiveConfigResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too Many Requests -
+ */ + public ApiResponse updateRUMArchiveConfigWithHttpInfo( + UUID appId, RumArchiveConfigUpsertRequest body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException( + 400, "Missing the required parameter 'appId' when calling updateRUMArchiveConfig"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateRUMArchiveConfig"); + } + // create path and map variables + String localVarPath = + "/api/v2/rum/config/archive/{app_id}" + .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumManagedArchivesApi.updateRUMArchiveConfig", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create or update an archive configuration. + * + *

See {@link #updateRUMArchiveConfigWithHttpInfo}. + * + * @param appId RUM application ID. Must match data.id for PUT. (required) + * @param body JSON:API request body. (required) + * @return CompletableFuture<ApiResponse<RumArchiveConfigResponse>> + */ + public CompletableFuture> + updateRUMArchiveConfigWithHttpInfoAsync(UUID appId, RumArchiveConfigUpsertRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'appId' is set + if (appId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'appId' when calling updateRUMArchiveConfig")); + 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 updateRUMArchiveConfig")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/rum/config/archive/{app_id}" + .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumManagedArchivesApi.updateRUMArchiveConfig", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/api/RumRecoveryApi.java b/src/main/java/com/datadog/api/client/v2/api/RumRecoveryApi.java new file mode 100644 index 00000000000..5aa057d7ae1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/RumRecoveryApi.java @@ -0,0 +1,1061 @@ +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.RumArchiveSessionsResponse; +import com.datadog.api.client.v2.model.RumArchiveSessionsSearchRequest; +import com.datadog.api.client.v2.model.RumRecoveryBatchListResponse; +import com.datadog.api.client.v2.model.RumRecoveryBatchRequestType; +import com.datadog.api.client.v2.model.RumRecoveryCancelRequest; +import com.datadog.api.client.v2.model.RumRecoveryCancelResponse; +import com.datadog.api.client.v2.model.RumRecoveryCountRequest; +import com.datadog.api.client.v2.model.RumRecoveryCountResponse; +import com.datadog.api.client.v2.model.RumRecoveryCreateRequest; +import com.datadog.api.client.v2.model.RumRecoveryCreateResponse; +import com.datadog.api.client.v2.model.RumRecoveryRequestResponse; +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.UUID; +import java.util.concurrent.CompletableFuture; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRecoveryApi { + private ApiClient apiClient; + + public RumRecoveryApi() { + this(ApiClient.getDefaultApiClient()); + } + + public RumRecoveryApi(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; + } + + /** + * Create a recovery request. + * + *

See {@link #createRUMRecoveryRequestWithHttpInfo}. + * + * @param body JSON:API request body. (required) + * @return RumRecoveryCreateResponse + * @throws ApiException if fails to make API call + */ + public RumRecoveryCreateResponse createRUMRecoveryRequest(RumRecoveryCreateRequest body) + throws ApiException { + return createRUMRecoveryRequestWithHttpInfo(body).getData(); + } + + /** + * Create a recovery request. + * + *

See {@link #createRUMRecoveryRequestWithHttpInfoAsync}. + * + * @param body JSON:API request body. (required) + * @return CompletableFuture<RumRecoveryCreateResponse> + */ + public CompletableFuture createRUMRecoveryRequestAsync( + RumRecoveryCreateRequest body) { + return createRUMRecoveryRequestWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Start targeted or query-based batch recovery. Use the returned data.id to poll the + * recovery request for progress. Batch creation checks a fresh recoverable-session estimate + * against the configured maximum (100,000 by default), accepting estimates equal to the maximum. + * Use the count operation to check the current maximum; creation can still reject a changed + * estimate. Narrow the query or time range if the maximum is exceeded. + * + *

Creation is not idempotent. After an uncertain response, check session search or batch + * listing before retrying. + * + * @param body JSON:API request body. (required) + * @return ApiResponse<RumRecoveryCreateResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
202 Accepted -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict. Targeted sessions are already retained, in flight, or previously failed, or a concurrent batch was created. -
429 Too many requests, or the batch recovery queue is full. -
+ */ + public ApiResponse createRUMRecoveryRequestWithHttpInfo( + RumRecoveryCreateRequest body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createRUMRecoveryRequest"); + } + // create path and map variables + String localVarPath = "/api/v2/rum/recover/requests"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumRecoveryApi.createRUMRecoveryRequest", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create a recovery request. + * + *

See {@link #createRUMRecoveryRequestWithHttpInfo}. + * + * @param body JSON:API request body. (required) + * @return CompletableFuture<ApiResponse<RumRecoveryCreateResponse>> + */ + public CompletableFuture> + createRUMRecoveryRequestWithHttpInfoAsync(RumRecoveryCreateRequest body) { + Object localVarPostBody = body; + + // 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 createRUMRecoveryRequest")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/rum/recover/requests"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumRecoveryApi.createRUMRecoveryRequest", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } 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() {}); + } + + /** + * Get recovery request progress. + * + *

See {@link #getRUMRecoveryRequestWithHttpInfo}. + * + * @param requestId Recovery request UUID. (required) + * @return RumRecoveryRequestResponse + * @throws ApiException if fails to make API call + */ + public RumRecoveryRequestResponse getRUMRecoveryRequest(UUID requestId) throws ApiException { + return getRUMRecoveryRequestWithHttpInfo(requestId).getData(); + } + + /** + * Get recovery request progress. + * + *

See {@link #getRUMRecoveryRequestWithHttpInfoAsync}. + * + * @param requestId Recovery request UUID. (required) + * @return CompletableFuture<RumRecoveryRequestResponse> + */ + public CompletableFuture getRUMRecoveryRequestAsync(UUID requestId) { + return getRUMRecoveryRequestWithHttpInfoAsync(requestId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get progress for a targeted or batch recovery request. A COMPLETED request can + * include failed sessions; check individual session statuses for targeted recovery. + * + * @param requestId Recovery request UUID. (required) + * @return ApiResponse<RumRecoveryRequestResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too Many Requests -
+ */ + public ApiResponse getRUMRecoveryRequestWithHttpInfo(UUID requestId) + throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'requestId' is set + if (requestId == null) { + throw new ApiException( + 400, "Missing the required parameter 'requestId' when calling getRUMRecoveryRequest"); + } + // create path and map variables + String localVarPath = + "/api/v2/rum/recover/requests/{request_id}" + .replaceAll("\\{" + "request_id" + "\\}", apiClient.escapeString(requestId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumRecoveryApi.getRUMRecoveryRequest", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get recovery request progress. + * + *

See {@link #getRUMRecoveryRequestWithHttpInfo}. + * + * @param requestId Recovery request UUID. (required) + * @return CompletableFuture<ApiResponse<RumRecoveryRequestResponse>> + */ + public CompletableFuture> + getRUMRecoveryRequestWithHttpInfoAsync(UUID requestId) { + Object localVarPostBody = null; + + // verify the required parameter 'requestId' is set + if (requestId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'requestId' when calling getRUMRecoveryRequest")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/rum/recover/requests/{request_id}" + .replaceAll("\\{" + "request_id" + "\\}", apiClient.escapeString(requestId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumRecoveryApi.getRUMRecoveryRequest", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } 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() {}); + } + + /** + * Estimate recoverable sessions. + * + *

See {@link #getRUMRecoverySessionCountWithHttpInfo}. + * + * @param body JSON:API request body. (required) + * @return RumRecoveryCountResponse + * @throws ApiException if fails to make API call + */ + public RumRecoveryCountResponse getRUMRecoverySessionCount(RumRecoveryCountRequest body) + throws ApiException { + return getRUMRecoverySessionCountWithHttpInfo(body).getData(); + } + + /** + * Estimate recoverable sessions. + * + *

See {@link #getRUMRecoverySessionCountWithHttpInfoAsync}. + * + * @param body JSON:API request body. (required) + * @return CompletableFuture<RumRecoveryCountResponse> + */ + public CompletableFuture getRUMRecoverySessionCountAsync( + RumRecoveryCountRequest body) { + return getRUMRecoverySessionCountWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Estimate the number of sessions available for batch recovery and return the configured maximum + * per batch. Estimates above the maximum are returned unchanged. Creation checks a fresh + * estimate, so the estimate can change between counting and creating a request. + * + * @param body JSON:API request body. (required) + * @return ApiResponse<RumRecoveryCountResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too Many Requests -
+ */ + public ApiResponse getRUMRecoverySessionCountWithHttpInfo( + RumRecoveryCountRequest body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling getRUMRecoverySessionCount"); + } + // create path and map variables + String localVarPath = "/api/v2/rum/recover/count"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumRecoveryApi.getRUMRecoverySessionCount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Estimate recoverable sessions. + * + *

See {@link #getRUMRecoverySessionCountWithHttpInfo}. + * + * @param body JSON:API request body. (required) + * @return CompletableFuture<ApiResponse<RumRecoveryCountResponse>> + */ + public CompletableFuture> + getRUMRecoverySessionCountWithHttpInfoAsync(RumRecoveryCountRequest body) { + Object localVarPostBody = body; + + // 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 getRUMRecoverySessionCount")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/rum/recover/count"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumRecoveryApi.getRUMRecoverySessionCount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } 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() {}); + } + + /** Manage optional parameters to listRUMRecoveryBatchRequests. */ + public static class ListRUMRecoveryBatchRequestsOptionalParameters { + private Integer limit; + private String cursor; + private Long from; + private Long to; + private String query; + + /** + * Set limit. + * + * @param limit Page size. Omitted, zero, or negative values use 50; values above 100 are + * clamped to 100. Invalid integers return 400. (optional, default to 50) + * @return ListRUMRecoveryBatchRequestsOptionalParameters + */ + public ListRUMRecoveryBatchRequestsOptionalParameters limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * Set cursor. + * + * @param cursor Opaque next-page cursor. Keep type, from, to, and query unchanged between + * pages. (optional) + * @return ListRUMRecoveryBatchRequestsOptionalParameters + */ + public ListRUMRecoveryBatchRequestsOptionalParameters cursor(String cursor) { + this.cursor = cursor; + return this; + } + + /** + * Set from. + * + * @param from Start of the request creation-time range in Unix milliseconds, inclusive. This + * filters created_at, not the time range of the sessions being recovered. Must be earlier + * than to when both are provided. (optional) + * @return ListRUMRecoveryBatchRequestsOptionalParameters + */ + public ListRUMRecoveryBatchRequestsOptionalParameters from(Long from) { + this.from = from; + return this; + } + + /** + * Set to. + * + * @param to End of the request creation-time range in Unix milliseconds, exclusive. This + * filters created_at, not the time range of the sessions being recovered. Must be later + * than from when both are provided. (optional) + * @return ListRUMRecoveryBatchRequestsOptionalParameters + */ + public ListRUMRecoveryBatchRequestsOptionalParameters to(Long to) { + this.to = to; + return this; + } + + /** + * Set query. + * + * @param query Filter recovery requests whose stored query selects matching facet values. + * Supports facet:value and facet:(A OR B) terms combined with AND, including * and ? + * wildcards in filter values. Attribute facets keep their leading @. At most 4096 bytes. + * Exclusions, repeated facets, free text, ranges, and OR between terms return 400. Stored + * queries that cannot be matched unambiguously are excluded. Blank values apply no query + * filter. (optional) + * @return ListRUMRecoveryBatchRequestsOptionalParameters + */ + public ListRUMRecoveryBatchRequestsOptionalParameters query(String query) { + this.query = query; + return this; + } + } + + /** + * List batch recovery requests. + * + *

See {@link #listRUMRecoveryBatchRequestsWithHttpInfo}. + * + * @param type Must equal batch. (required) + * @return RumRecoveryBatchListResponse + * @throws ApiException if fails to make API call + */ + public RumRecoveryBatchListResponse listRUMRecoveryBatchRequests(RumRecoveryBatchRequestType type) + throws ApiException { + return listRUMRecoveryBatchRequestsWithHttpInfo( + type, new ListRUMRecoveryBatchRequestsOptionalParameters()) + .getData(); + } + + /** + * List batch recovery requests. + * + *

See {@link #listRUMRecoveryBatchRequestsWithHttpInfoAsync}. + * + * @param type Must equal batch. (required) + * @return CompletableFuture<RumRecoveryBatchListResponse> + */ + public CompletableFuture listRUMRecoveryBatchRequestsAsync( + RumRecoveryBatchRequestType type) { + return listRUMRecoveryBatchRequestsWithHttpInfoAsync( + type, new ListRUMRecoveryBatchRequestsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List batch recovery requests. + * + *

See {@link #listRUMRecoveryBatchRequestsWithHttpInfo}. + * + * @param type Must equal batch. (required) + * @param parameters Optional parameters for the request. + * @return RumRecoveryBatchListResponse + * @throws ApiException if fails to make API call + */ + public RumRecoveryBatchListResponse listRUMRecoveryBatchRequests( + RumRecoveryBatchRequestType type, ListRUMRecoveryBatchRequestsOptionalParameters parameters) + throws ApiException { + return listRUMRecoveryBatchRequestsWithHttpInfo(type, parameters).getData(); + } + + /** + * List batch recovery requests. + * + *

See {@link #listRUMRecoveryBatchRequestsWithHttpInfoAsync}. + * + * @param type Must equal batch. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<RumRecoveryBatchListResponse> + */ + public CompletableFuture listRUMRecoveryBatchRequestsAsync( + RumRecoveryBatchRequestType type, ListRUMRecoveryBatchRequestsOptionalParameters parameters) { + return listRUMRecoveryBatchRequestsWithHttpInfoAsync(type, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List batch recovery requests for your organization. Set type=batch. Optional + * from and to bounds filter request creation time; query + * filters the queries stored on recovery requests. A filtered page can be empty or contain fewer + * than limit results and still include meta.next_cursor. Continue until + * the cursor is absent, keeping the filters unchanged between pages. + * + * @param type Must equal batch. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<RumRecoveryBatchListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too Many Requests -
+ */ + public ApiResponse listRUMRecoveryBatchRequestsWithHttpInfo( + RumRecoveryBatchRequestType type, ListRUMRecoveryBatchRequestsOptionalParameters parameters) + throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'type' is set + if (type == null) { + throw new ApiException( + 400, "Missing the required parameter 'type' when calling listRUMRecoveryBatchRequests"); + } + Integer limit = parameters.limit; + String cursor = parameters.cursor; + Long from = parameters.from; + Long to = parameters.to; + String query = parameters.query; + // create path and map variables + String localVarPath = "/api/v2/rum/recover/requests"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "type", type)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "cursor", cursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "from", from)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "to", to)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumRecoveryApi.listRUMRecoveryBatchRequests", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List batch recovery requests. + * + *

See {@link #listRUMRecoveryBatchRequestsWithHttpInfo}. + * + * @param type Must equal batch. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<RumRecoveryBatchListResponse>> + */ + public CompletableFuture> + listRUMRecoveryBatchRequestsWithHttpInfoAsync( + RumRecoveryBatchRequestType type, + ListRUMRecoveryBatchRequestsOptionalParameters parameters) { + Object localVarPostBody = null; + + // verify the required parameter 'type' is set + if (type == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'type' when calling listRUMRecoveryBatchRequests")); + return result; + } + Integer limit = parameters.limit; + String cursor = parameters.cursor; + Long from = parameters.from; + Long to = parameters.to; + String query = parameters.query; + // create path and map variables + String localVarPath = "/api/v2/rum/recover/requests"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "type", type)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "cursor", cursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "from", from)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "to", to)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumRecoveryApi.listRUMRecoveryBatchRequests", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } 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() {}); + } + + /** + * Search archived sessions. + * + *

See {@link #searchRUMArchiveSessionsWithHttpInfo}. + * + * @param body JSON:API request body. (required) + * @return RumArchiveSessionsResponse + * @throws ApiException if fails to make API call + */ + public RumArchiveSessionsResponse searchRUMArchiveSessions(RumArchiveSessionsSearchRequest body) + throws ApiException { + return searchRUMArchiveSessionsWithHttpInfo(body).getData(); + } + + /** + * Search archived sessions. + * + *

See {@link #searchRUMArchiveSessionsWithHttpInfoAsync}. + * + * @param body JSON:API request body. (required) + * @return CompletableFuture<RumArchiveSessionsResponse> + */ + public CompletableFuture searchRUMArchiveSessionsAsync( + RumArchiveSessionsSearchRequest body) { + return searchRUMArchiveSessionsWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Search archived RUM sessions. Use meta.page.next_cursor to retrieve the next page. + * + * @param body JSON:API request body. (required) + * @return ApiResponse<RumArchiveSessionsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too Many Requests -
+ */ + public ApiResponse searchRUMArchiveSessionsWithHttpInfo( + RumArchiveSessionsSearchRequest body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling searchRUMArchiveSessions"); + } + // create path and map variables + String localVarPath = "/api/v2/rum/recover/sessions"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumRecoveryApi.searchRUMArchiveSessions", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Search archived sessions. + * + *

See {@link #searchRUMArchiveSessionsWithHttpInfo}. + * + * @param body JSON:API request body. (required) + * @return CompletableFuture<ApiResponse<RumArchiveSessionsResponse>> + */ + public CompletableFuture> + searchRUMArchiveSessionsWithHttpInfoAsync(RumArchiveSessionsSearchRequest body) { + Object localVarPostBody = body; + + // 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 searchRUMArchiveSessions")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/rum/recover/sessions"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumRecoveryApi.searchRUMArchiveSessions", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } 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() {}); + } + + /** + * Cancel a batch recovery request. + * + *

See {@link #updateRUMRecoveryBatchRequestWithHttpInfo}. + * + * @param requestId Recovery request UUID. (required) + * @param body JSON:API request body. (required) + * @return RumRecoveryCancelResponse + * @throws ApiException if fails to make API call + */ + public RumRecoveryCancelResponse updateRUMRecoveryBatchRequest( + UUID requestId, RumRecoveryCancelRequest body) throws ApiException { + return updateRUMRecoveryBatchRequestWithHttpInfo(requestId, body).getData(); + } + + /** + * Cancel a batch recovery request. + * + *

See {@link #updateRUMRecoveryBatchRequestWithHttpInfoAsync}. + * + * @param requestId Recovery request UUID. (required) + * @param body JSON:API request body. (required) + * @return CompletableFuture<RumRecoveryCancelResponse> + */ + public CompletableFuture updateRUMRecoveryBatchRequestAsync( + UUID requestId, RumRecoveryCancelRequest body) { + return updateRUMRecoveryBatchRequestWithHttpInfoAsync(requestId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Cancel pending work for a batch recovery request. Work already in progress can finish, and + * recovered data is not removed. Requests in a terminal state return 409. + * + * @param requestId Recovery request UUID. (required) + * @param body JSON:API request body. (required) + * @return ApiResponse<RumRecoveryCancelResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
409 Conflict -
429 Too Many Requests -
+ */ + public ApiResponse updateRUMRecoveryBatchRequestWithHttpInfo( + UUID requestId, RumRecoveryCancelRequest body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'requestId' is set + if (requestId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'requestId' when calling updateRUMRecoveryBatchRequest"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateRUMRecoveryBatchRequest"); + } + // create path and map variables + String localVarPath = + "/api/v2/rum/recover/requests/{request_id}" + .replaceAll("\\{" + "request_id" + "\\}", apiClient.escapeString(requestId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumRecoveryApi.updateRUMRecoveryBatchRequest", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Cancel a batch recovery request. + * + *

See {@link #updateRUMRecoveryBatchRequestWithHttpInfo}. + * + * @param requestId Recovery request UUID. (required) + * @param body JSON:API request body. (required) + * @return CompletableFuture<ApiResponse<RumRecoveryCancelResponse>> + */ + public CompletableFuture> + updateRUMRecoveryBatchRequestWithHttpInfoAsync( + UUID requestId, RumRecoveryCancelRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'requestId' is set + if (requestId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'requestId' when calling" + + " updateRUMRecoveryBatchRequest")); + 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 updateRUMRecoveryBatchRequest")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/rum/recover/requests/{request_id}" + .replaceAll("\\{" + "request_id" + "\\}", apiClient.escapeString(requestId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumRecoveryApi.updateRUMRecoveryBatchRequest", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RumArchiveConfig.java b/src/main/java/com/datadog/api/client/v2/model/RumArchiveConfig.java new file mode 100644 index 00000000000..5eaaf229934 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumArchiveConfig.java @@ -0,0 +1,212 @@ +/* + * 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; + +/** JSON:API resource. */ +@JsonPropertyOrder({ + RumArchiveConfig.JSON_PROPERTY_ATTRIBUTES, + RumArchiveConfig.JSON_PROPERTY_ID, + RumArchiveConfig.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumArchiveConfig { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RumArchiveConfigAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private RumArchiveConfigType type; + + public RumArchiveConfig() {} + + @JsonCreator + public RumArchiveConfig( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + RumArchiveConfigAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RumArchiveConfigType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public RumArchiveConfig attributes(RumArchiveConfigAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Archive configuration. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumArchiveConfigAttributes getAttributes() { + return attributes; + } + + public void setAttributes(RumArchiveConfigAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public RumArchiveConfig id(String id) { + this.id = id; + return this; + } + + /** + * Resource identifier. + * + * @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 RumArchiveConfig type(RumArchiveConfigType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * JSON:API resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumArchiveConfigType getType() { + return type; + } + + public void setType(RumArchiveConfigType 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 RumArchiveConfig + */ + @JsonAnySetter + public RumArchiveConfig 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 RumArchiveConfig object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumArchiveConfig rumArchiveConfig = (RumArchiveConfig) o; + return Objects.equals(this.attributes, rumArchiveConfig.attributes) + && Objects.equals(this.id, rumArchiveConfig.id) + && Objects.equals(this.type, rumArchiveConfig.type) + && Objects.equals(this.additionalProperties, rumArchiveConfig.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumArchiveConfig {\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/RumArchiveConfigAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RumArchiveConfigAttributes.java new file mode 100644 index 00000000000..e64be1c1ee4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumArchiveConfigAttributes.java @@ -0,0 +1,256 @@ +/* + * 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.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Archive configuration. */ +@JsonPropertyOrder({ + RumArchiveConfigAttributes.JSON_PROPERTY_ENABLED, + RumArchiveConfigAttributes.JSON_PROPERTY_ORG_ID, + RumArchiveConfigAttributes.JSON_PROPERTY_RETENTION_DAYS, + RumArchiveConfigAttributes.JSON_PROPERTY_UPDATED_AT, + RumArchiveConfigAttributes.JSON_PROPERTY_UPDATED_BY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumArchiveConfigAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_ORG_ID = "org_id"; + private Long orgId; + + public static final String JSON_PROPERTY_RETENTION_DAYS = "retention_days"; + private Integer retentionDays; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_UPDATED_BY = "updated_by"; + private String updatedBy; + + public RumArchiveConfigAttributes() {} + + @JsonCreator + public RumArchiveConfigAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_ENABLED) Boolean enabled, + @JsonProperty(required = true, value = JSON_PROPERTY_ORG_ID) Long orgId) { + this.enabled = enabled; + this.orgId = orgId; + } + + public RumArchiveConfigAttributes enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether archiving is enabled. + * + * @return enabled + */ + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public RumArchiveConfigAttributes orgId(Long orgId) { + this.orgId = orgId; + return this; + } + + /** + * Organization ID. + * + * @return orgId + */ + @JsonProperty(JSON_PROPERTY_ORG_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getOrgId() { + return orgId; + } + + public void setOrgId(Long orgId) { + this.orgId = orgId; + } + + public RumArchiveConfigAttributes retentionDays(Integer retentionDays) { + this.retentionDays = retentionDays; + return this; + } + + /** + * Configured retention in days; omitted when unset. maximum: 2147483647 + * + * @return retentionDays + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RETENTION_DAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getRetentionDays() { + return retentionDays; + } + + public void setRetentionDays(Integer retentionDays) { + this.retentionDays = retentionDays; + } + + public RumArchiveConfigAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Last update time. + * + * @return updatedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + public RumArchiveConfigAttributes updatedBy(String updatedBy) { + this.updatedBy = updatedBy; + return this; + } + + /** + * Handle of the user who last updated the configuration. + * + * @return updatedBy + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUpdatedBy() { + return updatedBy; + } + + public void setUpdatedBy(String updatedBy) { + this.updatedBy = updatedBy; + } + + /** + * 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 RumArchiveConfigAttributes + */ + @JsonAnySetter + public RumArchiveConfigAttributes 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 RumArchiveConfigAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumArchiveConfigAttributes rumArchiveConfigAttributes = (RumArchiveConfigAttributes) o; + return Objects.equals(this.enabled, rumArchiveConfigAttributes.enabled) + && Objects.equals(this.orgId, rumArchiveConfigAttributes.orgId) + && Objects.equals(this.retentionDays, rumArchiveConfigAttributes.retentionDays) + && Objects.equals(this.updatedAt, rumArchiveConfigAttributes.updatedAt) + && Objects.equals(this.updatedBy, rumArchiveConfigAttributes.updatedBy) + && Objects.equals( + this.additionalProperties, rumArchiveConfigAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, orgId, retentionDays, updatedAt, updatedBy, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumArchiveConfigAttributes {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); + sb.append(" retentionDays: ").append(toIndentedString(retentionDays)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" updatedBy: ").append(toIndentedString(updatedBy)).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/RumArchiveConfigListResponse.java b/src/main/java/com/datadog/api/client/v2/model/RumArchiveConfigListResponse.java new file mode 100644 index 00000000000..5102109658e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumArchiveConfigListResponse.java @@ -0,0 +1,198 @@ +/* + * 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; + +/** JSON:API document. */ +@JsonPropertyOrder({ + RumArchiveConfigListResponse.JSON_PROPERTY_DATA, + RumArchiveConfigListResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumArchiveConfigListResponse { + @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 RumArchiveConfigMeta meta; + + public RumArchiveConfigListResponse() {} + + @JsonCreator + public RumArchiveConfigListResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data, + @JsonProperty(required = true, value = JSON_PROPERTY_META) RumArchiveConfigMeta meta) { + this.data = data; + for (RumArchiveConfig item : data) { + this.unparsed |= item.unparsed; + } + this.meta = meta; + this.unparsed |= meta.unparsed; + } + + public RumArchiveConfigListResponse data(List data) { + this.data = data; + for (RumArchiveConfig item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public RumArchiveConfigListResponse addDataItem(RumArchiveConfig dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Configurations in page order. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (RumArchiveConfig item : data) { + this.unparsed |= item.unparsed; + } + } + } + + public RumArchiveConfigListResponse meta(RumArchiveConfigMeta meta) { + this.meta = meta; + this.unparsed |= meta.unparsed; + return this; + } + + /** + * Pagination metadata. + * + * @return meta + */ + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumArchiveConfigMeta getMeta() { + return meta; + } + + public void setMeta(RumArchiveConfigMeta meta) { + this.meta = meta; + if (meta != null) { + this.unparsed |= meta.unparsed; + } + } + + /** + * 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 RumArchiveConfigListResponse + */ + @JsonAnySetter + public RumArchiveConfigListResponse 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 RumArchiveConfigListResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumArchiveConfigListResponse rumArchiveConfigListResponse = (RumArchiveConfigListResponse) o; + return Objects.equals(this.data, rumArchiveConfigListResponse.data) + && Objects.equals(this.meta, rumArchiveConfigListResponse.meta) + && Objects.equals( + this.additionalProperties, rumArchiveConfigListResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumArchiveConfigListResponse {\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/RumArchiveConfigMeta.java b/src/main/java/com/datadog/api/client/v2/model/RumArchiveConfigMeta.java new file mode 100644 index 00000000000..62eaea27fba --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumArchiveConfigMeta.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; + +/** Pagination metadata. */ +@JsonPropertyOrder({RumArchiveConfigMeta.JSON_PROPERTY_PAGE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumArchiveConfigMeta { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_PAGE = "page"; + private RumArchiveConfigPage page; + + public RumArchiveConfigMeta() {} + + @JsonCreator + public RumArchiveConfigMeta( + @JsonProperty(required = true, value = JSON_PROPERTY_PAGE) RumArchiveConfigPage page) { + this.page = page; + this.unparsed |= page.unparsed; + } + + public RumArchiveConfigMeta page(RumArchiveConfigPage page) { + this.page = page; + this.unparsed |= page.unparsed; + return this; + } + + /** + * Page information. + * + * @return page + */ + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumArchiveConfigPage getPage() { + return page; + } + + public void setPage(RumArchiveConfigPage page) { + this.page = page; + if (page != null) { + this.unparsed |= page.unparsed; + } + } + + /** + * 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 RumArchiveConfigMeta + */ + @JsonAnySetter + public RumArchiveConfigMeta 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 RumArchiveConfigMeta object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumArchiveConfigMeta rumArchiveConfigMeta = (RumArchiveConfigMeta) o; + return Objects.equals(this.page, rumArchiveConfigMeta.page) + && Objects.equals(this.additionalProperties, rumArchiveConfigMeta.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(page, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumArchiveConfigMeta {\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/RumArchiveConfigPage.java b/src/main/java/com/datadog/api/client/v2/model/RumArchiveConfigPage.java new file mode 100644 index 00000000000..8eb124bcee9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumArchiveConfigPage.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; + +/** Page information. */ +@JsonPropertyOrder({RumArchiveConfigPage.JSON_PROPERTY_TOTAL_FILTERED_COUNT}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumArchiveConfigPage { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_TOTAL_FILTERED_COUNT = "total_filtered_count"; + private Long totalFilteredCount; + + public RumArchiveConfigPage() {} + + @JsonCreator + public RumArchiveConfigPage( + @JsonProperty(required = true, value = JSON_PROPERTY_TOTAL_FILTERED_COUNT) + Long totalFilteredCount) { + this.totalFilteredCount = totalFilteredCount; + } + + public RumArchiveConfigPage totalFilteredCount(Long totalFilteredCount) { + this.totalFilteredCount = totalFilteredCount; + return this; + } + + /** + * Total configurations for the organization. minimum: 0 + * + * @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 RumArchiveConfigPage + */ + @JsonAnySetter + public RumArchiveConfigPage 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 RumArchiveConfigPage object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumArchiveConfigPage rumArchiveConfigPage = (RumArchiveConfigPage) o; + return Objects.equals(this.totalFilteredCount, rumArchiveConfigPage.totalFilteredCount) + && Objects.equals(this.additionalProperties, rumArchiveConfigPage.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(totalFilteredCount, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumArchiveConfigPage {\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/RumArchiveConfigResponse.java b/src/main/java/com/datadog/api/client/v2/model/RumArchiveConfigResponse.java new file mode 100644 index 00000000000..cacab4b32ec --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumArchiveConfigResponse.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; + +/** JSON:API document. */ +@JsonPropertyOrder({RumArchiveConfigResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumArchiveConfigResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private RumArchiveConfig data; + + public RumArchiveConfigResponse() {} + + @JsonCreator + public RumArchiveConfigResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) RumArchiveConfig data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public RumArchiveConfigResponse data(RumArchiveConfig data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * JSON:API resource. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumArchiveConfig getData() { + return data; + } + + public void setData(RumArchiveConfig data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 RumArchiveConfigResponse + */ + @JsonAnySetter + public RumArchiveConfigResponse 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 RumArchiveConfigResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumArchiveConfigResponse rumArchiveConfigResponse = (RumArchiveConfigResponse) o; + return Objects.equals(this.data, rumArchiveConfigResponse.data) + && Objects.equals(this.additionalProperties, rumArchiveConfigResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumArchiveConfigResponse {\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/RumArchiveConfigType.java b/src/main/java/com/datadog/api/client/v2/model/RumArchiveConfigType.java new file mode 100644 index 00000000000..64c504f14aa --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumArchiveConfigType.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; + +/** JSON:API resource type. */ +@JsonSerialize(using = RumArchiveConfigType.RumArchiveConfigTypeSerializer.class) +public class RumArchiveConfigType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("rum_archive_config")); + + public static final RumArchiveConfigType RUM_ARCHIVE_CONFIG = + new RumArchiveConfigType("rum_archive_config"); + + RumArchiveConfigType(String value) { + super(value, allowedValues); + } + + public static class RumArchiveConfigTypeSerializer extends StdSerializer { + public RumArchiveConfigTypeSerializer(Class t) { + super(t); + } + + public RumArchiveConfigTypeSerializer() { + this(null); + } + + @Override + public void serialize( + RumArchiveConfigType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static RumArchiveConfigType fromValue(String value) { + return new RumArchiveConfigType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RumArchiveConfigUpsertAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RumArchiveConfigUpsertAttributes.java new file mode 100644 index 00000000000..3db14e71966 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumArchiveConfigUpsertAttributes.java @@ -0,0 +1,178 @@ +/* + * 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; + +/** + * Archive configuration to save. When enabled is true, retention_days is required and must be 30, + * 90, or 180. When disabled, retention_days can be omitted. + */ +@JsonPropertyOrder({ + RumArchiveConfigUpsertAttributes.JSON_PROPERTY_ENABLED, + RumArchiveConfigUpsertAttributes.JSON_PROPERTY_RETENTION_DAYS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumArchiveConfigUpsertAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_RETENTION_DAYS = "retention_days"; + private Integer retentionDays; + + public RumArchiveConfigUpsertAttributes() {} + + @JsonCreator + public RumArchiveConfigUpsertAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_ENABLED) Boolean enabled) { + this.enabled = enabled; + } + + public RumArchiveConfigUpsertAttributes enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether archiving is enabled. + * + * @return enabled + */ + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public RumArchiveConfigUpsertAttributes retentionDays(Integer retentionDays) { + this.retentionDays = retentionDays; + return this; + } + + /** + * Retention in days. Required and restricted to 30, 90, or 180 only when enabled is true. + * maximum: 2147483647 + * + * @return retentionDays + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RETENTION_DAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getRetentionDays() { + return retentionDays; + } + + public void setRetentionDays(Integer retentionDays) { + this.retentionDays = retentionDays; + } + + /** + * 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 RumArchiveConfigUpsertAttributes + */ + @JsonAnySetter + public RumArchiveConfigUpsertAttributes 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 RumArchiveConfigUpsertAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumArchiveConfigUpsertAttributes rumArchiveConfigUpsertAttributes = + (RumArchiveConfigUpsertAttributes) o; + return Objects.equals(this.enabled, rumArchiveConfigUpsertAttributes.enabled) + && Objects.equals(this.retentionDays, rumArchiveConfigUpsertAttributes.retentionDays) + && Objects.equals( + this.additionalProperties, rumArchiveConfigUpsertAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, retentionDays, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumArchiveConfigUpsertAttributes {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" retentionDays: ").append(toIndentedString(retentionDays)).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/RumArchiveConfigUpsertData.java b/src/main/java/com/datadog/api/client/v2/model/RumArchiveConfigUpsertData.java new file mode 100644 index 00000000000..e992f4d3751 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumArchiveConfigUpsertData.java @@ -0,0 +1,214 @@ +/* + * 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; + +/** JSON:API resource. */ +@JsonPropertyOrder({ + RumArchiveConfigUpsertData.JSON_PROPERTY_ATTRIBUTES, + RumArchiveConfigUpsertData.JSON_PROPERTY_ID, + RumArchiveConfigUpsertData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumArchiveConfigUpsertData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RumArchiveConfigUpsertAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private RumArchiveConfigType type; + + public RumArchiveConfigUpsertData() {} + + @JsonCreator + public RumArchiveConfigUpsertData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + RumArchiveConfigUpsertAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RumArchiveConfigType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public RumArchiveConfigUpsertData attributes(RumArchiveConfigUpsertAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Archive configuration to save. When enabled is true, retention_days is required and must be 30, + * 90, or 180. When disabled, retention_days can be omitted. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumArchiveConfigUpsertAttributes getAttributes() { + return attributes; + } + + public void setAttributes(RumArchiveConfigUpsertAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public RumArchiveConfigUpsertData id(String id) { + this.id = id; + return this; + } + + /** + * Resource identifier. + * + * @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 RumArchiveConfigUpsertData type(RumArchiveConfigType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * JSON:API resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumArchiveConfigType getType() { + return type; + } + + public void setType(RumArchiveConfigType 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 RumArchiveConfigUpsertData + */ + @JsonAnySetter + public RumArchiveConfigUpsertData 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 RumArchiveConfigUpsertData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumArchiveConfigUpsertData rumArchiveConfigUpsertData = (RumArchiveConfigUpsertData) o; + return Objects.equals(this.attributes, rumArchiveConfigUpsertData.attributes) + && Objects.equals(this.id, rumArchiveConfigUpsertData.id) + && Objects.equals(this.type, rumArchiveConfigUpsertData.type) + && Objects.equals( + this.additionalProperties, rumArchiveConfigUpsertData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumArchiveConfigUpsertData {\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/RumArchiveConfigUpsertRequest.java b/src/main/java/com/datadog/api/client/v2/model/RumArchiveConfigUpsertRequest.java new file mode 100644 index 00000000000..9f46808bed2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumArchiveConfigUpsertRequest.java @@ -0,0 +1,149 @@ +/* + * 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; + +/** JSON:API document. */ +@JsonPropertyOrder({RumArchiveConfigUpsertRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumArchiveConfigUpsertRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private RumArchiveConfigUpsertData data; + + public RumArchiveConfigUpsertRequest() {} + + @JsonCreator + public RumArchiveConfigUpsertRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) RumArchiveConfigUpsertData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public RumArchiveConfigUpsertRequest data(RumArchiveConfigUpsertData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * JSON:API resource. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumArchiveConfigUpsertData getData() { + return data; + } + + public void setData(RumArchiveConfigUpsertData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 RumArchiveConfigUpsertRequest + */ + @JsonAnySetter + public RumArchiveConfigUpsertRequest 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 RumArchiveConfigUpsertRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumArchiveConfigUpsertRequest rumArchiveConfigUpsertRequest = (RumArchiveConfigUpsertRequest) o; + return Objects.equals(this.data, rumArchiveConfigUpsertRequest.data) + && Objects.equals( + this.additionalProperties, rumArchiveConfigUpsertRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumArchiveConfigUpsertRequest {\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/RumArchiveSession.java b/src/main/java/com/datadog/api/client/v2/model/RumArchiveSession.java new file mode 100644 index 00000000000..9b254190628 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumArchiveSession.java @@ -0,0 +1,212 @@ +/* + * 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; + +/** JSON:API resource. */ +@JsonPropertyOrder({ + RumArchiveSession.JSON_PROPERTY_ATTRIBUTES, + RumArchiveSession.JSON_PROPERTY_ID, + RumArchiveSession.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumArchiveSession { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RumArchiveSessionAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private RumArchiveSessionType type; + + public RumArchiveSession() {} + + @JsonCreator + public RumArchiveSession( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + RumArchiveSessionAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RumArchiveSessionType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public RumArchiveSession attributes(RumArchiveSessionAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Archived session metadata. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumArchiveSessionAttributes getAttributes() { + return attributes; + } + + public void setAttributes(RumArchiveSessionAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public RumArchiveSession id(String id) { + this.id = id; + return this; + } + + /** + * Resource identifier. + * + * @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 RumArchiveSession type(RumArchiveSessionType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * JSON:API resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumArchiveSessionType getType() { + return type; + } + + public void setType(RumArchiveSessionType 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 RumArchiveSession + */ + @JsonAnySetter + public RumArchiveSession 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 RumArchiveSession object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumArchiveSession rumArchiveSession = (RumArchiveSession) o; + return Objects.equals(this.attributes, rumArchiveSession.attributes) + && Objects.equals(this.id, rumArchiveSession.id) + && Objects.equals(this.type, rumArchiveSession.type) + && Objects.equals(this.additionalProperties, rumArchiveSession.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumArchiveSession {\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/RumArchiveSessionAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RumArchiveSessionAttributes.java new file mode 100644 index 00000000000..ecdbeb431a6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumArchiveSessionAttributes.java @@ -0,0 +1,438 @@ +/* + * 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 java.util.UUID; + +/** Archived session metadata. */ +@JsonPropertyOrder({ + RumArchiveSessionAttributes.JSON_PROPERTY_ACCOUNT_ID, + RumArchiveSessionAttributes.JSON_PROPERTY_ANONYMOUS_ID, + RumArchiveSessionAttributes.JSON_PROPERTY_APPLICATION_ID, + RumArchiveSessionAttributes.JSON_PROPERTY_COUNTRY, + RumArchiveSessionAttributes.JSON_PROPERTY_RECOVERY_STATUS, + RumArchiveSessionAttributes.JSON_PROPERTY_SERVICE, + RumArchiveSessionAttributes.JSON_PROPERTY_SESSION_ID, + RumArchiveSessionAttributes.JSON_PROPERTY_TIMESTAMP, + RumArchiveSessionAttributes.JSON_PROPERTY_USER_ID, + RumArchiveSessionAttributes.JSON_PROPERTY_VERSION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumArchiveSessionAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + private String accountId; + + public static final String JSON_PROPERTY_ANONYMOUS_ID = "anonymous_id"; + private String anonymousId; + + public static final String JSON_PROPERTY_APPLICATION_ID = "application_id"; + private UUID applicationId; + + public static final String JSON_PROPERTY_COUNTRY = "country"; + private String country; + + public static final String JSON_PROPERTY_RECOVERY_STATUS = "recovery_status"; + private RumArchiveSessionRecoveryStatus recoveryStatus; + + public static final String JSON_PROPERTY_SERVICE = "service"; + private String service; + + public static final String JSON_PROPERTY_SESSION_ID = "session_id"; + private String sessionId; + + public static final String JSON_PROPERTY_TIMESTAMP = "timestamp"; + private Long timestamp; + + public static final String JSON_PROPERTY_USER_ID = "user_id"; + private String userId; + + public static final String JSON_PROPERTY_VERSION = "version"; + private String version; + + public RumArchiveSessionAttributes() {} + + @JsonCreator + public RumArchiveSessionAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_ACCOUNT_ID) String accountId, + @JsonProperty(required = true, value = JSON_PROPERTY_ANONYMOUS_ID) String anonymousId, + @JsonProperty(required = true, value = JSON_PROPERTY_APPLICATION_ID) UUID applicationId, + @JsonProperty(required = true, value = JSON_PROPERTY_COUNTRY) String country, + @JsonProperty(required = true, value = JSON_PROPERTY_RECOVERY_STATUS) + RumArchiveSessionRecoveryStatus recoveryStatus, + @JsonProperty(required = true, value = JSON_PROPERTY_SERVICE) String service, + @JsonProperty(required = true, value = JSON_PROPERTY_SESSION_ID) String sessionId, + @JsonProperty(required = true, value = JSON_PROPERTY_TIMESTAMP) Long timestamp, + @JsonProperty(required = true, value = JSON_PROPERTY_USER_ID) String userId, + @JsonProperty(required = true, value = JSON_PROPERTY_VERSION) String version) { + this.accountId = accountId; + if (accountId != null) {} + this.anonymousId = anonymousId; + if (anonymousId != null) {} + this.applicationId = applicationId; + this.country = country; + if (country != null) {} + this.recoveryStatus = recoveryStatus; + if (recoveryStatus != null) { + this.unparsed |= recoveryStatus.unparsed; + } + this.service = service; + this.sessionId = sessionId; + this.timestamp = timestamp; + this.userId = userId; + if (userId != null) {} + this.version = version; + if (version != null) {} + } + + public RumArchiveSessionAttributes accountId(String accountId) { + this.accountId = accountId; + if (accountId != null) {} + return this; + } + + /** + * Session account id, or null when unavailable. + * + * @return accountId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountId() { + return accountId; + } + + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + public RumArchiveSessionAttributes anonymousId(String anonymousId) { + this.anonymousId = anonymousId; + if (anonymousId != null) {} + return this; + } + + /** + * Session anonymous id, or null when unavailable. + * + * @return anonymousId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANONYMOUS_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAnonymousId() { + return anonymousId; + } + + public void setAnonymousId(String anonymousId) { + this.anonymousId = anonymousId; + } + + public RumArchiveSessionAttributes applicationId(UUID applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * Application UUID. + * + * @return applicationId + */ + @JsonProperty(JSON_PROPERTY_APPLICATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getApplicationId() { + return applicationId; + } + + public void setApplicationId(UUID applicationId) { + this.applicationId = applicationId; + } + + public RumArchiveSessionAttributes country(String country) { + this.country = country; + if (country != null) {} + return this; + } + + /** + * Session country, or null when unavailable. + * + * @return country + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNTRY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCountry() { + return country; + } + + public void setCountry(String country) { + this.country = country; + } + + public RumArchiveSessionAttributes recoveryStatus( + RumArchiveSessionRecoveryStatus recoveryStatus) { + this.recoveryStatus = recoveryStatus; + if (recoveryStatus != null) { + this.unparsed |= recoveryStatus.unparsed; + } + return this; + } + + /** + * Session recovery state. A missing recovery record can be represented as null. Optional + * request_id and recovered_at are omitted when unavailable. + * + * @return recoveryStatus + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RECOVERY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumArchiveSessionRecoveryStatus getRecoveryStatus() { + return recoveryStatus; + } + + public void setRecoveryStatus(RumArchiveSessionRecoveryStatus recoveryStatus) { + this.recoveryStatus = recoveryStatus; + if (recoveryStatus != null) { + this.unparsed |= recoveryStatus.unparsed; + } + } + + public RumArchiveSessionAttributes service(String service) { + this.service = service; + return this; + } + + /** + * Service name. + * + * @return service + */ + @JsonProperty(JSON_PROPERTY_SERVICE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getService() { + return service; + } + + public void setService(String service) { + this.service = service; + } + + public RumArchiveSessionAttributes sessionId(String sessionId) { + this.sessionId = sessionId; + return this; + } + + /** + * Session identifier. + * + * @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 RumArchiveSessionAttributes timestamp(Long timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Session timestamp in Unix milliseconds. + * + * @return timestamp + */ + @JsonProperty(JSON_PROPERTY_TIMESTAMP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getTimestamp() { + return timestamp; + } + + public void setTimestamp(Long timestamp) { + this.timestamp = timestamp; + } + + public RumArchiveSessionAttributes userId(String userId) { + this.userId = userId; + if (userId != null) {} + return this; + } + + /** + * Session user id, or null when unavailable. + * + * @return userId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public RumArchiveSessionAttributes version(String version) { + this.version = version; + if (version != null) {} + return this; + } + + /** + * Session version, or null when unavailable. + * + * @return version + */ + @jakarta.annotation.Nullable + @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 RumArchiveSessionAttributes + */ + @JsonAnySetter + public RumArchiveSessionAttributes 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 RumArchiveSessionAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumArchiveSessionAttributes rumArchiveSessionAttributes = (RumArchiveSessionAttributes) o; + return Objects.equals(this.accountId, rumArchiveSessionAttributes.accountId) + && Objects.equals(this.anonymousId, rumArchiveSessionAttributes.anonymousId) + && Objects.equals(this.applicationId, rumArchiveSessionAttributes.applicationId) + && Objects.equals(this.country, rumArchiveSessionAttributes.country) + && Objects.equals(this.recoveryStatus, rumArchiveSessionAttributes.recoveryStatus) + && Objects.equals(this.service, rumArchiveSessionAttributes.service) + && Objects.equals(this.sessionId, rumArchiveSessionAttributes.sessionId) + && Objects.equals(this.timestamp, rumArchiveSessionAttributes.timestamp) + && Objects.equals(this.userId, rumArchiveSessionAttributes.userId) + && Objects.equals(this.version, rumArchiveSessionAttributes.version) + && Objects.equals( + this.additionalProperties, rumArchiveSessionAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + accountId, + anonymousId, + applicationId, + country, + recoveryStatus, + service, + sessionId, + timestamp, + userId, + version, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumArchiveSessionAttributes {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" anonymousId: ").append(toIndentedString(anonymousId)).append("\n"); + sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); + sb.append(" country: ").append(toIndentedString(country)).append("\n"); + sb.append(" recoveryStatus: ").append(toIndentedString(recoveryStatus)).append("\n"); + sb.append(" service: ").append(toIndentedString(service)).append("\n"); + sb.append(" sessionId: ").append(toIndentedString(sessionId)).append("\n"); + sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).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/RumArchiveSessionRecoveryStatus.java b/src/main/java/com/datadog/api/client/v2/model/RumArchiveSessionRecoveryStatus.java new file mode 100644 index 00000000000..a688a86297e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumArchiveSessionRecoveryStatus.java @@ -0,0 +1,212 @@ +/* + * 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.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * Session recovery state. A missing recovery record can be represented as null. Optional request_id + * and recovered_at are omitted when unavailable. + */ +@JsonPropertyOrder({ + RumArchiveSessionRecoveryStatus.JSON_PROPERTY_RECOVERED_AT, + RumArchiveSessionRecoveryStatus.JSON_PROPERTY_REQUEST_ID, + RumArchiveSessionRecoveryStatus.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumArchiveSessionRecoveryStatus { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_RECOVERED_AT = "recovered_at"; + private OffsetDateTime recoveredAt; + + public static final String JSON_PROPERTY_REQUEST_ID = "request_id"; + private String requestId; + + public static final String JSON_PROPERTY_STATUS = "status"; + private RumRecoverySessionStatus status; + + public RumArchiveSessionRecoveryStatus() {} + + @JsonCreator + public RumArchiveSessionRecoveryStatus( + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) + RumRecoverySessionStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + } + + public RumArchiveSessionRecoveryStatus recoveredAt(OffsetDateTime recoveredAt) { + this.recoveredAt = recoveredAt; + return this; + } + + /** + * Recovery timestamp, when available. + * + * @return recoveredAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RECOVERED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getRecoveredAt() { + return recoveredAt; + } + + public void setRecoveredAt(OffsetDateTime recoveredAt) { + this.recoveredAt = recoveredAt; + } + + public RumArchiveSessionRecoveryStatus requestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** + * Associated recovery request ID. + * + * @return requestId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUEST_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRequestId() { + return requestId; + } + + public void setRequestId(String requestId) { + this.requestId = requestId; + } + + public RumArchiveSessionRecoveryStatus status(RumRecoverySessionStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * Session availability or recovery state. RECOVERED indicates that the session is + * ready to query. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRecoverySessionStatus getStatus() { + return status; + } + + public void setStatus(RumRecoverySessionStatus status) { + if (!status.isValid()) { + this.unparsed = true; + } + this.status = status; + } + + /** + * 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 RumArchiveSessionRecoveryStatus + */ + @JsonAnySetter + public RumArchiveSessionRecoveryStatus 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 RumArchiveSessionRecoveryStatus object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumArchiveSessionRecoveryStatus rumArchiveSessionRecoveryStatus = + (RumArchiveSessionRecoveryStatus) o; + return Objects.equals(this.recoveredAt, rumArchiveSessionRecoveryStatus.recoveredAt) + && Objects.equals(this.requestId, rumArchiveSessionRecoveryStatus.requestId) + && Objects.equals(this.status, rumArchiveSessionRecoveryStatus.status) + && Objects.equals( + this.additionalProperties, rumArchiveSessionRecoveryStatus.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(recoveredAt, requestId, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumArchiveSessionRecoveryStatus {\n"); + sb.append(" recoveredAt: ").append(toIndentedString(recoveredAt)).append("\n"); + sb.append(" requestId: ").append(toIndentedString(requestId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/RumArchiveSessionType.java b/src/main/java/com/datadog/api/client/v2/model/RumArchiveSessionType.java new file mode 100644 index 00000000000..64bcb20ec27 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumArchiveSessionType.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; + +/** JSON:API resource type. */ +@JsonSerialize(using = RumArchiveSessionType.RumArchiveSessionTypeSerializer.class) +public class RumArchiveSessionType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("rum_archive_session")); + + public static final RumArchiveSessionType RUM_ARCHIVE_SESSION = + new RumArchiveSessionType("rum_archive_session"); + + RumArchiveSessionType(String value) { + super(value, allowedValues); + } + + public static class RumArchiveSessionTypeSerializer extends StdSerializer { + public RumArchiveSessionTypeSerializer(Class t) { + super(t); + } + + public RumArchiveSessionTypeSerializer() { + this(null); + } + + @Override + public void serialize( + RumArchiveSessionType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static RumArchiveSessionType fromValue(String value) { + return new RumArchiveSessionType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RumArchiveSessionsMeta.java b/src/main/java/com/datadog/api/client/v2/model/RumArchiveSessionsMeta.java new file mode 100644 index 00000000000..a5b96ad2b31 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumArchiveSessionsMeta.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; + +/** Search metadata. */ +@JsonPropertyOrder({RumArchiveSessionsMeta.JSON_PROPERTY_PAGE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumArchiveSessionsMeta { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_PAGE = "page"; + private RumArchiveSessionsPage page; + + public RumArchiveSessionsMeta() {} + + @JsonCreator + public RumArchiveSessionsMeta( + @JsonProperty(required = true, value = JSON_PROPERTY_PAGE) RumArchiveSessionsPage page) { + this.page = page; + this.unparsed |= page.unparsed; + } + + public RumArchiveSessionsMeta page(RumArchiveSessionsPage page) { + this.page = page; + this.unparsed |= page.unparsed; + return this; + } + + /** + * Search pagination. + * + * @return page + */ + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumArchiveSessionsPage getPage() { + return page; + } + + public void setPage(RumArchiveSessionsPage page) { + this.page = page; + if (page != null) { + this.unparsed |= page.unparsed; + } + } + + /** + * 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 RumArchiveSessionsMeta + */ + @JsonAnySetter + public RumArchiveSessionsMeta 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 RumArchiveSessionsMeta object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumArchiveSessionsMeta rumArchiveSessionsMeta = (RumArchiveSessionsMeta) o; + return Objects.equals(this.page, rumArchiveSessionsMeta.page) + && Objects.equals(this.additionalProperties, rumArchiveSessionsMeta.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(page, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumArchiveSessionsMeta {\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/RumArchiveSessionsPage.java b/src/main/java/com/datadog/api/client/v2/model/RumArchiveSessionsPage.java new file mode 100644 index 00000000000..1f6246a4658 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumArchiveSessionsPage.java @@ -0,0 +1,173 @@ +/* + * 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; + +/** Search pagination. */ +@JsonPropertyOrder({ + RumArchiveSessionsPage.JSON_PROPERTY_NEXT_CURSOR, + RumArchiveSessionsPage.JSON_PROPERTY_TOTAL_COUNT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumArchiveSessionsPage { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_NEXT_CURSOR = "next_cursor"; + private String nextCursor; + + public static final String JSON_PROPERTY_TOTAL_COUNT = "total_count"; + private Long totalCount; + + public RumArchiveSessionsPage() {} + + @JsonCreator + public RumArchiveSessionsPage( + @JsonProperty(required = true, value = JSON_PROPERTY_TOTAL_COUNT) Long totalCount) { + this.totalCount = totalCount; + } + + public RumArchiveSessionsPage nextCursor(String nextCursor) { + this.nextCursor = nextCursor; + return this; + } + + /** + * Opaque continuation cursor. Omitted when no further page is available. + * + * @return nextCursor + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT_CURSOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNextCursor() { + return nextCursor; + } + + public void setNextCursor(String nextCursor) { + this.nextCursor = nextCursor; + } + + public RumArchiveSessionsPage totalCount(Long totalCount) { + this.totalCount = totalCount; + return this; + } + + /** + * Search result count. Can be zero on continuation pages even when sessions are returned. Use + * next_cursor to determine whether more pages are available. minimum: 0 + * + * @return totalCount + */ + @JsonProperty(JSON_PROPERTY_TOTAL_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getTotalCount() { + return totalCount; + } + + public void setTotalCount(Long totalCount) { + this.totalCount = totalCount; + } + + /** + * 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 RumArchiveSessionsPage + */ + @JsonAnySetter + public RumArchiveSessionsPage 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 RumArchiveSessionsPage object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumArchiveSessionsPage rumArchiveSessionsPage = (RumArchiveSessionsPage) o; + return Objects.equals(this.nextCursor, rumArchiveSessionsPage.nextCursor) + && Objects.equals(this.totalCount, rumArchiveSessionsPage.totalCount) + && Objects.equals(this.additionalProperties, rumArchiveSessionsPage.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(nextCursor, totalCount, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumArchiveSessionsPage {\n"); + sb.append(" nextCursor: ").append(toIndentedString(nextCursor)).append("\n"); + sb.append(" totalCount: ").append(toIndentedString(totalCount)).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/RumArchiveSessionsResponse.java b/src/main/java/com/datadog/api/client/v2/model/RumArchiveSessionsResponse.java new file mode 100644 index 00000000000..d6baa72a198 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumArchiveSessionsResponse.java @@ -0,0 +1,198 @@ +/* + * 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; + +/** JSON:API document. */ +@JsonPropertyOrder({ + RumArchiveSessionsResponse.JSON_PROPERTY_DATA, + RumArchiveSessionsResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumArchiveSessionsResponse { + @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 RumArchiveSessionsMeta meta; + + public RumArchiveSessionsResponse() {} + + @JsonCreator + public RumArchiveSessionsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data, + @JsonProperty(required = true, value = JSON_PROPERTY_META) RumArchiveSessionsMeta meta) { + this.data = data; + for (RumArchiveSession item : data) { + this.unparsed |= item.unparsed; + } + this.meta = meta; + this.unparsed |= meta.unparsed; + } + + public RumArchiveSessionsResponse data(List data) { + this.data = data; + for (RumArchiveSession item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public RumArchiveSessionsResponse addDataItem(RumArchiveSession dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Archived sessions. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (RumArchiveSession item : data) { + this.unparsed |= item.unparsed; + } + } + } + + public RumArchiveSessionsResponse meta(RumArchiveSessionsMeta meta) { + this.meta = meta; + this.unparsed |= meta.unparsed; + return this; + } + + /** + * Search metadata. + * + * @return meta + */ + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumArchiveSessionsMeta getMeta() { + return meta; + } + + public void setMeta(RumArchiveSessionsMeta meta) { + this.meta = meta; + if (meta != null) { + this.unparsed |= meta.unparsed; + } + } + + /** + * 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 RumArchiveSessionsResponse + */ + @JsonAnySetter + public RumArchiveSessionsResponse 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 RumArchiveSessionsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumArchiveSessionsResponse rumArchiveSessionsResponse = (RumArchiveSessionsResponse) o; + return Objects.equals(this.data, rumArchiveSessionsResponse.data) + && Objects.equals(this.meta, rumArchiveSessionsResponse.meta) + && Objects.equals( + this.additionalProperties, rumArchiveSessionsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumArchiveSessionsResponse {\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/RumArchiveSessionsSearchAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RumArchiveSessionsSearchAttributes.java new file mode 100644 index 00000000000..6a2bbc18cc6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumArchiveSessionsSearchAttributes.java @@ -0,0 +1,289 @@ +/* + * 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; + +/** + * Archived-session query. A window wider than configured archive retention is narrowed before + * searching. + */ +@JsonPropertyOrder({ + RumArchiveSessionsSearchAttributes.JSON_PROPERTY_CURSOR, + RumArchiveSessionsSearchAttributes.JSON_PROPERTY_FROM, + RumArchiveSessionsSearchAttributes.JSON_PROPERTY_HIDE_RETAINED, + RumArchiveSessionsSearchAttributes.JSON_PROPERTY_LIMIT, + RumArchiveSessionsSearchAttributes.JSON_PROPERTY_QUERY, + RumArchiveSessionsSearchAttributes.JSON_PROPERTY_TO +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumArchiveSessionsSearchAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CURSOR = "cursor"; + private String cursor; + + public static final String JSON_PROPERTY_FROM = "from"; + private Long from; + + public static final String JSON_PROPERTY_HIDE_RETAINED = "hide_retained"; + private Boolean hideRetained = false; + + public static final String JSON_PROPERTY_LIMIT = "limit"; + private Integer limit = 50; + + public static final String JSON_PROPERTY_QUERY = "query"; + private String query; + + public static final String JSON_PROPERTY_TO = "to"; + private Long to; + + public RumArchiveSessionsSearchAttributes() {} + + @JsonCreator + public RumArchiveSessionsSearchAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_FROM) Long from, + @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query, + @JsonProperty(required = true, value = JSON_PROPERTY_TO) Long to) { + this.from = from; + this.query = query; + this.to = to; + } + + public RumArchiveSessionsSearchAttributes cursor(String cursor) { + this.cursor = cursor; + return this; + } + + /** + * Opaque next-page cursor. Keep the query, time range, and hide_retained value unchanged. + * + * @return cursor + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CURSOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCursor() { + return cursor; + } + + public void setCursor(String cursor) { + this.cursor = cursor; + } + + public RumArchiveSessionsSearchAttributes from(Long from) { + this.from = from; + return this; + } + + /** + * Start of the range in Unix milliseconds. Must be positive and earlier than to. minimum: 1 + * + * @return from + */ + @JsonProperty(JSON_PROPERTY_FROM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getFrom() { + return from; + } + + public void setFrom(Long from) { + this.from = from; + } + + public RumArchiveSessionsSearchAttributes hideRetained(Boolean hideRetained) { + this.hideRetained = hideRetained; + return this; + } + + /** + * When true, exclude sessions already present in hot RUM storage. When false, those sessions can + * appear in the results. Keep this value unchanged when continuing with a cursor. + * + * @return hideRetained + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HIDE_RETAINED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getHideRetained() { + return hideRetained; + } + + public void setHideRetained(Boolean hideRetained) { + this.hideRetained = hideRetained; + } + + public RumArchiveSessionsSearchAttributes limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * Page size. Values at or below zero use 50; values above 1000 are clamped to 1000. maximum: + * 2147483647 + * + * @return limit + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getLimit() { + return limit; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public RumArchiveSessionsSearchAttributes query(String query) { + this.query = query; + return this; + } + + /** + * RUM search query. Must not be empty. + * + * @return query + */ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuery() { + return query; + } + + public void setQuery(String query) { + this.query = query; + } + + public RumArchiveSessionsSearchAttributes to(Long to) { + this.to = to; + return this; + } + + /** + * End of the range in Unix milliseconds. minimum: 1 + * + * @return to + */ + @JsonProperty(JSON_PROPERTY_TO) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getTo() { + return to; + } + + public void setTo(Long to) { + this.to = to; + } + + /** + * 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 RumArchiveSessionsSearchAttributes + */ + @JsonAnySetter + public RumArchiveSessionsSearchAttributes 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 RumArchiveSessionsSearchAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumArchiveSessionsSearchAttributes rumArchiveSessionsSearchAttributes = + (RumArchiveSessionsSearchAttributes) o; + return Objects.equals(this.cursor, rumArchiveSessionsSearchAttributes.cursor) + && Objects.equals(this.from, rumArchiveSessionsSearchAttributes.from) + && Objects.equals(this.hideRetained, rumArchiveSessionsSearchAttributes.hideRetained) + && Objects.equals(this.limit, rumArchiveSessionsSearchAttributes.limit) + && Objects.equals(this.query, rumArchiveSessionsSearchAttributes.query) + && Objects.equals(this.to, rumArchiveSessionsSearchAttributes.to) + && Objects.equals( + this.additionalProperties, rumArchiveSessionsSearchAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(cursor, from, hideRetained, limit, query, to, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumArchiveSessionsSearchAttributes {\n"); + sb.append(" cursor: ").append(toIndentedString(cursor)).append("\n"); + sb.append(" from: ").append(toIndentedString(from)).append("\n"); + sb.append(" hideRetained: ").append(toIndentedString(hideRetained)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" to: ").append(toIndentedString(to)).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/RumArchiveSessionsSearchData.java b/src/main/java/com/datadog/api/client/v2/model/RumArchiveSessionsSearchData.java new file mode 100644 index 00000000000..af08351635d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumArchiveSessionsSearchData.java @@ -0,0 +1,207 @@ +/* + * 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; + +/** JSON:API resource. */ +@JsonPropertyOrder({ + RumArchiveSessionsSearchData.JSON_PROPERTY_ATTRIBUTES, + RumArchiveSessionsSearchData.JSON_PROPERTY_ID, + RumArchiveSessionsSearchData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumArchiveSessionsSearchData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RumArchiveSessionsSearchAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public RumArchiveSessionsSearchData() {} + + @JsonCreator + public RumArchiveSessionsSearchData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + RumArchiveSessionsSearchAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + } + + public RumArchiveSessionsSearchData attributes(RumArchiveSessionsSearchAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Archived-session query. A window wider than configured archive retention is narrowed before + * searching. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumArchiveSessionsSearchAttributes getAttributes() { + return attributes; + } + + public void setAttributes(RumArchiveSessionsSearchAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public RumArchiveSessionsSearchData id(String id) { + this.id = id; + return this; + } + + /** + * Optional resource identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public RumArchiveSessionsSearchData type(String type) { + this.type = type; + return this; + } + + /** + * JSON:API resource type. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } + + public void setType(String type) { + 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 RumArchiveSessionsSearchData + */ + @JsonAnySetter + public RumArchiveSessionsSearchData 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 RumArchiveSessionsSearchData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumArchiveSessionsSearchData rumArchiveSessionsSearchData = (RumArchiveSessionsSearchData) o; + return Objects.equals(this.attributes, rumArchiveSessionsSearchData.attributes) + && Objects.equals(this.id, rumArchiveSessionsSearchData.id) + && Objects.equals(this.type, rumArchiveSessionsSearchData.type) + && Objects.equals( + this.additionalProperties, rumArchiveSessionsSearchData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumArchiveSessionsSearchData {\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/RumArchiveSessionsSearchRequest.java b/src/main/java/com/datadog/api/client/v2/model/RumArchiveSessionsSearchRequest.java new file mode 100644 index 00000000000..144b1408d0b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumArchiveSessionsSearchRequest.java @@ -0,0 +1,151 @@ +/* + * 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; + +/** JSON:API document. */ +@JsonPropertyOrder({RumArchiveSessionsSearchRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumArchiveSessionsSearchRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private RumArchiveSessionsSearchData data; + + public RumArchiveSessionsSearchRequest() {} + + @JsonCreator + public RumArchiveSessionsSearchRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + RumArchiveSessionsSearchData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public RumArchiveSessionsSearchRequest data(RumArchiveSessionsSearchData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * JSON:API resource. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumArchiveSessionsSearchData getData() { + return data; + } + + public void setData(RumArchiveSessionsSearchData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 RumArchiveSessionsSearchRequest + */ + @JsonAnySetter + public RumArchiveSessionsSearchRequest 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 RumArchiveSessionsSearchRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumArchiveSessionsSearchRequest rumArchiveSessionsSearchRequest = + (RumArchiveSessionsSearchRequest) o; + return Objects.equals(this.data, rumArchiveSessionsSearchRequest.data) + && Objects.equals( + this.additionalProperties, rumArchiveSessionsSearchRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumArchiveSessionsSearchRequest {\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/RumManagedArchiveErrorResponse.java b/src/main/java/com/datadog/api/client/v2/model/RumManagedArchiveErrorResponse.java new file mode 100644 index 00000000000..245c8b81e23 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumManagedArchiveErrorResponse.java @@ -0,0 +1,152 @@ +/* + * 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; + +/** API error response. */ +@JsonPropertyOrder({RumManagedArchiveErrorResponse.JSON_PROPERTY_ERRORS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumManagedArchiveErrorResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ERRORS = "errors"; + private List errors = new ArrayList<>(); + + public RumManagedArchiveErrorResponse() {} + + @JsonCreator + public RumManagedArchiveErrorResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ERRORS) List errors) { + this.errors = errors; + } + + public RumManagedArchiveErrorResponse errors(List errors) { + this.errors = errors; + return this; + } + + public RumManagedArchiveErrorResponse addErrorsItem(Object errorsItem) { + this.errors.add(errorsItem); + return this; + } + + /** + * Errors as plain-text messages or JSON:API error objects containing status, title, and detail. + * + * @return errors + */ + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getErrors() { + return errors; + } + + public void setErrors(List errors) { + this.errors = errors; + } + + /** + * 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 RumManagedArchiveErrorResponse + */ + @JsonAnySetter + public RumManagedArchiveErrorResponse 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 RumManagedArchiveErrorResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumManagedArchiveErrorResponse rumManagedArchiveErrorResponse = + (RumManagedArchiveErrorResponse) o; + return Objects.equals(this.errors, rumManagedArchiveErrorResponse.errors) + && Objects.equals( + this.additionalProperties, rumManagedArchiveErrorResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(errors, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumManagedArchiveErrorResponse {\n"); + sb.append(" errors: ").append(toIndentedString(errors)).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/RumRecoveredSession.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveredSession.java new file mode 100644 index 00000000000..386809dd5c8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveredSession.java @@ -0,0 +1,265 @@ +/* + * 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 java.util.UUID; + +/** Progress for one targeted session. */ +@JsonPropertyOrder({ + RumRecoveredSession.JSON_PROPERTY_APPLICATION_ID, + RumRecoveredSession.JSON_PROPERTY_ERROR_MESSAGE, + RumRecoveredSession.JSON_PROPERTY_EVENTS_RECOVERED, + RumRecoveredSession.JSON_PROPERTY_SESSION_ID, + RumRecoveredSession.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRecoveredSession { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_APPLICATION_ID = "application_id"; + private UUID applicationId; + + public static final String JSON_PROPERTY_ERROR_MESSAGE = "error_message"; + private String errorMessage; + + public static final String JSON_PROPERTY_EVENTS_RECOVERED = "events_recovered"; + private Long eventsRecovered; + + public static final String JSON_PROPERTY_SESSION_ID = "session_id"; + private UUID sessionId; + + public static final String JSON_PROPERTY_STATUS = "status"; + private RumRecoverySessionStatus status; + + public RumRecoveredSession() {} + + @JsonCreator + public RumRecoveredSession( + @JsonProperty(required = true, value = JSON_PROPERTY_APPLICATION_ID) UUID applicationId, + @JsonProperty(required = true, value = JSON_PROPERTY_EVENTS_RECOVERED) Long eventsRecovered, + @JsonProperty(required = true, value = JSON_PROPERTY_SESSION_ID) UUID sessionId, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) + RumRecoverySessionStatus status) { + this.applicationId = applicationId; + this.eventsRecovered = eventsRecovered; + this.sessionId = sessionId; + this.status = status; + this.unparsed |= !status.isValid(); + } + + public RumRecoveredSession applicationId(UUID applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * Application UUID. + * + * @return applicationId + */ + @JsonProperty(JSON_PROPERTY_APPLICATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getApplicationId() { + return applicationId; + } + + public void setApplicationId(UUID applicationId) { + this.applicationId = applicationId; + } + + public RumRecoveredSession errorMessage(String errorMessage) { + this.errorMessage = errorMessage; + return this; + } + + /** + * Failure details, if present. + * + * @return errorMessage + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getErrorMessage() { + return errorMessage; + } + + public void setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + } + + public RumRecoveredSession eventsRecovered(Long eventsRecovered) { + this.eventsRecovered = eventsRecovered; + return this; + } + + /** + * Recovered event count. minimum: 0 + * + * @return eventsRecovered + */ + @JsonProperty(JSON_PROPERTY_EVENTS_RECOVERED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getEventsRecovered() { + return eventsRecovered; + } + + public void setEventsRecovered(Long eventsRecovered) { + this.eventsRecovered = eventsRecovered; + } + + public RumRecoveredSession sessionId(UUID sessionId) { + this.sessionId = sessionId; + return this; + } + + /** + * Session identifier. + * + * @return sessionId + */ + @JsonProperty(JSON_PROPERTY_SESSION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getSessionId() { + return sessionId; + } + + public void setSessionId(UUID sessionId) { + this.sessionId = sessionId; + } + + public RumRecoveredSession status(RumRecoverySessionStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * Session availability or recovery state. RECOVERED indicates that the session is + * ready to query. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRecoverySessionStatus getStatus() { + return status; + } + + public void setStatus(RumRecoverySessionStatus status) { + if (!status.isValid()) { + this.unparsed = true; + } + this.status = status; + } + + /** + * 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 RumRecoveredSession + */ + @JsonAnySetter + public RumRecoveredSession 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 RumRecoveredSession object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRecoveredSession rumRecoveredSession = (RumRecoveredSession) o; + return Objects.equals(this.applicationId, rumRecoveredSession.applicationId) + && Objects.equals(this.errorMessage, rumRecoveredSession.errorMessage) + && Objects.equals(this.eventsRecovered, rumRecoveredSession.eventsRecovered) + && Objects.equals(this.sessionId, rumRecoveredSession.sessionId) + && Objects.equals(this.status, rumRecoveredSession.status) + && Objects.equals(this.additionalProperties, rumRecoveredSession.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + applicationId, errorMessage, eventsRecovered, sessionId, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRecoveredSession {\n"); + sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); + sb.append(" errorMessage: ").append(toIndentedString(errorMessage)).append("\n"); + sb.append(" eventsRecovered: ").append(toIndentedString(eventsRecovered)).append("\n"); + sb.append(" sessionId: ").append(toIndentedString(sessionId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/RumRecoveryBatchCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryBatchCreateAttributes.java new file mode 100644 index 00000000000..6d2554f645c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryBatchCreateAttributes.java @@ -0,0 +1,269 @@ +/* + * 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; + +/** + * Recover sessions selected by a query. The range cannot exceed 180 days; from cannot be more than + * 4 years ago and to cannot be more than 1 hour in the future. Session availability depends on the + * configured archive retention. + */ +@JsonPropertyOrder({ + RumRecoveryBatchCreateAttributes.JSON_PROPERTY_ESTIMATED_COUNT, + RumRecoveryBatchCreateAttributes.JSON_PROPERTY_FROM, + RumRecoveryBatchCreateAttributes.JSON_PROPERTY_QUERY, + RumRecoveryBatchCreateAttributes.JSON_PROPERTY_REQUEST_TYPE, + RumRecoveryBatchCreateAttributes.JSON_PROPERTY_TO +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRecoveryBatchCreateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ESTIMATED_COUNT = "estimated_count"; + private Long estimatedCount; + + public static final String JSON_PROPERTY_FROM = "from"; + private Long from; + + public static final String JSON_PROPERTY_QUERY = "query"; + private String query; + + public static final String JSON_PROPERTY_REQUEST_TYPE = "request_type"; + private RumRecoveryBatchRequestType requestType; + + public static final String JSON_PROPERTY_TO = "to"; + private Long to; + + public RumRecoveryBatchCreateAttributes() {} + + @JsonCreator + public RumRecoveryBatchCreateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_FROM) Long from, + @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query, + @JsonProperty(required = true, value = JSON_PROPERTY_REQUEST_TYPE) + RumRecoveryBatchRequestType requestType, + @JsonProperty(required = true, value = JSON_PROPERTY_TO) Long to) { + this.from = from; + this.query = query; + this.requestType = requestType; + this.unparsed |= !requestType.isValid(); + this.to = to; + } + + public RumRecoveryBatchCreateAttributes estimatedCount(Long estimatedCount) { + this.estimatedCount = estimatedCount; + return this; + } + + /** + * Optional client estimate. Creation validates and stores a fresh server estimate instead of this + * value. minimum: 0 + * + * @return estimatedCount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATED_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getEstimatedCount() { + return estimatedCount; + } + + public void setEstimatedCount(Long estimatedCount) { + this.estimatedCount = estimatedCount; + } + + public RumRecoveryBatchCreateAttributes from(Long from) { + this.from = from; + return this; + } + + /** + * Start of the range in Unix milliseconds. Must be positive and earlier than to. minimum: 1 + * + * @return from + */ + @JsonProperty(JSON_PROPERTY_FROM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getFrom() { + return from; + } + + public void setFrom(Long from) { + this.from = from; + } + + public RumRecoveryBatchCreateAttributes query(String query) { + this.query = query; + return this; + } + + /** + * RUM search query. Not blank, at most 4096 bytes for batch creation and count. + * + * @return query + */ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuery() { + return query; + } + + public void setQuery(String query) { + this.query = query; + } + + public RumRecoveryBatchCreateAttributes requestType(RumRecoveryBatchRequestType requestType) { + this.requestType = requestType; + this.unparsed |= !requestType.isValid(); + return this; + } + + /** + * Query-based batch recovery. + * + * @return requestType + */ + @JsonProperty(JSON_PROPERTY_REQUEST_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRecoveryBatchRequestType getRequestType() { + return requestType; + } + + public void setRequestType(RumRecoveryBatchRequestType requestType) { + if (!requestType.isValid()) { + this.unparsed = true; + } + this.requestType = requestType; + } + + public RumRecoveryBatchCreateAttributes to(Long to) { + this.to = to; + return this; + } + + /** + * End of the range in Unix milliseconds. minimum: 1 + * + * @return to + */ + @JsonProperty(JSON_PROPERTY_TO) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getTo() { + return to; + } + + public void setTo(Long to) { + this.to = to; + } + + /** + * 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 RumRecoveryBatchCreateAttributes + */ + @JsonAnySetter + public RumRecoveryBatchCreateAttributes 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 RumRecoveryBatchCreateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRecoveryBatchCreateAttributes rumRecoveryBatchCreateAttributes = + (RumRecoveryBatchCreateAttributes) o; + return Objects.equals(this.estimatedCount, rumRecoveryBatchCreateAttributes.estimatedCount) + && Objects.equals(this.from, rumRecoveryBatchCreateAttributes.from) + && Objects.equals(this.query, rumRecoveryBatchCreateAttributes.query) + && Objects.equals(this.requestType, rumRecoveryBatchCreateAttributes.requestType) + && Objects.equals(this.to, rumRecoveryBatchCreateAttributes.to) + && Objects.equals( + this.additionalProperties, rumRecoveryBatchCreateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(estimatedCount, from, query, requestType, to, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRecoveryBatchCreateAttributes {\n"); + sb.append(" estimatedCount: ").append(toIndentedString(estimatedCount)).append("\n"); + sb.append(" from: ").append(toIndentedString(from)).append("\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" requestType: ").append(toIndentedString(requestType)).append("\n"); + sb.append(" to: ").append(toIndentedString(to)).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/RumRecoveryBatchListAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryBatchListAttributes.java new file mode 100644 index 00000000000..eff823d2894 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryBatchListAttributes.java @@ -0,0 +1,544 @@ +/* + * 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.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * Batch recovery progress. Status updates can appear here before they appear in request details. + */ +@JsonPropertyOrder({ + RumRecoveryBatchListAttributes.JSON_PROPERTY_CREATED_AT, + RumRecoveryBatchListAttributes.JSON_PROPERTY_DISCOVERY_STATUS, + RumRecoveryBatchListAttributes.JSON_PROPERTY_ESTIMATED_COUNT, + RumRecoveryBatchListAttributes.JSON_PROPERTY_FROM, + RumRecoveryBatchListAttributes.JSON_PROPERTY_QUERY, + RumRecoveryBatchListAttributes.JSON_PROPERTY_SESSIONS_DISCOVERED, + RumRecoveryBatchListAttributes.JSON_PROPERTY_SESSIONS_FAILED, + RumRecoveryBatchListAttributes.JSON_PROPERTY_SESSIONS_PROCESSED, + RumRecoveryBatchListAttributes.JSON_PROPERTY_SLICES_COMPLETED, + RumRecoveryBatchListAttributes.JSON_PROPERTY_SLICES_FAILED, + RumRecoveryBatchListAttributes.JSON_PROPERTY_STATUS, + RumRecoveryBatchListAttributes.JSON_PROPERTY_TO, + RumRecoveryBatchListAttributes.JSON_PROPERTY_TOTAL_SLICES, + RumRecoveryBatchListAttributes.JSON_PROPERTY_UPDATED_AT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRecoveryBatchListAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_DISCOVERY_STATUS = "discovery_status"; + private RumRecoveryDiscoveryStatus discoveryStatus; + + public static final String JSON_PROPERTY_ESTIMATED_COUNT = "estimated_count"; + private Long estimatedCount; + + public static final String JSON_PROPERTY_FROM = "from"; + private Long from; + + public static final String JSON_PROPERTY_QUERY = "query"; + private String query; + + public static final String JSON_PROPERTY_SESSIONS_DISCOVERED = "sessions_discovered"; + private Long sessionsDiscovered; + + public static final String JSON_PROPERTY_SESSIONS_FAILED = "sessions_failed"; + private Long sessionsFailed; + + public static final String JSON_PROPERTY_SESSIONS_PROCESSED = "sessions_processed"; + private Long sessionsProcessed; + + public static final String JSON_PROPERTY_SLICES_COMPLETED = "slices_completed"; + private Long slicesCompleted; + + public static final String JSON_PROPERTY_SLICES_FAILED = "slices_failed"; + private Long slicesFailed; + + public static final String JSON_PROPERTY_STATUS = "status"; + private RumRecoveryRequestStatus status; + + public static final String JSON_PROPERTY_TO = "to"; + private Long to; + + public static final String JSON_PROPERTY_TOTAL_SLICES = "total_slices"; + private Long totalSlices; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private OffsetDateTime updatedAt; + + public RumRecoveryBatchListAttributes() {} + + @JsonCreator + public RumRecoveryBatchListAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_DISCOVERY_STATUS) + RumRecoveryDiscoveryStatus discoveryStatus, + @JsonProperty(required = true, value = JSON_PROPERTY_FROM) Long from, + @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query, + @JsonProperty(required = true, value = JSON_PROPERTY_SESSIONS_DISCOVERED) + Long sessionsDiscovered, + @JsonProperty(required = true, value = JSON_PROPERTY_SESSIONS_FAILED) Long sessionsFailed, + @JsonProperty(required = true, value = JSON_PROPERTY_SESSIONS_PROCESSED) + Long sessionsProcessed, + @JsonProperty(required = true, value = JSON_PROPERTY_SLICES_COMPLETED) Long slicesCompleted, + @JsonProperty(required = true, value = JSON_PROPERTY_SLICES_FAILED) Long slicesFailed, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) RumRecoveryRequestStatus status, + @JsonProperty(required = true, value = JSON_PROPERTY_TO) Long to, + @JsonProperty(required = true, value = JSON_PROPERTY_TOTAL_SLICES) Long totalSlices, + @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt) { + this.createdAt = createdAt; + this.discoveryStatus = discoveryStatus; + this.unparsed |= !discoveryStatus.isValid(); + this.from = from; + this.query = query; + this.sessionsDiscovered = sessionsDiscovered; + this.sessionsFailed = sessionsFailed; + this.sessionsProcessed = sessionsProcessed; + this.slicesCompleted = slicesCompleted; + this.slicesFailed = slicesFailed; + this.status = status; + this.unparsed |= !status.isValid(); + this.to = to; + this.totalSlices = totalSlices; + this.updatedAt = updatedAt; + } + + public RumRecoveryBatchListAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Creation time. + * + * @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 RumRecoveryBatchListAttributes discoveryStatus( + RumRecoveryDiscoveryStatus discoveryStatus) { + this.discoveryStatus = discoveryStatus; + this.unparsed |= !discoveryStatus.isValid(); + return this; + } + + /** + * Batch discovery state. QUEUED indicates that the request is waiting for processing capacity. + * + * @return discoveryStatus + */ + @JsonProperty(JSON_PROPERTY_DISCOVERY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRecoveryDiscoveryStatus getDiscoveryStatus() { + return discoveryStatus; + } + + public void setDiscoveryStatus(RumRecoveryDiscoveryStatus discoveryStatus) { + if (!discoveryStatus.isValid()) { + this.unparsed = true; + } + this.discoveryStatus = discoveryStatus; + } + + public RumRecoveryBatchListAttributes estimatedCount(Long estimatedCount) { + this.estimatedCount = estimatedCount; + return this; + } + + /** + * Batch estimate stored at creation, when present. New batches use a fresh server estimate; older + * batches may contain a client-supplied estimate. minimum: 0 + * + * @return estimatedCount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATED_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getEstimatedCount() { + return estimatedCount; + } + + public void setEstimatedCount(Long estimatedCount) { + this.estimatedCount = estimatedCount; + } + + public RumRecoveryBatchListAttributes from(Long from) { + this.from = from; + return this; + } + + /** + * Start of the range in Unix milliseconds. Must be positive and earlier than to. minimum: 1 + * + * @return from + */ + @JsonProperty(JSON_PROPERTY_FROM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getFrom() { + return from; + } + + public void setFrom(Long from) { + this.from = from; + } + + public RumRecoveryBatchListAttributes query(String query) { + this.query = query; + return this; + } + + /** + * RUM search query. Not blank, at most 4096 bytes for batch creation and count. + * + * @return query + */ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuery() { + return query; + } + + public void setQuery(String query) { + this.query = query; + } + + public RumRecoveryBatchListAttributes sessionsDiscovered(Long sessionsDiscovered) { + this.sessionsDiscovered = sessionsDiscovered; + return this; + } + + /** + * Discovered sessions. minimum: 0 + * + * @return sessionsDiscovered + */ + @JsonProperty(JSON_PROPERTY_SESSIONS_DISCOVERED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getSessionsDiscovered() { + return sessionsDiscovered; + } + + public void setSessionsDiscovered(Long sessionsDiscovered) { + this.sessionsDiscovered = sessionsDiscovered; + } + + public RumRecoveryBatchListAttributes sessionsFailed(Long sessionsFailed) { + this.sessionsFailed = sessionsFailed; + return this; + } + + /** + * Failed sessions. minimum: 0 + * + * @return sessionsFailed + */ + @JsonProperty(JSON_PROPERTY_SESSIONS_FAILED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getSessionsFailed() { + return sessionsFailed; + } + + public void setSessionsFailed(Long sessionsFailed) { + this.sessionsFailed = sessionsFailed; + } + + public RumRecoveryBatchListAttributes sessionsProcessed(Long sessionsProcessed) { + this.sessionsProcessed = sessionsProcessed; + return this; + } + + /** + * Processed sessions. minimum: 0 + * + * @return sessionsProcessed + */ + @JsonProperty(JSON_PROPERTY_SESSIONS_PROCESSED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getSessionsProcessed() { + return sessionsProcessed; + } + + public void setSessionsProcessed(Long sessionsProcessed) { + this.sessionsProcessed = sessionsProcessed; + } + + public RumRecoveryBatchListAttributes slicesCompleted(Long slicesCompleted) { + this.slicesCompleted = slicesCompleted; + return this; + } + + /** + * Completed slices. minimum: 0 + * + * @return slicesCompleted + */ + @JsonProperty(JSON_PROPERTY_SLICES_COMPLETED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getSlicesCompleted() { + return slicesCompleted; + } + + public void setSlicesCompleted(Long slicesCompleted) { + this.slicesCompleted = slicesCompleted; + } + + public RumRecoveryBatchListAttributes slicesFailed(Long slicesFailed) { + this.slicesFailed = slicesFailed; + return this; + } + + /** + * Failed slices. minimum: 0 + * + * @return slicesFailed + */ + @JsonProperty(JSON_PROPERTY_SLICES_FAILED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getSlicesFailed() { + return slicesFailed; + } + + public void setSlicesFailed(Long slicesFailed) { + this.slicesFailed = slicesFailed; + } + + public RumRecoveryBatchListAttributes status(RumRecoveryRequestStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * Recovery request state. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRecoveryRequestStatus getStatus() { + return status; + } + + public void setStatus(RumRecoveryRequestStatus status) { + if (!status.isValid()) { + this.unparsed = true; + } + this.status = status; + } + + public RumRecoveryBatchListAttributes to(Long to) { + this.to = to; + return this; + } + + /** + * End of the range in Unix milliseconds. minimum: 1 + * + * @return to + */ + @JsonProperty(JSON_PROPERTY_TO) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getTo() { + return to; + } + + public void setTo(Long to) { + this.to = to; + } + + public RumRecoveryBatchListAttributes totalSlices(Long totalSlices) { + this.totalSlices = totalSlices; + return this; + } + + /** + * Total discovery slices. minimum: 0 + * + * @return totalSlices + */ + @JsonProperty(JSON_PROPERTY_TOTAL_SLICES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getTotalSlices() { + return totalSlices; + } + + public void setTotalSlices(Long totalSlices) { + this.totalSlices = totalSlices; + } + + public RumRecoveryBatchListAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Last update time. + * + * @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; + } + + /** + * 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 RumRecoveryBatchListAttributes + */ + @JsonAnySetter + public RumRecoveryBatchListAttributes 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 RumRecoveryBatchListAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRecoveryBatchListAttributes rumRecoveryBatchListAttributes = + (RumRecoveryBatchListAttributes) o; + return Objects.equals(this.createdAt, rumRecoveryBatchListAttributes.createdAt) + && Objects.equals(this.discoveryStatus, rumRecoveryBatchListAttributes.discoveryStatus) + && Objects.equals(this.estimatedCount, rumRecoveryBatchListAttributes.estimatedCount) + && Objects.equals(this.from, rumRecoveryBatchListAttributes.from) + && Objects.equals(this.query, rumRecoveryBatchListAttributes.query) + && Objects.equals( + this.sessionsDiscovered, rumRecoveryBatchListAttributes.sessionsDiscovered) + && Objects.equals(this.sessionsFailed, rumRecoveryBatchListAttributes.sessionsFailed) + && Objects.equals(this.sessionsProcessed, rumRecoveryBatchListAttributes.sessionsProcessed) + && Objects.equals(this.slicesCompleted, rumRecoveryBatchListAttributes.slicesCompleted) + && Objects.equals(this.slicesFailed, rumRecoveryBatchListAttributes.slicesFailed) + && Objects.equals(this.status, rumRecoveryBatchListAttributes.status) + && Objects.equals(this.to, rumRecoveryBatchListAttributes.to) + && Objects.equals(this.totalSlices, rumRecoveryBatchListAttributes.totalSlices) + && Objects.equals(this.updatedAt, rumRecoveryBatchListAttributes.updatedAt) + && Objects.equals( + this.additionalProperties, rumRecoveryBatchListAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + discoveryStatus, + estimatedCount, + from, + query, + sessionsDiscovered, + sessionsFailed, + sessionsProcessed, + slicesCompleted, + slicesFailed, + status, + to, + totalSlices, + updatedAt, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRecoveryBatchListAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" discoveryStatus: ").append(toIndentedString(discoveryStatus)).append("\n"); + sb.append(" estimatedCount: ").append(toIndentedString(estimatedCount)).append("\n"); + sb.append(" from: ").append(toIndentedString(from)).append("\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" sessionsDiscovered: ").append(toIndentedString(sessionsDiscovered)).append("\n"); + sb.append(" sessionsFailed: ").append(toIndentedString(sessionsFailed)).append("\n"); + sb.append(" sessionsProcessed: ").append(toIndentedString(sessionsProcessed)).append("\n"); + sb.append(" slicesCompleted: ").append(toIndentedString(slicesCompleted)).append("\n"); + sb.append(" slicesFailed: ").append(toIndentedString(slicesFailed)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" to: ").append(toIndentedString(to)).append("\n"); + sb.append(" totalSlices: ").append(toIndentedString(totalSlices)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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/RumRecoveryBatchListData.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryBatchListData.java new file mode 100644 index 00000000000..635f3ac0af4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryBatchListData.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; + +/** JSON:API resource. */ +@JsonPropertyOrder({ + RumRecoveryBatchListData.JSON_PROPERTY_ATTRIBUTES, + RumRecoveryBatchListData.JSON_PROPERTY_ID, + RumRecoveryBatchListData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRecoveryBatchListData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RumRecoveryBatchListAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private RumRecoveryBatchListDataType type; + + public RumRecoveryBatchListData() {} + + @JsonCreator + public RumRecoveryBatchListData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + RumRecoveryBatchListAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + RumRecoveryBatchListDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public RumRecoveryBatchListData attributes(RumRecoveryBatchListAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Batch recovery progress. Status updates can appear here before they appear in request details. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRecoveryBatchListAttributes getAttributes() { + return attributes; + } + + public void setAttributes(RumRecoveryBatchListAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public RumRecoveryBatchListData id(String id) { + this.id = id; + return this; + } + + /** + * Resource identifier. + * + * @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 RumRecoveryBatchListData type(RumRecoveryBatchListDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * JSON:API resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRecoveryBatchListDataType getType() { + return type; + } + + public void setType(RumRecoveryBatchListDataType 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 RumRecoveryBatchListData + */ + @JsonAnySetter + public RumRecoveryBatchListData 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 RumRecoveryBatchListData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRecoveryBatchListData rumRecoveryBatchListData = (RumRecoveryBatchListData) o; + return Objects.equals(this.attributes, rumRecoveryBatchListData.attributes) + && Objects.equals(this.id, rumRecoveryBatchListData.id) + && Objects.equals(this.type, rumRecoveryBatchListData.type) + && Objects.equals(this.additionalProperties, rumRecoveryBatchListData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRecoveryBatchListData {\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/RumRecoveryBatchListDataType.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryBatchListDataType.java new file mode 100644 index 00000000000..a9ce095f565 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryBatchListDataType.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; + +/** JSON:API resource type. */ +@JsonSerialize(using = RumRecoveryBatchListDataType.RumRecoveryBatchListDataTypeSerializer.class) +public class RumRecoveryBatchListDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("rum_batch_recovery_request")); + + public static final RumRecoveryBatchListDataType RUM_BATCH_RECOVERY_REQUEST = + new RumRecoveryBatchListDataType("rum_batch_recovery_request"); + + RumRecoveryBatchListDataType(String value) { + super(value, allowedValues); + } + + public static class RumRecoveryBatchListDataTypeSerializer + extends StdSerializer { + public RumRecoveryBatchListDataTypeSerializer(Class t) { + super(t); + } + + public RumRecoveryBatchListDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + RumRecoveryBatchListDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static RumRecoveryBatchListDataType fromValue(String value) { + return new RumRecoveryBatchListDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RumRecoveryBatchListMeta.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryBatchListMeta.java new file mode 100644 index 00000000000..c8c5a6ace0f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryBatchListMeta.java @@ -0,0 +1,135 @@ +/* + * 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.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; + +/** Batch-list pagination metadata. */ +@JsonPropertyOrder({RumRecoveryBatchListMeta.JSON_PROPERTY_NEXT_CURSOR}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRecoveryBatchListMeta { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_NEXT_CURSOR = "next_cursor"; + private String nextCursor; + + public RumRecoveryBatchListMeta nextCursor(String nextCursor) { + this.nextCursor = nextCursor; + return this; + } + + /** + * Opaque next-page cursor. Omitted on the final page. + * + * @return nextCursor + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT_CURSOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNextCursor() { + return nextCursor; + } + + public void setNextCursor(String nextCursor) { + this.nextCursor = nextCursor; + } + + /** + * 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 RumRecoveryBatchListMeta + */ + @JsonAnySetter + public RumRecoveryBatchListMeta 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 RumRecoveryBatchListMeta object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRecoveryBatchListMeta rumRecoveryBatchListMeta = (RumRecoveryBatchListMeta) o; + return Objects.equals(this.nextCursor, rumRecoveryBatchListMeta.nextCursor) + && Objects.equals(this.additionalProperties, rumRecoveryBatchListMeta.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(nextCursor, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRecoveryBatchListMeta {\n"); + sb.append(" nextCursor: ").append(toIndentedString(nextCursor)).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/RumRecoveryBatchListResponse.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryBatchListResponse.java new file mode 100644 index 00000000000..38b1c3f4508 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryBatchListResponse.java @@ -0,0 +1,200 @@ +/* + * 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; + +/** JSON:API document. */ +@JsonPropertyOrder({ + RumRecoveryBatchListResponse.JSON_PROPERTY_DATA, + RumRecoveryBatchListResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRecoveryBatchListResponse { + @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 RumRecoveryBatchListMeta meta; + + public RumRecoveryBatchListResponse() {} + + @JsonCreator + public RumRecoveryBatchListResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data, + @JsonProperty(required = true, value = JSON_PROPERTY_META) RumRecoveryBatchListMeta meta) { + this.data = data; + for (RumRecoveryBatchListData item : data) { + this.unparsed |= item.unparsed; + } + this.meta = meta; + this.unparsed |= meta.unparsed; + } + + public RumRecoveryBatchListResponse data(List data) { + this.data = data; + for (RumRecoveryBatchListData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public RumRecoveryBatchListResponse addDataItem(RumRecoveryBatchListData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Batch requests ordered newest first. A filtered page can be empty while meta.next_cursor is + * present. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (RumRecoveryBatchListData item : data) { + this.unparsed |= item.unparsed; + } + } + } + + public RumRecoveryBatchListResponse meta(RumRecoveryBatchListMeta meta) { + this.meta = meta; + this.unparsed |= meta.unparsed; + return this; + } + + /** + * Batch-list pagination metadata. + * + * @return meta + */ + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRecoveryBatchListMeta getMeta() { + return meta; + } + + public void setMeta(RumRecoveryBatchListMeta meta) { + this.meta = meta; + if (meta != null) { + this.unparsed |= meta.unparsed; + } + } + + /** + * 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 RumRecoveryBatchListResponse + */ + @JsonAnySetter + public RumRecoveryBatchListResponse 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 RumRecoveryBatchListResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRecoveryBatchListResponse rumRecoveryBatchListResponse = (RumRecoveryBatchListResponse) o; + return Objects.equals(this.data, rumRecoveryBatchListResponse.data) + && Objects.equals(this.meta, rumRecoveryBatchListResponse.meta) + && Objects.equals( + this.additionalProperties, rumRecoveryBatchListResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRecoveryBatchListResponse {\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/RumRecoveryBatchRequestType.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryBatchRequestType.java new file mode 100644 index 00000000000..68f08c745ab --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryBatchRequestType.java @@ -0,0 +1,55 @@ +/* + * 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; + +/** Query-based batch recovery. */ +@JsonSerialize(using = RumRecoveryBatchRequestType.RumRecoveryBatchRequestTypeSerializer.class) +public class RumRecoveryBatchRequestType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("batch")); + + public static final RumRecoveryBatchRequestType BATCH = new RumRecoveryBatchRequestType("batch"); + + RumRecoveryBatchRequestType(String value) { + super(value, allowedValues); + } + + public static class RumRecoveryBatchRequestTypeSerializer + extends StdSerializer { + public RumRecoveryBatchRequestTypeSerializer(Class t) { + super(t); + } + + public RumRecoveryBatchRequestTypeSerializer() { + this(null); + } + + @Override + public void serialize( + RumRecoveryBatchRequestType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static RumRecoveryBatchRequestType fromValue(String value) { + return new RumRecoveryBatchRequestType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCancelAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCancelAttributes.java new file mode 100644 index 00000000000..b6ee89e1f60 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCancelAttributes.java @@ -0,0 +1,149 @@ +/* + * 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; + +/** Batch cancellation. */ +@JsonPropertyOrder({RumRecoveryCancelAttributes.JSON_PROPERTY_STATUS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRecoveryCancelAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_STATUS = "status"; + private RumRecoveryCancelStatus status; + + public RumRecoveryCancelAttributes() {} + + @JsonCreator + public RumRecoveryCancelAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) RumRecoveryCancelStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + } + + public RumRecoveryCancelAttributes status(RumRecoveryCancelStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * Requested cancellation state. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRecoveryCancelStatus getStatus() { + return status; + } + + public void setStatus(RumRecoveryCancelStatus status) { + if (!status.isValid()) { + this.unparsed = true; + } + this.status = status; + } + + /** + * 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 RumRecoveryCancelAttributes + */ + @JsonAnySetter + public RumRecoveryCancelAttributes 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 RumRecoveryCancelAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRecoveryCancelAttributes rumRecoveryCancelAttributes = (RumRecoveryCancelAttributes) o; + return Objects.equals(this.status, rumRecoveryCancelAttributes.status) + && Objects.equals( + this.additionalProperties, rumRecoveryCancelAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRecoveryCancelAttributes {\n"); + sb.append(" status: ").append(toIndentedString(status)).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/RumRecoveryCancelData.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCancelData.java new file mode 100644 index 00000000000..133412a3d78 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCancelData.java @@ -0,0 +1,205 @@ +/* + * 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; + +/** JSON:API resource. */ +@JsonPropertyOrder({ + RumRecoveryCancelData.JSON_PROPERTY_ATTRIBUTES, + RumRecoveryCancelData.JSON_PROPERTY_ID, + RumRecoveryCancelData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRecoveryCancelData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RumRecoveryCancelAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public RumRecoveryCancelData() {} + + @JsonCreator + public RumRecoveryCancelData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + RumRecoveryCancelAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + } + + public RumRecoveryCancelData attributes(RumRecoveryCancelAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Batch cancellation. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRecoveryCancelAttributes getAttributes() { + return attributes; + } + + public void setAttributes(RumRecoveryCancelAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public RumRecoveryCancelData id(String id) { + this.id = id; + return this; + } + + /** + * Optional resource identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public RumRecoveryCancelData type(String type) { + this.type = type; + return this; + } + + /** + * JSON:API resource type. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } + + public void setType(String type) { + 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 RumRecoveryCancelData + */ + @JsonAnySetter + public RumRecoveryCancelData 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 RumRecoveryCancelData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRecoveryCancelData rumRecoveryCancelData = (RumRecoveryCancelData) o; + return Objects.equals(this.attributes, rumRecoveryCancelData.attributes) + && Objects.equals(this.id, rumRecoveryCancelData.id) + && Objects.equals(this.type, rumRecoveryCancelData.type) + && Objects.equals(this.additionalProperties, rumRecoveryCancelData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRecoveryCancelData {\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/RumRecoveryCancelRequest.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCancelRequest.java new file mode 100644 index 00000000000..aba711b2534 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCancelRequest.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; + +/** JSON:API document. */ +@JsonPropertyOrder({RumRecoveryCancelRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRecoveryCancelRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private RumRecoveryCancelData data; + + public RumRecoveryCancelRequest() {} + + @JsonCreator + public RumRecoveryCancelRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) RumRecoveryCancelData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public RumRecoveryCancelRequest data(RumRecoveryCancelData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * JSON:API resource. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRecoveryCancelData getData() { + return data; + } + + public void setData(RumRecoveryCancelData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 RumRecoveryCancelRequest + */ + @JsonAnySetter + public RumRecoveryCancelRequest 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 RumRecoveryCancelRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRecoveryCancelRequest rumRecoveryCancelRequest = (RumRecoveryCancelRequest) o; + return Objects.equals(this.data, rumRecoveryCancelRequest.data) + && Objects.equals(this.additionalProperties, rumRecoveryCancelRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRecoveryCancelRequest {\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/RumRecoveryCancelResponse.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCancelResponse.java new file mode 100644 index 00000000000..571f4ed56f0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCancelResponse.java @@ -0,0 +1,150 @@ +/* + * 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; + +/** JSON:API document. */ +@JsonPropertyOrder({RumRecoveryCancelResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRecoveryCancelResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private RumRecoveryCancelResponseData data; + + public RumRecoveryCancelResponse() {} + + @JsonCreator + public RumRecoveryCancelResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + RumRecoveryCancelResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public RumRecoveryCancelResponse data(RumRecoveryCancelResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * JSON:API resource. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRecoveryCancelResponseData getData() { + return data; + } + + public void setData(RumRecoveryCancelResponseData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 RumRecoveryCancelResponse + */ + @JsonAnySetter + public RumRecoveryCancelResponse 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 RumRecoveryCancelResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRecoveryCancelResponse rumRecoveryCancelResponse = (RumRecoveryCancelResponse) o; + return Objects.equals(this.data, rumRecoveryCancelResponse.data) + && Objects.equals( + this.additionalProperties, rumRecoveryCancelResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRecoveryCancelResponse {\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/RumRecoveryCancelResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCancelResponseAttributes.java new file mode 100644 index 00000000000..879251d7f9a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCancelResponseAttributes.java @@ -0,0 +1,211 @@ +/* + * 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.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Batch cancellation acknowledgment. */ +@JsonPropertyOrder({ + RumRecoveryCancelResponseAttributes.JSON_PROPERTY_CANCELLED_AT, + RumRecoveryCancelResponseAttributes.JSON_PROPERTY_CANCELLED_BY, + RumRecoveryCancelResponseAttributes.JSON_PROPERTY_DISCOVERY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRecoveryCancelResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CANCELLED_AT = "cancelled_at"; + private OffsetDateTime cancelledAt; + + public static final String JSON_PROPERTY_CANCELLED_BY = "cancelled_by"; + private String cancelledBy; + + public static final String JSON_PROPERTY_DISCOVERY_STATUS = "discovery_status"; + private RumRecoveryDiscoveryStatus discoveryStatus; + + public RumRecoveryCancelResponseAttributes() {} + + @JsonCreator + public RumRecoveryCancelResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CANCELLED_AT) OffsetDateTime cancelledAt, + @JsonProperty(required = true, value = JSON_PROPERTY_CANCELLED_BY) String cancelledBy, + @JsonProperty(required = true, value = JSON_PROPERTY_DISCOVERY_STATUS) + RumRecoveryDiscoveryStatus discoveryStatus) { + this.cancelledAt = cancelledAt; + this.cancelledBy = cancelledBy; + this.discoveryStatus = discoveryStatus; + this.unparsed |= !discoveryStatus.isValid(); + } + + public RumRecoveryCancelResponseAttributes cancelledAt(OffsetDateTime cancelledAt) { + this.cancelledAt = cancelledAt; + return this; + } + + /** + * Cancellation time. + * + * @return cancelledAt + */ + @JsonProperty(JSON_PROPERTY_CANCELLED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCancelledAt() { + return cancelledAt; + } + + public void setCancelledAt(OffsetDateTime cancelledAt) { + this.cancelledAt = cancelledAt; + } + + public RumRecoveryCancelResponseAttributes cancelledBy(String cancelledBy) { + this.cancelledBy = cancelledBy; + return this; + } + + /** + * Handle of the user who canceled the batch. + * + * @return cancelledBy + */ + @JsonProperty(JSON_PROPERTY_CANCELLED_BY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCancelledBy() { + return cancelledBy; + } + + public void setCancelledBy(String cancelledBy) { + this.cancelledBy = cancelledBy; + } + + public RumRecoveryCancelResponseAttributes discoveryStatus( + RumRecoveryDiscoveryStatus discoveryStatus) { + this.discoveryStatus = discoveryStatus; + this.unparsed |= !discoveryStatus.isValid(); + return this; + } + + /** + * Batch discovery state. QUEUED indicates that the request is waiting for processing capacity. + * + * @return discoveryStatus + */ + @JsonProperty(JSON_PROPERTY_DISCOVERY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRecoveryDiscoveryStatus getDiscoveryStatus() { + return discoveryStatus; + } + + public void setDiscoveryStatus(RumRecoveryDiscoveryStatus discoveryStatus) { + if (!discoveryStatus.isValid()) { + this.unparsed = true; + } + this.discoveryStatus = discoveryStatus; + } + + /** + * 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 RumRecoveryCancelResponseAttributes + */ + @JsonAnySetter + public RumRecoveryCancelResponseAttributes 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 RumRecoveryCancelResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRecoveryCancelResponseAttributes rumRecoveryCancelResponseAttributes = + (RumRecoveryCancelResponseAttributes) o; + return Objects.equals(this.cancelledAt, rumRecoveryCancelResponseAttributes.cancelledAt) + && Objects.equals(this.cancelledBy, rumRecoveryCancelResponseAttributes.cancelledBy) + && Objects.equals(this.discoveryStatus, rumRecoveryCancelResponseAttributes.discoveryStatus) + && Objects.equals( + this.additionalProperties, rumRecoveryCancelResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(cancelledAt, cancelledBy, discoveryStatus, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRecoveryCancelResponseAttributes {\n"); + sb.append(" cancelledAt: ").append(toIndentedString(cancelledAt)).append("\n"); + sb.append(" cancelledBy: ").append(toIndentedString(cancelledBy)).append("\n"); + sb.append(" discoveryStatus: ").append(toIndentedString(discoveryStatus)).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/RumRecoveryCancelResponseData.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCancelResponseData.java new file mode 100644 index 00000000000..af8fab1bd34 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCancelResponseData.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; + +/** JSON:API resource. */ +@JsonPropertyOrder({ + RumRecoveryCancelResponseData.JSON_PROPERTY_ATTRIBUTES, + RumRecoveryCancelResponseData.JSON_PROPERTY_ID, + RumRecoveryCancelResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRecoveryCancelResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RumRecoveryCancelResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private RumRecoveryRequestType type; + + public RumRecoveryCancelResponseData() {} + + @JsonCreator + public RumRecoveryCancelResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + RumRecoveryCancelResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RumRecoveryRequestType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public RumRecoveryCancelResponseData attributes(RumRecoveryCancelResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Batch cancellation acknowledgment. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRecoveryCancelResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(RumRecoveryCancelResponseAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public RumRecoveryCancelResponseData id(String id) { + this.id = id; + return this; + } + + /** + * Resource identifier. + * + * @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 RumRecoveryCancelResponseData type(RumRecoveryRequestType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * JSON:API resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRecoveryRequestType getType() { + return type; + } + + public void setType(RumRecoveryRequestType 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 RumRecoveryCancelResponseData + */ + @JsonAnySetter + public RumRecoveryCancelResponseData 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 RumRecoveryCancelResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRecoveryCancelResponseData rumRecoveryCancelResponseData = (RumRecoveryCancelResponseData) o; + return Objects.equals(this.attributes, rumRecoveryCancelResponseData.attributes) + && Objects.equals(this.id, rumRecoveryCancelResponseData.id) + && Objects.equals(this.type, rumRecoveryCancelResponseData.type) + && Objects.equals( + this.additionalProperties, rumRecoveryCancelResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRecoveryCancelResponseData {\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/RumRecoveryCancelStatus.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCancelStatus.java new file mode 100644 index 00000000000..e281f98b8bf --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCancelStatus.java @@ -0,0 +1,55 @@ +/* + * 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; + +/** Requested cancellation state. */ +@JsonSerialize(using = RumRecoveryCancelStatus.RumRecoveryCancelStatusSerializer.class) +public class RumRecoveryCancelStatus extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("cancelled")); + + public static final RumRecoveryCancelStatus CANCELLED = new RumRecoveryCancelStatus("cancelled"); + + RumRecoveryCancelStatus(String value) { + super(value, allowedValues); + } + + public static class RumRecoveryCancelStatusSerializer + extends StdSerializer { + public RumRecoveryCancelStatusSerializer(Class t) { + super(t); + } + + public RumRecoveryCancelStatusSerializer() { + this(null); + } + + @Override + public void serialize( + RumRecoveryCancelStatus value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static RumRecoveryCancelStatus fromValue(String value) { + return new RumRecoveryCancelStatus(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCountAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCountAttributes.java new file mode 100644 index 00000000000..4575880913a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCountAttributes.java @@ -0,0 +1,206 @@ +/* + * 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; + +/** + * Query for a recovery estimate. The range cannot exceed 180 days; from cannot be more than 4 years + * ago and to cannot be more than 1 hour in the future. Session availability depends on the + * configured archive retention. + */ +@JsonPropertyOrder({ + RumRecoveryCountAttributes.JSON_PROPERTY_FROM, + RumRecoveryCountAttributes.JSON_PROPERTY_QUERY, + RumRecoveryCountAttributes.JSON_PROPERTY_TO +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRecoveryCountAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_FROM = "from"; + private Long from; + + public static final String JSON_PROPERTY_QUERY = "query"; + private String query; + + public static final String JSON_PROPERTY_TO = "to"; + private Long to; + + public RumRecoveryCountAttributes() {} + + @JsonCreator + public RumRecoveryCountAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_FROM) Long from, + @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query, + @JsonProperty(required = true, value = JSON_PROPERTY_TO) Long to) { + this.from = from; + this.query = query; + this.to = to; + } + + public RumRecoveryCountAttributes from(Long from) { + this.from = from; + return this; + } + + /** + * Start of the range in Unix milliseconds. Must be positive and earlier than to. minimum: 1 + * + * @return from + */ + @JsonProperty(JSON_PROPERTY_FROM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getFrom() { + return from; + } + + public void setFrom(Long from) { + this.from = from; + } + + public RumRecoveryCountAttributes query(String query) { + this.query = query; + return this; + } + + /** + * RUM search query. Not blank, at most 4096 bytes for batch creation and count. + * + * @return query + */ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuery() { + return query; + } + + public void setQuery(String query) { + this.query = query; + } + + public RumRecoveryCountAttributes to(Long to) { + this.to = to; + return this; + } + + /** + * End of the range in Unix milliseconds. minimum: 1 + * + * @return to + */ + @JsonProperty(JSON_PROPERTY_TO) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getTo() { + return to; + } + + public void setTo(Long to) { + this.to = to; + } + + /** + * 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 RumRecoveryCountAttributes + */ + @JsonAnySetter + public RumRecoveryCountAttributes 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 RumRecoveryCountAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRecoveryCountAttributes rumRecoveryCountAttributes = (RumRecoveryCountAttributes) o; + return Objects.equals(this.from, rumRecoveryCountAttributes.from) + && Objects.equals(this.query, rumRecoveryCountAttributes.query) + && Objects.equals(this.to, rumRecoveryCountAttributes.to) + && Objects.equals( + this.additionalProperties, rumRecoveryCountAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(from, query, to, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRecoveryCountAttributes {\n"); + sb.append(" from: ").append(toIndentedString(from)).append("\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" to: ").append(toIndentedString(to)).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/RumRecoveryCountRequest.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCountRequest.java new file mode 100644 index 00000000000..e356ac2cd3f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCountRequest.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; + +/** JSON:API document. */ +@JsonPropertyOrder({RumRecoveryCountRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRecoveryCountRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private RumRecoveryCountRequestData data; + + public RumRecoveryCountRequest() {} + + @JsonCreator + public RumRecoveryCountRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) RumRecoveryCountRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public RumRecoveryCountRequest data(RumRecoveryCountRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * JSON:API resource. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRecoveryCountRequestData getData() { + return data; + } + + public void setData(RumRecoveryCountRequestData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 RumRecoveryCountRequest + */ + @JsonAnySetter + public RumRecoveryCountRequest 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 RumRecoveryCountRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRecoveryCountRequest rumRecoveryCountRequest = (RumRecoveryCountRequest) o; + return Objects.equals(this.data, rumRecoveryCountRequest.data) + && Objects.equals(this.additionalProperties, rumRecoveryCountRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRecoveryCountRequest {\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/RumRecoveryCountRequestData.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCountRequestData.java new file mode 100644 index 00000000000..23823c434e2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCountRequestData.java @@ -0,0 +1,208 @@ +/* + * 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; + +/** JSON:API resource. */ +@JsonPropertyOrder({ + RumRecoveryCountRequestData.JSON_PROPERTY_ATTRIBUTES, + RumRecoveryCountRequestData.JSON_PROPERTY_ID, + RumRecoveryCountRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRecoveryCountRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RumRecoveryCountAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public RumRecoveryCountRequestData() {} + + @JsonCreator + public RumRecoveryCountRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + RumRecoveryCountAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + } + + public RumRecoveryCountRequestData attributes(RumRecoveryCountAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Query for a recovery estimate. The range cannot exceed 180 days; from cannot be more than 4 + * years ago and to cannot be more than 1 hour in the future. Session availability depends on the + * configured archive retention. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRecoveryCountAttributes getAttributes() { + return attributes; + } + + public void setAttributes(RumRecoveryCountAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public RumRecoveryCountRequestData id(String id) { + this.id = id; + return this; + } + + /** + * Optional resource identifier. + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public RumRecoveryCountRequestData type(String type) { + this.type = type; + return this; + } + + /** + * JSON:API resource type. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } + + public void setType(String type) { + 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 RumRecoveryCountRequestData + */ + @JsonAnySetter + public RumRecoveryCountRequestData 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 RumRecoveryCountRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRecoveryCountRequestData rumRecoveryCountRequestData = (RumRecoveryCountRequestData) o; + return Objects.equals(this.attributes, rumRecoveryCountRequestData.attributes) + && Objects.equals(this.id, rumRecoveryCountRequestData.id) + && Objects.equals(this.type, rumRecoveryCountRequestData.type) + && Objects.equals( + this.additionalProperties, rumRecoveryCountRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRecoveryCountRequestData {\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/RumRecoveryCountResponse.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCountResponse.java new file mode 100644 index 00000000000..5e9033e00b8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCountResponse.java @@ -0,0 +1,149 @@ +/* + * 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; + +/** JSON:API document. */ +@JsonPropertyOrder({RumRecoveryCountResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRecoveryCountResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private RumRecoveryCountResponseData data; + + public RumRecoveryCountResponse() {} + + @JsonCreator + public RumRecoveryCountResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + RumRecoveryCountResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public RumRecoveryCountResponse data(RumRecoveryCountResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * JSON:API resource. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRecoveryCountResponseData getData() { + return data; + } + + public void setData(RumRecoveryCountResponseData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 RumRecoveryCountResponse + */ + @JsonAnySetter + public RumRecoveryCountResponse 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 RumRecoveryCountResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRecoveryCountResponse rumRecoveryCountResponse = (RumRecoveryCountResponse) o; + return Objects.equals(this.data, rumRecoveryCountResponse.data) + && Objects.equals(this.additionalProperties, rumRecoveryCountResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRecoveryCountResponse {\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/RumRecoveryCountResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCountResponseAttributes.java new file mode 100644 index 00000000000..6a66b0c7f18 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCountResponseAttributes.java @@ -0,0 +1,181 @@ +/* + * 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; + +/** Approximate recoverable count. */ +@JsonPropertyOrder({ + RumRecoveryCountResponseAttributes.JSON_PROPERTY_ESTIMATED_COUNT, + RumRecoveryCountResponseAttributes.JSON_PROPERTY_MAX_RECOVERABLE_SESSIONS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRecoveryCountResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ESTIMATED_COUNT = "estimated_count"; + private Long estimatedCount; + + public static final String JSON_PROPERTY_MAX_RECOVERABLE_SESSIONS = "max_recoverable_sessions"; + private Long maxRecoverableSessions; + + public RumRecoveryCountResponseAttributes() {} + + @JsonCreator + public RumRecoveryCountResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_ESTIMATED_COUNT) Long estimatedCount, + @JsonProperty(required = true, value = JSON_PROPERTY_MAX_RECOVERABLE_SESSIONS) + Long maxRecoverableSessions) { + this.estimatedCount = estimatedCount; + this.maxRecoverableSessions = maxRecoverableSessions; + } + + public RumRecoveryCountResponseAttributes estimatedCount(Long estimatedCount) { + this.estimatedCount = estimatedCount; + return this; + } + + /** + * Estimated distinct recoverable sessions not already retained in hot storage. This can exceed + * max_recoverable_sessions. minimum: 0 + * + * @return estimatedCount + */ + @JsonProperty(JSON_PROPERTY_ESTIMATED_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getEstimatedCount() { + return estimatedCount; + } + + public void setEstimatedCount(Long estimatedCount) { + this.estimatedCount = estimatedCount; + } + + public RumRecoveryCountResponseAttributes maxRecoverableSessions(Long maxRecoverableSessions) { + this.maxRecoverableSessions = maxRecoverableSessions; + return this; + } + + /** + * Configured maximum estimated recoverable sessions per batch (100,000 by default). Estimates + * equal to this value are accepted at creation. minimum: 1 maximum: 2147483647 + * + * @return maxRecoverableSessions + */ + @JsonProperty(JSON_PROPERTY_MAX_RECOVERABLE_SESSIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getMaxRecoverableSessions() { + return maxRecoverableSessions; + } + + public void setMaxRecoverableSessions(Long maxRecoverableSessions) { + this.maxRecoverableSessions = maxRecoverableSessions; + } + + /** + * 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 RumRecoveryCountResponseAttributes + */ + @JsonAnySetter + public RumRecoveryCountResponseAttributes 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 RumRecoveryCountResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRecoveryCountResponseAttributes rumRecoveryCountResponseAttributes = + (RumRecoveryCountResponseAttributes) o; + return Objects.equals(this.estimatedCount, rumRecoveryCountResponseAttributes.estimatedCount) + && Objects.equals( + this.maxRecoverableSessions, rumRecoveryCountResponseAttributes.maxRecoverableSessions) + && Objects.equals( + this.additionalProperties, rumRecoveryCountResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(estimatedCount, maxRecoverableSessions, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRecoveryCountResponseAttributes {\n"); + sb.append(" estimatedCount: ").append(toIndentedString(estimatedCount)).append("\n"); + sb.append(" maxRecoverableSessions: ") + .append(toIndentedString(maxRecoverableSessions)) + .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/RumRecoveryCountResponseData.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCountResponseData.java new file mode 100644 index 00000000000..55298aceae8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCountResponseData.java @@ -0,0 +1,214 @@ +/* + * 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; + +/** JSON:API resource. */ +@JsonPropertyOrder({ + RumRecoveryCountResponseData.JSON_PROPERTY_ATTRIBUTES, + RumRecoveryCountResponseData.JSON_PROPERTY_ID, + RumRecoveryCountResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRecoveryCountResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RumRecoveryCountResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private RumRecoveryCountResponseDataType type; + + public RumRecoveryCountResponseData() {} + + @JsonCreator + public RumRecoveryCountResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + RumRecoveryCountResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + RumRecoveryCountResponseDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public RumRecoveryCountResponseData attributes(RumRecoveryCountResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Approximate recoverable count. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRecoveryCountResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(RumRecoveryCountResponseAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public RumRecoveryCountResponseData id(String id) { + this.id = id; + return this; + } + + /** + * Resource identifier. + * + * @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 RumRecoveryCountResponseData type(RumRecoveryCountResponseDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * JSON:API resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRecoveryCountResponseDataType getType() { + return type; + } + + public void setType(RumRecoveryCountResponseDataType 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 RumRecoveryCountResponseData + */ + @JsonAnySetter + public RumRecoveryCountResponseData 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 RumRecoveryCountResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRecoveryCountResponseData rumRecoveryCountResponseData = (RumRecoveryCountResponseData) o; + return Objects.equals(this.attributes, rumRecoveryCountResponseData.attributes) + && Objects.equals(this.id, rumRecoveryCountResponseData.id) + && Objects.equals(this.type, rumRecoveryCountResponseData.type) + && Objects.equals( + this.additionalProperties, rumRecoveryCountResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRecoveryCountResponseData {\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/RumRecoveryCountResponseDataType.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCountResponseDataType.java new file mode 100644 index 00000000000..6bc205da800 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCountResponseDataType.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; + +/** JSON:API resource type. */ +@JsonSerialize( + using = RumRecoveryCountResponseDataType.RumRecoveryCountResponseDataTypeSerializer.class) +public class RumRecoveryCountResponseDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("rum_recovery_count")); + + public static final RumRecoveryCountResponseDataType RUM_RECOVERY_COUNT = + new RumRecoveryCountResponseDataType("rum_recovery_count"); + + RumRecoveryCountResponseDataType(String value) { + super(value, allowedValues); + } + + public static class RumRecoveryCountResponseDataTypeSerializer + extends StdSerializer { + public RumRecoveryCountResponseDataTypeSerializer(Class t) { + super(t); + } + + public RumRecoveryCountResponseDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + RumRecoveryCountResponseDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static RumRecoveryCountResponseDataType fromValue(String value) { + return new RumRecoveryCountResponseDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCreateAttributes.java new file mode 100644 index 00000000000..65be7e9f15b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCreateAttributes.java @@ -0,0 +1,297 @@ +/* + * 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.AbstractOpenApiSchema; +import com.datadog.api.client.JSON; +import com.datadog.api.client.UnparsedObject; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import jakarta.ws.rs.core.GenericType; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize(using = RumRecoveryCreateAttributes.RumRecoveryCreateAttributesDeserializer.class) +@JsonSerialize(using = RumRecoveryCreateAttributes.RumRecoveryCreateAttributesSerializer.class) +public class RumRecoveryCreateAttributes extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(RumRecoveryCreateAttributes.class.getName()); + + @JsonIgnore public boolean unparsed = false; + + public static class RumRecoveryCreateAttributesSerializer + extends StdSerializer { + public RumRecoveryCreateAttributesSerializer(Class t) { + super(t); + } + + public RumRecoveryCreateAttributesSerializer() { + this(null); + } + + @Override + public void serialize( + RumRecoveryCreateAttributes value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class RumRecoveryCreateAttributesDeserializer + extends StdDeserializer { + public RumRecoveryCreateAttributesDeserializer() { + this(RumRecoveryCreateAttributes.class); + } + + public RumRecoveryCreateAttributesDeserializer(Class vc) { + super(vc); + } + + @Override + public RumRecoveryCreateAttributes deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + Object tmp = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize RumRecoverySessionsCreateAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (RumRecoverySessionsCreateAttributes.class.equals(Integer.class) + || RumRecoverySessionsCreateAttributes.class.equals(Long.class) + || RumRecoverySessionsCreateAttributes.class.equals(Float.class) + || RumRecoverySessionsCreateAttributes.class.equals(Double.class) + || RumRecoverySessionsCreateAttributes.class.equals(Boolean.class) + || RumRecoverySessionsCreateAttributes.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((RumRecoverySessionsCreateAttributes.class.equals(Integer.class) + || RumRecoverySessionsCreateAttributes.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((RumRecoverySessionsCreateAttributes.class.equals(Float.class) + || RumRecoverySessionsCreateAttributes.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (RumRecoverySessionsCreateAttributes.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (RumRecoverySessionsCreateAttributes.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(RumRecoverySessionsCreateAttributes.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((RumRecoverySessionsCreateAttributes) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'RumRecoverySessionsCreateAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'RumRecoverySessionsCreateAttributes'", + e); + } + + // deserialize RumRecoveryBatchCreateAttributes + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (RumRecoveryBatchCreateAttributes.class.equals(Integer.class) + || RumRecoveryBatchCreateAttributes.class.equals(Long.class) + || RumRecoveryBatchCreateAttributes.class.equals(Float.class) + || RumRecoveryBatchCreateAttributes.class.equals(Double.class) + || RumRecoveryBatchCreateAttributes.class.equals(Boolean.class) + || RumRecoveryBatchCreateAttributes.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((RumRecoveryBatchCreateAttributes.class.equals(Integer.class) + || RumRecoveryBatchCreateAttributes.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((RumRecoveryBatchCreateAttributes.class.equals(Float.class) + || RumRecoveryBatchCreateAttributes.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (RumRecoveryBatchCreateAttributes.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (RumRecoveryBatchCreateAttributes.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(RumRecoveryBatchCreateAttributes.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((RumRecoveryBatchCreateAttributes) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'RumRecoveryBatchCreateAttributes'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, "Input data does not match schema 'RumRecoveryBatchCreateAttributes'", e); + } + + RumRecoveryCreateAttributes ret = new RumRecoveryCreateAttributes(); + if (match == 1) { + ret.setActualInstance(deserialized); + } else { + Map res = + new ObjectMapper() + .readValue( + tree.traverse(jp.getCodec()).readValueAsTree().toString(), + new TypeReference>() {}); + ret.setActualInstance(new UnparsedObject(res)); + } + return ret; + } + + /** Handle deserialization of the 'null' value. */ + @Override + public RumRecoveryCreateAttributes getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "RumRecoveryCreateAttributes cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public RumRecoveryCreateAttributes() { + super("oneOf", Boolean.FALSE); + } + + public RumRecoveryCreateAttributes(RumRecoverySessionsCreateAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public RumRecoveryCreateAttributes(RumRecoveryBatchCreateAttributes o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put( + "RumRecoverySessionsCreateAttributes", + new GenericType() {}); + schemas.put( + "RumRecoveryBatchCreateAttributes", new GenericType() {}); + JSON.registerDescendants( + RumRecoveryCreateAttributes.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return RumRecoveryCreateAttributes.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: RumRecoverySessionsCreateAttributes, + * RumRecoveryBatchCreateAttributes + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a + * composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf( + RumRecoverySessionsCreateAttributes.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + RumRecoveryBatchCreateAttributes.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + throw new RuntimeException( + "Invalid instance type. Must be RumRecoverySessionsCreateAttributes," + + " RumRecoveryBatchCreateAttributes"); + } + + /** + * Get the actual instance, which can be the following: RumRecoverySessionsCreateAttributes, + * RumRecoveryBatchCreateAttributes + * + * @return The actual instance (RumRecoverySessionsCreateAttributes, + * RumRecoveryBatchCreateAttributes) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `RumRecoverySessionsCreateAttributes`. If the actual instance is not + * `RumRecoverySessionsCreateAttributes`, the ClassCastException will be thrown. + * + * @return The actual instance of `RumRecoverySessionsCreateAttributes` + * @throws ClassCastException if the instance is not `RumRecoverySessionsCreateAttributes` + */ + public RumRecoverySessionsCreateAttributes getRumRecoverySessionsCreateAttributes() + throws ClassCastException { + return (RumRecoverySessionsCreateAttributes) super.getActualInstance(); + } + + /** + * Get the actual instance of `RumRecoveryBatchCreateAttributes`. If the actual instance is not + * `RumRecoveryBatchCreateAttributes`, the ClassCastException will be thrown. + * + * @return The actual instance of `RumRecoveryBatchCreateAttributes` + * @throws ClassCastException if the instance is not `RumRecoveryBatchCreateAttributes` + */ + public RumRecoveryBatchCreateAttributes getRumRecoveryBatchCreateAttributes() + throws ClassCastException { + return (RumRecoveryBatchCreateAttributes) super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCreateData.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCreateData.java new file mode 100644 index 00000000000..71ef0001f07 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCreateData.java @@ -0,0 +1,178 @@ +/* + * 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; + +/** JSON:API resource. */ +@JsonPropertyOrder({ + RumRecoveryCreateData.JSON_PROPERTY_ATTRIBUTES, + RumRecoveryCreateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRecoveryCreateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RumRecoveryCreateAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public RumRecoveryCreateData() {} + + @JsonCreator + public RumRecoveryCreateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + RumRecoveryCreateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + } + + public RumRecoveryCreateData attributes(RumRecoveryCreateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Targeted recovery (the default) or query-based batch recovery. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRecoveryCreateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(RumRecoveryCreateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public RumRecoveryCreateData type(String type) { + this.type = type; + return this; + } + + /** + * JSON:API resource type. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } + + public void setType(String type) { + 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 RumRecoveryCreateData + */ + @JsonAnySetter + public RumRecoveryCreateData 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 RumRecoveryCreateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRecoveryCreateData rumRecoveryCreateData = (RumRecoveryCreateData) o; + return Objects.equals(this.attributes, rumRecoveryCreateData.attributes) + && Objects.equals(this.type, rumRecoveryCreateData.type) + && Objects.equals(this.additionalProperties, rumRecoveryCreateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRecoveryCreateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).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/RumRecoveryCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCreateRequest.java new file mode 100644 index 00000000000..56530d1aa83 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCreateRequest.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; + +/** JSON:API document. */ +@JsonPropertyOrder({RumRecoveryCreateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRecoveryCreateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private RumRecoveryCreateData data; + + public RumRecoveryCreateRequest() {} + + @JsonCreator + public RumRecoveryCreateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) RumRecoveryCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public RumRecoveryCreateRequest data(RumRecoveryCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * JSON:API resource. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRecoveryCreateData getData() { + return data; + } + + public void setData(RumRecoveryCreateData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 RumRecoveryCreateRequest + */ + @JsonAnySetter + public RumRecoveryCreateRequest 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 RumRecoveryCreateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRecoveryCreateRequest rumRecoveryCreateRequest = (RumRecoveryCreateRequest) o; + return Objects.equals(this.data, rumRecoveryCreateRequest.data) + && Objects.equals(this.additionalProperties, rumRecoveryCreateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRecoveryCreateRequest {\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/RumRecoveryCreateResponse.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCreateResponse.java new file mode 100644 index 00000000000..66b5302f6f8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCreateResponse.java @@ -0,0 +1,150 @@ +/* + * 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; + +/** JSON:API document. */ +@JsonPropertyOrder({RumRecoveryCreateResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRecoveryCreateResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private RumRecoveryCreateResponseData data; + + public RumRecoveryCreateResponse() {} + + @JsonCreator + public RumRecoveryCreateResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + RumRecoveryCreateResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public RumRecoveryCreateResponse data(RumRecoveryCreateResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * JSON:API resource. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRecoveryCreateResponseData getData() { + return data; + } + + public void setData(RumRecoveryCreateResponseData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 RumRecoveryCreateResponse + */ + @JsonAnySetter + public RumRecoveryCreateResponse 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 RumRecoveryCreateResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRecoveryCreateResponse rumRecoveryCreateResponse = (RumRecoveryCreateResponse) o; + return Objects.equals(this.data, rumRecoveryCreateResponse.data) + && Objects.equals( + this.additionalProperties, rumRecoveryCreateResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRecoveryCreateResponse {\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/RumRecoveryCreateResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCreateResponseAttributes.java new file mode 100644 index 00000000000..0e6e0889352 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCreateResponseAttributes.java @@ -0,0 +1,335 @@ +/* + * 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.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Accepted recovery request. */ +@JsonPropertyOrder({ + RumRecoveryCreateResponseAttributes.JSON_PROPERTY_CREATED_AT, + RumRecoveryCreateResponseAttributes.JSON_PROPERTY_DISCOVERY_STATUS, + RumRecoveryCreateResponseAttributes.JSON_PROPERTY_ESTIMATED_COUNT, + RumRecoveryCreateResponseAttributes.JSON_PROPERTY_FAILED_SESSIONS, + RumRecoveryCreateResponseAttributes.JSON_PROPERTY_PROCESSED_SESSIONS, + RumRecoveryCreateResponseAttributes.JSON_PROPERTY_STATUS, + RumRecoveryCreateResponseAttributes.JSON_PROPERTY_TOTAL_SESSIONS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRecoveryCreateResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_DISCOVERY_STATUS = "discovery_status"; + private RumRecoveryDiscoveryStatus discoveryStatus; + + public static final String JSON_PROPERTY_ESTIMATED_COUNT = "estimated_count"; + private Long estimatedCount; + + public static final String JSON_PROPERTY_FAILED_SESSIONS = "failed_sessions"; + private Long failedSessions; + + public static final String JSON_PROPERTY_PROCESSED_SESSIONS = "processed_sessions"; + private Long processedSessions; + + public static final String JSON_PROPERTY_STATUS = "status"; + private RumRecoveryRequestStatus status; + + public static final String JSON_PROPERTY_TOTAL_SESSIONS = "total_sessions"; + private Long totalSessions; + + public RumRecoveryCreateResponseAttributes() {} + + @JsonCreator + public RumRecoveryCreateResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_FAILED_SESSIONS) Long failedSessions, + @JsonProperty(required = true, value = JSON_PROPERTY_PROCESSED_SESSIONS) + Long processedSessions, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) + RumRecoveryRequestStatus status) { + this.createdAt = createdAt; + this.failedSessions = failedSessions; + this.processedSessions = processedSessions; + this.status = status; + this.unparsed |= !status.isValid(); + } + + public RumRecoveryCreateResponseAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Creation time. + * + * @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 RumRecoveryCreateResponseAttributes discoveryStatus( + RumRecoveryDiscoveryStatus discoveryStatus) { + this.discoveryStatus = discoveryStatus; + this.unparsed |= !discoveryStatus.isValid(); + return this; + } + + /** + * Batch discovery state. QUEUED indicates that the request is waiting for processing capacity. + * + * @return discoveryStatus + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISCOVERY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RumRecoveryDiscoveryStatus getDiscoveryStatus() { + return discoveryStatus; + } + + public void setDiscoveryStatus(RumRecoveryDiscoveryStatus discoveryStatus) { + if (!discoveryStatus.isValid()) { + this.unparsed = true; + } + this.discoveryStatus = discoveryStatus; + } + + public RumRecoveryCreateResponseAttributes estimatedCount(Long estimatedCount) { + this.estimatedCount = estimatedCount; + return this; + } + + /** + * Batch estimate stored at creation, when present. New batches use a fresh server estimate; older + * batches may contain a client-supplied estimate. minimum: 0 + * + * @return estimatedCount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATED_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getEstimatedCount() { + return estimatedCount; + } + + public void setEstimatedCount(Long estimatedCount) { + this.estimatedCount = estimatedCount; + } + + public RumRecoveryCreateResponseAttributes failedSessions(Long failedSessions) { + this.failedSessions = failedSessions; + return this; + } + + /** + * Failed session count. minimum: 0 + * + * @return failedSessions + */ + @JsonProperty(JSON_PROPERTY_FAILED_SESSIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getFailedSessions() { + return failedSessions; + } + + public void setFailedSessions(Long failedSessions) { + this.failedSessions = failedSessions; + } + + public RumRecoveryCreateResponseAttributes processedSessions(Long processedSessions) { + this.processedSessions = processedSessions; + return this; + } + + /** + * Processed session count. minimum: 0 + * + * @return processedSessions + */ + @JsonProperty(JSON_PROPERTY_PROCESSED_SESSIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getProcessedSessions() { + return processedSessions; + } + + public void setProcessedSessions(Long processedSessions) { + this.processedSessions = processedSessions; + } + + public RumRecoveryCreateResponseAttributes status(RumRecoveryRequestStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * Recovery request state. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRecoveryRequestStatus getStatus() { + return status; + } + + public void setStatus(RumRecoveryRequestStatus status) { + if (!status.isValid()) { + this.unparsed = true; + } + this.status = status; + } + + public RumRecoveryCreateResponseAttributes totalSessions(Long totalSessions) { + this.totalSessions = totalSessions; + return this; + } + + /** + * Total targeted sessions. Omitted while a batch total is unknown. minimum: 0 + * + * @return totalSessions + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_SESSIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotalSessions() { + return totalSessions; + } + + public void setTotalSessions(Long totalSessions) { + this.totalSessions = totalSessions; + } + + /** + * 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 RumRecoveryCreateResponseAttributes + */ + @JsonAnySetter + public RumRecoveryCreateResponseAttributes 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 RumRecoveryCreateResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRecoveryCreateResponseAttributes rumRecoveryCreateResponseAttributes = + (RumRecoveryCreateResponseAttributes) o; + return Objects.equals(this.createdAt, rumRecoveryCreateResponseAttributes.createdAt) + && Objects.equals(this.discoveryStatus, rumRecoveryCreateResponseAttributes.discoveryStatus) + && Objects.equals(this.estimatedCount, rumRecoveryCreateResponseAttributes.estimatedCount) + && Objects.equals(this.failedSessions, rumRecoveryCreateResponseAttributes.failedSessions) + && Objects.equals( + this.processedSessions, rumRecoveryCreateResponseAttributes.processedSessions) + && Objects.equals(this.status, rumRecoveryCreateResponseAttributes.status) + && Objects.equals(this.totalSessions, rumRecoveryCreateResponseAttributes.totalSessions) + && Objects.equals( + this.additionalProperties, rumRecoveryCreateResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + discoveryStatus, + estimatedCount, + failedSessions, + processedSessions, + status, + totalSessions, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRecoveryCreateResponseAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" discoveryStatus: ").append(toIndentedString(discoveryStatus)).append("\n"); + sb.append(" estimatedCount: ").append(toIndentedString(estimatedCount)).append("\n"); + sb.append(" failedSessions: ").append(toIndentedString(failedSessions)).append("\n"); + sb.append(" processedSessions: ").append(toIndentedString(processedSessions)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" totalSessions: ").append(toIndentedString(totalSessions)).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/RumRecoveryCreateResponseData.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCreateResponseData.java new file mode 100644 index 00000000000..5df9eba7945 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryCreateResponseData.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; + +/** JSON:API resource. */ +@JsonPropertyOrder({ + RumRecoveryCreateResponseData.JSON_PROPERTY_ATTRIBUTES, + RumRecoveryCreateResponseData.JSON_PROPERTY_ID, + RumRecoveryCreateResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRecoveryCreateResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RumRecoveryCreateResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private RumRecoveryRequestType type; + + public RumRecoveryCreateResponseData() {} + + @JsonCreator + public RumRecoveryCreateResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + RumRecoveryCreateResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RumRecoveryRequestType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public RumRecoveryCreateResponseData attributes(RumRecoveryCreateResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Accepted recovery request. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRecoveryCreateResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(RumRecoveryCreateResponseAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public RumRecoveryCreateResponseData id(String id) { + this.id = id; + return this; + } + + /** + * Resource identifier. + * + * @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 RumRecoveryCreateResponseData type(RumRecoveryRequestType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * JSON:API resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRecoveryRequestType getType() { + return type; + } + + public void setType(RumRecoveryRequestType 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 RumRecoveryCreateResponseData + */ + @JsonAnySetter + public RumRecoveryCreateResponseData 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 RumRecoveryCreateResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRecoveryCreateResponseData rumRecoveryCreateResponseData = (RumRecoveryCreateResponseData) o; + return Objects.equals(this.attributes, rumRecoveryCreateResponseData.attributes) + && Objects.equals(this.id, rumRecoveryCreateResponseData.id) + && Objects.equals(this.type, rumRecoveryCreateResponseData.type) + && Objects.equals( + this.additionalProperties, rumRecoveryCreateResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRecoveryCreateResponseData {\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/RumRecoveryDiscoveryStatus.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryDiscoveryStatus.java new file mode 100644 index 00000000000..0247a9fe38b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryDiscoveryStatus.java @@ -0,0 +1,78 @@ +/* + * 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; + +/** Batch discovery state. QUEUED indicates that the request is waiting for processing capacity. */ +@JsonSerialize(using = RumRecoveryDiscoveryStatus.RumRecoveryDiscoveryStatusSerializer.class) +public class RumRecoveryDiscoveryStatus extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList( + "QUEUED", + "PENDING", + "SLICING", + "DISCOVERED", + "PROCESSING", + "COMPLETED", + "FAILED", + "CANCELLED")); + + public static final RumRecoveryDiscoveryStatus QUEUED = new RumRecoveryDiscoveryStatus("QUEUED"); + public static final RumRecoveryDiscoveryStatus PENDING = + new RumRecoveryDiscoveryStatus("PENDING"); + public static final RumRecoveryDiscoveryStatus SLICING = + new RumRecoveryDiscoveryStatus("SLICING"); + public static final RumRecoveryDiscoveryStatus DISCOVERED = + new RumRecoveryDiscoveryStatus("DISCOVERED"); + public static final RumRecoveryDiscoveryStatus PROCESSING = + new RumRecoveryDiscoveryStatus("PROCESSING"); + public static final RumRecoveryDiscoveryStatus COMPLETED = + new RumRecoveryDiscoveryStatus("COMPLETED"); + public static final RumRecoveryDiscoveryStatus FAILED = new RumRecoveryDiscoveryStatus("FAILED"); + public static final RumRecoveryDiscoveryStatus CANCELLED = + new RumRecoveryDiscoveryStatus("CANCELLED"); + + RumRecoveryDiscoveryStatus(String value) { + super(value, allowedValues); + } + + public static class RumRecoveryDiscoveryStatusSerializer + extends StdSerializer { + public RumRecoveryDiscoveryStatusSerializer(Class t) { + super(t); + } + + public RumRecoveryDiscoveryStatusSerializer() { + this(null); + } + + @Override + public void serialize( + RumRecoveryDiscoveryStatus value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static RumRecoveryDiscoveryStatus fromValue(String value) { + return new RumRecoveryDiscoveryStatus(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RumRecoveryRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryRequestAttributes.java new file mode 100644 index 00000000000..c5277b75e31 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryRequestAttributes.java @@ -0,0 +1,724 @@ +/* + * 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; + +/** + * Recovery progress. Batch-only attributes are omitted for targeted requests; request_type is also + * omitted for targeted requests. + */ +@JsonPropertyOrder({ + RumRecoveryRequestAttributes.JSON_PROPERTY_CREATED_AT, + RumRecoveryRequestAttributes.JSON_PROPERTY_DISCOVERY_STATUS, + RumRecoveryRequestAttributes.JSON_PROPERTY_ERROR_MESSAGE, + RumRecoveryRequestAttributes.JSON_PROPERTY_ESTIMATED_COUNT, + RumRecoveryRequestAttributes.JSON_PROPERTY_FAILED_SESSIONS, + RumRecoveryRequestAttributes.JSON_PROPERTY_FROM, + RumRecoveryRequestAttributes.JSON_PROPERTY_PROCESSED_SESSIONS, + RumRecoveryRequestAttributes.JSON_PROPERTY_QUERY, + RumRecoveryRequestAttributes.JSON_PROPERTY_REQUEST_TYPE, + RumRecoveryRequestAttributes.JSON_PROPERTY_SESSIONS, + RumRecoveryRequestAttributes.JSON_PROPERTY_SESSIONS_DISCOVERED, + RumRecoveryRequestAttributes.JSON_PROPERTY_SESSIONS_FAILED, + RumRecoveryRequestAttributes.JSON_PROPERTY_SESSIONS_PROCESSED, + RumRecoveryRequestAttributes.JSON_PROPERTY_SLICES_COMPLETED, + RumRecoveryRequestAttributes.JSON_PROPERTY_SLICES_FAILED, + RumRecoveryRequestAttributes.JSON_PROPERTY_STATUS, + RumRecoveryRequestAttributes.JSON_PROPERTY_TO, + RumRecoveryRequestAttributes.JSON_PROPERTY_TOTAL_SESSIONS, + RumRecoveryRequestAttributes.JSON_PROPERTY_TOTAL_SLICES, + RumRecoveryRequestAttributes.JSON_PROPERTY_UPDATED_AT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRecoveryRequestAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_DISCOVERY_STATUS = "discovery_status"; + private RumRecoveryDiscoveryStatus discoveryStatus; + + public static final String JSON_PROPERTY_ERROR_MESSAGE = "error_message"; + private String errorMessage; + + public static final String JSON_PROPERTY_ESTIMATED_COUNT = "estimated_count"; + private Long estimatedCount; + + public static final String JSON_PROPERTY_FAILED_SESSIONS = "failed_sessions"; + private Long failedSessions; + + public static final String JSON_PROPERTY_FROM = "from"; + private Long from; + + public static final String JSON_PROPERTY_PROCESSED_SESSIONS = "processed_sessions"; + private Long processedSessions; + + public static final String JSON_PROPERTY_QUERY = "query"; + private String query; + + public static final String JSON_PROPERTY_REQUEST_TYPE = "request_type"; + private RumRecoveryBatchRequestType requestType; + + public static final String JSON_PROPERTY_SESSIONS = "sessions"; + private List sessions = null; + + public static final String JSON_PROPERTY_SESSIONS_DISCOVERED = "sessions_discovered"; + private Long sessionsDiscovered; + + public static final String JSON_PROPERTY_SESSIONS_FAILED = "sessions_failed"; + private Long sessionsFailed; + + public static final String JSON_PROPERTY_SESSIONS_PROCESSED = "sessions_processed"; + private Long sessionsProcessed; + + public static final String JSON_PROPERTY_SLICES_COMPLETED = "slices_completed"; + private Long slicesCompleted; + + public static final String JSON_PROPERTY_SLICES_FAILED = "slices_failed"; + private Long slicesFailed; + + public static final String JSON_PROPERTY_STATUS = "status"; + private RumRecoveryRequestStatus status; + + public static final String JSON_PROPERTY_TO = "to"; + private Long to; + + public static final String JSON_PROPERTY_TOTAL_SESSIONS = "total_sessions"; + private Long totalSessions; + + public static final String JSON_PROPERTY_TOTAL_SLICES = "total_slices"; + private Long totalSlices; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private OffsetDateTime updatedAt; + + public RumRecoveryRequestAttributes() {} + + @JsonCreator + public RumRecoveryRequestAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_FAILED_SESSIONS) Long failedSessions, + @JsonProperty(required = true, value = JSON_PROPERTY_PROCESSED_SESSIONS) + Long processedSessions, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) RumRecoveryRequestStatus status, + @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt) { + this.createdAt = createdAt; + this.failedSessions = failedSessions; + this.processedSessions = processedSessions; + this.status = status; + this.unparsed |= !status.isValid(); + this.updatedAt = updatedAt; + } + + public RumRecoveryRequestAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Creation time. + * + * @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 RumRecoveryRequestAttributes discoveryStatus(RumRecoveryDiscoveryStatus discoveryStatus) { + this.discoveryStatus = discoveryStatus; + this.unparsed |= !discoveryStatus.isValid(); + return this; + } + + /** + * Batch discovery state. QUEUED indicates that the request is waiting for processing capacity. + * + * @return discoveryStatus + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISCOVERY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RumRecoveryDiscoveryStatus getDiscoveryStatus() { + return discoveryStatus; + } + + public void setDiscoveryStatus(RumRecoveryDiscoveryStatus discoveryStatus) { + if (!discoveryStatus.isValid()) { + this.unparsed = true; + } + this.discoveryStatus = discoveryStatus; + } + + public RumRecoveryRequestAttributes errorMessage(String errorMessage) { + this.errorMessage = errorMessage; + return this; + } + + /** + * Failure details, if present. + * + * @return errorMessage + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getErrorMessage() { + return errorMessage; + } + + public void setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + } + + public RumRecoveryRequestAttributes estimatedCount(Long estimatedCount) { + this.estimatedCount = estimatedCount; + return this; + } + + /** + * Batch estimate stored at creation, when present. New batches use a fresh server estimate; older + * batches may contain a client-supplied estimate. minimum: 0 + * + * @return estimatedCount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATED_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getEstimatedCount() { + return estimatedCount; + } + + public void setEstimatedCount(Long estimatedCount) { + this.estimatedCount = estimatedCount; + } + + public RumRecoveryRequestAttributes failedSessions(Long failedSessions) { + this.failedSessions = failedSessions; + return this; + } + + /** + * Failed session count. minimum: 0 + * + * @return failedSessions + */ + @JsonProperty(JSON_PROPERTY_FAILED_SESSIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getFailedSessions() { + return failedSessions; + } + + public void setFailedSessions(Long failedSessions) { + this.failedSessions = failedSessions; + } + + public RumRecoveryRequestAttributes from(Long from) { + this.from = from; + return this; + } + + /** + * Start of the range in Unix milliseconds. Must be positive and earlier than to. minimum: 1 + * + * @return from + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FROM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getFrom() { + return from; + } + + public void setFrom(Long from) { + this.from = from; + } + + public RumRecoveryRequestAttributes processedSessions(Long processedSessions) { + this.processedSessions = processedSessions; + return this; + } + + /** + * Processed session count. minimum: 0 + * + * @return processedSessions + */ + @JsonProperty(JSON_PROPERTY_PROCESSED_SESSIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getProcessedSessions() { + return processedSessions; + } + + public void setProcessedSessions(Long processedSessions) { + this.processedSessions = processedSessions; + } + + public RumRecoveryRequestAttributes query(String query) { + this.query = query; + return this; + } + + /** + * RUM search query. Not blank, at most 4096 bytes for batch creation and count. + * + * @return query + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } + + public void setQuery(String query) { + this.query = query; + } + + public RumRecoveryRequestAttributes requestType(RumRecoveryBatchRequestType requestType) { + this.requestType = requestType; + this.unparsed |= !requestType.isValid(); + return this; + } + + /** + * Query-based batch recovery. + * + * @return requestType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUEST_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RumRecoveryBatchRequestType getRequestType() { + return requestType; + } + + public void setRequestType(RumRecoveryBatchRequestType requestType) { + if (!requestType.isValid()) { + this.unparsed = true; + } + this.requestType = requestType; + } + + public RumRecoveryRequestAttributes sessions(List sessions) { + this.sessions = sessions; + if (sessions != null) { + for (RumRecoveredSession item : sessions) { + this.unparsed |= item.unparsed; + } + } + return this; + } + + public RumRecoveryRequestAttributes addSessionsItem(RumRecoveredSession sessionsItem) { + if (this.sessions == null) { + this.sessions = new ArrayList<>(); + } + this.sessions.add(sessionsItem); + this.unparsed |= sessionsItem.unparsed; + return this; + } + + /** + * Targeted session progress. Omitted when empty or not applicable. + * + * @return sessions + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SESSIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getSessions() { + return sessions; + } + + public void setSessions(List sessions) { + this.sessions = sessions; + if (sessions != null) { + for (RumRecoveredSession item : sessions) { + this.unparsed |= item.unparsed; + } + } + } + + public RumRecoveryRequestAttributes sessionsDiscovered(Long sessionsDiscovered) { + this.sessionsDiscovered = sessionsDiscovered; + return this; + } + + /** + * Discovered sessions. minimum: 0 + * + * @return sessionsDiscovered + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SESSIONS_DISCOVERED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getSessionsDiscovered() { + return sessionsDiscovered; + } + + public void setSessionsDiscovered(Long sessionsDiscovered) { + this.sessionsDiscovered = sessionsDiscovered; + } + + public RumRecoveryRequestAttributes sessionsFailed(Long sessionsFailed) { + this.sessionsFailed = sessionsFailed; + return this; + } + + /** + * Failed sessions. minimum: 0 + * + * @return sessionsFailed + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SESSIONS_FAILED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getSessionsFailed() { + return sessionsFailed; + } + + public void setSessionsFailed(Long sessionsFailed) { + this.sessionsFailed = sessionsFailed; + } + + public RumRecoveryRequestAttributes sessionsProcessed(Long sessionsProcessed) { + this.sessionsProcessed = sessionsProcessed; + return this; + } + + /** + * Processed sessions. minimum: 0 + * + * @return sessionsProcessed + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SESSIONS_PROCESSED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getSessionsProcessed() { + return sessionsProcessed; + } + + public void setSessionsProcessed(Long sessionsProcessed) { + this.sessionsProcessed = sessionsProcessed; + } + + public RumRecoveryRequestAttributes slicesCompleted(Long slicesCompleted) { + this.slicesCompleted = slicesCompleted; + return this; + } + + /** + * Completed slices. minimum: 0 + * + * @return slicesCompleted + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SLICES_COMPLETED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getSlicesCompleted() { + return slicesCompleted; + } + + public void setSlicesCompleted(Long slicesCompleted) { + this.slicesCompleted = slicesCompleted; + } + + public RumRecoveryRequestAttributes slicesFailed(Long slicesFailed) { + this.slicesFailed = slicesFailed; + return this; + } + + /** + * Failed slices. minimum: 0 + * + * @return slicesFailed + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SLICES_FAILED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getSlicesFailed() { + return slicesFailed; + } + + public void setSlicesFailed(Long slicesFailed) { + this.slicesFailed = slicesFailed; + } + + public RumRecoveryRequestAttributes status(RumRecoveryRequestStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * Recovery request state. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRecoveryRequestStatus getStatus() { + return status; + } + + public void setStatus(RumRecoveryRequestStatus status) { + if (!status.isValid()) { + this.unparsed = true; + } + this.status = status; + } + + public RumRecoveryRequestAttributes to(Long to) { + this.to = to; + return this; + } + + /** + * End of the range in Unix milliseconds. minimum: 1 + * + * @return to + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getTo() { + return to; + } + + public void setTo(Long to) { + this.to = to; + } + + public RumRecoveryRequestAttributes totalSessions(Long totalSessions) { + this.totalSessions = totalSessions; + return this; + } + + /** + * Total targeted sessions. Omitted while a batch total is unknown. minimum: 0 + * + * @return totalSessions + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_SESSIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotalSessions() { + return totalSessions; + } + + public void setTotalSessions(Long totalSessions) { + this.totalSessions = totalSessions; + } + + public RumRecoveryRequestAttributes totalSlices(Long totalSlices) { + this.totalSlices = totalSlices; + return this; + } + + /** + * Total discovery slices. minimum: 0 + * + * @return totalSlices + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_SLICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotalSlices() { + return totalSlices; + } + + public void setTotalSlices(Long totalSlices) { + this.totalSlices = totalSlices; + } + + public RumRecoveryRequestAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Last update time. + * + * @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; + } + + /** + * 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 RumRecoveryRequestAttributes + */ + @JsonAnySetter + public RumRecoveryRequestAttributes 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 RumRecoveryRequestAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRecoveryRequestAttributes rumRecoveryRequestAttributes = (RumRecoveryRequestAttributes) o; + return Objects.equals(this.createdAt, rumRecoveryRequestAttributes.createdAt) + && Objects.equals(this.discoveryStatus, rumRecoveryRequestAttributes.discoveryStatus) + && Objects.equals(this.errorMessage, rumRecoveryRequestAttributes.errorMessage) + && Objects.equals(this.estimatedCount, rumRecoveryRequestAttributes.estimatedCount) + && Objects.equals(this.failedSessions, rumRecoveryRequestAttributes.failedSessions) + && Objects.equals(this.from, rumRecoveryRequestAttributes.from) + && Objects.equals(this.processedSessions, rumRecoveryRequestAttributes.processedSessions) + && Objects.equals(this.query, rumRecoveryRequestAttributes.query) + && Objects.equals(this.requestType, rumRecoveryRequestAttributes.requestType) + && Objects.equals(this.sessions, rumRecoveryRequestAttributes.sessions) + && Objects.equals(this.sessionsDiscovered, rumRecoveryRequestAttributes.sessionsDiscovered) + && Objects.equals(this.sessionsFailed, rumRecoveryRequestAttributes.sessionsFailed) + && Objects.equals(this.sessionsProcessed, rumRecoveryRequestAttributes.sessionsProcessed) + && Objects.equals(this.slicesCompleted, rumRecoveryRequestAttributes.slicesCompleted) + && Objects.equals(this.slicesFailed, rumRecoveryRequestAttributes.slicesFailed) + && Objects.equals(this.status, rumRecoveryRequestAttributes.status) + && Objects.equals(this.to, rumRecoveryRequestAttributes.to) + && Objects.equals(this.totalSessions, rumRecoveryRequestAttributes.totalSessions) + && Objects.equals(this.totalSlices, rumRecoveryRequestAttributes.totalSlices) + && Objects.equals(this.updatedAt, rumRecoveryRequestAttributes.updatedAt) + && Objects.equals( + this.additionalProperties, rumRecoveryRequestAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + discoveryStatus, + errorMessage, + estimatedCount, + failedSessions, + from, + processedSessions, + query, + requestType, + sessions, + sessionsDiscovered, + sessionsFailed, + sessionsProcessed, + slicesCompleted, + slicesFailed, + status, + to, + totalSessions, + totalSlices, + updatedAt, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRecoveryRequestAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" discoveryStatus: ").append(toIndentedString(discoveryStatus)).append("\n"); + sb.append(" errorMessage: ").append(toIndentedString(errorMessage)).append("\n"); + sb.append(" estimatedCount: ").append(toIndentedString(estimatedCount)).append("\n"); + sb.append(" failedSessions: ").append(toIndentedString(failedSessions)).append("\n"); + sb.append(" from: ").append(toIndentedString(from)).append("\n"); + sb.append(" processedSessions: ").append(toIndentedString(processedSessions)).append("\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" requestType: ").append(toIndentedString(requestType)).append("\n"); + sb.append(" sessions: ").append(toIndentedString(sessions)).append("\n"); + sb.append(" sessionsDiscovered: ").append(toIndentedString(sessionsDiscovered)).append("\n"); + sb.append(" sessionsFailed: ").append(toIndentedString(sessionsFailed)).append("\n"); + sb.append(" sessionsProcessed: ").append(toIndentedString(sessionsProcessed)).append("\n"); + sb.append(" slicesCompleted: ").append(toIndentedString(slicesCompleted)).append("\n"); + sb.append(" slicesFailed: ").append(toIndentedString(slicesFailed)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" to: ").append(toIndentedString(to)).append("\n"); + sb.append(" totalSessions: ").append(toIndentedString(totalSessions)).append("\n"); + sb.append(" totalSlices: ").append(toIndentedString(totalSlices)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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/RumRecoveryRequestData.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryRequestData.java new file mode 100644 index 00000000000..67f31d2783f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryRequestData.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; + +/** JSON:API resource. */ +@JsonPropertyOrder({ + RumRecoveryRequestData.JSON_PROPERTY_ATTRIBUTES, + RumRecoveryRequestData.JSON_PROPERTY_ID, + RumRecoveryRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRecoveryRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RumRecoveryRequestAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private RumRecoveryRequestType type; + + public RumRecoveryRequestData() {} + + @JsonCreator + public RumRecoveryRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + RumRecoveryRequestAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RumRecoveryRequestType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public RumRecoveryRequestData attributes(RumRecoveryRequestAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Recovery progress. Batch-only attributes are omitted for targeted requests; request_type is + * also omitted for targeted requests. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRecoveryRequestAttributes getAttributes() { + return attributes; + } + + public void setAttributes(RumRecoveryRequestAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public RumRecoveryRequestData id(String id) { + this.id = id; + return this; + } + + /** + * Resource identifier. + * + * @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 RumRecoveryRequestData type(RumRecoveryRequestType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * JSON:API resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRecoveryRequestType getType() { + return type; + } + + public void setType(RumRecoveryRequestType 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 RumRecoveryRequestData + */ + @JsonAnySetter + public RumRecoveryRequestData 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 RumRecoveryRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRecoveryRequestData rumRecoveryRequestData = (RumRecoveryRequestData) o; + return Objects.equals(this.attributes, rumRecoveryRequestData.attributes) + && Objects.equals(this.id, rumRecoveryRequestData.id) + && Objects.equals(this.type, rumRecoveryRequestData.type) + && Objects.equals(this.additionalProperties, rumRecoveryRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRecoveryRequestData {\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/RumRecoveryRequestResponse.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryRequestResponse.java new file mode 100644 index 00000000000..59f00f0917a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryRequestResponse.java @@ -0,0 +1,149 @@ +/* + * 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; + +/** JSON:API document. */ +@JsonPropertyOrder({RumRecoveryRequestResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRecoveryRequestResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private RumRecoveryRequestData data; + + public RumRecoveryRequestResponse() {} + + @JsonCreator + public RumRecoveryRequestResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) RumRecoveryRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public RumRecoveryRequestResponse data(RumRecoveryRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * JSON:API resource. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRecoveryRequestData getData() { + return data; + } + + public void setData(RumRecoveryRequestData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 RumRecoveryRequestResponse + */ + @JsonAnySetter + public RumRecoveryRequestResponse 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 RumRecoveryRequestResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRecoveryRequestResponse rumRecoveryRequestResponse = (RumRecoveryRequestResponse) o; + return Objects.equals(this.data, rumRecoveryRequestResponse.data) + && Objects.equals( + this.additionalProperties, rumRecoveryRequestResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRecoveryRequestResponse {\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/RumRecoveryRequestStatus.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryRequestStatus.java new file mode 100644 index 00000000000..64cadd1085a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryRequestStatus.java @@ -0,0 +1,65 @@ +/* + * 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; + +/** Recovery request state. */ +@JsonSerialize(using = RumRecoveryRequestStatus.RumRecoveryRequestStatusSerializer.class) +public class RumRecoveryRequestStatus extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList("PENDING", "PROCESSING", "COMPLETED", "FAILED", "CANCELLED", "EXPIRED")); + + public static final RumRecoveryRequestStatus PENDING = new RumRecoveryRequestStatus("PENDING"); + public static final RumRecoveryRequestStatus PROCESSING = + new RumRecoveryRequestStatus("PROCESSING"); + public static final RumRecoveryRequestStatus COMPLETED = + new RumRecoveryRequestStatus("COMPLETED"); + public static final RumRecoveryRequestStatus FAILED = new RumRecoveryRequestStatus("FAILED"); + public static final RumRecoveryRequestStatus CANCELLED = + new RumRecoveryRequestStatus("CANCELLED"); + public static final RumRecoveryRequestStatus EXPIRED = new RumRecoveryRequestStatus("EXPIRED"); + + RumRecoveryRequestStatus(String value) { + super(value, allowedValues); + } + + public static class RumRecoveryRequestStatusSerializer + extends StdSerializer { + public RumRecoveryRequestStatusSerializer(Class t) { + super(t); + } + + public RumRecoveryRequestStatusSerializer() { + this(null); + } + + @Override + public void serialize( + RumRecoveryRequestStatus value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static RumRecoveryRequestStatus fromValue(String value) { + return new RumRecoveryRequestStatus(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RumRecoveryRequestType.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryRequestType.java new file mode 100644 index 00000000000..d64df2e4163 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoveryRequestType.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; + +/** JSON:API resource type. */ +@JsonSerialize(using = RumRecoveryRequestType.RumRecoveryRequestTypeSerializer.class) +public class RumRecoveryRequestType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("rum_recovery_request")); + + public static final RumRecoveryRequestType RUM_RECOVERY_REQUEST = + new RumRecoveryRequestType("rum_recovery_request"); + + RumRecoveryRequestType(String value) { + super(value, allowedValues); + } + + public static class RumRecoveryRequestTypeSerializer + extends StdSerializer { + public RumRecoveryRequestTypeSerializer(Class t) { + super(t); + } + + public RumRecoveryRequestTypeSerializer() { + this(null); + } + + @Override + public void serialize( + RumRecoveryRequestType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static RumRecoveryRequestType fromValue(String value) { + return new RumRecoveryRequestType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RumRecoverySessionInput.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoverySessionInput.java new file mode 100644 index 00000000000..e612ff27856 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoverySessionInput.java @@ -0,0 +1,174 @@ +/* + * 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 java.util.UUID; + +/** Archived session to recover. */ +@JsonPropertyOrder({ + RumRecoverySessionInput.JSON_PROPERTY_APPLICATION_ID, + RumRecoverySessionInput.JSON_PROPERTY_SESSION_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRecoverySessionInput { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_APPLICATION_ID = "application_id"; + private UUID applicationId; + + public static final String JSON_PROPERTY_SESSION_ID = "session_id"; + private UUID sessionId; + + public RumRecoverySessionInput() {} + + @JsonCreator + public RumRecoverySessionInput( + @JsonProperty(required = true, value = JSON_PROPERTY_APPLICATION_ID) UUID applicationId, + @JsonProperty(required = true, value = JSON_PROPERTY_SESSION_ID) UUID sessionId) { + this.applicationId = applicationId; + this.sessionId = sessionId; + } + + public RumRecoverySessionInput applicationId(UUID applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * Application UUID. + * + * @return applicationId + */ + @JsonProperty(JSON_PROPERTY_APPLICATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getApplicationId() { + return applicationId; + } + + public void setApplicationId(UUID applicationId) { + this.applicationId = applicationId; + } + + public RumRecoverySessionInput sessionId(UUID sessionId) { + this.sessionId = sessionId; + return this; + } + + /** + * Session UUID. + * + * @return sessionId + */ + @JsonProperty(JSON_PROPERTY_SESSION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getSessionId() { + return sessionId; + } + + public void setSessionId(UUID sessionId) { + this.sessionId = sessionId; + } + + /** + * 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 RumRecoverySessionInput + */ + @JsonAnySetter + public RumRecoverySessionInput 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 RumRecoverySessionInput object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRecoverySessionInput rumRecoverySessionInput = (RumRecoverySessionInput) o; + return Objects.equals(this.applicationId, rumRecoverySessionInput.applicationId) + && Objects.equals(this.sessionId, rumRecoverySessionInput.sessionId) + && Objects.equals(this.additionalProperties, rumRecoverySessionInput.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(applicationId, sessionId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRecoverySessionInput {\n"); + sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); + sb.append(" sessionId: ").append(toIndentedString(sessionId)).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/RumRecoverySessionStatus.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoverySessionStatus.java new file mode 100644 index 00000000000..7958504da40 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoverySessionStatus.java @@ -0,0 +1,79 @@ +/* + * 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; + +/** + * Session availability or recovery state. RECOVERED indicates that the session is + * ready to query. + */ +@JsonSerialize(using = RumRecoverySessionStatus.RumRecoverySessionStatusSerializer.class) +public class RumRecoverySessionStatus extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList( + "AVAILABLE", + "PENDING", + "PROCESSING", + "RECOVERED", + "FAILED", + "RETAINED", + "EXPIRED", + "CANCELLED")); + + public static final RumRecoverySessionStatus AVAILABLE = + new RumRecoverySessionStatus("AVAILABLE"); + public static final RumRecoverySessionStatus PENDING = new RumRecoverySessionStatus("PENDING"); + public static final RumRecoverySessionStatus PROCESSING = + new RumRecoverySessionStatus("PROCESSING"); + public static final RumRecoverySessionStatus RECOVERED = + new RumRecoverySessionStatus("RECOVERED"); + public static final RumRecoverySessionStatus FAILED = new RumRecoverySessionStatus("FAILED"); + public static final RumRecoverySessionStatus RETAINED = new RumRecoverySessionStatus("RETAINED"); + public static final RumRecoverySessionStatus EXPIRED = new RumRecoverySessionStatus("EXPIRED"); + public static final RumRecoverySessionStatus CANCELLED = + new RumRecoverySessionStatus("CANCELLED"); + + RumRecoverySessionStatus(String value) { + super(value, allowedValues); + } + + public static class RumRecoverySessionStatusSerializer + extends StdSerializer { + public RumRecoverySessionStatusSerializer(Class t) { + super(t); + } + + public RumRecoverySessionStatusSerializer() { + this(null); + } + + @Override + public void serialize( + RumRecoverySessionStatus value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static RumRecoverySessionStatus fromValue(String value) { + return new RumRecoverySessionStatus(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RumRecoverySessionsCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoverySessionsCreateAttributes.java new file mode 100644 index 00000000000..5f7a84c254a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoverySessionsCreateAttributes.java @@ -0,0 +1,199 @@ +/* + * 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; + +/** Recover 1 to 100 explicit archived sessions. Session IDs must be unique within the request. */ +@JsonPropertyOrder({ + RumRecoverySessionsCreateAttributes.JSON_PROPERTY_REQUEST_TYPE, + RumRecoverySessionsCreateAttributes.JSON_PROPERTY_SESSIONS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRecoverySessionsCreateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_REQUEST_TYPE = "request_type"; + private RumRecoverySessionsRequestType requestType = RumRecoverySessionsRequestType.SESSIONS; + + public static final String JSON_PROPERTY_SESSIONS = "sessions"; + private List sessions = new ArrayList<>(); + + public RumRecoverySessionsCreateAttributes() {} + + @JsonCreator + public RumRecoverySessionsCreateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_SESSIONS) + List sessions) { + this.sessions = sessions; + for (RumRecoverySessionInput item : sessions) { + this.unparsed |= item.unparsed; + } + } + + public RumRecoverySessionsCreateAttributes requestType( + RumRecoverySessionsRequestType requestType) { + this.requestType = requestType; + this.unparsed |= !requestType.isValid(); + return this; + } + + /** + * Targeted recovery. Omitted request_type defaults to sessions. + * + * @return requestType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUEST_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RumRecoverySessionsRequestType getRequestType() { + return requestType; + } + + public void setRequestType(RumRecoverySessionsRequestType requestType) { + if (!requestType.isValid()) { + this.unparsed = true; + } + this.requestType = requestType; + } + + public RumRecoverySessionsCreateAttributes sessions(List sessions) { + this.sessions = sessions; + for (RumRecoverySessionInput item : sessions) { + this.unparsed |= item.unparsed; + } + return this; + } + + public RumRecoverySessionsCreateAttributes addSessionsItem(RumRecoverySessionInput sessionsItem) { + this.sessions.add(sessionsItem); + this.unparsed |= sessionsItem.unparsed; + return this; + } + + /** + * Sessions to recover. + * + * @return sessions + */ + @JsonProperty(JSON_PROPERTY_SESSIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getSessions() { + return sessions; + } + + public void setSessions(List sessions) { + this.sessions = sessions; + if (sessions != null) { + for (RumRecoverySessionInput item : sessions) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 RumRecoverySessionsCreateAttributes + */ + @JsonAnySetter + public RumRecoverySessionsCreateAttributes 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 RumRecoverySessionsCreateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRecoverySessionsCreateAttributes rumRecoverySessionsCreateAttributes = + (RumRecoverySessionsCreateAttributes) o; + return Objects.equals(this.requestType, rumRecoverySessionsCreateAttributes.requestType) + && Objects.equals(this.sessions, rumRecoverySessionsCreateAttributes.sessions) + && Objects.equals( + this.additionalProperties, rumRecoverySessionsCreateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(requestType, sessions, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRecoverySessionsCreateAttributes {\n"); + sb.append(" requestType: ").append(toIndentedString(requestType)).append("\n"); + sb.append(" sessions: ").append(toIndentedString(sessions)).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/RumRecoverySessionsRequestType.java b/src/main/java/com/datadog/api/client/v2/model/RumRecoverySessionsRequestType.java new file mode 100644 index 00000000000..b1e3c493681 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRecoverySessionsRequestType.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; + +/** Targeted recovery. Omitted request_type defaults to sessions. */ +@JsonSerialize( + using = RumRecoverySessionsRequestType.RumRecoverySessionsRequestTypeSerializer.class) +public class RumRecoverySessionsRequestType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("sessions")); + + public static final RumRecoverySessionsRequestType SESSIONS = + new RumRecoverySessionsRequestType("sessions"); + + RumRecoverySessionsRequestType(String value) { + super(value, allowedValues); + } + + public static class RumRecoverySessionsRequestTypeSerializer + extends StdSerializer { + public RumRecoverySessionsRequestTypeSerializer(Class t) { + super(t); + } + + public RumRecoverySessionsRequestTypeSerializer() { + this(null); + } + + @Override + public void serialize( + RumRecoverySessionsRequestType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static RumRecoverySessionsRequestType fromValue(String value) { + return new RumRecoverySessionsRequestType(value); + } +} diff --git a/src/test/resources/com/datadog/api/client/v2/api/rum_managed_archives.feature b/src/test/resources/com/datadog/api/client/v2/api/rum_managed_archives.feature new file mode 100644 index 00000000000..e1d7d3a0a1f --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/rum_managed_archives.feature @@ -0,0 +1,131 @@ +@endpoint(rum-config) @endpoint(rum-config-v2) @endpoint(rum-managed-archives) @endpoint(rum-managed-archives-v2) +Feature: RUM Managed Archives + Configure Managed Archives for RUM applications. Your organization must + have Managed Archives enabled. Requires `rum_rehydration_filter_read` to + list or get configurations, or `rum_rehydration_filter_write` to create, + update, or delete them. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "RUMManagedArchives" API + + @generated @skip @team:ddoghq/rum-backend + Scenario: Create or update an archive configuration returns "Bad Request" response + Given new "UpdateRUMArchiveConfig" request + And request contains "app_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"enabled": true, "retention_days": 90}, "id": "a33671aa-24fd-4dcd-ba4b-5bbdbafe7690", "type": "rum_archive_config"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/rum-backend + Scenario: Create or update an archive configuration returns "Not Found" response + Given new "UpdateRUMArchiveConfig" request + And request contains "app_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"enabled": true, "retention_days": 90}, "id": "a33671aa-24fd-4dcd-ba4b-5bbdbafe7690", "type": "rum_archive_config"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/rum-backend + Scenario: Create or update an archive configuration returns "OK" response + Given new "UpdateRUMArchiveConfig" request + And request contains "app_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"enabled": true, "retention_days": 90}, "id": "a33671aa-24fd-4dcd-ba4b-5bbdbafe7690", "type": "rum_archive_config"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:ddoghq/rum-backend + Scenario: Delete an archive configuration returns "Bad Request" response + Given new "DeleteRUMArchiveConfig" request + And request contains "app_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/rum-backend + Scenario: Delete an archive configuration returns "No Content" response + Given new "DeleteRUMArchiveConfig" request + And request contains "app_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:ddoghq/rum-backend + Scenario: Delete an archive configuration returns "Not Found" response + Given new "DeleteRUMArchiveConfig" request + And request contains "app_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @skip-terraform-config @team:ddoghq/rum-backend + Scenario: Delete an unknown archive configuration returns "Not Found" response + Given new "DeleteRUMArchiveConfig" request + And request contains "app_id" parameter with value "{{ uuid }}" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/rum-backend + Scenario: Get an archive configuration returns "Bad Request" response + Given new "GetRUMArchiveConfig" request + And request contains "app_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/rum-backend + Scenario: Get an archive configuration returns "Not Found" response + Given new "GetRUMArchiveConfig" request + And request contains "app_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/rum-backend + Scenario: Get an archive configuration returns "OK" response + Given new "GetRUMArchiveConfig" request + And request contains "app_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @skip-terraform-config @team:ddoghq/rum-backend + Scenario: Get an unknown archive configuration returns "Not Found" response + Given new "GetRUMArchiveConfig" request + And request contains "app_id" parameter with value "{{ uuid }}" + When the request is sent + Then the response status is 404 Not Found + And the response "errors" has length 1 + + @skip-go @skip-java @skip-python @skip-terraform-config @team:ddoghq/rum-backend + Scenario: Get archive configuration rejects an invalid application ID + Given new "GetRUMArchiveConfig" request + And request contains "app_id" parameter with value "invalid" + When the request is sent + Then the response status is 400 Bad Request + + @skip-python @skip-ruby @skip-terraform-config @team:ddoghq/rum-backend + Scenario: List archive configurations rejects an invalid page size + Given new "ListRUMArchiveConfigs" request + And request contains "page[size]" parameter with value 101 + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/rum-backend + Scenario: List archive configurations returns "Bad Request" response + Given new "ListRUMArchiveConfigs" request + When the request is sent + Then the response status is 400 Bad Request + + @skip-terraform-config @team:ddoghq/rum-backend + Scenario: List archive configurations returns "OK" response + Given new "ListRUMArchiveConfigs" request + And request contains "page[number]" parameter with value 0 + And request contains "page[size]" parameter with value 1 + When the request is sent + Then the response status is 200 OK + And the response "meta.page" has field "total_filtered_count" + + @skip-terraform-config @team:ddoghq/rum-backend + Scenario: Update archive configuration with unsupported enabled retention returns "Bad Request" response + Given there is a valid "rum_application" in the system + And new "UpdateRUMArchiveConfig" request + And request contains "app_id" parameter with value "{{ rum_application.data.id }}" + And body with value {"data":{"id":"{{ rum_application.data.id }}","type":"rum_archive_config","attributes":{"enabled":true,"retention_days":31}}} + When the request is sent + Then the response status is 400 Bad Request + And the response "errors" has length 1 diff --git a/src/test/resources/com/datadog/api/client/v2/api/rum_recovery.feature b/src/test/resources/com/datadog/api/client/v2/api/rum_recovery.feature new file mode 100644 index 00000000000..2af3bf3d129 --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/rum_recovery.feature @@ -0,0 +1,250 @@ +@endpoint(rum-config) @endpoint(rum-config-v2) @endpoint(rum-recovery) @endpoint(rum-recovery-v2) +Feature: RUM Recovery + Search archived RUM sessions and recover individual sessions or query- + based batches. Your organization must have Managed Archives enabled. + Creating, counting, listing, and canceling batches also require batch + recovery enablement. Requires `rum_rehydration_filter_read` for search + and request details, or `rum_rehydration_index` to create, estimate + recoverable sessions, list batches, or cancel recovery requests. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "RUMRecovery" API + + @generated @skip @team:ddoghq/rum-backend + Scenario: Cancel a batch recovery request returns "Bad Request" response + Given new "UpdateRUMRecoveryBatchRequest" request + And request contains "request_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"status": "cancelled"}, "id": "11111111-1111-4111-8111-111111111111", "type": "rum_recovery_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/rum-backend + Scenario: Cancel a batch recovery request returns "Conflict" response + Given new "UpdateRUMRecoveryBatchRequest" request + And request contains "request_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"status": "cancelled"}, "id": "11111111-1111-4111-8111-111111111111", "type": "rum_recovery_request"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:ddoghq/rum-backend + Scenario: Cancel a batch recovery request returns "Not Found" response + Given new "UpdateRUMRecoveryBatchRequest" request + And request contains "request_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"status": "cancelled"}, "id": "11111111-1111-4111-8111-111111111111", "type": "rum_recovery_request"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/rum-backend + Scenario: Cancel a batch recovery request returns "OK" response + Given new "UpdateRUMRecoveryBatchRequest" request + And request contains "request_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"status": "cancelled"}, "id": "11111111-1111-4111-8111-111111111111", "type": "rum_recovery_request"}} + When the request is sent + Then the response status is 200 OK + + @skip-terraform-config @team:ddoghq/rum-backend + Scenario: Cancel an unknown batch recovery returns "Not Found" response + Given new "UpdateRUMRecoveryBatchRequest" request + And request contains "request_id" parameter with value "{{ uuid }}" + And body with value {"data":{"type":"rum_recovery_request","attributes":{"status":"cancelled"}}} + When the request is sent + Then the response status is 404 Not Found + + @skip-terraform-config @team:ddoghq/rum-backend + Scenario: Count recoverable sessions accepts exactly 180 days + Given new "GetRUMRecoverySessionCount" request + And body with value {"data":{"type":"rum_recovery_count","attributes":{"query":"service:rum18600-fixture","from":{{ timestamp("now - 180d") }}000,"to":{{ timestamp("now") }}000}}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "rum_recovery_count" + And the response "data.attributes" has field "estimated_count" + And the response "data.attributes" has field "max_recoverable_sessions" + + @skip-terraform-config @team:ddoghq/rum-backend + Scenario: Count recoverable sessions rejects a range wider than 180 days + Given new "GetRUMRecoverySessionCount" request + And body with value {"data":{"type":"rum_recovery_count","attributes":{"query":"service:rum18600-fixture","from":{{ timestamp("now - 181d") }}000,"to":{{ timestamp("now") }}000}}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/rum-backend + Scenario: Create a recovery request returns "Accepted" response + Given new "CreateRUMRecoveryRequest" request + And body with value {"data": {"attributes": {"request_type": "sessions", "sessions": [{"application_id": "a33671aa-24fd-4dcd-ba4b-5bbdbafe7690", "session_id": "00000000-0000-4000-8000-000000000001"}]}, "type": "rum_recovery_request"}} + When the request is sent + Then the response status is 202 Accepted + + @generated @skip @team:ddoghq/rum-backend + Scenario: Create a recovery request returns "Bad Request" response + Given new "CreateRUMRecoveryRequest" request + And body with value {"data": {"attributes": {"request_type": "sessions", "sessions": [{"application_id": "a33671aa-24fd-4dcd-ba4b-5bbdbafe7690", "session_id": "00000000-0000-4000-8000-000000000001"}]}, "type": "rum_recovery_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/rum-backend + Scenario: Create a recovery request returns "Conflict. Targeted sessions are already retained, in flight, or previously failed, or a concurrent batch was created." response + Given new "CreateRUMRecoveryRequest" request + And body with value {"data": {"attributes": {"request_type": "sessions", "sessions": [{"application_id": "a33671aa-24fd-4dcd-ba4b-5bbdbafe7690", "session_id": "00000000-0000-4000-8000-000000000001"}]}, "type": "rum_recovery_request"}} + When the request is sent + Then the response status is 409 Conflict. Targeted sessions are already retained, in flight, or previously failed, or a concurrent batch was created. + + @generated @skip @team:ddoghq/rum-backend + Scenario: Create a recovery request returns "Not Found" response + Given new "CreateRUMRecoveryRequest" request + And body with value {"data": {"attributes": {"request_type": "sessions", "sessions": [{"application_id": "a33671aa-24fd-4dcd-ba4b-5bbdbafe7690", "session_id": "00000000-0000-4000-8000-000000000001"}]}, "type": "rum_recovery_request"}} + When the request is sent + Then the response status is 404 Not Found + + @skip-go @skip-ruby @skip-terraform-config @team:ddoghq/rum-backend + Scenario: Create batch recovery rejects a range wider than 180 days + Given new "CreateRUMRecoveryRequest" request + And body with value {"data":{"type":"rum_recovery_request","attributes":{"request_type":"batch","query":"service:rum18600-fixture","from":{{ timestamp("now - 181d") }}000,"to":{{ timestamp("now") }}000}}} + When the request is sent + Then the response status is 400 Bad Request + + @skip-go @skip-ruby @skip-terraform-config @team:ddoghq/rum-backend + Scenario: Create targeted recovery rejects an empty sessions array + Given new "CreateRUMRecoveryRequest" request + And body with value {"data":{"type":"rum_recovery_request","attributes":{"sessions":[]}}} + When the request is sent + Then the response status is 400 Bad Request + And the response "errors" has length 1 + + @generated @skip @team:ddoghq/rum-backend + Scenario: Estimate recoverable sessions returns "Bad Request" response + Given new "GetRUMRecoverySessionCount" request + And body with value {"data": {"attributes": {"from": 1789905600000, "query": "service:web", "to": 1789992000000}, "id": "11111111-1111-4111-8111-111111111111", "type": "rum_recovery_count"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/rum-backend + Scenario: Estimate recoverable sessions returns "Not Found" response + Given new "GetRUMRecoverySessionCount" request + And body with value {"data": {"attributes": {"from": 1789905600000, "query": "service:web", "to": 1789992000000}, "id": "11111111-1111-4111-8111-111111111111", "type": "rum_recovery_count"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/rum-backend + Scenario: Estimate recoverable sessions returns "OK" response + Given new "GetRUMRecoverySessionCount" request + And body with value {"data": {"attributes": {"from": 1789905600000, "query": "service:web", "to": 1789992000000}, "id": "11111111-1111-4111-8111-111111111111", "type": "rum_recovery_count"}} + When the request is sent + Then the response status is 200 OK + + @skip-terraform-config @team:ddoghq/rum-backend + Scenario: Get an unknown recovery request returns "Not Found" response + Given new "GetRUMRecoveryRequest" request + And request contains "request_id" parameter with value "{{ uuid }}" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/rum-backend + Scenario: Get recovery request progress returns "Bad Request" response + Given new "GetRUMRecoveryRequest" request + And request contains "request_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/rum-backend + Scenario: Get recovery request progress returns "Not Found" response + Given new "GetRUMRecoveryRequest" request + And request contains "request_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/rum-backend + Scenario: Get recovery request progress returns "OK" response + Given new "GetRUMRecoveryRequest" request + And request contains "request_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @skip-terraform-config @team:ddoghq/rum-backend + Scenario: List batch history filters request creation time independently of session time + Given new "ListRUMRecoveryBatchRequests" request + And request contains "type" parameter with value "batch" + And request contains "from" parameter with value 1 + And request contains "to" parameter with value 2 + And request contains "query" parameter with value "service:rum18600-fixture AND @usr.id:(123 OR 456)" + When the request is sent + Then the response status is 200 OK + And the response "data" has length 0 + And the response "meta" does not have field "next_cursor" + + @skip-terraform-config @team:ddoghq/rum-backend + Scenario: List batch history rejects OR between filter terms + Given new "ListRUMRecoveryBatchRequests" request + And request contains "type" parameter with value "batch" + And request contains "query" parameter with value "service:web OR @usr.id:123" + When the request is sent + Then the response status is 400 Bad Request + + @skip-terraform-config @team:ddoghq/rum-backend + Scenario: List batch history rejects an invalid cursor + Given new "ListRUMRecoveryBatchRequests" request + And request contains "type" parameter with value "batch" + And request contains "cursor" parameter with value "invalid" + When the request is sent + Then the response status is 400 Bad Request + + @skip-terraform-config @team:ddoghq/rum-backend + Scenario: List batch history rejects equal creation-time bounds + Given new "ListRUMRecoveryBatchRequests" request + And request contains "type" parameter with value "batch" + And request contains "from" parameter with value 1789905600000 + And request contains "to" parameter with value 1789905600000 + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/rum-backend + Scenario: List batch recovery requests returns "Bad Request" response + Given new "ListRUMRecoveryBatchRequests" request + And request contains "type" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/rum-backend + Scenario: List batch recovery requests returns "Not Found" response + Given new "ListRUMRecoveryBatchRequests" request + And request contains "type" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:ddoghq/rum-backend + Scenario: List batch recovery requests returns "OK" response + Given new "ListRUMRecoveryBatchRequests" request + And request contains "type" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @skip-terraform-config @team:ddoghq/rum-backend + Scenario: Search archived sessions rejects an empty query + Given new "SearchRUMArchiveSessions" request + And body with value {"data":{"type":"rum_archive_sessions_request","attributes":{"query":"","from":1789905600000,"to":1789992000000}}} + When the request is sent + Then the response status is 400 Bad Request + And the response "errors" has length 1 + + @generated @skip @team:ddoghq/rum-backend + Scenario: Search archived sessions returns "Bad Request" response + Given new "SearchRUMArchiveSessions" request + And body with value {"data": {"attributes": {"cursor": "example", "from": 1789905600000, "hide_retained": false, "limit": 0, "query": "service:web", "to": 1789992000000}, "id": "11111111-1111-4111-8111-111111111111", "type": "rum_archive_sessions_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/rum-backend + Scenario: Search archived sessions returns "OK" response + Given new "SearchRUMArchiveSessions" request + And body with value {"data": {"attributes": {"cursor": "example", "from": 1789905600000, "hide_retained": false, "limit": 0, "query": "service:web", "to": 1789992000000}, "id": "11111111-1111-4111-8111-111111111111", "type": "rum_archive_sessions_request"}} + When the request is sent + Then the response status is 200 OK + + @skip-terraform-config @team:ddoghq/rum-backend + Scenario: Search archived sessions returns canonical data and first-page metadata + Given new "SearchRUMArchiveSessions" request + And body with value {"data":{"type":"rum_archive_sessions_request","attributes":{"query":"service:rum18600-fixture","from":{{ timestamp("now - 7d") }}000,"to":{{ timestamp("now") }}000,"limit":1}}} + When the request is sent + Then the response status is 200 OK + And the response "meta.page" has field "total_count" 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 723033198e0..a6beddd06f1 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 @@ -8058,6 +8058,30 @@ "type": "idempotent" } }, + "ListRUMArchiveConfigs": { + "tag": "RUM Managed Archives", + "undo": { + "type": "safe" + } + }, + "DeleteRUMArchiveConfig": { + "tag": "RUM Managed Archives", + "undo": { + "type": "idempotent" + } + }, + "GetRUMArchiveConfig": { + "tag": "RUM Managed Archives", + "undo": { + "type": "safe" + } + }, + "UpdateRUMArchiveConfig": { + "tag": "RUM Managed Archives", + "undo": { + "type": "idempotent" + } + }, "ListRumMetrics": { "tag": "Rum Metrics", "undo": { @@ -8247,6 +8271,42 @@ "type": "safe" } }, + "GetRUMRecoverySessionCount": { + "tag": "RUM Recovery", + "undo": { + "type": "safe" + } + }, + "ListRUMRecoveryBatchRequests": { + "tag": "RUM Recovery", + "undo": { + "type": "safe" + } + }, + "CreateRUMRecoveryRequest": { + "tag": "RUM Recovery", + "undo": { + "type": "unsafe" + } + }, + "GetRUMRecoveryRequest": { + "tag": "RUM Recovery", + "undo": { + "type": "safe" + } + }, + "UpdateRUMRecoveryBatchRequest": { + "tag": "RUM Recovery", + "undo": { + "type": "idempotent" + } + }, + "SearchRUMArchiveSessions": { + "tag": "RUM Recovery", + "undo": { + "type": "safe" + } + }, "ListRumReplayPlaylists": { "tag": "Rum Replay Playlists", "undo": { diff --git a/src/test/resources/generated-test/test-runner-data/manifest.json b/src/test/resources/generated-test/test-runner-data/manifest.json index 10833cdaab6..a39edddfce0 100644 --- a/src/test/resources/generated-test/test-runner-data/manifest.json +++ b/src/test/resources/generated-test/test-runner-data/manifest.json @@ -9919,6 +9919,48 @@ "scenario": "Update a RUM application with Product Scales returns \"OK\" response", "version": "v2" }, + { + "feature": "RUM Managed Archives", + "feature_file": "../../com/datadog/api/client/v2/api/rum_managed_archives.feature", + "file": "v2/rum-managed-archives/delete-an-unknown-archive-configuration-returns-not-found-response.json", + "scenario": "Delete an unknown archive configuration returns \"Not Found\" response", + "version": "v2" + }, + { + "feature": "RUM Managed Archives", + "feature_file": "../../com/datadog/api/client/v2/api/rum_managed_archives.feature", + "file": "v2/rum-managed-archives/get-an-unknown-archive-configuration-returns-not-found-response.json", + "scenario": "Get an unknown archive configuration returns \"Not Found\" response", + "version": "v2" + }, + { + "feature": "RUM Managed Archives", + "feature_file": "../../com/datadog/api/client/v2/api/rum_managed_archives.feature", + "file": "v2/rum-managed-archives/get-archive-configuration-rejects-an-invalid-application-id.json", + "scenario": "Get archive configuration rejects an invalid application ID", + "version": "v2" + }, + { + "feature": "RUM Managed Archives", + "feature_file": "../../com/datadog/api/client/v2/api/rum_managed_archives.feature", + "file": "v2/rum-managed-archives/list-archive-configurations-rejects-an-invalid-page-size.json", + "scenario": "List archive configurations rejects an invalid page size", + "version": "v2" + }, + { + "feature": "RUM Managed Archives", + "feature_file": "../../com/datadog/api/client/v2/api/rum_managed_archives.feature", + "file": "v2/rum-managed-archives/list-archive-configurations-returns-ok-response.json", + "scenario": "List archive configurations returns \"OK\" response", + "version": "v2" + }, + { + "feature": "RUM Managed Archives", + "feature_file": "../../com/datadog/api/client/v2/api/rum_managed_archives.feature", + "file": "v2/rum-managed-archives/update-archive-configuration-with-unsupported-enabled-retention-returns-bad-request-response.json", + "scenario": "Update archive configuration with unsupported enabled retention returns \"Bad Request\" response", + "version": "v2" + }, { "feature": "Rum Metrics", "feature_file": "../../com/datadog/api/client/v2/api/rum_metrics.feature", @@ -10003,6 +10045,90 @@ "scenario": "Update a RUM-based metric returns \"OK\" response", "version": "v2" }, + { + "feature": "RUM Recovery", + "feature_file": "../../com/datadog/api/client/v2/api/rum_recovery.feature", + "file": "v2/rum-recovery/cancel-an-unknown-batch-recovery-returns-not-found-response.json", + "scenario": "Cancel an unknown batch recovery returns \"Not Found\" response", + "version": "v2" + }, + { + "feature": "RUM Recovery", + "feature_file": "../../com/datadog/api/client/v2/api/rum_recovery.feature", + "file": "v2/rum-recovery/count-recoverable-sessions-accepts-exactly-180-days.json", + "scenario": "Count recoverable sessions accepts exactly 180 days", + "version": "v2" + }, + { + "feature": "RUM Recovery", + "feature_file": "../../com/datadog/api/client/v2/api/rum_recovery.feature", + "file": "v2/rum-recovery/count-recoverable-sessions-rejects-a-range-wider-than-180-days.json", + "scenario": "Count recoverable sessions rejects a range wider than 180 days", + "version": "v2" + }, + { + "feature": "RUM Recovery", + "feature_file": "../../com/datadog/api/client/v2/api/rum_recovery.feature", + "file": "v2/rum-recovery/create-batch-recovery-rejects-a-range-wider-than-180-days.json", + "scenario": "Create batch recovery rejects a range wider than 180 days", + "version": "v2" + }, + { + "feature": "RUM Recovery", + "feature_file": "../../com/datadog/api/client/v2/api/rum_recovery.feature", + "file": "v2/rum-recovery/create-targeted-recovery-rejects-an-empty-sessions-array.json", + "scenario": "Create targeted recovery rejects an empty sessions array", + "version": "v2" + }, + { + "feature": "RUM Recovery", + "feature_file": "../../com/datadog/api/client/v2/api/rum_recovery.feature", + "file": "v2/rum-recovery/get-an-unknown-recovery-request-returns-not-found-response.json", + "scenario": "Get an unknown recovery request returns \"Not Found\" response", + "version": "v2" + }, + { + "feature": "RUM Recovery", + "feature_file": "../../com/datadog/api/client/v2/api/rum_recovery.feature", + "file": "v2/rum-recovery/list-batch-history-filters-request-creation-time-independently-of-session-time.json", + "scenario": "List batch history filters request creation time independently of session time", + "version": "v2" + }, + { + "feature": "RUM Recovery", + "feature_file": "../../com/datadog/api/client/v2/api/rum_recovery.feature", + "file": "v2/rum-recovery/list-batch-history-rejects-or-between-filter-terms.json", + "scenario": "List batch history rejects OR between filter terms", + "version": "v2" + }, + { + "feature": "RUM Recovery", + "feature_file": "../../com/datadog/api/client/v2/api/rum_recovery.feature", + "file": "v2/rum-recovery/list-batch-history-rejects-an-invalid-cursor.json", + "scenario": "List batch history rejects an invalid cursor", + "version": "v2" + }, + { + "feature": "RUM Recovery", + "feature_file": "../../com/datadog/api/client/v2/api/rum_recovery.feature", + "file": "v2/rum-recovery/list-batch-history-rejects-equal-creation-time-bounds.json", + "scenario": "List batch history rejects equal creation-time bounds", + "version": "v2" + }, + { + "feature": "RUM Recovery", + "feature_file": "../../com/datadog/api/client/v2/api/rum_recovery.feature", + "file": "v2/rum-recovery/search-archived-sessions-rejects-an-empty-query.json", + "scenario": "Search archived sessions rejects an empty query", + "version": "v2" + }, + { + "feature": "RUM Recovery", + "feature_file": "../../com/datadog/api/client/v2/api/rum_recovery.feature", + "file": "v2/rum-recovery/search-archived-sessions-returns-canonical-data-and-first-page-metadata.json", + "scenario": "Search archived sessions returns canonical data and first-page metadata", + "version": "v2" + }, { "feature": "RUM Remote Config", "feature_file": "../../com/datadog/api/client/v2/api/rum_remote_config.feature", diff --git a/src/test/resources/generated-test/test-runner-data/v2/rum-managed-archives/delete-an-unknown-archive-configuration-returns-not-found-response.json b/src/test/resources/generated-test/test-runner-data/v2/rum-managed-archives/delete-an-unknown-archive-configuration-returns-not-found-response.json new file mode 100644 index 00000000000..ce392174b56 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/rum-managed-archives/delete-an-unknown-archive-configuration-returns-not-found-response.json @@ -0,0 +1,35 @@ +{ + "api": "RUMManagedArchives", + "expected_status": 404, + "feature": "RUM Managed Archives", + "id": "v2/RUM Managed Archives/Delete an unknown archive configuration returns \"Not Found\" response", + "operation_id": "DeleteRUMArchiveConfig", + "request": { + "body": null, + "content_type": null, + "method": "DELETE", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "app_id", + "required": true, + "schema": { + "format": "uuid", + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "{{ uuid }}" + }, + "style": null + } + ], + "path": "/api/v2/rum/config/archive/{app_id}" + }, + "scenario": "Delete an unknown archive configuration returns \"Not Found\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/rum-managed-archives/get-an-unknown-archive-configuration-returns-not-found-response.json b/src/test/resources/generated-test/test-runner-data/v2/rum-managed-archives/get-an-unknown-archive-configuration-returns-not-found-response.json new file mode 100644 index 00000000000..c4bc9479846 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/rum-managed-archives/get-an-unknown-archive-configuration-returns-not-found-response.json @@ -0,0 +1,35 @@ +{ + "api": "RUMManagedArchives", + "expected_status": 404, + "feature": "RUM Managed Archives", + "id": "v2/RUM Managed Archives/Get an unknown archive configuration returns \"Not Found\" response", + "operation_id": "GetRUMArchiveConfig", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "app_id", + "required": true, + "schema": { + "format": "uuid", + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "{{ uuid }}" + }, + "style": null + } + ], + "path": "/api/v2/rum/config/archive/{app_id}" + }, + "scenario": "Get an unknown archive configuration returns \"Not Found\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/rum-managed-archives/get-archive-configuration-rejects-an-invalid-application-id.json b/src/test/resources/generated-test/test-runner-data/v2/rum-managed-archives/get-archive-configuration-rejects-an-invalid-application-id.json new file mode 100644 index 00000000000..abc761c3a2e --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/rum-managed-archives/get-archive-configuration-rejects-an-invalid-application-id.json @@ -0,0 +1,35 @@ +{ + "api": "RUMManagedArchives", + "expected_status": 400, + "feature": "RUM Managed Archives", + "id": "v2/RUM Managed Archives/Get archive configuration rejects an invalid application ID", + "operation_id": "GetRUMArchiveConfig", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "app_id", + "required": true, + "schema": { + "format": "uuid", + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "invalid" + }, + "style": null + } + ], + "path": "/api/v2/rum/config/archive/{app_id}" + }, + "scenario": "Get archive configuration rejects an invalid application ID", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/rum-managed-archives/list-archive-configurations-rejects-an-invalid-page-size.json b/src/test/resources/generated-test/test-runner-data/v2/rum-managed-archives/list-archive-configurations-rejects-an-invalid-page-size.json new file mode 100644 index 00000000000..2272423e579 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/rum-managed-archives/list-archive-configurations-rejects-an-invalid-page-size.json @@ -0,0 +1,35 @@ +{ + "api": "RUMManagedArchives", + "expected_status": 400, + "feature": "RUM Managed Archives", + "id": "v2/RUM Managed Archives/List archive configurations rejects an invalid page size", + "operation_id": "ListRUMArchiveConfigs", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "query", + "name": "page[size]", + "required": false, + "schema": { + "format": "int32", + "ref": null, + "type": "integer" + }, + "source": { + "type": "literal", + "value": 101 + }, + "style": null + } + ], + "path": "/api/v2/rum/config/archive" + }, + "scenario": "List archive configurations rejects an invalid page size", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/rum-managed-archives/list-archive-configurations-returns-ok-response.json b/src/test/resources/generated-test/test-runner-data/v2/rum-managed-archives/list-archive-configurations-returns-ok-response.json new file mode 100644 index 00000000000..fd02b1d3950 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/rum-managed-archives/list-archive-configurations-returns-ok-response.json @@ -0,0 +1,51 @@ +{ + "api": "RUMManagedArchives", + "expected_status": 200, + "feature": "RUM Managed Archives", + "id": "v2/RUM Managed Archives/List archive configurations returns \"OK\" response", + "operation_id": "ListRUMArchiveConfigs", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "query", + "name": "page[number]", + "required": false, + "schema": { + "format": "int32", + "ref": null, + "type": "integer" + }, + "source": { + "type": "literal", + "value": 0 + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "page[size]", + "required": false, + "schema": { + "format": "int32", + "ref": null, + "type": "integer" + }, + "source": { + "type": "literal", + "value": 1 + }, + "style": null + } + ], + "path": "/api/v2/rum/config/archive" + }, + "scenario": "List archive configurations returns \"OK\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/rum-managed-archives/update-archive-configuration-with-unsupported-enabled-retention-returns-bad-request-response.json b/src/test/resources/generated-test/test-runner-data/v2/rum-managed-archives/update-archive-configuration-with-unsupported-enabled-retention-returns-bad-request-response.json new file mode 100644 index 00000000000..372e55aa4e8 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/rum-managed-archives/update-archive-configuration-with-unsupported-enabled-retention-returns-bad-request-response.json @@ -0,0 +1,52 @@ +{ + "api": "RUMManagedArchives", + "expected_status": 400, + "feature": "RUM Managed Archives", + "id": "v2/RUM Managed Archives/Update archive configuration with unsupported enabled retention returns \"Bad Request\" response", + "operation_id": "UpdateRUMArchiveConfig", + "request": { + "body": { + "schema": { + "format": null, + "ref": "RumArchiveConfigUpsertRequest", + "type": "object" + }, + "source": "inline", + "value": { + "data": { + "attributes": { + "enabled": true, + "retention_days": 31 + }, + "id": "{{ rum_application.data.id }}", + "type": "rum_archive_config" + } + } + }, + "content_type": "application/json", + "method": "PUT", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "app_id", + "required": true, + "schema": { + "format": "uuid", + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "{{ rum_application.data.id }}" + }, + "style": null + } + ], + "path": "/api/v2/rum/config/archive/{app_id}" + }, + "scenario": "Update archive configuration with unsupported enabled retention returns \"Bad Request\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/cancel-an-unknown-batch-recovery-returns-not-found-response.json b/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/cancel-an-unknown-batch-recovery-returns-not-found-response.json new file mode 100644 index 00000000000..890d0d9202b --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/cancel-an-unknown-batch-recovery-returns-not-found-response.json @@ -0,0 +1,50 @@ +{ + "api": "RUMRecovery", + "expected_status": 404, + "feature": "RUM Recovery", + "id": "v2/RUM Recovery/Cancel an unknown batch recovery returns \"Not Found\" response", + "operation_id": "UpdateRUMRecoveryBatchRequest", + "request": { + "body": { + "schema": { + "format": null, + "ref": "RumRecoveryCancelRequest", + "type": "object" + }, + "source": "inline", + "value": { + "data": { + "attributes": { + "status": "cancelled" + }, + "type": "rum_recovery_request" + } + } + }, + "content_type": "application/json", + "method": "PATCH", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "request_id", + "required": true, + "schema": { + "format": "uuid", + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "{{ uuid }}" + }, + "style": null + } + ], + "path": "/api/v2/rum/recover/requests/{request_id}" + }, + "scenario": "Cancel an unknown batch recovery returns \"Not Found\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/count-recoverable-sessions-accepts-exactly-180-days.json b/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/count-recoverable-sessions-accepts-exactly-180-days.json new file mode 100644 index 00000000000..e941f7019ad --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/count-recoverable-sessions-accepts-exactly-180-days.json @@ -0,0 +1,28 @@ +{ + "api": "RUMRecovery", + "expected_status": 200, + "feature": "RUM Recovery", + "id": "v2/RUM Recovery/Count recoverable sessions accepts exactly 180 days", + "operation_id": "GetRUMRecoverySessionCount", + "request": { + "body": { + "schema": { + "format": null, + "ref": "RumRecoveryCountRequest", + "type": "object" + }, + "source": "inline", + "value": { + "$openapi_transformer_template": "{\"data\":{\"type\":\"rum_recovery_count\",\"attributes\":{\"query\":\"service:rum18600-fixture\",\"from\":{{ timestamp(\"now - 180d\") }}000,\"to\":{{ timestamp(\"now\") }}000}}}" + } + }, + "content_type": "application/json", + "method": "POST", + "pagination": false, + "parameters": [], + "path": "/api/v2/rum/recover/count" + }, + "scenario": "Count recoverable sessions accepts exactly 180 days", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/count-recoverable-sessions-rejects-a-range-wider-than-180-days.json b/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/count-recoverable-sessions-rejects-a-range-wider-than-180-days.json new file mode 100644 index 00000000000..2347d02de04 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/count-recoverable-sessions-rejects-a-range-wider-than-180-days.json @@ -0,0 +1,28 @@ +{ + "api": "RUMRecovery", + "expected_status": 400, + "feature": "RUM Recovery", + "id": "v2/RUM Recovery/Count recoverable sessions rejects a range wider than 180 days", + "operation_id": "GetRUMRecoverySessionCount", + "request": { + "body": { + "schema": { + "format": null, + "ref": "RumRecoveryCountRequest", + "type": "object" + }, + "source": "inline", + "value": { + "$openapi_transformer_template": "{\"data\":{\"type\":\"rum_recovery_count\",\"attributes\":{\"query\":\"service:rum18600-fixture\",\"from\":{{ timestamp(\"now - 181d\") }}000,\"to\":{{ timestamp(\"now\") }}000}}}" + } + }, + "content_type": "application/json", + "method": "POST", + "pagination": false, + "parameters": [], + "path": "/api/v2/rum/recover/count" + }, + "scenario": "Count recoverable sessions rejects a range wider than 180 days", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/create-batch-recovery-rejects-a-range-wider-than-180-days.json b/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/create-batch-recovery-rejects-a-range-wider-than-180-days.json new file mode 100644 index 00000000000..f576ded77f8 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/create-batch-recovery-rejects-a-range-wider-than-180-days.json @@ -0,0 +1,28 @@ +{ + "api": "RUMRecovery", + "expected_status": 400, + "feature": "RUM Recovery", + "id": "v2/RUM Recovery/Create batch recovery rejects a range wider than 180 days", + "operation_id": "CreateRUMRecoveryRequest", + "request": { + "body": { + "schema": { + "format": null, + "ref": "RumRecoveryCreateRequest", + "type": "object" + }, + "source": "inline", + "value": { + "$openapi_transformer_template": "{\"data\":{\"type\":\"rum_recovery_request\",\"attributes\":{\"request_type\":\"batch\",\"query\":\"service:rum18600-fixture\",\"from\":{{ timestamp(\"now - 181d\") }}000,\"to\":{{ timestamp(\"now\") }}000}}}" + } + }, + "content_type": "application/json", + "method": "POST", + "pagination": false, + "parameters": [], + "path": "/api/v2/rum/recover/requests" + }, + "scenario": "Create batch recovery rejects a range wider than 180 days", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/create-targeted-recovery-rejects-an-empty-sessions-array.json b/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/create-targeted-recovery-rejects-an-empty-sessions-array.json new file mode 100644 index 00000000000..8e9fa546773 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/create-targeted-recovery-rejects-an-empty-sessions-array.json @@ -0,0 +1,33 @@ +{ + "api": "RUMRecovery", + "expected_status": 400, + "feature": "RUM Recovery", + "id": "v2/RUM Recovery/Create targeted recovery rejects an empty sessions array", + "operation_id": "CreateRUMRecoveryRequest", + "request": { + "body": { + "schema": { + "format": null, + "ref": "RumRecoveryCreateRequest", + "type": "object" + }, + "source": "inline", + "value": { + "data": { + "attributes": { + "sessions": [] + }, + "type": "rum_recovery_request" + } + } + }, + "content_type": "application/json", + "method": "POST", + "pagination": false, + "parameters": [], + "path": "/api/v2/rum/recover/requests" + }, + "scenario": "Create targeted recovery rejects an empty sessions array", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/get-an-unknown-recovery-request-returns-not-found-response.json b/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/get-an-unknown-recovery-request-returns-not-found-response.json new file mode 100644 index 00000000000..92ba1d587f1 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/get-an-unknown-recovery-request-returns-not-found-response.json @@ -0,0 +1,35 @@ +{ + "api": "RUMRecovery", + "expected_status": 404, + "feature": "RUM Recovery", + "id": "v2/RUM Recovery/Get an unknown recovery request returns \"Not Found\" response", + "operation_id": "GetRUMRecoveryRequest", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "request_id", + "required": true, + "schema": { + "format": "uuid", + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "{{ uuid }}" + }, + "style": null + } + ], + "path": "/api/v2/rum/recover/requests/{request_id}" + }, + "scenario": "Get an unknown recovery request returns \"Not Found\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/list-batch-history-filters-request-creation-time-independently-of-session-time.json b/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/list-batch-history-filters-request-creation-time-independently-of-session-time.json new file mode 100644 index 00000000000..cd4da81b6e9 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/list-batch-history-filters-request-creation-time-independently-of-session-time.json @@ -0,0 +1,83 @@ +{ + "api": "RUMRecovery", + "expected_status": 200, + "feature": "RUM Recovery", + "id": "v2/RUM Recovery/List batch history filters request creation time independently of session time", + "operation_id": "ListRUMRecoveryBatchRequests", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "query", + "name": "type", + "required": true, + "schema": { + "format": null, + "ref": "RumRecoveryBatchRequestType", + "type": "string" + }, + "source": { + "type": "literal", + "value": "batch" + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "from", + "required": false, + "schema": { + "format": "int64", + "ref": null, + "type": "integer" + }, + "source": { + "type": "literal", + "value": 1 + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "to", + "required": false, + "schema": { + "format": "int64", + "ref": null, + "type": "integer" + }, + "source": { + "type": "literal", + "value": 2 + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "query", + "required": false, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "service:rum18600-fixture AND @usr.id:(123 OR 456)" + }, + "style": null + } + ], + "path": "/api/v2/rum/recover/requests" + }, + "scenario": "List batch history filters request creation time independently of session time", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/list-batch-history-rejects-an-invalid-cursor.json b/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/list-batch-history-rejects-an-invalid-cursor.json new file mode 100644 index 00000000000..343eeb7d6f6 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/list-batch-history-rejects-an-invalid-cursor.json @@ -0,0 +1,51 @@ +{ + "api": "RUMRecovery", + "expected_status": 400, + "feature": "RUM Recovery", + "id": "v2/RUM Recovery/List batch history rejects an invalid cursor", + "operation_id": "ListRUMRecoveryBatchRequests", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "query", + "name": "type", + "required": true, + "schema": { + "format": null, + "ref": "RumRecoveryBatchRequestType", + "type": "string" + }, + "source": { + "type": "literal", + "value": "batch" + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "cursor", + "required": false, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "invalid" + }, + "style": null + } + ], + "path": "/api/v2/rum/recover/requests" + }, + "scenario": "List batch history rejects an invalid cursor", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/list-batch-history-rejects-equal-creation-time-bounds.json b/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/list-batch-history-rejects-equal-creation-time-bounds.json new file mode 100644 index 00000000000..fa777ad84ca --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/list-batch-history-rejects-equal-creation-time-bounds.json @@ -0,0 +1,67 @@ +{ + "api": "RUMRecovery", + "expected_status": 400, + "feature": "RUM Recovery", + "id": "v2/RUM Recovery/List batch history rejects equal creation-time bounds", + "operation_id": "ListRUMRecoveryBatchRequests", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "query", + "name": "type", + "required": true, + "schema": { + "format": null, + "ref": "RumRecoveryBatchRequestType", + "type": "string" + }, + "source": { + "type": "literal", + "value": "batch" + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "from", + "required": false, + "schema": { + "format": "int64", + "ref": null, + "type": "integer" + }, + "source": { + "type": "literal", + "value": 1789905600000 + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "to", + "required": false, + "schema": { + "format": "int64", + "ref": null, + "type": "integer" + }, + "source": { + "type": "literal", + "value": 1789905600000 + }, + "style": null + } + ], + "path": "/api/v2/rum/recover/requests" + }, + "scenario": "List batch history rejects equal creation-time bounds", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/list-batch-history-rejects-or-between-filter-terms.json b/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/list-batch-history-rejects-or-between-filter-terms.json new file mode 100644 index 00000000000..59b08098714 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/list-batch-history-rejects-or-between-filter-terms.json @@ -0,0 +1,51 @@ +{ + "api": "RUMRecovery", + "expected_status": 400, + "feature": "RUM Recovery", + "id": "v2/RUM Recovery/List batch history rejects OR between filter terms", + "operation_id": "ListRUMRecoveryBatchRequests", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "query", + "name": "type", + "required": true, + "schema": { + "format": null, + "ref": "RumRecoveryBatchRequestType", + "type": "string" + }, + "source": { + "type": "literal", + "value": "batch" + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "query", + "required": false, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "service:web OR @usr.id:123" + }, + "style": null + } + ], + "path": "/api/v2/rum/recover/requests" + }, + "scenario": "List batch history rejects OR between filter terms", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/search-archived-sessions-rejects-an-empty-query.json b/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/search-archived-sessions-rejects-an-empty-query.json new file mode 100644 index 00000000000..3a1532c9a19 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/search-archived-sessions-rejects-an-empty-query.json @@ -0,0 +1,35 @@ +{ + "api": "RUMRecovery", + "expected_status": 400, + "feature": "RUM Recovery", + "id": "v2/RUM Recovery/Search archived sessions rejects an empty query", + "operation_id": "SearchRUMArchiveSessions", + "request": { + "body": { + "schema": { + "format": null, + "ref": "RumArchiveSessionsSearchRequest", + "type": "object" + }, + "source": "inline", + "value": { + "data": { + "attributes": { + "from": 1789905600000, + "query": "", + "to": 1789992000000 + }, + "type": "rum_archive_sessions_request" + } + } + }, + "content_type": "application/json", + "method": "POST", + "pagination": false, + "parameters": [], + "path": "/api/v2/rum/recover/sessions" + }, + "scenario": "Search archived sessions rejects an empty query", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/search-archived-sessions-returns-canonical-data-and-first-page-metadata.json b/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/search-archived-sessions-returns-canonical-data-and-first-page-metadata.json new file mode 100644 index 00000000000..56d3f695dd4 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/rum-recovery/search-archived-sessions-returns-canonical-data-and-first-page-metadata.json @@ -0,0 +1,28 @@ +{ + "api": "RUMRecovery", + "expected_status": 200, + "feature": "RUM Recovery", + "id": "v2/RUM Recovery/Search archived sessions returns canonical data and first-page metadata", + "operation_id": "SearchRUMArchiveSessions", + "request": { + "body": { + "schema": { + "format": null, + "ref": "RumArchiveSessionsSearchRequest", + "type": "object" + }, + "source": "inline", + "value": { + "$openapi_transformer_template": "{\"data\":{\"type\":\"rum_archive_sessions_request\",\"attributes\":{\"query\":\"service:rum18600-fixture\",\"from\":{{ timestamp(\"now - 7d\") }}000,\"to\":{{ timestamp(\"now\") }}000,\"limit\":1}}}" + } + }, + "content_type": "application/json", + "method": "POST", + "pagination": false, + "parameters": [], + "path": "/api/v2/rum/recover/sessions" + }, + "scenario": "Search archived sessions returns canonical data and first-page metadata", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-server-data/manifest.json b/src/test/resources/generated-test/test-server-data/manifest.json index ad02abee0b2..60bd01e17a1 100644 --- a/src/test/resources/generated-test/test-server-data/manifest.json +++ b/src/test/resources/generated-test/test-server-data/manifest.json @@ -460,6 +460,16 @@ "file": "v2/rum.json", "version": "v2" }, + { + "feature": "RUM Managed Archives", + "file": "v2/rum-managed-archives.json", + "version": "v2" + }, + { + "feature": "RUM Recovery", + "file": "v2/rum-recovery.json", + "version": "v2" + }, { "feature": "RUM Remote Config", "file": "v2/rum-remote-config.json", diff --git a/src/test/resources/generated-test/test-server-data/v2/rum-managed-archives.json b/src/test/resources/generated-test/test-server-data/v2/rum-managed-archives.json new file mode 100644 index 00000000000..e376cef6ab3 --- /dev/null +++ b/src/test/resources/generated-test/test-server-data/v2/rum-managed-archives.json @@ -0,0 +1,268 @@ +{ + "feature": "RUM Managed Archives", + "recordings": [ + { + "feature": "RUM Managed Archives", + "frozen_at": "2026-11-05T16:00:15.805Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/rum/config/archive/17938944-0000-0000-0000-179389441500", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"managed archive configuration not found\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Not Found", + "status": 404 + } + } + ], + "scenario": "Delete an unknown archive configuration returns \"Not Found\" response", + "version": "v2" + }, + { + "feature": "RUM Managed Archives", + "frozen_at": "2026-11-05T16:00:17.317Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/rum/config/archive/17938944-0000-0000-0000-179389441700", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"managed archive configuration not found\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Not Found", + "status": 404 + } + } + ], + "scenario": "Get an unknown archive configuration returns \"Not Found\" response", + "version": "v2" + }, + { + "feature": "RUM Managed Archives", + "frozen_at": "2026-11-05T16:00:17.455Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/rum/config/archive/invalid", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"appId must be a valid UUID: invalid\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Bad Request", + "status": 400 + } + } + ], + "scenario": "Get archive configuration rejects an invalid application ID", + "version": "v2" + }, + { + "feature": "RUM Managed Archives", + "frozen_at": "2026-11-05T16:00:17.585Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/rum/config/archive", + "query": [ + [ + "page[size]", + "101" + ] + ] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"page[size] must be between 1 and 100\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Bad Request", + "status": 400 + } + } + ], + "scenario": "List archive configurations rejects an invalid page size", + "version": "v2" + }, + { + "feature": "RUM Managed Archives", + "frozen_at": "2026-11-05T16:00:17.721Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/rum/config/archive", + "query": [ + [ + "page[number]", + "0" + ], + [ + "page[size]", + "1" + ] + ] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[],\"meta\":{\"page\":{\"total_filtered_count\":0}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + } + ], + "scenario": "List archive configurations returns \"OK\" response", + "version": "v2" + }, + { + "feature": "RUM Managed Archives", + "frozen_at": "2026-11-05T16:00:17.874Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "name": "test-rum-e61d4487abf1d589", + "type": "ios" + }, + "type": "rum_application_create" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/rum/applications", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"25bed905-f5bf-4823-850f-337a5398190c\",\"type\":\"rum_application\",\"attributes\":{\"api_key_id\":2297205,\"apm_rum_flat_sampling_replay_enabled\":true,\"apm_rum_flat_sampling_replay_sample_rate\":1,\"application_id\":\"25bed905-f5bf-4823-850f-337a5398190c\",\"client_token\":\"pub00000000000000000000000000000000\",\"created_at\":1793894418177,\"created_by_handle\":\"test@example.com\",\"error_tracking_exclusion_filter_enabled\":false,\"external_feeds\":[],\"is_active\":false,\"name\":\"test-rum-e61d4487abf1d589\",\"ootb_metrics_installed\":false,\"org_id\":321813,\"product_analytics_replay_sample_rate\":100,\"product_scales\":{\"rum_event_processing_scale\":{\"state\":\"ALL\",\"last_modified_at\":1793894418177},\"product_analytics_retention_scale\":{\"state\":\"NONE\",\"last_modified_at\":1793894418177}},\"short_name\":\"test_rum_e61d4487abf1d589\",\"tags\":[],\"type\":\"ios\",\"updated_at\":1793894418177,\"updated_by_handle\":\"test@example.com\"}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "enabled": true, + "retention_days": 31 + }, + "id": "25bed905-f5bf-4823-850f-337a5398190c", + "type": "rum_archive_config" + } + } + }, + "content_type": "application/json", + "method": "PUT", + "path": "/api/v2/rum/config/archive/25bed905-f5bf-4823-850f-337a5398190c", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"retention_days must be one of: 30, 90, 180. Received: 31\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Bad Request", + "status": 400 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/rum/applications/25bed905-f5bf-4823-850f-337a5398190c", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "Update archive configuration with unsupported enabled retention returns \"Bad Request\" response", + "version": "v2" + } + ], + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-server-data/v2/rum-recovery.json b/src/test/resources/generated-test/test-server-data/v2/rum-recovery.json new file mode 100644 index 00000000000..568a03f3bd4 --- /dev/null +++ b/src/test/resources/generated-test/test-server-data/v2/rum-recovery.json @@ -0,0 +1,488 @@ +{ + "feature": "RUM Recovery", + "recordings": [ + { + "feature": "RUM Recovery", + "frozen_at": "2026-11-05T16:00:18.593Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "status": "cancelled" + }, + "type": "rum_recovery_request" + } + } + }, + "content_type": "application/json", + "method": "PATCH", + "path": "/api/v2/rum/recover/requests/17938944-0000-0000-0000-179389441800", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"batch recovery request not found\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Not Found", + "status": 404 + } + } + ], + "scenario": "Cancel an unknown batch recovery returns \"Not Found\" response", + "version": "v2" + }, + { + "feature": "RUM Recovery", + "frozen_at": "2026-11-05T16:00:18.702Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "from": 1778342418000, + "query": "service:rum18600-fixture", + "to": 1793894418000 + }, + "type": "rum_recovery_count" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/rum/recover/count", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"count\",\"type\":\"rum_recovery_count\",\"attributes\":{\"estimated_count\":0,\"max_recoverable_sessions\":100000}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + } + ], + "scenario": "Count recoverable sessions accepts exactly 180 days", + "version": "v2" + }, + { + "feature": "RUM Recovery", + "frozen_at": "2026-11-05T16:00:21.115Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "from": 1778256021000, + "query": "service:rum18600-fixture", + "to": 1793894421000 + }, + "type": "rum_recovery_count" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/rum/recover/count", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"time range cannot exceed 180 days\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Bad Request", + "status": 400 + } + } + ], + "scenario": "Count recoverable sessions rejects a range wider than 180 days", + "version": "v2" + }, + { + "feature": "RUM Recovery", + "frozen_at": "2026-11-05T16:00:21.255Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "from": 1778256021000, + "query": "service:rum18600-fixture", + "request_type": "batch", + "to": 1793894421000 + }, + "type": "rum_recovery_request" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/rum/recover/requests", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"time range cannot exceed 180 days\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Bad Request", + "status": 400 + } + } + ], + "scenario": "Create batch recovery rejects a range wider than 180 days", + "version": "v2" + }, + { + "feature": "RUM Recovery", + "frozen_at": "2026-11-05T16:00:21.407Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "sessions": [] + }, + "type": "rum_recovery_request" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/rum/recover/requests", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"sessions array is required and cannot be empty\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Bad Request", + "status": 400 + } + } + ], + "scenario": "Create targeted recovery rejects an empty sessions array", + "version": "v2" + }, + { + "feature": "RUM Recovery", + "frozen_at": "2026-11-05T16:00:21.550Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/rum/recover/requests/17938944-0000-0000-0000-179389442100", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"rehydration request not found: 17938944-0000-0000-0000-179389442100\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Not Found", + "status": 404 + } + } + ], + "scenario": "Get an unknown recovery request returns \"Not Found\" response", + "version": "v2" + }, + { + "feature": "RUM Recovery", + "frozen_at": "2026-11-05T16:00:21.704Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/rum/recover/requests", + "query": [ + [ + "from", + "1" + ], + [ + "query", + "service:rum18600-fixture AND @usr.id:(123 OR 456)" + ], + [ + "to", + "2" + ], + [ + "type", + "batch" + ] + ] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[],\"meta\":{}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + } + ], + "scenario": "List batch history filters request creation time independently of session time", + "version": "v2" + }, + { + "feature": "RUM Recovery", + "frozen_at": "2026-11-05T16:00:21.844Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/rum/recover/requests", + "query": [ + [ + "query", + "service:web OR @usr.id:123" + ], + [ + "type", + "batch" + ] + ] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"unsupported filter: OR between terms\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Bad Request", + "status": 400 + } + } + ], + "scenario": "List batch history rejects OR between filter terms", + "version": "v2" + }, + { + "feature": "RUM Recovery", + "frozen_at": "2026-11-05T16:00:21.939Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/rum/recover/requests", + "query": [ + [ + "cursor", + "invalid" + ], + [ + "type", + "batch" + ] + ] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"invalid cursor: invalid character '\\\\x8a' looking for beginning of value\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Bad Request", + "status": 400 + } + } + ], + "scenario": "List batch history rejects an invalid cursor", + "version": "v2" + }, + { + "feature": "RUM Recovery", + "frozen_at": "2026-11-05T16:00:22.079Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/rum/recover/requests", + "query": [ + [ + "from", + "1789905600000" + ], + [ + "to", + "1789905600000" + ], + [ + "type", + "batch" + ] + ] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"from must be before to\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Bad Request", + "status": 400 + } + } + ], + "scenario": "List batch history rejects equal creation-time bounds", + "version": "v2" + }, + { + "feature": "RUM Recovery", + "frozen_at": "2026-11-05T16:00:22.212Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "from": 1789905600000, + "query": "", + "to": 1789992000000 + }, + "type": "rum_archive_sessions_request" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/rum/recover/sessions", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"query is required\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Bad Request", + "status": 400 + } + } + ], + "scenario": "Search archived sessions rejects an empty query", + "version": "v2" + }, + { + "feature": "RUM Recovery", + "frozen_at": "2026-11-05T16:00:22.317Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "from": 1793289622000, + "limit": 1, + "query": "service:rum18600-fixture", + "to": 1793894422000 + }, + "type": "rum_archive_sessions_request" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/rum/recover/sessions", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[],\"meta\":{\"page\":{\"total_count\":0}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + } + ], + "scenario": "Search archived sessions returns canonical data and first-page metadata", + "version": "v2" + } + ], + "schema_version": 1, + "version": "v2" +}