From bb6477440a02999252a13171fa09ac5ae23dbd9b Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 3 Feb 2026 10:56:57 +0000 Subject: [PATCH] Regenerate client from commit 0d7925c of spec repo --- .generator/schemas/v1/openapi.yaml | 289 +++ .generator/schemas/v2/openapi.yaml | 1615 ++++++---------- .../v1/key-management/CreateClientToken.java | 32 + .../v1/key-management/RevokeClientToken.java | 27 + .../v1/key-management/UpdateClientToken.java | 33 + .../CreatePersonalAccessToken.java | 42 + .../GetPersonalAccessToken.java | 28 + .../ListPersonalAccessTokens.java} | 13 +- .../RevokePersonalAccessToken.java | 25 + .../UpdatePersonalAccessToken.java | 44 + .../CreateReplayHeatmapSnapshot.java | 43 - .../DeleteReplayHeatmapSnapshot.java | 22 - .../ListReplayHeatmapSnapshots.java | 24 - .../UpdateReplayHeatmapSnapshot.java | 41 - .../AddRumReplaySessionToPlaylist.java | 27 - .../BulkRemoveRumReplayPlaylistSessions.java | 35 - .../CreateRumReplayPlaylist.java | 42 - .../DeleteRumReplayPlaylist.java | 22 - .../GetRumReplayPlaylist.java | 24 - .../ListRumReplayPlaylistSessions.java | 25 - .../RemoveRumReplaySessionFromPlaylist.java | 24 - .../UpdateRumReplayPlaylist.java | 42 - .../v2/rum-replay-sessions/GetSegments.java | 23 - .../CreateRumReplaySessionWatch.java | 41 - .../DeleteRumReplaySessionWatch.java | 23 - .../ListRumReplaySessionWatchers.java | 26 - ...istRumReplayViewershipHistorySessions.java | 25 - .../com/datadog/api/client/ApiClient.java | 8 + .../api/client/v1/api/KeyManagementApi.java | 449 +++++ .../api/client/v1/model/ClientToken.java | 375 ++++ .../model/ClientTokenCreateRequest.java} | 95 +- .../model/ClientTokenRevokeRequest.java} | 57 +- .../model/ClientTokenUpdateRequest.java} | 138 +- .../api/client/v2/api/KeyManagementApi.java | 987 +++++++++- .../client/v2/api/RumReplayHeatmapsApi.java | 712 ------- .../client/v2/api/RumReplayPlaylistsApi.java | 1644 ----------------- .../client/v2/api/RumReplaySessionsApi.java | 306 --- .../client/v2/api/RumReplayViewershipApi.java | 843 --------- ...Data.java => FullPersonalAccessToken.java} | 116 +- .../FullPersonalAccessTokenAttributes.java | 287 +++ ...sionData.java => PersonalAccessToken.java} | 114 +- .../model/PersonalAccessTokenAttributes.java | 263 +++ ... PersonalAccessTokenCreateAttributes.java} | 165 +- ...ava => PersonalAccessTokenCreateData.java} | 58 +- ... => PersonalAccessTokenCreateRequest.java} | 39 +- ...va => PersonalAccessTokenGetResponse.java} | 32 +- ... => PersonalAccessTokenRelationships.java} | 63 +- ....java => PersonalAccessTokenResponse.java} | 44 +- ...Type.java => PersonalAccessTokenType.java} | 28 +- ... PersonalAccessTokenUpdateAttributes.java} | 95 +- ...ava => PersonalAccessTokenUpdateData.java} | 78 +- ... => PersonalAccessTokenUpdateRequest.java} | 39 +- ... => PersonalAccessTokensListResponse.java} | 81 +- .../PersonalAccessTokensResponseMeta.java | 138 ++ ...PersonalAccessTokensResponseMetaPage.java} | 72 +- .../v2/model/PersonalAccessTokensSort.java | 68 + .../api/client/v2/model/PlaylistData.java | 205 -- .../v2/model/PlaylistDataAttributes.java | 283 --- .../v2/model/PlaylistsSessionArray.java | 154 -- .../api/client/v2/model/SessionIdArray.java | 154 -- .../api/client/v2/model/SessionIdData.java | 176 -- .../SnapshotCreateRequestDataAttributes.java | 386 ---- .../api/client/v2/model/SnapshotData.java | 197 -- .../v2/model/SnapshotDataAttributes.java | 482 ----- .../SnapshotUpdateRequestDataAttributes.java | 265 --- .../model/SnapshotUpdateRequestDataType.java | 56 - ...iewershipHistorySessionDataAttributes.java | 239 --- .../ViewershipHistorySessionDataType.java | 58 - .../client/v2/model/WatchDataAttributes.java | 229 --- .../api/client/v2/model/WatchDataType.java | 54 - .../api/client/v2/model/WatcherArray.java | 154 -- .../api/client/v2/model/WatcherData.java | 205 -- .../v2/model/WatcherDataAttributes.java | 257 --- .../api/client/v2/model/WatcherDataType.java | 55 - .../api/client/v1/api/key_management.feature | 64 + .../com/datadog/api/client/v1/api/undo.json | 25 + .../api/client/v2/api/key_management.feature | 104 ++ .../client/v2/api/rum_replay_heatmaps.feature | 38 - .../v2/api/rum_replay_playlists.feature | 85 - .../client/v2/api/rum_replay_sessions.feature | 15 - .../v2/api/rum_replay_viewership.feature | 37 - .../com/datadog/api/client/v2/api/undo.json | 167 +- 82 files changed, 4534 insertions(+), 9661 deletions(-) create mode 100644 examples/v1/key-management/CreateClientToken.java create mode 100644 examples/v1/key-management/RevokeClientToken.java create mode 100644 examples/v1/key-management/UpdateClientToken.java create mode 100644 examples/v2/key-management/CreatePersonalAccessToken.java create mode 100644 examples/v2/key-management/GetPersonalAccessToken.java rename examples/v2/{rum-replay-playlists/ListRumReplayPlaylists.java => key-management/ListPersonalAccessTokens.java} (50%) create mode 100644 examples/v2/key-management/RevokePersonalAccessToken.java create mode 100644 examples/v2/key-management/UpdatePersonalAccessToken.java delete mode 100644 examples/v2/rum-replay-heatmaps/CreateReplayHeatmapSnapshot.java delete mode 100644 examples/v2/rum-replay-heatmaps/DeleteReplayHeatmapSnapshot.java delete mode 100644 examples/v2/rum-replay-heatmaps/ListReplayHeatmapSnapshots.java delete mode 100644 examples/v2/rum-replay-heatmaps/UpdateReplayHeatmapSnapshot.java delete mode 100644 examples/v2/rum-replay-playlists/AddRumReplaySessionToPlaylist.java delete mode 100644 examples/v2/rum-replay-playlists/BulkRemoveRumReplayPlaylistSessions.java delete mode 100644 examples/v2/rum-replay-playlists/CreateRumReplayPlaylist.java delete mode 100644 examples/v2/rum-replay-playlists/DeleteRumReplayPlaylist.java delete mode 100644 examples/v2/rum-replay-playlists/GetRumReplayPlaylist.java delete mode 100644 examples/v2/rum-replay-playlists/ListRumReplayPlaylistSessions.java delete mode 100644 examples/v2/rum-replay-playlists/RemoveRumReplaySessionFromPlaylist.java delete mode 100644 examples/v2/rum-replay-playlists/UpdateRumReplayPlaylist.java delete mode 100644 examples/v2/rum-replay-sessions/GetSegments.java delete mode 100644 examples/v2/rum-replay-viewership/CreateRumReplaySessionWatch.java delete mode 100644 examples/v2/rum-replay-viewership/DeleteRumReplaySessionWatch.java delete mode 100644 examples/v2/rum-replay-viewership/ListRumReplaySessionWatchers.java delete mode 100644 examples/v2/rum-replay-viewership/ListRumReplayViewershipHistorySessions.java create mode 100644 src/main/java/com/datadog/api/client/v1/model/ClientToken.java rename src/main/java/com/datadog/api/client/{v2/model/SnapshotArray.java => v1/model/ClientTokenCreateRequest.java} (55%) rename src/main/java/com/datadog/api/client/{v2/model/Watch.java => v1/model/ClientTokenRevokeRequest.java} (69%) rename src/main/java/com/datadog/api/client/{v2/model/WatchData.java => v1/model/ClientTokenUpdateRequest.java} (51%) delete mode 100644 src/main/java/com/datadog/api/client/v2/api/RumReplayHeatmapsApi.java delete mode 100644 src/main/java/com/datadog/api/client/v2/api/RumReplayPlaylistsApi.java delete mode 100644 src/main/java/com/datadog/api/client/v2/api/RumReplaySessionsApi.java delete mode 100644 src/main/java/com/datadog/api/client/v2/api/RumReplayViewershipApi.java rename src/main/java/com/datadog/api/client/v2/model/{PlaylistsSessionData.java => FullPersonalAccessToken.java} (53%) create mode 100644 src/main/java/com/datadog/api/client/v2/model/FullPersonalAccessTokenAttributes.java rename src/main/java/com/datadog/api/client/v2/model/{ViewershipHistorySessionData.java => PersonalAccessToken.java} (55%) create mode 100644 src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenAttributes.java rename src/main/java/com/datadog/api/client/v2/model/{PlaylistDataAttributesCreatedBy.java => PersonalAccessTokenCreateAttributes.java} (50%) rename src/main/java/com/datadog/api/client/v2/model/{SnapshotCreateRequestData.java => PersonalAccessTokenCreateData.java} (68%) rename src/main/java/com/datadog/api/client/v2/model/{SnapshotCreateRequest.java => PersonalAccessTokenCreateRequest.java} (74%) rename src/main/java/com/datadog/api/client/v2/model/{Snapshot.java => PersonalAccessTokenGetResponse.java} (77%) rename src/main/java/com/datadog/api/client/v2/model/{PlaylistsSession.java => PersonalAccessTokenRelationships.java} (66%) rename src/main/java/com/datadog/api/client/v2/model/{Playlist.java => PersonalAccessTokenResponse.java} (74%) rename src/main/java/com/datadog/api/client/v2/model/{PlaylistDataType.java => PersonalAccessTokenType.java} (53%) rename src/main/java/com/datadog/api/client/v2/model/{PlaylistsSessionDataAttributes.java => PersonalAccessTokenUpdateAttributes.java} (59%) rename src/main/java/com/datadog/api/client/v2/model/{SnapshotUpdateRequestData.java => PersonalAccessTokenUpdateData.java} (65%) rename src/main/java/com/datadog/api/client/v2/model/{SnapshotUpdateRequest.java => PersonalAccessTokenUpdateRequest.java} (74%) rename src/main/java/com/datadog/api/client/v2/model/{ViewershipHistorySessionArray.java => PersonalAccessTokensListResponse.java} (60%) create mode 100644 src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokensResponseMeta.java rename src/main/java/com/datadog/api/client/v2/model/{PlaylistArray.java => PersonalAccessTokensResponseMetaPage.java} (62%) create mode 100644 src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokensSort.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/PlaylistData.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/PlaylistDataAttributes.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/PlaylistsSessionArray.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/SessionIdArray.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/SessionIdData.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/SnapshotCreateRequestDataAttributes.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/SnapshotData.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/SnapshotDataAttributes.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/SnapshotUpdateRequestDataAttributes.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/SnapshotUpdateRequestDataType.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/ViewershipHistorySessionDataAttributes.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/ViewershipHistorySessionDataType.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/WatchDataAttributes.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/WatchDataType.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/WatcherArray.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/WatcherData.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/WatcherDataAttributes.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/WatcherDataType.java delete mode 100644 src/test/resources/com/datadog/api/client/v2/api/rum_replay_heatmaps.feature delete mode 100644 src/test/resources/com/datadog/api/client/v2/api/rum_replay_playlists.feature delete mode 100644 src/test/resources/com/datadog/api/client/v2/api/rum_replay_sessions.feature delete mode 100644 src/test/resources/com/datadog/api/client/v2/api/rum_replay_viewership.feature diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index a38d274f9b8..5e187a0e142 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -1291,6 +1291,152 @@ components: type: string x-enum-varnames: - CHECK_STATUS + ClientToken: + description: 'Client token object. Client tokens (also known as public API keys) + enable you to submit + + data from your browser or mobile applications to Datadog.' + properties: + created_at: + description: Creation timestamp of the client token. + example: '2024-03-15T10:30:00.000000+00:00' + format: date-time + readOnly: true + type: string + created_by_handle: + description: Handle of the user who created the client token. + example: user@example.com + readOnly: true + type: string + created_by_uuid: + description: UUID of the user who created the client token. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + readOnly: true + type: string + disabled_at: + description: Timestamp when the client token was disabled. + example: '2024-03-20T10:30:00.000000+00:00' + format: date-time + nullable: true + readOnly: true + type: string + disabled_by: + description: ID of the user who disabled the client token. + format: int64 + readOnly: true + type: integer + disabled_by_handle: + description: Handle of the user who disabled the client token. + example: user@example.com + readOnly: true + type: string + hash: + description: 'The hash value of the client token. This is the secret token + value that should be + + used in your browser or mobile application.' + example: 1234567890abcdef1234567890abcdef123 + maxLength: 35 + readOnly: true + type: string + modified_by: + description: ID of the user who last modified the client token. + format: int64 + readOnly: true + type: integer + name: + description: Name of the client token. + example: Example Client Token + maxLength: 255 + minLength: 1 + type: string + org_id: + description: Organization ID associated with the client token. + example: 12345 + format: int64 + readOnly: true + type: integer + origin_urls: + description: 'List of allowed origin URLs for browser-based applications. + Requests from URLs + + not in this list will be rejected.' + example: + - https://example.com + items: + example: https://example.com + maxLength: 2500 + type: string + maxItems: 100 + type: array + required: + - origin_urls + type: object + ClientTokenCreateRequest: + description: Request to create a new client token. + properties: + name: + description: Name of the client token. + example: Example Client Token + maxLength: 255 + minLength: 1 + type: string + origin_urls: + description: 'List of allowed origin URLs for browser-based applications. + Requests from URLs + + not in this list will be rejected.' + example: + - https://example.com + items: + example: https://example.com + maxLength: 2500 + type: string + maxItems: 100 + type: array + required: + - name + - origin_urls + type: object + ClientTokenRevokeRequest: + description: Request to revoke a client token. + properties: + hash: + description: Hash value of the client token to revoke. + example: 1234567890abcdef1234567890abcdef123 + maxLength: 35 + type: string + required: + - hash + type: object + ClientTokenUpdateRequest: + description: Request to update an existing client token. + properties: + hash: + description: Hash value of the client token to update. + example: 1234567890abcdef1234567890abcdef123 + maxLength: 35 + type: string + name: + description: New name for the client token. + example: Updated Client Token Name + maxLength: 255 + minLength: 1 + type: string + origin_urls: + description: New list of allowed origin URLs. If provided, this will replace + the existing list. + items: + example: https://example.com + maxLength: 2500 + type: string + maxItems: 100 + type: array + required: + - hash + - name + type: object ContentEncoding: description: HTTP header used to compress the media-type. enum: @@ -26206,6 +26352,7 @@ components: ci_visibility_pipelines_write: Create CI Visibility pipeline spans using the API. ci_visibility_read: View CI Visibility. + client_tokens_write: Create, edit, and delete client tokens. cloud_cost_management_read: View Cloud Cost pages and the cloud cost data source in dashboards and notebooks. For more details, see the Cloud Cost Management docs. @@ -33294,6 +33441,148 @@ paths: tags: - Organizations x-codegen-request-body-name: body + /api/v1/public_api_key: + delete: + description: 'Revoke a client token (public API key). Once revoked, the token + can no longer be used + + to submit data to Datadog.' + operationId: RevokeClientToken + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ClientTokenRevokeRequest' + required: true + responses: + '204': + description: No Content + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Too Many Requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - client_tokens_write + summary: Revoke client token + tags: + - Key Management + x-codegen-request-body-name: body + x-unstable: '**Note**: This endpoint is in public beta and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + post: + description: 'Create a new client token (public API key) to submit data from + your browser or mobile + + applications to Datadog.' + operationId: CreateClientToken + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ClientTokenCreateRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ClientToken' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Too Many Requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - client_tokens_write + summary: Create client token + tags: + - Key Management + x-codegen-request-body-name: body + x-unstable: '**Note**: This endpoint is in public beta and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + put: + description: Update the name and/or origin URLs of an existing client token + (public API key). + operationId: UpdateClientToken + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ClientTokenUpdateRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ClientToken' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Too Many Requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - client_tokens_write + summary: Update client token + tags: + - Key Management + x-codegen-request-body-name: body + x-unstable: '**Note**: This endpoint is in public beta and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v1/query: get: description: Query timeseries points. diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 840ac4eef97..5c4f3ad26f6 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -853,6 +853,43 @@ components: example: 10 format: int64 type: integer + PersonalAccessTokenFilterOwnerUUIDParameter: + description: Filter personal access tokens by owner UUID. + in: query + name: filter[owner_uuid] + required: false + schema: + items: + format: uuid + type: string + type: array + PersonalAccessTokenFilterParameter: + description: Filter personal access tokens by name. + in: query + name: filter + required: false + schema: + type: string + PersonalAccessTokenID: + description: The UUID of the personal access token. + in: path + name: pat_uuid + required: true + schema: + format: uuid + type: string + PersonalAccessTokenSortParameter: + description: 'Personal access token attribute used to sort results. Sort order + is ascending + + by default. In order to specify a descending sort, prefix the + + attribute with a minus sign.' + in: query + name: sort + required: false + schema: + $ref: '#/components/schemas/PersonalAccessTokensSort' ProductName: description: Name of the product to be deleted, either `logs` or `rum`. in: path @@ -25471,6 +25508,87 @@ components: - name - requirements type: object + FullPersonalAccessToken: + description: 'Personal access token object with the secret key value. This is + only + + returned when creating a new token.' + properties: + attributes: + $ref: '#/components/schemas/FullPersonalAccessTokenAttributes' + id: + description: UUID of the personal access token. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + relationships: + $ref: '#/components/schemas/PersonalAccessTokenRelationships' + type: + $ref: '#/components/schemas/PersonalAccessTokenType' + required: + - id + - type + - attributes + - relationships + type: object + FullPersonalAccessTokenAttributes: + description: 'Attributes of a personal access token including the secret key + value. + + This is only returned when creating a new token.' + properties: + created_at: + description: Creation timestamp of the personal access token. + example: '2024-03-15T10:30:00.000000+00:00' + format: date-time + readOnly: true + type: string + expires_at: + description: Expiration timestamp of the personal access token. + example: '2025-03-15T10:30:00.000000+00:00' + format: date-time + type: string + key: + description: 'The secret token value. This is only returned when creating + a new personal + + access token and cannot be retrieved later.' + example: dd_pat_1234567890abcdef1234567890abcdef12345678 + readOnly: true + type: string + modified_at: + description: Last modification timestamp of the personal access token. + example: '2024-03-20T10:30:00.000000+00:00' + format: date-time + nullable: true + readOnly: true + type: string + name: + description: Name of the personal access token. + example: Example Personal Access Token + maxLength: 256 + minLength: 1 + type: string + scopes: + description: 'Array of scopes granted to the personal access token. These + define what + + permissions the token has.' + example: + - dashboards_read + - monitors_read + items: + description: Name of scope. + type: string + minItems: 1 + type: array + required: + - name + - scopes + - created_at + - expires_at + - key + type: object GCPCredentials: description: The definition of the `GCPCredentials` object. oneOf: @@ -44773,118 +44891,241 @@ components: type: string x-enum-varnames: - PERMISSIONS - Playlist: - properties: - data: - $ref: '#/components/schemas/PlaylistData' - required: - - data - type: object - PlaylistArray: - properties: - data: - items: - $ref: '#/components/schemas/PlaylistData' - type: array - required: - - data - type: object - PlaylistData: + PersonalAccessToken: + description: Personal access token object. properties: attributes: - $ref: '#/components/schemas/PlaylistDataAttributes' + $ref: '#/components/schemas/PersonalAccessTokenAttributes' id: + description: UUID of the personal access token. + example: 00000000-0000-0000-0000-000000000000 + format: uuid type: string + relationships: + $ref: '#/components/schemas/PersonalAccessTokenRelationships' type: - $ref: '#/components/schemas/PlaylistDataType' + $ref: '#/components/schemas/PersonalAccessTokenType' required: + - id - type + - attributes + - relationships type: object - PlaylistDataAttributes: + PersonalAccessTokenAttributes: + description: Attributes of a personal access token. properties: created_at: + description: Creation timestamp of the personal access token. + example: '2024-03-15T10:30:00.000000+00:00' format: date-time + readOnly: true type: string - created_by: - $ref: '#/components/schemas/PlaylistDataAttributesCreatedBy' - description: - type: string - name: - example: My Playlist + expires_at: + description: Expiration timestamp of the personal access token. + example: '2025-03-15T10:30:00.000000+00:00' + format: date-time type: string - session_count: - format: int64 - type: integer - updated_at: + modified_at: + description: Last modification timestamp of the personal access token. + example: '2024-03-20T10:30:00.000000+00:00' format: date-time + nullable: true + readOnly: true + type: string + name: + description: Name of the personal access token. + example: Example Personal Access Token + maxLength: 256 + minLength: 1 type: string + scopes: + description: 'Array of scopes granted to the personal access token. These + define what + + permissions the token has.' + example: + - dashboards_read + - monitors_read + items: + description: Name of scope. + type: string + minItems: 1 + type: array required: - name + - scopes + - created_at + - expires_at type: object - PlaylistDataAttributesCreatedBy: + PersonalAccessTokenCreateAttributes: + description: Attributes used to create a personal access token. properties: - handle: - example: john.doe@example.com - type: string - icon: - type: string - id: - example: 00000000-0000-0000-0000-000000000001 + expires_at: + description: Expiration timestamp for the personal access token. + example: '2025-03-15T10:30:00.000000+00:00' + format: date-time type: string name: + description: Name of the personal access token. + example: Example Personal Access Token + maxLength: 256 + minLength: 1 type: string - uuid: - example: 00000000-0000-0000-0000-000000000001 - type: string + scopes: + description: 'Array of scopes to grant the personal access token. These + define what + + permissions the token will have.' + example: + - dashboards_read + - monitors_read + items: + description: Name of scope. + type: string + minItems: 1 + type: array required: - - handle - - id - - uuid + - name + - scopes + - expires_at type: object - PlaylistDataType: - default: rum_replay_playlist - description: Rum replay playlist resource type. - enum: - - rum_replay_playlist - example: rum_replay_playlist - type: string - x-enum-varnames: - - RUM_REPLAY_PLAYLIST - PlaylistsSession: + PersonalAccessTokenCreateData: + description: Object used to create a personal access token. + properties: + attributes: + $ref: '#/components/schemas/PersonalAccessTokenCreateAttributes' + type: + $ref: '#/components/schemas/PersonalAccessTokenType' + required: + - type + - attributes + type: object + PersonalAccessTokenCreateRequest: + description: Request to create a personal access token. properties: data: - $ref: '#/components/schemas/PlaylistsSessionData' + $ref: '#/components/schemas/PersonalAccessTokenCreateData' required: - data type: object - PlaylistsSessionArray: + PersonalAccessTokenGetResponse: + description: Response for retrieving a personal access token. properties: data: + $ref: '#/components/schemas/PersonalAccessToken' + type: object + PersonalAccessTokenRelationships: + description: Resources related to the personal access token. + properties: + owned_by: + $ref: '#/components/schemas/RelationshipToUser' + type: object + PersonalAccessTokenResponse: + description: Response for creating a personal access token. + properties: + data: + $ref: '#/components/schemas/FullPersonalAccessToken' + type: object + PersonalAccessTokenType: + default: personal_access_tokens + description: Personal access tokens resource type. + enum: + - personal_access_tokens + example: personal_access_tokens + type: string + x-enum-varnames: + - PERSONAL_ACCESS_TOKENS + PersonalAccessTokenUpdateAttributes: + description: Attributes used to update a personal access token. + properties: + name: + description: New name for the personal access token. + example: Updated Personal Access Token Name + maxLength: 256 + minLength: 1 + type: string + scopes: + description: 'New array of scopes for the personal access token. If provided, + this will + + replace the existing scopes.' + example: + - dashboards_read + - dashboards_write items: - $ref: '#/components/schemas/PlaylistsSessionData' + description: Name of scope. + type: string + minItems: 1 type: array - required: - - data type: object - PlaylistsSessionData: + PersonalAccessTokenUpdateData: + description: Object used to update a personal access token. properties: attributes: - $ref: '#/components/schemas/PlaylistsSessionDataAttributes' + $ref: '#/components/schemas/PersonalAccessTokenUpdateAttributes' id: + description: UUID of the personal access token. Must match the path parameter. + example: 00000000-0000-0000-0000-000000000000 + format: uuid type: string type: - $ref: '#/components/schemas/ViewershipHistorySessionDataType' + $ref: '#/components/schemas/PersonalAccessTokenType' required: + - id - type + - attributes type: object - PlaylistsSessionDataAttributes: + PersonalAccessTokenUpdateRequest: + description: Request to update a personal access token. properties: - session_event: - additionalProperties: {} - type: object - track: - type: string + data: + $ref: '#/components/schemas/PersonalAccessTokenUpdateData' + required: + - data + type: object + PersonalAccessTokensListResponse: + description: Response for a list of personal access tokens. + properties: + data: + description: Array of personal access tokens. + items: + $ref: '#/components/schemas/PersonalAccessToken' + type: array + meta: + $ref: '#/components/schemas/PersonalAccessTokensResponseMeta' + type: object + PersonalAccessTokensResponseMeta: + description: Additional information related to the personal access tokens response. + properties: + page: + $ref: '#/components/schemas/PersonalAccessTokensResponseMetaPage' type: object + PersonalAccessTokensResponseMetaPage: + description: Pagination information for personal access tokens response. + properties: + total_filtered_count: + description: Total filtered personal access token count. + format: int64 + type: integer + type: object + PersonalAccessTokensSort: + default: name + description: Sorting options for personal access tokens. + enum: + - name + - -name + - created_at + - -created_at + - expires_at + - -expires_at + type: string + x-enum-varnames: + - NAME_ASCENDING + - NAME_DESCENDING + - CREATED_AT_ASCENDING + - CREATED_AT_DESCENDING + - EXPIRES_AT_ASCENDING + - EXPIRES_AT_DESCENDING PostmortemAttachmentRequest: properties: data: @@ -57545,25 +57786,6 @@ components: required: - data type: object - SessionIdArray: - properties: - data: - items: - $ref: '#/components/schemas/SessionIdData' - type: array - required: - - data - type: object - SessionIdData: - properties: - id: - example: 00000000-0000-0000-0000-000000000001 - type: string - type: - $ref: '#/components/schemas/ViewershipHistorySessionDataType' - required: - - type - type: object Shift: description: An on-call shift with its associated data and relationships. example: @@ -58074,178 +58296,6 @@ components: type: string x-enum-varnames: - SLO_STATUS - Snapshot: - properties: - data: - $ref: '#/components/schemas/SnapshotData' - type: object - SnapshotArray: - properties: - data: - items: - $ref: '#/components/schemas/SnapshotData' - type: array - required: - - data - type: object - SnapshotCreateRequest: - properties: - data: - $ref: '#/components/schemas/SnapshotCreateRequestData' - required: - - data - type: object - SnapshotCreateRequestData: - properties: - attributes: - $ref: '#/components/schemas/SnapshotCreateRequestDataAttributes' - type: - $ref: '#/components/schemas/SnapshotUpdateRequestDataType' - required: - - type - type: object - SnapshotCreateRequestDataAttributes: - properties: - application_id: - example: aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb - type: string - device_type: - example: desktop - type: string - event_id: - example: 11111111-2222-3333-4444-555555555555 - type: string - is_device_type_selected_by_user: - example: false - type: boolean - session_id: - type: string - snapshot_name: - example: My Snapshot - type: string - start: - example: 0 - format: int64 - type: integer - view_id: - type: string - view_name: - example: /home - type: string - required: - - view_name - - device_type - - application_id - - snapshot_name - - event_id - - start - - is_device_type_selected_by_user - type: object - SnapshotData: - properties: - attributes: - $ref: '#/components/schemas/SnapshotDataAttributes' - id: - readOnly: true - type: string - type: - $ref: '#/components/schemas/SnapshotUpdateRequestDataType' - required: - - type - type: object - SnapshotDataAttributes: - properties: - application_id: - type: string - created_at: - format: date-time - readOnly: true - type: string - created_by: - readOnly: true - type: string - created_by_handle: - readOnly: true - type: string - created_by_user_id: - format: int64 - readOnly: true - type: integer - device_type: - type: string - event_id: - type: string - is_device_type_selected_by_user: - type: boolean - modified_at: - format: date-time - readOnly: true - type: string - org_id: - format: int64 - readOnly: true - type: integer - session_id: - type: string - snapshot_name: - type: string - start: - format: int64 - type: integer - view_id: - type: string - view_name: - type: string - type: object - SnapshotUpdateRequest: - properties: - data: - $ref: '#/components/schemas/SnapshotUpdateRequestData' - required: - - data - type: object - SnapshotUpdateRequestData: - properties: - attributes: - $ref: '#/components/schemas/SnapshotUpdateRequestDataAttributes' - id: - example: 00000000-0000-0000-0000-000000000001 - type: string - type: - $ref: '#/components/schemas/SnapshotUpdateRequestDataType' - required: - - type - type: object - SnapshotUpdateRequestDataAttributes: - properties: - event_id: - example: 11111111-2222-3333-4444-555555555555 - type: string - is_device_type_selected_by_user: - example: false - type: boolean - session_id: - type: string - start: - example: 0 - format: int64 - type: integer - view_id: - type: string - required: - - event_id - - start - - is_device_type_selected_by_user - type: object - SnapshotUpdateRequestDataType: - default: snapshots - description: Snapshots resource type. - enum: - - snapshots - example: snapshots - type: string - x-enum-varnames: - - SNAPSHOTS SoftwareCatalogTriggerWrapper: description: Schema for a Software Catalog-based trigger. properties: @@ -65360,51 +65410,6 @@ components: - CREATE - UPDATE - DELETE - ViewershipHistorySessionArray: - properties: - data: - items: - $ref: '#/components/schemas/ViewershipHistorySessionData' - type: array - required: - - data - type: object - ViewershipHistorySessionData: - properties: - attributes: - $ref: '#/components/schemas/ViewershipHistorySessionDataAttributes' - id: - type: string - type: - $ref: '#/components/schemas/ViewershipHistorySessionDataType' - required: - - type - type: object - ViewershipHistorySessionDataAttributes: - properties: - event_id: - type: string - last_watched_at: - example: '2026-01-13T17:15:53.208340Z' - format: date-time - type: string - session_event: - additionalProperties: {} - type: object - track: - type: string - required: - - last_watched_at - type: object - ViewershipHistorySessionDataType: - default: rum_replay_session - description: Rum replay session resource type. - enum: - - rum_replay_session - example: rum_replay_session - type: string - x-enum-varnames: - - RUM_REPLAY_SESSION VirusTotalAPIKey: description: The definition of the `VirusTotalAPIKey` object. properties: @@ -65893,104 +65898,6 @@ components: - X_CONTENT_TYPE_HEADER_MISSING - X_PATH_INJECTION - XSS - Watch: - properties: - data: - $ref: '#/components/schemas/WatchData' - required: - - data - type: object - WatchData: - properties: - attributes: - $ref: '#/components/schemas/WatchDataAttributes' - id: - type: string - type: - $ref: '#/components/schemas/WatchDataType' - required: - - type - type: object - WatchDataAttributes: - properties: - application_id: - example: aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb - type: string - data_source: - type: string - event_id: - example: 11111111-2222-3333-4444-555555555555 - type: string - timestamp: - example: '2026-01-13T17:15:53.208340Z' - format: date-time - type: string - required: - - application_id - - event_id - - timestamp - type: object - WatchDataType: - default: rum_replay_watch - description: Rum replay watch resource type. - enum: - - rum_replay_watch - example: rum_replay_watch - type: string - x-enum-varnames: - - RUM_REPLAY_WATCH - WatcherArray: - properties: - data: - items: - $ref: '#/components/schemas/WatcherData' - type: array - required: - - data - type: object - WatcherData: - properties: - attributes: - $ref: '#/components/schemas/WatcherDataAttributes' - id: - type: string - type: - $ref: '#/components/schemas/WatcherDataType' - required: - - type - type: object - WatcherDataAttributes: - properties: - handle: - example: john.doe@example.com - type: string - icon: - type: string - last_watched_at: - example: '2026-01-13T17:15:53.208340Z' - format: date-time - type: string - name: - type: string - watch_count: - example: 0 - format: int32 - maximum: 2147483647 - type: integer - required: - - handle - - last_watched_at - - watch_count - type: object - WatcherDataType: - default: rum_replay_watcher - description: Rum replay watcher resource type. - enum: - - rum_replay_watcher - example: rum_replay_watcher - type: string - x-enum-varnames: - - RUM_REPLAY_WATCHER Weekday: description: A day of the week. enum: @@ -66430,6 +66337,9 @@ components: is not required to set downtimes. monitors_read: View monitors. monitors_write: Edit, delete, and resolve individual monitors. + org_app_keys_read: View personal access tokens for all users in your organization. + org_app_keys_write: Create, edit, and delete personal access tokens for + all users in your organization. org_connections_read: Read cross organization connections. org_connections_write: Create, edit, and delete cross organization connections. org_management: Edit org configurations, including authentication and @@ -66480,6 +66390,7 @@ components: user_access_manage: Disable users, manage user roles, manage SAML-to-role mappings, and configure logs restriction queries. user_access_read: View users and their roles and settings. + user_app_keys: Create, view, and manage your own personal access tokens. workflows_read: View workflows. workflows_run: Run workflows. workflows_write: Create, edit, and delete workflows. @@ -86169,6 +86080,239 @@ paths: operator: OR permissions: - user_access_read + /api/v2/personal_access_tokens: + get: + description: 'List all personal access tokens in your organization. Supports + filtering, + + pagination, and sorting.' + operationId: ListPersonalAccessTokens + parameters: + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/PageNumber' + - $ref: '#/components/parameters/PersonalAccessTokenSortParameter' + - $ref: '#/components/parameters/PersonalAccessTokenFilterParameter' + - $ref: '#/components/parameters/PersonalAccessTokenFilterOwnerUUIDParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PersonalAccessTokensListResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Not Found - Personal access tokens feature is not enabled + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - org_app_keys_read + summary: List personal access tokens + tags: + - Key Management + x-unstable: '**Note**: This endpoint is in public beta and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + post: + description: 'Create a new personal access token with fine-grained permissions. + The token value + + will be returned in the response and cannot be retrieved later. Be sure to + save it + + securely.' + operationId: CreatePersonalAccessToken + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PersonalAccessTokenCreateRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PersonalAccessTokenResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Not Found - Personal access tokens feature is not enabled + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_app_keys + summary: Create personal access token + tags: + - Key Management + x-codegen-request-body-name: body + x-unstable: '**Note**: This endpoint is in public beta and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/personal_access_tokens/{pat_uuid}: + delete: + description: 'Revoke a personal access token. Once revoked, the token can no + longer be used + + to authenticate API requests.' + operationId: RevokePersonalAccessToken + parameters: + - $ref: '#/components/parameters/PersonalAccessTokenID' + responses: + '204': + description: No Content + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_app_keys + - org_app_keys_write + summary: Revoke personal access token + tags: + - Key Management + x-unstable: '**Note**: This endpoint is in public beta and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + get: + description: Get a specific personal access token by UUID. + operationId: GetPersonalAccessToken + parameters: + - $ref: '#/components/parameters/PersonalAccessTokenID' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PersonalAccessTokenGetResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - org_app_keys_read + summary: Get personal access token + tags: + - Key Management + x-unstable: '**Note**: This endpoint is in public beta and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + patch: + description: 'Update the name and/or scopes of an existing personal access token. + The ID in the + + request body must match the UUID in the path.' + operationId: UpdatePersonalAccessToken + parameters: + - $ref: '#/components/parameters/PersonalAccessTokenID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PersonalAccessTokenUpdateRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PersonalAccessTokenGetResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - org_app_keys_write + summary: Update personal access token + tags: + - Key Management + x-codegen-request-body-name: body + x-unstable: '**Note**: This endpoint is in public beta and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/posture_management/findings: get: description: "Get a list of findings. These include both misconfigurations and @@ -88368,134 +88512,6 @@ paths: tags: - CSM Threats x-codegen-request-body-name: body - /api/v2/replay/heatmap/snapshots: - get: - description: List heatmap snapshots. - operationId: ListReplayHeatmapSnapshots - parameters: - - description: Device type to filter snapshots. - in: query - name: filter[device_type] - schema: - example: desktop - type: string - - description: View name to filter snapshots. - in: query - name: filter[view_name] - required: true - schema: - example: /home - type: string - - description: Maximum number of snapshots to return. - in: query - name: page[limit] - schema: - example: 10 - type: integer - - description: Filter by application ID. - in: query - name: filter[application_id] - schema: - example: aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/SnapshotArray' - description: OK - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: List replay heatmap snapshots - tags: - - Rum Replay Heatmaps - post: - description: Create a heatmap snapshot. - operationId: CreateReplayHeatmapSnapshot - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SnapshotCreateRequest' - required: true - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/Snapshot' - description: Created - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: Create replay heatmap snapshot - tags: - - Rum Replay Heatmaps - /api/v2/replay/heatmap/snapshots/{snapshot_id}: - delete: - description: Delete a heatmap snapshot. - operationId: DeleteReplayHeatmapSnapshot - parameters: - - description: Unique identifier of the heatmap snapshot. - in: path - name: snapshot_id - required: true - schema: - example: 00000000-0000-0000-0000-000000000001 - type: string - responses: - '204': - description: No Content - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: Delete replay heatmap snapshot - tags: - - Rum Replay Heatmaps - patch: - description: Update a heatmap snapshot. - operationId: UpdateReplayHeatmapSnapshot - parameters: - - description: Unique identifier of the heatmap snapshot. - in: path - name: snapshot_id - required: true - schema: - example: 00000000-0000-0000-0000-000000000001 - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SnapshotUpdateRequest' - required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Snapshot' - description: OK - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: Update replay heatmap snapshot - tags: - - Rum Replay Heatmaps /api/v2/restriction_policy/{resource_id}: delete: description: Deletes the restriction policy associated with a specified resource. @@ -89895,533 +89911,6 @@ paths: operator: OR permissions: - rum_apps_read - /api/v2/rum/replay/playlists: - get: - description: List playlists. - operationId: ListRumReplayPlaylists - parameters: - - description: Filter playlists by the UUID of the user who created them. - in: query - name: filter[created_by_uuid] - schema: - example: 00000000-0000-0000-0000-000000000001 - type: string - - description: Search query to filter playlists by name. - in: query - name: filter[query] - schema: - example: my playlist - type: string - - description: Page number for pagination (0-indexed). - in: query - name: page[number] - schema: - example: 0 - type: integer - - description: Number of items per page. - in: query - name: page[size] - schema: - example: 25 - type: integer - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PlaylistArray' - description: OK - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: List rum replay playlists - tags: - - Rum Replay Playlists - post: - description: Create a playlist. - operationId: CreateRumReplayPlaylist - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Playlist' - required: true - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/Playlist' - description: Created - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: Create rum replay playlist - tags: - - Rum Replay Playlists - /api/v2/rum/replay/playlists/{playlist_id}: - delete: - description: Delete a playlist. - operationId: DeleteRumReplayPlaylist - parameters: - - description: Unique identifier of the playlist. - in: path - name: playlist_id - required: true - schema: - example: 1234567 - type: integer - responses: - '204': - description: No Content - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: Delete rum replay playlist - tags: - - Rum Replay Playlists - get: - description: Get a playlist. - operationId: GetRumReplayPlaylist - parameters: - - description: Unique identifier of the playlist. - in: path - name: playlist_id - required: true - schema: - example: 1234567 - type: integer - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Playlist' - description: OK - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: Get rum replay playlist - tags: - - Rum Replay Playlists - put: - description: Update a playlist. - operationId: UpdateRumReplayPlaylist - parameters: - - description: Unique identifier of the playlist. - in: path - name: playlist_id - required: true - schema: - example: 1234567 - type: integer - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Playlist' - required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Playlist' - description: OK - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: Update rum replay playlist - tags: - - Rum Replay Playlists - /api/v2/rum/replay/playlists/{playlist_id}/sessions: - delete: - description: Remove sessions from a playlist. - operationId: BulkRemoveRumReplayPlaylistSessions - parameters: - - description: Unique identifier of the playlist. - in: path - name: playlist_id - required: true - schema: - example: 1234567 - type: integer - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SessionIdArray' - required: true - responses: - '204': - description: No Content - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: Bulk remove rum replay playlist sessions - tags: - - Rum Replay Playlists - get: - description: List sessions in a playlist. - operationId: ListRumReplayPlaylistSessions - parameters: - - description: Unique identifier of the playlist. - in: path - name: playlist_id - required: true - schema: - example: 1234567 - type: integer - - description: Page number for pagination (0-indexed). - in: query - name: page[number] - schema: - example: 0 - type: integer - - description: Number of items per page. - in: query - name: page[size] - schema: - example: 25 - type: integer - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PlaylistsSessionArray' - description: OK - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: List rum replay playlist sessions - tags: - - Rum Replay Playlists - /api/v2/rum/replay/playlists/{playlist_id}/sessions/{session_id}: - delete: - description: Remove a session from a playlist. - operationId: RemoveRumReplaySessionFromPlaylist - parameters: - - description: Unique identifier of the playlist. - in: path - name: playlist_id - required: true - schema: - example: 1234567 - type: integer - - description: Unique identifier of the session. - in: path - name: session_id - required: true - schema: - example: 00000000-0000-0000-0000-000000000001 - type: string - responses: - '204': - description: No Content - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: Remove rum replay session from playlist - tags: - - Rum Replay Playlists - put: - description: Add a session to a playlist. - operationId: AddRumReplaySessionToPlaylist - parameters: - - description: 'Data source type. Valid values: ''rum'' or ''product_analytics''. - Defaults to ''rum''.' - in: query - name: data_source - schema: - example: rum - type: string - - description: Server-side timestamp in milliseconds. - in: query - name: ts - required: true - schema: - example: 1704067200000 - format: int64 - type: integer - - description: Unique identifier of the playlist. - in: path - name: playlist_id - required: true - schema: - example: 1234567 - type: integer - - description: Unique identifier of the session. - in: path - name: session_id - required: true - schema: - example: 00000000-0000-0000-0000-000000000001 - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/PlaylistsSession' - description: OK - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/PlaylistsSession' - description: Created - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: Add rum replay session to playlist - tags: - - Rum Replay Playlists - /api/v2/rum/replay/sessions/{session_id}/views/{view_id}/segments: - get: - description: Get segments for a view. - operationId: GetSegments - parameters: - - description: Unique identifier of the view. - in: path - name: view_id - required: true - schema: - example: 00000000-0000-0000-0000-000000000002 - type: string - - description: 'Storage source: ''event_platform'' or ''blob''.' - in: query - name: source - schema: - example: event_platform - type: string - - description: Unique identifier of the session. - in: path - name: session_id - required: true - schema: - example: 00000000-0000-0000-0000-000000000001 - type: string - - description: Server-side timestamp in milliseconds. - in: query - name: ts - schema: - example: 1704067200000 - format: int64 - type: integer - - description: Maximum size in bytes for the segment list. - in: query - name: max_list_size - schema: - example: 1048576 - type: integer - - description: Paging token for pagination. - in: query - name: paging - schema: - example: eyJuZXh0IjoiYWJjMTIzIn0 - type: string - responses: - '200': - description: OK - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: Get segments - tags: - - Rum Replay Sessions - /api/v2/rum/replay/sessions/{session_id}/watchers: - get: - description: List session watchers. - operationId: ListRumReplaySessionWatchers - parameters: - - description: Number of items per page. - in: query - name: page[size] - schema: - example: 25 - type: integer - - description: Page number for pagination (0-indexed). - in: query - name: page[number] - schema: - example: 0 - type: integer - - description: Unique identifier of the session. - in: path - name: session_id - required: true - schema: - example: 00000000-0000-0000-0000-000000000001 - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/WatcherArray' - description: OK - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: List rum replay session watchers - tags: - - Rum Replay Viewership - /api/v2/rum/replay/sessions/{session_id}/watches: - delete: - description: Delete session watch history. - operationId: DeleteRumReplaySessionWatch - parameters: - - description: Unique identifier of the session. - in: path - name: session_id - required: true - schema: - example: 00000000-0000-0000-0000-000000000001 - type: string - responses: - '204': - description: No Content - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: Delete rum replay session watch - tags: - - Rum Replay Viewership - post: - description: Record a session watch. - operationId: CreateRumReplaySessionWatch - parameters: - - description: Unique identifier of the session. - in: path - name: session_id - required: true - schema: - example: 00000000-0000-0000-0000-000000000001 - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Watch' - required: true - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/Watch' - description: Created - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: Create rum replay session watch - tags: - - Rum Replay Viewership - /api/v2/rum/replay/viewership-history/sessions: - get: - description: List watched sessions. - operationId: ListRumReplayViewershipHistorySessions - parameters: - - description: Start timestamp in milliseconds for watched_at filter. - in: query - name: filter[watched_at][start] - schema: - example: 1704067200000 - format: int64 - type: integer - - description: Page number for pagination (0-indexed). - in: query - name: page[number] - schema: - example: 0 - type: integer - - description: Filter by user UUID. Defaults to current user if not specified. - in: query - name: filter[created_by] - schema: - example: 00000000-0000-0000-0000-000000000001 - type: string - - description: End timestamp in milliseconds for watched_at filter. - in: query - name: filter[watched_at][end] - schema: - example: 1704153600000 - format: int64 - type: integer - - description: Comma-separated list of session IDs to filter by. - in: query - name: filter[session_ids] - schema: - example: 11111111-2222-3333-4444-555555555555,22222222-3333-4444-5555-666666666666 - type: string - - description: Number of items per page. - in: query - name: page[size] - schema: - example: 25 - type: integer - - description: Filter by application ID. - in: query - name: filter[application_id] - schema: - example: aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb - type: string - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/ViewershipHistorySessionArray' - description: OK - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: List rum replay viewership history sessions - tags: - - Rum Replay Viewership /api/v2/saml_configurations/idp_metadata: post: description: 'Endpoint for uploading IdP metadata for SAML setup. @@ -101786,18 +101275,6 @@ tags: description: Find out more at url: https://docs.datadoghq.com/real_user_monitoring/platform/generate_metrics/ name: Rum Metrics -- description: Manage heatmap snapshots for RUM replay sessions. Create, update, delete, - and retrieve snapshots to visualize user interactions on specific views. - name: Rum Replay Heatmaps -- description: Create and manage playlists of RUM replay sessions. Organize, categorize, - and share collections of replay sessions for analysis and collaboration. - name: Rum Replay Playlists -- description: Retrieve segments for RUM replay sessions. Access session replay data - stored in event platform or blob storage. - name: Rum Replay Sessions -- description: Track and manage RUM replay session viewership. Monitor who watches - replay sessions and maintain watch history for audit and analytics purposes. - name: Rum Replay Viewership - description: Manage retention filters through [Manage Applications](https://app.datadoghq.com/rum/list) of RUM for your organization. name: Rum Retention Filters diff --git a/examples/v1/key-management/CreateClientToken.java b/examples/v1/key-management/CreateClientToken.java new file mode 100644 index 00000000000..1870e52331d --- /dev/null +++ b/examples/v1/key-management/CreateClientToken.java @@ -0,0 +1,32 @@ +// Create client token returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v1.api.KeyManagementApi; +import com.datadog.api.client.v1.model.ClientToken; +import com.datadog.api.client.v1.model.ClientTokenCreateRequest; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v1.createClientToken", true); + KeyManagementApi apiInstance = new KeyManagementApi(defaultClient); + + ClientTokenCreateRequest body = + new ClientTokenCreateRequest() + .name("Example Client Token") + .originUrls(Collections.singletonList("https://example.com")); + + try { + ClientToken result = apiInstance.createClientToken(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling KeyManagementApi#createClientToken"); + 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/v1/key-management/RevokeClientToken.java b/examples/v1/key-management/RevokeClientToken.java new file mode 100644 index 00000000000..f5fda162702 --- /dev/null +++ b/examples/v1/key-management/RevokeClientToken.java @@ -0,0 +1,27 @@ +// Revoke client token returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v1.api.KeyManagementApi; +import com.datadog.api.client.v1.model.ClientTokenRevokeRequest; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v1.revokeClientToken", true); + KeyManagementApi apiInstance = new KeyManagementApi(defaultClient); + + ClientTokenRevokeRequest body = + new ClientTokenRevokeRequest().hash("1234567890abcdef1234567890abcdef123"); + + try { + apiInstance.revokeClientToken(body); + } catch (ApiException e) { + System.err.println("Exception when calling KeyManagementApi#revokeClientToken"); + 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/v1/key-management/UpdateClientToken.java b/examples/v1/key-management/UpdateClientToken.java new file mode 100644 index 00000000000..70dda65dca2 --- /dev/null +++ b/examples/v1/key-management/UpdateClientToken.java @@ -0,0 +1,33 @@ +// Update client token returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v1.api.KeyManagementApi; +import com.datadog.api.client.v1.model.ClientToken; +import com.datadog.api.client.v1.model.ClientTokenUpdateRequest; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v1.updateClientToken", true); + KeyManagementApi apiInstance = new KeyManagementApi(defaultClient); + + ClientTokenUpdateRequest body = + new ClientTokenUpdateRequest() + .hash("1234567890abcdef1234567890abcdef123") + .name("Updated Client Token Name") + .originUrls(Collections.singletonList("https://example.com")); + + try { + ClientToken result = apiInstance.updateClientToken(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling KeyManagementApi#updateClientToken"); + 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/key-management/CreatePersonalAccessToken.java b/examples/v2/key-management/CreatePersonalAccessToken.java new file mode 100644 index 00000000000..35e4d859dbd --- /dev/null +++ b/examples/v2/key-management/CreatePersonalAccessToken.java @@ -0,0 +1,42 @@ +// Create personal access token returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.KeyManagementApi; +import com.datadog.api.client.v2.model.PersonalAccessTokenCreateAttributes; +import com.datadog.api.client.v2.model.PersonalAccessTokenCreateData; +import com.datadog.api.client.v2.model.PersonalAccessTokenCreateRequest; +import com.datadog.api.client.v2.model.PersonalAccessTokenResponse; +import com.datadog.api.client.v2.model.PersonalAccessTokenType; +import java.time.OffsetDateTime; +import java.util.Arrays; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createPersonalAccessToken", true); + KeyManagementApi apiInstance = new KeyManagementApi(defaultClient); + + PersonalAccessTokenCreateRequest body = + new PersonalAccessTokenCreateRequest() + .data( + new PersonalAccessTokenCreateData() + .attributes( + new PersonalAccessTokenCreateAttributes() + .expiresAt(OffsetDateTime.parse("2025-03-15T10:30:00.000000+00:00")) + .name("Example Personal Access Token") + .scopes(Arrays.asList("dashboards_read", "monitors_read"))) + .type(PersonalAccessTokenType.PERSONAL_ACCESS_TOKENS)); + + try { + PersonalAccessTokenResponse result = apiInstance.createPersonalAccessToken(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling KeyManagementApi#createPersonalAccessToken"); + 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/key-management/GetPersonalAccessToken.java b/examples/v2/key-management/GetPersonalAccessToken.java new file mode 100644 index 00000000000..236be2efa1c --- /dev/null +++ b/examples/v2/key-management/GetPersonalAccessToken.java @@ -0,0 +1,28 @@ +// Get personal access token returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.KeyManagementApi; +import com.datadog.api.client.v2.model.PersonalAccessTokenGetResponse; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getPersonalAccessToken", true); + KeyManagementApi apiInstance = new KeyManagementApi(defaultClient); + + try { + PersonalAccessTokenGetResponse result = + apiInstance.getPersonalAccessToken( + UUID.fromString("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d")); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling KeyManagementApi#getPersonalAccessToken"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum-replay-playlists/ListRumReplayPlaylists.java b/examples/v2/key-management/ListPersonalAccessTokens.java similarity index 50% rename from examples/v2/rum-replay-playlists/ListRumReplayPlaylists.java rename to examples/v2/key-management/ListPersonalAccessTokens.java index 36c9a4ad076..ba9e07b7e1e 100644 --- a/examples/v2/rum-replay-playlists/ListRumReplayPlaylists.java +++ b/examples/v2/key-management/ListPersonalAccessTokens.java @@ -1,20 +1,21 @@ -// List rum replay playlists returns "OK" response +// List personal access tokens returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.RumReplayPlaylistsApi; -import com.datadog.api.client.v2.model.PlaylistArray; +import com.datadog.api.client.v2.api.KeyManagementApi; +import com.datadog.api.client.v2.model.PersonalAccessTokensListResponse; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - RumReplayPlaylistsApi apiInstance = new RumReplayPlaylistsApi(defaultClient); + defaultClient.setUnstableOperationEnabled("v2.listPersonalAccessTokens", true); + KeyManagementApi apiInstance = new KeyManagementApi(defaultClient); try { - PlaylistArray result = apiInstance.listRumReplayPlaylists(); + PersonalAccessTokensListResponse result = apiInstance.listPersonalAccessTokens(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RumReplayPlaylistsApi#listRumReplayPlaylists"); + System.err.println("Exception when calling KeyManagementApi#listPersonalAccessTokens"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/examples/v2/key-management/RevokePersonalAccessToken.java b/examples/v2/key-management/RevokePersonalAccessToken.java new file mode 100644 index 00000000000..342b0c8f20c --- /dev/null +++ b/examples/v2/key-management/RevokePersonalAccessToken.java @@ -0,0 +1,25 @@ +// Revoke personal access token returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.KeyManagementApi; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.revokePersonalAccessToken", true); + KeyManagementApi apiInstance = new KeyManagementApi(defaultClient); + + try { + apiInstance.revokePersonalAccessToken( + UUID.fromString("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d")); + } catch (ApiException e) { + System.err.println("Exception when calling KeyManagementApi#revokePersonalAccessToken"); + 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/key-management/UpdatePersonalAccessToken.java b/examples/v2/key-management/UpdatePersonalAccessToken.java new file mode 100644 index 00000000000..9db85f86555 --- /dev/null +++ b/examples/v2/key-management/UpdatePersonalAccessToken.java @@ -0,0 +1,44 @@ +// Update personal access token returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.KeyManagementApi; +import com.datadog.api.client.v2.model.PersonalAccessTokenGetResponse; +import com.datadog.api.client.v2.model.PersonalAccessTokenType; +import com.datadog.api.client.v2.model.PersonalAccessTokenUpdateAttributes; +import com.datadog.api.client.v2.model.PersonalAccessTokenUpdateData; +import com.datadog.api.client.v2.model.PersonalAccessTokenUpdateRequest; +import java.util.Arrays; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.updatePersonalAccessToken", true); + KeyManagementApi apiInstance = new KeyManagementApi(defaultClient); + + PersonalAccessTokenUpdateRequest body = + new PersonalAccessTokenUpdateRequest() + .data( + new PersonalAccessTokenUpdateData() + .attributes( + new PersonalAccessTokenUpdateAttributes() + .name("Updated Personal Access Token Name") + .scopes(Arrays.asList("dashboards_read", "dashboards_write"))) + .id(UUID.fromString("00000000-0000-0000-0000-000000000000")) + .type(PersonalAccessTokenType.PERSONAL_ACCESS_TOKENS)); + + try { + PersonalAccessTokenGetResponse result = + apiInstance.updatePersonalAccessToken( + UUID.fromString("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling KeyManagementApi#updatePersonalAccessToken"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum-replay-heatmaps/CreateReplayHeatmapSnapshot.java b/examples/v2/rum-replay-heatmaps/CreateReplayHeatmapSnapshot.java deleted file mode 100644 index 7cd6723b8d9..00000000000 --- a/examples/v2/rum-replay-heatmaps/CreateReplayHeatmapSnapshot.java +++ /dev/null @@ -1,43 +0,0 @@ -// Create replay heatmap snapshot returns "Created" response - -import com.datadog.api.client.ApiClient; -import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.RumReplayHeatmapsApi; -import com.datadog.api.client.v2.model.Snapshot; -import com.datadog.api.client.v2.model.SnapshotCreateRequest; -import com.datadog.api.client.v2.model.SnapshotCreateRequestData; -import com.datadog.api.client.v2.model.SnapshotCreateRequestDataAttributes; -import com.datadog.api.client.v2.model.SnapshotUpdateRequestDataType; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - RumReplayHeatmapsApi apiInstance = new RumReplayHeatmapsApi(defaultClient); - - SnapshotCreateRequest body = - new SnapshotCreateRequest() - .data( - new SnapshotCreateRequestData() - .attributes( - new SnapshotCreateRequestDataAttributes() - .applicationId("aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb") - .deviceType("desktop") - .eventId("11111111-2222-3333-4444-555555555555") - .isDeviceTypeSelectedByUser(false) - .snapshotName("My Snapshot") - .start(0L) - .viewName("/home")) - .type(SnapshotUpdateRequestDataType.SNAPSHOTS)); - - try { - Snapshot result = apiInstance.createReplayHeatmapSnapshot(body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling RumReplayHeatmapsApi#createReplayHeatmapSnapshot"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/examples/v2/rum-replay-heatmaps/DeleteReplayHeatmapSnapshot.java b/examples/v2/rum-replay-heatmaps/DeleteReplayHeatmapSnapshot.java deleted file mode 100644 index bdc125dd28c..00000000000 --- a/examples/v2/rum-replay-heatmaps/DeleteReplayHeatmapSnapshot.java +++ /dev/null @@ -1,22 +0,0 @@ -// Delete replay heatmap snapshot returns "No Content" response - -import com.datadog.api.client.ApiClient; -import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.RumReplayHeatmapsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - RumReplayHeatmapsApi apiInstance = new RumReplayHeatmapsApi(defaultClient); - - try { - apiInstance.deleteReplayHeatmapSnapshot("00000000-0000-0000-0000-000000000001"); - } catch (ApiException e) { - System.err.println("Exception when calling RumReplayHeatmapsApi#deleteReplayHeatmapSnapshot"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/examples/v2/rum-replay-heatmaps/ListReplayHeatmapSnapshots.java b/examples/v2/rum-replay-heatmaps/ListReplayHeatmapSnapshots.java deleted file mode 100644 index 976da76a730..00000000000 --- a/examples/v2/rum-replay-heatmaps/ListReplayHeatmapSnapshots.java +++ /dev/null @@ -1,24 +0,0 @@ -// List replay heatmap snapshots returns "OK" response - -import com.datadog.api.client.ApiClient; -import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.RumReplayHeatmapsApi; -import com.datadog.api.client.v2.model.SnapshotArray; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - RumReplayHeatmapsApi apiInstance = new RumReplayHeatmapsApi(defaultClient); - - try { - SnapshotArray result = apiInstance.listReplayHeatmapSnapshots("/home"); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling RumReplayHeatmapsApi#listReplayHeatmapSnapshots"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/examples/v2/rum-replay-heatmaps/UpdateReplayHeatmapSnapshot.java b/examples/v2/rum-replay-heatmaps/UpdateReplayHeatmapSnapshot.java deleted file mode 100644 index 1690b396697..00000000000 --- a/examples/v2/rum-replay-heatmaps/UpdateReplayHeatmapSnapshot.java +++ /dev/null @@ -1,41 +0,0 @@ -// Update replay heatmap snapshot returns "OK" response - -import com.datadog.api.client.ApiClient; -import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.RumReplayHeatmapsApi; -import com.datadog.api.client.v2.model.Snapshot; -import com.datadog.api.client.v2.model.SnapshotUpdateRequest; -import com.datadog.api.client.v2.model.SnapshotUpdateRequestData; -import com.datadog.api.client.v2.model.SnapshotUpdateRequestDataAttributes; -import com.datadog.api.client.v2.model.SnapshotUpdateRequestDataType; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - RumReplayHeatmapsApi apiInstance = new RumReplayHeatmapsApi(defaultClient); - - SnapshotUpdateRequest body = - new SnapshotUpdateRequest() - .data( - new SnapshotUpdateRequestData() - .attributes( - new SnapshotUpdateRequestDataAttributes() - .eventId("11111111-2222-3333-4444-555555555555") - .isDeviceTypeSelectedByUser(false) - .start(0L)) - .id("00000000-0000-0000-0000-000000000001") - .type(SnapshotUpdateRequestDataType.SNAPSHOTS)); - - try { - Snapshot result = - apiInstance.updateReplayHeatmapSnapshot("00000000-0000-0000-0000-000000000001", body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling RumReplayHeatmapsApi#updateReplayHeatmapSnapshot"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/examples/v2/rum-replay-playlists/AddRumReplaySessionToPlaylist.java b/examples/v2/rum-replay-playlists/AddRumReplaySessionToPlaylist.java deleted file mode 100644 index c7d6e93ebb4..00000000000 --- a/examples/v2/rum-replay-playlists/AddRumReplaySessionToPlaylist.java +++ /dev/null @@ -1,27 +0,0 @@ -// Add rum replay session to playlist returns "OK" response - -import com.datadog.api.client.ApiClient; -import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.RumReplayPlaylistsApi; -import com.datadog.api.client.v2.model.PlaylistsSession; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - RumReplayPlaylistsApi apiInstance = new RumReplayPlaylistsApi(defaultClient); - - try { - PlaylistsSession result = - apiInstance.addRumReplaySessionToPlaylist( - 1704067200000L, 1234567, "00000000-0000-0000-0000-000000000001"); - System.out.println(result); - } catch (ApiException e) { - System.err.println( - "Exception when calling RumReplayPlaylistsApi#addRumReplaySessionToPlaylist"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/examples/v2/rum-replay-playlists/BulkRemoveRumReplayPlaylistSessions.java b/examples/v2/rum-replay-playlists/BulkRemoveRumReplayPlaylistSessions.java deleted file mode 100644 index 5088a739a31..00000000000 --- a/examples/v2/rum-replay-playlists/BulkRemoveRumReplayPlaylistSessions.java +++ /dev/null @@ -1,35 +0,0 @@ -// Bulk remove rum replay playlist sessions returns "No Content" response - -import com.datadog.api.client.ApiClient; -import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.RumReplayPlaylistsApi; -import com.datadog.api.client.v2.model.SessionIdArray; -import com.datadog.api.client.v2.model.SessionIdData; -import com.datadog.api.client.v2.model.ViewershipHistorySessionDataType; -import java.util.Collections; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - RumReplayPlaylistsApi apiInstance = new RumReplayPlaylistsApi(defaultClient); - - SessionIdArray body = - new SessionIdArray() - .data( - Collections.singletonList( - new SessionIdData() - .id("00000000-0000-0000-0000-000000000001") - .type(ViewershipHistorySessionDataType.RUM_REPLAY_SESSION))); - - try { - apiInstance.bulkRemoveRumReplayPlaylistSessions(1234567, body); - } catch (ApiException e) { - System.err.println( - "Exception when calling RumReplayPlaylistsApi#bulkRemoveRumReplayPlaylistSessions"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/examples/v2/rum-replay-playlists/CreateRumReplayPlaylist.java b/examples/v2/rum-replay-playlists/CreateRumReplayPlaylist.java deleted file mode 100644 index ad3e4655b7f..00000000000 --- a/examples/v2/rum-replay-playlists/CreateRumReplayPlaylist.java +++ /dev/null @@ -1,42 +0,0 @@ -// Create rum replay playlist returns "Created" response - -import com.datadog.api.client.ApiClient; -import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.RumReplayPlaylistsApi; -import com.datadog.api.client.v2.model.Playlist; -import com.datadog.api.client.v2.model.PlaylistData; -import com.datadog.api.client.v2.model.PlaylistDataAttributes; -import com.datadog.api.client.v2.model.PlaylistDataAttributesCreatedBy; -import com.datadog.api.client.v2.model.PlaylistDataType; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - RumReplayPlaylistsApi apiInstance = new RumReplayPlaylistsApi(defaultClient); - - Playlist body = - new Playlist() - .data( - new PlaylistData() - .attributes( - new PlaylistDataAttributes() - .createdBy( - new PlaylistDataAttributesCreatedBy() - .handle("john.doe@example.com") - .id("00000000-0000-0000-0000-000000000001") - .uuid("00000000-0000-0000-0000-000000000001")) - .name("My Playlist")) - .type(PlaylistDataType.RUM_REPLAY_PLAYLIST)); - - try { - Playlist result = apiInstance.createRumReplayPlaylist(body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling RumReplayPlaylistsApi#createRumReplayPlaylist"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/examples/v2/rum-replay-playlists/DeleteRumReplayPlaylist.java b/examples/v2/rum-replay-playlists/DeleteRumReplayPlaylist.java deleted file mode 100644 index 592938cd19f..00000000000 --- a/examples/v2/rum-replay-playlists/DeleteRumReplayPlaylist.java +++ /dev/null @@ -1,22 +0,0 @@ -// Delete rum replay playlist returns "No Content" response - -import com.datadog.api.client.ApiClient; -import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.RumReplayPlaylistsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - RumReplayPlaylistsApi apiInstance = new RumReplayPlaylistsApi(defaultClient); - - try { - apiInstance.deleteRumReplayPlaylist(1234567); - } catch (ApiException e) { - System.err.println("Exception when calling RumReplayPlaylistsApi#deleteRumReplayPlaylist"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/examples/v2/rum-replay-playlists/GetRumReplayPlaylist.java b/examples/v2/rum-replay-playlists/GetRumReplayPlaylist.java deleted file mode 100644 index 82680706bf4..00000000000 --- a/examples/v2/rum-replay-playlists/GetRumReplayPlaylist.java +++ /dev/null @@ -1,24 +0,0 @@ -// Get rum replay playlist returns "OK" response - -import com.datadog.api.client.ApiClient; -import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.RumReplayPlaylistsApi; -import com.datadog.api.client.v2.model.Playlist; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - RumReplayPlaylistsApi apiInstance = new RumReplayPlaylistsApi(defaultClient); - - try { - Playlist result = apiInstance.getRumReplayPlaylist(1234567); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling RumReplayPlaylistsApi#getRumReplayPlaylist"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/examples/v2/rum-replay-playlists/ListRumReplayPlaylistSessions.java b/examples/v2/rum-replay-playlists/ListRumReplayPlaylistSessions.java deleted file mode 100644 index 657b4c8eb07..00000000000 --- a/examples/v2/rum-replay-playlists/ListRumReplayPlaylistSessions.java +++ /dev/null @@ -1,25 +0,0 @@ -// List rum replay playlist sessions returns "OK" response - -import com.datadog.api.client.ApiClient; -import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.RumReplayPlaylistsApi; -import com.datadog.api.client.v2.model.PlaylistsSessionArray; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - RumReplayPlaylistsApi apiInstance = new RumReplayPlaylistsApi(defaultClient); - - try { - PlaylistsSessionArray result = apiInstance.listRumReplayPlaylistSessions(1234567); - System.out.println(result); - } catch (ApiException e) { - System.err.println( - "Exception when calling RumReplayPlaylistsApi#listRumReplayPlaylistSessions"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/examples/v2/rum-replay-playlists/RemoveRumReplaySessionFromPlaylist.java b/examples/v2/rum-replay-playlists/RemoveRumReplaySessionFromPlaylist.java deleted file mode 100644 index e486a9d493e..00000000000 --- a/examples/v2/rum-replay-playlists/RemoveRumReplaySessionFromPlaylist.java +++ /dev/null @@ -1,24 +0,0 @@ -// Remove rum replay session from playlist returns "No Content" response - -import com.datadog.api.client.ApiClient; -import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.RumReplayPlaylistsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - RumReplayPlaylistsApi apiInstance = new RumReplayPlaylistsApi(defaultClient); - - try { - apiInstance.removeRumReplaySessionFromPlaylist( - 1234567, "00000000-0000-0000-0000-000000000001"); - } catch (ApiException e) { - System.err.println( - "Exception when calling RumReplayPlaylistsApi#removeRumReplaySessionFromPlaylist"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/examples/v2/rum-replay-playlists/UpdateRumReplayPlaylist.java b/examples/v2/rum-replay-playlists/UpdateRumReplayPlaylist.java deleted file mode 100644 index eb7bfd0172a..00000000000 --- a/examples/v2/rum-replay-playlists/UpdateRumReplayPlaylist.java +++ /dev/null @@ -1,42 +0,0 @@ -// Update rum replay playlist returns "OK" response - -import com.datadog.api.client.ApiClient; -import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.RumReplayPlaylistsApi; -import com.datadog.api.client.v2.model.Playlist; -import com.datadog.api.client.v2.model.PlaylistData; -import com.datadog.api.client.v2.model.PlaylistDataAttributes; -import com.datadog.api.client.v2.model.PlaylistDataAttributesCreatedBy; -import com.datadog.api.client.v2.model.PlaylistDataType; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - RumReplayPlaylistsApi apiInstance = new RumReplayPlaylistsApi(defaultClient); - - Playlist body = - new Playlist() - .data( - new PlaylistData() - .attributes( - new PlaylistDataAttributes() - .createdBy( - new PlaylistDataAttributesCreatedBy() - .handle("john.doe@example.com") - .id("00000000-0000-0000-0000-000000000001") - .uuid("00000000-0000-0000-0000-000000000001")) - .name("My Playlist")) - .type(PlaylistDataType.RUM_REPLAY_PLAYLIST)); - - try { - Playlist result = apiInstance.updateRumReplayPlaylist(1234567, body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling RumReplayPlaylistsApi#updateRumReplayPlaylist"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/examples/v2/rum-replay-sessions/GetSegments.java b/examples/v2/rum-replay-sessions/GetSegments.java deleted file mode 100644 index 322352f0c97..00000000000 --- a/examples/v2/rum-replay-sessions/GetSegments.java +++ /dev/null @@ -1,23 +0,0 @@ -// Get segments returns "OK" response - -import com.datadog.api.client.ApiClient; -import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.RumReplaySessionsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - RumReplaySessionsApi apiInstance = new RumReplaySessionsApi(defaultClient); - - try { - apiInstance.getSegments( - "00000000-0000-0000-0000-000000000002", "00000000-0000-0000-0000-000000000001"); - } catch (ApiException e) { - System.err.println("Exception when calling RumReplaySessionsApi#getSegments"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/examples/v2/rum-replay-viewership/CreateRumReplaySessionWatch.java b/examples/v2/rum-replay-viewership/CreateRumReplaySessionWatch.java deleted file mode 100644 index 05b8c82a21d..00000000000 --- a/examples/v2/rum-replay-viewership/CreateRumReplaySessionWatch.java +++ /dev/null @@ -1,41 +0,0 @@ -// Create rum replay session watch returns "Created" response - -import com.datadog.api.client.ApiClient; -import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.RumReplayViewershipApi; -import com.datadog.api.client.v2.model.Watch; -import com.datadog.api.client.v2.model.WatchData; -import com.datadog.api.client.v2.model.WatchDataAttributes; -import com.datadog.api.client.v2.model.WatchDataType; -import java.time.OffsetDateTime; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - RumReplayViewershipApi apiInstance = new RumReplayViewershipApi(defaultClient); - - Watch body = - new Watch() - .data( - new WatchData() - .attributes( - new WatchDataAttributes() - .applicationId("aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb") - .eventId("11111111-2222-3333-4444-555555555555") - .timestamp(OffsetDateTime.parse("2026-01-13T17:15:53.208340Z"))) - .type(WatchDataType.RUM_REPLAY_WATCH)); - - try { - Watch result = - apiInstance.createRumReplaySessionWatch("00000000-0000-0000-0000-000000000001", body); - System.out.println(result); - } catch (ApiException e) { - System.err.println( - "Exception when calling RumReplayViewershipApi#createRumReplaySessionWatch"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/examples/v2/rum-replay-viewership/DeleteRumReplaySessionWatch.java b/examples/v2/rum-replay-viewership/DeleteRumReplaySessionWatch.java deleted file mode 100644 index 8cdb823d2a7..00000000000 --- a/examples/v2/rum-replay-viewership/DeleteRumReplaySessionWatch.java +++ /dev/null @@ -1,23 +0,0 @@ -// Delete rum replay session watch returns "No Content" response - -import com.datadog.api.client.ApiClient; -import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.RumReplayViewershipApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - RumReplayViewershipApi apiInstance = new RumReplayViewershipApi(defaultClient); - - try { - apiInstance.deleteRumReplaySessionWatch("00000000-0000-0000-0000-000000000001"); - } catch (ApiException e) { - System.err.println( - "Exception when calling RumReplayViewershipApi#deleteRumReplaySessionWatch"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/examples/v2/rum-replay-viewership/ListRumReplaySessionWatchers.java b/examples/v2/rum-replay-viewership/ListRumReplaySessionWatchers.java deleted file mode 100644 index 791a087a1e3..00000000000 --- a/examples/v2/rum-replay-viewership/ListRumReplaySessionWatchers.java +++ /dev/null @@ -1,26 +0,0 @@ -// List rum replay session watchers returns "OK" response - -import com.datadog.api.client.ApiClient; -import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.RumReplayViewershipApi; -import com.datadog.api.client.v2.model.WatcherArray; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - RumReplayViewershipApi apiInstance = new RumReplayViewershipApi(defaultClient); - - try { - WatcherArray result = - apiInstance.listRumReplaySessionWatchers("00000000-0000-0000-0000-000000000001"); - System.out.println(result); - } catch (ApiException e) { - System.err.println( - "Exception when calling RumReplayViewershipApi#listRumReplaySessionWatchers"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/examples/v2/rum-replay-viewership/ListRumReplayViewershipHistorySessions.java b/examples/v2/rum-replay-viewership/ListRumReplayViewershipHistorySessions.java deleted file mode 100644 index e2ce0709b44..00000000000 --- a/examples/v2/rum-replay-viewership/ListRumReplayViewershipHistorySessions.java +++ /dev/null @@ -1,25 +0,0 @@ -// List rum replay viewership history sessions returns "OK" response - -import com.datadog.api.client.ApiClient; -import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.RumReplayViewershipApi; -import com.datadog.api.client.v2.model.ViewershipHistorySessionArray; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - RumReplayViewershipApi apiInstance = new RumReplayViewershipApi(defaultClient); - - try { - ViewershipHistorySessionArray result = apiInstance.listRumReplayViewershipHistorySessions(); - System.out.println(result); - } catch (ApiException e) { - System.err.println( - "Exception when calling RumReplayViewershipApi#listRumReplayViewershipHistorySessions"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index fcadf72e1e8..31ad0902c9e 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -756,6 +756,9 @@ public class ApiClient { protected final Map unstableOperations = new HashMap() { { + put("v1.createClientToken", false); + put("v1.revokeClientToken", false); + put("v1.updateClientToken", false); put("v2.cancelFleetDeployment", false); put("v2.createFleetDeploymentConfigure", false); put("v2.createFleetDeploymentUpgrade", false); @@ -770,6 +773,11 @@ public class ApiClient { put("v2.listFleetSchedules", false); put("v2.triggerFleetSchedule", false); put("v2.updateFleetSchedule", false); + put("v2.createPersonalAccessToken", false); + put("v2.getPersonalAccessToken", false); + put("v2.listPersonalAccessTokens", false); + put("v2.revokePersonalAccessToken", false); + put("v2.updatePersonalAccessToken", false); put("v2.createOpenAPI", false); put("v2.deleteOpenAPI", false); put("v2.getOpenAPI", false); diff --git a/src/main/java/com/datadog/api/client/v1/api/KeyManagementApi.java b/src/main/java/com/datadog/api/client/v1/api/KeyManagementApi.java index 8ea04266858..944628473fc 100644 --- a/src/main/java/com/datadog/api/client/v1/api/KeyManagementApi.java +++ b/src/main/java/com/datadog/api/client/v1/api/KeyManagementApi.java @@ -10,6 +10,10 @@ import com.datadog.api.client.v1.model.ApplicationKey; import com.datadog.api.client.v1.model.ApplicationKeyListResponse; import com.datadog.api.client.v1.model.ApplicationKeyResponse; +import com.datadog.api.client.v1.model.ClientToken; +import com.datadog.api.client.v1.model.ClientTokenCreateRequest; +import com.datadog.api.client.v1.model.ClientTokenRevokeRequest; +import com.datadog.api.client.v1.model.ClientTokenUpdateRequest; import jakarta.ws.rs.client.Invocation; import jakarta.ws.rs.core.GenericType; import java.util.ArrayList; @@ -310,6 +314,155 @@ public ApiResponse createApplicationKeyWithHttpInfo(Appl new GenericType() {}); } + /** + * Create client token. + * + *

See {@link #createClientTokenWithHttpInfo}. + * + * @param body (required) + * @return ClientToken + * @throws ApiException if fails to make API call + */ + public ClientToken createClientToken(ClientTokenCreateRequest body) throws ApiException { + return createClientTokenWithHttpInfo(body).getData(); + } + + /** + * Create client token. + * + *

See {@link #createClientTokenWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<ClientToken> + */ + public CompletableFuture createClientTokenAsync(ClientTokenCreateRequest body) { + return createClientTokenWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create a new client token (public API key) to submit data from your browser or mobile + * applications to Datadog. + * + * @param body (required) + * @return ApiResponse<ClientToken> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
429 Too Many Requests -
+ */ + public ApiResponse createClientTokenWithHttpInfo(ClientTokenCreateRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "createClientToken"; + if (apiClient.isUnstableOperationEnabled("v1." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createClientToken"); + } + // create path and map variables + String localVarPath = "/api/v1/public_api_key"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v1.KeyManagementApi.createClientToken", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create client token. + * + *

See {@link #createClientTokenWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<ClientToken>> + */ + public CompletableFuture> createClientTokenWithHttpInfoAsync( + ClientTokenCreateRequest body) { + // Check if unstable operation is enabled + String operationId = "createClientToken"; + if (apiClient.isUnstableOperationEnabled("v1." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling createClientToken")); + return result; + } + // create path and map variables + String localVarPath = "/api/v1/public_api_key"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v1.KeyManagementApi.createClientToken", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Delete an API key. * @@ -1070,6 +1223,154 @@ public ApiResponse listApplicationKeysWithHttpInfo() new GenericType() {}); } + /** + * Revoke client token. + * + *

See {@link #revokeClientTokenWithHttpInfo}. + * + * @param body (required) + * @throws ApiException if fails to make API call + */ + public void revokeClientToken(ClientTokenRevokeRequest body) throws ApiException { + revokeClientTokenWithHttpInfo(body); + } + + /** + * Revoke client token. + * + *

See {@link #revokeClientTokenWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture + */ + public CompletableFuture revokeClientTokenAsync(ClientTokenRevokeRequest body) { + return revokeClientTokenWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Revoke a client token (public API key). Once revoked, the token can no longer be used to submit + * data to Datadog. + * + * @param body (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 -
404 Not Found -
429 Too Many Requests -
+ */ + public ApiResponse revokeClientTokenWithHttpInfo(ClientTokenRevokeRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "revokeClientToken"; + if (apiClient.isUnstableOperationEnabled("v1." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling revokeClientToken"); + } + // create path and map variables + String localVarPath = "/api/v1/public_api_key"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v1.KeyManagementApi.revokeClientToken", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Revoke client token. + * + *

See {@link #revokeClientTokenWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> revokeClientTokenWithHttpInfoAsync( + ClientTokenRevokeRequest body) { + // Check if unstable operation is enabled + String operationId = "revokeClientToken"; + if (apiClient.isUnstableOperationEnabled("v1." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling revokeClientToken")); + return result; + } + // create path and map variables + String localVarPath = "/api/v1/public_api_key"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v1.KeyManagementApi.revokeClientToken", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + null); + } + /** * Edit an API key. * @@ -1381,4 +1682,152 @@ public ApiResponse updateApplicationKeyWithHttpInfo( false, new GenericType() {}); } + + /** + * Update client token. + * + *

See {@link #updateClientTokenWithHttpInfo}. + * + * @param body (required) + * @return ClientToken + * @throws ApiException if fails to make API call + */ + public ClientToken updateClientToken(ClientTokenUpdateRequest body) throws ApiException { + return updateClientTokenWithHttpInfo(body).getData(); + } + + /** + * Update client token. + * + *

See {@link #updateClientTokenWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<ClientToken> + */ + public CompletableFuture updateClientTokenAsync(ClientTokenUpdateRequest body) { + return updateClientTokenWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update the name and/or origin URLs of an existing client token (public API key). + * + * @param body (required) + * @return ApiResponse<ClientToken> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
404 Not Found -
429 Too Many Requests -
+ */ + public ApiResponse updateClientTokenWithHttpInfo(ClientTokenUpdateRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateClientToken"; + if (apiClient.isUnstableOperationEnabled("v1." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateClientToken"); + } + // create path and map variables + String localVarPath = "/api/v1/public_api_key"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v1.KeyManagementApi.updateClientToken", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update client token. + * + *

See {@link #updateClientTokenWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<ClientToken>> + */ + public CompletableFuture> updateClientTokenWithHttpInfoAsync( + ClientTokenUpdateRequest body) { + // Check if unstable operation is enabled + String operationId = "updateClientToken"; + if (apiClient.isUnstableOperationEnabled("v1." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling updateClientToken")); + return result; + } + // create path and map variables + String localVarPath = "/api/v1/public_api_key"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v1.KeyManagementApi.updateClientToken", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } } diff --git a/src/main/java/com/datadog/api/client/v1/model/ClientToken.java b/src/main/java/com/datadog/api/client/v1/model/ClientToken.java new file mode 100644 index 00000000000..7d28f8d40a1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/ClientToken.java @@ -0,0 +1,375 @@ +/* + * 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.v1.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * Client token object. Client tokens (also known as public API keys) enable you to submit data from + * your browser or mobile applications to Datadog. + */ +@JsonPropertyOrder({ + ClientToken.JSON_PROPERTY_CREATED_AT, + ClientToken.JSON_PROPERTY_CREATED_BY_HANDLE, + ClientToken.JSON_PROPERTY_CREATED_BY_UUID, + ClientToken.JSON_PROPERTY_DISABLED_AT, + ClientToken.JSON_PROPERTY_DISABLED_BY, + ClientToken.JSON_PROPERTY_DISABLED_BY_HANDLE, + ClientToken.JSON_PROPERTY_HASH, + ClientToken.JSON_PROPERTY_MODIFIED_BY, + ClientToken.JSON_PROPERTY_NAME, + ClientToken.JSON_PROPERTY_ORG_ID, + ClientToken.JSON_PROPERTY_ORIGIN_URLS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ClientToken { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_CREATED_BY_HANDLE = "created_by_handle"; + private String createdByHandle; + + public static final String JSON_PROPERTY_CREATED_BY_UUID = "created_by_uuid"; + private UUID createdByUuid; + + public static final String JSON_PROPERTY_DISABLED_AT = "disabled_at"; + private JsonNullable disabledAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DISABLED_BY = "disabled_by"; + private Long disabledBy; + + public static final String JSON_PROPERTY_DISABLED_BY_HANDLE = "disabled_by_handle"; + private String disabledByHandle; + + public static final String JSON_PROPERTY_HASH = "hash"; + private String hash; + + public static final String JSON_PROPERTY_MODIFIED_BY = "modified_by"; + private Long modifiedBy; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_ORG_ID = "org_id"; + private Long orgId; + + public static final String JSON_PROPERTY_ORIGIN_URLS = "origin_urls"; + private List originUrls = new ArrayList<>(); + + public ClientToken() {} + + @JsonCreator + public ClientToken( + @JsonProperty(required = true, value = JSON_PROPERTY_ORIGIN_URLS) List originUrls) { + this.originUrls = originUrls; + } + + /** + * Creation timestamp of the client token. + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + /** + * Handle of the user who created the client token. + * + * @return createdByHandle + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY_HANDLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCreatedByHandle() { + return createdByHandle; + } + + /** + * UUID of the user who created the client token. + * + * @return createdByUuid + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getCreatedByUuid() { + return createdByUuid; + } + + /** + * Timestamp when the client token was disabled. + * + * @return disabledAt + */ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getDisabledAt() { + + if (disabledAt == null) { + disabledAt = JsonNullable.undefined(); + } + return disabledAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DISABLED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getDisabledAt_JsonNullable() { + return disabledAt; + } + + @JsonProperty(JSON_PROPERTY_DISABLED_AT) + private void setDisabledAt_JsonNullable(JsonNullable disabledAt) { + this.disabledAt = disabledAt; + } + + /** + * ID of the user who disabled the client token. + * + * @return disabledBy + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISABLED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getDisabledBy() { + return disabledBy; + } + + /** + * Handle of the user who disabled the client token. + * + * @return disabledByHandle + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISABLED_BY_HANDLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDisabledByHandle() { + return disabledByHandle; + } + + /** + * The hash value of the client token. This is the secret token value that should be used in your + * browser or mobile application. + * + * @return hash + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HASH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getHash() { + return hash; + } + + /** + * ID of the user who last modified the client token. + * + * @return modifiedBy + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getModifiedBy() { + return modifiedBy; + } + + public ClientToken name(String name) { + this.name = name; + return this; + } + + /** + * Name of the client token. + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + /** + * Organization ID associated with the client token. + * + * @return orgId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getOrgId() { + return orgId; + } + + public ClientToken originUrls(List originUrls) { + this.originUrls = originUrls; + return this; + } + + public ClientToken addOriginUrlsItem(String originUrlsItem) { + this.originUrls.add(originUrlsItem); + return this; + } + + /** + * List of allowed origin URLs for browser-based applications. Requests from URLs not in this list + * will be rejected. + * + * @return originUrls + */ + @JsonProperty(JSON_PROPERTY_ORIGIN_URLS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getOriginUrls() { + return originUrls; + } + + public void setOriginUrls(List originUrls) { + this.originUrls = originUrls; + } + + /** + * 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 ClientToken + */ + @JsonAnySetter + public ClientToken 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 ClientToken object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ClientToken clientToken = (ClientToken) o; + return Objects.equals(this.createdAt, clientToken.createdAt) + && Objects.equals(this.createdByHandle, clientToken.createdByHandle) + && Objects.equals(this.createdByUuid, clientToken.createdByUuid) + && Objects.equals(this.disabledAt, clientToken.disabledAt) + && Objects.equals(this.disabledBy, clientToken.disabledBy) + && Objects.equals(this.disabledByHandle, clientToken.disabledByHandle) + && Objects.equals(this.hash, clientToken.hash) + && Objects.equals(this.modifiedBy, clientToken.modifiedBy) + && Objects.equals(this.name, clientToken.name) + && Objects.equals(this.orgId, clientToken.orgId) + && Objects.equals(this.originUrls, clientToken.originUrls) + && Objects.equals(this.additionalProperties, clientToken.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + createdByHandle, + createdByUuid, + disabledAt, + disabledBy, + disabledByHandle, + hash, + modifiedBy, + name, + orgId, + originUrls, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ClientToken {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" createdByHandle: ").append(toIndentedString(createdByHandle)).append("\n"); + sb.append(" createdByUuid: ").append(toIndentedString(createdByUuid)).append("\n"); + sb.append(" disabledAt: ").append(toIndentedString(disabledAt)).append("\n"); + sb.append(" disabledBy: ").append(toIndentedString(disabledBy)).append("\n"); + sb.append(" disabledByHandle: ").append(toIndentedString(disabledByHandle)).append("\n"); + sb.append(" hash: ").append(toIndentedString(hash)).append("\n"); + sb.append(" modifiedBy: ").append(toIndentedString(modifiedBy)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); + sb.append(" originUrls: ").append(toIndentedString(originUrls)).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/SnapshotArray.java b/src/main/java/com/datadog/api/client/v1/model/ClientTokenCreateRequest.java similarity index 55% rename from src/main/java/com/datadog/api/client/v2/model/SnapshotArray.java rename to src/main/java/com/datadog/api/client/v1/model/ClientTokenCreateRequest.java index 4c50c075bcd..b8ac05ae3db 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SnapshotArray.java +++ b/src/main/java/com/datadog/api/client/v1/model/ClientTokenCreateRequest.java @@ -4,7 +4,7 @@ * Copyright 2019-Present Datadog, Inc. */ -package com.datadog.api.client.v2.model; +package com.datadog.api.client.v1.model; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; @@ -19,50 +19,75 @@ import java.util.Map; import java.util.Objects; -/** */ -@JsonPropertyOrder({SnapshotArray.JSON_PROPERTY_DATA}) +/** Request to create a new client token. */ +@JsonPropertyOrder({ + ClientTokenCreateRequest.JSON_PROPERTY_NAME, + ClientTokenCreateRequest.JSON_PROPERTY_ORIGIN_URLS +}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class SnapshotArray { +public class ClientTokenCreateRequest { @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_DATA = "data"; - private List data = new ArrayList<>(); + public static final String JSON_PROPERTY_NAME = "name"; + private String name; - public SnapshotArray() {} + public static final String JSON_PROPERTY_ORIGIN_URLS = "origin_urls"; + private List originUrls = new ArrayList<>(); + + public ClientTokenCreateRequest() {} @JsonCreator - public SnapshotArray( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) { - this.data = data; + public ClientTokenCreateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_ORIGIN_URLS) List originUrls) { + this.name = name; + this.originUrls = originUrls; } - public SnapshotArray data(List data) { - this.data = data; - for (SnapshotData item : data) { - this.unparsed |= item.unparsed; - } + public ClientTokenCreateRequest name(String name) { + this.name = name; + return this; + } + + /** + * Name of the client token. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public ClientTokenCreateRequest originUrls(List originUrls) { + this.originUrls = originUrls; return this; } - public SnapshotArray addDataItem(SnapshotData dataItem) { - this.data.add(dataItem); - this.unparsed |= dataItem.unparsed; + public ClientTokenCreateRequest addOriginUrlsItem(String originUrlsItem) { + this.originUrls.add(originUrlsItem); return this; } /** - * Getdata + * List of allowed origin URLs for browser-based applications. Requests from URLs not in this list + * will be rejected. * - * @return data + * @return originUrls */ - @JsonProperty(JSON_PROPERTY_DATA) + @JsonProperty(JSON_PROPERTY_ORIGIN_URLS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getData() { - return data; + public List getOriginUrls() { + return originUrls; } - public void setData(List data) { - this.data = data; + public void setOriginUrls(List originUrls) { + this.originUrls = originUrls; } /** @@ -77,10 +102,10 @@ public void setData(List data) { * * @param key The arbitrary key to set * @param value The associated value - * @return SnapshotArray + * @return ClientTokenCreateRequest */ @JsonAnySetter - public SnapshotArray putAdditionalProperty(String key, Object value) { + public ClientTokenCreateRequest putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -111,7 +136,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this SnapshotArray object is equal to o. */ + /** Return true if this ClientTokenCreateRequest object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -120,21 +145,23 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SnapshotArray snapshotArray = (SnapshotArray) o; - return Objects.equals(this.data, snapshotArray.data) - && Objects.equals(this.additionalProperties, snapshotArray.additionalProperties); + ClientTokenCreateRequest clientTokenCreateRequest = (ClientTokenCreateRequest) o; + return Objects.equals(this.name, clientTokenCreateRequest.name) + && Objects.equals(this.originUrls, clientTokenCreateRequest.originUrls) + && Objects.equals(this.additionalProperties, clientTokenCreateRequest.additionalProperties); } @Override public int hashCode() { - return Objects.hash(data, additionalProperties); + return Objects.hash(name, originUrls, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class SnapshotArray {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("class ClientTokenCreateRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" originUrls: ").append(toIndentedString(originUrls)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/Watch.java b/src/main/java/com/datadog/api/client/v1/model/ClientTokenRevokeRequest.java similarity index 69% rename from src/main/java/com/datadog/api/client/v2/model/Watch.java rename to src/main/java/com/datadog/api/client/v1/model/ClientTokenRevokeRequest.java index 2d81bf83481..7dc1b287a5d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/Watch.java +++ b/src/main/java/com/datadog/api/client/v1/model/ClientTokenRevokeRequest.java @@ -4,7 +4,7 @@ * Copyright 2019-Present Datadog, Inc. */ -package com.datadog.api.client.v2.model; +package com.datadog.api.client.v1.model; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; @@ -17,42 +17,41 @@ import java.util.Map; import java.util.Objects; -/** */ -@JsonPropertyOrder({Watch.JSON_PROPERTY_DATA}) +/** Request to revoke a client token. */ +@JsonPropertyOrder({ClientTokenRevokeRequest.JSON_PROPERTY_HASH}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class Watch { +public class ClientTokenRevokeRequest { @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_DATA = "data"; - private WatchData data; + public static final String JSON_PROPERTY_HASH = "hash"; + private String hash; - public Watch() {} + public ClientTokenRevokeRequest() {} @JsonCreator - public Watch(@JsonProperty(required = true, value = JSON_PROPERTY_DATA) WatchData data) { - this.data = data; - this.unparsed |= data.unparsed; + public ClientTokenRevokeRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_HASH) String hash) { + this.hash = hash; } - public Watch data(WatchData data) { - this.data = data; - this.unparsed |= data.unparsed; + public ClientTokenRevokeRequest hash(String hash) { + this.hash = hash; return this; } /** - * Getdata + * Hash value of the client token to revoke. * - * @return data + * @return hash */ - @JsonProperty(JSON_PROPERTY_DATA) + @JsonProperty(JSON_PROPERTY_HASH) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public WatchData getData() { - return data; + public String getHash() { + return hash; } - public void setData(WatchData data) { - this.data = data; + public void setHash(String hash) { + this.hash = hash; } /** @@ -67,10 +66,10 @@ public void setData(WatchData data) { * * @param key The arbitrary key to set * @param value The associated value - * @return Watch + * @return ClientTokenRevokeRequest */ @JsonAnySetter - public Watch putAdditionalProperty(String key, Object value) { + public ClientTokenRevokeRequest putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -101,7 +100,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this Watch object is equal to o. */ + /** Return true if this ClientTokenRevokeRequest object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -110,21 +109,21 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - Watch watch = (Watch) o; - return Objects.equals(this.data, watch.data) - && Objects.equals(this.additionalProperties, watch.additionalProperties); + ClientTokenRevokeRequest clientTokenRevokeRequest = (ClientTokenRevokeRequest) o; + return Objects.equals(this.hash, clientTokenRevokeRequest.hash) + && Objects.equals(this.additionalProperties, clientTokenRevokeRequest.additionalProperties); } @Override public int hashCode() { - return Objects.hash(data, additionalProperties); + return Objects.hash(hash, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class Watch {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("class ClientTokenRevokeRequest {\n"); + sb.append(" hash: ").append(toIndentedString(hash)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/WatchData.java b/src/main/java/com/datadog/api/client/v1/model/ClientTokenUpdateRequest.java similarity index 51% rename from src/main/java/com/datadog/api/client/v2/model/WatchData.java rename to src/main/java/com/datadog/api/client/v1/model/ClientTokenUpdateRequest.java index ac7eb13cb7d..76211908e6d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/WatchData.java +++ b/src/main/java/com/datadog/api/client/v1/model/ClientTokenUpdateRequest.java @@ -4,7 +4,7 @@ * Copyright 2019-Present Datadog, Inc. */ -package com.datadog.api.client.v2.model; +package com.datadog.api.client.v1.model; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; @@ -13,102 +13,108 @@ 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; -/** */ +/** Request to update an existing client token. */ @JsonPropertyOrder({ - WatchData.JSON_PROPERTY_ATTRIBUTES, - WatchData.JSON_PROPERTY_ID, - WatchData.JSON_PROPERTY_TYPE + ClientTokenUpdateRequest.JSON_PROPERTY_HASH, + ClientTokenUpdateRequest.JSON_PROPERTY_NAME, + ClientTokenUpdateRequest.JSON_PROPERTY_ORIGIN_URLS }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class WatchData { +public class ClientTokenUpdateRequest { @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; - private WatchDataAttributes attributes; + public static final String JSON_PROPERTY_HASH = "hash"; + private String hash; - public static final String JSON_PROPERTY_ID = "id"; - private String id; + public static final String JSON_PROPERTY_NAME = "name"; + private String name; - public static final String JSON_PROPERTY_TYPE = "type"; - private WatchDataType type = WatchDataType.RUM_REPLAY_WATCH; + public static final String JSON_PROPERTY_ORIGIN_URLS = "origin_urls"; + private List originUrls = null; - public WatchData() {} + public ClientTokenUpdateRequest() {} @JsonCreator - public WatchData(@JsonProperty(required = true, value = JSON_PROPERTY_TYPE) WatchDataType type) { - this.type = type; - this.unparsed |= !type.isValid(); + public ClientTokenUpdateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_HASH) String hash, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { + this.hash = hash; + this.name = name; } - public WatchData attributes(WatchDataAttributes attributes) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; + public ClientTokenUpdateRequest hash(String hash) { + this.hash = hash; return this; } /** - * Getattributes + * Hash value of the client token to update. * - * @return attributes + * @return hash */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WatchDataAttributes getAttributes() { - return attributes; + @JsonProperty(JSON_PROPERTY_HASH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getHash() { + return hash; } - public void setAttributes(WatchDataAttributes attributes) { - this.attributes = attributes; + public void setHash(String hash) { + this.hash = hash; } - public WatchData id(String id) { - this.id = id; + public ClientTokenUpdateRequest name(String name) { + this.name = name; return this; } /** - * Getid + * New name for the client token. * - * @return id + * @return name */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; } - public void setId(String id) { - this.id = id; + public ClientTokenUpdateRequest originUrls(List originUrls) { + this.originUrls = originUrls; + return this; } - public WatchData type(WatchDataType type) { - this.type = type; - this.unparsed |= !type.isValid(); + public ClientTokenUpdateRequest addOriginUrlsItem(String originUrlsItem) { + if (this.originUrls == null) { + this.originUrls = new ArrayList<>(); + } + this.originUrls.add(originUrlsItem); return this; } /** - * Rum replay watch resource type. + * New list of allowed origin URLs. If provided, this will replace the existing list. * - * @return type + * @return originUrls */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public WatchDataType getType() { - return type; + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORIGIN_URLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getOriginUrls() { + return originUrls; } - public void setType(WatchDataType type) { - if (!type.isValid()) { - this.unparsed = true; - } - this.type = type; + public void setOriginUrls(List originUrls) { + this.originUrls = originUrls; } /** @@ -123,10 +129,10 @@ public void setType(WatchDataType type) { * * @param key The arbitrary key to set * @param value The associated value - * @return WatchData + * @return ClientTokenUpdateRequest */ @JsonAnySetter - public WatchData putAdditionalProperty(String key, Object value) { + public ClientTokenUpdateRequest putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -157,7 +163,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this WatchData object is equal to o. */ + /** Return true if this ClientTokenUpdateRequest object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -166,25 +172,25 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - WatchData watchData = (WatchData) o; - return Objects.equals(this.attributes, watchData.attributes) - && Objects.equals(this.id, watchData.id) - && Objects.equals(this.type, watchData.type) - && Objects.equals(this.additionalProperties, watchData.additionalProperties); + ClientTokenUpdateRequest clientTokenUpdateRequest = (ClientTokenUpdateRequest) o; + return Objects.equals(this.hash, clientTokenUpdateRequest.hash) + && Objects.equals(this.name, clientTokenUpdateRequest.name) + && Objects.equals(this.originUrls, clientTokenUpdateRequest.originUrls) + && Objects.equals(this.additionalProperties, clientTokenUpdateRequest.additionalProperties); } @Override public int hashCode() { - return Objects.hash(attributes, id, type, additionalProperties); + return Objects.hash(hash, name, originUrls, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class WatchData {\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("class ClientTokenUpdateRequest {\n"); + sb.append(" hash: ").append(toIndentedString(hash)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" originUrls: ").append(toIndentedString(originUrls)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/api/KeyManagementApi.java b/src/main/java/com/datadog/api/client/v2/api/KeyManagementApi.java index 4f894589930..42a4a584190 100644 --- a/src/main/java/com/datadog/api/client/v2/api/KeyManagementApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/KeyManagementApi.java @@ -14,12 +14,19 @@ import com.datadog.api.client.v2.model.ApplicationKeyUpdateRequest; import com.datadog.api.client.v2.model.ApplicationKeysSort; import com.datadog.api.client.v2.model.ListApplicationKeysResponse; +import com.datadog.api.client.v2.model.PersonalAccessTokenCreateRequest; +import com.datadog.api.client.v2.model.PersonalAccessTokenGetResponse; +import com.datadog.api.client.v2.model.PersonalAccessTokenResponse; +import com.datadog.api.client.v2.model.PersonalAccessTokenUpdateRequest; +import com.datadog.api.client.v2.model.PersonalAccessTokensListResponse; +import com.datadog.api.client.v2.model.PersonalAccessTokensSort; 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( @@ -319,6 +326,161 @@ public ApiResponse createCurrentUserApplicationKeyWithHt new GenericType() {}); } + /** + * Create personal access token. + * + *

See {@link #createPersonalAccessTokenWithHttpInfo}. + * + * @param body (required) + * @return PersonalAccessTokenResponse + * @throws ApiException if fails to make API call + */ + public PersonalAccessTokenResponse createPersonalAccessToken( + PersonalAccessTokenCreateRequest body) throws ApiException { + return createPersonalAccessTokenWithHttpInfo(body).getData(); + } + + /** + * Create personal access token. + * + *

See {@link #createPersonalAccessTokenWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<PersonalAccessTokenResponse> + */ + public CompletableFuture createPersonalAccessTokenAsync( + PersonalAccessTokenCreateRequest body) { + return createPersonalAccessTokenWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create a new personal access token with fine-grained permissions. The token value will be + * returned in the response and cannot be retrieved later. Be sure to save it securely. + * + * @param body (required) + * @return ApiResponse<PersonalAccessTokenResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found - Personal access tokens feature is not enabled -
429 Too many requests -
+ */ + public ApiResponse createPersonalAccessTokenWithHttpInfo( + PersonalAccessTokenCreateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "createPersonalAccessToken"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createPersonalAccessToken"); + } + // create path and map variables + String localVarPath = "/api/v2/personal_access_tokens"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.KeyManagementApi.createPersonalAccessToken", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create personal access token. + * + *

See {@link #createPersonalAccessTokenWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<PersonalAccessTokenResponse>> + */ + public CompletableFuture> + createPersonalAccessTokenWithHttpInfoAsync(PersonalAccessTokenCreateRequest body) { + // Check if unstable operation is enabled + String operationId = "createPersonalAccessToken"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling createPersonalAccessToken")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/personal_access_tokens"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.KeyManagementApi.createPersonalAccessToken", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Delete an API key. * @@ -1256,6 +1418,162 @@ public ApiResponse getCurrentUserApplicationKeyWithHttpI new GenericType() {}); } + /** + * Get personal access token. + * + *

See {@link #getPersonalAccessTokenWithHttpInfo}. + * + * @param patUuid The UUID of the personal access token. (required) + * @return PersonalAccessTokenGetResponse + * @throws ApiException if fails to make API call + */ + public PersonalAccessTokenGetResponse getPersonalAccessToken(UUID patUuid) throws ApiException { + return getPersonalAccessTokenWithHttpInfo(patUuid).getData(); + } + + /** + * Get personal access token. + * + *

See {@link #getPersonalAccessTokenWithHttpInfoAsync}. + * + * @param patUuid The UUID of the personal access token. (required) + * @return CompletableFuture<PersonalAccessTokenGetResponse> + */ + public CompletableFuture getPersonalAccessTokenAsync( + UUID patUuid) { + return getPersonalAccessTokenWithHttpInfoAsync(patUuid) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a specific personal access token by UUID. + * + * @param patUuid The UUID of the personal access token. (required) + * @return ApiResponse<PersonalAccessTokenGetResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getPersonalAccessTokenWithHttpInfo( + UUID patUuid) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getPersonalAccessToken"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'patUuid' is set + if (patUuid == null) { + throw new ApiException( + 400, "Missing the required parameter 'patUuid' when calling getPersonalAccessToken"); + } + // create path and map variables + String localVarPath = + "/api/v2/personal_access_tokens/{pat_uuid}" + .replaceAll("\\{" + "pat_uuid" + "\\}", apiClient.escapeString(patUuid.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.KeyManagementApi.getPersonalAccessToken", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get personal access token. + * + *

See {@link #getPersonalAccessTokenWithHttpInfo}. + * + * @param patUuid The UUID of the personal access token. (required) + * @return CompletableFuture<ApiResponse<PersonalAccessTokenGetResponse>> + */ + public CompletableFuture> + getPersonalAccessTokenWithHttpInfoAsync(UUID patUuid) { + // Check if unstable operation is enabled + String operationId = "getPersonalAccessToken"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'patUuid' is set + if (patUuid == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'patUuid' when calling getPersonalAccessToken")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/personal_access_tokens/{pat_uuid}" + .replaceAll("\\{" + "pat_uuid" + "\\}", apiClient.escapeString(patUuid.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.KeyManagementApi.getPersonalAccessToken", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** Manage optional parameters to listAPIKeys. */ public static class ListAPIKeysOptionalParameters { private Long pageSize; @@ -2167,45 +2485,459 @@ public ApiResponse listCurrentUserApplicationKeysWi new GenericType() {}); } - /** - * Edit an API key. - * - *

See {@link #updateAPIKeyWithHttpInfo}. - * - * @param apiKeyId The ID of the API key. (required) - * @param body (required) - * @return APIKeyResponse - * @throws ApiException if fails to make API call - */ - public APIKeyResponse updateAPIKey(String apiKeyId, APIKeyUpdateRequest body) - throws ApiException { - return updateAPIKeyWithHttpInfo(apiKeyId, body).getData(); - } + /** Manage optional parameters to listPersonalAccessTokens. */ + public static class ListPersonalAccessTokensOptionalParameters { + private Long pageSize; + private Long pageNumber; + private PersonalAccessTokensSort sort; + private String filter; + private List filterOwnerUuid; - /** - * Edit an API key. - * - *

See {@link #updateAPIKeyWithHttpInfoAsync}. - * - * @param apiKeyId The ID of the API key. (required) - * @param body (required) - * @return CompletableFuture<APIKeyResponse> - */ - public CompletableFuture updateAPIKeyAsync( - String apiKeyId, APIKeyUpdateRequest body) { - return updateAPIKeyWithHttpInfoAsync(apiKeyId, body) - .thenApply( - response -> { - return response.getData(); - }); - } + /** + * Set pageSize. + * + * @param pageSize Size for a given page. The maximum allowed value is 100. (optional, default + * to 10) + * @return ListPersonalAccessTokensOptionalParameters + */ + public ListPersonalAccessTokensOptionalParameters pageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } - /** - * Update an API key. - * - * @param apiKeyId The ID of the API key. (required) - * @param body (required) - * @return ApiResponse<APIKeyResponse> + /** + * Set pageNumber. + * + * @param pageNumber Specific page number to return. (optional, default to 0) + * @return ListPersonalAccessTokensOptionalParameters + */ + public ListPersonalAccessTokensOptionalParameters pageNumber(Long pageNumber) { + this.pageNumber = pageNumber; + return this; + } + + /** + * Set sort. + * + * @param sort Personal access token attribute used to sort results. Sort order is ascending by + * default. In order to specify a descending sort, prefix the attribute with a minus sign. + * (optional, default to "name") + * @return ListPersonalAccessTokensOptionalParameters + */ + public ListPersonalAccessTokensOptionalParameters sort(PersonalAccessTokensSort sort) { + this.sort = sort; + return this; + } + + /** + * Set filter. + * + * @param filter Filter personal access tokens by name. (optional) + * @return ListPersonalAccessTokensOptionalParameters + */ + public ListPersonalAccessTokensOptionalParameters filter(String filter) { + this.filter = filter; + return this; + } + + /** + * Set filterOwnerUuid. + * + * @param filterOwnerUuid Filter personal access tokens by owner UUID. (optional) + * @return ListPersonalAccessTokensOptionalParameters + */ + public ListPersonalAccessTokensOptionalParameters filterOwnerUuid(List filterOwnerUuid) { + this.filterOwnerUuid = filterOwnerUuid; + return this; + } + } + + /** + * List personal access tokens. + * + *

See {@link #listPersonalAccessTokensWithHttpInfo}. + * + * @return PersonalAccessTokensListResponse + * @throws ApiException if fails to make API call + */ + public PersonalAccessTokensListResponse listPersonalAccessTokens() throws ApiException { + return listPersonalAccessTokensWithHttpInfo(new ListPersonalAccessTokensOptionalParameters()) + .getData(); + } + + /** + * List personal access tokens. + * + *

See {@link #listPersonalAccessTokensWithHttpInfoAsync}. + * + * @return CompletableFuture<PersonalAccessTokensListResponse> + */ + public CompletableFuture listPersonalAccessTokensAsync() { + return listPersonalAccessTokensWithHttpInfoAsync( + new ListPersonalAccessTokensOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List personal access tokens. + * + *

See {@link #listPersonalAccessTokensWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return PersonalAccessTokensListResponse + * @throws ApiException if fails to make API call + */ + public PersonalAccessTokensListResponse listPersonalAccessTokens( + ListPersonalAccessTokensOptionalParameters parameters) throws ApiException { + return listPersonalAccessTokensWithHttpInfo(parameters).getData(); + } + + /** + * List personal access tokens. + * + *

See {@link #listPersonalAccessTokensWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<PersonalAccessTokensListResponse> + */ + public CompletableFuture listPersonalAccessTokensAsync( + ListPersonalAccessTokensOptionalParameters parameters) { + return listPersonalAccessTokensWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all personal access tokens in your organization. Supports filtering, pagination, and + * sorting. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<PersonalAccessTokensListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found - Personal access tokens feature is not enabled -
429 Too many requests -
+ */ + public ApiResponse listPersonalAccessTokensWithHttpInfo( + ListPersonalAccessTokensOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listPersonalAccessTokens"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; + PersonalAccessTokensSort sort = parameters.sort; + String filter = parameters.filter; + List filterOwnerUuid = parameters.filterOwnerUuid; + // create path and map variables + String localVarPath = "/api/v2/personal_access_tokens"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[owner_uuid]", filterOwnerUuid)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.KeyManagementApi.listPersonalAccessTokens", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List personal access tokens. + * + *

See {@link #listPersonalAccessTokensWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<PersonalAccessTokensListResponse>> + */ + public CompletableFuture> + listPersonalAccessTokensWithHttpInfoAsync( + ListPersonalAccessTokensOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listPersonalAccessTokens"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; + PersonalAccessTokensSort sort = parameters.sort; + String filter = parameters.filter; + List filterOwnerUuid = parameters.filterOwnerUuid; + // create path and map variables + String localVarPath = "/api/v2/personal_access_tokens"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[owner_uuid]", filterOwnerUuid)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.KeyManagementApi.listPersonalAccessTokens", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Revoke personal access token. + * + *

See {@link #revokePersonalAccessTokenWithHttpInfo}. + * + * @param patUuid The UUID of the personal access token. (required) + * @throws ApiException if fails to make API call + */ + public void revokePersonalAccessToken(UUID patUuid) throws ApiException { + revokePersonalAccessTokenWithHttpInfo(patUuid); + } + + /** + * Revoke personal access token. + * + *

See {@link #revokePersonalAccessTokenWithHttpInfoAsync}. + * + * @param patUuid The UUID of the personal access token. (required) + * @return CompletableFuture + */ + public CompletableFuture revokePersonalAccessTokenAsync(UUID patUuid) { + return revokePersonalAccessTokenWithHttpInfoAsync(patUuid) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Revoke a personal access token. Once revoked, the token can no longer be used to authenticate + * API requests. + * + * @param patUuid The UUID of the personal access token. (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 -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse revokePersonalAccessTokenWithHttpInfo(UUID patUuid) throws ApiException { + // Check if unstable operation is enabled + String operationId = "revokePersonalAccessToken"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'patUuid' is set + if (patUuid == null) { + throw new ApiException( + 400, "Missing the required parameter 'patUuid' when calling revokePersonalAccessToken"); + } + // create path and map variables + String localVarPath = + "/api/v2/personal_access_tokens/{pat_uuid}" + .replaceAll("\\{" + "pat_uuid" + "\\}", apiClient.escapeString(patUuid.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.KeyManagementApi.revokePersonalAccessToken", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Revoke personal access token. + * + *

See {@link #revokePersonalAccessTokenWithHttpInfo}. + * + * @param patUuid The UUID of the personal access token. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> revokePersonalAccessTokenWithHttpInfoAsync( + UUID patUuid) { + // Check if unstable operation is enabled + String operationId = "revokePersonalAccessToken"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'patUuid' is set + if (patUuid == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'patUuid' when calling revokePersonalAccessToken")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/personal_access_tokens/{pat_uuid}" + .replaceAll("\\{" + "pat_uuid" + "\\}", apiClient.escapeString(patUuid.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.KeyManagementApi.revokePersonalAccessToken", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } 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); + } + + /** + * Edit an API key. + * + *

See {@link #updateAPIKeyWithHttpInfo}. + * + * @param apiKeyId The ID of the API key. (required) + * @param body (required) + * @return APIKeyResponse + * @throws ApiException if fails to make API call + */ + public APIKeyResponse updateAPIKey(String apiKeyId, APIKeyUpdateRequest body) + throws ApiException { + return updateAPIKeyWithHttpInfo(apiKeyId, body).getData(); + } + + /** + * Edit an API key. + * + *

See {@link #updateAPIKeyWithHttpInfoAsync}. + * + * @param apiKeyId The ID of the API key. (required) + * @param body (required) + * @return CompletableFuture<APIKeyResponse> + */ + public CompletableFuture updateAPIKeyAsync( + String apiKeyId, APIKeyUpdateRequest body) { + return updateAPIKeyWithHttpInfoAsync(apiKeyId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update an API key. + * + * @param apiKeyId The ID of the API key. (required) + * @param body (required) + * @return ApiResponse<APIKeyResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -2646,4 +3378,185 @@ public ApiResponse updateCurrentUserApplicationKeyWithHt false, new GenericType() {}); } + + /** + * Update personal access token. + * + *

See {@link #updatePersonalAccessTokenWithHttpInfo}. + * + * @param patUuid The UUID of the personal access token. (required) + * @param body (required) + * @return PersonalAccessTokenGetResponse + * @throws ApiException if fails to make API call + */ + public PersonalAccessTokenGetResponse updatePersonalAccessToken( + UUID patUuid, PersonalAccessTokenUpdateRequest body) throws ApiException { + return updatePersonalAccessTokenWithHttpInfo(patUuid, body).getData(); + } + + /** + * Update personal access token. + * + *

See {@link #updatePersonalAccessTokenWithHttpInfoAsync}. + * + * @param patUuid The UUID of the personal access token. (required) + * @param body (required) + * @return CompletableFuture<PersonalAccessTokenGetResponse> + */ + public CompletableFuture updatePersonalAccessTokenAsync( + UUID patUuid, PersonalAccessTokenUpdateRequest body) { + return updatePersonalAccessTokenWithHttpInfoAsync(patUuid, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update the name and/or scopes of an existing personal access token. The ID in the request body + * must match the UUID in the path. + * + * @param patUuid The UUID of the personal access token. (required) + * @param body (required) + * @return ApiResponse<PersonalAccessTokenGetResponse> + * @throws ApiException if fails to make API call + * @http.response.details + *

+ * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse updatePersonalAccessTokenWithHttpInfo( + UUID patUuid, PersonalAccessTokenUpdateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "updatePersonalAccessToken"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'patUuid' is set + if (patUuid == null) { + throw new ApiException( + 400, "Missing the required parameter 'patUuid' when calling updatePersonalAccessToken"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updatePersonalAccessToken"); + } + // create path and map variables + String localVarPath = + "/api/v2/personal_access_tokens/{pat_uuid}" + .replaceAll("\\{" + "pat_uuid" + "\\}", apiClient.escapeString(patUuid.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.KeyManagementApi.updatePersonalAccessToken", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update personal access token. + * + *

See {@link #updatePersonalAccessTokenWithHttpInfo}. + * + * @param patUuid The UUID of the personal access token. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<PersonalAccessTokenGetResponse>> + */ + public CompletableFuture> + updatePersonalAccessTokenWithHttpInfoAsync( + UUID patUuid, PersonalAccessTokenUpdateRequest body) { + // Check if unstable operation is enabled + String operationId = "updatePersonalAccessToken"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'patUuid' is set + if (patUuid == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'patUuid' when calling updatePersonalAccessToken")); + 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 updatePersonalAccessToken")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/personal_access_tokens/{pat_uuid}" + .replaceAll("\\{" + "pat_uuid" + "\\}", apiClient.escapeString(patUuid.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.KeyManagementApi.updatePersonalAccessToken", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } } diff --git a/src/main/java/com/datadog/api/client/v2/api/RumReplayHeatmapsApi.java b/src/main/java/com/datadog/api/client/v2/api/RumReplayHeatmapsApi.java deleted file mode 100644 index ff626f38a0b..00000000000 --- a/src/main/java/com/datadog/api/client/v2/api/RumReplayHeatmapsApi.java +++ /dev/null @@ -1,712 +0,0 @@ -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.Snapshot; -import com.datadog.api.client.v2.model.SnapshotArray; -import com.datadog.api.client.v2.model.SnapshotCreateRequest; -import com.datadog.api.client.v2.model.SnapshotUpdateRequest; -import jakarta.ws.rs.client.Invocation; -import jakarta.ws.rs.core.GenericType; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.CompletableFuture; - -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class RumReplayHeatmapsApi { - private ApiClient apiClient; - - public RumReplayHeatmapsApi() { - this(ApiClient.getDefaultApiClient()); - } - - public RumReplayHeatmapsApi(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 replay heatmap snapshot. - * - *

See {@link #createReplayHeatmapSnapshotWithHttpInfo}. - * - * @param body (required) - * @return Snapshot - * @throws ApiException if fails to make API call - */ - public Snapshot createReplayHeatmapSnapshot(SnapshotCreateRequest body) throws ApiException { - return createReplayHeatmapSnapshotWithHttpInfo(body).getData(); - } - - /** - * Create replay heatmap snapshot. - * - *

See {@link #createReplayHeatmapSnapshotWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<Snapshot> - */ - public CompletableFuture createReplayHeatmapSnapshotAsync(SnapshotCreateRequest body) { - return createReplayHeatmapSnapshotWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Create a heatmap snapshot. - * - * @param body (required) - * @return ApiResponse<Snapshot> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - *
Response details
Status Code Description Response Headers
201 Created -
429 Too many requests -
- */ - public ApiResponse createReplayHeatmapSnapshotWithHttpInfo(SnapshotCreateRequest 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 createReplayHeatmapSnapshot"); - } - // create path and map variables - String localVarPath = "/api/v2/replay/heatmap/snapshots"; - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RumReplayHeatmapsApi.createReplayHeatmapSnapshot", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * Create replay heatmap snapshot. - * - *

See {@link #createReplayHeatmapSnapshotWithHttpInfo}. - * - * @param body (required) - * @return CompletableFuture<ApiResponse<Snapshot>> - */ - public CompletableFuture> createReplayHeatmapSnapshotWithHttpInfoAsync( - SnapshotCreateRequest 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 createReplayHeatmapSnapshot")); - return result; - } - // create path and map variables - String localVarPath = "/api/v2/replay/heatmap/snapshots"; - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.RumReplayHeatmapsApi.createReplayHeatmapSnapshot", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * Delete replay heatmap snapshot. - * - *

See {@link #deleteReplayHeatmapSnapshotWithHttpInfo}. - * - * @param snapshotId Unique identifier of the heatmap snapshot. (required) - * @throws ApiException if fails to make API call - */ - public void deleteReplayHeatmapSnapshot(String snapshotId) throws ApiException { - deleteReplayHeatmapSnapshotWithHttpInfo(snapshotId); - } - - /** - * Delete replay heatmap snapshot. - * - *

See {@link #deleteReplayHeatmapSnapshotWithHttpInfoAsync}. - * - * @param snapshotId Unique identifier of the heatmap snapshot. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteReplayHeatmapSnapshotAsync(String snapshotId) { - return deleteReplayHeatmapSnapshotWithHttpInfoAsync(snapshotId) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Delete a heatmap snapshot. - * - * @param snapshotId Unique identifier of the heatmap snapshot. (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 -
429 Too many requests -
- */ - public ApiResponse deleteReplayHeatmapSnapshotWithHttpInfo(String snapshotId) - throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'snapshotId' is set - if (snapshotId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'snapshotId' when calling deleteReplayHeatmapSnapshot"); - } - // create path and map variables - String localVarPath = - "/api/v2/replay/heatmap/snapshots/{snapshot_id}" - .replaceAll( - "\\{" + "snapshot_id" + "\\}", apiClient.escapeString(snapshotId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RumReplayHeatmapsApi.deleteReplayHeatmapSnapshot", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); - } - - /** - * Delete replay heatmap snapshot. - * - *

See {@link #deleteReplayHeatmapSnapshotWithHttpInfo}. - * - * @param snapshotId Unique identifier of the heatmap snapshot. (required) - * @return CompletableFuture<ApiResponse<Void>> - */ - public CompletableFuture> deleteReplayHeatmapSnapshotWithHttpInfoAsync( - String snapshotId) { - Object localVarPostBody = null; - - // verify the required parameter 'snapshotId' is set - if (snapshotId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'snapshotId' when calling" - + " deleteReplayHeatmapSnapshot")); - return result; - } - // create path and map variables - String localVarPath = - "/api/v2/replay/heatmap/snapshots/{snapshot_id}" - .replaceAll( - "\\{" + "snapshot_id" + "\\}", apiClient.escapeString(snapshotId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.RumReplayHeatmapsApi.deleteReplayHeatmapSnapshot", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } 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); - } - - /** Manage optional parameters to listReplayHeatmapSnapshots. */ - public static class ListReplayHeatmapSnapshotsOptionalParameters { - private String filterDeviceType; - private Integer pageLimit; - private String filterApplicationId; - - /** - * Set filterDeviceType. - * - * @param filterDeviceType Device type to filter snapshots. (optional) - * @return ListReplayHeatmapSnapshotsOptionalParameters - */ - public ListReplayHeatmapSnapshotsOptionalParameters filterDeviceType(String filterDeviceType) { - this.filterDeviceType = filterDeviceType; - return this; - } - - /** - * Set pageLimit. - * - * @param pageLimit Maximum number of snapshots to return. (optional) - * @return ListReplayHeatmapSnapshotsOptionalParameters - */ - public ListReplayHeatmapSnapshotsOptionalParameters pageLimit(Integer pageLimit) { - this.pageLimit = pageLimit; - return this; - } - - /** - * Set filterApplicationId. - * - * @param filterApplicationId Filter by application ID. (optional) - * @return ListReplayHeatmapSnapshotsOptionalParameters - */ - public ListReplayHeatmapSnapshotsOptionalParameters filterApplicationId( - String filterApplicationId) { - this.filterApplicationId = filterApplicationId; - return this; - } - } - - /** - * List replay heatmap snapshots. - * - *

See {@link #listReplayHeatmapSnapshotsWithHttpInfo}. - * - * @param filterViewName View name to filter snapshots. (required) - * @return SnapshotArray - * @throws ApiException if fails to make API call - */ - public SnapshotArray listReplayHeatmapSnapshots(String filterViewName) throws ApiException { - return listReplayHeatmapSnapshotsWithHttpInfo( - filterViewName, new ListReplayHeatmapSnapshotsOptionalParameters()) - .getData(); - } - - /** - * List replay heatmap snapshots. - * - *

See {@link #listReplayHeatmapSnapshotsWithHttpInfoAsync}. - * - * @param filterViewName View name to filter snapshots. (required) - * @return CompletableFuture<SnapshotArray> - */ - public CompletableFuture listReplayHeatmapSnapshotsAsync(String filterViewName) { - return listReplayHeatmapSnapshotsWithHttpInfoAsync( - filterViewName, new ListReplayHeatmapSnapshotsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * List replay heatmap snapshots. - * - *

See {@link #listReplayHeatmapSnapshotsWithHttpInfo}. - * - * @param filterViewName View name to filter snapshots. (required) - * @param parameters Optional parameters for the request. - * @return SnapshotArray - * @throws ApiException if fails to make API call - */ - public SnapshotArray listReplayHeatmapSnapshots( - String filterViewName, ListReplayHeatmapSnapshotsOptionalParameters parameters) - throws ApiException { - return listReplayHeatmapSnapshotsWithHttpInfo(filterViewName, parameters).getData(); - } - - /** - * List replay heatmap snapshots. - * - *

See {@link #listReplayHeatmapSnapshotsWithHttpInfoAsync}. - * - * @param filterViewName View name to filter snapshots. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<SnapshotArray> - */ - public CompletableFuture listReplayHeatmapSnapshotsAsync( - String filterViewName, ListReplayHeatmapSnapshotsOptionalParameters parameters) { - return listReplayHeatmapSnapshotsWithHttpInfoAsync(filterViewName, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * List heatmap snapshots. - * - * @param filterViewName View name to filter snapshots. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<SnapshotArray> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
- */ - public ApiResponse listReplayHeatmapSnapshotsWithHttpInfo( - String filterViewName, ListReplayHeatmapSnapshotsOptionalParameters parameters) - throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'filterViewName' is set - if (filterViewName == null) { - throw new ApiException( - 400, - "Missing the required parameter 'filterViewName' when calling" - + " listReplayHeatmapSnapshots"); - } - String filterDeviceType = parameters.filterDeviceType; - Integer pageLimit = parameters.pageLimit; - String filterApplicationId = parameters.filterApplicationId; - // create path and map variables - String localVarPath = "/api/v2/replay/heatmap/snapshots"; - - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[view_name]", filterViewName)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[device_type]", filterDeviceType)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[application_id]", filterApplicationId)); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RumReplayHeatmapsApi.listReplayHeatmapSnapshots", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * List replay heatmap snapshots. - * - *

See {@link #listReplayHeatmapSnapshotsWithHttpInfo}. - * - * @param filterViewName View name to filter snapshots. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<SnapshotArray>> - */ - public CompletableFuture> listReplayHeatmapSnapshotsWithHttpInfoAsync( - String filterViewName, ListReplayHeatmapSnapshotsOptionalParameters parameters) { - Object localVarPostBody = null; - - // verify the required parameter 'filterViewName' is set - if (filterViewName == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'filterViewName' when calling" - + " listReplayHeatmapSnapshots")); - return result; - } - String filterDeviceType = parameters.filterDeviceType; - Integer pageLimit = parameters.pageLimit; - String filterApplicationId = parameters.filterApplicationId; - // create path and map variables - String localVarPath = "/api/v2/replay/heatmap/snapshots"; - - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[view_name]", filterViewName)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[device_type]", filterDeviceType)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[application_id]", filterApplicationId)); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.RumReplayHeatmapsApi.listReplayHeatmapSnapshots", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * Update replay heatmap snapshot. - * - *

See {@link #updateReplayHeatmapSnapshotWithHttpInfo}. - * - * @param snapshotId Unique identifier of the heatmap snapshot. (required) - * @param body (required) - * @return Snapshot - * @throws ApiException if fails to make API call - */ - public Snapshot updateReplayHeatmapSnapshot(String snapshotId, SnapshotUpdateRequest body) - throws ApiException { - return updateReplayHeatmapSnapshotWithHttpInfo(snapshotId, body).getData(); - } - - /** - * Update replay heatmap snapshot. - * - *

See {@link #updateReplayHeatmapSnapshotWithHttpInfoAsync}. - * - * @param snapshotId Unique identifier of the heatmap snapshot. (required) - * @param body (required) - * @return CompletableFuture<Snapshot> - */ - public CompletableFuture updateReplayHeatmapSnapshotAsync( - String snapshotId, SnapshotUpdateRequest body) { - return updateReplayHeatmapSnapshotWithHttpInfoAsync(snapshotId, body) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Update a heatmap snapshot. - * - * @param snapshotId Unique identifier of the heatmap snapshot. (required) - * @param body (required) - * @return ApiResponse<Snapshot> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
- */ - public ApiResponse updateReplayHeatmapSnapshotWithHttpInfo( - String snapshotId, SnapshotUpdateRequest body) throws ApiException { - Object localVarPostBody = body; - - // verify the required parameter 'snapshotId' is set - if (snapshotId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'snapshotId' when calling updateReplayHeatmapSnapshot"); - } - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateReplayHeatmapSnapshot"); - } - // create path and map variables - String localVarPath = - "/api/v2/replay/heatmap/snapshots/{snapshot_id}" - .replaceAll( - "\\{" + "snapshot_id" + "\\}", apiClient.escapeString(snapshotId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RumReplayHeatmapsApi.updateReplayHeatmapSnapshot", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * Update replay heatmap snapshot. - * - *

See {@link #updateReplayHeatmapSnapshotWithHttpInfo}. - * - * @param snapshotId Unique identifier of the heatmap snapshot. (required) - * @param body (required) - * @return CompletableFuture<ApiResponse<Snapshot>> - */ - public CompletableFuture> updateReplayHeatmapSnapshotWithHttpInfoAsync( - String snapshotId, SnapshotUpdateRequest body) { - Object localVarPostBody = body; - - // verify the required parameter 'snapshotId' is set - if (snapshotId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'snapshotId' when calling" - + " updateReplayHeatmapSnapshot")); - 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 updateReplayHeatmapSnapshot")); - return result; - } - // create path and map variables - String localVarPath = - "/api/v2/replay/heatmap/snapshots/{snapshot_id}" - .replaceAll( - "\\{" + "snapshot_id" + "\\}", apiClient.escapeString(snapshotId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.RumReplayHeatmapsApi.updateReplayHeatmapSnapshot", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/api/RumReplayPlaylistsApi.java b/src/main/java/com/datadog/api/client/v2/api/RumReplayPlaylistsApi.java deleted file mode 100644 index 55d5cdf9e68..00000000000 --- a/src/main/java/com/datadog/api/client/v2/api/RumReplayPlaylistsApi.java +++ /dev/null @@ -1,1644 +0,0 @@ -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.Playlist; -import com.datadog.api.client.v2.model.PlaylistArray; -import com.datadog.api.client.v2.model.PlaylistsSession; -import com.datadog.api.client.v2.model.PlaylistsSessionArray; -import com.datadog.api.client.v2.model.SessionIdArray; -import jakarta.ws.rs.client.Invocation; -import jakarta.ws.rs.core.GenericType; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.CompletableFuture; - -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class RumReplayPlaylistsApi { - private ApiClient apiClient; - - public RumReplayPlaylistsApi() { - this(ApiClient.getDefaultApiClient()); - } - - public RumReplayPlaylistsApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Get the API client. - * - * @return API client - */ - public ApiClient getApiClient() { - return apiClient; - } - - /** - * Set the API client. - * - * @param apiClient an instance of API client - */ - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** Manage optional parameters to addRumReplaySessionToPlaylist. */ - public static class AddRumReplaySessionToPlaylistOptionalParameters { - private String dataSource; - - /** - * Set dataSource. - * - * @param dataSource Data source type. Valid values: 'rum' or 'product_analytics'. Defaults to - * 'rum'. (optional) - * @return AddRumReplaySessionToPlaylistOptionalParameters - */ - public AddRumReplaySessionToPlaylistOptionalParameters dataSource(String dataSource) { - this.dataSource = dataSource; - return this; - } - } - - /** - * Add rum replay session to playlist. - * - *

See {@link #addRumReplaySessionToPlaylistWithHttpInfo}. - * - * @param ts Server-side timestamp in milliseconds. (required) - * @param playlistId Unique identifier of the playlist. (required) - * @param sessionId Unique identifier of the session. (required) - * @return PlaylistsSession - * @throws ApiException if fails to make API call - */ - public PlaylistsSession addRumReplaySessionToPlaylist( - Long ts, Integer playlistId, String sessionId) throws ApiException { - return addRumReplaySessionToPlaylistWithHttpInfo( - ts, playlistId, sessionId, new AddRumReplaySessionToPlaylistOptionalParameters()) - .getData(); - } - - /** - * Add rum replay session to playlist. - * - *

See {@link #addRumReplaySessionToPlaylistWithHttpInfoAsync}. - * - * @param ts Server-side timestamp in milliseconds. (required) - * @param playlistId Unique identifier of the playlist. (required) - * @param sessionId Unique identifier of the session. (required) - * @return CompletableFuture<PlaylistsSession> - */ - public CompletableFuture addRumReplaySessionToPlaylistAsync( - Long ts, Integer playlistId, String sessionId) { - return addRumReplaySessionToPlaylistWithHttpInfoAsync( - ts, playlistId, sessionId, new AddRumReplaySessionToPlaylistOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Add rum replay session to playlist. - * - *

See {@link #addRumReplaySessionToPlaylistWithHttpInfo}. - * - * @param ts Server-side timestamp in milliseconds. (required) - * @param playlistId Unique identifier of the playlist. (required) - * @param sessionId Unique identifier of the session. (required) - * @param parameters Optional parameters for the request. - * @return PlaylistsSession - * @throws ApiException if fails to make API call - */ - public PlaylistsSession addRumReplaySessionToPlaylist( - Long ts, - Integer playlistId, - String sessionId, - AddRumReplaySessionToPlaylistOptionalParameters parameters) - throws ApiException { - return addRumReplaySessionToPlaylistWithHttpInfo(ts, playlistId, sessionId, parameters) - .getData(); - } - - /** - * Add rum replay session to playlist. - * - *

See {@link #addRumReplaySessionToPlaylistWithHttpInfoAsync}. - * - * @param ts Server-side timestamp in milliseconds. (required) - * @param playlistId Unique identifier of the playlist. (required) - * @param sessionId Unique identifier of the session. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<PlaylistsSession> - */ - public CompletableFuture addRumReplaySessionToPlaylistAsync( - Long ts, - Integer playlistId, - String sessionId, - AddRumReplaySessionToPlaylistOptionalParameters parameters) { - return addRumReplaySessionToPlaylistWithHttpInfoAsync(ts, playlistId, sessionId, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Add a session to a playlist. - * - * @param ts Server-side timestamp in milliseconds. (required) - * @param playlistId Unique identifier of the playlist. (required) - * @param sessionId Unique identifier of the session. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<PlaylistsSession> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - * - *
Response details
Status Code Description Response Headers
200 OK -
201 Created -
429 Too many requests -
- */ - public ApiResponse addRumReplaySessionToPlaylistWithHttpInfo( - Long ts, - Integer playlistId, - String sessionId, - AddRumReplaySessionToPlaylistOptionalParameters parameters) - throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'ts' is set - if (ts == null) { - throw new ApiException( - 400, "Missing the required parameter 'ts' when calling addRumReplaySessionToPlaylist"); - } - - // verify the required parameter 'playlistId' is set - if (playlistId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'playlistId' when calling addRumReplaySessionToPlaylist"); - } - - // verify the required parameter 'sessionId' is set - if (sessionId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'sessionId' when calling addRumReplaySessionToPlaylist"); - } - String dataSource = parameters.dataSource; - // create path and map variables - String localVarPath = - "/api/v2/rum/replay/playlists/{playlist_id}/sessions/{session_id}" - .replaceAll( - "\\{" + "playlist_id" + "\\}", apiClient.escapeString(playlistId.toString())) - .replaceAll("\\{" + "session_id" + "\\}", apiClient.escapeString(sessionId.toString())); - - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "ts", ts)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "data_source", dataSource)); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RumReplayPlaylistsApi.addRumReplaySessionToPlaylist", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * Add rum replay session to playlist. - * - *

See {@link #addRumReplaySessionToPlaylistWithHttpInfo}. - * - * @param ts Server-side timestamp in milliseconds. (required) - * @param playlistId Unique identifier of the playlist. (required) - * @param sessionId Unique identifier of the session. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<PlaylistsSession>> - */ - public CompletableFuture> - addRumReplaySessionToPlaylistWithHttpInfoAsync( - Long ts, - Integer playlistId, - String sessionId, - AddRumReplaySessionToPlaylistOptionalParameters parameters) { - Object localVarPostBody = null; - - // verify the required parameter 'ts' is set - if (ts == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'ts' when calling addRumReplaySessionToPlaylist")); - return result; - } - - // verify the required parameter 'playlistId' is set - if (playlistId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'playlistId' when calling" - + " addRumReplaySessionToPlaylist")); - return result; - } - - // verify the required parameter 'sessionId' is set - if (sessionId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'sessionId' when calling" - + " addRumReplaySessionToPlaylist")); - return result; - } - String dataSource = parameters.dataSource; - // create path and map variables - String localVarPath = - "/api/v2/rum/replay/playlists/{playlist_id}/sessions/{session_id}" - .replaceAll( - "\\{" + "playlist_id" + "\\}", apiClient.escapeString(playlistId.toString())) - .replaceAll("\\{" + "session_id" + "\\}", apiClient.escapeString(sessionId.toString())); - - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "ts", ts)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "data_source", dataSource)); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.RumReplayPlaylistsApi.addRumReplaySessionToPlaylist", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "PUT", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * Bulk remove rum replay playlist sessions. - * - *

See {@link #bulkRemoveRumReplayPlaylistSessionsWithHttpInfo}. - * - * @param playlistId Unique identifier of the playlist. (required) - * @param body (required) - * @throws ApiException if fails to make API call - */ - public void bulkRemoveRumReplayPlaylistSessions(Integer playlistId, SessionIdArray body) - throws ApiException { - bulkRemoveRumReplayPlaylistSessionsWithHttpInfo(playlistId, body); - } - - /** - * Bulk remove rum replay playlist sessions. - * - *

See {@link #bulkRemoveRumReplayPlaylistSessionsWithHttpInfoAsync}. - * - * @param playlistId Unique identifier of the playlist. (required) - * @param body (required) - * @return CompletableFuture - */ - public CompletableFuture bulkRemoveRumReplayPlaylistSessionsAsync( - Integer playlistId, SessionIdArray body) { - return bulkRemoveRumReplayPlaylistSessionsWithHttpInfoAsync(playlistId, body) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Remove sessions from a playlist. - * - * @param playlistId Unique identifier of the playlist. (required) - * @param body (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 -
429 Too many requests -
- */ - public ApiResponse bulkRemoveRumReplayPlaylistSessionsWithHttpInfo( - Integer playlistId, SessionIdArray body) throws ApiException { - Object localVarPostBody = body; - - // verify the required parameter 'playlistId' is set - if (playlistId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'playlistId' when calling" - + " bulkRemoveRumReplayPlaylistSessions"); - } - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException( - 400, - "Missing the required parameter 'body' when calling bulkRemoveRumReplayPlaylistSessions"); - } - // create path and map variables - String localVarPath = - "/api/v2/rum/replay/playlists/{playlist_id}/sessions" - .replaceAll( - "\\{" + "playlist_id" + "\\}", apiClient.escapeString(playlistId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RumReplayPlaylistsApi.bulkRemoveRumReplayPlaylistSessions", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - null); - } - - /** - * Bulk remove rum replay playlist sessions. - * - *

See {@link #bulkRemoveRumReplayPlaylistSessionsWithHttpInfo}. - * - * @param playlistId Unique identifier of the playlist. (required) - * @param body (required) - * @return CompletableFuture<ApiResponse<Void>> - */ - public CompletableFuture> bulkRemoveRumReplayPlaylistSessionsWithHttpInfoAsync( - Integer playlistId, SessionIdArray body) { - Object localVarPostBody = body; - - // verify the required parameter 'playlistId' is set - if (playlistId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'playlistId' when calling" - + " bulkRemoveRumReplayPlaylistSessions")); - 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" - + " bulkRemoveRumReplayPlaylistSessions")); - return result; - } - // create path and map variables - String localVarPath = - "/api/v2/rum/replay/playlists/{playlist_id}/sessions" - .replaceAll( - "\\{" + "playlist_id" + "\\}", apiClient.escapeString(playlistId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.RumReplayPlaylistsApi.bulkRemoveRumReplayPlaylistSessions", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "DELETE", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - null); - } - - /** - * Create rum replay playlist. - * - *

See {@link #createRumReplayPlaylistWithHttpInfo}. - * - * @param body (required) - * @return Playlist - * @throws ApiException if fails to make API call - */ - public Playlist createRumReplayPlaylist(Playlist body) throws ApiException { - return createRumReplayPlaylistWithHttpInfo(body).getData(); - } - - /** - * Create rum replay playlist. - * - *

See {@link #createRumReplayPlaylistWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<Playlist> - */ - public CompletableFuture createRumReplayPlaylistAsync(Playlist body) { - return createRumReplayPlaylistWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Create a playlist. - * - * @param body (required) - * @return ApiResponse<Playlist> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - *
Response details
Status Code Description Response Headers
201 Created -
429 Too many requests -
- */ - public ApiResponse createRumReplayPlaylistWithHttpInfo(Playlist 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 createRumReplayPlaylist"); - } - // create path and map variables - String localVarPath = "/api/v2/rum/replay/playlists"; - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RumReplayPlaylistsApi.createRumReplayPlaylist", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * Create rum replay playlist. - * - *

See {@link #createRumReplayPlaylistWithHttpInfo}. - * - * @param body (required) - * @return CompletableFuture<ApiResponse<Playlist>> - */ - public CompletableFuture> createRumReplayPlaylistWithHttpInfoAsync( - Playlist 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 createRumReplayPlaylist")); - return result; - } - // create path and map variables - String localVarPath = "/api/v2/rum/replay/playlists"; - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.RumReplayPlaylistsApi.createRumReplayPlaylist", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * Delete rum replay playlist. - * - *

See {@link #deleteRumReplayPlaylistWithHttpInfo}. - * - * @param playlistId Unique identifier of the playlist. (required) - * @throws ApiException if fails to make API call - */ - public void deleteRumReplayPlaylist(Integer playlistId) throws ApiException { - deleteRumReplayPlaylistWithHttpInfo(playlistId); - } - - /** - * Delete rum replay playlist. - * - *

See {@link #deleteRumReplayPlaylistWithHttpInfoAsync}. - * - * @param playlistId Unique identifier of the playlist. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteRumReplayPlaylistAsync(Integer playlistId) { - return deleteRumReplayPlaylistWithHttpInfoAsync(playlistId) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Delete a playlist. - * - * @param playlistId Unique identifier of the playlist. (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 -
429 Too many requests -
- */ - public ApiResponse deleteRumReplayPlaylistWithHttpInfo(Integer playlistId) - throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'playlistId' is set - if (playlistId == null) { - throw new ApiException( - 400, "Missing the required parameter 'playlistId' when calling deleteRumReplayPlaylist"); - } - // create path and map variables - String localVarPath = - "/api/v2/rum/replay/playlists/{playlist_id}" - .replaceAll( - "\\{" + "playlist_id" + "\\}", apiClient.escapeString(playlistId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RumReplayPlaylistsApi.deleteRumReplayPlaylist", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); - } - - /** - * Delete rum replay playlist. - * - *

See {@link #deleteRumReplayPlaylistWithHttpInfo}. - * - * @param playlistId Unique identifier of the playlist. (required) - * @return CompletableFuture<ApiResponse<Void>> - */ - public CompletableFuture> deleteRumReplayPlaylistWithHttpInfoAsync( - Integer playlistId) { - Object localVarPostBody = null; - - // verify the required parameter 'playlistId' is set - if (playlistId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'playlistId' when calling deleteRumReplayPlaylist")); - return result; - } - // create path and map variables - String localVarPath = - "/api/v2/rum/replay/playlists/{playlist_id}" - .replaceAll( - "\\{" + "playlist_id" + "\\}", apiClient.escapeString(playlistId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.RumReplayPlaylistsApi.deleteRumReplayPlaylist", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } 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 rum replay playlist. - * - *

See {@link #getRumReplayPlaylistWithHttpInfo}. - * - * @param playlistId Unique identifier of the playlist. (required) - * @return Playlist - * @throws ApiException if fails to make API call - */ - public Playlist getRumReplayPlaylist(Integer playlistId) throws ApiException { - return getRumReplayPlaylistWithHttpInfo(playlistId).getData(); - } - - /** - * Get rum replay playlist. - * - *

See {@link #getRumReplayPlaylistWithHttpInfoAsync}. - * - * @param playlistId Unique identifier of the playlist. (required) - * @return CompletableFuture<Playlist> - */ - public CompletableFuture getRumReplayPlaylistAsync(Integer playlistId) { - return getRumReplayPlaylistWithHttpInfoAsync(playlistId) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get a playlist. - * - * @param playlistId Unique identifier of the playlist. (required) - * @return ApiResponse<Playlist> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
- */ - public ApiResponse getRumReplayPlaylistWithHttpInfo(Integer playlistId) - throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'playlistId' is set - if (playlistId == null) { - throw new ApiException( - 400, "Missing the required parameter 'playlistId' when calling getRumReplayPlaylist"); - } - // create path and map variables - String localVarPath = - "/api/v2/rum/replay/playlists/{playlist_id}" - .replaceAll( - "\\{" + "playlist_id" + "\\}", apiClient.escapeString(playlistId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RumReplayPlaylistsApi.getRumReplayPlaylist", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * Get rum replay playlist. - * - *

See {@link #getRumReplayPlaylistWithHttpInfo}. - * - * @param playlistId Unique identifier of the playlist. (required) - * @return CompletableFuture<ApiResponse<Playlist>> - */ - public CompletableFuture> getRumReplayPlaylistWithHttpInfoAsync( - Integer playlistId) { - Object localVarPostBody = null; - - // verify the required parameter 'playlistId' is set - if (playlistId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'playlistId' when calling getRumReplayPlaylist")); - return result; - } - // create path and map variables - String localVarPath = - "/api/v2/rum/replay/playlists/{playlist_id}" - .replaceAll( - "\\{" + "playlist_id" + "\\}", apiClient.escapeString(playlistId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.RumReplayPlaylistsApi.getRumReplayPlaylist", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** Manage optional parameters to listRumReplayPlaylists. */ - public static class ListRumReplayPlaylistsOptionalParameters { - private String filterCreatedByUuid; - private String filterQuery; - private Integer pageNumber; - private Integer pageSize; - - /** - * Set filterCreatedByUuid. - * - * @param filterCreatedByUuid Filter playlists by the UUID of the user who created them. - * (optional) - * @return ListRumReplayPlaylistsOptionalParameters - */ - public ListRumReplayPlaylistsOptionalParameters filterCreatedByUuid( - String filterCreatedByUuid) { - this.filterCreatedByUuid = filterCreatedByUuid; - return this; - } - - /** - * Set filterQuery. - * - * @param filterQuery Search query to filter playlists by name. (optional) - * @return ListRumReplayPlaylistsOptionalParameters - */ - public ListRumReplayPlaylistsOptionalParameters filterQuery(String filterQuery) { - this.filterQuery = filterQuery; - return this; - } - - /** - * Set pageNumber. - * - * @param pageNumber Page number for pagination (0-indexed). (optional) - * @return ListRumReplayPlaylistsOptionalParameters - */ - public ListRumReplayPlaylistsOptionalParameters pageNumber(Integer pageNumber) { - this.pageNumber = pageNumber; - return this; - } - - /** - * Set pageSize. - * - * @param pageSize Number of items per page. (optional) - * @return ListRumReplayPlaylistsOptionalParameters - */ - public ListRumReplayPlaylistsOptionalParameters pageSize(Integer pageSize) { - this.pageSize = pageSize; - return this; - } - } - - /** - * List rum replay playlists. - * - *

See {@link #listRumReplayPlaylistsWithHttpInfo}. - * - * @return PlaylistArray - * @throws ApiException if fails to make API call - */ - public PlaylistArray listRumReplayPlaylists() throws ApiException { - return listRumReplayPlaylistsWithHttpInfo(new ListRumReplayPlaylistsOptionalParameters()) - .getData(); - } - - /** - * List rum replay playlists. - * - *

See {@link #listRumReplayPlaylistsWithHttpInfoAsync}. - * - * @return CompletableFuture<PlaylistArray> - */ - public CompletableFuture listRumReplayPlaylistsAsync() { - return listRumReplayPlaylistsWithHttpInfoAsync(new ListRumReplayPlaylistsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * List rum replay playlists. - * - *

See {@link #listRumReplayPlaylistsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return PlaylistArray - * @throws ApiException if fails to make API call - */ - public PlaylistArray listRumReplayPlaylists(ListRumReplayPlaylistsOptionalParameters parameters) - throws ApiException { - return listRumReplayPlaylistsWithHttpInfo(parameters).getData(); - } - - /** - * List rum replay playlists. - * - *

See {@link #listRumReplayPlaylistsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<PlaylistArray> - */ - public CompletableFuture listRumReplayPlaylistsAsync( - ListRumReplayPlaylistsOptionalParameters parameters) { - return listRumReplayPlaylistsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * List playlists. - * - * @param parameters Optional parameters for the request. - * @return ApiResponse<PlaylistArray> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
- */ - public ApiResponse listRumReplayPlaylistsWithHttpInfo( - ListRumReplayPlaylistsOptionalParameters parameters) throws ApiException { - Object localVarPostBody = null; - String filterCreatedByUuid = parameters.filterCreatedByUuid; - String filterQuery = parameters.filterQuery; - Integer pageNumber = parameters.pageNumber; - Integer pageSize = parameters.pageSize; - // create path and map variables - String localVarPath = "/api/v2/rum/replay/playlists"; - - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[created_by_uuid]", filterCreatedByUuid)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RumReplayPlaylistsApi.listRumReplayPlaylists", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * List rum replay playlists. - * - *

See {@link #listRumReplayPlaylistsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<PlaylistArray>> - */ - public CompletableFuture> listRumReplayPlaylistsWithHttpInfoAsync( - ListRumReplayPlaylistsOptionalParameters parameters) { - Object localVarPostBody = null; - String filterCreatedByUuid = parameters.filterCreatedByUuid; - String filterQuery = parameters.filterQuery; - Integer pageNumber = parameters.pageNumber; - Integer pageSize = parameters.pageSize; - // create path and map variables - String localVarPath = "/api/v2/rum/replay/playlists"; - - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[created_by_uuid]", filterCreatedByUuid)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.RumReplayPlaylistsApi.listRumReplayPlaylists", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** Manage optional parameters to listRumReplayPlaylistSessions. */ - public static class ListRumReplayPlaylistSessionsOptionalParameters { - private Integer pageNumber; - private Integer pageSize; - - /** - * Set pageNumber. - * - * @param pageNumber Page number for pagination (0-indexed). (optional) - * @return ListRumReplayPlaylistSessionsOptionalParameters - */ - public ListRumReplayPlaylistSessionsOptionalParameters pageNumber(Integer pageNumber) { - this.pageNumber = pageNumber; - return this; - } - - /** - * Set pageSize. - * - * @param pageSize Number of items per page. (optional) - * @return ListRumReplayPlaylistSessionsOptionalParameters - */ - public ListRumReplayPlaylistSessionsOptionalParameters pageSize(Integer pageSize) { - this.pageSize = pageSize; - return this; - } - } - - /** - * List rum replay playlist sessions. - * - *

See {@link #listRumReplayPlaylistSessionsWithHttpInfo}. - * - * @param playlistId Unique identifier of the playlist. (required) - * @return PlaylistsSessionArray - * @throws ApiException if fails to make API call - */ - public PlaylistsSessionArray listRumReplayPlaylistSessions(Integer playlistId) - throws ApiException { - return listRumReplayPlaylistSessionsWithHttpInfo( - playlistId, new ListRumReplayPlaylistSessionsOptionalParameters()) - .getData(); - } - - /** - * List rum replay playlist sessions. - * - *

See {@link #listRumReplayPlaylistSessionsWithHttpInfoAsync}. - * - * @param playlistId Unique identifier of the playlist. (required) - * @return CompletableFuture<PlaylistsSessionArray> - */ - public CompletableFuture listRumReplayPlaylistSessionsAsync( - Integer playlistId) { - return listRumReplayPlaylistSessionsWithHttpInfoAsync( - playlistId, new ListRumReplayPlaylistSessionsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * List rum replay playlist sessions. - * - *

See {@link #listRumReplayPlaylistSessionsWithHttpInfo}. - * - * @param playlistId Unique identifier of the playlist. (required) - * @param parameters Optional parameters for the request. - * @return PlaylistsSessionArray - * @throws ApiException if fails to make API call - */ - public PlaylistsSessionArray listRumReplayPlaylistSessions( - Integer playlistId, ListRumReplayPlaylistSessionsOptionalParameters parameters) - throws ApiException { - return listRumReplayPlaylistSessionsWithHttpInfo(playlistId, parameters).getData(); - } - - /** - * List rum replay playlist sessions. - * - *

See {@link #listRumReplayPlaylistSessionsWithHttpInfoAsync}. - * - * @param playlistId Unique identifier of the playlist. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<PlaylistsSessionArray> - */ - public CompletableFuture listRumReplayPlaylistSessionsAsync( - Integer playlistId, ListRumReplayPlaylistSessionsOptionalParameters parameters) { - return listRumReplayPlaylistSessionsWithHttpInfoAsync(playlistId, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * List sessions in a playlist. - * - * @param playlistId Unique identifier of the playlist. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<PlaylistsSessionArray> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
- */ - public ApiResponse listRumReplayPlaylistSessionsWithHttpInfo( - Integer playlistId, ListRumReplayPlaylistSessionsOptionalParameters parameters) - throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'playlistId' is set - if (playlistId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'playlistId' when calling listRumReplayPlaylistSessions"); - } - Integer pageNumber = parameters.pageNumber; - Integer pageSize = parameters.pageSize; - // create path and map variables - String localVarPath = - "/api/v2/rum/replay/playlists/{playlist_id}/sessions" - .replaceAll( - "\\{" + "playlist_id" + "\\}", apiClient.escapeString(playlistId.toString())); - - 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.RumReplayPlaylistsApi.listRumReplayPlaylistSessions", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * List rum replay playlist sessions. - * - *

See {@link #listRumReplayPlaylistSessionsWithHttpInfo}. - * - * @param playlistId Unique identifier of the playlist. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<PlaylistsSessionArray>> - */ - public CompletableFuture> - listRumReplayPlaylistSessionsWithHttpInfoAsync( - Integer playlistId, ListRumReplayPlaylistSessionsOptionalParameters parameters) { - Object localVarPostBody = null; - - // verify the required parameter 'playlistId' is set - if (playlistId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'playlistId' when calling" - + " listRumReplayPlaylistSessions")); - return result; - } - Integer pageNumber = parameters.pageNumber; - Integer pageSize = parameters.pageSize; - // create path and map variables - String localVarPath = - "/api/v2/rum/replay/playlists/{playlist_id}/sessions" - .replaceAll( - "\\{" + "playlist_id" + "\\}", apiClient.escapeString(playlistId.toString())); - - 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.RumReplayPlaylistsApi.listRumReplayPlaylistSessions", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * Remove rum replay session from playlist. - * - *

See {@link #removeRumReplaySessionFromPlaylistWithHttpInfo}. - * - * @param playlistId Unique identifier of the playlist. (required) - * @param sessionId Unique identifier of the session. (required) - * @throws ApiException if fails to make API call - */ - public void removeRumReplaySessionFromPlaylist(Integer playlistId, String sessionId) - throws ApiException { - removeRumReplaySessionFromPlaylistWithHttpInfo(playlistId, sessionId); - } - - /** - * Remove rum replay session from playlist. - * - *

See {@link #removeRumReplaySessionFromPlaylistWithHttpInfoAsync}. - * - * @param playlistId Unique identifier of the playlist. (required) - * @param sessionId Unique identifier of the session. (required) - * @return CompletableFuture - */ - public CompletableFuture removeRumReplaySessionFromPlaylistAsync( - Integer playlistId, String sessionId) { - return removeRumReplaySessionFromPlaylistWithHttpInfoAsync(playlistId, sessionId) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Remove a session from a playlist. - * - * @param playlistId Unique identifier of the playlist. (required) - * @param sessionId Unique identifier of the session. (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 -
429 Too many requests -
- */ - public ApiResponse removeRumReplaySessionFromPlaylistWithHttpInfo( - Integer playlistId, String sessionId) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'playlistId' is set - if (playlistId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'playlistId' when calling" - + " removeRumReplaySessionFromPlaylist"); - } - - // verify the required parameter 'sessionId' is set - if (sessionId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'sessionId' when calling" - + " removeRumReplaySessionFromPlaylist"); - } - // create path and map variables - String localVarPath = - "/api/v2/rum/replay/playlists/{playlist_id}/sessions/{session_id}" - .replaceAll( - "\\{" + "playlist_id" + "\\}", apiClient.escapeString(playlistId.toString())) - .replaceAll("\\{" + "session_id" + "\\}", apiClient.escapeString(sessionId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RumReplayPlaylistsApi.removeRumReplaySessionFromPlaylist", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); - } - - /** - * Remove rum replay session from playlist. - * - *

See {@link #removeRumReplaySessionFromPlaylistWithHttpInfo}. - * - * @param playlistId Unique identifier of the playlist. (required) - * @param sessionId Unique identifier of the session. (required) - * @return CompletableFuture<ApiResponse<Void>> - */ - public CompletableFuture> removeRumReplaySessionFromPlaylistWithHttpInfoAsync( - Integer playlistId, String sessionId) { - Object localVarPostBody = null; - - // verify the required parameter 'playlistId' is set - if (playlistId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'playlistId' when calling" - + " removeRumReplaySessionFromPlaylist")); - return result; - } - - // verify the required parameter 'sessionId' is set - if (sessionId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'sessionId' when calling" - + " removeRumReplaySessionFromPlaylist")); - return result; - } - // create path and map variables - String localVarPath = - "/api/v2/rum/replay/playlists/{playlist_id}/sessions/{session_id}" - .replaceAll( - "\\{" + "playlist_id" + "\\}", apiClient.escapeString(playlistId.toString())) - .replaceAll("\\{" + "session_id" + "\\}", apiClient.escapeString(sessionId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.RumReplayPlaylistsApi.removeRumReplaySessionFromPlaylist", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } 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); - } - - /** - * Update rum replay playlist. - * - *

See {@link #updateRumReplayPlaylistWithHttpInfo}. - * - * @param playlistId Unique identifier of the playlist. (required) - * @param body (required) - * @return Playlist - * @throws ApiException if fails to make API call - */ - public Playlist updateRumReplayPlaylist(Integer playlistId, Playlist body) throws ApiException { - return updateRumReplayPlaylistWithHttpInfo(playlistId, body).getData(); - } - - /** - * Update rum replay playlist. - * - *

See {@link #updateRumReplayPlaylistWithHttpInfoAsync}. - * - * @param playlistId Unique identifier of the playlist. (required) - * @param body (required) - * @return CompletableFuture<Playlist> - */ - public CompletableFuture updateRumReplayPlaylistAsync( - Integer playlistId, Playlist body) { - return updateRumReplayPlaylistWithHttpInfoAsync(playlistId, body) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Update a playlist. - * - * @param playlistId Unique identifier of the playlist. (required) - * @param body (required) - * @return ApiResponse<Playlist> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
- */ - public ApiResponse updateRumReplayPlaylistWithHttpInfo( - Integer playlistId, Playlist body) throws ApiException { - Object localVarPostBody = body; - - // verify the required parameter 'playlistId' is set - if (playlistId == null) { - throw new ApiException( - 400, "Missing the required parameter 'playlistId' when calling updateRumReplayPlaylist"); - } - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateRumReplayPlaylist"); - } - // create path and map variables - String localVarPath = - "/api/v2/rum/replay/playlists/{playlist_id}" - .replaceAll( - "\\{" + "playlist_id" + "\\}", apiClient.escapeString(playlistId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RumReplayPlaylistsApi.updateRumReplayPlaylist", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "PUT", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * Update rum replay playlist. - * - *

See {@link #updateRumReplayPlaylistWithHttpInfo}. - * - * @param playlistId Unique identifier of the playlist. (required) - * @param body (required) - * @return CompletableFuture<ApiResponse<Playlist>> - */ - public CompletableFuture> updateRumReplayPlaylistWithHttpInfoAsync( - Integer playlistId, Playlist body) { - Object localVarPostBody = body; - - // verify the required parameter 'playlistId' is set - if (playlistId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'playlistId' when calling updateRumReplayPlaylist")); - 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 updateRumReplayPlaylist")); - return result; - } - // create path and map variables - String localVarPath = - "/api/v2/rum/replay/playlists/{playlist_id}" - .replaceAll( - "\\{" + "playlist_id" + "\\}", apiClient.escapeString(playlistId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.RumReplayPlaylistsApi.updateRumReplayPlaylist", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "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/RumReplaySessionsApi.java b/src/main/java/com/datadog/api/client/v2/api/RumReplaySessionsApi.java deleted file mode 100644 index 3c60ae6052c..00000000000 --- a/src/main/java/com/datadog/api/client/v2/api/RumReplaySessionsApi.java +++ /dev/null @@ -1,306 +0,0 @@ -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 jakarta.ws.rs.client.Invocation; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.CompletableFuture; - -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class RumReplaySessionsApi { - private ApiClient apiClient; - - public RumReplaySessionsApi() { - this(ApiClient.getDefaultApiClient()); - } - - public RumReplaySessionsApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Get the API client. - * - * @return API client - */ - public ApiClient getApiClient() { - return apiClient; - } - - /** - * Set the API client. - * - * @param apiClient an instance of API client - */ - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** Manage optional parameters to getSegments. */ - public static class GetSegmentsOptionalParameters { - private String source; - private Long ts; - private Integer maxListSize; - private String paging; - - /** - * Set source. - * - * @param source Storage source: 'event_platform' or 'blob'. (optional) - * @return GetSegmentsOptionalParameters - */ - public GetSegmentsOptionalParameters source(String source) { - this.source = source; - return this; - } - - /** - * Set ts. - * - * @param ts Server-side timestamp in milliseconds. (optional) - * @return GetSegmentsOptionalParameters - */ - public GetSegmentsOptionalParameters ts(Long ts) { - this.ts = ts; - return this; - } - - /** - * Set maxListSize. - * - * @param maxListSize Maximum size in bytes for the segment list. (optional) - * @return GetSegmentsOptionalParameters - */ - public GetSegmentsOptionalParameters maxListSize(Integer maxListSize) { - this.maxListSize = maxListSize; - return this; - } - - /** - * Set paging. - * - * @param paging Paging token for pagination. (optional) - * @return GetSegmentsOptionalParameters - */ - public GetSegmentsOptionalParameters paging(String paging) { - this.paging = paging; - return this; - } - } - - /** - * Get segments. - * - *

See {@link #getSegmentsWithHttpInfo}. - * - * @param viewId Unique identifier of the view. (required) - * @param sessionId Unique identifier of the session. (required) - * @throws ApiException if fails to make API call - */ - public void getSegments(String viewId, String sessionId) throws ApiException { - getSegmentsWithHttpInfo(viewId, sessionId, new GetSegmentsOptionalParameters()); - } - - /** - * Get segments. - * - *

See {@link #getSegmentsWithHttpInfoAsync}. - * - * @param viewId Unique identifier of the view. (required) - * @param sessionId Unique identifier of the session. (required) - * @return CompletableFuture - */ - public CompletableFuture getSegmentsAsync(String viewId, String sessionId) { - return getSegmentsWithHttpInfoAsync(viewId, sessionId, new GetSegmentsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get segments. - * - *

See {@link #getSegmentsWithHttpInfo}. - * - * @param viewId Unique identifier of the view. (required) - * @param sessionId Unique identifier of the session. (required) - * @param parameters Optional parameters for the request. - * @throws ApiException if fails to make API call - */ - public void getSegments(String viewId, String sessionId, GetSegmentsOptionalParameters parameters) - throws ApiException { - getSegmentsWithHttpInfo(viewId, sessionId, parameters); - } - - /** - * Get segments. - * - *

See {@link #getSegmentsWithHttpInfoAsync}. - * - * @param viewId Unique identifier of the view. (required) - * @param sessionId Unique identifier of the session. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture - */ - public CompletableFuture getSegmentsAsync( - String viewId, String sessionId, GetSegmentsOptionalParameters parameters) { - return getSegmentsWithHttpInfoAsync(viewId, sessionId, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Get segments for a view. - * - * @param viewId Unique identifier of the view. (required) - * @param sessionId Unique identifier of the session. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<Void> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
- */ - public ApiResponse getSegmentsWithHttpInfo( - String viewId, String sessionId, GetSegmentsOptionalParameters parameters) - throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'viewId' is set - if (viewId == null) { - throw new ApiException( - 400, "Missing the required parameter 'viewId' when calling getSegments"); - } - - // verify the required parameter 'sessionId' is set - if (sessionId == null) { - throw new ApiException( - 400, "Missing the required parameter 'sessionId' when calling getSegments"); - } - String source = parameters.source; - Long ts = parameters.ts; - Integer maxListSize = parameters.maxListSize; - String paging = parameters.paging; - // create path and map variables - String localVarPath = - "/api/v2/rum/replay/sessions/{session_id}/views/{view_id}/segments" - .replaceAll("\\{" + "view_id" + "\\}", apiClient.escapeString(viewId.toString())) - .replaceAll("\\{" + "session_id" + "\\}", apiClient.escapeString(sessionId.toString())); - - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "source", source)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "ts", ts)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "max_list_size", maxListSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "paging", paging)); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RumReplaySessionsApi.getSegments", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); - } - - /** - * Get segments. - * - *

See {@link #getSegmentsWithHttpInfo}. - * - * @param viewId Unique identifier of the view. (required) - * @param sessionId Unique identifier of the session. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<Void>> - */ - public CompletableFuture> getSegmentsWithHttpInfoAsync( - String viewId, String sessionId, GetSegmentsOptionalParameters parameters) { - Object localVarPostBody = null; - - // verify the required parameter 'viewId' is set - if (viewId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'viewId' when calling getSegments")); - return result; - } - - // verify the required parameter 'sessionId' is set - if (sessionId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'sessionId' when calling getSegments")); - return result; - } - String source = parameters.source; - Long ts = parameters.ts; - Integer maxListSize = parameters.maxListSize; - String paging = parameters.paging; - // create path and map variables - String localVarPath = - "/api/v2/rum/replay/sessions/{session_id}/views/{view_id}/segments" - .replaceAll("\\{" + "view_id" + "\\}", apiClient.escapeString(viewId.toString())) - .replaceAll("\\{" + "session_id" + "\\}", apiClient.escapeString(sessionId.toString())); - - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "source", source)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "ts", ts)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "max_list_size", maxListSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "paging", paging)); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.RumReplaySessionsApi.getSegments", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/api/RumReplayViewershipApi.java b/src/main/java/com/datadog/api/client/v2/api/RumReplayViewershipApi.java deleted file mode 100644 index f920467faf6..00000000000 --- a/src/main/java/com/datadog/api/client/v2/api/RumReplayViewershipApi.java +++ /dev/null @@ -1,843 +0,0 @@ -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.ViewershipHistorySessionArray; -import com.datadog.api.client.v2.model.Watch; -import com.datadog.api.client.v2.model.WatcherArray; -import jakarta.ws.rs.client.Invocation; -import jakarta.ws.rs.core.GenericType; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.CompletableFuture; - -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class RumReplayViewershipApi { - private ApiClient apiClient; - - public RumReplayViewershipApi() { - this(ApiClient.getDefaultApiClient()); - } - - public RumReplayViewershipApi(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 rum replay session watch. - * - *

See {@link #createRumReplaySessionWatchWithHttpInfo}. - * - * @param sessionId Unique identifier of the session. (required) - * @param body (required) - * @return Watch - * @throws ApiException if fails to make API call - */ - public Watch createRumReplaySessionWatch(String sessionId, Watch body) throws ApiException { - return createRumReplaySessionWatchWithHttpInfo(sessionId, body).getData(); - } - - /** - * Create rum replay session watch. - * - *

See {@link #createRumReplaySessionWatchWithHttpInfoAsync}. - * - * @param sessionId Unique identifier of the session. (required) - * @param body (required) - * @return CompletableFuture<Watch> - */ - public CompletableFuture createRumReplaySessionWatchAsync(String sessionId, Watch body) { - return createRumReplaySessionWatchWithHttpInfoAsync(sessionId, body) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Record a session watch. - * - * @param sessionId Unique identifier of the session. (required) - * @param body (required) - * @return ApiResponse<Watch> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - *
Response details
Status Code Description Response Headers
201 Created -
429 Too many requests -
- */ - public ApiResponse createRumReplaySessionWatchWithHttpInfo(String sessionId, Watch body) - throws ApiException { - Object localVarPostBody = body; - - // verify the required parameter 'sessionId' is set - if (sessionId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'sessionId' when calling createRumReplaySessionWatch"); - } - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createRumReplaySessionWatch"); - } - // create path and map variables - String localVarPath = - "/api/v2/rum/replay/sessions/{session_id}/watches" - .replaceAll("\\{" + "session_id" + "\\}", apiClient.escapeString(sessionId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RumReplayViewershipApi.createRumReplaySessionWatch", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * Create rum replay session watch. - * - *

See {@link #createRumReplaySessionWatchWithHttpInfo}. - * - * @param sessionId Unique identifier of the session. (required) - * @param body (required) - * @return CompletableFuture<ApiResponse<Watch>> - */ - public CompletableFuture> createRumReplaySessionWatchWithHttpInfoAsync( - String sessionId, Watch body) { - Object localVarPostBody = body; - - // verify the required parameter 'sessionId' is set - if (sessionId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'sessionId' when calling" - + " createRumReplaySessionWatch")); - 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 createRumReplaySessionWatch")); - return result; - } - // create path and map variables - String localVarPath = - "/api/v2/rum/replay/sessions/{session_id}/watches" - .replaceAll("\\{" + "session_id" + "\\}", apiClient.escapeString(sessionId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.RumReplayViewershipApi.createRumReplaySessionWatch", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * Delete rum replay session watch. - * - *

See {@link #deleteRumReplaySessionWatchWithHttpInfo}. - * - * @param sessionId Unique identifier of the session. (required) - * @throws ApiException if fails to make API call - */ - public void deleteRumReplaySessionWatch(String sessionId) throws ApiException { - deleteRumReplaySessionWatchWithHttpInfo(sessionId); - } - - /** - * Delete rum replay session watch. - * - *

See {@link #deleteRumReplaySessionWatchWithHttpInfoAsync}. - * - * @param sessionId Unique identifier of the session. (required) - * @return CompletableFuture - */ - public CompletableFuture deleteRumReplaySessionWatchAsync(String sessionId) { - return deleteRumReplaySessionWatchWithHttpInfoAsync(sessionId) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Delete session watch history. - * - * @param sessionId Unique identifier of the session. (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 -
429 Too many requests -
- */ - public ApiResponse deleteRumReplaySessionWatchWithHttpInfo(String sessionId) - throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'sessionId' is set - if (sessionId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'sessionId' when calling deleteRumReplaySessionWatch"); - } - // create path and map variables - String localVarPath = - "/api/v2/rum/replay/sessions/{session_id}/watches" - .replaceAll("\\{" + "session_id" + "\\}", apiClient.escapeString(sessionId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RumReplayViewershipApi.deleteRumReplaySessionWatch", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); - } - - /** - * Delete rum replay session watch. - * - *

See {@link #deleteRumReplaySessionWatchWithHttpInfo}. - * - * @param sessionId Unique identifier of the session. (required) - * @return CompletableFuture<ApiResponse<Void>> - */ - public CompletableFuture> deleteRumReplaySessionWatchWithHttpInfoAsync( - String sessionId) { - Object localVarPostBody = null; - - // verify the required parameter 'sessionId' is set - if (sessionId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'sessionId' when calling" - + " deleteRumReplaySessionWatch")); - return result; - } - // create path and map variables - String localVarPath = - "/api/v2/rum/replay/sessions/{session_id}/watches" - .replaceAll("\\{" + "session_id" + "\\}", apiClient.escapeString(sessionId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.RumReplayViewershipApi.deleteRumReplaySessionWatch", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } 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); - } - - /** Manage optional parameters to listRumReplaySessionWatchers. */ - public static class ListRumReplaySessionWatchersOptionalParameters { - private Integer pageSize; - private Integer pageNumber; - - /** - * Set pageSize. - * - * @param pageSize Number of items per page. (optional) - * @return ListRumReplaySessionWatchersOptionalParameters - */ - public ListRumReplaySessionWatchersOptionalParameters pageSize(Integer pageSize) { - this.pageSize = pageSize; - return this; - } - - /** - * Set pageNumber. - * - * @param pageNumber Page number for pagination (0-indexed). (optional) - * @return ListRumReplaySessionWatchersOptionalParameters - */ - public ListRumReplaySessionWatchersOptionalParameters pageNumber(Integer pageNumber) { - this.pageNumber = pageNumber; - return this; - } - } - - /** - * List rum replay session watchers. - * - *

See {@link #listRumReplaySessionWatchersWithHttpInfo}. - * - * @param sessionId Unique identifier of the session. (required) - * @return WatcherArray - * @throws ApiException if fails to make API call - */ - public WatcherArray listRumReplaySessionWatchers(String sessionId) throws ApiException { - return listRumReplaySessionWatchersWithHttpInfo( - sessionId, new ListRumReplaySessionWatchersOptionalParameters()) - .getData(); - } - - /** - * List rum replay session watchers. - * - *

See {@link #listRumReplaySessionWatchersWithHttpInfoAsync}. - * - * @param sessionId Unique identifier of the session. (required) - * @return CompletableFuture<WatcherArray> - */ - public CompletableFuture listRumReplaySessionWatchersAsync(String sessionId) { - return listRumReplaySessionWatchersWithHttpInfoAsync( - sessionId, new ListRumReplaySessionWatchersOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * List rum replay session watchers. - * - *

See {@link #listRumReplaySessionWatchersWithHttpInfo}. - * - * @param sessionId Unique identifier of the session. (required) - * @param parameters Optional parameters for the request. - * @return WatcherArray - * @throws ApiException if fails to make API call - */ - public WatcherArray listRumReplaySessionWatchers( - String sessionId, ListRumReplaySessionWatchersOptionalParameters parameters) - throws ApiException { - return listRumReplaySessionWatchersWithHttpInfo(sessionId, parameters).getData(); - } - - /** - * List rum replay session watchers. - * - *

See {@link #listRumReplaySessionWatchersWithHttpInfoAsync}. - * - * @param sessionId Unique identifier of the session. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<WatcherArray> - */ - public CompletableFuture listRumReplaySessionWatchersAsync( - String sessionId, ListRumReplaySessionWatchersOptionalParameters parameters) { - return listRumReplaySessionWatchersWithHttpInfoAsync(sessionId, parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * List session watchers. - * - * @param sessionId Unique identifier of the session. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<WatcherArray> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
- */ - public ApiResponse listRumReplaySessionWatchersWithHttpInfo( - String sessionId, ListRumReplaySessionWatchersOptionalParameters parameters) - throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'sessionId' is set - if (sessionId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'sessionId' when calling listRumReplaySessionWatchers"); - } - Integer pageSize = parameters.pageSize; - Integer pageNumber = parameters.pageNumber; - // create path and map variables - String localVarPath = - "/api/v2/rum/replay/sessions/{session_id}/watchers" - .replaceAll("\\{" + "session_id" + "\\}", apiClient.escapeString(sessionId.toString())); - - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RumReplayViewershipApi.listRumReplaySessionWatchers", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * List rum replay session watchers. - * - *

See {@link #listRumReplaySessionWatchersWithHttpInfo}. - * - * @param sessionId Unique identifier of the session. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<WatcherArray>> - */ - public CompletableFuture> listRumReplaySessionWatchersWithHttpInfoAsync( - String sessionId, ListRumReplaySessionWatchersOptionalParameters parameters) { - Object localVarPostBody = null; - - // verify the required parameter 'sessionId' is set - if (sessionId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'sessionId' when calling" - + " listRumReplaySessionWatchers")); - return result; - } - Integer pageSize = parameters.pageSize; - Integer pageNumber = parameters.pageNumber; - // create path and map variables - String localVarPath = - "/api/v2/rum/replay/sessions/{session_id}/watchers" - .replaceAll("\\{" + "session_id" + "\\}", apiClient.escapeString(sessionId.toString())); - - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.RumReplayViewershipApi.listRumReplaySessionWatchers", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** Manage optional parameters to listRumReplayViewershipHistorySessions. */ - public static class ListRumReplayViewershipHistorySessionsOptionalParameters { - private Long filterWatchedAtStart; - private Integer pageNumber; - private String filterCreatedBy; - private Long filterWatchedAtEnd; - private String filterSessionIds; - private Integer pageSize; - private String filterApplicationId; - - /** - * Set filterWatchedAtStart. - * - * @param filterWatchedAtStart Start timestamp in milliseconds for watched_at filter. (optional) - * @return ListRumReplayViewershipHistorySessionsOptionalParameters - */ - public ListRumReplayViewershipHistorySessionsOptionalParameters filterWatchedAtStart( - Long filterWatchedAtStart) { - this.filterWatchedAtStart = filterWatchedAtStart; - return this; - } - - /** - * Set pageNumber. - * - * @param pageNumber Page number for pagination (0-indexed). (optional) - * @return ListRumReplayViewershipHistorySessionsOptionalParameters - */ - public ListRumReplayViewershipHistorySessionsOptionalParameters pageNumber(Integer pageNumber) { - this.pageNumber = pageNumber; - return this; - } - - /** - * Set filterCreatedBy. - * - * @param filterCreatedBy Filter by user UUID. Defaults to current user if not specified. - * (optional) - * @return ListRumReplayViewershipHistorySessionsOptionalParameters - */ - public ListRumReplayViewershipHistorySessionsOptionalParameters filterCreatedBy( - String filterCreatedBy) { - this.filterCreatedBy = filterCreatedBy; - return this; - } - - /** - * Set filterWatchedAtEnd. - * - * @param filterWatchedAtEnd End timestamp in milliseconds for watched_at filter. (optional) - * @return ListRumReplayViewershipHistorySessionsOptionalParameters - */ - public ListRumReplayViewershipHistorySessionsOptionalParameters filterWatchedAtEnd( - Long filterWatchedAtEnd) { - this.filterWatchedAtEnd = filterWatchedAtEnd; - return this; - } - - /** - * Set filterSessionIds. - * - * @param filterSessionIds Comma-separated list of session IDs to filter by. (optional) - * @return ListRumReplayViewershipHistorySessionsOptionalParameters - */ - public ListRumReplayViewershipHistorySessionsOptionalParameters filterSessionIds( - String filterSessionIds) { - this.filterSessionIds = filterSessionIds; - return this; - } - - /** - * Set pageSize. - * - * @param pageSize Number of items per page. (optional) - * @return ListRumReplayViewershipHistorySessionsOptionalParameters - */ - public ListRumReplayViewershipHistorySessionsOptionalParameters pageSize(Integer pageSize) { - this.pageSize = pageSize; - return this; - } - - /** - * Set filterApplicationId. - * - * @param filterApplicationId Filter by application ID. (optional) - * @return ListRumReplayViewershipHistorySessionsOptionalParameters - */ - public ListRumReplayViewershipHistorySessionsOptionalParameters filterApplicationId( - String filterApplicationId) { - this.filterApplicationId = filterApplicationId; - return this; - } - } - - /** - * List rum replay viewership history sessions. - * - *

See {@link #listRumReplayViewershipHistorySessionsWithHttpInfo}. - * - * @return ViewershipHistorySessionArray - * @throws ApiException if fails to make API call - */ - public ViewershipHistorySessionArray listRumReplayViewershipHistorySessions() - throws ApiException { - return listRumReplayViewershipHistorySessionsWithHttpInfo( - new ListRumReplayViewershipHistorySessionsOptionalParameters()) - .getData(); - } - - /** - * List rum replay viewership history sessions. - * - *

See {@link #listRumReplayViewershipHistorySessionsWithHttpInfoAsync}. - * - * @return CompletableFuture<ViewershipHistorySessionArray> - */ - public CompletableFuture - listRumReplayViewershipHistorySessionsAsync() { - return listRumReplayViewershipHistorySessionsWithHttpInfoAsync( - new ListRumReplayViewershipHistorySessionsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * List rum replay viewership history sessions. - * - *

See {@link #listRumReplayViewershipHistorySessionsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return ViewershipHistorySessionArray - * @throws ApiException if fails to make API call - */ - public ViewershipHistorySessionArray listRumReplayViewershipHistorySessions( - ListRumReplayViewershipHistorySessionsOptionalParameters parameters) throws ApiException { - return listRumReplayViewershipHistorySessionsWithHttpInfo(parameters).getData(); - } - - /** - * List rum replay viewership history sessions. - * - *

See {@link #listRumReplayViewershipHistorySessionsWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ViewershipHistorySessionArray> - */ - public CompletableFuture - listRumReplayViewershipHistorySessionsAsync( - ListRumReplayViewershipHistorySessionsOptionalParameters parameters) { - return listRumReplayViewershipHistorySessionsWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * List watched sessions. - * - * @param parameters Optional parameters for the request. - * @return ApiResponse<ViewershipHistorySessionArray> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
- */ - public ApiResponse - listRumReplayViewershipHistorySessionsWithHttpInfo( - ListRumReplayViewershipHistorySessionsOptionalParameters parameters) throws ApiException { - Object localVarPostBody = null; - Long filterWatchedAtStart = parameters.filterWatchedAtStart; - Integer pageNumber = parameters.pageNumber; - String filterCreatedBy = parameters.filterCreatedBy; - Long filterWatchedAtEnd = parameters.filterWatchedAtEnd; - String filterSessionIds = parameters.filterSessionIds; - Integer pageSize = parameters.pageSize; - String filterApplicationId = parameters.filterApplicationId; - // create path and map variables - String localVarPath = "/api/v2/rum/replay/viewership-history/sessions"; - - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[watched_at][start]", filterWatchedAtStart)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[created_by]", filterCreatedBy)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[watched_at][end]", filterWatchedAtEnd)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[session_ids]", filterSessionIds)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[application_id]", filterApplicationId)); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.RumReplayViewershipApi.listRumReplayViewershipHistorySessions", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * List rum replay viewership history sessions. - * - *

See {@link #listRumReplayViewershipHistorySessionsWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<ViewershipHistorySessionArray>> - */ - public CompletableFuture> - listRumReplayViewershipHistorySessionsWithHttpInfoAsync( - ListRumReplayViewershipHistorySessionsOptionalParameters parameters) { - Object localVarPostBody = null; - Long filterWatchedAtStart = parameters.filterWatchedAtStart; - Integer pageNumber = parameters.pageNumber; - String filterCreatedBy = parameters.filterCreatedBy; - Long filterWatchedAtEnd = parameters.filterWatchedAtEnd; - String filterSessionIds = parameters.filterSessionIds; - Integer pageSize = parameters.pageSize; - String filterApplicationId = parameters.filterApplicationId; - // create path and map variables - String localVarPath = "/api/v2/rum/replay/viewership-history/sessions"; - - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[watched_at][start]", filterWatchedAtStart)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[created_by]", filterCreatedBy)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[watched_at][end]", filterWatchedAtEnd)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[session_ids]", filterSessionIds)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[application_id]", filterApplicationId)); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.RumReplayViewershipApi.listRumReplayViewershipHistorySessions", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/PlaylistsSessionData.java b/src/main/java/com/datadog/api/client/v2/model/FullPersonalAccessToken.java similarity index 53% rename from src/main/java/com/datadog/api/client/v2/model/PlaylistsSessionData.java rename to src/main/java/com/datadog/api/client/v2/model/FullPersonalAccessToken.java index e5f9d34f4d0..37d80c8a8c1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/PlaylistsSessionData.java +++ b/src/main/java/com/datadog/api/client/v2/model/FullPersonalAccessToken.java @@ -16,98 +16,134 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import java.util.UUID; -/** */ +/** + * Personal access token object with the secret key value. This is only returned when creating a new + * token. + */ @JsonPropertyOrder({ - PlaylistsSessionData.JSON_PROPERTY_ATTRIBUTES, - PlaylistsSessionData.JSON_PROPERTY_ID, - PlaylistsSessionData.JSON_PROPERTY_TYPE + FullPersonalAccessToken.JSON_PROPERTY_ATTRIBUTES, + FullPersonalAccessToken.JSON_PROPERTY_ID, + FullPersonalAccessToken.JSON_PROPERTY_RELATIONSHIPS, + FullPersonalAccessToken.JSON_PROPERTY_TYPE }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class PlaylistsSessionData { +public class FullPersonalAccessToken { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; - private PlaylistsSessionDataAttributes attributes; + private FullPersonalAccessTokenAttributes attributes; public static final String JSON_PROPERTY_ID = "id"; - private String id; + private UUID id; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private PersonalAccessTokenRelationships relationships; public static final String JSON_PROPERTY_TYPE = "type"; - private ViewershipHistorySessionDataType type = - ViewershipHistorySessionDataType.RUM_REPLAY_SESSION; + private PersonalAccessTokenType type = PersonalAccessTokenType.PERSONAL_ACCESS_TOKENS; - public PlaylistsSessionData() {} + public FullPersonalAccessToken() {} @JsonCreator - public PlaylistsSessionData( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - ViewershipHistorySessionDataType type) { + public FullPersonalAccessToken( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + FullPersonalAccessTokenAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_RELATIONSHIPS) + PersonalAccessTokenRelationships relationships, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) PersonalAccessTokenType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.relationships = relationships; + this.unparsed |= relationships.unparsed; this.type = type; this.unparsed |= !type.isValid(); } - public PlaylistsSessionData attributes(PlaylistsSessionDataAttributes attributes) { + public FullPersonalAccessToken attributes(FullPersonalAccessTokenAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Getattributes + * Attributes of a personal access token including the secret key value. This is only returned + * when creating a new token. * * @return attributes */ - @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public PlaylistsSessionDataAttributes getAttributes() { + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FullPersonalAccessTokenAttributes getAttributes() { return attributes; } - public void setAttributes(PlaylistsSessionDataAttributes attributes) { + public void setAttributes(FullPersonalAccessTokenAttributes attributes) { this.attributes = attributes; } - public PlaylistsSessionData id(String id) { + public FullPersonalAccessToken id(UUID id) { this.id = id; return this; } /** - * Getid + * UUID of the personal access token. * * @return id */ - @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { return id; } - public void setId(String id) { + public void setId(UUID id) { this.id = id; } - public PlaylistsSessionData type(ViewershipHistorySessionDataType type) { + public FullPersonalAccessToken relationships(PersonalAccessTokenRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Resources related to the personal access token. + * + * @return relationships + */ + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public PersonalAccessTokenRelationships getRelationships() { + return relationships; + } + + public void setRelationships(PersonalAccessTokenRelationships relationships) { + this.relationships = relationships; + } + + public FullPersonalAccessToken type(PersonalAccessTokenType type) { this.type = type; this.unparsed |= !type.isValid(); return this; } /** - * Rum replay session resource type. + * Personal access tokens resource type. * * @return type */ @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ViewershipHistorySessionDataType getType() { + public PersonalAccessTokenType getType() { return type; } - public void setType(ViewershipHistorySessionDataType type) { + public void setType(PersonalAccessTokenType type) { if (!type.isValid()) { this.unparsed = true; } @@ -126,10 +162,10 @@ public void setType(ViewershipHistorySessionDataType type) { * * @param key The arbitrary key to set * @param value The associated value - * @return PlaylistsSessionData + * @return FullPersonalAccessToken */ @JsonAnySetter - public PlaylistsSessionData putAdditionalProperty(String key, Object value) { + public FullPersonalAccessToken putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -160,7 +196,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this PlaylistsSessionData object is equal to o. */ + /** Return true if this FullPersonalAccessToken object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -169,24 +205,26 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PlaylistsSessionData playlistsSessionData = (PlaylistsSessionData) o; - return Objects.equals(this.attributes, playlistsSessionData.attributes) - && Objects.equals(this.id, playlistsSessionData.id) - && Objects.equals(this.type, playlistsSessionData.type) - && Objects.equals(this.additionalProperties, playlistsSessionData.additionalProperties); + FullPersonalAccessToken fullPersonalAccessToken = (FullPersonalAccessToken) o; + return Objects.equals(this.attributes, fullPersonalAccessToken.attributes) + && Objects.equals(this.id, fullPersonalAccessToken.id) + && Objects.equals(this.relationships, fullPersonalAccessToken.relationships) + && Objects.equals(this.type, fullPersonalAccessToken.type) + && Objects.equals(this.additionalProperties, fullPersonalAccessToken.additionalProperties); } @Override public int hashCode() { - return Objects.hash(attributes, id, type, additionalProperties); + return Objects.hash(attributes, id, relationships, type, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class PlaylistsSessionData {\n"); + sb.append("class FullPersonalAccessToken {\n"); sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/FullPersonalAccessTokenAttributes.java b/src/main/java/com/datadog/api/client/v2/model/FullPersonalAccessTokenAttributes.java new file mode 100644 index 00000000000..d3ffad785cc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FullPersonalAccessTokenAttributes.java @@ -0,0 +1,287 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * Attributes of a personal access token including the secret key value. This is only returned when + * creating a new token. + */ +@JsonPropertyOrder({ + FullPersonalAccessTokenAttributes.JSON_PROPERTY_CREATED_AT, + FullPersonalAccessTokenAttributes.JSON_PROPERTY_EXPIRES_AT, + FullPersonalAccessTokenAttributes.JSON_PROPERTY_KEY, + FullPersonalAccessTokenAttributes.JSON_PROPERTY_MODIFIED_AT, + FullPersonalAccessTokenAttributes.JSON_PROPERTY_NAME, + FullPersonalAccessTokenAttributes.JSON_PROPERTY_SCOPES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FullPersonalAccessTokenAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; + private OffsetDateTime expiresAt; + + public static final String JSON_PROPERTY_KEY = "key"; + private String key; + + public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; + private JsonNullable modifiedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SCOPES = "scopes"; + private List scopes = new ArrayList<>(); + + public FullPersonalAccessTokenAttributes() {} + + @JsonCreator + public FullPersonalAccessTokenAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_EXPIRES_AT) OffsetDateTime expiresAt, + @JsonProperty(required = true, value = JSON_PROPERTY_KEY) String key, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_SCOPES) List scopes) { + this.createdAt = createdAt; + this.expiresAt = expiresAt; + this.key = key; + this.name = name; + this.scopes = scopes; + } + + /** + * Creation timestamp of the personal access token. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public FullPersonalAccessTokenAttributes expiresAt(OffsetDateTime expiresAt) { + this.expiresAt = expiresAt; + return this; + } + + /** + * Expiration timestamp of the personal access token. + * + * @return expiresAt + */ + @JsonProperty(JSON_PROPERTY_EXPIRES_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getExpiresAt() { + return expiresAt; + } + + public void setExpiresAt(OffsetDateTime expiresAt) { + this.expiresAt = expiresAt; + } + + /** + * The secret token value. This is only returned when creating a new personal access token and + * cannot be retrieved later. + * + * @return key + */ + @JsonProperty(JSON_PROPERTY_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getKey() { + return key; + } + + /** + * Last modification timestamp of the personal access token. + * + * @return modifiedAt + */ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getModifiedAt() { + + if (modifiedAt == null) { + modifiedAt = JsonNullable.undefined(); + } + return modifiedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getModifiedAt_JsonNullable() { + return modifiedAt; + } + + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + private void setModifiedAt_JsonNullable(JsonNullable modifiedAt) { + this.modifiedAt = modifiedAt; + } + + public FullPersonalAccessTokenAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Name of the personal access token. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public FullPersonalAccessTokenAttributes scopes(List scopes) { + this.scopes = scopes; + return this; + } + + public FullPersonalAccessTokenAttributes addScopesItem(String scopesItem) { + this.scopes.add(scopesItem); + return this; + } + + /** + * Array of scopes granted to the personal access token. These define what permissions the token + * has. + * + * @return scopes + */ + @JsonProperty(JSON_PROPERTY_SCOPES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getScopes() { + return scopes; + } + + public void setScopes(List scopes) { + this.scopes = scopes; + } + + /** + * 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 FullPersonalAccessTokenAttributes + */ + @JsonAnySetter + public FullPersonalAccessTokenAttributes 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 FullPersonalAccessTokenAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FullPersonalAccessTokenAttributes fullPersonalAccessTokenAttributes = + (FullPersonalAccessTokenAttributes) o; + return Objects.equals(this.createdAt, fullPersonalAccessTokenAttributes.createdAt) + && Objects.equals(this.expiresAt, fullPersonalAccessTokenAttributes.expiresAt) + && Objects.equals(this.key, fullPersonalAccessTokenAttributes.key) + && Objects.equals(this.modifiedAt, fullPersonalAccessTokenAttributes.modifiedAt) + && Objects.equals(this.name, fullPersonalAccessTokenAttributes.name) + && Objects.equals(this.scopes, fullPersonalAccessTokenAttributes.scopes) + && Objects.equals( + this.additionalProperties, fullPersonalAccessTokenAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, expiresAt, key, modifiedAt, name, scopes, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FullPersonalAccessTokenAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" scopes: ").append(toIndentedString(scopes)).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/ViewershipHistorySessionData.java b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessToken.java similarity index 55% rename from src/main/java/com/datadog/api/client/v2/model/ViewershipHistorySessionData.java rename to src/main/java/com/datadog/api/client/v2/model/PersonalAccessToken.java index 7a0e2255cc0..ea79c1a63df 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ViewershipHistorySessionData.java +++ b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessToken.java @@ -16,99 +16,130 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import java.util.UUID; -/** */ +/** Personal access token object. */ @JsonPropertyOrder({ - ViewershipHistorySessionData.JSON_PROPERTY_ATTRIBUTES, - ViewershipHistorySessionData.JSON_PROPERTY_ID, - ViewershipHistorySessionData.JSON_PROPERTY_TYPE + PersonalAccessToken.JSON_PROPERTY_ATTRIBUTES, + PersonalAccessToken.JSON_PROPERTY_ID, + PersonalAccessToken.JSON_PROPERTY_RELATIONSHIPS, + PersonalAccessToken.JSON_PROPERTY_TYPE }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class ViewershipHistorySessionData { +public class PersonalAccessToken { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; - private ViewershipHistorySessionDataAttributes attributes; + private PersonalAccessTokenAttributes attributes; public static final String JSON_PROPERTY_ID = "id"; - private String id; + private UUID id; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private PersonalAccessTokenRelationships relationships; public static final String JSON_PROPERTY_TYPE = "type"; - private ViewershipHistorySessionDataType type = - ViewershipHistorySessionDataType.RUM_REPLAY_SESSION; + private PersonalAccessTokenType type = PersonalAccessTokenType.PERSONAL_ACCESS_TOKENS; - public ViewershipHistorySessionData() {} + public PersonalAccessToken() {} @JsonCreator - public ViewershipHistorySessionData( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - ViewershipHistorySessionDataType type) { + public PersonalAccessToken( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + PersonalAccessTokenAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_RELATIONSHIPS) + PersonalAccessTokenRelationships relationships, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) PersonalAccessTokenType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.relationships = relationships; + this.unparsed |= relationships.unparsed; this.type = type; this.unparsed |= !type.isValid(); } - public ViewershipHistorySessionData attributes( - ViewershipHistorySessionDataAttributes attributes) { + public PersonalAccessToken attributes(PersonalAccessTokenAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Getattributes + * Attributes of a personal access token. * * @return attributes */ - @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ViewershipHistorySessionDataAttributes getAttributes() { + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public PersonalAccessTokenAttributes getAttributes() { return attributes; } - public void setAttributes(ViewershipHistorySessionDataAttributes attributes) { + public void setAttributes(PersonalAccessTokenAttributes attributes) { this.attributes = attributes; } - public ViewershipHistorySessionData id(String id) { + public PersonalAccessToken id(UUID id) { this.id = id; return this; } /** - * Getid + * UUID of the personal access token. * * @return id */ - @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { return id; } - public void setId(String id) { + public void setId(UUID id) { this.id = id; } - public ViewershipHistorySessionData type(ViewershipHistorySessionDataType type) { + public PersonalAccessToken relationships(PersonalAccessTokenRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Resources related to the personal access token. + * + * @return relationships + */ + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public PersonalAccessTokenRelationships getRelationships() { + return relationships; + } + + public void setRelationships(PersonalAccessTokenRelationships relationships) { + this.relationships = relationships; + } + + public PersonalAccessToken type(PersonalAccessTokenType type) { this.type = type; this.unparsed |= !type.isValid(); return this; } /** - * Rum replay session resource type. + * Personal access tokens resource type. * * @return type */ @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ViewershipHistorySessionDataType getType() { + public PersonalAccessTokenType getType() { return type; } - public void setType(ViewershipHistorySessionDataType type) { + public void setType(PersonalAccessTokenType type) { if (!type.isValid()) { this.unparsed = true; } @@ -127,10 +158,10 @@ public void setType(ViewershipHistorySessionDataType type) { * * @param key The arbitrary key to set * @param value The associated value - * @return ViewershipHistorySessionData + * @return PersonalAccessToken */ @JsonAnySetter - public ViewershipHistorySessionData putAdditionalProperty(String key, Object value) { + public PersonalAccessToken putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -161,7 +192,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this ViewershipHistorySessionData object is equal to o. */ + /** Return true if this PersonalAccessToken object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -170,25 +201,26 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ViewershipHistorySessionData viewershipHistorySessionData = (ViewershipHistorySessionData) o; - return Objects.equals(this.attributes, viewershipHistorySessionData.attributes) - && Objects.equals(this.id, viewershipHistorySessionData.id) - && Objects.equals(this.type, viewershipHistorySessionData.type) - && Objects.equals( - this.additionalProperties, viewershipHistorySessionData.additionalProperties); + PersonalAccessToken personalAccessToken = (PersonalAccessToken) o; + return Objects.equals(this.attributes, personalAccessToken.attributes) + && Objects.equals(this.id, personalAccessToken.id) + && Objects.equals(this.relationships, personalAccessToken.relationships) + && Objects.equals(this.type, personalAccessToken.type) + && Objects.equals(this.additionalProperties, personalAccessToken.additionalProperties); } @Override public int hashCode() { - return Objects.hash(attributes, id, type, additionalProperties); + return Objects.hash(attributes, id, relationships, type, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ViewershipHistorySessionData {\n"); + sb.append("class PersonalAccessToken {\n"); sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenAttributes.java b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenAttributes.java new file mode 100644 index 00000000000..fd5671a7fc0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenAttributes.java @@ -0,0 +1,263 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes of a personal access token. */ +@JsonPropertyOrder({ + PersonalAccessTokenAttributes.JSON_PROPERTY_CREATED_AT, + PersonalAccessTokenAttributes.JSON_PROPERTY_EXPIRES_AT, + PersonalAccessTokenAttributes.JSON_PROPERTY_MODIFIED_AT, + PersonalAccessTokenAttributes.JSON_PROPERTY_NAME, + PersonalAccessTokenAttributes.JSON_PROPERTY_SCOPES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class PersonalAccessTokenAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; + private OffsetDateTime expiresAt; + + public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; + private JsonNullable modifiedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SCOPES = "scopes"; + private List scopes = new ArrayList<>(); + + public PersonalAccessTokenAttributes() {} + + @JsonCreator + public PersonalAccessTokenAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_EXPIRES_AT) OffsetDateTime expiresAt, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_SCOPES) List scopes) { + this.createdAt = createdAt; + this.expiresAt = expiresAt; + this.name = name; + this.scopes = scopes; + } + + /** + * Creation timestamp of the personal access token. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public PersonalAccessTokenAttributes expiresAt(OffsetDateTime expiresAt) { + this.expiresAt = expiresAt; + return this; + } + + /** + * Expiration timestamp of the personal access token. + * + * @return expiresAt + */ + @JsonProperty(JSON_PROPERTY_EXPIRES_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getExpiresAt() { + return expiresAt; + } + + public void setExpiresAt(OffsetDateTime expiresAt) { + this.expiresAt = expiresAt; + } + + /** + * Last modification timestamp of the personal access token. + * + * @return modifiedAt + */ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getModifiedAt() { + + if (modifiedAt == null) { + modifiedAt = JsonNullable.undefined(); + } + return modifiedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getModifiedAt_JsonNullable() { + return modifiedAt; + } + + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + private void setModifiedAt_JsonNullable(JsonNullable modifiedAt) { + this.modifiedAt = modifiedAt; + } + + public PersonalAccessTokenAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Name of the personal access token. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public PersonalAccessTokenAttributes scopes(List scopes) { + this.scopes = scopes; + return this; + } + + public PersonalAccessTokenAttributes addScopesItem(String scopesItem) { + this.scopes.add(scopesItem); + return this; + } + + /** + * Array of scopes granted to the personal access token. These define what permissions the token + * has. + * + * @return scopes + */ + @JsonProperty(JSON_PROPERTY_SCOPES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getScopes() { + return scopes; + } + + public void setScopes(List scopes) { + this.scopes = scopes; + } + + /** + * 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 PersonalAccessTokenAttributes + */ + @JsonAnySetter + public PersonalAccessTokenAttributes 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 PersonalAccessTokenAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PersonalAccessTokenAttributes personalAccessTokenAttributes = (PersonalAccessTokenAttributes) o; + return Objects.equals(this.createdAt, personalAccessTokenAttributes.createdAt) + && Objects.equals(this.expiresAt, personalAccessTokenAttributes.expiresAt) + && Objects.equals(this.modifiedAt, personalAccessTokenAttributes.modifiedAt) + && Objects.equals(this.name, personalAccessTokenAttributes.name) + && Objects.equals(this.scopes, personalAccessTokenAttributes.scopes) + && Objects.equals( + this.additionalProperties, personalAccessTokenAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, expiresAt, modifiedAt, name, scopes, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PersonalAccessTokenAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" scopes: ").append(toIndentedString(scopes)).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/PlaylistDataAttributesCreatedBy.java b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenCreateAttributes.java similarity index 50% rename from src/main/java/com/datadog/api/client/v2/model/PlaylistDataAttributesCreatedBy.java rename to src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenCreateAttributes.java index e0615f8f9bc..a028a7a0265 100644 --- a/src/main/java/com/datadog/api/client/v2/model/PlaylistDataAttributesCreatedBy.java +++ b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenCreateAttributes.java @@ -13,123 +13,76 @@ 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; -/** */ +/** Attributes used to create a personal access token. */ @JsonPropertyOrder({ - PlaylistDataAttributesCreatedBy.JSON_PROPERTY_HANDLE, - PlaylistDataAttributesCreatedBy.JSON_PROPERTY_ICON, - PlaylistDataAttributesCreatedBy.JSON_PROPERTY_ID, - PlaylistDataAttributesCreatedBy.JSON_PROPERTY_NAME, - PlaylistDataAttributesCreatedBy.JSON_PROPERTY_UUID + PersonalAccessTokenCreateAttributes.JSON_PROPERTY_EXPIRES_AT, + PersonalAccessTokenCreateAttributes.JSON_PROPERTY_NAME, + PersonalAccessTokenCreateAttributes.JSON_PROPERTY_SCOPES }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class PlaylistDataAttributesCreatedBy { +public class PersonalAccessTokenCreateAttributes { @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_HANDLE = "handle"; - private String handle; - - public static final String JSON_PROPERTY_ICON = "icon"; - private String icon; - - public static final String JSON_PROPERTY_ID = "id"; - private String id; + public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; + private OffsetDateTime expiresAt; public static final String JSON_PROPERTY_NAME = "name"; private String name; - public static final String JSON_PROPERTY_UUID = "uuid"; - private String uuid; + public static final String JSON_PROPERTY_SCOPES = "scopes"; + private List scopes = new ArrayList<>(); - public PlaylistDataAttributesCreatedBy() {} + public PersonalAccessTokenCreateAttributes() {} @JsonCreator - public PlaylistDataAttributesCreatedBy( - @JsonProperty(required = true, value = JSON_PROPERTY_HANDLE) String handle, - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_UUID) String uuid) { - this.handle = handle; - this.id = id; - this.uuid = uuid; - } - - public PlaylistDataAttributesCreatedBy handle(String handle) { - this.handle = handle; - return this; - } - - /** - * Gethandle - * - * @return handle - */ - @JsonProperty(JSON_PROPERTY_HANDLE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getHandle() { - return handle; - } - - public void setHandle(String handle) { - this.handle = handle; - } - - public PlaylistDataAttributesCreatedBy icon(String icon) { - this.icon = icon; - return this; - } - - /** - * Geticon - * - * @return icon - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ICON) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getIcon() { - return icon; - } - - public void setIcon(String icon) { - this.icon = icon; + public PersonalAccessTokenCreateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_EXPIRES_AT) OffsetDateTime expiresAt, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_SCOPES) List scopes) { + this.expiresAt = expiresAt; + this.name = name; + this.scopes = scopes; } - public PlaylistDataAttributesCreatedBy id(String id) { - this.id = id; + public PersonalAccessTokenCreateAttributes expiresAt(OffsetDateTime expiresAt) { + this.expiresAt = expiresAt; return this; } /** - * Getid + * Expiration timestamp for the personal access token. * - * @return id + * @return expiresAt */ - @JsonProperty(JSON_PROPERTY_ID) + @JsonProperty(JSON_PROPERTY_EXPIRES_AT) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; + public OffsetDateTime getExpiresAt() { + return expiresAt; } - public void setId(String id) { - this.id = id; + public void setExpiresAt(OffsetDateTime expiresAt) { + this.expiresAt = expiresAt; } - public PlaylistDataAttributesCreatedBy name(String name) { + public PersonalAccessTokenCreateAttributes name(String name) { this.name = name; return this; } /** - * Getname + * Name of the personal access token. * * @return name */ - @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getName() { return name; } @@ -138,24 +91,30 @@ public void setName(String name) { this.name = name; } - public PlaylistDataAttributesCreatedBy uuid(String uuid) { - this.uuid = uuid; + public PersonalAccessTokenCreateAttributes scopes(List scopes) { + this.scopes = scopes; + return this; + } + + public PersonalAccessTokenCreateAttributes addScopesItem(String scopesItem) { + this.scopes.add(scopesItem); return this; } /** - * Getuuid + * Array of scopes to grant the personal access token. These define what permissions the token + * will have. * - * @return uuid + * @return scopes */ - @JsonProperty(JSON_PROPERTY_UUID) + @JsonProperty(JSON_PROPERTY_SCOPES) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getUuid() { - return uuid; + public List getScopes() { + return scopes; } - public void setUuid(String uuid) { - this.uuid = uuid; + public void setScopes(List scopes) { + this.scopes = scopes; } /** @@ -170,10 +129,10 @@ public void setUuid(String uuid) { * * @param key The arbitrary key to set * @param value The associated value - * @return PlaylistDataAttributesCreatedBy + * @return PersonalAccessTokenCreateAttributes */ @JsonAnySetter - public PlaylistDataAttributesCreatedBy putAdditionalProperty(String key, Object value) { + public PersonalAccessTokenCreateAttributes putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -204,7 +163,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this PlaylistDataAttributesCreatedBy object is equal to o. */ + /** Return true if this PersonalAccessTokenCreateAttributes object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -213,31 +172,27 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PlaylistDataAttributesCreatedBy playlistDataAttributesCreatedBy = - (PlaylistDataAttributesCreatedBy) o; - return Objects.equals(this.handle, playlistDataAttributesCreatedBy.handle) - && Objects.equals(this.icon, playlistDataAttributesCreatedBy.icon) - && Objects.equals(this.id, playlistDataAttributesCreatedBy.id) - && Objects.equals(this.name, playlistDataAttributesCreatedBy.name) - && Objects.equals(this.uuid, playlistDataAttributesCreatedBy.uuid) + PersonalAccessTokenCreateAttributes personalAccessTokenCreateAttributes = + (PersonalAccessTokenCreateAttributes) o; + return Objects.equals(this.expiresAt, personalAccessTokenCreateAttributes.expiresAt) + && Objects.equals(this.name, personalAccessTokenCreateAttributes.name) + && Objects.equals(this.scopes, personalAccessTokenCreateAttributes.scopes) && Objects.equals( - this.additionalProperties, playlistDataAttributesCreatedBy.additionalProperties); + this.additionalProperties, personalAccessTokenCreateAttributes.additionalProperties); } @Override public int hashCode() { - return Objects.hash(handle, icon, id, name, uuid, additionalProperties); + return Objects.hash(expiresAt, name, scopes, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class PlaylistDataAttributesCreatedBy {\n"); - sb.append(" handle: ").append(toIndentedString(handle)).append("\n"); - sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("class PersonalAccessTokenCreateAttributes {\n"); + sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" scopes: ").append(toIndentedString(scopes)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/SnapshotCreateRequestData.java b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenCreateData.java similarity index 68% rename from src/main/java/com/datadog/api/client/v2/model/SnapshotCreateRequestData.java rename to src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenCreateData.java index ad9730f9cc6..6701ae26a71 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SnapshotCreateRequestData.java +++ b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenCreateData.java @@ -17,71 +17,73 @@ import java.util.Map; import java.util.Objects; -/** */ +/** Object used to create a personal access token. */ @JsonPropertyOrder({ - SnapshotCreateRequestData.JSON_PROPERTY_ATTRIBUTES, - SnapshotCreateRequestData.JSON_PROPERTY_TYPE + PersonalAccessTokenCreateData.JSON_PROPERTY_ATTRIBUTES, + PersonalAccessTokenCreateData.JSON_PROPERTY_TYPE }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class SnapshotCreateRequestData { +public class PersonalAccessTokenCreateData { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; - private SnapshotCreateRequestDataAttributes attributes; + private PersonalAccessTokenCreateAttributes attributes; public static final String JSON_PROPERTY_TYPE = "type"; - private SnapshotUpdateRequestDataType type = SnapshotUpdateRequestDataType.SNAPSHOTS; + private PersonalAccessTokenType type = PersonalAccessTokenType.PERSONAL_ACCESS_TOKENS; - public SnapshotCreateRequestData() {} + public PersonalAccessTokenCreateData() {} @JsonCreator - public SnapshotCreateRequestData( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - SnapshotUpdateRequestDataType type) { + public PersonalAccessTokenCreateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + PersonalAccessTokenCreateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) PersonalAccessTokenType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; this.type = type; this.unparsed |= !type.isValid(); } - public SnapshotCreateRequestData attributes(SnapshotCreateRequestDataAttributes attributes) { + public PersonalAccessTokenCreateData attributes(PersonalAccessTokenCreateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Getattributes + * Attributes used to create a personal access token. * * @return attributes */ - @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SnapshotCreateRequestDataAttributes getAttributes() { + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public PersonalAccessTokenCreateAttributes getAttributes() { return attributes; } - public void setAttributes(SnapshotCreateRequestDataAttributes attributes) { + public void setAttributes(PersonalAccessTokenCreateAttributes attributes) { this.attributes = attributes; } - public SnapshotCreateRequestData type(SnapshotUpdateRequestDataType type) { + public PersonalAccessTokenCreateData type(PersonalAccessTokenType type) { this.type = type; this.unparsed |= !type.isValid(); return this; } /** - * Snapshots resource type. + * Personal access tokens resource type. * * @return type */ @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SnapshotUpdateRequestDataType getType() { + public PersonalAccessTokenType getType() { return type; } - public void setType(SnapshotUpdateRequestDataType type) { + public void setType(PersonalAccessTokenType type) { if (!type.isValid()) { this.unparsed = true; } @@ -100,10 +102,10 @@ public void setType(SnapshotUpdateRequestDataType type) { * * @param key The arbitrary key to set * @param value The associated value - * @return SnapshotCreateRequestData + * @return PersonalAccessTokenCreateData */ @JsonAnySetter - public SnapshotCreateRequestData putAdditionalProperty(String key, Object value) { + public PersonalAccessTokenCreateData putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -134,7 +136,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this SnapshotCreateRequestData object is equal to o. */ + /** Return true if this PersonalAccessTokenCreateData object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -143,11 +145,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SnapshotCreateRequestData snapshotCreateRequestData = (SnapshotCreateRequestData) o; - return Objects.equals(this.attributes, snapshotCreateRequestData.attributes) - && Objects.equals(this.type, snapshotCreateRequestData.type) + PersonalAccessTokenCreateData personalAccessTokenCreateData = (PersonalAccessTokenCreateData) o; + return Objects.equals(this.attributes, personalAccessTokenCreateData.attributes) + && Objects.equals(this.type, personalAccessTokenCreateData.type) && Objects.equals( - this.additionalProperties, snapshotCreateRequestData.additionalProperties); + this.additionalProperties, personalAccessTokenCreateData.additionalProperties); } @Override @@ -158,7 +160,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class SnapshotCreateRequestData {\n"); + sb.append("class PersonalAccessTokenCreateData {\n"); sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" additionalProperties: ") diff --git a/src/main/java/com/datadog/api/client/v2/model/SnapshotCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenCreateRequest.java similarity index 74% rename from src/main/java/com/datadog/api/client/v2/model/SnapshotCreateRequest.java rename to src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenCreateRequest.java index 2a517c585cf..67f02e7c235 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SnapshotCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenCreateRequest.java @@ -17,42 +17,43 @@ import java.util.Map; import java.util.Objects; -/** */ -@JsonPropertyOrder({SnapshotCreateRequest.JSON_PROPERTY_DATA}) +/** Request to create a personal access token. */ +@JsonPropertyOrder({PersonalAccessTokenCreateRequest.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class SnapshotCreateRequest { +public class PersonalAccessTokenCreateRequest { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private SnapshotCreateRequestData data; + private PersonalAccessTokenCreateData data; - public SnapshotCreateRequest() {} + public PersonalAccessTokenCreateRequest() {} @JsonCreator - public SnapshotCreateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) SnapshotCreateRequestData data) { + public PersonalAccessTokenCreateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + PersonalAccessTokenCreateData data) { this.data = data; this.unparsed |= data.unparsed; } - public SnapshotCreateRequest data(SnapshotCreateRequestData data) { + public PersonalAccessTokenCreateRequest data(PersonalAccessTokenCreateData data) { this.data = data; this.unparsed |= data.unparsed; return this; } /** - * Getdata + * Object used to create a personal access token. * * @return data */ @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SnapshotCreateRequestData getData() { + public PersonalAccessTokenCreateData getData() { return data; } - public void setData(SnapshotCreateRequestData data) { + public void setData(PersonalAccessTokenCreateData data) { this.data = data; } @@ -68,10 +69,10 @@ public void setData(SnapshotCreateRequestData data) { * * @param key The arbitrary key to set * @param value The associated value - * @return SnapshotCreateRequest + * @return PersonalAccessTokenCreateRequest */ @JsonAnySetter - public SnapshotCreateRequest putAdditionalProperty(String key, Object value) { + public PersonalAccessTokenCreateRequest putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -102,7 +103,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this SnapshotCreateRequest object is equal to o. */ + /** Return true if this PersonalAccessTokenCreateRequest object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -111,9 +112,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SnapshotCreateRequest snapshotCreateRequest = (SnapshotCreateRequest) o; - return Objects.equals(this.data, snapshotCreateRequest.data) - && Objects.equals(this.additionalProperties, snapshotCreateRequest.additionalProperties); + PersonalAccessTokenCreateRequest personalAccessTokenCreateRequest = + (PersonalAccessTokenCreateRequest) o; + return Objects.equals(this.data, personalAccessTokenCreateRequest.data) + && Objects.equals( + this.additionalProperties, personalAccessTokenCreateRequest.additionalProperties); } @Override @@ -124,7 +127,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class SnapshotCreateRequest {\n"); + sb.append("class PersonalAccessTokenCreateRequest {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/Snapshot.java b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenGetResponse.java similarity index 77% rename from src/main/java/com/datadog/api/client/v2/model/Snapshot.java rename to src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenGetResponse.java index 24341bf283b..76438e67e8a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/Snapshot.java +++ b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenGetResponse.java @@ -16,34 +16,34 @@ import java.util.Map; import java.util.Objects; -/** */ -@JsonPropertyOrder({Snapshot.JSON_PROPERTY_DATA}) +/** Response for retrieving a personal access token. */ +@JsonPropertyOrder({PersonalAccessTokenGetResponse.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class Snapshot { +public class PersonalAccessTokenGetResponse { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private SnapshotData data; + private PersonalAccessToken data; - public Snapshot data(SnapshotData data) { + public PersonalAccessTokenGetResponse data(PersonalAccessToken data) { this.data = data; this.unparsed |= data.unparsed; return this; } /** - * Getdata + * Personal access token object. * * @return data */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SnapshotData getData() { + public PersonalAccessToken getData() { return data; } - public void setData(SnapshotData data) { + public void setData(PersonalAccessToken data) { this.data = data; } @@ -59,10 +59,10 @@ public void setData(SnapshotData data) { * * @param key The arbitrary key to set * @param value The associated value - * @return Snapshot + * @return PersonalAccessTokenGetResponse */ @JsonAnySetter - public Snapshot putAdditionalProperty(String key, Object value) { + public PersonalAccessTokenGetResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -93,7 +93,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this Snapshot object is equal to o. */ + /** Return true if this PersonalAccessTokenGetResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -102,9 +102,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - Snapshot snapshot = (Snapshot) o; - return Objects.equals(this.data, snapshot.data) - && Objects.equals(this.additionalProperties, snapshot.additionalProperties); + PersonalAccessTokenGetResponse personalAccessTokenGetResponse = + (PersonalAccessTokenGetResponse) o; + return Objects.equals(this.data, personalAccessTokenGetResponse.data) + && Objects.equals( + this.additionalProperties, personalAccessTokenGetResponse.additionalProperties); } @Override @@ -115,7 +117,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class Snapshot {\n"); + sb.append("class PersonalAccessTokenGetResponse {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/PlaylistsSession.java b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenRelationships.java similarity index 66% rename from src/main/java/com/datadog/api/client/v2/model/PlaylistsSession.java rename to src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenRelationships.java index 0e16db75edf..ffe981bb959 100644 --- a/src/main/java/com/datadog/api/client/v2/model/PlaylistsSession.java +++ b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenRelationships.java @@ -8,7 +8,6 @@ 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; @@ -17,43 +16,35 @@ import java.util.Map; import java.util.Objects; -/** */ -@JsonPropertyOrder({PlaylistsSession.JSON_PROPERTY_DATA}) +/** Resources related to the personal access token. */ +@JsonPropertyOrder({PersonalAccessTokenRelationships.JSON_PROPERTY_OWNED_BY}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class PlaylistsSession { +public class PersonalAccessTokenRelationships { @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_DATA = "data"; - private PlaylistsSessionData data; + public static final String JSON_PROPERTY_OWNED_BY = "owned_by"; + private RelationshipToUser ownedBy; - public PlaylistsSession() {} - - @JsonCreator - public PlaylistsSession( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) PlaylistsSessionData data) { - this.data = data; - this.unparsed |= data.unparsed; - } - - public PlaylistsSession data(PlaylistsSessionData data) { - this.data = data; - this.unparsed |= data.unparsed; + public PersonalAccessTokenRelationships ownedBy(RelationshipToUser ownedBy) { + this.ownedBy = ownedBy; + this.unparsed |= ownedBy.unparsed; return this; } /** - * Getdata + * Relationship to user. * - * @return data + * @return ownedBy */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public PlaylistsSessionData getData() { - return data; + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OWNED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToUser getOwnedBy() { + return ownedBy; } - public void setData(PlaylistsSessionData data) { - this.data = data; + public void setOwnedBy(RelationshipToUser ownedBy) { + this.ownedBy = ownedBy; } /** @@ -68,10 +59,10 @@ public void setData(PlaylistsSessionData data) { * * @param key The arbitrary key to set * @param value The associated value - * @return PlaylistsSession + * @return PersonalAccessTokenRelationships */ @JsonAnySetter - public PlaylistsSession putAdditionalProperty(String key, Object value) { + public PersonalAccessTokenRelationships putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -102,7 +93,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this PlaylistsSession object is equal to o. */ + /** Return true if this PersonalAccessTokenRelationships object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -111,21 +102,23 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PlaylistsSession playlistsSession = (PlaylistsSession) o; - return Objects.equals(this.data, playlistsSession.data) - && Objects.equals(this.additionalProperties, playlistsSession.additionalProperties); + PersonalAccessTokenRelationships personalAccessTokenRelationships = + (PersonalAccessTokenRelationships) o; + return Objects.equals(this.ownedBy, personalAccessTokenRelationships.ownedBy) + && Objects.equals( + this.additionalProperties, personalAccessTokenRelationships.additionalProperties); } @Override public int hashCode() { - return Objects.hash(data, additionalProperties); + return Objects.hash(ownedBy, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class PlaylistsSession {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("class PersonalAccessTokenRelationships {\n"); + sb.append(" ownedBy: ").append(toIndentedString(ownedBy)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/Playlist.java b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenResponse.java similarity index 74% rename from src/main/java/com/datadog/api/client/v2/model/Playlist.java rename to src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenResponse.java index 3555f38ea0d..d1e72c7783e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/Playlist.java +++ b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenResponse.java @@ -8,7 +8,6 @@ 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; @@ -17,41 +16,35 @@ import java.util.Map; import java.util.Objects; -/** */ -@JsonPropertyOrder({Playlist.JSON_PROPERTY_DATA}) +/** Response for creating a personal access token. */ +@JsonPropertyOrder({PersonalAccessTokenResponse.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class Playlist { +public class PersonalAccessTokenResponse { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private PlaylistData data; + private FullPersonalAccessToken data; - public Playlist() {} - - @JsonCreator - public Playlist(@JsonProperty(required = true, value = JSON_PROPERTY_DATA) PlaylistData data) { - this.data = data; - this.unparsed |= data.unparsed; - } - - public Playlist data(PlaylistData data) { + public PersonalAccessTokenResponse data(FullPersonalAccessToken data) { this.data = data; this.unparsed |= data.unparsed; return this; } /** - * Getdata + * Personal access token object with the secret key value. This is only returned when creating a + * new token. * * @return data */ + @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public PlaylistData getData() { + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FullPersonalAccessToken getData() { return data; } - public void setData(PlaylistData data) { + public void setData(FullPersonalAccessToken data) { this.data = data; } @@ -67,10 +60,10 @@ public void setData(PlaylistData data) { * * @param key The arbitrary key to set * @param value The associated value - * @return Playlist + * @return PersonalAccessTokenResponse */ @JsonAnySetter - public Playlist putAdditionalProperty(String key, Object value) { + public PersonalAccessTokenResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -101,7 +94,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this Playlist object is equal to o. */ + /** Return true if this PersonalAccessTokenResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -110,9 +103,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - Playlist playlist = (Playlist) o; - return Objects.equals(this.data, playlist.data) - && Objects.equals(this.additionalProperties, playlist.additionalProperties); + PersonalAccessTokenResponse personalAccessTokenResponse = (PersonalAccessTokenResponse) o; + return Objects.equals(this.data, personalAccessTokenResponse.data) + && Objects.equals( + this.additionalProperties, personalAccessTokenResponse.additionalProperties); } @Override @@ -123,7 +117,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class Playlist {\n"); + sb.append("class PersonalAccessTokenResponse {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/PlaylistDataType.java b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenType.java similarity index 53% rename from src/main/java/com/datadog/api/client/v2/model/PlaylistDataType.java rename to src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenType.java index 1cf4841a9c8..1bab069445d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/PlaylistDataType.java +++ b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenType.java @@ -18,38 +18,40 @@ import java.util.HashSet; import java.util.Set; -/** Rum replay playlist resource type. */ -@JsonSerialize(using = PlaylistDataType.PlaylistDataTypeSerializer.class) -public class PlaylistDataType extends ModelEnum { +/** Personal access tokens resource type. */ +@JsonSerialize(using = PersonalAccessTokenType.PersonalAccessTokenTypeSerializer.class) +public class PersonalAccessTokenType extends ModelEnum { private static final Set allowedValues = - new HashSet(Arrays.asList("rum_replay_playlist")); + new HashSet(Arrays.asList("personal_access_tokens")); - public static final PlaylistDataType RUM_REPLAY_PLAYLIST = - new PlaylistDataType("rum_replay_playlist"); + public static final PersonalAccessTokenType PERSONAL_ACCESS_TOKENS = + new PersonalAccessTokenType("personal_access_tokens"); - PlaylistDataType(String value) { + PersonalAccessTokenType(String value) { super(value, allowedValues); } - public static class PlaylistDataTypeSerializer extends StdSerializer { - public PlaylistDataTypeSerializer(Class t) { + public static class PersonalAccessTokenTypeSerializer + extends StdSerializer { + public PersonalAccessTokenTypeSerializer(Class t) { super(t); } - public PlaylistDataTypeSerializer() { + public PersonalAccessTokenTypeSerializer() { this(null); } @Override - public void serialize(PlaylistDataType value, JsonGenerator jgen, SerializerProvider provider) + public void serialize( + PersonalAccessTokenType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { jgen.writeObject(value.value); } } @JsonCreator - public static PlaylistDataType fromValue(String value) { - return new PlaylistDataType(value); + public static PersonalAccessTokenType fromValue(String value) { + return new PersonalAccessTokenType(value); } } diff --git a/src/main/java/com/datadog/api/client/v2/model/PlaylistsSessionDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenUpdateAttributes.java similarity index 59% rename from src/main/java/com/datadog/api/client/v2/model/PlaylistsSessionDataAttributes.java rename to src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenUpdateAttributes.java index 026a5f00858..128dc6dab43 100644 --- a/src/main/java/com/datadog/api/client/v2/model/PlaylistsSessionDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenUpdateAttributes.java @@ -12,73 +12,76 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.Objects; -/** */ +/** Attributes used to update a personal access token. */ @JsonPropertyOrder({ - PlaylistsSessionDataAttributes.JSON_PROPERTY_SESSION_EVENT, - PlaylistsSessionDataAttributes.JSON_PROPERTY_TRACK + PersonalAccessTokenUpdateAttributes.JSON_PROPERTY_NAME, + PersonalAccessTokenUpdateAttributes.JSON_PROPERTY_SCOPES }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class PlaylistsSessionDataAttributes { +public class PersonalAccessTokenUpdateAttributes { @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_SESSION_EVENT = "session_event"; - private Map sessionEvent = null; + public static final String JSON_PROPERTY_NAME = "name"; + private String name; - public static final String JSON_PROPERTY_TRACK = "track"; - private String track; + public static final String JSON_PROPERTY_SCOPES = "scopes"; + private List scopes = null; - public PlaylistsSessionDataAttributes sessionEvent(Map sessionEvent) { - this.sessionEvent = sessionEvent; - return this; - } - - public PlaylistsSessionDataAttributes putSessionEventItem(String key, Object sessionEventItem) { - if (this.sessionEvent == null) { - this.sessionEvent = new HashMap<>(); - } - this.sessionEvent.put(key, sessionEventItem); + public PersonalAccessTokenUpdateAttributes name(String name) { + this.name = name; return this; } /** - * GetsessionEvent + * New name for the personal access token. * - * @return sessionEvent + * @return name */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SESSION_EVENT) + @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getSessionEvent() { - return sessionEvent; + public String getName() { + return name; } - public void setSessionEvent(Map sessionEvent) { - this.sessionEvent = sessionEvent; + public void setName(String name) { + this.name = name; } - public PlaylistsSessionDataAttributes track(String track) { - this.track = track; + public PersonalAccessTokenUpdateAttributes scopes(List scopes) { + this.scopes = scopes; + return this; + } + + public PersonalAccessTokenUpdateAttributes addScopesItem(String scopesItem) { + if (this.scopes == null) { + this.scopes = new ArrayList<>(); + } + this.scopes.add(scopesItem); return this; } /** - * Gettrack + * New array of scopes for the personal access token. If provided, this will replace the existing + * scopes. * - * @return track + * @return scopes */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TRACK) + @JsonProperty(JSON_PROPERTY_SCOPES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTrack() { - return track; + public List getScopes() { + return scopes; } - public void setTrack(String track) { - this.track = track; + public void setScopes(List scopes) { + this.scopes = scopes; } /** @@ -93,10 +96,10 @@ public void setTrack(String track) { * * @param key The arbitrary key to set * @param value The associated value - * @return PlaylistsSessionDataAttributes + * @return PersonalAccessTokenUpdateAttributes */ @JsonAnySetter - public PlaylistsSessionDataAttributes putAdditionalProperty(String key, Object value) { + public PersonalAccessTokenUpdateAttributes putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -127,7 +130,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this PlaylistsSessionDataAttributes object is equal to o. */ + /** Return true if this PersonalAccessTokenUpdateAttributes object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -136,25 +139,25 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PlaylistsSessionDataAttributes playlistsSessionDataAttributes = - (PlaylistsSessionDataAttributes) o; - return Objects.equals(this.sessionEvent, playlistsSessionDataAttributes.sessionEvent) - && Objects.equals(this.track, playlistsSessionDataAttributes.track) + PersonalAccessTokenUpdateAttributes personalAccessTokenUpdateAttributes = + (PersonalAccessTokenUpdateAttributes) o; + return Objects.equals(this.name, personalAccessTokenUpdateAttributes.name) + && Objects.equals(this.scopes, personalAccessTokenUpdateAttributes.scopes) && Objects.equals( - this.additionalProperties, playlistsSessionDataAttributes.additionalProperties); + this.additionalProperties, personalAccessTokenUpdateAttributes.additionalProperties); } @Override public int hashCode() { - return Objects.hash(sessionEvent, track, additionalProperties); + return Objects.hash(name, scopes, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class PlaylistsSessionDataAttributes {\n"); - sb.append(" sessionEvent: ").append(toIndentedString(sessionEvent)).append("\n"); - sb.append(" track: ").append(toIndentedString(track)).append("\n"); + sb.append("class PersonalAccessTokenUpdateAttributes {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" scopes: ").append(toIndentedString(scopes)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/SnapshotUpdateRequestData.java b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenUpdateData.java similarity index 65% rename from src/main/java/com/datadog/api/client/v2/model/SnapshotUpdateRequestData.java rename to src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenUpdateData.java index 67389881cfc..65606fd6208 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SnapshotUpdateRequestData.java +++ b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenUpdateData.java @@ -16,97 +16,101 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import java.util.UUID; -/** */ +/** Object used to update a personal access token. */ @JsonPropertyOrder({ - SnapshotUpdateRequestData.JSON_PROPERTY_ATTRIBUTES, - SnapshotUpdateRequestData.JSON_PROPERTY_ID, - SnapshotUpdateRequestData.JSON_PROPERTY_TYPE + PersonalAccessTokenUpdateData.JSON_PROPERTY_ATTRIBUTES, + PersonalAccessTokenUpdateData.JSON_PROPERTY_ID, + PersonalAccessTokenUpdateData.JSON_PROPERTY_TYPE }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class SnapshotUpdateRequestData { +public class PersonalAccessTokenUpdateData { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; - private SnapshotUpdateRequestDataAttributes attributes; + private PersonalAccessTokenUpdateAttributes attributes; public static final String JSON_PROPERTY_ID = "id"; - private String id; + private UUID id; public static final String JSON_PROPERTY_TYPE = "type"; - private SnapshotUpdateRequestDataType type = SnapshotUpdateRequestDataType.SNAPSHOTS; + private PersonalAccessTokenType type = PersonalAccessTokenType.PERSONAL_ACCESS_TOKENS; - public SnapshotUpdateRequestData() {} + public PersonalAccessTokenUpdateData() {} @JsonCreator - public SnapshotUpdateRequestData( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - SnapshotUpdateRequestDataType type) { + public PersonalAccessTokenUpdateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + PersonalAccessTokenUpdateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) PersonalAccessTokenType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; this.type = type; this.unparsed |= !type.isValid(); } - public SnapshotUpdateRequestData attributes(SnapshotUpdateRequestDataAttributes attributes) { + public PersonalAccessTokenUpdateData attributes(PersonalAccessTokenUpdateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Getattributes + * Attributes used to update a personal access token. * * @return attributes */ - @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SnapshotUpdateRequestDataAttributes getAttributes() { + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public PersonalAccessTokenUpdateAttributes getAttributes() { return attributes; } - public void setAttributes(SnapshotUpdateRequestDataAttributes attributes) { + public void setAttributes(PersonalAccessTokenUpdateAttributes attributes) { this.attributes = attributes; } - public SnapshotUpdateRequestData id(String id) { + public PersonalAccessTokenUpdateData id(UUID id) { this.id = id; return this; } /** - * Getid + * UUID of the personal access token. Must match the path parameter. * * @return id */ - @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { return id; } - public void setId(String id) { + public void setId(UUID id) { this.id = id; } - public SnapshotUpdateRequestData type(SnapshotUpdateRequestDataType type) { + public PersonalAccessTokenUpdateData type(PersonalAccessTokenType type) { this.type = type; this.unparsed |= !type.isValid(); return this; } /** - * Snapshots resource type. + * Personal access tokens resource type. * * @return type */ @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SnapshotUpdateRequestDataType getType() { + public PersonalAccessTokenType getType() { return type; } - public void setType(SnapshotUpdateRequestDataType type) { + public void setType(PersonalAccessTokenType type) { if (!type.isValid()) { this.unparsed = true; } @@ -125,10 +129,10 @@ public void setType(SnapshotUpdateRequestDataType type) { * * @param key The arbitrary key to set * @param value The associated value - * @return SnapshotUpdateRequestData + * @return PersonalAccessTokenUpdateData */ @JsonAnySetter - public SnapshotUpdateRequestData putAdditionalProperty(String key, Object value) { + public PersonalAccessTokenUpdateData putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -159,7 +163,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this SnapshotUpdateRequestData object is equal to o. */ + /** Return true if this PersonalAccessTokenUpdateData object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -168,12 +172,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SnapshotUpdateRequestData snapshotUpdateRequestData = (SnapshotUpdateRequestData) o; - return Objects.equals(this.attributes, snapshotUpdateRequestData.attributes) - && Objects.equals(this.id, snapshotUpdateRequestData.id) - && Objects.equals(this.type, snapshotUpdateRequestData.type) + PersonalAccessTokenUpdateData personalAccessTokenUpdateData = (PersonalAccessTokenUpdateData) o; + return Objects.equals(this.attributes, personalAccessTokenUpdateData.attributes) + && Objects.equals(this.id, personalAccessTokenUpdateData.id) + && Objects.equals(this.type, personalAccessTokenUpdateData.type) && Objects.equals( - this.additionalProperties, snapshotUpdateRequestData.additionalProperties); + this.additionalProperties, personalAccessTokenUpdateData.additionalProperties); } @Override @@ -184,7 +188,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class SnapshotUpdateRequestData {\n"); + sb.append("class PersonalAccessTokenUpdateData {\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"); diff --git a/src/main/java/com/datadog/api/client/v2/model/SnapshotUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenUpdateRequest.java similarity index 74% rename from src/main/java/com/datadog/api/client/v2/model/SnapshotUpdateRequest.java rename to src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenUpdateRequest.java index 21784b0f2ae..b5d33d097b9 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SnapshotUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokenUpdateRequest.java @@ -17,42 +17,43 @@ import java.util.Map; import java.util.Objects; -/** */ -@JsonPropertyOrder({SnapshotUpdateRequest.JSON_PROPERTY_DATA}) +/** Request to update a personal access token. */ +@JsonPropertyOrder({PersonalAccessTokenUpdateRequest.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class SnapshotUpdateRequest { +public class PersonalAccessTokenUpdateRequest { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private SnapshotUpdateRequestData data; + private PersonalAccessTokenUpdateData data; - public SnapshotUpdateRequest() {} + public PersonalAccessTokenUpdateRequest() {} @JsonCreator - public SnapshotUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) SnapshotUpdateRequestData data) { + public PersonalAccessTokenUpdateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + PersonalAccessTokenUpdateData data) { this.data = data; this.unparsed |= data.unparsed; } - public SnapshotUpdateRequest data(SnapshotUpdateRequestData data) { + public PersonalAccessTokenUpdateRequest data(PersonalAccessTokenUpdateData data) { this.data = data; this.unparsed |= data.unparsed; return this; } /** - * Getdata + * Object used to update a personal access token. * * @return data */ @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SnapshotUpdateRequestData getData() { + public PersonalAccessTokenUpdateData getData() { return data; } - public void setData(SnapshotUpdateRequestData data) { + public void setData(PersonalAccessTokenUpdateData data) { this.data = data; } @@ -68,10 +69,10 @@ public void setData(SnapshotUpdateRequestData data) { * * @param key The arbitrary key to set * @param value The associated value - * @return SnapshotUpdateRequest + * @return PersonalAccessTokenUpdateRequest */ @JsonAnySetter - public SnapshotUpdateRequest putAdditionalProperty(String key, Object value) { + public PersonalAccessTokenUpdateRequest putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -102,7 +103,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this SnapshotUpdateRequest object is equal to o. */ + /** Return true if this PersonalAccessTokenUpdateRequest object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -111,9 +112,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SnapshotUpdateRequest snapshotUpdateRequest = (SnapshotUpdateRequest) o; - return Objects.equals(this.data, snapshotUpdateRequest.data) - && Objects.equals(this.additionalProperties, snapshotUpdateRequest.additionalProperties); + PersonalAccessTokenUpdateRequest personalAccessTokenUpdateRequest = + (PersonalAccessTokenUpdateRequest) o; + return Objects.equals(this.data, personalAccessTokenUpdateRequest.data) + && Objects.equals( + this.additionalProperties, personalAccessTokenUpdateRequest.additionalProperties); } @Override @@ -124,7 +127,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class SnapshotUpdateRequest {\n"); + sb.append("class PersonalAccessTokenUpdateRequest {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/ViewershipHistorySessionArray.java b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokensListResponse.java similarity index 60% rename from src/main/java/com/datadog/api/client/v2/model/ViewershipHistorySessionArray.java rename to src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokensListResponse.java index b2d100f4021..47db72c3ba9 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ViewershipHistorySessionArray.java +++ b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokensListResponse.java @@ -8,7 +8,6 @@ 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; @@ -19,53 +18,76 @@ import java.util.Map; import java.util.Objects; -/** */ -@JsonPropertyOrder({ViewershipHistorySessionArray.JSON_PROPERTY_DATA}) +/** Response for a list of personal access tokens. */ +@JsonPropertyOrder({ + PersonalAccessTokensListResponse.JSON_PROPERTY_DATA, + PersonalAccessTokensListResponse.JSON_PROPERTY_META +}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class ViewershipHistorySessionArray { +public class PersonalAccessTokensListResponse { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private List data = new ArrayList<>(); + private List data = null; - public ViewershipHistorySessionArray() {} + public static final String JSON_PROPERTY_META = "meta"; + private PersonalAccessTokensResponseMeta meta; - @JsonCreator - public ViewershipHistorySessionArray( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - List data) { + public PersonalAccessTokensListResponse data(List data) { this.data = data; - } - - public ViewershipHistorySessionArray data(List data) { - this.data = data; - for (ViewershipHistorySessionData item : data) { + for (PersonalAccessToken item : data) { this.unparsed |= item.unparsed; } return this; } - public ViewershipHistorySessionArray addDataItem(ViewershipHistorySessionData dataItem) { + public PersonalAccessTokensListResponse addDataItem(PersonalAccessToken dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } this.data.add(dataItem); this.unparsed |= dataItem.unparsed; return this; } /** - * Getdata + * Array of personal access tokens. * * @return data */ + @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getData() { + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { return data; } - public void setData(List data) { + public void setData(List data) { this.data = data; } + public PersonalAccessTokensListResponse meta(PersonalAccessTokensResponseMeta meta) { + this.meta = meta; + this.unparsed |= meta.unparsed; + return this; + } + + /** + * Additional information related to the personal access tokens response. + * + * @return meta + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public PersonalAccessTokensResponseMeta getMeta() { + return meta; + } + + public void setMeta(PersonalAccessTokensResponseMeta meta) { + this.meta = meta; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -78,10 +100,10 @@ public void setData(List data) { * * @param key The arbitrary key to set * @param value The associated value - * @return ViewershipHistorySessionArray + * @return PersonalAccessTokensListResponse */ @JsonAnySetter - public ViewershipHistorySessionArray putAdditionalProperty(String key, Object value) { + public PersonalAccessTokensListResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -112,7 +134,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this ViewershipHistorySessionArray object is equal to o. */ + /** Return true if this PersonalAccessTokensListResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -121,22 +143,25 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ViewershipHistorySessionArray viewershipHistorySessionArray = (ViewershipHistorySessionArray) o; - return Objects.equals(this.data, viewershipHistorySessionArray.data) + PersonalAccessTokensListResponse personalAccessTokensListResponse = + (PersonalAccessTokensListResponse) o; + return Objects.equals(this.data, personalAccessTokensListResponse.data) + && Objects.equals(this.meta, personalAccessTokensListResponse.meta) && Objects.equals( - this.additionalProperties, viewershipHistorySessionArray.additionalProperties); + this.additionalProperties, personalAccessTokensListResponse.additionalProperties); } @Override public int hashCode() { - return Objects.hash(data, additionalProperties); + return Objects.hash(data, meta, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ViewershipHistorySessionArray {\n"); + sb.append("class PersonalAccessTokensListResponse {\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"); diff --git a/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokensResponseMeta.java b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokensResponseMeta.java new file mode 100644 index 00000000000..670c5c5c33d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokensResponseMeta.java @@ -0,0 +1,138 @@ +/* + * 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; + +/** Additional information related to the personal access tokens response. */ +@JsonPropertyOrder({PersonalAccessTokensResponseMeta.JSON_PROPERTY_PAGE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class PersonalAccessTokensResponseMeta { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_PAGE = "page"; + private PersonalAccessTokensResponseMetaPage page; + + public PersonalAccessTokensResponseMeta page(PersonalAccessTokensResponseMetaPage page) { + this.page = page; + this.unparsed |= page.unparsed; + return this; + } + + /** + * Pagination information for personal access tokens response. + * + * @return page + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public PersonalAccessTokensResponseMetaPage getPage() { + return page; + } + + public void setPage(PersonalAccessTokensResponseMetaPage page) { + this.page = page; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return PersonalAccessTokensResponseMeta + */ + @JsonAnySetter + public PersonalAccessTokensResponseMeta 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 PersonalAccessTokensResponseMeta object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PersonalAccessTokensResponseMeta personalAccessTokensResponseMeta = + (PersonalAccessTokensResponseMeta) o; + return Objects.equals(this.page, personalAccessTokensResponseMeta.page) + && Objects.equals( + this.additionalProperties, personalAccessTokensResponseMeta.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(page, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PersonalAccessTokensResponseMeta {\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/PlaylistArray.java b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokensResponseMetaPage.java similarity index 62% rename from src/main/java/com/datadog/api/client/v2/model/PlaylistArray.java rename to src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokensResponseMetaPage.java index 7771d36f76e..3a0a053c3ce 100644 --- a/src/main/java/com/datadog/api/client/v2/model/PlaylistArray.java +++ b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokensResponseMetaPage.java @@ -8,61 +8,42 @@ 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; -/** */ -@JsonPropertyOrder({PlaylistArray.JSON_PROPERTY_DATA}) +/** Pagination information for personal access tokens response. */ +@JsonPropertyOrder({PersonalAccessTokensResponseMetaPage.JSON_PROPERTY_TOTAL_FILTERED_COUNT}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class PlaylistArray { +public class PersonalAccessTokensResponseMetaPage { @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_DATA = "data"; - private List data = new ArrayList<>(); + public static final String JSON_PROPERTY_TOTAL_FILTERED_COUNT = "total_filtered_count"; + private Long totalFilteredCount; - public PlaylistArray() {} - - @JsonCreator - public PlaylistArray( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) { - this.data = data; - } - - public PlaylistArray data(List data) { - this.data = data; - for (PlaylistData item : data) { - this.unparsed |= item.unparsed; - } - return this; - } - - public PlaylistArray addDataItem(PlaylistData dataItem) { - this.data.add(dataItem); - this.unparsed |= dataItem.unparsed; + public PersonalAccessTokensResponseMetaPage totalFilteredCount(Long totalFilteredCount) { + this.totalFilteredCount = totalFilteredCount; return this; } /** - * Getdata + * Total filtered personal access token count. * - * @return data + * @return totalFilteredCount */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getData() { - return data; + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_FILTERED_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotalFilteredCount() { + return totalFilteredCount; } - public void setData(List data) { - this.data = data; + public void setTotalFilteredCount(Long totalFilteredCount) { + this.totalFilteredCount = totalFilteredCount; } /** @@ -77,10 +58,10 @@ public void setData(List data) { * * @param key The arbitrary key to set * @param value The associated value - * @return PlaylistArray + * @return PersonalAccessTokensResponseMetaPage */ @JsonAnySetter - public PlaylistArray putAdditionalProperty(String key, Object value) { + public PersonalAccessTokensResponseMetaPage putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -111,7 +92,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this PlaylistArray object is equal to o. */ + /** Return true if this PersonalAccessTokensResponseMetaPage object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -120,21 +101,24 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - PlaylistArray playlistArray = (PlaylistArray) o; - return Objects.equals(this.data, playlistArray.data) - && Objects.equals(this.additionalProperties, playlistArray.additionalProperties); + PersonalAccessTokensResponseMetaPage personalAccessTokensResponseMetaPage = + (PersonalAccessTokensResponseMetaPage) o; + return Objects.equals( + this.totalFilteredCount, personalAccessTokensResponseMetaPage.totalFilteredCount) + && Objects.equals( + this.additionalProperties, personalAccessTokensResponseMetaPage.additionalProperties); } @Override public int hashCode() { - return Objects.hash(data, additionalProperties); + return Objects.hash(totalFilteredCount, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class PlaylistArray {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("class PersonalAccessTokensResponseMetaPage {\n"); + sb.append(" totalFilteredCount: ").append(toIndentedString(totalFilteredCount)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokensSort.java b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokensSort.java new file mode 100644 index 00000000000..49aceafddd1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PersonalAccessTokensSort.java @@ -0,0 +1,68 @@ +/* + * 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; + +/** Sorting options for personal access tokens. */ +@JsonSerialize(using = PersonalAccessTokensSort.PersonalAccessTokensSortSerializer.class) +public class PersonalAccessTokensSort extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList("name", "-name", "created_at", "-created_at", "expires_at", "-expires_at")); + + public static final PersonalAccessTokensSort NAME_ASCENDING = + new PersonalAccessTokensSort("name"); + public static final PersonalAccessTokensSort NAME_DESCENDING = + new PersonalAccessTokensSort("-name"); + public static final PersonalAccessTokensSort CREATED_AT_ASCENDING = + new PersonalAccessTokensSort("created_at"); + public static final PersonalAccessTokensSort CREATED_AT_DESCENDING = + new PersonalAccessTokensSort("-created_at"); + public static final PersonalAccessTokensSort EXPIRES_AT_ASCENDING = + new PersonalAccessTokensSort("expires_at"); + public static final PersonalAccessTokensSort EXPIRES_AT_DESCENDING = + new PersonalAccessTokensSort("-expires_at"); + + PersonalAccessTokensSort(String value) { + super(value, allowedValues); + } + + public static class PersonalAccessTokensSortSerializer + extends StdSerializer { + public PersonalAccessTokensSortSerializer(Class t) { + super(t); + } + + public PersonalAccessTokensSortSerializer() { + this(null); + } + + @Override + public void serialize( + PersonalAccessTokensSort value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static PersonalAccessTokensSort fromValue(String value) { + return new PersonalAccessTokensSort(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/PlaylistData.java b/src/main/java/com/datadog/api/client/v2/model/PlaylistData.java deleted file mode 100644 index c06c8574993..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/PlaylistData.java +++ /dev/null @@ -1,205 +0,0 @@ -/* - * 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; - -/** */ -@JsonPropertyOrder({ - PlaylistData.JSON_PROPERTY_ATTRIBUTES, - PlaylistData.JSON_PROPERTY_ID, - PlaylistData.JSON_PROPERTY_TYPE -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class PlaylistData { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; - private PlaylistDataAttributes attributes; - - public static final String JSON_PROPERTY_ID = "id"; - private String id; - - public static final String JSON_PROPERTY_TYPE = "type"; - private PlaylistDataType type = PlaylistDataType.RUM_REPLAY_PLAYLIST; - - public PlaylistData() {} - - @JsonCreator - public PlaylistData( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) PlaylistDataType type) { - this.type = type; - this.unparsed |= !type.isValid(); - } - - public PlaylistData attributes(PlaylistDataAttributes attributes) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - return this; - } - - /** - * Getattributes - * - * @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public PlaylistDataAttributes getAttributes() { - return attributes; - } - - public void setAttributes(PlaylistDataAttributes attributes) { - this.attributes = attributes; - } - - public PlaylistData id(String id) { - this.id = id; - return this; - } - - /** - * Getid - * - * @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 PlaylistData type(PlaylistDataType type) { - this.type = type; - this.unparsed |= !type.isValid(); - return this; - } - - /** - * Rum replay playlist resource type. - * - * @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public PlaylistDataType getType() { - return type; - } - - public void setType(PlaylistDataType 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 PlaylistData - */ - @JsonAnySetter - public PlaylistData 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 PlaylistData object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PlaylistData playlistData = (PlaylistData) o; - return Objects.equals(this.attributes, playlistData.attributes) - && Objects.equals(this.id, playlistData.id) - && Objects.equals(this.type, playlistData.type) - && Objects.equals(this.additionalProperties, playlistData.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, id, type, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PlaylistData {\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/PlaylistDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/PlaylistDataAttributes.java deleted file mode 100644 index 9301269572b..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/PlaylistDataAttributes.java +++ /dev/null @@ -1,283 +0,0 @@ -/* - * 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; - -/** */ -@JsonPropertyOrder({ - PlaylistDataAttributes.JSON_PROPERTY_CREATED_AT, - PlaylistDataAttributes.JSON_PROPERTY_CREATED_BY, - PlaylistDataAttributes.JSON_PROPERTY_DESCRIPTION, - PlaylistDataAttributes.JSON_PROPERTY_NAME, - PlaylistDataAttributes.JSON_PROPERTY_SESSION_COUNT, - PlaylistDataAttributes.JSON_PROPERTY_UPDATED_AT -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class PlaylistDataAttributes { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - private OffsetDateTime createdAt; - - public static final String JSON_PROPERTY_CREATED_BY = "created_by"; - private PlaylistDataAttributesCreatedBy createdBy; - - public static final String JSON_PROPERTY_DESCRIPTION = "description"; - private String description; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_SESSION_COUNT = "session_count"; - private Long sessionCount; - - public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; - private OffsetDateTime updatedAt; - - public PlaylistDataAttributes() {} - - @JsonCreator - public PlaylistDataAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.name = name; - } - - public PlaylistDataAttributes createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * GetcreatedAt - * - * @return createdAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - public PlaylistDataAttributes createdBy(PlaylistDataAttributesCreatedBy createdBy) { - this.createdBy = createdBy; - this.unparsed |= createdBy.unparsed; - return this; - } - - /** - * GetcreatedBy - * - * @return createdBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public PlaylistDataAttributesCreatedBy getCreatedBy() { - return createdBy; - } - - public void setCreatedBy(PlaylistDataAttributesCreatedBy createdBy) { - this.createdBy = createdBy; - } - - public PlaylistDataAttributes description(String description) { - this.description = description; - return this; - } - - /** - * Getdescription - * - * @return description - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public PlaylistDataAttributes name(String name) { - this.name = name; - return this; - } - - /** - * Getname - * - * @return name - */ - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public PlaylistDataAttributes sessionCount(Long sessionCount) { - this.sessionCount = sessionCount; - return this; - } - - /** - * GetsessionCount - * - * @return sessionCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SESSION_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getSessionCount() { - return sessionCount; - } - - public void setSessionCount(Long sessionCount) { - this.sessionCount = sessionCount; - } - - public PlaylistDataAttributes updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * GetupdatedAt - * - * @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; - } - - /** - * 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 PlaylistDataAttributes - */ - @JsonAnySetter - public PlaylistDataAttributes 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 PlaylistDataAttributes object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PlaylistDataAttributes playlistDataAttributes = (PlaylistDataAttributes) o; - return Objects.equals(this.createdAt, playlistDataAttributes.createdAt) - && Objects.equals(this.createdBy, playlistDataAttributes.createdBy) - && Objects.equals(this.description, playlistDataAttributes.description) - && Objects.equals(this.name, playlistDataAttributes.name) - && Objects.equals(this.sessionCount, playlistDataAttributes.sessionCount) - && Objects.equals(this.updatedAt, playlistDataAttributes.updatedAt) - && Objects.equals(this.additionalProperties, playlistDataAttributes.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash( - createdAt, createdBy, description, name, sessionCount, updatedAt, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PlaylistDataAttributes {\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" sessionCount: ").append(toIndentedString(sessionCount)).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/PlaylistsSessionArray.java b/src/main/java/com/datadog/api/client/v2/model/PlaylistsSessionArray.java deleted file mode 100644 index 18c1d418d09..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/PlaylistsSessionArray.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * 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; - -/** */ -@JsonPropertyOrder({PlaylistsSessionArray.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class PlaylistsSessionArray { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_DATA = "data"; - private List data = new ArrayList<>(); - - public PlaylistsSessionArray() {} - - @JsonCreator - public PlaylistsSessionArray( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) { - this.data = data; - } - - public PlaylistsSessionArray data(List data) { - this.data = data; - for (PlaylistsSessionData item : data) { - this.unparsed |= item.unparsed; - } - return this; - } - - public PlaylistsSessionArray addDataItem(PlaylistsSessionData dataItem) { - this.data.add(dataItem); - this.unparsed |= dataItem.unparsed; - return this; - } - - /** - * Getdata - * - * @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getData() { - return data; - } - - public void setData(List data) { - this.data = data; - } - - /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. - * - * @param key The arbitrary key to set - * @param value The associated value - * @return PlaylistsSessionArray - */ - @JsonAnySetter - public PlaylistsSessionArray 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 PlaylistsSessionArray object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PlaylistsSessionArray playlistsSessionArray = (PlaylistsSessionArray) o; - return Objects.equals(this.data, playlistsSessionArray.data) - && Objects.equals(this.additionalProperties, playlistsSessionArray.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(data, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PlaylistsSessionArray {\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/SessionIdArray.java b/src/main/java/com/datadog/api/client/v2/model/SessionIdArray.java deleted file mode 100644 index fe887ef862e..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/SessionIdArray.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * 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; - -/** */ -@JsonPropertyOrder({SessionIdArray.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class SessionIdArray { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_DATA = "data"; - private List data = new ArrayList<>(); - - public SessionIdArray() {} - - @JsonCreator - public SessionIdArray( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) { - this.data = data; - } - - public SessionIdArray data(List data) { - this.data = data; - for (SessionIdData item : data) { - this.unparsed |= item.unparsed; - } - return this; - } - - public SessionIdArray addDataItem(SessionIdData dataItem) { - this.data.add(dataItem); - this.unparsed |= dataItem.unparsed; - return this; - } - - /** - * Getdata - * - * @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getData() { - return data; - } - - public void setData(List data) { - this.data = data; - } - - /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. - * - * @param key The arbitrary key to set - * @param value The associated value - * @return SessionIdArray - */ - @JsonAnySetter - public SessionIdArray 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 SessionIdArray object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SessionIdArray sessionIdArray = (SessionIdArray) o; - return Objects.equals(this.data, sessionIdArray.data) - && Objects.equals(this.additionalProperties, sessionIdArray.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(data, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SessionIdArray {\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/SessionIdData.java b/src/main/java/com/datadog/api/client/v2/model/SessionIdData.java deleted file mode 100644 index 1bed5e3db2e..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/SessionIdData.java +++ /dev/null @@ -1,176 +0,0 @@ -/* - * 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; - -/** */ -@JsonPropertyOrder({SessionIdData.JSON_PROPERTY_ID, SessionIdData.JSON_PROPERTY_TYPE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class SessionIdData { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_ID = "id"; - private String id; - - public static final String JSON_PROPERTY_TYPE = "type"; - private ViewershipHistorySessionDataType type = - ViewershipHistorySessionDataType.RUM_REPLAY_SESSION; - - public SessionIdData() {} - - @JsonCreator - public SessionIdData( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - ViewershipHistorySessionDataType type) { - this.type = type; - this.unparsed |= !type.isValid(); - } - - public SessionIdData id(String id) { - this.id = id; - return this; - } - - /** - * Getid - * - * @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 SessionIdData type(ViewershipHistorySessionDataType type) { - this.type = type; - this.unparsed |= !type.isValid(); - return this; - } - - /** - * Rum replay session resource type. - * - * @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ViewershipHistorySessionDataType getType() { - return type; - } - - public void setType(ViewershipHistorySessionDataType 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 SessionIdData - */ - @JsonAnySetter - public SessionIdData 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 SessionIdData object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SessionIdData sessionIdData = (SessionIdData) o; - return Objects.equals(this.id, sessionIdData.id) - && Objects.equals(this.type, sessionIdData.type) - && Objects.equals(this.additionalProperties, sessionIdData.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(id, type, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SessionIdData {\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/SnapshotCreateRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SnapshotCreateRequestDataAttributes.java deleted file mode 100644 index 4b14cbe7f4a..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/SnapshotCreateRequestDataAttributes.java +++ /dev/null @@ -1,386 +0,0 @@ -/* - * 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; - -/** */ -@JsonPropertyOrder({ - SnapshotCreateRequestDataAttributes.JSON_PROPERTY_APPLICATION_ID, - SnapshotCreateRequestDataAttributes.JSON_PROPERTY_DEVICE_TYPE, - SnapshotCreateRequestDataAttributes.JSON_PROPERTY_EVENT_ID, - SnapshotCreateRequestDataAttributes.JSON_PROPERTY_IS_DEVICE_TYPE_SELECTED_BY_USER, - SnapshotCreateRequestDataAttributes.JSON_PROPERTY_SESSION_ID, - SnapshotCreateRequestDataAttributes.JSON_PROPERTY_SNAPSHOT_NAME, - SnapshotCreateRequestDataAttributes.JSON_PROPERTY_START, - SnapshotCreateRequestDataAttributes.JSON_PROPERTY_VIEW_ID, - SnapshotCreateRequestDataAttributes.JSON_PROPERTY_VIEW_NAME -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class SnapshotCreateRequestDataAttributes { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_APPLICATION_ID = "application_id"; - private String applicationId; - - public static final String JSON_PROPERTY_DEVICE_TYPE = "device_type"; - private String deviceType; - - public static final String JSON_PROPERTY_EVENT_ID = "event_id"; - private String eventId; - - public static final String JSON_PROPERTY_IS_DEVICE_TYPE_SELECTED_BY_USER = - "is_device_type_selected_by_user"; - private Boolean isDeviceTypeSelectedByUser; - - public static final String JSON_PROPERTY_SESSION_ID = "session_id"; - private String sessionId; - - public static final String JSON_PROPERTY_SNAPSHOT_NAME = "snapshot_name"; - private String snapshotName; - - public static final String JSON_PROPERTY_START = "start"; - private Long start; - - public static final String JSON_PROPERTY_VIEW_ID = "view_id"; - private String viewId; - - public static final String JSON_PROPERTY_VIEW_NAME = "view_name"; - private String viewName; - - public SnapshotCreateRequestDataAttributes() {} - - @JsonCreator - public SnapshotCreateRequestDataAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_APPLICATION_ID) String applicationId, - @JsonProperty(required = true, value = JSON_PROPERTY_DEVICE_TYPE) String deviceType, - @JsonProperty(required = true, value = JSON_PROPERTY_EVENT_ID) String eventId, - @JsonProperty(required = true, value = JSON_PROPERTY_IS_DEVICE_TYPE_SELECTED_BY_USER) - Boolean isDeviceTypeSelectedByUser, - @JsonProperty(required = true, value = JSON_PROPERTY_SNAPSHOT_NAME) String snapshotName, - @JsonProperty(required = true, value = JSON_PROPERTY_START) Long start, - @JsonProperty(required = true, value = JSON_PROPERTY_VIEW_NAME) String viewName) { - this.applicationId = applicationId; - this.deviceType = deviceType; - this.eventId = eventId; - this.isDeviceTypeSelectedByUser = isDeviceTypeSelectedByUser; - this.snapshotName = snapshotName; - this.start = start; - this.viewName = viewName; - } - - public SnapshotCreateRequestDataAttributes applicationId(String applicationId) { - this.applicationId = applicationId; - return this; - } - - /** - * GetapplicationId - * - * @return applicationId - */ - @JsonProperty(JSON_PROPERTY_APPLICATION_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getApplicationId() { - return applicationId; - } - - public void setApplicationId(String applicationId) { - this.applicationId = applicationId; - } - - public SnapshotCreateRequestDataAttributes deviceType(String deviceType) { - this.deviceType = deviceType; - return this; - } - - /** - * GetdeviceType - * - * @return deviceType - */ - @JsonProperty(JSON_PROPERTY_DEVICE_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getDeviceType() { - return deviceType; - } - - public void setDeviceType(String deviceType) { - this.deviceType = deviceType; - } - - public SnapshotCreateRequestDataAttributes eventId(String eventId) { - this.eventId = eventId; - return this; - } - - /** - * GeteventId - * - * @return eventId - */ - @JsonProperty(JSON_PROPERTY_EVENT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getEventId() { - return eventId; - } - - public void setEventId(String eventId) { - this.eventId = eventId; - } - - public SnapshotCreateRequestDataAttributes isDeviceTypeSelectedByUser( - Boolean isDeviceTypeSelectedByUser) { - this.isDeviceTypeSelectedByUser = isDeviceTypeSelectedByUser; - return this; - } - - /** - * GetisDeviceTypeSelectedByUser - * - * @return isDeviceTypeSelectedByUser - */ - @JsonProperty(JSON_PROPERTY_IS_DEVICE_TYPE_SELECTED_BY_USER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getIsDeviceTypeSelectedByUser() { - return isDeviceTypeSelectedByUser; - } - - public void setIsDeviceTypeSelectedByUser(Boolean isDeviceTypeSelectedByUser) { - this.isDeviceTypeSelectedByUser = isDeviceTypeSelectedByUser; - } - - public SnapshotCreateRequestDataAttributes sessionId(String sessionId) { - this.sessionId = sessionId; - return this; - } - - /** - * GetsessionId - * - * @return sessionId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SESSION_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSessionId() { - return sessionId; - } - - public void setSessionId(String sessionId) { - this.sessionId = sessionId; - } - - public SnapshotCreateRequestDataAttributes snapshotName(String snapshotName) { - this.snapshotName = snapshotName; - return this; - } - - /** - * GetsnapshotName - * - * @return snapshotName - */ - @JsonProperty(JSON_PROPERTY_SNAPSHOT_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getSnapshotName() { - return snapshotName; - } - - public void setSnapshotName(String snapshotName) { - this.snapshotName = snapshotName; - } - - public SnapshotCreateRequestDataAttributes start(Long start) { - this.start = start; - return this; - } - - /** - * Getstart - * - * @return start - */ - @JsonProperty(JSON_PROPERTY_START) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Long getStart() { - return start; - } - - public void setStart(Long start) { - this.start = start; - } - - public SnapshotCreateRequestDataAttributes viewId(String viewId) { - this.viewId = viewId; - return this; - } - - /** - * GetviewId - * - * @return viewId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VIEW_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getViewId() { - return viewId; - } - - public void setViewId(String viewId) { - this.viewId = viewId; - } - - public SnapshotCreateRequestDataAttributes viewName(String viewName) { - this.viewName = viewName; - return this; - } - - /** - * GetviewName - * - * @return viewName - */ - @JsonProperty(JSON_PROPERTY_VIEW_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getViewName() { - return viewName; - } - - public void setViewName(String viewName) { - this.viewName = viewName; - } - - /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. - * - * @param key The arbitrary key to set - * @param value The associated value - * @return SnapshotCreateRequestDataAttributes - */ - @JsonAnySetter - public SnapshotCreateRequestDataAttributes 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 SnapshotCreateRequestDataAttributes object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SnapshotCreateRequestDataAttributes snapshotCreateRequestDataAttributes = - (SnapshotCreateRequestDataAttributes) o; - return Objects.equals(this.applicationId, snapshotCreateRequestDataAttributes.applicationId) - && Objects.equals(this.deviceType, snapshotCreateRequestDataAttributes.deviceType) - && Objects.equals(this.eventId, snapshotCreateRequestDataAttributes.eventId) - && Objects.equals( - this.isDeviceTypeSelectedByUser, - snapshotCreateRequestDataAttributes.isDeviceTypeSelectedByUser) - && Objects.equals(this.sessionId, snapshotCreateRequestDataAttributes.sessionId) - && Objects.equals(this.snapshotName, snapshotCreateRequestDataAttributes.snapshotName) - && Objects.equals(this.start, snapshotCreateRequestDataAttributes.start) - && Objects.equals(this.viewId, snapshotCreateRequestDataAttributes.viewId) - && Objects.equals(this.viewName, snapshotCreateRequestDataAttributes.viewName) - && Objects.equals( - this.additionalProperties, snapshotCreateRequestDataAttributes.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash( - applicationId, - deviceType, - eventId, - isDeviceTypeSelectedByUser, - sessionId, - snapshotName, - start, - viewId, - viewName, - additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SnapshotCreateRequestDataAttributes {\n"); - sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); - sb.append(" deviceType: ").append(toIndentedString(deviceType)).append("\n"); - sb.append(" eventId: ").append(toIndentedString(eventId)).append("\n"); - sb.append(" isDeviceTypeSelectedByUser: ") - .append(toIndentedString(isDeviceTypeSelectedByUser)) - .append("\n"); - sb.append(" sessionId: ").append(toIndentedString(sessionId)).append("\n"); - sb.append(" snapshotName: ").append(toIndentedString(snapshotName)).append("\n"); - sb.append(" start: ").append(toIndentedString(start)).append("\n"); - sb.append(" viewId: ").append(toIndentedString(viewId)).append("\n"); - sb.append(" viewName: ").append(toIndentedString(viewName)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append('}'); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/SnapshotData.java b/src/main/java/com/datadog/api/client/v2/model/SnapshotData.java deleted file mode 100644 index 5f1d553c6e5..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/SnapshotData.java +++ /dev/null @@ -1,197 +0,0 @@ -/* - * 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; - -/** */ -@JsonPropertyOrder({ - SnapshotData.JSON_PROPERTY_ATTRIBUTES, - SnapshotData.JSON_PROPERTY_ID, - SnapshotData.JSON_PROPERTY_TYPE -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class SnapshotData { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; - private SnapshotDataAttributes attributes; - - public static final String JSON_PROPERTY_ID = "id"; - private String id; - - public static final String JSON_PROPERTY_TYPE = "type"; - private SnapshotUpdateRequestDataType type = SnapshotUpdateRequestDataType.SNAPSHOTS; - - public SnapshotData() {} - - @JsonCreator - public SnapshotData( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - SnapshotUpdateRequestDataType type) { - this.type = type; - this.unparsed |= !type.isValid(); - } - - public SnapshotData attributes(SnapshotDataAttributes attributes) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - return this; - } - - /** - * Getattributes - * - * @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SnapshotDataAttributes getAttributes() { - return attributes; - } - - public void setAttributes(SnapshotDataAttributes attributes) { - this.attributes = attributes; - } - - /** - * Getid - * - * @return id - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getId() { - return id; - } - - public SnapshotData type(SnapshotUpdateRequestDataType type) { - this.type = type; - this.unparsed |= !type.isValid(); - return this; - } - - /** - * Snapshots resource type. - * - * @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SnapshotUpdateRequestDataType getType() { - return type; - } - - public void setType(SnapshotUpdateRequestDataType 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 SnapshotData - */ - @JsonAnySetter - public SnapshotData 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 SnapshotData object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SnapshotData snapshotData = (SnapshotData) o; - return Objects.equals(this.attributes, snapshotData.attributes) - && Objects.equals(this.id, snapshotData.id) - && Objects.equals(this.type, snapshotData.type) - && Objects.equals(this.additionalProperties, snapshotData.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, id, type, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SnapshotData {\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/SnapshotDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SnapshotDataAttributes.java deleted file mode 100644 index bccfce805ca..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/SnapshotDataAttributes.java +++ /dev/null @@ -1,482 +0,0 @@ -/* - * 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.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** */ -@JsonPropertyOrder({ - SnapshotDataAttributes.JSON_PROPERTY_APPLICATION_ID, - SnapshotDataAttributes.JSON_PROPERTY_CREATED_AT, - SnapshotDataAttributes.JSON_PROPERTY_CREATED_BY, - SnapshotDataAttributes.JSON_PROPERTY_CREATED_BY_HANDLE, - SnapshotDataAttributes.JSON_PROPERTY_CREATED_BY_USER_ID, - SnapshotDataAttributes.JSON_PROPERTY_DEVICE_TYPE, - SnapshotDataAttributes.JSON_PROPERTY_EVENT_ID, - SnapshotDataAttributes.JSON_PROPERTY_IS_DEVICE_TYPE_SELECTED_BY_USER, - SnapshotDataAttributes.JSON_PROPERTY_MODIFIED_AT, - SnapshotDataAttributes.JSON_PROPERTY_ORG_ID, - SnapshotDataAttributes.JSON_PROPERTY_SESSION_ID, - SnapshotDataAttributes.JSON_PROPERTY_SNAPSHOT_NAME, - SnapshotDataAttributes.JSON_PROPERTY_START, - SnapshotDataAttributes.JSON_PROPERTY_VIEW_ID, - SnapshotDataAttributes.JSON_PROPERTY_VIEW_NAME -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class SnapshotDataAttributes { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_APPLICATION_ID = "application_id"; - private String applicationId; - - public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - private OffsetDateTime createdAt; - - public static final String JSON_PROPERTY_CREATED_BY = "created_by"; - private String createdBy; - - public static final String JSON_PROPERTY_CREATED_BY_HANDLE = "created_by_handle"; - private String createdByHandle; - - public static final String JSON_PROPERTY_CREATED_BY_USER_ID = "created_by_user_id"; - private Long createdByUserId; - - public static final String JSON_PROPERTY_DEVICE_TYPE = "device_type"; - private String deviceType; - - public static final String JSON_PROPERTY_EVENT_ID = "event_id"; - private String eventId; - - public static final String JSON_PROPERTY_IS_DEVICE_TYPE_SELECTED_BY_USER = - "is_device_type_selected_by_user"; - private Boolean isDeviceTypeSelectedByUser; - - public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; - private OffsetDateTime modifiedAt; - - public static final String JSON_PROPERTY_ORG_ID = "org_id"; - private Long orgId; - - public static final String JSON_PROPERTY_SESSION_ID = "session_id"; - private String sessionId; - - public static final String JSON_PROPERTY_SNAPSHOT_NAME = "snapshot_name"; - private String snapshotName; - - public static final String JSON_PROPERTY_START = "start"; - private Long start; - - public static final String JSON_PROPERTY_VIEW_ID = "view_id"; - private String viewId; - - public static final String JSON_PROPERTY_VIEW_NAME = "view_name"; - private String viewName; - - public SnapshotDataAttributes applicationId(String applicationId) { - this.applicationId = applicationId; - return this; - } - - /** - * GetapplicationId - * - * @return applicationId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APPLICATION_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getApplicationId() { - return applicationId; - } - - public void setApplicationId(String applicationId) { - this.applicationId = applicationId; - } - - /** - * GetcreatedAt - * - * @return createdAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - /** - * GetcreatedBy - * - * @return createdBy - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_BY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCreatedBy() { - return createdBy; - } - - /** - * GetcreatedByHandle - * - * @return createdByHandle - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_BY_HANDLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getCreatedByHandle() { - return createdByHandle; - } - - /** - * GetcreatedByUserId - * - * @return createdByUserId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_BY_USER_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getCreatedByUserId() { - return createdByUserId; - } - - public SnapshotDataAttributes deviceType(String deviceType) { - this.deviceType = deviceType; - return this; - } - - /** - * GetdeviceType - * - * @return deviceType - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DEVICE_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDeviceType() { - return deviceType; - } - - public void setDeviceType(String deviceType) { - this.deviceType = deviceType; - } - - public SnapshotDataAttributes eventId(String eventId) { - this.eventId = eventId; - return this; - } - - /** - * GeteventId - * - * @return eventId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EVENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEventId() { - return eventId; - } - - public void setEventId(String eventId) { - this.eventId = eventId; - } - - public SnapshotDataAttributes isDeviceTypeSelectedByUser(Boolean isDeviceTypeSelectedByUser) { - this.isDeviceTypeSelectedByUser = isDeviceTypeSelectedByUser; - return this; - } - - /** - * GetisDeviceTypeSelectedByUser - * - * @return isDeviceTypeSelectedByUser - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_DEVICE_TYPE_SELECTED_BY_USER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsDeviceTypeSelectedByUser() { - return isDeviceTypeSelectedByUser; - } - - public void setIsDeviceTypeSelectedByUser(Boolean isDeviceTypeSelectedByUser) { - this.isDeviceTypeSelectedByUser = isDeviceTypeSelectedByUser; - } - - /** - * GetmodifiedAt - * - * @return modifiedAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODIFIED_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getModifiedAt() { - return modifiedAt; - } - - /** - * GetorgId - * - * @return orgId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ORG_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getOrgId() { - return orgId; - } - - public SnapshotDataAttributes sessionId(String sessionId) { - this.sessionId = sessionId; - return this; - } - - /** - * GetsessionId - * - * @return sessionId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SESSION_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSessionId() { - return sessionId; - } - - public void setSessionId(String sessionId) { - this.sessionId = sessionId; - } - - public SnapshotDataAttributes snapshotName(String snapshotName) { - this.snapshotName = snapshotName; - return this; - } - - /** - * GetsnapshotName - * - * @return snapshotName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SNAPSHOT_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSnapshotName() { - return snapshotName; - } - - public void setSnapshotName(String snapshotName) { - this.snapshotName = snapshotName; - } - - public SnapshotDataAttributes start(Long start) { - this.start = start; - return this; - } - - /** - * Getstart - * - * @return start - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_START) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getStart() { - return start; - } - - public void setStart(Long start) { - this.start = start; - } - - public SnapshotDataAttributes viewId(String viewId) { - this.viewId = viewId; - return this; - } - - /** - * GetviewId - * - * @return viewId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VIEW_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getViewId() { - return viewId; - } - - public void setViewId(String viewId) { - this.viewId = viewId; - } - - public SnapshotDataAttributes viewName(String viewName) { - this.viewName = viewName; - return this; - } - - /** - * GetviewName - * - * @return viewName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VIEW_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getViewName() { - return viewName; - } - - public void setViewName(String viewName) { - this.viewName = viewName; - } - - /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. - * - * @param key The arbitrary key to set - * @param value The associated value - * @return SnapshotDataAttributes - */ - @JsonAnySetter - public SnapshotDataAttributes 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 SnapshotDataAttributes object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SnapshotDataAttributes snapshotDataAttributes = (SnapshotDataAttributes) o; - return Objects.equals(this.applicationId, snapshotDataAttributes.applicationId) - && Objects.equals(this.createdAt, snapshotDataAttributes.createdAt) - && Objects.equals(this.createdBy, snapshotDataAttributes.createdBy) - && Objects.equals(this.createdByHandle, snapshotDataAttributes.createdByHandle) - && Objects.equals(this.createdByUserId, snapshotDataAttributes.createdByUserId) - && Objects.equals(this.deviceType, snapshotDataAttributes.deviceType) - && Objects.equals(this.eventId, snapshotDataAttributes.eventId) - && Objects.equals( - this.isDeviceTypeSelectedByUser, snapshotDataAttributes.isDeviceTypeSelectedByUser) - && Objects.equals(this.modifiedAt, snapshotDataAttributes.modifiedAt) - && Objects.equals(this.orgId, snapshotDataAttributes.orgId) - && Objects.equals(this.sessionId, snapshotDataAttributes.sessionId) - && Objects.equals(this.snapshotName, snapshotDataAttributes.snapshotName) - && Objects.equals(this.start, snapshotDataAttributes.start) - && Objects.equals(this.viewId, snapshotDataAttributes.viewId) - && Objects.equals(this.viewName, snapshotDataAttributes.viewName) - && Objects.equals(this.additionalProperties, snapshotDataAttributes.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash( - applicationId, - createdAt, - createdBy, - createdByHandle, - createdByUserId, - deviceType, - eventId, - isDeviceTypeSelectedByUser, - modifiedAt, - orgId, - sessionId, - snapshotName, - start, - viewId, - viewName, - additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SnapshotDataAttributes {\n"); - sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); - sb.append(" createdByHandle: ").append(toIndentedString(createdByHandle)).append("\n"); - sb.append(" createdByUserId: ").append(toIndentedString(createdByUserId)).append("\n"); - sb.append(" deviceType: ").append(toIndentedString(deviceType)).append("\n"); - sb.append(" eventId: ").append(toIndentedString(eventId)).append("\n"); - sb.append(" isDeviceTypeSelectedByUser: ") - .append(toIndentedString(isDeviceTypeSelectedByUser)) - .append("\n"); - sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); - sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); - sb.append(" sessionId: ").append(toIndentedString(sessionId)).append("\n"); - sb.append(" snapshotName: ").append(toIndentedString(snapshotName)).append("\n"); - sb.append(" start: ").append(toIndentedString(start)).append("\n"); - sb.append(" viewId: ").append(toIndentedString(viewId)).append("\n"); - sb.append(" viewName: ").append(toIndentedString(viewName)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append('}'); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/SnapshotUpdateRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SnapshotUpdateRequestDataAttributes.java deleted file mode 100644 index d9a1ba4fa50..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/SnapshotUpdateRequestDataAttributes.java +++ /dev/null @@ -1,265 +0,0 @@ -/* - * 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; - -/** */ -@JsonPropertyOrder({ - SnapshotUpdateRequestDataAttributes.JSON_PROPERTY_EVENT_ID, - SnapshotUpdateRequestDataAttributes.JSON_PROPERTY_IS_DEVICE_TYPE_SELECTED_BY_USER, - SnapshotUpdateRequestDataAttributes.JSON_PROPERTY_SESSION_ID, - SnapshotUpdateRequestDataAttributes.JSON_PROPERTY_START, - SnapshotUpdateRequestDataAttributes.JSON_PROPERTY_VIEW_ID -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class SnapshotUpdateRequestDataAttributes { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_EVENT_ID = "event_id"; - private String eventId; - - public static final String JSON_PROPERTY_IS_DEVICE_TYPE_SELECTED_BY_USER = - "is_device_type_selected_by_user"; - private Boolean isDeviceTypeSelectedByUser; - - public static final String JSON_PROPERTY_SESSION_ID = "session_id"; - private String sessionId; - - public static final String JSON_PROPERTY_START = "start"; - private Long start; - - public static final String JSON_PROPERTY_VIEW_ID = "view_id"; - private String viewId; - - public SnapshotUpdateRequestDataAttributes() {} - - @JsonCreator - public SnapshotUpdateRequestDataAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_EVENT_ID) String eventId, - @JsonProperty(required = true, value = JSON_PROPERTY_IS_DEVICE_TYPE_SELECTED_BY_USER) - Boolean isDeviceTypeSelectedByUser, - @JsonProperty(required = true, value = JSON_PROPERTY_START) Long start) { - this.eventId = eventId; - this.isDeviceTypeSelectedByUser = isDeviceTypeSelectedByUser; - this.start = start; - } - - public SnapshotUpdateRequestDataAttributes eventId(String eventId) { - this.eventId = eventId; - return this; - } - - /** - * GeteventId - * - * @return eventId - */ - @JsonProperty(JSON_PROPERTY_EVENT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getEventId() { - return eventId; - } - - public void setEventId(String eventId) { - this.eventId = eventId; - } - - public SnapshotUpdateRequestDataAttributes isDeviceTypeSelectedByUser( - Boolean isDeviceTypeSelectedByUser) { - this.isDeviceTypeSelectedByUser = isDeviceTypeSelectedByUser; - return this; - } - - /** - * GetisDeviceTypeSelectedByUser - * - * @return isDeviceTypeSelectedByUser - */ - @JsonProperty(JSON_PROPERTY_IS_DEVICE_TYPE_SELECTED_BY_USER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getIsDeviceTypeSelectedByUser() { - return isDeviceTypeSelectedByUser; - } - - public void setIsDeviceTypeSelectedByUser(Boolean isDeviceTypeSelectedByUser) { - this.isDeviceTypeSelectedByUser = isDeviceTypeSelectedByUser; - } - - public SnapshotUpdateRequestDataAttributes sessionId(String sessionId) { - this.sessionId = sessionId; - return this; - } - - /** - * GetsessionId - * - * @return sessionId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SESSION_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSessionId() { - return sessionId; - } - - public void setSessionId(String sessionId) { - this.sessionId = sessionId; - } - - public SnapshotUpdateRequestDataAttributes start(Long start) { - this.start = start; - return this; - } - - /** - * Getstart - * - * @return start - */ - @JsonProperty(JSON_PROPERTY_START) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Long getStart() { - return start; - } - - public void setStart(Long start) { - this.start = start; - } - - public SnapshotUpdateRequestDataAttributes viewId(String viewId) { - this.viewId = viewId; - return this; - } - - /** - * GetviewId - * - * @return viewId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_VIEW_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getViewId() { - return viewId; - } - - public void setViewId(String viewId) { - this.viewId = viewId; - } - - /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. - * - * @param key The arbitrary key to set - * @param value The associated value - * @return SnapshotUpdateRequestDataAttributes - */ - @JsonAnySetter - public SnapshotUpdateRequestDataAttributes 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 SnapshotUpdateRequestDataAttributes object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SnapshotUpdateRequestDataAttributes snapshotUpdateRequestDataAttributes = - (SnapshotUpdateRequestDataAttributes) o; - return Objects.equals(this.eventId, snapshotUpdateRequestDataAttributes.eventId) - && Objects.equals( - this.isDeviceTypeSelectedByUser, - snapshotUpdateRequestDataAttributes.isDeviceTypeSelectedByUser) - && Objects.equals(this.sessionId, snapshotUpdateRequestDataAttributes.sessionId) - && Objects.equals(this.start, snapshotUpdateRequestDataAttributes.start) - && Objects.equals(this.viewId, snapshotUpdateRequestDataAttributes.viewId) - && Objects.equals( - this.additionalProperties, snapshotUpdateRequestDataAttributes.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash( - eventId, isDeviceTypeSelectedByUser, sessionId, start, viewId, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SnapshotUpdateRequestDataAttributes {\n"); - sb.append(" eventId: ").append(toIndentedString(eventId)).append("\n"); - sb.append(" isDeviceTypeSelectedByUser: ") - .append(toIndentedString(isDeviceTypeSelectedByUser)) - .append("\n"); - sb.append(" sessionId: ").append(toIndentedString(sessionId)).append("\n"); - sb.append(" start: ").append(toIndentedString(start)).append("\n"); - sb.append(" viewId: ").append(toIndentedString(viewId)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append('}'); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/SnapshotUpdateRequestDataType.java b/src/main/java/com/datadog/api/client/v2/model/SnapshotUpdateRequestDataType.java deleted file mode 100644 index e85823b161c..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/SnapshotUpdateRequestDataType.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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; - -/** Snapshots resource type. */ -@JsonSerialize(using = SnapshotUpdateRequestDataType.SnapshotUpdateRequestDataTypeSerializer.class) -public class SnapshotUpdateRequestDataType extends ModelEnum { - - private static final Set allowedValues = new HashSet(Arrays.asList("snapshots")); - - public static final SnapshotUpdateRequestDataType SNAPSHOTS = - new SnapshotUpdateRequestDataType("snapshots"); - - SnapshotUpdateRequestDataType(String value) { - super(value, allowedValues); - } - - public static class SnapshotUpdateRequestDataTypeSerializer - extends StdSerializer { - public SnapshotUpdateRequestDataTypeSerializer(Class t) { - super(t); - } - - public SnapshotUpdateRequestDataTypeSerializer() { - this(null); - } - - @Override - public void serialize( - SnapshotUpdateRequestDataType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } - } - - @JsonCreator - public static SnapshotUpdateRequestDataType fromValue(String value) { - return new SnapshotUpdateRequestDataType(value); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/ViewershipHistorySessionDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ViewershipHistorySessionDataAttributes.java deleted file mode 100644 index 745e63590f9..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/ViewershipHistorySessionDataAttributes.java +++ /dev/null @@ -1,239 +0,0 @@ -/* - * 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; - -/** */ -@JsonPropertyOrder({ - ViewershipHistorySessionDataAttributes.JSON_PROPERTY_EVENT_ID, - ViewershipHistorySessionDataAttributes.JSON_PROPERTY_LAST_WATCHED_AT, - ViewershipHistorySessionDataAttributes.JSON_PROPERTY_SESSION_EVENT, - ViewershipHistorySessionDataAttributes.JSON_PROPERTY_TRACK -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class ViewershipHistorySessionDataAttributes { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_EVENT_ID = "event_id"; - private String eventId; - - public static final String JSON_PROPERTY_LAST_WATCHED_AT = "last_watched_at"; - private OffsetDateTime lastWatchedAt; - - public static final String JSON_PROPERTY_SESSION_EVENT = "session_event"; - private Map sessionEvent = null; - - public static final String JSON_PROPERTY_TRACK = "track"; - private String track; - - public ViewershipHistorySessionDataAttributes() {} - - @JsonCreator - public ViewershipHistorySessionDataAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_LAST_WATCHED_AT) - OffsetDateTime lastWatchedAt) { - this.lastWatchedAt = lastWatchedAt; - } - - public ViewershipHistorySessionDataAttributes eventId(String eventId) { - this.eventId = eventId; - return this; - } - - /** - * GeteventId - * - * @return eventId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EVENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getEventId() { - return eventId; - } - - public void setEventId(String eventId) { - this.eventId = eventId; - } - - public ViewershipHistorySessionDataAttributes lastWatchedAt(OffsetDateTime lastWatchedAt) { - this.lastWatchedAt = lastWatchedAt; - return this; - } - - /** - * GetlastWatchedAt - * - * @return lastWatchedAt - */ - @JsonProperty(JSON_PROPERTY_LAST_WATCHED_AT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OffsetDateTime getLastWatchedAt() { - return lastWatchedAt; - } - - public void setLastWatchedAt(OffsetDateTime lastWatchedAt) { - this.lastWatchedAt = lastWatchedAt; - } - - public ViewershipHistorySessionDataAttributes sessionEvent(Map sessionEvent) { - this.sessionEvent = sessionEvent; - return this; - } - - public ViewershipHistorySessionDataAttributes putSessionEventItem( - String key, Object sessionEventItem) { - if (this.sessionEvent == null) { - this.sessionEvent = new HashMap<>(); - } - this.sessionEvent.put(key, sessionEventItem); - return this; - } - - /** - * GetsessionEvent - * - * @return sessionEvent - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SESSION_EVENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getSessionEvent() { - return sessionEvent; - } - - public void setSessionEvent(Map sessionEvent) { - this.sessionEvent = sessionEvent; - } - - public ViewershipHistorySessionDataAttributes track(String track) { - this.track = track; - return this; - } - - /** - * Gettrack - * - * @return track - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TRACK) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTrack() { - return track; - } - - public void setTrack(String track) { - this.track = track; - } - - /** - * 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 ViewershipHistorySessionDataAttributes - */ - @JsonAnySetter - public ViewershipHistorySessionDataAttributes 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 ViewershipHistorySessionDataAttributes object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ViewershipHistorySessionDataAttributes viewershipHistorySessionDataAttributes = - (ViewershipHistorySessionDataAttributes) o; - return Objects.equals(this.eventId, viewershipHistorySessionDataAttributes.eventId) - && Objects.equals(this.lastWatchedAt, viewershipHistorySessionDataAttributes.lastWatchedAt) - && Objects.equals(this.sessionEvent, viewershipHistorySessionDataAttributes.sessionEvent) - && Objects.equals(this.track, viewershipHistorySessionDataAttributes.track) - && Objects.equals( - this.additionalProperties, viewershipHistorySessionDataAttributes.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(eventId, lastWatchedAt, sessionEvent, track, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ViewershipHistorySessionDataAttributes {\n"); - sb.append(" eventId: ").append(toIndentedString(eventId)).append("\n"); - sb.append(" lastWatchedAt: ").append(toIndentedString(lastWatchedAt)).append("\n"); - sb.append(" sessionEvent: ").append(toIndentedString(sessionEvent)).append("\n"); - sb.append(" track: ").append(toIndentedString(track)).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/ViewershipHistorySessionDataType.java b/src/main/java/com/datadog/api/client/v2/model/ViewershipHistorySessionDataType.java deleted file mode 100644 index c44959789fa..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/ViewershipHistorySessionDataType.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.datadog.api.client.ModelEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Set; - -/** Rum replay session resource type. */ -@JsonSerialize( - using = ViewershipHistorySessionDataType.ViewershipHistorySessionDataTypeSerializer.class) -public class ViewershipHistorySessionDataType extends ModelEnum { - - private static final Set allowedValues = - new HashSet(Arrays.asList("rum_replay_session")); - - public static final ViewershipHistorySessionDataType RUM_REPLAY_SESSION = - new ViewershipHistorySessionDataType("rum_replay_session"); - - ViewershipHistorySessionDataType(String value) { - super(value, allowedValues); - } - - public static class ViewershipHistorySessionDataTypeSerializer - extends StdSerializer { - public ViewershipHistorySessionDataTypeSerializer(Class t) { - super(t); - } - - public ViewershipHistorySessionDataTypeSerializer() { - this(null); - } - - @Override - public void serialize( - ViewershipHistorySessionDataType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } - } - - @JsonCreator - public static ViewershipHistorySessionDataType fromValue(String value) { - return new ViewershipHistorySessionDataType(value); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/WatchDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/WatchDataAttributes.java deleted file mode 100644 index 6ca4be1cb0b..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/WatchDataAttributes.java +++ /dev/null @@ -1,229 +0,0 @@ -/* - * 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; - -/** */ -@JsonPropertyOrder({ - WatchDataAttributes.JSON_PROPERTY_APPLICATION_ID, - WatchDataAttributes.JSON_PROPERTY_DATA_SOURCE, - WatchDataAttributes.JSON_PROPERTY_EVENT_ID, - WatchDataAttributes.JSON_PROPERTY_TIMESTAMP -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class WatchDataAttributes { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_APPLICATION_ID = "application_id"; - private String applicationId; - - public static final String JSON_PROPERTY_DATA_SOURCE = "data_source"; - private String dataSource; - - public static final String JSON_PROPERTY_EVENT_ID = "event_id"; - private String eventId; - - public static final String JSON_PROPERTY_TIMESTAMP = "timestamp"; - private OffsetDateTime timestamp; - - public WatchDataAttributes() {} - - @JsonCreator - public WatchDataAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_APPLICATION_ID) String applicationId, - @JsonProperty(required = true, value = JSON_PROPERTY_EVENT_ID) String eventId, - @JsonProperty(required = true, value = JSON_PROPERTY_TIMESTAMP) OffsetDateTime timestamp) { - this.applicationId = applicationId; - this.eventId = eventId; - this.timestamp = timestamp; - } - - public WatchDataAttributes applicationId(String applicationId) { - this.applicationId = applicationId; - return this; - } - - /** - * GetapplicationId - * - * @return applicationId - */ - @JsonProperty(JSON_PROPERTY_APPLICATION_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getApplicationId() { - return applicationId; - } - - public void setApplicationId(String applicationId) { - this.applicationId = applicationId; - } - - public WatchDataAttributes dataSource(String dataSource) { - this.dataSource = dataSource; - return this; - } - - /** - * GetdataSource - * - * @return dataSource - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATA_SOURCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDataSource() { - return dataSource; - } - - public void setDataSource(String dataSource) { - this.dataSource = dataSource; - } - - public WatchDataAttributes eventId(String eventId) { - this.eventId = eventId; - return this; - } - - /** - * GeteventId - * - * @return eventId - */ - @JsonProperty(JSON_PROPERTY_EVENT_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getEventId() { - return eventId; - } - - public void setEventId(String eventId) { - this.eventId = eventId; - } - - public WatchDataAttributes timestamp(OffsetDateTime timestamp) { - this.timestamp = timestamp; - return this; - } - - /** - * Gettimestamp - * - * @return timestamp - */ - @JsonProperty(JSON_PROPERTY_TIMESTAMP) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OffsetDateTime getTimestamp() { - return timestamp; - } - - public void setTimestamp(OffsetDateTime timestamp) { - this.timestamp = timestamp; - } - - /** - * 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 WatchDataAttributes - */ - @JsonAnySetter - public WatchDataAttributes 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 WatchDataAttributes object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - WatchDataAttributes watchDataAttributes = (WatchDataAttributes) o; - return Objects.equals(this.applicationId, watchDataAttributes.applicationId) - && Objects.equals(this.dataSource, watchDataAttributes.dataSource) - && Objects.equals(this.eventId, watchDataAttributes.eventId) - && Objects.equals(this.timestamp, watchDataAttributes.timestamp) - && Objects.equals(this.additionalProperties, watchDataAttributes.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(applicationId, dataSource, eventId, timestamp, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class WatchDataAttributes {\n"); - sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n"); - sb.append(" dataSource: ").append(toIndentedString(dataSource)).append("\n"); - sb.append(" eventId: ").append(toIndentedString(eventId)).append("\n"); - sb.append(" timestamp: ").append(toIndentedString(timestamp)).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/WatchDataType.java b/src/main/java/com/datadog/api/client/v2/model/WatchDataType.java deleted file mode 100644 index d8c583d26ef..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/WatchDataType.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.datadog.api.client.ModelEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Set; - -/** Rum replay watch resource type. */ -@JsonSerialize(using = WatchDataType.WatchDataTypeSerializer.class) -public class WatchDataType extends ModelEnum { - - private static final Set allowedValues = - new HashSet(Arrays.asList("rum_replay_watch")); - - public static final WatchDataType RUM_REPLAY_WATCH = new WatchDataType("rum_replay_watch"); - - WatchDataType(String value) { - super(value, allowedValues); - } - - public static class WatchDataTypeSerializer extends StdSerializer { - public WatchDataTypeSerializer(Class t) { - super(t); - } - - public WatchDataTypeSerializer() { - this(null); - } - - @Override - public void serialize(WatchDataType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } - } - - @JsonCreator - public static WatchDataType fromValue(String value) { - return new WatchDataType(value); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/WatcherArray.java b/src/main/java/com/datadog/api/client/v2/model/WatcherArray.java deleted file mode 100644 index d723fa0e2c0..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/WatcherArray.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * 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; - -/** */ -@JsonPropertyOrder({WatcherArray.JSON_PROPERTY_DATA}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class WatcherArray { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_DATA = "data"; - private List data = new ArrayList<>(); - - public WatcherArray() {} - - @JsonCreator - public WatcherArray( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) { - this.data = data; - } - - public WatcherArray data(List data) { - this.data = data; - for (WatcherData item : data) { - this.unparsed |= item.unparsed; - } - return this; - } - - public WatcherArray addDataItem(WatcherData dataItem) { - this.data.add(dataItem); - this.unparsed |= dataItem.unparsed; - return this; - } - - /** - * Getdata - * - * @return data - */ - @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getData() { - return data; - } - - public void setData(List data) { - this.data = data; - } - - /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. - * - * @param key The arbitrary key to set - * @param value The associated value - * @return WatcherArray - */ - @JsonAnySetter - public WatcherArray 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 WatcherArray object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - WatcherArray watcherArray = (WatcherArray) o; - return Objects.equals(this.data, watcherArray.data) - && Objects.equals(this.additionalProperties, watcherArray.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(data, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class WatcherArray {\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/WatcherData.java b/src/main/java/com/datadog/api/client/v2/model/WatcherData.java deleted file mode 100644 index 146d440cce4..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/WatcherData.java +++ /dev/null @@ -1,205 +0,0 @@ -/* - * 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; - -/** */ -@JsonPropertyOrder({ - WatcherData.JSON_PROPERTY_ATTRIBUTES, - WatcherData.JSON_PROPERTY_ID, - WatcherData.JSON_PROPERTY_TYPE -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class WatcherData { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; - private WatcherDataAttributes attributes; - - public static final String JSON_PROPERTY_ID = "id"; - private String id; - - public static final String JSON_PROPERTY_TYPE = "type"; - private WatcherDataType type = WatcherDataType.RUM_REPLAY_WATCHER; - - public WatcherData() {} - - @JsonCreator - public WatcherData( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) WatcherDataType type) { - this.type = type; - this.unparsed |= !type.isValid(); - } - - public WatcherData attributes(WatcherDataAttributes attributes) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; - return this; - } - - /** - * Getattributes - * - * @return attributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public WatcherDataAttributes getAttributes() { - return attributes; - } - - public void setAttributes(WatcherDataAttributes attributes) { - this.attributes = attributes; - } - - public WatcherData id(String id) { - this.id = id; - return this; - } - - /** - * Getid - * - * @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 WatcherData type(WatcherDataType type) { - this.type = type; - this.unparsed |= !type.isValid(); - return this; - } - - /** - * Rum replay watcher resource type. - * - * @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public WatcherDataType getType() { - return type; - } - - public void setType(WatcherDataType 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 WatcherData - */ - @JsonAnySetter - public WatcherData 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 WatcherData object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - WatcherData watcherData = (WatcherData) o; - return Objects.equals(this.attributes, watcherData.attributes) - && Objects.equals(this.id, watcherData.id) - && Objects.equals(this.type, watcherData.type) - && Objects.equals(this.additionalProperties, watcherData.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(attributes, id, type, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class WatcherData {\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/WatcherDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/WatcherDataAttributes.java deleted file mode 100644 index 2eb5db07a55..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/WatcherDataAttributes.java +++ /dev/null @@ -1,257 +0,0 @@ -/* - * 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; - -/** */ -@JsonPropertyOrder({ - WatcherDataAttributes.JSON_PROPERTY_HANDLE, - WatcherDataAttributes.JSON_PROPERTY_ICON, - WatcherDataAttributes.JSON_PROPERTY_LAST_WATCHED_AT, - WatcherDataAttributes.JSON_PROPERTY_NAME, - WatcherDataAttributes.JSON_PROPERTY_WATCH_COUNT -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class WatcherDataAttributes { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_HANDLE = "handle"; - private String handle; - - public static final String JSON_PROPERTY_ICON = "icon"; - private String icon; - - public static final String JSON_PROPERTY_LAST_WATCHED_AT = "last_watched_at"; - private OffsetDateTime lastWatchedAt; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_WATCH_COUNT = "watch_count"; - private Integer watchCount; - - public WatcherDataAttributes() {} - - @JsonCreator - public WatcherDataAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_HANDLE) String handle, - @JsonProperty(required = true, value = JSON_PROPERTY_LAST_WATCHED_AT) - OffsetDateTime lastWatchedAt, - @JsonProperty(required = true, value = JSON_PROPERTY_WATCH_COUNT) Integer watchCount) { - this.handle = handle; - this.lastWatchedAt = lastWatchedAt; - this.watchCount = watchCount; - } - - public WatcherDataAttributes handle(String handle) { - this.handle = handle; - return this; - } - - /** - * Gethandle - * - * @return handle - */ - @JsonProperty(JSON_PROPERTY_HANDLE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getHandle() { - return handle; - } - - public void setHandle(String handle) { - this.handle = handle; - } - - public WatcherDataAttributes icon(String icon) { - this.icon = icon; - return this; - } - - /** - * Geticon - * - * @return icon - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ICON) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getIcon() { - return icon; - } - - public void setIcon(String icon) { - this.icon = icon; - } - - public WatcherDataAttributes lastWatchedAt(OffsetDateTime lastWatchedAt) { - this.lastWatchedAt = lastWatchedAt; - return this; - } - - /** - * GetlastWatchedAt - * - * @return lastWatchedAt - */ - @JsonProperty(JSON_PROPERTY_LAST_WATCHED_AT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OffsetDateTime getLastWatchedAt() { - return lastWatchedAt; - } - - public void setLastWatchedAt(OffsetDateTime lastWatchedAt) { - this.lastWatchedAt = lastWatchedAt; - } - - public WatcherDataAttributes name(String name) { - this.name = name; - return this; - } - - /** - * Getname - * - * @return name - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public WatcherDataAttributes watchCount(Integer watchCount) { - this.watchCount = watchCount; - return this; - } - - /** - * GetwatchCount maximum: 2147483647 - * - * @return watchCount - */ - @JsonProperty(JSON_PROPERTY_WATCH_COUNT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Integer getWatchCount() { - return watchCount; - } - - public void setWatchCount(Integer watchCount) { - this.watchCount = watchCount; - } - - /** - * 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 WatcherDataAttributes - */ - @JsonAnySetter - public WatcherDataAttributes 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 WatcherDataAttributes object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - WatcherDataAttributes watcherDataAttributes = (WatcherDataAttributes) o; - return Objects.equals(this.handle, watcherDataAttributes.handle) - && Objects.equals(this.icon, watcherDataAttributes.icon) - && Objects.equals(this.lastWatchedAt, watcherDataAttributes.lastWatchedAt) - && Objects.equals(this.name, watcherDataAttributes.name) - && Objects.equals(this.watchCount, watcherDataAttributes.watchCount) - && Objects.equals(this.additionalProperties, watcherDataAttributes.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(handle, icon, lastWatchedAt, name, watchCount, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class WatcherDataAttributes {\n"); - sb.append(" handle: ").append(toIndentedString(handle)).append("\n"); - sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); - sb.append(" lastWatchedAt: ").append(toIndentedString(lastWatchedAt)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" watchCount: ").append(toIndentedString(watchCount)).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/WatcherDataType.java b/src/main/java/com/datadog/api/client/v2/model/WatcherDataType.java deleted file mode 100644 index b87644f2b1c..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/WatcherDataType.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.datadog.api.client.ModelEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Set; - -/** Rum replay watcher resource type. */ -@JsonSerialize(using = WatcherDataType.WatcherDataTypeSerializer.class) -public class WatcherDataType extends ModelEnum { - - private static final Set allowedValues = - new HashSet(Arrays.asList("rum_replay_watcher")); - - public static final WatcherDataType RUM_REPLAY_WATCHER = - new WatcherDataType("rum_replay_watcher"); - - WatcherDataType(String value) { - super(value, allowedValues); - } - - public static class WatcherDataTypeSerializer extends StdSerializer { - public WatcherDataTypeSerializer(Class t) { - super(t); - } - - public WatcherDataTypeSerializer() { - this(null); - } - - @Override - public void serialize(WatcherDataType value, JsonGenerator jgen, SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } - } - - @JsonCreator - public static WatcherDataType fromValue(String value) { - return new WatcherDataType(value); - } -} diff --git a/src/test/resources/com/datadog/api/client/v1/api/key_management.feature b/src/test/resources/com/datadog/api/client/v1/api/key_management.feature index c3f18c2346a..7013ea44fed 100644 --- a/src/test/resources/com/datadog/api/client/v1/api/key_management.feature +++ b/src/test/resources/com/datadog/api/client/v1/api/key_management.feature @@ -47,6 +47,22 @@ Feature: Key Management When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/credentials-management + Scenario: Create client token returns "Bad Request" response + Given operation "CreateClientToken" enabled + And new "CreateClientToken" request + And body with value {"name": "Example Client Token", "origin_urls": ["https://example.com"]} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/credentials-management + Scenario: Create client token returns "OK" response + Given operation "CreateClientToken" enabled + And new "CreateClientToken" request + And body with value {"name": "Example Client Token", "origin_urls": ["https://example.com"]} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/credentials-management Scenario: Delete an API key returns "Bad Request" response Given new "DeleteAPIKey" request @@ -177,3 +193,51 @@ Feature: Key Management And request contains "key" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK + + @generated @skip @team:DataDog/credentials-management + Scenario: Revoke client token returns "Bad Request" response + Given operation "RevokeClientToken" enabled + And new "RevokeClientToken" request + And body with value {"hash": "1234567890abcdef1234567890abcdef123"} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/credentials-management + Scenario: Revoke client token returns "No Content" response + Given operation "RevokeClientToken" enabled + And new "RevokeClientToken" request + And body with value {"hash": "1234567890abcdef1234567890abcdef123"} + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/credentials-management + Scenario: Revoke client token returns "Not Found" response + Given operation "RevokeClientToken" enabled + And new "RevokeClientToken" request + And body with value {"hash": "1234567890abcdef1234567890abcdef123"} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/credentials-management + Scenario: Update client token returns "Bad Request" response + Given operation "UpdateClientToken" enabled + And new "UpdateClientToken" request + And body with value {"hash": "1234567890abcdef1234567890abcdef123", "name": "Updated Client Token Name", "origin_urls": ["https://example.com"]} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/credentials-management + Scenario: Update client token returns "Not Found" response + Given operation "UpdateClientToken" enabled + And new "UpdateClientToken" request + And body with value {"hash": "1234567890abcdef1234567890abcdef123", "name": "Updated Client Token Name", "origin_urls": ["https://example.com"]} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/credentials-management + Scenario: Update client token returns "OK" response + Given operation "UpdateClientToken" enabled + And new "UpdateClientToken" request + And body with value {"hash": "1234567890abcdef1234567890abcdef123", "name": "Updated Client Token Name", "origin_urls": ["https://example.com"]} + When the request is sent + Then the response status is 200 OK diff --git a/src/test/resources/com/datadog/api/client/v1/api/undo.json b/src/test/resources/com/datadog/api/client/v1/api/undo.json index 341ebe6c4ee..edc3c5f6a19 100644 --- a/src/test/resources/com/datadog/api/client/v1/api/undo.json +++ b/src/test/resources/com/datadog/api/client/v1/api/undo.json @@ -939,6 +939,31 @@ "type": "safe" } }, + "RevokeClientToken": { + "tag": "Key Management", + "undo": { + "type": "idempotent" + } + }, + "CreateClientToken": { + "tag": "Key Management", + "undo": { + "operationId": "RevokeClientToken", + "parameters": [ + { + "name": "hash", + "source": "data.hash" + } + ], + "type": "unsafe" + } + }, + "UpdateClientToken": { + "tag": "Key Management", + "undo": { + "type": "idempotent" + } + }, "QueryMetrics": { "tag": "Metrics", "undo": { diff --git a/src/test/resources/com/datadog/api/client/v2/api/key_management.feature b/src/test/resources/com/datadog/api/client/v2/api/key_management.feature index 40daf9df54f..5adb2ecc95c 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/key_management.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/key_management.feature @@ -53,6 +53,30 @@ Feature: Key Management And the response "data.type" is equal to "application_keys" And the response "data.attributes.name" is equal to "{{ unique }}" + @generated @skip @team:DataDog/credentials-management + Scenario: Create personal access token returns "Bad Request" response + Given operation "CreatePersonalAccessToken" enabled + And new "CreatePersonalAccessToken" request + And body with value {"data": {"attributes": {"expires_at": "2025-03-15T10:30:00.000000+00:00", "name": "Example Personal Access Token", "scopes": ["dashboards_read", "monitors_read"]}, "type": "personal_access_tokens"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/credentials-management + Scenario: Create personal access token returns "Not Found - Personal access tokens feature is not enabled" response + Given operation "CreatePersonalAccessToken" enabled + And new "CreatePersonalAccessToken" request + And body with value {"data": {"attributes": {"expires_at": "2025-03-15T10:30:00.000000+00:00", "name": "Example Personal Access Token", "scopes": ["dashboards_read", "monitors_read"]}, "type": "personal_access_tokens"}} + When the request is sent + Then the response status is 404 Not Found - Personal access tokens feature is not enabled + + @generated @skip @team:DataDog/credentials-management + Scenario: Create personal access token returns "OK" response + Given operation "CreatePersonalAccessToken" enabled + And new "CreatePersonalAccessToken" request + And body with value {"data": {"attributes": {"expires_at": "2025-03-15T10:30:00.000000+00:00", "name": "Example Personal Access Token", "scopes": ["dashboards_read", "monitors_read"]}, "type": "personal_access_tokens"}} + When the request is sent + Then the response status is 200 OK + @team:DataDog/credentials-management Scenario: Delete an API key returns "No Content" response Given there is a valid "api_key" in the system @@ -301,3 +325,83 @@ Feature: Key Management And the response "data.attributes.name" is equal to "{{ application_key.data.attributes.name }}" And the response "data.attributes" has field "scopes" And the response "data.attributes" has field "last_used_at" + + @generated @skip @team:DataDog/credentials-management + Scenario: Get personal access token returns "Not Found" response + Given operation "GetPersonalAccessToken" enabled + And new "GetPersonalAccessToken" request + And request contains "pat_uuid" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/credentials-management + Scenario: Get personal access token returns "OK" response + Given operation "GetPersonalAccessToken" enabled + And new "GetPersonalAccessToken" request + And request contains "pat_uuid" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/credentials-management + Scenario: List personal access tokens returns "Bad Request" response + Given operation "ListPersonalAccessTokens" enabled + And new "ListPersonalAccessTokens" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/credentials-management + Scenario: List personal access tokens returns "Not Found - Personal access tokens feature is not enabled" response + Given operation "ListPersonalAccessTokens" enabled + And new "ListPersonalAccessTokens" request + When the request is sent + Then the response status is 404 Not Found - Personal access tokens feature is not enabled + + @generated @skip @team:DataDog/credentials-management + Scenario: List personal access tokens returns "OK" response + Given operation "ListPersonalAccessTokens" enabled + And new "ListPersonalAccessTokens" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/credentials-management + Scenario: Revoke personal access token returns "No Content" response + Given operation "RevokePersonalAccessToken" enabled + And new "RevokePersonalAccessToken" request + And request contains "pat_uuid" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/credentials-management + Scenario: Revoke personal access token returns "Not Found" response + Given operation "RevokePersonalAccessToken" enabled + And new "RevokePersonalAccessToken" request + And request contains "pat_uuid" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/credentials-management + Scenario: Update personal access token returns "Bad Request" response + Given operation "UpdatePersonalAccessToken" enabled + And new "UpdatePersonalAccessToken" request + And request contains "pat_uuid" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "Updated Personal Access Token Name", "scopes": ["dashboards_read", "dashboards_write"]}, "id": "00000000-0000-0000-0000-000000000000", "type": "personal_access_tokens"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/credentials-management + Scenario: Update personal access token returns "Not Found" response + Given operation "UpdatePersonalAccessToken" enabled + And new "UpdatePersonalAccessToken" request + And request contains "pat_uuid" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "Updated Personal Access Token Name", "scopes": ["dashboards_read", "dashboards_write"]}, "id": "00000000-0000-0000-0000-000000000000", "type": "personal_access_tokens"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/credentials-management + Scenario: Update personal access token returns "OK" response + Given operation "UpdatePersonalAccessToken" enabled + And new "UpdatePersonalAccessToken" request + And request contains "pat_uuid" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "Updated Personal Access Token Name", "scopes": ["dashboards_read", "dashboards_write"]}, "id": "00000000-0000-0000-0000-000000000000", "type": "personal_access_tokens"}} + When the request is sent + Then the response status is 200 OK diff --git a/src/test/resources/com/datadog/api/client/v2/api/rum_replay_heatmaps.feature b/src/test/resources/com/datadog/api/client/v2/api/rum_replay_heatmaps.feature deleted file mode 100644 index 310a5b622f8..00000000000 --- a/src/test/resources/com/datadog/api/client/v2/api/rum_replay_heatmaps.feature +++ /dev/null @@ -1,38 +0,0 @@ -@endpoint(rum-replay-heatmaps) @endpoint(rum-replay-heatmaps-v2) -Feature: Rum Replay Heatmaps - Manage heatmap snapshots for RUM replay sessions. Create, update, delete, - and retrieve snapshots to visualize user interactions on specific views. - - Background: - Given a valid "apiKeyAuth" key in the system - And a valid "appKeyAuth" key in the system - And an instance of "RumReplayHeatmaps" API - - @generated @skip @team:DataDog/product-analytics-backend @team:DataDog/rum-backend @team:DataDog/session-replay-backend - Scenario: Create replay heatmap snapshot returns "Created" response - Given new "CreateReplayHeatmapSnapshot" request - And body with value {"data": {"attributes": {"application_id": "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb", "device_type": "desktop", "event_id": "11111111-2222-3333-4444-555555555555", "is_device_type_selected_by_user": false, "snapshot_name": "My Snapshot", "start": 0, "view_name": "/home"}, "type": "snapshots"}} - When the request is sent - Then the response status is 201 Created - - @generated @skip @team:DataDog/product-analytics-backend @team:DataDog/rum-backend @team:DataDog/session-replay-backend - Scenario: Delete replay heatmap snapshot returns "No Content" response - Given new "DeleteReplayHeatmapSnapshot" request - And request contains "snapshot_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 204 No Content - - @generated @skip @team:DataDog/product-analytics-backend @team:DataDog/rum-backend @team:DataDog/session-replay-backend - Scenario: List replay heatmap snapshots returns "OK" response - Given new "ListReplayHeatmapSnapshots" request - And request contains "filter[view_name]" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/product-analytics-backend @team:DataDog/rum-backend @team:DataDog/session-replay-backend - Scenario: Update replay heatmap snapshot returns "OK" response - Given new "UpdateReplayHeatmapSnapshot" request - And request contains "snapshot_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"event_id": "11111111-2222-3333-4444-555555555555", "is_device_type_selected_by_user": false, "start": 0}, "id": "00000000-0000-0000-0000-000000000001", "type": "snapshots"}} - When the request is sent - Then the response status is 200 OK diff --git a/src/test/resources/com/datadog/api/client/v2/api/rum_replay_playlists.feature b/src/test/resources/com/datadog/api/client/v2/api/rum_replay_playlists.feature deleted file mode 100644 index b4665139f78..00000000000 --- a/src/test/resources/com/datadog/api/client/v2/api/rum_replay_playlists.feature +++ /dev/null @@ -1,85 +0,0 @@ -@endpoint(rum-replay-playlists) @endpoint(rum-replay-playlists-v2) -Feature: Rum Replay Playlists - Create and manage playlists of RUM replay sessions. Organize, categorize, - and share collections of replay sessions for analysis and collaboration. - - Background: - Given a valid "apiKeyAuth" key in the system - And a valid "appKeyAuth" key in the system - And an instance of "RumReplayPlaylists" API - - @generated @skip @team:DataDog/product-analytics-backend @team:DataDog/rum-backend @team:DataDog/session-replay-backend - Scenario: Add rum replay session to playlist returns "Created" response - Given new "AddRumReplaySessionToPlaylist" request - And request contains "ts" parameter from "REPLACE.ME" - And request contains "playlist_id" parameter from "REPLACE.ME" - And request contains "session_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 201 Created - - @generated @skip @team:DataDog/product-analytics-backend @team:DataDog/rum-backend @team:DataDog/session-replay-backend - Scenario: Add rum replay session to playlist returns "OK" response - Given new "AddRumReplaySessionToPlaylist" request - And request contains "ts" parameter from "REPLACE.ME" - And request contains "playlist_id" parameter from "REPLACE.ME" - And request contains "session_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/product-analytics-backend @team:DataDog/rum-backend @team:DataDog/session-replay-backend - Scenario: Bulk remove rum replay playlist sessions returns "No Content" response - Given new "BulkRemoveRumReplayPlaylistSessions" request - And request contains "playlist_id" parameter from "REPLACE.ME" - And body with value {"data": [{"id": "00000000-0000-0000-0000-000000000001", "type": "rum_replay_session"}]} - When the request is sent - Then the response status is 204 No Content - - @generated @skip @team:DataDog/product-analytics-backend @team:DataDog/rum-backend @team:DataDog/session-replay-backend - Scenario: Create rum replay playlist returns "Created" response - Given new "CreateRumReplayPlaylist" request - And body with value {"data": {"attributes": {"created_by": {"handle": "john.doe@example.com", "id": "00000000-0000-0000-0000-000000000001", "uuid": "00000000-0000-0000-0000-000000000001"}, "name": "My Playlist"}, "type": "rum_replay_playlist"}} - When the request is sent - Then the response status is 201 Created - - @generated @skip @team:DataDog/product-analytics-backend @team:DataDog/rum-backend @team:DataDog/session-replay-backend - Scenario: Delete rum replay playlist returns "No Content" response - Given new "DeleteRumReplayPlaylist" request - And request contains "playlist_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 204 No Content - - @generated @skip @team:DataDog/product-analytics-backend @team:DataDog/rum-backend @team:DataDog/session-replay-backend - Scenario: Get rum replay playlist returns "OK" response - Given new "GetRumReplayPlaylist" request - And request contains "playlist_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/product-analytics-backend @team:DataDog/rum-backend @team:DataDog/session-replay-backend - Scenario: List rum replay playlist sessions returns "OK" response - Given new "ListRumReplayPlaylistSessions" request - And request contains "playlist_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/product-analytics-backend @team:DataDog/rum-backend @team:DataDog/session-replay-backend - Scenario: List rum replay playlists returns "OK" response - Given new "ListRumReplayPlaylists" request - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/product-analytics-backend @team:DataDog/rum-backend @team:DataDog/session-replay-backend - Scenario: Remove rum replay session from playlist returns "No Content" response - Given new "RemoveRumReplaySessionFromPlaylist" request - And request contains "playlist_id" parameter from "REPLACE.ME" - And request contains "session_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 204 No Content - - @generated @skip @team:DataDog/product-analytics-backend @team:DataDog/rum-backend @team:DataDog/session-replay-backend - Scenario: Update rum replay playlist returns "OK" response - Given new "UpdateRumReplayPlaylist" request - And request contains "playlist_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"created_by": {"handle": "john.doe@example.com", "id": "00000000-0000-0000-0000-000000000001", "uuid": "00000000-0000-0000-0000-000000000001"}, "name": "My Playlist"}, "type": "rum_replay_playlist"}} - When the request is sent - Then the response status is 200 OK diff --git a/src/test/resources/com/datadog/api/client/v2/api/rum_replay_sessions.feature b/src/test/resources/com/datadog/api/client/v2/api/rum_replay_sessions.feature deleted file mode 100644 index 71f350db8de..00000000000 --- a/src/test/resources/com/datadog/api/client/v2/api/rum_replay_sessions.feature +++ /dev/null @@ -1,15 +0,0 @@ -@endpoint(rum-replay-sessions) @endpoint(rum-replay-sessions-v2) -Feature: Rum Replay Sessions - Retrieve segments for RUM replay sessions. Access session replay data - stored in event platform or blob storage. - - @generated @skip @team:DataDog/product-analytics-backend @team:DataDog/rum-backend @team:DataDog/session-replay-backend - Scenario: Get segments returns "OK" response - Given a valid "apiKeyAuth" key in the system - And a valid "appKeyAuth" key in the system - And an instance of "RumReplaySessions" API - And new "GetSegments" request - And request contains "view_id" parameter from "REPLACE.ME" - And request contains "session_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK diff --git a/src/test/resources/com/datadog/api/client/v2/api/rum_replay_viewership.feature b/src/test/resources/com/datadog/api/client/v2/api/rum_replay_viewership.feature deleted file mode 100644 index d2cdc3d2a99..00000000000 --- a/src/test/resources/com/datadog/api/client/v2/api/rum_replay_viewership.feature +++ /dev/null @@ -1,37 +0,0 @@ -@endpoint(rum-replay-viewership) @endpoint(rum-replay-viewership-v2) -Feature: Rum Replay Viewership - Track and manage RUM replay session viewership. Monitor who watches replay - sessions and maintain watch history for audit and analytics purposes. - - Background: - Given a valid "apiKeyAuth" key in the system - And a valid "appKeyAuth" key in the system - And an instance of "RumReplayViewership" API - - @generated @skip @team:DataDog/product-analytics-backend @team:DataDog/rum-backend @team:DataDog/session-replay-backend - Scenario: Create rum replay session watch returns "Created" response - Given new "CreateRumReplaySessionWatch" request - And request contains "session_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"application_id": "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb", "event_id": "11111111-2222-3333-4444-555555555555", "timestamp": "2026-01-13T17:15:53.208340Z"}, "type": "rum_replay_watch"}} - When the request is sent - Then the response status is 201 Created - - @generated @skip @team:DataDog/product-analytics-backend @team:DataDog/rum-backend @team:DataDog/session-replay-backend - Scenario: Delete rum replay session watch returns "No Content" response - Given new "DeleteRumReplaySessionWatch" request - And request contains "session_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 204 No Content - - @generated @skip @team:DataDog/product-analytics-backend @team:DataDog/rum-backend @team:DataDog/session-replay-backend - Scenario: List rum replay session watchers returns "OK" response - Given new "ListRumReplaySessionWatchers" request - And request contains "session_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/product-analytics-backend @team:DataDog/rum-backend @team:DataDog/session-replay-backend - Scenario: List rum replay viewership history sessions returns "OK" response - Given new "ListRumReplayViewershipHistorySessions" request - When the request is sent - Then the response status is 200 OK diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index 41fa31182a8..e2861bf7f27 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 @@ -3344,6 +3344,43 @@ "type": "safe" } }, + "ListPersonalAccessTokens": { + "tag": "Key Management", + "undo": { + "type": "safe" + } + }, + "CreatePersonalAccessToken": { + "tag": "Key Management", + "undo": { + "operationId": "RevokePersonalAccessToken", + "parameters": [ + { + "name": "pat_uuid", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "RevokePersonalAccessToken": { + "tag": "Key Management", + "undo": { + "type": "idempotent" + } + }, + "GetPersonalAccessToken": { + "tag": "Key Management", + "undo": { + "type": "safe" + } + }, + "UpdatePersonalAccessToken": { + "tag": "Key Management", + "undo": { + "type": "idempotent" + } + }, "ListFindings": { "tag": "Security Monitoring", "undo": { @@ -3721,37 +3758,6 @@ "type": "idempotent" } }, - "ListReplayHeatmapSnapshots": { - "tag": "Rum Replay Heatmaps", - "undo": { - "type": "safe" - } - }, - "CreateReplayHeatmapSnapshot": { - "tag": "Rum Replay Heatmaps", - "undo": { - "operationId": "DeleteReplayHeatmapSnapshot", - "parameters": [ - { - "name": "snapshot_id", - "source": "data.id" - } - ], - "type": "unsafe" - } - }, - "DeleteReplayHeatmapSnapshot": { - "tag": "Rum Replay Heatmaps", - "undo": { - "type": "idempotent" - } - }, - "UpdateReplayHeatmapSnapshot": { - "tag": "Rum Replay Heatmaps", - "undo": { - "type": "idempotent" - } - }, "DeleteRestrictionPolicy": { "tag": "Restriction Policies", "undo": { @@ -3990,105 +3996,6 @@ "type": "safe" } }, - "ListRumReplayPlaylists": { - "tag": "Rum Replay Playlists", - "undo": { - "type": "safe" - } - }, - "CreateRumReplayPlaylist": { - "tag": "Rum Replay Playlists", - "undo": { - "operationId": "DeleteRumReplayPlaylist", - "parameters": [ - { - "name": "playlist_id", - "source": "data.id" - } - ], - "type": "unsafe" - } - }, - "DeleteRumReplayPlaylist": { - "tag": "Rum Replay Playlists", - "undo": { - "type": "idempotent" - } - }, - "GetRumReplayPlaylist": { - "tag": "Rum Replay Playlists", - "undo": { - "type": "safe" - } - }, - "UpdateRumReplayPlaylist": { - "tag": "Rum Replay Playlists", - "undo": { - "type": "idempotent" - } - }, - "BulkRemoveRumReplayPlaylistSessions": { - "tag": "Rum Replay Playlists", - "undo": { - "type": "idempotent" - } - }, - "ListRumReplayPlaylistSessions": { - "tag": "Rum Replay Playlists", - "undo": { - "type": "safe" - } - }, - "RemoveRumReplaySessionFromPlaylist": { - "tag": "Rum Replay Playlists", - "undo": { - "type": "idempotent" - } - }, - "AddRumReplaySessionToPlaylist": { - "tag": "Rum Replay Playlists", - "undo": { - "type": "idempotent" - } - }, - "GetSegments": { - "tag": "Rum Replay Sessions", - "undo": { - "type": "safe" - } - }, - "ListRumReplaySessionWatchers": { - "tag": "Rum Replay Viewership", - "undo": { - "type": "safe" - } - }, - "DeleteRumReplaySessionWatch": { - "tag": "Rum Replay Viewership", - "undo": { - "type": "idempotent" - } - }, - "CreateRumReplaySessionWatch": { - "tag": "Rum Replay Viewership", - "undo": { - "operationId": "DeleteRumReplaySessionWatch", - "parameters": [ - { - "name": "session_id", - "origin": "path", - "source": "session_id" - } - ], - "type": "unsafe" - } - }, - "ListRumReplayViewershipHistorySessions": { - "tag": "Rum Replay Viewership", - "undo": { - "type": "safe" - } - }, "UploadIdPMetadata": { "tag": "Organizations", "undo": {