From ef4ed242b82bb2c94f0c398ec63f251c823a676a Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Tue, 3 Feb 2026 09:25:37 +0000 Subject: [PATCH] Sync rum-replay endpoints with backend for public documentation (#2969) Co-authored-by: ci.datadog-api-spec --- .generator/schemas/v2/openapi.yaml | 1113 +++++++++++++++++ .../CreateReplayHeatmapSnapshot.rb | 20 + .../DeleteReplayHeatmapSnapshot.rb | 5 + .../ListReplayHeatmapSnapshots.rb | 5 + .../UpdateReplayHeatmapSnapshot.rb | 17 + .../AddRumReplaySessionToPlaylist.rb | 5 + .../BulkRemoveRumReplayPlaylistSessions.rb | 14 + .../CreateRumReplayPlaylist.rb | 19 + .../DeleteRumReplayPlaylist.rb | 5 + .../GetRumReplayPlaylist.rb | 5 + .../ListRumReplayPlaylistSessions.rb | 5 + .../ListRumReplayPlaylists.rb | 5 + .../RemoveRumReplaySessionFromPlaylist.rb | 5 + .../UpdateRumReplayPlaylist.rb | 19 + .../v2/rum-replay-sessions/GetSegments.rb | 5 + .../CreateRumReplaySessionWatch.rb | 16 + .../DeleteRumReplaySessionWatch.rb | 5 + .../ListRumReplaySessionWatchers.rb | 5 + .../ListRumReplayViewershipHistorySessions.rb | 5 + features/scenarios_model_mapping.rb | 83 ++ features/v2/rum_replay_heatmaps.feature | 38 + features/v2/rum_replay_playlists.feature | 85 ++ features/v2/rum_replay_sessions.feature | 15 + features/v2/rum_replay_viewership.feature | 37 + features/v2/undo.json | 130 ++ lib/datadog_api_client/inflector.rb | 39 + .../v2/api/rum_replay_heatmaps_api.rb | 302 +++++ .../v2/api/rum_replay_playlists_api.rb | 652 ++++++++++ .../v2/api/rum_replay_sessions_api.rb | 104 ++ .../v2/api/rum_replay_viewership_api.rb | 306 +++++ lib/datadog_api_client/v2/models/playlist.rb | 123 ++ .../v2/models/playlist_array.rb | 125 ++ .../v2/models/playlist_data.rb | 143 +++ .../v2/models/playlist_data_attributes.rb | 173 +++ .../playlist_data_attributes_created_by.rb | 185 +++ .../v2/models/playlist_data_type.rb | 26 + .../v2/models/playlists_session.rb | 123 ++ .../v2/models/playlists_session_array.rb | 125 ++ .../v2/models/playlists_session_data.rb | 143 +++ .../playlists_session_data_attributes.rb | 115 ++ .../v2/models/session_id_array.rb | 125 ++ .../v2/models/session_id_data.rb | 133 ++ lib/datadog_api_client/v2/models/snapshot.rb | 105 ++ .../v2/models/snapshot_array.rb | 125 ++ .../v2/models/snapshot_create_request.rb | 123 ++ .../v2/models/snapshot_create_request_data.rb | 133 ++ ...snapshot_create_request_data_attributes.rb | 269 ++++ .../v2/models/snapshot_data.rb | 143 +++ .../v2/models/snapshot_data_attributes.rb | 245 ++++ .../v2/models/snapshot_update_request.rb | 123 ++ .../v2/models/snapshot_update_request_data.rb | 143 +++ ...snapshot_update_request_data_attributes.rb | 185 +++ .../snapshot_update_request_data_type.rb | 26 + .../viewership_history_session_array.rb | 125 ++ .../models/viewership_history_session_data.rb | 143 +++ ...wership_history_session_data_attributes.rb | 153 +++ .../viewership_history_session_data_type.rb | 26 + lib/datadog_api_client/v2/models/watch.rb | 123 ++ .../v2/models/watch_data.rb | 143 +++ .../v2/models/watch_data_attributes.rb | 175 +++ .../v2/models/watch_data_type.rb | 26 + .../v2/models/watcher_array.rb | 125 ++ .../v2/models/watcher_data.rb | 143 +++ .../v2/models/watcher_data_attributes.rb | 189 +++ .../v2/models/watcher_data_type.rb | 26 + 65 files changed, 7625 insertions(+) create mode 100644 examples/v2/rum-replay-heatmaps/CreateReplayHeatmapSnapshot.rb create mode 100644 examples/v2/rum-replay-heatmaps/DeleteReplayHeatmapSnapshot.rb create mode 100644 examples/v2/rum-replay-heatmaps/ListReplayHeatmapSnapshots.rb create mode 100644 examples/v2/rum-replay-heatmaps/UpdateReplayHeatmapSnapshot.rb create mode 100644 examples/v2/rum-replay-playlists/AddRumReplaySessionToPlaylist.rb create mode 100644 examples/v2/rum-replay-playlists/BulkRemoveRumReplayPlaylistSessions.rb create mode 100644 examples/v2/rum-replay-playlists/CreateRumReplayPlaylist.rb create mode 100644 examples/v2/rum-replay-playlists/DeleteRumReplayPlaylist.rb create mode 100644 examples/v2/rum-replay-playlists/GetRumReplayPlaylist.rb create mode 100644 examples/v2/rum-replay-playlists/ListRumReplayPlaylistSessions.rb create mode 100644 examples/v2/rum-replay-playlists/ListRumReplayPlaylists.rb create mode 100644 examples/v2/rum-replay-playlists/RemoveRumReplaySessionFromPlaylist.rb create mode 100644 examples/v2/rum-replay-playlists/UpdateRumReplayPlaylist.rb create mode 100644 examples/v2/rum-replay-sessions/GetSegments.rb create mode 100644 examples/v2/rum-replay-viewership/CreateRumReplaySessionWatch.rb create mode 100644 examples/v2/rum-replay-viewership/DeleteRumReplaySessionWatch.rb create mode 100644 examples/v2/rum-replay-viewership/ListRumReplaySessionWatchers.rb create mode 100644 examples/v2/rum-replay-viewership/ListRumReplayViewershipHistorySessions.rb create mode 100644 features/v2/rum_replay_heatmaps.feature create mode 100644 features/v2/rum_replay_playlists.feature create mode 100644 features/v2/rum_replay_sessions.feature create mode 100644 features/v2/rum_replay_viewership.feature create mode 100644 lib/datadog_api_client/v2/api/rum_replay_heatmaps_api.rb create mode 100644 lib/datadog_api_client/v2/api/rum_replay_playlists_api.rb create mode 100644 lib/datadog_api_client/v2/api/rum_replay_sessions_api.rb create mode 100644 lib/datadog_api_client/v2/api/rum_replay_viewership_api.rb create mode 100644 lib/datadog_api_client/v2/models/playlist.rb create mode 100644 lib/datadog_api_client/v2/models/playlist_array.rb create mode 100644 lib/datadog_api_client/v2/models/playlist_data.rb create mode 100644 lib/datadog_api_client/v2/models/playlist_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/playlist_data_attributes_created_by.rb create mode 100644 lib/datadog_api_client/v2/models/playlist_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/playlists_session.rb create mode 100644 lib/datadog_api_client/v2/models/playlists_session_array.rb create mode 100644 lib/datadog_api_client/v2/models/playlists_session_data.rb create mode 100644 lib/datadog_api_client/v2/models/playlists_session_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/session_id_array.rb create mode 100644 lib/datadog_api_client/v2/models/session_id_data.rb create mode 100644 lib/datadog_api_client/v2/models/snapshot.rb create mode 100644 lib/datadog_api_client/v2/models/snapshot_array.rb create mode 100644 lib/datadog_api_client/v2/models/snapshot_create_request.rb create mode 100644 lib/datadog_api_client/v2/models/snapshot_create_request_data.rb create mode 100644 lib/datadog_api_client/v2/models/snapshot_create_request_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/snapshot_data.rb create mode 100644 lib/datadog_api_client/v2/models/snapshot_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/snapshot_update_request.rb create mode 100644 lib/datadog_api_client/v2/models/snapshot_update_request_data.rb create mode 100644 lib/datadog_api_client/v2/models/snapshot_update_request_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/snapshot_update_request_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/viewership_history_session_array.rb create mode 100644 lib/datadog_api_client/v2/models/viewership_history_session_data.rb create mode 100644 lib/datadog_api_client/v2/models/viewership_history_session_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/viewership_history_session_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/watch.rb create mode 100644 lib/datadog_api_client/v2/models/watch_data.rb create mode 100644 lib/datadog_api_client/v2/models/watch_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/watch_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/watcher_array.rb create mode 100644 lib/datadog_api_client/v2/models/watcher_data.rb create mode 100644 lib/datadog_api_client/v2/models/watcher_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/watcher_data_type.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index af969a3d7f07..840ac4eef97e 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.rb b/examples/v2/rum-replay-heatmaps/CreateReplayHeatmapSnapshot.rb new file mode 100644 index 000000000000..b0596bfd96bd --- /dev/null +++ b/examples/v2/rum-replay-heatmaps/CreateReplayHeatmapSnapshot.rb @@ -0,0 +1,20 @@ +# Create replay heatmap snapshot returns "Created" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::RumReplayHeatmapsAPI.new + +body = DatadogAPIClient::V2::SnapshotCreateRequest.new({ + data: DatadogAPIClient::V2::SnapshotCreateRequestData.new({ + attributes: DatadogAPIClient::V2::SnapshotCreateRequestDataAttributes.new({ + 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: DatadogAPIClient::V2::SnapshotUpdateRequestDataType::SNAPSHOTS, + }), +}) +p api_instance.create_replay_heatmap_snapshot(body) diff --git a/examples/v2/rum-replay-heatmaps/DeleteReplayHeatmapSnapshot.rb b/examples/v2/rum-replay-heatmaps/DeleteReplayHeatmapSnapshot.rb new file mode 100644 index 000000000000..88ad93ad14d2 --- /dev/null +++ b/examples/v2/rum-replay-heatmaps/DeleteReplayHeatmapSnapshot.rb @@ -0,0 +1,5 @@ +# Delete replay heatmap snapshot returns "No Content" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::RumReplayHeatmapsAPI.new +api_instance.delete_replay_heatmap_snapshot("00000000-0000-0000-0000-000000000001") diff --git a/examples/v2/rum-replay-heatmaps/ListReplayHeatmapSnapshots.rb b/examples/v2/rum-replay-heatmaps/ListReplayHeatmapSnapshots.rb new file mode 100644 index 000000000000..1ae529b500ea --- /dev/null +++ b/examples/v2/rum-replay-heatmaps/ListReplayHeatmapSnapshots.rb @@ -0,0 +1,5 @@ +# List replay heatmap snapshots returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::RumReplayHeatmapsAPI.new +p api_instance.list_replay_heatmap_snapshots("/home") diff --git a/examples/v2/rum-replay-heatmaps/UpdateReplayHeatmapSnapshot.rb b/examples/v2/rum-replay-heatmaps/UpdateReplayHeatmapSnapshot.rb new file mode 100644 index 000000000000..0a5d1793ce85 --- /dev/null +++ b/examples/v2/rum-replay-heatmaps/UpdateReplayHeatmapSnapshot.rb @@ -0,0 +1,17 @@ +# Update replay heatmap snapshot returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::RumReplayHeatmapsAPI.new + +body = DatadogAPIClient::V2::SnapshotUpdateRequest.new({ + data: DatadogAPIClient::V2::SnapshotUpdateRequestData.new({ + attributes: DatadogAPIClient::V2::SnapshotUpdateRequestDataAttributes.new({ + event_id: "11111111-2222-3333-4444-555555555555", + is_device_type_selected_by_user: false, + start: 0, + }), + id: "00000000-0000-0000-0000-000000000001", + type: DatadogAPIClient::V2::SnapshotUpdateRequestDataType::SNAPSHOTS, + }), +}) +p api_instance.update_replay_heatmap_snapshot("00000000-0000-0000-0000-000000000001", body) diff --git a/examples/v2/rum-replay-playlists/AddRumReplaySessionToPlaylist.rb b/examples/v2/rum-replay-playlists/AddRumReplaySessionToPlaylist.rb new file mode 100644 index 000000000000..beacfc78db98 --- /dev/null +++ b/examples/v2/rum-replay-playlists/AddRumReplaySessionToPlaylist.rb @@ -0,0 +1,5 @@ +# Add rum replay session to playlist returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::RumReplayPlaylistsAPI.new +p api_instance.add_rum_replay_session_to_playlist(1704067200000, 1234567, "00000000-0000-0000-0000-000000000001") diff --git a/examples/v2/rum-replay-playlists/BulkRemoveRumReplayPlaylistSessions.rb b/examples/v2/rum-replay-playlists/BulkRemoveRumReplayPlaylistSessions.rb new file mode 100644 index 000000000000..1871722a900c --- /dev/null +++ b/examples/v2/rum-replay-playlists/BulkRemoveRumReplayPlaylistSessions.rb @@ -0,0 +1,14 @@ +# Bulk remove rum replay playlist sessions returns "No Content" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::RumReplayPlaylistsAPI.new + +body = DatadogAPIClient::V2::SessionIdArray.new({ + data: [ + DatadogAPIClient::V2::SessionIdData.new({ + id: "00000000-0000-0000-0000-000000000001", + type: DatadogAPIClient::V2::ViewershipHistorySessionDataType::RUM_REPLAY_SESSION, + }), + ], +}) +api_instance.bulk_remove_rum_replay_playlist_sessions(1234567, body) diff --git a/examples/v2/rum-replay-playlists/CreateRumReplayPlaylist.rb b/examples/v2/rum-replay-playlists/CreateRumReplayPlaylist.rb new file mode 100644 index 000000000000..6ab68906d030 --- /dev/null +++ b/examples/v2/rum-replay-playlists/CreateRumReplayPlaylist.rb @@ -0,0 +1,19 @@ +# Create rum replay playlist returns "Created" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::RumReplayPlaylistsAPI.new + +body = DatadogAPIClient::V2::Playlist.new({ + data: DatadogAPIClient::V2::PlaylistData.new({ + attributes: DatadogAPIClient::V2::PlaylistDataAttributes.new({ + created_by: DatadogAPIClient::V2::PlaylistDataAttributesCreatedBy.new({ + handle: "john.doe@example.com", + id: "00000000-0000-0000-0000-000000000001", + uuid: "00000000-0000-0000-0000-000000000001", + }), + name: "My Playlist", + }), + type: DatadogAPIClient::V2::PlaylistDataType::RUM_REPLAY_PLAYLIST, + }), +}) +p api_instance.create_rum_replay_playlist(body) diff --git a/examples/v2/rum-replay-playlists/DeleteRumReplayPlaylist.rb b/examples/v2/rum-replay-playlists/DeleteRumReplayPlaylist.rb new file mode 100644 index 000000000000..12ebc6dc097a --- /dev/null +++ b/examples/v2/rum-replay-playlists/DeleteRumReplayPlaylist.rb @@ -0,0 +1,5 @@ +# Delete rum replay playlist returns "No Content" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::RumReplayPlaylistsAPI.new +api_instance.delete_rum_replay_playlist(1234567) diff --git a/examples/v2/rum-replay-playlists/GetRumReplayPlaylist.rb b/examples/v2/rum-replay-playlists/GetRumReplayPlaylist.rb new file mode 100644 index 000000000000..a2641dcc6dd8 --- /dev/null +++ b/examples/v2/rum-replay-playlists/GetRumReplayPlaylist.rb @@ -0,0 +1,5 @@ +# Get rum replay playlist returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::RumReplayPlaylistsAPI.new +p api_instance.get_rum_replay_playlist(1234567) diff --git a/examples/v2/rum-replay-playlists/ListRumReplayPlaylistSessions.rb b/examples/v2/rum-replay-playlists/ListRumReplayPlaylistSessions.rb new file mode 100644 index 000000000000..19ef91c78264 --- /dev/null +++ b/examples/v2/rum-replay-playlists/ListRumReplayPlaylistSessions.rb @@ -0,0 +1,5 @@ +# List rum replay playlist sessions returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::RumReplayPlaylistsAPI.new +p api_instance.list_rum_replay_playlist_sessions(1234567) diff --git a/examples/v2/rum-replay-playlists/ListRumReplayPlaylists.rb b/examples/v2/rum-replay-playlists/ListRumReplayPlaylists.rb new file mode 100644 index 000000000000..394612cfdb6c --- /dev/null +++ b/examples/v2/rum-replay-playlists/ListRumReplayPlaylists.rb @@ -0,0 +1,5 @@ +# List rum replay playlists returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::RumReplayPlaylistsAPI.new +p api_instance.list_rum_replay_playlists() diff --git a/examples/v2/rum-replay-playlists/RemoveRumReplaySessionFromPlaylist.rb b/examples/v2/rum-replay-playlists/RemoveRumReplaySessionFromPlaylist.rb new file mode 100644 index 000000000000..d3bbdaa43da8 --- /dev/null +++ b/examples/v2/rum-replay-playlists/RemoveRumReplaySessionFromPlaylist.rb @@ -0,0 +1,5 @@ +# Remove rum replay session from playlist returns "No Content" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::RumReplayPlaylistsAPI.new +api_instance.remove_rum_replay_session_from_playlist(1234567, "00000000-0000-0000-0000-000000000001") diff --git a/examples/v2/rum-replay-playlists/UpdateRumReplayPlaylist.rb b/examples/v2/rum-replay-playlists/UpdateRumReplayPlaylist.rb new file mode 100644 index 000000000000..a7d7112e6a40 --- /dev/null +++ b/examples/v2/rum-replay-playlists/UpdateRumReplayPlaylist.rb @@ -0,0 +1,19 @@ +# Update rum replay playlist returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::RumReplayPlaylistsAPI.new + +body = DatadogAPIClient::V2::Playlist.new({ + data: DatadogAPIClient::V2::PlaylistData.new({ + attributes: DatadogAPIClient::V2::PlaylistDataAttributes.new({ + created_by: DatadogAPIClient::V2::PlaylistDataAttributesCreatedBy.new({ + handle: "john.doe@example.com", + id: "00000000-0000-0000-0000-000000000001", + uuid: "00000000-0000-0000-0000-000000000001", + }), + name: "My Playlist", + }), + type: DatadogAPIClient::V2::PlaylistDataType::RUM_REPLAY_PLAYLIST, + }), +}) +p api_instance.update_rum_replay_playlist(1234567, body) diff --git a/examples/v2/rum-replay-sessions/GetSegments.rb b/examples/v2/rum-replay-sessions/GetSegments.rb new file mode 100644 index 000000000000..76dd4d8cc242 --- /dev/null +++ b/examples/v2/rum-replay-sessions/GetSegments.rb @@ -0,0 +1,5 @@ +# Get segments returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::RumReplaySessionsAPI.new +p api_instance.get_segments("00000000-0000-0000-0000-000000000002", "00000000-0000-0000-0000-000000000001") diff --git a/examples/v2/rum-replay-viewership/CreateRumReplaySessionWatch.rb b/examples/v2/rum-replay-viewership/CreateRumReplaySessionWatch.rb new file mode 100644 index 000000000000..82b2dc1c468a --- /dev/null +++ b/examples/v2/rum-replay-viewership/CreateRumReplaySessionWatch.rb @@ -0,0 +1,16 @@ +# Create rum replay session watch returns "Created" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::RumReplayViewershipAPI.new + +body = DatadogAPIClient::V2::Watch.new({ + data: DatadogAPIClient::V2::WatchData.new({ + attributes: DatadogAPIClient::V2::WatchDataAttributes.new({ + application_id: "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb", + event_id: "11111111-2222-3333-4444-555555555555", + timestamp: "2026-01-13T17:15:53.208340Z", + }), + type: DatadogAPIClient::V2::WatchDataType::RUM_REPLAY_WATCH, + }), +}) +p api_instance.create_rum_replay_session_watch("00000000-0000-0000-0000-000000000001", body) diff --git a/examples/v2/rum-replay-viewership/DeleteRumReplaySessionWatch.rb b/examples/v2/rum-replay-viewership/DeleteRumReplaySessionWatch.rb new file mode 100644 index 000000000000..c3861e609d05 --- /dev/null +++ b/examples/v2/rum-replay-viewership/DeleteRumReplaySessionWatch.rb @@ -0,0 +1,5 @@ +# Delete rum replay session watch returns "No Content" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::RumReplayViewershipAPI.new +api_instance.delete_rum_replay_session_watch("00000000-0000-0000-0000-000000000001") diff --git a/examples/v2/rum-replay-viewership/ListRumReplaySessionWatchers.rb b/examples/v2/rum-replay-viewership/ListRumReplaySessionWatchers.rb new file mode 100644 index 000000000000..dad817dc284a --- /dev/null +++ b/examples/v2/rum-replay-viewership/ListRumReplaySessionWatchers.rb @@ -0,0 +1,5 @@ +# List rum replay session watchers returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::RumReplayViewershipAPI.new +p api_instance.list_rum_replay_session_watchers("00000000-0000-0000-0000-000000000001") diff --git a/examples/v2/rum-replay-viewership/ListRumReplayViewershipHistorySessions.rb b/examples/v2/rum-replay-viewership/ListRumReplayViewershipHistorySessions.rb new file mode 100644 index 000000000000..882c3ae0aad5 --- /dev/null +++ b/examples/v2/rum-replay-viewership/ListRumReplayViewershipHistorySessions.rb @@ -0,0 +1,5 @@ +# List rum replay viewership history sessions returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::RumReplayViewershipAPI.new +p api_instance.list_rum_replay_viewership_history_sessions() diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index d1a0604126c6..754dcc7c06be 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -3115,6 +3115,22 @@ "agent_rule_id" => "String", "body" => "CloudWorkloadSecurityAgentRuleUpdateRequest", }, + "v2.ListReplayHeatmapSnapshots" => { + "filter_device_type" => "String", + "filter_view_name" => "String", + "page_limit" => "Integer", + "filter_application_id" => "String", + }, + "v2.CreateReplayHeatmapSnapshot" => { + "body" => "SnapshotCreateRequest", + }, + "v2.DeleteReplayHeatmapSnapshot" => { + "snapshot_id" => "String", + }, + "v2.UpdateReplayHeatmapSnapshot" => { + "snapshot_id" => "String", + "body" => "SnapshotUpdateRequest", + }, "v2.DeleteRestrictionPolicy" => { "resource_id" => "String", }, @@ -3190,6 +3206,73 @@ "metric_id" => "String", "body" => "RumMetricUpdateRequest", }, + "v2.ListRumReplayPlaylists" => { + "filter_created_by_uuid" => "String", + "filter_query" => "String", + "page_number" => "Integer", + "page_size" => "Integer", + }, + "v2.CreateRumReplayPlaylist" => { + "body" => "Playlist", + }, + "v2.DeleteRumReplayPlaylist" => { + "playlist_id" => "Integer", + }, + "v2.GetRumReplayPlaylist" => { + "playlist_id" => "Integer", + }, + "v2.UpdateRumReplayPlaylist" => { + "playlist_id" => "Integer", + "body" => "Playlist", + }, + "v2.BulkRemoveRumReplayPlaylistSessions" => { + "playlist_id" => "Integer", + "body" => "SessionIdArray", + }, + "v2.ListRumReplayPlaylistSessions" => { + "playlist_id" => "Integer", + "page_number" => "Integer", + "page_size" => "Integer", + }, + "v2.RemoveRumReplaySessionFromPlaylist" => { + "playlist_id" => "Integer", + "session_id" => "String", + }, + "v2.AddRumReplaySessionToPlaylist" => { + "data_source" => "String", + "ts" => "Integer", + "playlist_id" => "Integer", + "session_id" => "String", + }, + "v2.GetSegments" => { + "view_id" => "String", + "source" => "String", + "session_id" => "String", + "ts" => "Integer", + "max_list_size" => "Integer", + "paging" => "String", + }, + "v2.ListRumReplaySessionWatchers" => { + "page_size" => "Integer", + "page_number" => "Integer", + "session_id" => "String", + }, + "v2.DeleteRumReplaySessionWatch" => { + "session_id" => "String", + }, + "v2.CreateRumReplaySessionWatch" => { + "session_id" => "String", + "body" => "Watch", + }, + "v2.ListRumReplayViewershipHistorySessions" => { + "filter_watched_at_start" => "Integer", + "page_number" => "Integer", + "filter_created_by" => "String", + "filter_watched_at_end" => "Integer", + "filter_session_ids" => "String", + "page_size" => "Integer", + "filter_application_id" => "String", + }, "v2.ListScorecardOutcomes" => { "page_size" => "Integer", "page_offset" => "Integer", diff --git a/features/v2/rum_replay_heatmaps.feature b/features/v2/rum_replay_heatmaps.feature new file mode 100644 index 000000000000..310a5b622f8a --- /dev/null +++ b/features/v2/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/features/v2/rum_replay_playlists.feature b/features/v2/rum_replay_playlists.feature new file mode 100644 index 000000000000..b4665139f788 --- /dev/null +++ b/features/v2/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/features/v2/rum_replay_sessions.feature b/features/v2/rum_replay_sessions.feature new file mode 100644 index 000000000000..71f350db8dea --- /dev/null +++ b/features/v2/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/features/v2/rum_replay_viewership.feature b/features/v2/rum_replay_viewership.feature new file mode 100644 index 000000000000..d2cdc3d2a993 --- /dev/null +++ b/features/v2/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/features/v2/undo.json b/features/v2/undo.json index c0ec7dbe41ae..41fa31182a8b 100644 --- a/features/v2/undo.json +++ b/features/v2/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": { diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index dee0c5c9f1df..1c12eeb3b6ed 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -3746,6 +3746,16 @@ def overrides "v2.permission_attributes" => "PermissionAttributes", "v2.permissions_response" => "PermissionsResponse", "v2.permissions_type" => "PermissionsType", + "v2.playlist" => "Playlist", + "v2.playlist_array" => "PlaylistArray", + "v2.playlist_data" => "PlaylistData", + "v2.playlist_data_attributes" => "PlaylistDataAttributes", + "v2.playlist_data_attributes_created_by" => "PlaylistDataAttributesCreatedBy", + "v2.playlist_data_type" => "PlaylistDataType", + "v2.playlists_session" => "PlaylistsSession", + "v2.playlists_session_array" => "PlaylistsSessionArray", + "v2.playlists_session_data" => "PlaylistsSessionData", + "v2.playlists_session_data_attributes" => "PlaylistsSessionDataAttributes", "v2.postmortem_attachment_request" => "PostmortemAttachmentRequest", "v2.postmortem_attachment_request_attributes" => "PostmortemAttachmentRequestAttributes", "v2.postmortem_attachment_request_data" => "PostmortemAttachmentRequestData", @@ -4546,6 +4556,8 @@ def overrides "v2.service_now_user_data" => "ServiceNowUserData", "v2.service_now_users_response" => "ServiceNowUsersResponse", "v2.service_now_user_type" => "ServiceNowUserType", + "v2.session_id_array" => "SessionIdArray", + "v2.session_id_data" => "SessionIdData", "v2.shift" => "Shift", "v2.shift_data" => "ShiftData", "v2.shift_data_attributes" => "ShiftDataAttributes", @@ -4583,6 +4595,17 @@ def overrides "v2.slo_status_data_attributes" => "SloStatusDataAttributes", "v2.slo_status_response" => "SloStatusResponse", "v2.slo_status_type" => "SloStatusType", + "v2.snapshot" => "Snapshot", + "v2.snapshot_array" => "SnapshotArray", + "v2.snapshot_create_request" => "SnapshotCreateRequest", + "v2.snapshot_create_request_data" => "SnapshotCreateRequestData", + "v2.snapshot_create_request_data_attributes" => "SnapshotCreateRequestDataAttributes", + "v2.snapshot_data" => "SnapshotData", + "v2.snapshot_data_attributes" => "SnapshotDataAttributes", + "v2.snapshot_update_request" => "SnapshotUpdateRequest", + "v2.snapshot_update_request_data" => "SnapshotUpdateRequestData", + "v2.snapshot_update_request_data_attributes" => "SnapshotUpdateRequestDataAttributes", + "v2.snapshot_update_request_data_type" => "SnapshotUpdateRequestDataType", "v2.software_catalog_trigger_wrapper" => "SoftwareCatalogTriggerWrapper", "v2.sort_direction" => "SortDirection", "v2.span" => "Span", @@ -5068,6 +5091,10 @@ def overrides "v2.validation_response" => "ValidationResponse", "v2.version_history_update" => "VersionHistoryUpdate", "v2.version_history_update_type" => "VersionHistoryUpdateType", + "v2.viewership_history_session_array" => "ViewershipHistorySessionArray", + "v2.viewership_history_session_data" => "ViewershipHistorySessionData", + "v2.viewership_history_session_data_attributes" => "ViewershipHistorySessionDataAttributes", + "v2.viewership_history_session_data_type" => "ViewershipHistorySessionDataType", "v2.virus_total_api_key" => "VirusTotalAPIKey", "v2.virus_total_api_key_type" => "VirusTotalAPIKeyType", "v2.virus_total_api_key_update" => "VirusTotalAPIKeyUpdate", @@ -5091,6 +5118,14 @@ def overrides "v2.vulnerability_status" => "VulnerabilityStatus", "v2.vulnerability_tool" => "VulnerabilityTool", "v2.vulnerability_type" => "VulnerabilityType", + "v2.watch" => "Watch", + "v2.watch_data" => "WatchData", + "v2.watch_data_attributes" => "WatchDataAttributes", + "v2.watch_data_type" => "WatchDataType", + "v2.watcher_array" => "WatcherArray", + "v2.watcher_data" => "WatcherData", + "v2.watcher_data_attributes" => "WatcherDataAttributes", + "v2.watcher_data_type" => "WatcherDataType", "v2.weekday" => "Weekday", "v2.widget_live_span" => "WidgetLiveSpan", "v2.workflow_data" => "WorkflowData", @@ -5224,6 +5259,10 @@ def overrides "v2.rum_api" => "RUMAPI", "v2.rum_audience_management_api" => "RumAudienceManagementAPI", "v2.rum_metrics_api" => "RumMetricsAPI", + "v2.rum_replay_heatmaps_api" => "RumReplayHeatmapsAPI", + "v2.rum_replay_playlists_api" => "RumReplayPlaylistsAPI", + "v2.rum_replay_sessions_api" => "RumReplaySessionsAPI", + "v2.rum_replay_viewership_api" => "RumReplayViewershipAPI", "v2.rum_retention_filters_api" => "RumRetentionFiltersAPI", "v2.security_monitoring_api" => "SecurityMonitoringAPI", "v2.sensitive_data_scanner_api" => "SensitiveDataScannerAPI", diff --git a/lib/datadog_api_client/v2/api/rum_replay_heatmaps_api.rb b/lib/datadog_api_client/v2/api/rum_replay_heatmaps_api.rb new file mode 100644 index 000000000000..7be1fa4c9cda --- /dev/null +++ b/lib/datadog_api_client/v2/api/rum_replay_heatmaps_api.rb @@ -0,0 +1,302 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'cgi' + +module DatadogAPIClient::V2 + class RumReplayHeatmapsAPI + attr_accessor :api_client + + def initialize(api_client = DatadogAPIClient::APIClient.default) + @api_client = api_client + end + + # Create replay heatmap snapshot. + # + # @see #create_replay_heatmap_snapshot_with_http_info + def create_replay_heatmap_snapshot(body, opts = {}) + data, _status_code, _headers = create_replay_heatmap_snapshot_with_http_info(body, opts) + data + end + + # Create replay heatmap snapshot. + # + # Create a heatmap snapshot. + # + # @param body [SnapshotCreateRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(Snapshot, Integer, Hash)>] Snapshot data, response status code and response headers + def create_replay_heatmap_snapshot_with_http_info(body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumReplayHeatmapsAPI.create_replay_heatmap_snapshot ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling RumReplayHeatmapsAPI.create_replay_heatmap_snapshot" + end + # resource path + local_var_path = '/api/v2/replay/heatmap/snapshots' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'Snapshot' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :create_replay_heatmap_snapshot, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumReplayHeatmapsAPI#create_replay_heatmap_snapshot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete replay heatmap snapshot. + # + # @see #delete_replay_heatmap_snapshot_with_http_info + def delete_replay_heatmap_snapshot(snapshot_id, opts = {}) + delete_replay_heatmap_snapshot_with_http_info(snapshot_id, opts) + nil + end + + # Delete replay heatmap snapshot. + # + # Delete a heatmap snapshot. + # + # @param snapshot_id [String] Unique identifier of the heatmap snapshot. + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_replay_heatmap_snapshot_with_http_info(snapshot_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumReplayHeatmapsAPI.delete_replay_heatmap_snapshot ...' + end + # verify the required parameter 'snapshot_id' is set + if @api_client.config.client_side_validation && snapshot_id.nil? + fail ArgumentError, "Missing the required parameter 'snapshot_id' when calling RumReplayHeatmapsAPI.delete_replay_heatmap_snapshot" + end + # resource path + local_var_path = '/api/v2/replay/heatmap/snapshots/{snapshot_id}'.sub('{snapshot_id}', CGI.escape(snapshot_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :delete_replay_heatmap_snapshot, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumReplayHeatmapsAPI#delete_replay_heatmap_snapshot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List replay heatmap snapshots. + # + # @see #list_replay_heatmap_snapshots_with_http_info + def list_replay_heatmap_snapshots(filter_view_name, opts = {}) + data, _status_code, _headers = list_replay_heatmap_snapshots_with_http_info(filter_view_name, opts) + data + end + + # List replay heatmap snapshots. + # + # List heatmap snapshots. + # + # @param filter_view_name [String] View name to filter snapshots. + # @param opts [Hash] the optional parameters + # @option opts [String] :filter_device_type Device type to filter snapshots. + # @option opts [Integer] :page_limit Maximum number of snapshots to return. + # @option opts [String] :filter_application_id Filter by application ID. + # @return [Array<(SnapshotArray, Integer, Hash)>] SnapshotArray data, response status code and response headers + def list_replay_heatmap_snapshots_with_http_info(filter_view_name, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumReplayHeatmapsAPI.list_replay_heatmap_snapshots ...' + end + # verify the required parameter 'filter_view_name' is set + if @api_client.config.client_side_validation && filter_view_name.nil? + fail ArgumentError, "Missing the required parameter 'filter_view_name' when calling RumReplayHeatmapsAPI.list_replay_heatmap_snapshots" + end + # resource path + local_var_path = '/api/v2/replay/heatmap/snapshots' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'filter[view_name]'] = filter_view_name + query_params[:'filter[device_type]'] = opts[:'filter_device_type'] if !opts[:'filter_device_type'].nil? + query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil? + query_params[:'filter[application_id]'] = opts[:'filter_application_id'] if !opts[:'filter_application_id'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SnapshotArray' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_replay_heatmap_snapshots, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumReplayHeatmapsAPI#list_replay_heatmap_snapshots\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update replay heatmap snapshot. + # + # @see #update_replay_heatmap_snapshot_with_http_info + def update_replay_heatmap_snapshot(snapshot_id, body, opts = {}) + data, _status_code, _headers = update_replay_heatmap_snapshot_with_http_info(snapshot_id, body, opts) + data + end + + # Update replay heatmap snapshot. + # + # Update a heatmap snapshot. + # + # @param snapshot_id [String] Unique identifier of the heatmap snapshot. + # @param body [SnapshotUpdateRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(Snapshot, Integer, Hash)>] Snapshot data, response status code and response headers + def update_replay_heatmap_snapshot_with_http_info(snapshot_id, body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumReplayHeatmapsAPI.update_replay_heatmap_snapshot ...' + end + # verify the required parameter 'snapshot_id' is set + if @api_client.config.client_side_validation && snapshot_id.nil? + fail ArgumentError, "Missing the required parameter 'snapshot_id' when calling RumReplayHeatmapsAPI.update_replay_heatmap_snapshot" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling RumReplayHeatmapsAPI.update_replay_heatmap_snapshot" + end + # resource path + local_var_path = '/api/v2/replay/heatmap/snapshots/{snapshot_id}'.sub('{snapshot_id}', CGI.escape(snapshot_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'Snapshot' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :update_replay_heatmap_snapshot, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumReplayHeatmapsAPI#update_replay_heatmap_snapshot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/datadog_api_client/v2/api/rum_replay_playlists_api.rb b/lib/datadog_api_client/v2/api/rum_replay_playlists_api.rb new file mode 100644 index 000000000000..63304c53509a --- /dev/null +++ b/lib/datadog_api_client/v2/api/rum_replay_playlists_api.rb @@ -0,0 +1,652 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'cgi' + +module DatadogAPIClient::V2 + class RumReplayPlaylistsAPI + attr_accessor :api_client + + def initialize(api_client = DatadogAPIClient::APIClient.default) + @api_client = api_client + end + + # Add rum replay session to playlist. + # + # @see #add_rum_replay_session_to_playlist_with_http_info + def add_rum_replay_session_to_playlist(ts, playlist_id, session_id, opts = {}) + data, _status_code, _headers = add_rum_replay_session_to_playlist_with_http_info(ts, playlist_id, session_id, opts) + data + end + + # Add rum replay session to playlist. + # + # Add a session to a playlist. + # + # @param ts [Integer] Server-side timestamp in milliseconds. + # @param playlist_id [Integer] Unique identifier of the playlist. + # @param session_id [String] Unique identifier of the session. + # @param opts [Hash] the optional parameters + # @option opts [String] :data_source Data source type. Valid values: 'rum' or 'product_analytics'. Defaults to 'rum'. + # @return [Array<(PlaylistsSession, Integer, Hash)>] PlaylistsSession data, response status code and response headers + def add_rum_replay_session_to_playlist_with_http_info(ts, playlist_id, session_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumReplayPlaylistsAPI.add_rum_replay_session_to_playlist ...' + end + # verify the required parameter 'ts' is set + if @api_client.config.client_side_validation && ts.nil? + fail ArgumentError, "Missing the required parameter 'ts' when calling RumReplayPlaylistsAPI.add_rum_replay_session_to_playlist" + end + # verify the required parameter 'playlist_id' is set + if @api_client.config.client_side_validation && playlist_id.nil? + fail ArgumentError, "Missing the required parameter 'playlist_id' when calling RumReplayPlaylistsAPI.add_rum_replay_session_to_playlist" + end + # verify the required parameter 'session_id' is set + if @api_client.config.client_side_validation && session_id.nil? + fail ArgumentError, "Missing the required parameter 'session_id' when calling RumReplayPlaylistsAPI.add_rum_replay_session_to_playlist" + end + # resource path + local_var_path = '/api/v2/rum/replay/playlists/{playlist_id}/sessions/{session_id}'.sub('{playlist_id}', CGI.escape(playlist_id.to_s).gsub('%2F', '/')).sub('{session_id}', CGI.escape(session_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'ts'] = ts + query_params[:'data_source'] = opts[:'data_source'] if !opts[:'data_source'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'PlaylistsSession' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :add_rum_replay_session_to_playlist, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumReplayPlaylistsAPI#add_rum_replay_session_to_playlist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Bulk remove rum replay playlist sessions. + # + # @see #bulk_remove_rum_replay_playlist_sessions_with_http_info + def bulk_remove_rum_replay_playlist_sessions(playlist_id, body, opts = {}) + bulk_remove_rum_replay_playlist_sessions_with_http_info(playlist_id, body, opts) + nil + end + + # Bulk remove rum replay playlist sessions. + # + # Remove sessions from a playlist. + # + # @param playlist_id [Integer] Unique identifier of the playlist. + # @param body [SessionIdArray] + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def bulk_remove_rum_replay_playlist_sessions_with_http_info(playlist_id, body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumReplayPlaylistsAPI.bulk_remove_rum_replay_playlist_sessions ...' + end + # verify the required parameter 'playlist_id' is set + if @api_client.config.client_side_validation && playlist_id.nil? + fail ArgumentError, "Missing the required parameter 'playlist_id' when calling RumReplayPlaylistsAPI.bulk_remove_rum_replay_playlist_sessions" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling RumReplayPlaylistsAPI.bulk_remove_rum_replay_playlist_sessions" + end + # resource path + local_var_path = '/api/v2/rum/replay/playlists/{playlist_id}/sessions'.sub('{playlist_id}', CGI.escape(playlist_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :bulk_remove_rum_replay_playlist_sessions, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumReplayPlaylistsAPI#bulk_remove_rum_replay_playlist_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Create rum replay playlist. + # + # @see #create_rum_replay_playlist_with_http_info + def create_rum_replay_playlist(body, opts = {}) + data, _status_code, _headers = create_rum_replay_playlist_with_http_info(body, opts) + data + end + + # Create rum replay playlist. + # + # Create a playlist. + # + # @param body [Playlist] + # @param opts [Hash] the optional parameters + # @return [Array<(Playlist, Integer, Hash)>] Playlist data, response status code and response headers + def create_rum_replay_playlist_with_http_info(body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumReplayPlaylistsAPI.create_rum_replay_playlist ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling RumReplayPlaylistsAPI.create_rum_replay_playlist" + end + # resource path + local_var_path = '/api/v2/rum/replay/playlists' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'Playlist' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :create_rum_replay_playlist, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumReplayPlaylistsAPI#create_rum_replay_playlist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete rum replay playlist. + # + # @see #delete_rum_replay_playlist_with_http_info + def delete_rum_replay_playlist(playlist_id, opts = {}) + delete_rum_replay_playlist_with_http_info(playlist_id, opts) + nil + end + + # Delete rum replay playlist. + # + # Delete a playlist. + # + # @param playlist_id [Integer] Unique identifier of the playlist. + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_rum_replay_playlist_with_http_info(playlist_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumReplayPlaylistsAPI.delete_rum_replay_playlist ...' + end + # verify the required parameter 'playlist_id' is set + if @api_client.config.client_side_validation && playlist_id.nil? + fail ArgumentError, "Missing the required parameter 'playlist_id' when calling RumReplayPlaylistsAPI.delete_rum_replay_playlist" + end + # resource path + local_var_path = '/api/v2/rum/replay/playlists/{playlist_id}'.sub('{playlist_id}', CGI.escape(playlist_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :delete_rum_replay_playlist, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumReplayPlaylistsAPI#delete_rum_replay_playlist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get rum replay playlist. + # + # @see #get_rum_replay_playlist_with_http_info + def get_rum_replay_playlist(playlist_id, opts = {}) + data, _status_code, _headers = get_rum_replay_playlist_with_http_info(playlist_id, opts) + data + end + + # Get rum replay playlist. + # + # Get a playlist. + # + # @param playlist_id [Integer] Unique identifier of the playlist. + # @param opts [Hash] the optional parameters + # @return [Array<(Playlist, Integer, Hash)>] Playlist data, response status code and response headers + def get_rum_replay_playlist_with_http_info(playlist_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumReplayPlaylistsAPI.get_rum_replay_playlist ...' + end + # verify the required parameter 'playlist_id' is set + if @api_client.config.client_side_validation && playlist_id.nil? + fail ArgumentError, "Missing the required parameter 'playlist_id' when calling RumReplayPlaylistsAPI.get_rum_replay_playlist" + end + # resource path + local_var_path = '/api/v2/rum/replay/playlists/{playlist_id}'.sub('{playlist_id}', CGI.escape(playlist_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Playlist' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_rum_replay_playlist, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumReplayPlaylistsAPI#get_rum_replay_playlist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List rum replay playlists. + # + # @see #list_rum_replay_playlists_with_http_info + def list_rum_replay_playlists(opts = {}) + data, _status_code, _headers = list_rum_replay_playlists_with_http_info(opts) + data + end + + # List rum replay playlists. + # + # List playlists. + # + # @param opts [Hash] the optional parameters + # @option opts [String] :filter_created_by_uuid Filter playlists by the UUID of the user who created them. + # @option opts [String] :filter_query Search query to filter playlists by name. + # @option opts [Integer] :page_number Page number for pagination (0-indexed). + # @option opts [Integer] :page_size Number of items per page. + # @return [Array<(PlaylistArray, Integer, Hash)>] PlaylistArray data, response status code and response headers + def list_rum_replay_playlists_with_http_info(opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumReplayPlaylistsAPI.list_rum_replay_playlists ...' + end + # resource path + local_var_path = '/api/v2/rum/replay/playlists' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'filter[created_by_uuid]'] = opts[:'filter_created_by_uuid'] if !opts[:'filter_created_by_uuid'].nil? + query_params[:'filter[query]'] = opts[:'filter_query'] if !opts[:'filter_query'].nil? + query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? + query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'PlaylistArray' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_rum_replay_playlists, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumReplayPlaylistsAPI#list_rum_replay_playlists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List rum replay playlist sessions. + # + # @see #list_rum_replay_playlist_sessions_with_http_info + def list_rum_replay_playlist_sessions(playlist_id, opts = {}) + data, _status_code, _headers = list_rum_replay_playlist_sessions_with_http_info(playlist_id, opts) + data + end + + # List rum replay playlist sessions. + # + # List sessions in a playlist. + # + # @param playlist_id [Integer] Unique identifier of the playlist. + # @param opts [Hash] the optional parameters + # @option opts [Integer] :page_number Page number for pagination (0-indexed). + # @option opts [Integer] :page_size Number of items per page. + # @return [Array<(PlaylistsSessionArray, Integer, Hash)>] PlaylistsSessionArray data, response status code and response headers + def list_rum_replay_playlist_sessions_with_http_info(playlist_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumReplayPlaylistsAPI.list_rum_replay_playlist_sessions ...' + end + # verify the required parameter 'playlist_id' is set + if @api_client.config.client_side_validation && playlist_id.nil? + fail ArgumentError, "Missing the required parameter 'playlist_id' when calling RumReplayPlaylistsAPI.list_rum_replay_playlist_sessions" + end + # resource path + local_var_path = '/api/v2/rum/replay/playlists/{playlist_id}/sessions'.sub('{playlist_id}', CGI.escape(playlist_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? + query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'PlaylistsSessionArray' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_rum_replay_playlist_sessions, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumReplayPlaylistsAPI#list_rum_replay_playlist_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Remove rum replay session from playlist. + # + # @see #remove_rum_replay_session_from_playlist_with_http_info + def remove_rum_replay_session_from_playlist(playlist_id, session_id, opts = {}) + remove_rum_replay_session_from_playlist_with_http_info(playlist_id, session_id, opts) + nil + end + + # Remove rum replay session from playlist. + # + # Remove a session from a playlist. + # + # @param playlist_id [Integer] Unique identifier of the playlist. + # @param session_id [String] Unique identifier of the session. + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def remove_rum_replay_session_from_playlist_with_http_info(playlist_id, session_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumReplayPlaylistsAPI.remove_rum_replay_session_from_playlist ...' + end + # verify the required parameter 'playlist_id' is set + if @api_client.config.client_side_validation && playlist_id.nil? + fail ArgumentError, "Missing the required parameter 'playlist_id' when calling RumReplayPlaylistsAPI.remove_rum_replay_session_from_playlist" + end + # verify the required parameter 'session_id' is set + if @api_client.config.client_side_validation && session_id.nil? + fail ArgumentError, "Missing the required parameter 'session_id' when calling RumReplayPlaylistsAPI.remove_rum_replay_session_from_playlist" + end + # resource path + local_var_path = '/api/v2/rum/replay/playlists/{playlist_id}/sessions/{session_id}'.sub('{playlist_id}', CGI.escape(playlist_id.to_s).gsub('%2F', '/')).sub('{session_id}', CGI.escape(session_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :remove_rum_replay_session_from_playlist, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumReplayPlaylistsAPI#remove_rum_replay_session_from_playlist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update rum replay playlist. + # + # @see #update_rum_replay_playlist_with_http_info + def update_rum_replay_playlist(playlist_id, body, opts = {}) + data, _status_code, _headers = update_rum_replay_playlist_with_http_info(playlist_id, body, opts) + data + end + + # Update rum replay playlist. + # + # Update a playlist. + # + # @param playlist_id [Integer] Unique identifier of the playlist. + # @param body [Playlist] + # @param opts [Hash] the optional parameters + # @return [Array<(Playlist, Integer, Hash)>] Playlist data, response status code and response headers + def update_rum_replay_playlist_with_http_info(playlist_id, body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumReplayPlaylistsAPI.update_rum_replay_playlist ...' + end + # verify the required parameter 'playlist_id' is set + if @api_client.config.client_side_validation && playlist_id.nil? + fail ArgumentError, "Missing the required parameter 'playlist_id' when calling RumReplayPlaylistsAPI.update_rum_replay_playlist" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling RumReplayPlaylistsAPI.update_rum_replay_playlist" + end + # resource path + local_var_path = '/api/v2/rum/replay/playlists/{playlist_id}'.sub('{playlist_id}', CGI.escape(playlist_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'Playlist' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :update_rum_replay_playlist, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumReplayPlaylistsAPI#update_rum_replay_playlist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/datadog_api_client/v2/api/rum_replay_sessions_api.rb b/lib/datadog_api_client/v2/api/rum_replay_sessions_api.rb new file mode 100644 index 000000000000..665a18c34987 --- /dev/null +++ b/lib/datadog_api_client/v2/api/rum_replay_sessions_api.rb @@ -0,0 +1,104 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'cgi' + +module DatadogAPIClient::V2 + class RumReplaySessionsAPI + attr_accessor :api_client + + def initialize(api_client = DatadogAPIClient::APIClient.default) + @api_client = api_client + end + + # Get segments. + # + # @see #get_segments_with_http_info + def get_segments(view_id, session_id, opts = {}) + get_segments_with_http_info(view_id, session_id, opts) + nil + end + + # Get segments. + # + # Get segments for a view. + # + # @param view_id [String] Unique identifier of the view. + # @param session_id [String] Unique identifier of the session. + # @param opts [Hash] the optional parameters + # @option opts [String] :source Storage source: 'event_platform' or 'blob'. + # @option opts [Integer] :ts Server-side timestamp in milliseconds. + # @option opts [Integer] :max_list_size Maximum size in bytes for the segment list. + # @option opts [String] :paging Paging token for pagination. + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def get_segments_with_http_info(view_id, session_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumReplaySessionsAPI.get_segments ...' + end + # verify the required parameter 'view_id' is set + if @api_client.config.client_side_validation && view_id.nil? + fail ArgumentError, "Missing the required parameter 'view_id' when calling RumReplaySessionsAPI.get_segments" + end + # verify the required parameter 'session_id' is set + if @api_client.config.client_side_validation && session_id.nil? + fail ArgumentError, "Missing the required parameter 'session_id' when calling RumReplaySessionsAPI.get_segments" + end + # resource path + local_var_path = '/api/v2/rum/replay/sessions/{session_id}/views/{view_id}/segments'.sub('{view_id}', CGI.escape(view_id.to_s).gsub('%2F', '/')).sub('{session_id}', CGI.escape(session_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil? + query_params[:'ts'] = opts[:'ts'] if !opts[:'ts'].nil? + query_params[:'max_list_size'] = opts[:'max_list_size'] if !opts[:'max_list_size'].nil? + query_params[:'paging'] = opts[:'paging'] if !opts[:'paging'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_segments, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumReplaySessionsAPI#get_segments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/datadog_api_client/v2/api/rum_replay_viewership_api.rb b/lib/datadog_api_client/v2/api/rum_replay_viewership_api.rb new file mode 100644 index 000000000000..67486bf2315e --- /dev/null +++ b/lib/datadog_api_client/v2/api/rum_replay_viewership_api.rb @@ -0,0 +1,306 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'cgi' + +module DatadogAPIClient::V2 + class RumReplayViewershipAPI + attr_accessor :api_client + + def initialize(api_client = DatadogAPIClient::APIClient.default) + @api_client = api_client + end + + # Create rum replay session watch. + # + # @see #create_rum_replay_session_watch_with_http_info + def create_rum_replay_session_watch(session_id, body, opts = {}) + data, _status_code, _headers = create_rum_replay_session_watch_with_http_info(session_id, body, opts) + data + end + + # Create rum replay session watch. + # + # Record a session watch. + # + # @param session_id [String] Unique identifier of the session. + # @param body [Watch] + # @param opts [Hash] the optional parameters + # @return [Array<(Watch, Integer, Hash)>] Watch data, response status code and response headers + def create_rum_replay_session_watch_with_http_info(session_id, body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumReplayViewershipAPI.create_rum_replay_session_watch ...' + end + # verify the required parameter 'session_id' is set + if @api_client.config.client_side_validation && session_id.nil? + fail ArgumentError, "Missing the required parameter 'session_id' when calling RumReplayViewershipAPI.create_rum_replay_session_watch" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling RumReplayViewershipAPI.create_rum_replay_session_watch" + end + # resource path + local_var_path = '/api/v2/rum/replay/sessions/{session_id}/watches'.sub('{session_id}', CGI.escape(session_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'Watch' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :create_rum_replay_session_watch, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumReplayViewershipAPI#create_rum_replay_session_watch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete rum replay session watch. + # + # @see #delete_rum_replay_session_watch_with_http_info + def delete_rum_replay_session_watch(session_id, opts = {}) + delete_rum_replay_session_watch_with_http_info(session_id, opts) + nil + end + + # Delete rum replay session watch. + # + # Delete session watch history. + # + # @param session_id [String] Unique identifier of the session. + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_rum_replay_session_watch_with_http_info(session_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumReplayViewershipAPI.delete_rum_replay_session_watch ...' + end + # verify the required parameter 'session_id' is set + if @api_client.config.client_side_validation && session_id.nil? + fail ArgumentError, "Missing the required parameter 'session_id' when calling RumReplayViewershipAPI.delete_rum_replay_session_watch" + end + # resource path + local_var_path = '/api/v2/rum/replay/sessions/{session_id}/watches'.sub('{session_id}', CGI.escape(session_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :delete_rum_replay_session_watch, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumReplayViewershipAPI#delete_rum_replay_session_watch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List rum replay session watchers. + # + # @see #list_rum_replay_session_watchers_with_http_info + def list_rum_replay_session_watchers(session_id, opts = {}) + data, _status_code, _headers = list_rum_replay_session_watchers_with_http_info(session_id, opts) + data + end + + # List rum replay session watchers. + # + # List session watchers. + # + # @param session_id [String] Unique identifier of the session. + # @param opts [Hash] the optional parameters + # @option opts [Integer] :page_size Number of items per page. + # @option opts [Integer] :page_number Page number for pagination (0-indexed). + # @return [Array<(WatcherArray, Integer, Hash)>] WatcherArray data, response status code and response headers + def list_rum_replay_session_watchers_with_http_info(session_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumReplayViewershipAPI.list_rum_replay_session_watchers ...' + end + # verify the required parameter 'session_id' is set + if @api_client.config.client_side_validation && session_id.nil? + fail ArgumentError, "Missing the required parameter 'session_id' when calling RumReplayViewershipAPI.list_rum_replay_session_watchers" + end + # resource path + local_var_path = '/api/v2/rum/replay/sessions/{session_id}/watchers'.sub('{session_id}', CGI.escape(session_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? + query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'WatcherArray' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_rum_replay_session_watchers, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumReplayViewershipAPI#list_rum_replay_session_watchers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List rum replay viewership history sessions. + # + # @see #list_rum_replay_viewership_history_sessions_with_http_info + def list_rum_replay_viewership_history_sessions(opts = {}) + data, _status_code, _headers = list_rum_replay_viewership_history_sessions_with_http_info(opts) + data + end + + # List rum replay viewership history sessions. + # + # List watched sessions. + # + # @param opts [Hash] the optional parameters + # @option opts [Integer] :filter_watched_at_start Start timestamp in milliseconds for watched_at filter. + # @option opts [Integer] :page_number Page number for pagination (0-indexed). + # @option opts [String] :filter_created_by Filter by user UUID. Defaults to current user if not specified. + # @option opts [Integer] :filter_watched_at_end End timestamp in milliseconds for watched_at filter. + # @option opts [String] :filter_session_ids Comma-separated list of session IDs to filter by. + # @option opts [Integer] :page_size Number of items per page. + # @option opts [String] :filter_application_id Filter by application ID. + # @return [Array<(ViewershipHistorySessionArray, Integer, Hash)>] ViewershipHistorySessionArray data, response status code and response headers + def list_rum_replay_viewership_history_sessions_with_http_info(opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumReplayViewershipAPI.list_rum_replay_viewership_history_sessions ...' + end + # resource path + local_var_path = '/api/v2/rum/replay/viewership-history/sessions' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'filter[watched_at][start]'] = opts[:'filter_watched_at_start'] if !opts[:'filter_watched_at_start'].nil? + query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? + query_params[:'filter[created_by]'] = opts[:'filter_created_by'] if !opts[:'filter_created_by'].nil? + query_params[:'filter[watched_at][end]'] = opts[:'filter_watched_at_end'] if !opts[:'filter_watched_at_end'].nil? + query_params[:'filter[session_ids]'] = opts[:'filter_session_ids'] if !opts[:'filter_session_ids'].nil? + query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? + query_params[:'filter[application_id]'] = opts[:'filter_application_id'] if !opts[:'filter_application_id'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ViewershipHistorySessionArray' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_rum_replay_viewership_history_sessions, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumReplayViewershipAPI#list_rum_replay_viewership_history_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/datadog_api_client/v2/models/playlist.rb b/lib/datadog_api_client/v2/models/playlist.rb new file mode 100644 index 000000000000..25b779b3f420 --- /dev/null +++ b/lib/datadog_api_client/v2/models/playlist.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class Playlist + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'PlaylistData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::Playlist` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/playlist_array.rb b/lib/datadog_api_client/v2/models/playlist_array.rb new file mode 100644 index 000000000000..67e42173614e --- /dev/null +++ b/lib/datadog_api_client/v2/models/playlist_array.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class PlaylistArray + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PlaylistArray` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/playlist_data.rb b/lib/datadog_api_client/v2/models/playlist_data.rb new file mode 100644 index 000000000000..08df0efaafdd --- /dev/null +++ b/lib/datadog_api_client/v2/models/playlist_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class PlaylistData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # Rum replay playlist resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'PlaylistDataAttributes', + :'id' => :'String', + :'type' => :'PlaylistDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PlaylistData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/playlist_data_attributes.rb b/lib/datadog_api_client/v2/models/playlist_data_attributes.rb new file mode 100644 index 000000000000..d8d8d84341bb --- /dev/null +++ b/lib/datadog_api_client/v2/models/playlist_data_attributes.rb @@ -0,0 +1,173 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class PlaylistDataAttributes + include BaseGenericModel + + # + attr_accessor :created_at + + # + attr_accessor :created_by + + # + attr_accessor :description + + # + attr_reader :name + + # + attr_accessor :session_count + + # + attr_accessor :updated_at + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created_at' => :'created_at', + :'created_by' => :'created_by', + :'description' => :'description', + :'name' => :'name', + :'session_count' => :'session_count', + :'updated_at' => :'updated_at' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created_at' => :'Time', + :'created_by' => :'PlaylistDataAttributesCreatedBy', + :'description' => :'String', + :'name' => :'String', + :'session_count' => :'Integer', + :'updated_at' => :'Time' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PlaylistDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'created_by') + self.created_by = attributes[:'created_by'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'session_count') + self.session_count = attributes[:'session_count'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @name.nil? + true + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + created_at == o.created_at && + created_by == o.created_by && + description == o.description && + name == o.name && + session_count == o.session_count && + updated_at == o.updated_at && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [created_at, created_by, description, name, session_count, updated_at, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/playlist_data_attributes_created_by.rb b/lib/datadog_api_client/v2/models/playlist_data_attributes_created_by.rb new file mode 100644 index 000000000000..c24ba770393f --- /dev/null +++ b/lib/datadog_api_client/v2/models/playlist_data_attributes_created_by.rb @@ -0,0 +1,185 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class PlaylistDataAttributesCreatedBy + include BaseGenericModel + + # + attr_reader :handle + + # + attr_accessor :icon + + # + attr_reader :id + + # + attr_accessor :name + + # + attr_reader :uuid + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'handle' => :'handle', + :'icon' => :'icon', + :'id' => :'id', + :'name' => :'name', + :'uuid' => :'uuid' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'handle' => :'String', + :'icon' => :'String', + :'id' => :'String', + :'name' => :'String', + :'uuid' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PlaylistDataAttributesCreatedBy` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'handle') + self.handle = attributes[:'handle'] + end + + if attributes.key?(:'icon') + self.icon = attributes[:'icon'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'uuid') + self.uuid = attributes[:'uuid'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @handle.nil? + return false if @id.nil? + return false if @uuid.nil? + true + end + + # Custom attribute writer method with validation + # @param handle [Object] Object to be assigned + # @!visibility private + def handle=(handle) + if handle.nil? + fail ArgumentError, 'invalid value for "handle", handle cannot be nil.' + end + @handle = handle + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param uuid [Object] Object to be assigned + # @!visibility private + def uuid=(uuid) + if uuid.nil? + fail ArgumentError, 'invalid value for "uuid", uuid cannot be nil.' + end + @uuid = uuid + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + handle == o.handle && + icon == o.icon && + id == o.id && + name == o.name && + uuid == o.uuid && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [handle, icon, id, name, uuid, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/playlist_data_type.rb b/lib/datadog_api_client/v2/models/playlist_data_type.rb new file mode 100644 index 000000000000..dfa82c9a4acc --- /dev/null +++ b/lib/datadog_api_client/v2/models/playlist_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Rum replay playlist resource type. + class PlaylistDataType + include BaseEnumModel + + RUM_REPLAY_PLAYLIST = "rum_replay_playlist".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/playlists_session.rb b/lib/datadog_api_client/v2/models/playlists_session.rb new file mode 100644 index 000000000000..b65aa6924cea --- /dev/null +++ b/lib/datadog_api_client/v2/models/playlists_session.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class PlaylistsSession + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'PlaylistsSessionData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PlaylistsSession` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/playlists_session_array.rb b/lib/datadog_api_client/v2/models/playlists_session_array.rb new file mode 100644 index 000000000000..13045b334a66 --- /dev/null +++ b/lib/datadog_api_client/v2/models/playlists_session_array.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class PlaylistsSessionArray + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PlaylistsSessionArray` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/playlists_session_data.rb b/lib/datadog_api_client/v2/models/playlists_session_data.rb new file mode 100644 index 000000000000..bca8c7ecf462 --- /dev/null +++ b/lib/datadog_api_client/v2/models/playlists_session_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class PlaylistsSessionData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # Rum replay session resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'PlaylistsSessionDataAttributes', + :'id' => :'String', + :'type' => :'ViewershipHistorySessionDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PlaylistsSessionData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/playlists_session_data_attributes.rb b/lib/datadog_api_client/v2/models/playlists_session_data_attributes.rb new file mode 100644 index 000000000000..8abd7f69dce8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/playlists_session_data_attributes.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class PlaylistsSessionDataAttributes + include BaseGenericModel + + # + attr_accessor :session_event + + # + attr_accessor :track + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'session_event' => :'session_event', + :'track' => :'track' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'session_event' => :'Hash', + :'track' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PlaylistsSessionDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'session_event') + self.session_event = attributes[:'session_event'] + end + + if attributes.key?(:'track') + self.track = attributes[:'track'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + session_event == o.session_event && + track == o.track && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [session_event, track, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/session_id_array.rb b/lib/datadog_api_client/v2/models/session_id_array.rb new file mode 100644 index 000000000000..da99831894b2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/session_id_array.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class SessionIdArray + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SessionIdArray` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/session_id_data.rb b/lib/datadog_api_client/v2/models/session_id_data.rb new file mode 100644 index 000000000000..6e26dbc1b86d --- /dev/null +++ b/lib/datadog_api_client/v2/models/session_id_data.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class SessionIdData + include BaseGenericModel + + # + attr_accessor :id + + # Rum replay session resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'ViewershipHistorySessionDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SessionIdData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/snapshot.rb b/lib/datadog_api_client/v2/models/snapshot.rb new file mode 100644 index 000000000000..da8f9715c147 --- /dev/null +++ b/lib/datadog_api_client/v2/models/snapshot.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class Snapshot + include BaseGenericModel + + # + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'SnapshotData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::Snapshot` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/snapshot_array.rb b/lib/datadog_api_client/v2/models/snapshot_array.rb new file mode 100644 index 000000000000..777cdd06931d --- /dev/null +++ b/lib/datadog_api_client/v2/models/snapshot_array.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class SnapshotArray + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SnapshotArray` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/snapshot_create_request.rb b/lib/datadog_api_client/v2/models/snapshot_create_request.rb new file mode 100644 index 000000000000..9de743a73116 --- /dev/null +++ b/lib/datadog_api_client/v2/models/snapshot_create_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class SnapshotCreateRequest + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'SnapshotCreateRequestData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SnapshotCreateRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/snapshot_create_request_data.rb b/lib/datadog_api_client/v2/models/snapshot_create_request_data.rb new file mode 100644 index 000000000000..a080d5c3faba --- /dev/null +++ b/lib/datadog_api_client/v2/models/snapshot_create_request_data.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class SnapshotCreateRequestData + include BaseGenericModel + + # + attr_accessor :attributes + + # Snapshots resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'SnapshotCreateRequestDataAttributes', + :'type' => :'SnapshotUpdateRequestDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SnapshotCreateRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/snapshot_create_request_data_attributes.rb b/lib/datadog_api_client/v2/models/snapshot_create_request_data_attributes.rb new file mode 100644 index 000000000000..31877c0d33e9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/snapshot_create_request_data_attributes.rb @@ -0,0 +1,269 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class SnapshotCreateRequestDataAttributes + include BaseGenericModel + + # + attr_reader :application_id + + # + attr_reader :device_type + + # + attr_reader :event_id + + # + attr_reader :is_device_type_selected_by_user + + # + attr_accessor :session_id + + # + attr_reader :snapshot_name + + # + attr_reader :start + + # + attr_accessor :view_id + + # + attr_reader :view_name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'application_id' => :'application_id', + :'device_type' => :'device_type', + :'event_id' => :'event_id', + :'is_device_type_selected_by_user' => :'is_device_type_selected_by_user', + :'session_id' => :'session_id', + :'snapshot_name' => :'snapshot_name', + :'start' => :'start', + :'view_id' => :'view_id', + :'view_name' => :'view_name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'application_id' => :'String', + :'device_type' => :'String', + :'event_id' => :'String', + :'is_device_type_selected_by_user' => :'Boolean', + :'session_id' => :'String', + :'snapshot_name' => :'String', + :'start' => :'Integer', + :'view_id' => :'String', + :'view_name' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SnapshotCreateRequestDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'application_id') + self.application_id = attributes[:'application_id'] + end + + if attributes.key?(:'device_type') + self.device_type = attributes[:'device_type'] + end + + if attributes.key?(:'event_id') + self.event_id = attributes[:'event_id'] + end + + if attributes.key?(:'is_device_type_selected_by_user') + self.is_device_type_selected_by_user = attributes[:'is_device_type_selected_by_user'] + end + + if attributes.key?(:'session_id') + self.session_id = attributes[:'session_id'] + end + + if attributes.key?(:'snapshot_name') + self.snapshot_name = attributes[:'snapshot_name'] + end + + if attributes.key?(:'start') + self.start = attributes[:'start'] + end + + if attributes.key?(:'view_id') + self.view_id = attributes[:'view_id'] + end + + if attributes.key?(:'view_name') + self.view_name = attributes[:'view_name'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @application_id.nil? + return false if @device_type.nil? + return false if @event_id.nil? + return false if @is_device_type_selected_by_user.nil? + return false if @snapshot_name.nil? + return false if @start.nil? + return false if @view_name.nil? + true + end + + # Custom attribute writer method with validation + # @param application_id [Object] Object to be assigned + # @!visibility private + def application_id=(application_id) + if application_id.nil? + fail ArgumentError, 'invalid value for "application_id", application_id cannot be nil.' + end + @application_id = application_id + end + + # Custom attribute writer method with validation + # @param device_type [Object] Object to be assigned + # @!visibility private + def device_type=(device_type) + if device_type.nil? + fail ArgumentError, 'invalid value for "device_type", device_type cannot be nil.' + end + @device_type = device_type + end + + # Custom attribute writer method with validation + # @param event_id [Object] Object to be assigned + # @!visibility private + def event_id=(event_id) + if event_id.nil? + fail ArgumentError, 'invalid value for "event_id", event_id cannot be nil.' + end + @event_id = event_id + end + + # Custom attribute writer method with validation + # @param is_device_type_selected_by_user [Object] Object to be assigned + # @!visibility private + def is_device_type_selected_by_user=(is_device_type_selected_by_user) + if is_device_type_selected_by_user.nil? + fail ArgumentError, 'invalid value for "is_device_type_selected_by_user", is_device_type_selected_by_user cannot be nil.' + end + @is_device_type_selected_by_user = is_device_type_selected_by_user + end + + # Custom attribute writer method with validation + # @param snapshot_name [Object] Object to be assigned + # @!visibility private + def snapshot_name=(snapshot_name) + if snapshot_name.nil? + fail ArgumentError, 'invalid value for "snapshot_name", snapshot_name cannot be nil.' + end + @snapshot_name = snapshot_name + end + + # Custom attribute writer method with validation + # @param start [Object] Object to be assigned + # @!visibility private + def start=(start) + if start.nil? + fail ArgumentError, 'invalid value for "start", start cannot be nil.' + end + @start = start + end + + # Custom attribute writer method with validation + # @param view_name [Object] Object to be assigned + # @!visibility private + def view_name=(view_name) + if view_name.nil? + fail ArgumentError, 'invalid value for "view_name", view_name cannot be nil.' + end + @view_name = view_name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + application_id == o.application_id && + device_type == o.device_type && + event_id == o.event_id && + is_device_type_selected_by_user == o.is_device_type_selected_by_user && + session_id == o.session_id && + snapshot_name == o.snapshot_name && + start == o.start && + view_id == o.view_id && + view_name == o.view_name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [application_id, device_type, event_id, is_device_type_selected_by_user, session_id, snapshot_name, start, view_id, view_name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/snapshot_data.rb b/lib/datadog_api_client/v2/models/snapshot_data.rb new file mode 100644 index 000000000000..31012f5f8241 --- /dev/null +++ b/lib/datadog_api_client/v2/models/snapshot_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class SnapshotData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # Snapshots resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'SnapshotDataAttributes', + :'id' => :'String', + :'type' => :'SnapshotUpdateRequestDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SnapshotData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/snapshot_data_attributes.rb b/lib/datadog_api_client/v2/models/snapshot_data_attributes.rb new file mode 100644 index 000000000000..72fe3dae0217 --- /dev/null +++ b/lib/datadog_api_client/v2/models/snapshot_data_attributes.rb @@ -0,0 +1,245 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class SnapshotDataAttributes + include BaseGenericModel + + # + attr_accessor :application_id + + # + attr_accessor :created_at + + # + attr_accessor :created_by + + # + attr_accessor :created_by_handle + + # + attr_accessor :created_by_user_id + + # + attr_accessor :device_type + + # + attr_accessor :event_id + + # + attr_accessor :is_device_type_selected_by_user + + # + attr_accessor :modified_at + + # + attr_accessor :org_id + + # + attr_accessor :session_id + + # + attr_accessor :snapshot_name + + # + attr_accessor :start + + # + attr_accessor :view_id + + # + attr_accessor :view_name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'application_id' => :'application_id', + :'created_at' => :'created_at', + :'created_by' => :'created_by', + :'created_by_handle' => :'created_by_handle', + :'created_by_user_id' => :'created_by_user_id', + :'device_type' => :'device_type', + :'event_id' => :'event_id', + :'is_device_type_selected_by_user' => :'is_device_type_selected_by_user', + :'modified_at' => :'modified_at', + :'org_id' => :'org_id', + :'session_id' => :'session_id', + :'snapshot_name' => :'snapshot_name', + :'start' => :'start', + :'view_id' => :'view_id', + :'view_name' => :'view_name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'application_id' => :'String', + :'created_at' => :'Time', + :'created_by' => :'String', + :'created_by_handle' => :'String', + :'created_by_user_id' => :'Integer', + :'device_type' => :'String', + :'event_id' => :'String', + :'is_device_type_selected_by_user' => :'Boolean', + :'modified_at' => :'Time', + :'org_id' => :'Integer', + :'session_id' => :'String', + :'snapshot_name' => :'String', + :'start' => :'Integer', + :'view_id' => :'String', + :'view_name' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SnapshotDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'application_id') + self.application_id = attributes[:'application_id'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'created_by') + self.created_by = attributes[:'created_by'] + end + + if attributes.key?(:'created_by_handle') + self.created_by_handle = attributes[:'created_by_handle'] + end + + if attributes.key?(:'created_by_user_id') + self.created_by_user_id = attributes[:'created_by_user_id'] + end + + if attributes.key?(:'device_type') + self.device_type = attributes[:'device_type'] + end + + if attributes.key?(:'event_id') + self.event_id = attributes[:'event_id'] + end + + if attributes.key?(:'is_device_type_selected_by_user') + self.is_device_type_selected_by_user = attributes[:'is_device_type_selected_by_user'] + end + + if attributes.key?(:'modified_at') + self.modified_at = attributes[:'modified_at'] + end + + if attributes.key?(:'org_id') + self.org_id = attributes[:'org_id'] + end + + if attributes.key?(:'session_id') + self.session_id = attributes[:'session_id'] + end + + if attributes.key?(:'snapshot_name') + self.snapshot_name = attributes[:'snapshot_name'] + end + + if attributes.key?(:'start') + self.start = attributes[:'start'] + end + + if attributes.key?(:'view_id') + self.view_id = attributes[:'view_id'] + end + + if attributes.key?(:'view_name') + self.view_name = attributes[:'view_name'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + application_id == o.application_id && + created_at == o.created_at && + created_by == o.created_by && + created_by_handle == o.created_by_handle && + created_by_user_id == o.created_by_user_id && + device_type == o.device_type && + event_id == o.event_id && + is_device_type_selected_by_user == o.is_device_type_selected_by_user && + modified_at == o.modified_at && + org_id == o.org_id && + session_id == o.session_id && + snapshot_name == o.snapshot_name && + start == o.start && + view_id == o.view_id && + view_name == o.view_name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [application_id, created_at, created_by, created_by_handle, created_by_user_id, device_type, event_id, is_device_type_selected_by_user, modified_at, org_id, session_id, snapshot_name, start, view_id, view_name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/snapshot_update_request.rb b/lib/datadog_api_client/v2/models/snapshot_update_request.rb new file mode 100644 index 000000000000..7744aa285b9d --- /dev/null +++ b/lib/datadog_api_client/v2/models/snapshot_update_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class SnapshotUpdateRequest + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'SnapshotUpdateRequestData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SnapshotUpdateRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/snapshot_update_request_data.rb b/lib/datadog_api_client/v2/models/snapshot_update_request_data.rb new file mode 100644 index 000000000000..6d4b2cefe1ad --- /dev/null +++ b/lib/datadog_api_client/v2/models/snapshot_update_request_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class SnapshotUpdateRequestData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # Snapshots resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'SnapshotUpdateRequestDataAttributes', + :'id' => :'String', + :'type' => :'SnapshotUpdateRequestDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SnapshotUpdateRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/snapshot_update_request_data_attributes.rb b/lib/datadog_api_client/v2/models/snapshot_update_request_data_attributes.rb new file mode 100644 index 000000000000..427bf32afa01 --- /dev/null +++ b/lib/datadog_api_client/v2/models/snapshot_update_request_data_attributes.rb @@ -0,0 +1,185 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class SnapshotUpdateRequestDataAttributes + include BaseGenericModel + + # + attr_reader :event_id + + # + attr_reader :is_device_type_selected_by_user + + # + attr_accessor :session_id + + # + attr_reader :start + + # + attr_accessor :view_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'event_id' => :'event_id', + :'is_device_type_selected_by_user' => :'is_device_type_selected_by_user', + :'session_id' => :'session_id', + :'start' => :'start', + :'view_id' => :'view_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'event_id' => :'String', + :'is_device_type_selected_by_user' => :'Boolean', + :'session_id' => :'String', + :'start' => :'Integer', + :'view_id' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SnapshotUpdateRequestDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'event_id') + self.event_id = attributes[:'event_id'] + end + + if attributes.key?(:'is_device_type_selected_by_user') + self.is_device_type_selected_by_user = attributes[:'is_device_type_selected_by_user'] + end + + if attributes.key?(:'session_id') + self.session_id = attributes[:'session_id'] + end + + if attributes.key?(:'start') + self.start = attributes[:'start'] + end + + if attributes.key?(:'view_id') + self.view_id = attributes[:'view_id'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @event_id.nil? + return false if @is_device_type_selected_by_user.nil? + return false if @start.nil? + true + end + + # Custom attribute writer method with validation + # @param event_id [Object] Object to be assigned + # @!visibility private + def event_id=(event_id) + if event_id.nil? + fail ArgumentError, 'invalid value for "event_id", event_id cannot be nil.' + end + @event_id = event_id + end + + # Custom attribute writer method with validation + # @param is_device_type_selected_by_user [Object] Object to be assigned + # @!visibility private + def is_device_type_selected_by_user=(is_device_type_selected_by_user) + if is_device_type_selected_by_user.nil? + fail ArgumentError, 'invalid value for "is_device_type_selected_by_user", is_device_type_selected_by_user cannot be nil.' + end + @is_device_type_selected_by_user = is_device_type_selected_by_user + end + + # Custom attribute writer method with validation + # @param start [Object] Object to be assigned + # @!visibility private + def start=(start) + if start.nil? + fail ArgumentError, 'invalid value for "start", start cannot be nil.' + end + @start = start + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + event_id == o.event_id && + is_device_type_selected_by_user == o.is_device_type_selected_by_user && + session_id == o.session_id && + start == o.start && + view_id == o.view_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [event_id, is_device_type_selected_by_user, session_id, start, view_id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/snapshot_update_request_data_type.rb b/lib/datadog_api_client/v2/models/snapshot_update_request_data_type.rb new file mode 100644 index 000000000000..ed78b5d4dded --- /dev/null +++ b/lib/datadog_api_client/v2/models/snapshot_update_request_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Snapshots resource type. + class SnapshotUpdateRequestDataType + include BaseEnumModel + + SNAPSHOTS = "snapshots".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/viewership_history_session_array.rb b/lib/datadog_api_client/v2/models/viewership_history_session_array.rb new file mode 100644 index 000000000000..27cbb3992480 --- /dev/null +++ b/lib/datadog_api_client/v2/models/viewership_history_session_array.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class ViewershipHistorySessionArray + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ViewershipHistorySessionArray` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/viewership_history_session_data.rb b/lib/datadog_api_client/v2/models/viewership_history_session_data.rb new file mode 100644 index 000000000000..8b7170da6062 --- /dev/null +++ b/lib/datadog_api_client/v2/models/viewership_history_session_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class ViewershipHistorySessionData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # Rum replay session resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'ViewershipHistorySessionDataAttributes', + :'id' => :'String', + :'type' => :'ViewershipHistorySessionDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ViewershipHistorySessionData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/viewership_history_session_data_attributes.rb b/lib/datadog_api_client/v2/models/viewership_history_session_data_attributes.rb new file mode 100644 index 000000000000..fb2069a5815c --- /dev/null +++ b/lib/datadog_api_client/v2/models/viewership_history_session_data_attributes.rb @@ -0,0 +1,153 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class ViewershipHistorySessionDataAttributes + include BaseGenericModel + + # + attr_accessor :event_id + + # + attr_reader :last_watched_at + + # + attr_accessor :session_event + + # + attr_accessor :track + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'event_id' => :'event_id', + :'last_watched_at' => :'last_watched_at', + :'session_event' => :'session_event', + :'track' => :'track' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'event_id' => :'String', + :'last_watched_at' => :'Time', + :'session_event' => :'Hash', + :'track' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ViewershipHistorySessionDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'event_id') + self.event_id = attributes[:'event_id'] + end + + if attributes.key?(:'last_watched_at') + self.last_watched_at = attributes[:'last_watched_at'] + end + + if attributes.key?(:'session_event') + self.session_event = attributes[:'session_event'] + end + + if attributes.key?(:'track') + self.track = attributes[:'track'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @last_watched_at.nil? + true + end + + # Custom attribute writer method with validation + # @param last_watched_at [Object] Object to be assigned + # @!visibility private + def last_watched_at=(last_watched_at) + if last_watched_at.nil? + fail ArgumentError, 'invalid value for "last_watched_at", last_watched_at cannot be nil.' + end + @last_watched_at = last_watched_at + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + event_id == o.event_id && + last_watched_at == o.last_watched_at && + session_event == o.session_event && + track == o.track && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [event_id, last_watched_at, session_event, track, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/viewership_history_session_data_type.rb b/lib/datadog_api_client/v2/models/viewership_history_session_data_type.rb new file mode 100644 index 000000000000..a3f8ec879a0d --- /dev/null +++ b/lib/datadog_api_client/v2/models/viewership_history_session_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Rum replay session resource type. + class ViewershipHistorySessionDataType + include BaseEnumModel + + RUM_REPLAY_SESSION = "rum_replay_session".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/watch.rb b/lib/datadog_api_client/v2/models/watch.rb new file mode 100644 index 000000000000..304dd159672b --- /dev/null +++ b/lib/datadog_api_client/v2/models/watch.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class Watch + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'WatchData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::Watch` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/watch_data.rb b/lib/datadog_api_client/v2/models/watch_data.rb new file mode 100644 index 000000000000..e1c4f04cb86d --- /dev/null +++ b/lib/datadog_api_client/v2/models/watch_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class WatchData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # Rum replay watch resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'WatchDataAttributes', + :'id' => :'String', + :'type' => :'WatchDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WatchData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/watch_data_attributes.rb b/lib/datadog_api_client/v2/models/watch_data_attributes.rb new file mode 100644 index 000000000000..02191c801ae5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/watch_data_attributes.rb @@ -0,0 +1,175 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class WatchDataAttributes + include BaseGenericModel + + # + attr_reader :application_id + + # + attr_accessor :data_source + + # + attr_reader :event_id + + # + attr_reader :timestamp + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'application_id' => :'application_id', + :'data_source' => :'data_source', + :'event_id' => :'event_id', + :'timestamp' => :'timestamp' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'application_id' => :'String', + :'data_source' => :'String', + :'event_id' => :'String', + :'timestamp' => :'Time' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WatchDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'application_id') + self.application_id = attributes[:'application_id'] + end + + if attributes.key?(:'data_source') + self.data_source = attributes[:'data_source'] + end + + if attributes.key?(:'event_id') + self.event_id = attributes[:'event_id'] + end + + if attributes.key?(:'timestamp') + self.timestamp = attributes[:'timestamp'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @application_id.nil? + return false if @event_id.nil? + return false if @timestamp.nil? + true + end + + # Custom attribute writer method with validation + # @param application_id [Object] Object to be assigned + # @!visibility private + def application_id=(application_id) + if application_id.nil? + fail ArgumentError, 'invalid value for "application_id", application_id cannot be nil.' + end + @application_id = application_id + end + + # Custom attribute writer method with validation + # @param event_id [Object] Object to be assigned + # @!visibility private + def event_id=(event_id) + if event_id.nil? + fail ArgumentError, 'invalid value for "event_id", event_id cannot be nil.' + end + @event_id = event_id + end + + # Custom attribute writer method with validation + # @param timestamp [Object] Object to be assigned + # @!visibility private + def timestamp=(timestamp) + if timestamp.nil? + fail ArgumentError, 'invalid value for "timestamp", timestamp cannot be nil.' + end + @timestamp = timestamp + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + application_id == o.application_id && + data_source == o.data_source && + event_id == o.event_id && + timestamp == o.timestamp && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [application_id, data_source, event_id, timestamp, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/watch_data_type.rb b/lib/datadog_api_client/v2/models/watch_data_type.rb new file mode 100644 index 000000000000..aa28d59759a8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/watch_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Rum replay watch resource type. + class WatchDataType + include BaseEnumModel + + RUM_REPLAY_WATCH = "rum_replay_watch".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/watcher_array.rb b/lib/datadog_api_client/v2/models/watcher_array.rb new file mode 100644 index 000000000000..908fadd3a877 --- /dev/null +++ b/lib/datadog_api_client/v2/models/watcher_array.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class WatcherArray + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WatcherArray` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/watcher_data.rb b/lib/datadog_api_client/v2/models/watcher_data.rb new file mode 100644 index 000000000000..f8e71382f928 --- /dev/null +++ b/lib/datadog_api_client/v2/models/watcher_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class WatcherData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # Rum replay watcher resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'WatcherDataAttributes', + :'id' => :'String', + :'type' => :'WatcherDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WatcherData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/watcher_data_attributes.rb b/lib/datadog_api_client/v2/models/watcher_data_attributes.rb new file mode 100644 index 000000000000..3e20791931aa --- /dev/null +++ b/lib/datadog_api_client/v2/models/watcher_data_attributes.rb @@ -0,0 +1,189 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class WatcherDataAttributes + include BaseGenericModel + + # + attr_reader :handle + + # + attr_accessor :icon + + # + attr_reader :last_watched_at + + # + attr_accessor :name + + # + attr_reader :watch_count + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'handle' => :'handle', + :'icon' => :'icon', + :'last_watched_at' => :'last_watched_at', + :'name' => :'name', + :'watch_count' => :'watch_count' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'handle' => :'String', + :'icon' => :'String', + :'last_watched_at' => :'Time', + :'name' => :'String', + :'watch_count' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::WatcherDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'handle') + self.handle = attributes[:'handle'] + end + + if attributes.key?(:'icon') + self.icon = attributes[:'icon'] + end + + if attributes.key?(:'last_watched_at') + self.last_watched_at = attributes[:'last_watched_at'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'watch_count') + self.watch_count = attributes[:'watch_count'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @handle.nil? + return false if @last_watched_at.nil? + return false if @watch_count.nil? + return false if @watch_count > 2147483647 + true + end + + # Custom attribute writer method with validation + # @param handle [Object] Object to be assigned + # @!visibility private + def handle=(handle) + if handle.nil? + fail ArgumentError, 'invalid value for "handle", handle cannot be nil.' + end + @handle = handle + end + + # Custom attribute writer method with validation + # @param last_watched_at [Object] Object to be assigned + # @!visibility private + def last_watched_at=(last_watched_at) + if last_watched_at.nil? + fail ArgumentError, 'invalid value for "last_watched_at", last_watched_at cannot be nil.' + end + @last_watched_at = last_watched_at + end + + # Custom attribute writer method with validation + # @param watch_count [Object] Object to be assigned + # @!visibility private + def watch_count=(watch_count) + if watch_count.nil? + fail ArgumentError, 'invalid value for "watch_count", watch_count cannot be nil.' + end + if watch_count > 2147483647 + fail ArgumentError, 'invalid value for "watch_count", must be smaller than or equal to 2147483647.' + end + @watch_count = watch_count + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + handle == o.handle && + icon == o.icon && + last_watched_at == o.last_watched_at && + name == o.name && + watch_count == o.watch_count && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [handle, icon, last_watched_at, name, watch_count, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/watcher_data_type.rb b/lib/datadog_api_client/v2/models/watcher_data_type.rb new file mode 100644 index 000000000000..3975565aaea1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/watcher_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Rum replay watcher resource type. + class WatcherDataType + include BaseEnumModel + + RUM_REPLAY_WATCHER = "rum_replay_watcher".freeze + end +end