diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index af969a3d7f0..840ac4eef97 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -44773,6 +44773,118 @@ 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: + properties: + attributes: + $ref: '#/components/schemas/PlaylistDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/PlaylistDataType' + required: + - type + type: object + PlaylistDataAttributes: + properties: + created_at: + format: date-time + type: string + created_by: + $ref: '#/components/schemas/PlaylistDataAttributesCreatedBy' + description: + type: string + name: + example: My Playlist + type: string + session_count: + format: int64 + type: integer + updated_at: + format: date-time + type: string + required: + - name + type: object + PlaylistDataAttributesCreatedBy: + properties: + handle: + example: john.doe@example.com + type: string + icon: + type: string + id: + example: 00000000-0000-0000-0000-000000000001 + type: string + name: + type: string + uuid: + example: 00000000-0000-0000-0000-000000000001 + type: string + required: + - handle + - id + - uuid + 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: + properties: + data: + $ref: '#/components/schemas/PlaylistsSessionData' + required: + - data + type: object + PlaylistsSessionArray: + properties: + data: + items: + $ref: '#/components/schemas/PlaylistsSessionData' + type: array + required: + - data + type: object + PlaylistsSessionData: + properties: + attributes: + $ref: '#/components/schemas/PlaylistsSessionDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/ViewershipHistorySessionDataType' + required: + - type + type: object + PlaylistsSessionDataAttributes: + properties: + session_event: + additionalProperties: {} + type: object + track: + type: string + type: object PostmortemAttachmentRequest: properties: data: @@ -57433,6 +57545,25 @@ 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: @@ -57943,6 +58074,178 @@ 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: @@ -65057,6 +65360,51 @@ 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: @@ -65545,6 +65893,104 @@ 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: @@ -87922,6 +88368,134 @@ 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. @@ -89321,6 +89895,533 @@ 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. @@ -100685,6 +101786,18 @@ 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/v2/rum-replay-heatmaps/CreateReplayHeatmapSnapshot.java b/examples/v2/rum-replay-heatmaps/CreateReplayHeatmapSnapshot.java new file mode 100644 index 00000000000..7cd6723b8d9 --- /dev/null +++ b/examples/v2/rum-replay-heatmaps/CreateReplayHeatmapSnapshot.java @@ -0,0 +1,43 @@ +// 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 new file mode 100644 index 00000000000..bdc125dd28c --- /dev/null +++ b/examples/v2/rum-replay-heatmaps/DeleteReplayHeatmapSnapshot.java @@ -0,0 +1,22 @@ +// 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 new file mode 100644 index 00000000000..976da76a730 --- /dev/null +++ b/examples/v2/rum-replay-heatmaps/ListReplayHeatmapSnapshots.java @@ -0,0 +1,24 @@ +// 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 new file mode 100644 index 00000000000..1690b396697 --- /dev/null +++ b/examples/v2/rum-replay-heatmaps/UpdateReplayHeatmapSnapshot.java @@ -0,0 +1,41 @@ +// 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 new file mode 100644 index 00000000000..c7d6e93ebb4 --- /dev/null +++ b/examples/v2/rum-replay-playlists/AddRumReplaySessionToPlaylist.java @@ -0,0 +1,27 @@ +// 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 new file mode 100644 index 00000000000..5088a739a31 --- /dev/null +++ b/examples/v2/rum-replay-playlists/BulkRemoveRumReplayPlaylistSessions.java @@ -0,0 +1,35 @@ +// 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 new file mode 100644 index 00000000000..ad3e4655b7f --- /dev/null +++ b/examples/v2/rum-replay-playlists/CreateRumReplayPlaylist.java @@ -0,0 +1,42 @@ +// 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 new file mode 100644 index 00000000000..592938cd19f --- /dev/null +++ b/examples/v2/rum-replay-playlists/DeleteRumReplayPlaylist.java @@ -0,0 +1,22 @@ +// 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 new file mode 100644 index 00000000000..82680706bf4 --- /dev/null +++ b/examples/v2/rum-replay-playlists/GetRumReplayPlaylist.java @@ -0,0 +1,24 @@ +// 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 new file mode 100644 index 00000000000..657b4c8eb07 --- /dev/null +++ b/examples/v2/rum-replay-playlists/ListRumReplayPlaylistSessions.java @@ -0,0 +1,25 @@ +// 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/ListRumReplayPlaylists.java b/examples/v2/rum-replay-playlists/ListRumReplayPlaylists.java new file mode 100644 index 00000000000..36c9a4ad076 --- /dev/null +++ b/examples/v2/rum-replay-playlists/ListRumReplayPlaylists.java @@ -0,0 +1,24 @@ +// List rum replay playlists 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; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + RumReplayPlaylistsApi apiInstance = new RumReplayPlaylistsApi(defaultClient); + + try { + PlaylistArray result = apiInstance.listRumReplayPlaylists(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumReplayPlaylistsApi#listRumReplayPlaylists"); + 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 new file mode 100644 index 00000000000..e486a9d493e --- /dev/null +++ b/examples/v2/rum-replay-playlists/RemoveRumReplaySessionFromPlaylist.java @@ -0,0 +1,24 @@ +// 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 new file mode 100644 index 00000000000..eb7bfd0172a --- /dev/null +++ b/examples/v2/rum-replay-playlists/UpdateRumReplayPlaylist.java @@ -0,0 +1,42 @@ +// 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 new file mode 100644 index 00000000000..322352f0c97 --- /dev/null +++ b/examples/v2/rum-replay-sessions/GetSegments.java @@ -0,0 +1,23 @@ +// 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 new file mode 100644 index 00000000000..05b8c82a21d --- /dev/null +++ b/examples/v2/rum-replay-viewership/CreateRumReplaySessionWatch.java @@ -0,0 +1,41 @@ +// 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 new file mode 100644 index 00000000000..8cdb823d2a7 --- /dev/null +++ b/examples/v2/rum-replay-viewership/DeleteRumReplaySessionWatch.java @@ -0,0 +1,23 @@ +// 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 new file mode 100644 index 00000000000..791a087a1e3 --- /dev/null +++ b/examples/v2/rum-replay-viewership/ListRumReplaySessionWatchers.java @@ -0,0 +1,26 @@ +// 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 new file mode 100644 index 00000000000..e2ce0709b44 --- /dev/null +++ b/examples/v2/rum-replay-viewership/ListRumReplayViewershipHistorySessions.java @@ -0,0 +1,25 @@ +// 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/v2/api/RumReplayHeatmapsApi.java b/src/main/java/com/datadog/api/client/v2/api/RumReplayHeatmapsApi.java new file mode 100644 index 00000000000..ff626f38a0b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/RumReplayHeatmapsApi.java @@ -0,0 +1,712 @@ +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 new file mode 100644 index 00000000000..55d5cdf9e68 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/RumReplayPlaylistsApi.java @@ -0,0 +1,1644 @@ +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 new file mode 100644 index 00000000000..3c60ae6052c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/RumReplaySessionsApi.java @@ -0,0 +1,306 @@ +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 new file mode 100644 index 00000000000..f920467faf6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/RumReplayViewershipApi.java @@ -0,0 +1,843 @@ +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/Playlist.java b/src/main/java/com/datadog/api/client/v2/model/Playlist.java new file mode 100644 index 00000000000..3555f38ea0d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/Playlist.java @@ -0,0 +1,144 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({Playlist.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class Playlist { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private PlaylistData 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) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public PlaylistData getData() { + return data; + } + + public void setData(PlaylistData 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 Playlist + */ + @JsonAnySetter + public Playlist 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 Playlist object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + 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); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Playlist {\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/PlaylistArray.java b/src/main/java/com/datadog/api/client/v2/model/PlaylistArray.java new file mode 100644 index 00000000000..7771d36f76e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PlaylistArray.java @@ -0,0 +1,154 @@ +/* + * 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({PlaylistArray.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class PlaylistArray { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + 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; + 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 PlaylistArray + */ + @JsonAnySetter + public PlaylistArray 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 PlaylistArray object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + 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); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PlaylistArray {\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/PlaylistData.java b/src/main/java/com/datadog/api/client/v2/model/PlaylistData.java new file mode 100644 index 00000000000..c06c8574993 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PlaylistData.java @@ -0,0 +1,205 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@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 new file mode 100644 index 00000000000..9301269572b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PlaylistDataAttributes.java @@ -0,0 +1,283 @@ +/* + * 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/PlaylistDataAttributesCreatedBy.java b/src/main/java/com/datadog/api/client/v2/model/PlaylistDataAttributesCreatedBy.java new file mode 100644 index 00000000000..e0615f8f9bc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PlaylistDataAttributesCreatedBy.java @@ -0,0 +1,257 @@ +/* + * 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({ + PlaylistDataAttributesCreatedBy.JSON_PROPERTY_HANDLE, + PlaylistDataAttributesCreatedBy.JSON_PROPERTY_ICON, + PlaylistDataAttributesCreatedBy.JSON_PROPERTY_ID, + PlaylistDataAttributesCreatedBy.JSON_PROPERTY_NAME, + PlaylistDataAttributesCreatedBy.JSON_PROPERTY_UUID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class PlaylistDataAttributesCreatedBy { + @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_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_UUID = "uuid"; + private String uuid; + + public PlaylistDataAttributesCreatedBy() {} + + @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 PlaylistDataAttributesCreatedBy id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public PlaylistDataAttributesCreatedBy 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 PlaylistDataAttributesCreatedBy uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * Getuuid + * + * @return uuid + */ + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + /** + * 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 PlaylistDataAttributesCreatedBy + */ + @JsonAnySetter + public PlaylistDataAttributesCreatedBy 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 PlaylistDataAttributesCreatedBy object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + 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) + && Objects.equals( + this.additionalProperties, playlistDataAttributesCreatedBy.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(handle, icon, id, name, uuid, 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(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).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/PlaylistDataType.java b/src/main/java/com/datadog/api/client/v2/model/PlaylistDataType.java new file mode 100644 index 00000000000..1cf4841a9c8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PlaylistDataType.java @@ -0,0 +1,55 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Rum replay playlist resource type. */ +@JsonSerialize(using = PlaylistDataType.PlaylistDataTypeSerializer.class) +public class PlaylistDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("rum_replay_playlist")); + + public static final PlaylistDataType RUM_REPLAY_PLAYLIST = + new PlaylistDataType("rum_replay_playlist"); + + PlaylistDataType(String value) { + super(value, allowedValues); + } + + public static class PlaylistDataTypeSerializer extends StdSerializer { + public PlaylistDataTypeSerializer(Class t) { + super(t); + } + + public PlaylistDataTypeSerializer() { + this(null); + } + + @Override + public void serialize(PlaylistDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static PlaylistDataType fromValue(String value) { + return new PlaylistDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/PlaylistsSession.java b/src/main/java/com/datadog/api/client/v2/model/PlaylistsSession.java new file mode 100644 index 00000000000..0e16db75edf --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PlaylistsSession.java @@ -0,0 +1,145 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({PlaylistsSession.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class PlaylistsSession { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private PlaylistsSessionData data; + + 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; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public PlaylistsSessionData getData() { + return data; + } + + public void setData(PlaylistsSessionData 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 PlaylistsSession + */ + @JsonAnySetter + public PlaylistsSession 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 PlaylistsSession object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + 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); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PlaylistsSession {\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/PlaylistsSessionArray.java b/src/main/java/com/datadog/api/client/v2/model/PlaylistsSessionArray.java new file mode 100644 index 00000000000..18c1d418d09 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PlaylistsSessionArray.java @@ -0,0 +1,154 @@ +/* + * 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/PlaylistsSessionData.java b/src/main/java/com/datadog/api/client/v2/model/PlaylistsSessionData.java new file mode 100644 index 00000000000..e5f9d34f4d0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PlaylistsSessionData.java @@ -0,0 +1,207 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + PlaylistsSessionData.JSON_PROPERTY_ATTRIBUTES, + PlaylistsSessionData.JSON_PROPERTY_ID, + PlaylistsSessionData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class PlaylistsSessionData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private PlaylistsSessionDataAttributes attributes; + + 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 PlaylistsSessionData() {} + + @JsonCreator + public PlaylistsSessionData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + ViewershipHistorySessionDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public PlaylistsSessionData attributes(PlaylistsSessionDataAttributes 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 PlaylistsSessionDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(PlaylistsSessionDataAttributes attributes) { + this.attributes = attributes; + } + + public PlaylistsSessionData 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 PlaylistsSessionData 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 PlaylistsSessionData + */ + @JsonAnySetter + public PlaylistsSessionData 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 PlaylistsSessionData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + 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); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PlaylistsSessionData {\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/PlaylistsSessionDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/PlaylistsSessionDataAttributes.java new file mode 100644 index 00000000000..026a5f00858 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PlaylistsSessionDataAttributes.java @@ -0,0 +1,174 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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({ + PlaylistsSessionDataAttributes.JSON_PROPERTY_SESSION_EVENT, + PlaylistsSessionDataAttributes.JSON_PROPERTY_TRACK +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class PlaylistsSessionDataAttributes { + @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_TRACK = "track"; + private String track; + + 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); + 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 PlaylistsSessionDataAttributes 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 PlaylistsSessionDataAttributes + */ + @JsonAnySetter + public PlaylistsSessionDataAttributes 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 PlaylistsSessionDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + 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) + && Objects.equals( + this.additionalProperties, playlistsSessionDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(sessionEvent, track, 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(" 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 new file mode 100644 index 00000000000..fe887ef862e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SessionIdArray.java @@ -0,0 +1,154 @@ +/* + * 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 new file mode 100644 index 00000000000..1bed5e3db2e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SessionIdData.java @@ -0,0 +1,176 @@ +/* + * 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/Snapshot.java b/src/main/java/com/datadog/api/client/v2/model/Snapshot.java new file mode 100644 index 00000000000..24341bf283b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/Snapshot.java @@ -0,0 +1,136 @@ +/* + * 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; + +/** */ +@JsonPropertyOrder({Snapshot.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class Snapshot { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private SnapshotData data; + + public Snapshot data(SnapshotData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SnapshotData getData() { + return data; + } + + public void setData(SnapshotData 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 Snapshot + */ + @JsonAnySetter + public Snapshot 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 Snapshot object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + 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); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Snapshot {\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/SnapshotArray.java b/src/main/java/com/datadog/api/client/v2/model/SnapshotArray.java new file mode 100644 index 00000000000..4c50c075bcd --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SnapshotArray.java @@ -0,0 +1,154 @@ +/* + * 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({SnapshotArray.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SnapshotArray { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public SnapshotArray() {} + + @JsonCreator + public SnapshotArray( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) { + this.data = data; + } + + public SnapshotArray data(List data) { + this.data = data; + for (SnapshotData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public SnapshotArray addDataItem(SnapshotData 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 SnapshotArray + */ + @JsonAnySetter + public SnapshotArray 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 SnapshotArray object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + 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); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SnapshotArray {\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/SnapshotCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/SnapshotCreateRequest.java new file mode 100644 index 00000000000..2a517c585cf --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SnapshotCreateRequest.java @@ -0,0 +1,145 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({SnapshotCreateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SnapshotCreateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private SnapshotCreateRequestData data; + + public SnapshotCreateRequest() {} + + @JsonCreator + public SnapshotCreateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) SnapshotCreateRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public SnapshotCreateRequest data(SnapshotCreateRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SnapshotCreateRequestData getData() { + return data; + } + + public void setData(SnapshotCreateRequestData 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 SnapshotCreateRequest + */ + @JsonAnySetter + public SnapshotCreateRequest 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 SnapshotCreateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + 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); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SnapshotCreateRequest {\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/SnapshotCreateRequestData.java b/src/main/java/com/datadog/api/client/v2/model/SnapshotCreateRequestData.java new file mode 100644 index 00000000000..ad9730f9cc6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SnapshotCreateRequestData.java @@ -0,0 +1,180 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + SnapshotCreateRequestData.JSON_PROPERTY_ATTRIBUTES, + SnapshotCreateRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SnapshotCreateRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private SnapshotCreateRequestDataAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SnapshotUpdateRequestDataType type = SnapshotUpdateRequestDataType.SNAPSHOTS; + + public SnapshotCreateRequestData() {} + + @JsonCreator + public SnapshotCreateRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + SnapshotUpdateRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public SnapshotCreateRequestData attributes(SnapshotCreateRequestDataAttributes 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 SnapshotCreateRequestDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(SnapshotCreateRequestDataAttributes attributes) { + this.attributes = attributes; + } + + public SnapshotCreateRequestData 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 SnapshotCreateRequestData + */ + @JsonAnySetter + public SnapshotCreateRequestData 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 SnapshotCreateRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + 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) + && Objects.equals( + this.additionalProperties, snapshotCreateRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SnapshotCreateRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SnapshotCreateRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SnapshotCreateRequestDataAttributes.java new file mode 100644 index 00000000000..4b14cbe7f4a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SnapshotCreateRequestDataAttributes.java @@ -0,0 +1,386 @@ +/* + * 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 new file mode 100644 index 00000000000..5f1d553c6e5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SnapshotData.java @@ -0,0 +1,197 @@ +/* + * 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 new file mode 100644 index 00000000000..bccfce805ca --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SnapshotDataAttributes.java @@ -0,0 +1,482 @@ +/* + * 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/SnapshotUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/SnapshotUpdateRequest.java new file mode 100644 index 00000000000..21784b0f2ae --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SnapshotUpdateRequest.java @@ -0,0 +1,145 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({SnapshotUpdateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SnapshotUpdateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private SnapshotUpdateRequestData data; + + public SnapshotUpdateRequest() {} + + @JsonCreator + public SnapshotUpdateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) SnapshotUpdateRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public SnapshotUpdateRequest data(SnapshotUpdateRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SnapshotUpdateRequestData getData() { + return data; + } + + public void setData(SnapshotUpdateRequestData 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 SnapshotUpdateRequest + */ + @JsonAnySetter + public SnapshotUpdateRequest 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 SnapshotUpdateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + 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); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SnapshotUpdateRequest {\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/SnapshotUpdateRequestData.java b/src/main/java/com/datadog/api/client/v2/model/SnapshotUpdateRequestData.java new file mode 100644 index 00000000000..67389881cfc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SnapshotUpdateRequestData.java @@ -0,0 +1,207 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + SnapshotUpdateRequestData.JSON_PROPERTY_ATTRIBUTES, + SnapshotUpdateRequestData.JSON_PROPERTY_ID, + SnapshotUpdateRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SnapshotUpdateRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private SnapshotUpdateRequestDataAttributes 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 SnapshotUpdateRequestData() {} + + @JsonCreator + public SnapshotUpdateRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + SnapshotUpdateRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public SnapshotUpdateRequestData attributes(SnapshotUpdateRequestDataAttributes 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 SnapshotUpdateRequestDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(SnapshotUpdateRequestDataAttributes attributes) { + this.attributes = attributes; + } + + public SnapshotUpdateRequestData 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 SnapshotUpdateRequestData 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 SnapshotUpdateRequestData + */ + @JsonAnySetter + public SnapshotUpdateRequestData 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 SnapshotUpdateRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + 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) + && Objects.equals( + this.additionalProperties, snapshotUpdateRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SnapshotUpdateRequestData {\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/SnapshotUpdateRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SnapshotUpdateRequestDataAttributes.java new file mode 100644 index 00000000000..d9a1ba4fa50 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SnapshotUpdateRequestDataAttributes.java @@ -0,0 +1,265 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@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 new file mode 100644 index 00000000000..e85823b161c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SnapshotUpdateRequestDataType.java @@ -0,0 +1,56 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** 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/ViewershipHistorySessionArray.java b/src/main/java/com/datadog/api/client/v2/model/ViewershipHistorySessionArray.java new file mode 100644 index 00000000000..b2d100f4021 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ViewershipHistorySessionArray.java @@ -0,0 +1,156 @@ +/* + * 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({ViewershipHistorySessionArray.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ViewershipHistorySessionArray { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public ViewershipHistorySessionArray() {} + + @JsonCreator + public ViewershipHistorySessionArray( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public ViewershipHistorySessionArray data(List data) { + this.data = data; + for (ViewershipHistorySessionData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ViewershipHistorySessionArray addDataItem(ViewershipHistorySessionData 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 ViewershipHistorySessionArray + */ + @JsonAnySetter + public ViewershipHistorySessionArray 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 ViewershipHistorySessionArray object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ViewershipHistorySessionArray viewershipHistorySessionArray = (ViewershipHistorySessionArray) o; + return Objects.equals(this.data, viewershipHistorySessionArray.data) + && Objects.equals( + this.additionalProperties, viewershipHistorySessionArray.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ViewershipHistorySessionArray {\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/ViewershipHistorySessionData.java b/src/main/java/com/datadog/api/client/v2/model/ViewershipHistorySessionData.java new file mode 100644 index 00000000000..7a0e2255cc0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ViewershipHistorySessionData.java @@ -0,0 +1,209 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + ViewershipHistorySessionData.JSON_PROPERTY_ATTRIBUTES, + ViewershipHistorySessionData.JSON_PROPERTY_ID, + ViewershipHistorySessionData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ViewershipHistorySessionData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ViewershipHistorySessionDataAttributes attributes; + + 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 ViewershipHistorySessionData() {} + + @JsonCreator + public ViewershipHistorySessionData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + ViewershipHistorySessionDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public ViewershipHistorySessionData attributes( + ViewershipHistorySessionDataAttributes 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 ViewershipHistorySessionDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(ViewershipHistorySessionDataAttributes attributes) { + this.attributes = attributes; + } + + public ViewershipHistorySessionData 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 ViewershipHistorySessionData 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 ViewershipHistorySessionData + */ + @JsonAnySetter + public ViewershipHistorySessionData 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 ViewershipHistorySessionData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + 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); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ViewershipHistorySessionData {\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/ViewershipHistorySessionDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ViewershipHistorySessionDataAttributes.java new file mode 100644 index 00000000000..745e63590f9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ViewershipHistorySessionDataAttributes.java @@ -0,0 +1,239 @@ +/* + * 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 new file mode 100644 index 00000000000..c44959789fa --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ViewershipHistorySessionDataType.java @@ -0,0 +1,58 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Rum replay 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/Watch.java b/src/main/java/com/datadog/api/client/v2/model/Watch.java new file mode 100644 index 00000000000..2d81bf83481 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/Watch.java @@ -0,0 +1,144 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({Watch.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class Watch { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private WatchData data; + + public Watch() {} + + @JsonCreator + public Watch(@JsonProperty(required = true, value = JSON_PROPERTY_DATA) WatchData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public Watch data(WatchData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public WatchData getData() { + return data; + } + + public void setData(WatchData 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 Watch + */ + @JsonAnySetter + public Watch 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 Watch object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + 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); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Watch {\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/WatchData.java b/src/main/java/com/datadog/api/client/v2/model/WatchData.java new file mode 100644 index 00000000000..ac7eb13cb7d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/WatchData.java @@ -0,0 +1,204 @@ +/* + * 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({ + WatchData.JSON_PROPERTY_ATTRIBUTES, + WatchData.JSON_PROPERTY_ID, + WatchData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class WatchData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private WatchDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private WatchDataType type = WatchDataType.RUM_REPLAY_WATCH; + + public WatchData() {} + + @JsonCreator + public WatchData(@JsonProperty(required = true, value = JSON_PROPERTY_TYPE) WatchDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public WatchData attributes(WatchDataAttributes 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 WatchDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(WatchDataAttributes attributes) { + this.attributes = attributes; + } + + public WatchData 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 WatchData type(WatchDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Rum replay watch resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public WatchDataType getType() { + return type; + } + + public void setType(WatchDataType 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 WatchData + */ + @JsonAnySetter + public WatchData 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 WatchData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + 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); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, 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(" 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/WatchDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/WatchDataAttributes.java new file mode 100644 index 00000000000..6ca4be1cb0b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/WatchDataAttributes.java @@ -0,0 +1,229 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.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 new file mode 100644 index 00000000000..d8c583d26ef --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/WatchDataType.java @@ -0,0 +1,54 @@ +/* + * 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 new file mode 100644 index 00000000000..d723fa0e2c0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/WatcherArray.java @@ -0,0 +1,154 @@ +/* + * 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 new file mode 100644 index 00000000000..146d440cce4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/WatcherData.java @@ -0,0 +1,205 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@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 new file mode 100644 index 00000000000..2eb5db07a55 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/WatcherDataAttributes.java @@ -0,0 +1,257 @@ +/* + * 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 new file mode 100644 index 00000000000..b87644f2b1c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/WatcherDataType.java @@ -0,0 +1,55 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** 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/v2/api/rum_replay_heatmaps.feature b/src/test/resources/com/datadog/api/client/v2/api/rum_replay_heatmaps.feature new file mode 100644 index 00000000000..310a5b622f8 --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/rum_replay_heatmaps.feature @@ -0,0 +1,38 @@ +@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 new file mode 100644 index 00000000000..b4665139f78 --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/rum_replay_playlists.feature @@ -0,0 +1,85 @@ +@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 new file mode 100644 index 00000000000..71f350db8de --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/rum_replay_sessions.feature @@ -0,0 +1,15 @@ +@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 new file mode 100644 index 00000000000..d2cdc3d2a99 --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/rum_replay_viewership.feature @@ -0,0 +1,37 @@ +@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 c0ec7dbe41a..41fa31182a8 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 @@ -3721,6 +3721,37 @@ "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": { @@ -3959,6 +3990,105 @@ "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": {