diff --git a/.generated-info b/.generated-info index ba2cf2b50773..2bd9fe63b481 100644 --- a/.generated-info +++ b/.generated-info @@ -1,4 +1,4 @@ { - "spec_repo_commit": "fde8b90", - "generated": "2025-08-18 20:32:27.495" + "spec_repo_commit": "4413e63", + "generated": "2025-08-19 20:28:34.170" } diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index cb4c1c4bb0fc..5dc52e4a2ee2 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -32160,6 +32160,8 @@ components: format: int32 maximum: 2147483647 type: integer + product_scales: + $ref: '#/components/schemas/RUMProductScales' type: description: Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, @@ -32204,6 +32206,10 @@ components: description: Name of the RUM application. example: my_new_rum_application type: string + product_analytics_retention_state: + $ref: '#/components/schemas/RUMProductAnalyticsRetentionState' + rum_event_processing_state: + $ref: '#/components/schemas/RUMEventProcessingState' type: description: Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, @@ -32278,6 +32284,8 @@ components: format: int32 maximum: 2147483647 type: integer + product_scales: + $ref: '#/components/schemas/RUMProductScales' type: description: Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, @@ -32349,6 +32357,10 @@ components: description: Name of the RUM application. example: updated_name_for_my_existing_rum_application type: string + product_analytics_retention_state: + $ref: '#/components/schemas/RUMProductAnalyticsRetentionState' + rum_event_processing_state: + $ref: '#/components/schemas/RUMEventProcessingState' type: description: Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, @@ -32477,6 +32489,33 @@ components: format: date-time type: string type: object + RUMEventProcessingScale: + description: RUM event processing scale configuration. + properties: + last_modified_at: + description: Timestamp in milliseconds when this scale was last modified. + example: 1721897494108 + format: int64 + type: integer + state: + $ref: '#/components/schemas/RUMEventProcessingState' + type: object + RUMEventProcessingState: + description: Configures which RUM events are processed and stored for the application. + enum: + - ALL + - ERROR_FOCUSED_MODE + - NONE + example: ALL + type: string + x-enum-descriptions: + - Process and store all RUM events (sessions, views, actions, resources, errors) + - Process and store only error events and related critical events + - "Disable RUM event processing\u2014no events are stored" + x-enum-varnames: + - ALL + - ERROR_FOCUSED_MODE + - NONE RUMEventType: default: rum description: Type of the event. @@ -32583,6 +32622,39 @@ components: RUMGroupByTotalString: description: A string to use as the key value for the total bucket. type: string + RUMProductAnalyticsRetentionScale: + description: Product Analytics retention scale configuration. + properties: + last_modified_at: + description: Timestamp in milliseconds when this scale was last modified. + example: 1747922145974 + format: int64 + type: integer + state: + $ref: '#/components/schemas/RUMProductAnalyticsRetentionState' + type: object + RUMProductAnalyticsRetentionState: + description: Controls the retention policy for Product Analytics data derived + from RUM events. + enum: + - MAX + - NONE + example: MAX + type: string + x-enum-descriptions: + - Store Product Analytics data for the maximum available retention period + - Do not store Product Analytics data + x-enum-varnames: + - MAX + - NONE + RUMProductScales: + description: Product Scales configuration for the RUM application. + properties: + product_analytics_retention_scale: + $ref: '#/components/schemas/RUMProductAnalyticsRetentionScale' + rum_event_processing_scale: + $ref: '#/components/schemas/RUMEventProcessingScale' + type: object RUMQueryFilter: description: The search and filter query settings. properties: diff --git a/cassettes/features/v2/rum/Create-a-new-RUM-application-returns-OK-response.frozen b/cassettes/features/v2/rum/Create-a-new-RUM-application-returns-OK-response.frozen index e20222962473..751be9590397 100644 --- a/cassettes/features/v2/rum/Create-a-new-RUM-application-returns-OK-response.frozen +++ b/cassettes/features/v2/rum/Create-a-new-RUM-application-returns-OK-response.frozen @@ -1 +1 @@ -2024-12-10T15:40:39.991Z \ No newline at end of file +2025-08-19T14:20:13.721Z \ No newline at end of file diff --git a/cassettes/features/v2/rum/Create-a-new-RUM-application-returns-OK-response.yml b/cassettes/features/v2/rum/Create-a-new-RUM-application-returns-OK-response.yml index 7f7d4e15cf25..e27abaa3c3d1 100644 --- a/cassettes/features/v2/rum/Create-a-new-RUM-application-returns-OK-response.yml +++ b/cassettes/features/v2/rum/Create-a-new-RUM-application-returns-OK-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Tue, 10 Dec 2024 15:40:39 GMT +- recorded_at: Tue, 19 Aug 2025 14:20:13 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"name":"test-rum-5be7aad200899ffd","type":"ios"},"type":"rum_application_create"}}' + string: '{"data":{"attributes":{"name":"test-rum-33452889744bdeee","type":"ios"},"type":"rum_application_create"}}' headers: Accept: - application/json @@ -14,7 +14,7 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"type":"rum_application","attributes":{"hash":"pub53e9a8788cac8b240efc0bfd17073059","type":"ios","name":"test-rum-5be7aad200899ffd","tags":[],"created_at":1733845240406,"updated_at":1733845240406,"created_by_handle":"frog@datadoghq.com","rum_enabled_at":1733845240406,"org_id":321813,"updated_by_handle":"frog@datadoghq.com","product_analytics_disabled_at":1733845240406,"rum_enabled":true,"application_id":"2ce2bdc3-efa2-4182-9bc1-b75b2ff09be4","product_analytics_enabled_at":1733845240406,"rum_disabled_at":0,"product_analytics_enabled":false,"is_active":false,"client_token":"pub53e9a8788cac8b240efc0bfd17073059"},"id":"2ce2bdc3-efa2-4182-9bc1-b75b2ff09be4"}} + string: '{"data":{"type":"rum_application","attributes":{"type":"ios","updated_at":1755613213992,"created_by_handle":"frog@datadoghq.com","name":"test-rum-33452889744bdeee","org_id":321813,"tags":[],"created_at":1755613213992,"product_analytics_replay_sample_rate":100,"product_scales":{"product_analytics_retention_scale":{"state":"NONE","last_modified_at":1755613213992},"rum_event_processing_scale":{"state":"ALL","last_modified_at":1755613213992}},"updated_by_handle":"frog@datadoghq.com","application_id":"ee0b4d74-7159-4498-bec7-2b4f2b5ba642","client_token":"pub994be67f562b7afec4436673d77927fe","hash":"pub994be67f562b7afec4436673d77927fe","is_active":false},"id":"ee0b4d74-7159-4498-bec7-2b4f2b5ba642"}} ' headers: @@ -23,14 +23,14 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Tue, 10 Dec 2024 15:40:39 GMT +- recorded_at: Tue, 19 Aug 2025 14:20:13 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/rum/applications/2ce2bdc3-efa2-4182-9bc1-b75b2ff09be4 + uri: https://api.datadoghq.com/api/v2/rum/applications/ee0b4d74-7159-4498-bec7-2b4f2b5ba642 response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/rum/Create-a-new-RUM-application-with-Product-Scales-returns-OK-response.frozen b/cassettes/features/v2/rum/Create-a-new-RUM-application-with-Product-Scales-returns-OK-response.frozen new file mode 100644 index 000000000000..40a71dd36fc5 --- /dev/null +++ b/cassettes/features/v2/rum/Create-a-new-RUM-application-with-Product-Scales-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-08-19T14:01:52.966Z \ No newline at end of file diff --git a/cassettes/features/v2/rum/Create-a-new-RUM-application-with-Product-Scales-returns-OK-response.yml b/cassettes/features/v2/rum/Create-a-new-RUM-application-with-Product-Scales-returns-OK-response.yml new file mode 100644 index 000000000000..fe24b0d7248e --- /dev/null +++ b/cassettes/features/v2/rum/Create-a-new-RUM-application-with-Product-Scales-returns-OK-response.yml @@ -0,0 +1,42 @@ +http_interactions: +- recorded_at: Tue, 19 Aug 2025 14:01:52 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"test-rum-with-product-scales-b91c7f54876a951d","product_analytics_retention_state":"NONE","rum_event_processing_state":"ERROR_FOCUSED_MODE","type":"browser"},"type":"rum_application_create"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/rum/applications + response: + body: + encoding: UTF-8 + string: '{"data":{"type":"rum_application","id":"51419fd9-a73f-4508-9f74-ad07d6669a47","attributes":{"hash":"pub6c464316cf5deccd2f56a23dbacd996e","type":"browser","org_id":321813,"updated_at":1755612113258,"name":"test-rum-with-product-scales-b91c7f54876a951d","product_scales":{"product_analytics_retention_scale":{"state":"NONE","last_modified_at":1755612113258},"rum_event_processing_scale":{"state":"ERROR_FOCUSED_MODE","last_modified_at":1755612113258}},"created_at":1755612113258,"tags":[],"is_active":false,"updated_by_handle":"frog@datadoghq.com","client_token":"pub6c464316cf5deccd2f56a23dbacd996e","created_by_handle":"frog@datadoghq.com","application_id":"51419fd9-a73f-4508-9f74-ad07d6669a47","product_analytics_replay_sample_rate":100}}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Tue, 19 Aug 2025 14:01:52 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/rum/applications/51419fd9-a73f-4508-9f74-ad07d6669a47 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/rum/Get-a-RUM-application-returns-OK-response.frozen b/cassettes/features/v2/rum/Get-a-RUM-application-returns-OK-response.frozen index 86ca008c81c8..b77bb23923d4 100644 --- a/cassettes/features/v2/rum/Get-a-RUM-application-returns-OK-response.frozen +++ b/cassettes/features/v2/rum/Get-a-RUM-application-returns-OK-response.frozen @@ -1 +1 @@ -2024-12-10T15:40:43.594Z \ No newline at end of file +2025-08-19T14:03:19.778Z \ No newline at end of file diff --git a/cassettes/features/v2/rum/Get-a-RUM-application-returns-OK-response.yml b/cassettes/features/v2/rum/Get-a-RUM-application-returns-OK-response.yml index 08c0ab772761..1ac1438c54e0 100644 --- a/cassettes/features/v2/rum/Get-a-RUM-application-returns-OK-response.yml +++ b/cassettes/features/v2/rum/Get-a-RUM-application-returns-OK-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Tue, 10 Dec 2024 15:40:43 GMT +- recorded_at: Tue, 19 Aug 2025 14:03:19 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"name":"test-rum-27e6a81538211560","type":"ios"},"type":"rum_application_create"}}' + string: '{"data":{"attributes":{"name":"test-rum-4a6d822e36907848","type":"ios"},"type":"rum_application_create"}}' headers: Accept: - application/json @@ -14,7 +14,7 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"type":"rum_application","attributes":{"rum_disabled_at":0,"client_token":"pubabba2bf694ec513df0b434dd05fc8f4b","created_at":1733845244003,"rum_enabled_at":1733845244003,"tags":[],"created_by_handle":"frog@datadoghq.com","is_active":false,"type":"ios","updated_by_handle":"frog@datadoghq.com","product_analytics_enabled_at":1733845244003,"application_id":"77826c21-2a07-4b5a-a54d-8912e1802854","name":"test-rum-27e6a81538211560","updated_at":1733845244003,"product_analytics_disabled_at":1733845244003,"org_id":321813,"product_analytics_enabled":false,"hash":"pubabba2bf694ec513df0b434dd05fc8f4b","rum_enabled":true},"id":"77826c21-2a07-4b5a-a54d-8912e1802854"}} + string: '{"data":{"type":"rum_application","id":"60ddadf3-d37f-4d33-bdf1-f56b674ae8ed","attributes":{"product_analytics_replay_sample_rate":100,"tags":[],"is_active":false,"org_id":321813,"updated_by_handle":"frog@datadoghq.com","application_id":"60ddadf3-d37f-4d33-bdf1-f56b674ae8ed","product_scales":{"rum_event_processing_scale":{"last_modified_at":1755612200050,"state":"ALL"},"product_analytics_retention_scale":{"last_modified_at":1755612200050,"state":"NONE"}},"name":"test-rum-4a6d822e36907848","created_at":1755612200050,"type":"ios","created_by_handle":"frog@datadoghq.com","client_token":"pubc55567bba30695d2cd7bf49190b6ccf5","updated_at":1755612200050,"hash":"pubc55567bba30695d2cd7bf49190b6ccf5"}}} ' headers: @@ -23,18 +23,18 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Tue, 10 Dec 2024 15:40:43 GMT +- recorded_at: Tue, 19 Aug 2025 14:03:19 GMT request: body: null headers: Accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/rum/applications/77826c21-2a07-4b5a-a54d-8912e1802854 + uri: https://api.datadoghq.com/api/v2/rum/applications/60ddadf3-d37f-4d33-bdf1-f56b674ae8ed response: body: encoding: UTF-8 - string: '{"data":{"type":"rum_application","attributes":{"product_analytics_disabled_at":1733845244003,"rum_disabled_at":0,"is_active":false,"application_id":"77826c21-2a07-4b5a-a54d-8912e1802854","name":"test-rum-27e6a81538211560","updated_at":1733845244003,"updated_by_handle":"frog@datadoghq.com","org_id":321813,"rum_enabled_at":1733845244003,"hash":"pubabba2bf694ec513df0b434dd05fc8f4b","tags":[],"created_by_handle":"frog@datadoghq.com","type":"ios","rum_enabled":true,"product_analytics_enabled":false,"product_analytics_enabled_at":1733845244003,"created_at":1733845244003,"client_token":"pubabba2bf694ec513df0b434dd05fc8f4b"},"id":"77826c21-2a07-4b5a-a54d-8912e1802854"}} + string: '{"data":{"type":"rum_application","attributes":{"updated_at":1755612200050,"org_id":321813,"product_analytics_replay_sample_rate":100,"updated_by_handle":"frog@datadoghq.com","type":"ios","application_id":"60ddadf3-d37f-4d33-bdf1-f56b674ae8ed","hash":"pubc55567bba30695d2cd7bf49190b6ccf5","created_by_handle":"frog@datadoghq.com","product_scales":{"rum_event_processing_scale":{"state":"ALL","last_modified_at":1755612200050},"product_analytics_retention_scale":{"state":"NONE","last_modified_at":1755612200050}},"is_active":false,"tags":[],"name":"test-rum-4a6d822e36907848","client_token":"pubc55567bba30695d2cd7bf49190b6ccf5","created_at":1755612200050},"id":"60ddadf3-d37f-4d33-bdf1-f56b674ae8ed"}} ' headers: @@ -43,14 +43,14 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Tue, 10 Dec 2024 15:40:43 GMT +- recorded_at: Tue, 19 Aug 2025 14:03:19 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/rum/applications/77826c21-2a07-4b5a-a54d-8912e1802854 + uri: https://api.datadoghq.com/api/v2/rum/applications/60ddadf3-d37f-4d33-bdf1-f56b674ae8ed response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/rum/List-all-the-RUM-applications-returns-OK-response.frozen b/cassettes/features/v2/rum/List-all-the-RUM-applications-returns-OK-response.frozen index f86a32bc291a..f4b8f8d2caf7 100644 --- a/cassettes/features/v2/rum/List-all-the-RUM-applications-returns-OK-response.frozen +++ b/cassettes/features/v2/rum/List-all-the-RUM-applications-returns-OK-response.frozen @@ -1 +1 @@ -2024-12-10T15:40:45.445Z \ No newline at end of file +2025-08-19T14:03:34.020Z \ No newline at end of file diff --git a/cassettes/features/v2/rum/List-all-the-RUM-applications-returns-OK-response.yml b/cassettes/features/v2/rum/List-all-the-RUM-applications-returns-OK-response.yml index 1749014694e2..c23c881b2f67 100644 --- a/cassettes/features/v2/rum/List-all-the-RUM-applications-returns-OK-response.yml +++ b/cassettes/features/v2/rum/List-all-the-RUM-applications-returns-OK-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Tue, 10 Dec 2024 15:40:45 GMT +- recorded_at: Tue, 19 Aug 2025 14:03:34 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"name":"test-rum-688346277e8afe02","type":"ios"},"type":"rum_application_create"}}' + string: '{"data":{"attributes":{"name":"test-rum-a630eb80b3e09124","type":"ios"},"type":"rum_application_create"}}' headers: Accept: - application/json @@ -14,7 +14,7 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"type":"rum_application","attributes":{"is_active":false,"rum_disabled_at":0,"created_at":1733845245930,"type":"ios","name":"test-rum-688346277e8afe02","updated_at":1733845245930,"org_id":321813,"hash":"pub49b6e409919401d6f57c613443277c5f","product_analytics_enabled_at":1733845245930,"application_id":"9b00e648-de1e-4d5f-af81-3d465b925b0d","client_token":"pub49b6e409919401d6f57c613443277c5f","product_analytics_enabled":false,"tags":[],"created_by_handle":"frog@datadoghq.com","updated_by_handle":"frog@datadoghq.com","rum_enabled":true,"rum_enabled_at":1733845245930,"product_analytics_disabled_at":1733845245930},"id":"9b00e648-de1e-4d5f-af81-3d465b925b0d"}} + string: '{"data":{"type":"rum_application","id":"cfc4270c-7df3-4a8b-a24a-20f2a25e15b2","attributes":{"created_by_handle":"frog@datadoghq.com","name":"test-rum-a630eb80b3e09124","product_analytics_replay_sample_rate":100,"tags":[],"type":"ios","updated_at":1755612214266,"updated_by_handle":"frog@datadoghq.com","hash":"pub8da0c745dc9ed0616e72239bf54c23ff","product_scales":{"rum_event_processing_scale":{"state":"ALL","last_modified_at":1755612214266},"product_analytics_retention_scale":{"state":"NONE","last_modified_at":1755612214266}},"created_at":1755612214266,"client_token":"pub8da0c745dc9ed0616e72239bf54c23ff","org_id":321813,"application_id":"cfc4270c-7df3-4a8b-a24a-20f2a25e15b2","is_active":false}}} ' headers: @@ -23,7 +23,7 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Tue, 10 Dec 2024 15:40:45 GMT +- recorded_at: Tue, 19 Aug 2025 14:03:34 GMT request: body: null headers: @@ -34,8 +34,8 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":[{"type":"rum_application","attributes":{"updated_at":1646148434414,"product_analytics_disabled_at":1646148352095,"rum_enabled_at":1646148352095,"rum_disabled_at":0,"application_id":"6ae18142-192f-4582-9633-95121c2a01d7","created_by_handle":"frog@datadoghq.com","product_analytics_enabled":false,"org_id":321813,"type":"browser","is_active":true,"updated_by_handle":"frog@datadoghq.com","rum_enabled":true,"tags":[],"product_analytics_enabled_at":1646148352095,"name":"S8-integration-tests","created_at":1646148352095},"id":"6ae18142-192f-4582-9633-95121c2a01d7"},{"type":"rum_application","attributes":{"updated_at":1648568515456,"product_analytics_disabled_at":1648568515456,"rum_enabled_at":1648568515456,"rum_disabled_at":0,"application_id":"ce9843b0-7a45-453c-a831-55dd15f85141","created_by_handle":"frog@datadoghq.com","product_analytics_enabled":false,"org_id":321813,"type":"browser","is_active":true,"updated_by_handle":"frog@datadoghq.com","rum_enabled":true,"tags":[],"product_analytics_enabled_at":1648568515456,"name":"Synthetic - Tests Default Application","created_at":1648568515456},"id":"ce9843b0-7a45-453c-a831-55dd15f85141"},{"type":"rum_application","attributes":{"updated_at":1670608490405,"product_analytics_disabled_at":1670608490405,"rum_enabled_at":1670608490405,"rum_disabled_at":0,"application_id":"88e86bcc-6d0a-4a3c-942f-55314a6f03bd","created_by_handle":"frog@datadoghq.com","product_analytics_enabled":false,"org_id":321813,"type":"browser","is_active":false,"updated_by_handle":"frog@datadoghq.com","rum_enabled":true,"tags":[],"product_analytics_enabled_at":1670608490405,"name":"awoooooooo","created_at":1670608490405},"id":"88e86bcc-6d0a-4a3c-942f-55314a6f03bd"},{"type":"rum_application","attributes":{"updated_at":1721327950211,"product_analytics_disabled_at":1721327950211,"rum_enabled_at":1721327950211,"rum_disabled_at":0,"application_id":"aaf8455b-23c6-4ec8-9bd8-9bc45fe90aa5","created_by_handle":"anika.maskara@datadoghq.com","product_analytics_enabled":false,"org_id":321813,"type":"browser","is_active":false,"updated_by_handle":"anika.maskara@datadoghq.com","rum_enabled":true,"tags":[],"product_analytics_enabled_at":1721327950211,"name":"%s2","created_at":1721327950211},"id":"aaf8455b-23c6-4ec8-9bd8-9bc45fe90aa5"},{"type":"rum_application","attributes":{"updated_at":1733845067600,"product_analytics_disabled_at":1733845067600,"rum_enabled_at":1733845067600,"rum_disabled_at":0,"application_id":"56ea0200-2ff2-4aba-8b68-c2519f958d92","created_by_handle":"frog@datadoghq.com","product_analytics_enabled":false,"org_id":321813,"type":"browser","is_active":false,"updated_by_handle":"frog@datadoghq.com","rum_enabled":true,"tags":[],"product_analytics_enabled_at":1733845067600,"name":"test-name-create","created_at":1733845067600},"id":"56ea0200-2ff2-4aba-8b68-c2519f958d92"},{"type":"rum_application","attributes":{"updated_at":1733845070746,"product_analytics_disabled_at":1733845070746,"rum_enabled_at":1733845070746,"rum_disabled_at":0,"application_id":"ee5565ee-8853-4aa5-b996-95ed92723275","created_by_handle":"frog@datadoghq.com","product_analytics_enabled":false,"org_id":321813,"type":"browser","is_active":false,"updated_by_handle":"frog@datadoghq.com","rum_enabled":true,"tags":[],"product_analytics_enabled_at":1733845070746,"name":"test-name-create","created_at":1733845070746},"id":"ee5565ee-8853-4aa5-b996-95ed92723275"},{"type":"rum_application","attributes":{"updated_at":1733845073568,"product_analytics_disabled_at":1733845073568,"rum_enabled_at":1733845073568,"rum_disabled_at":0,"application_id":"9b86706d-31fb-401f-aa12-4483512eebfc","created_by_handle":"frog@datadoghq.com","product_analytics_enabled":false,"org_id":321813,"type":"browser","is_active":false,"updated_by_handle":"frog@datadoghq.com","rum_enabled":true,"tags":[],"product_analytics_enabled_at":1733845073568,"name":"test-name-create","created_at":1733845073568},"id":"9b86706d-31fb-401f-aa12-4483512eebfc"},{"type":"rum_application","attributes":{"updated_at":1733845076778,"product_analytics_disabled_at":1733845076778,"rum_enabled_at":1733845076778,"rum_disabled_at":0,"application_id":"c0ebd9ba-093e-4f43-bb7a-a11b59dcbc5f","created_by_handle":"frog@datadoghq.com","product_analytics_enabled":false,"org_id":321813,"type":"browser","is_active":false,"updated_by_handle":"frog@datadoghq.com","rum_enabled":true,"tags":[],"product_analytics_enabled_at":1733845076778,"name":"test-name-create","created_at":1733845076778},"id":"c0ebd9ba-093e-4f43-bb7a-a11b59dcbc5f"},{"type":"rum_application","attributes":{"updated_at":1733845079233,"product_analytics_disabled_at":1733845079233,"rum_enabled_at":1733845079233,"rum_disabled_at":0,"application_id":"86e85ed3-b529-4e1c-9499-8c7a58cd781a","created_by_handle":"frog@datadoghq.com","product_analytics_enabled":false,"org_id":321813,"type":"browser","is_active":false,"updated_by_handle":"frog@datadoghq.com","rum_enabled":true,"tags":[],"product_analytics_enabled_at":1733845079233,"name":"test-name-create","created_at":1733845079233},"id":"86e85ed3-b529-4e1c-9499-8c7a58cd781a"},{"type":"rum_application","attributes":{"updated_at":1733845245930,"product_analytics_disabled_at":1733845245930,"rum_enabled_at":1733845245930,"rum_disabled_at":0,"application_id":"9b00e648-de1e-4d5f-af81-3d465b925b0d","created_by_handle":"frog@datadoghq.com","product_analytics_enabled":false,"org_id":321813,"type":"ios","is_active":false,"updated_by_handle":"frog@datadoghq.com","rum_enabled":true,"tags":[],"product_analytics_enabled_at":1733845245930,"name":"test-rum-688346277e8afe02","created_at":1733845245930},"id":"9b00e648-de1e-4d5f-af81-3d465b925b0d"}]} + string: '{"data":[{"type":"rum_application","attributes":{"updated_by_handle":"Datadog","is_active":true,"created_at":1646148352095,"product_analytics_replay_sample_rate":100,"product_scales":{"rum_event_processing_scale":{"state":"ALL","last_modified_at":1646148352095},"product_analytics_retention_scale":{"state":"NONE","last_modified_at":1646148352095}},"tags":[],"updated_at":1753109253427,"type":"browser","created_by_handle":"frog@datadoghq.com","name":"S8-integration-tests","org_id":321813,"application_id":"6ae18142-192f-4582-9633-95121c2a01d7"},"id":"6ae18142-192f-4582-9633-95121c2a01d7"},{"type":"rum_application","attributes":{"updated_by_handle":"Datadog","is_active":true,"created_at":1648568515456,"product_analytics_replay_sample_rate":100,"product_scales":{"rum_event_processing_scale":{"state":"ALL","last_modified_at":1648568515456},"product_analytics_retention_scale":{"state":"NONE","last_modified_at":1648568515456}},"tags":[],"updated_at":1753109253438,"type":"browser","created_by_handle":"frog@datadoghq.com","name":"Synthetic + Tests Default Application","org_id":321813,"application_id":"ce9843b0-7a45-453c-a831-55dd15f85141"},"id":"ce9843b0-7a45-453c-a831-55dd15f85141"},{"type":"rum_application","attributes":{"updated_by_handle":"Datadog","is_active":false,"created_at":1670608490405,"product_analytics_replay_sample_rate":100,"product_scales":{"rum_event_processing_scale":{"state":"ALL","last_modified_at":1670608490405},"product_analytics_retention_scale":{"state":"NONE","last_modified_at":1670608490405}},"tags":[],"updated_at":1753109253448,"type":"browser","created_by_handle":"frog@datadoghq.com","name":"awoooooooo","org_id":321813,"application_id":"88e86bcc-6d0a-4a3c-942f-55314a6f03bd"},"id":"88e86bcc-6d0a-4a3c-942f-55314a6f03bd"},{"type":"rum_application","attributes":{"updated_by_handle":"Datadog","is_active":false,"created_at":1721327950211,"product_analytics_replay_sample_rate":100,"product_scales":{"rum_event_processing_scale":{"state":"ALL","last_modified_at":1721327950211},"product_analytics_retention_scale":{"state":"NONE","last_modified_at":1721327950211}},"tags":[],"updated_at":1753109253459,"type":"browser","created_by_handle":"anika.maskara@datadoghq.com","name":"%s2","org_id":321813,"application_id":"aaf8455b-23c6-4ec8-9bd8-9bc45fe90aa5"},"id":"aaf8455b-23c6-4ec8-9bd8-9bc45fe90aa5"},{"type":"rum_application","attributes":{"updated_by_handle":"Datadog","is_active":false,"created_at":1743185866075,"product_analytics_replay_sample_rate":100,"product_scales":{"rum_event_processing_scale":{"state":"ALL","last_modified_at":1743185866075},"product_analytics_retention_scale":{"state":"NONE","last_modified_at":1743185866075}},"tags":[],"updated_at":1753109253472,"type":"browser","created_by_handle":"frog@datadoghq.com","name":"my-rum-application-test","org_id":321813,"application_id":"414e5c84-a376-43ec-b3d7-35049deea225"},"id":"414e5c84-a376-43ec-b3d7-35049deea225"},{"type":"rum_application","attributes":{"updated_by_handle":"Datadog","is_active":false,"created_at":1750736321451,"product_analytics_replay_sample_rate":100,"product_scales":{"rum_event_processing_scale":{"state":"ALL","last_modified_at":1750736321451},"product_analytics_retention_scale":{"state":"NONE","last_modified_at":1750736321451}},"tags":[],"updated_at":1753109253483,"type":"browser","created_by_handle":"frog@datadoghq.com","name":"updated_name_for_my_existing_rum_application","org_id":321813,"application_id":"47e19fb5-6c6a-4bd1-aee8-25f6709833e0"},"id":"47e19fb5-6c6a-4bd1-aee8-25f6709833e0"},{"type":"rum_application","attributes":{"updated_by_handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","is_active":false,"created_at":1755519831419,"product_analytics_replay_sample_rate":100,"product_scales":{"rum_event_processing_scale":{"state":"ALL","last_modified_at":1755519831419},"product_analytics_retention_scale":{"state":"NONE","last_modified_at":1755519831419}},"tags":[],"updated_at":1755519831419,"type":"android","created_by_handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"tf-TestAccDatadogRUMApplicationDatasourceErrorMultiple-local-1755519829","org_id":321813,"application_id":"e75f227f-a40f-49df-bd2c-e1997b1da53a"},"id":"e75f227f-a40f-49df-bd2c-e1997b1da53a"},{"type":"rum_application","attributes":{"updated_by_handle":"frog@datadoghq.com","is_active":false,"created_at":1755612214266,"product_analytics_replay_sample_rate":100,"product_scales":{"rum_event_processing_scale":{"state":"ALL","last_modified_at":1755612214266},"product_analytics_retention_scale":{"state":"NONE","last_modified_at":1755612214266}},"tags":[],"updated_at":1755612214266,"type":"ios","created_by_handle":"frog@datadoghq.com","name":"test-rum-a630eb80b3e09124","org_id":321813,"application_id":"cfc4270c-7df3-4a8b-a24a-20f2a25e15b2"},"id":"cfc4270c-7df3-4a8b-a24a-20f2a25e15b2"}]} ' headers: @@ -44,14 +44,14 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Tue, 10 Dec 2024 15:40:45 GMT +- recorded_at: Tue, 19 Aug 2025 14:03:34 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/rum/applications/9b00e648-de1e-4d5f-af81-3d465b925b0d + uri: https://api.datadoghq.com/api/v2/rum/applications/cfc4270c-7df3-4a8b-a24a-20f2a25e15b2 response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/rum/Update-a-RUM-application-returns-OK-response.frozen b/cassettes/features/v2/rum/Update-a-RUM-application-returns-OK-response.frozen index 929c624ea200..7134dffc5e1e 100644 --- a/cassettes/features/v2/rum/Update-a-RUM-application-returns-OK-response.frozen +++ b/cassettes/features/v2/rum/Update-a-RUM-application-returns-OK-response.frozen @@ -1 +1 @@ -2024-12-10T15:40:47.532Z \ No newline at end of file +2025-08-19T14:26:24.242Z \ No newline at end of file diff --git a/cassettes/features/v2/rum/Update-a-RUM-application-returns-OK-response.yml b/cassettes/features/v2/rum/Update-a-RUM-application-returns-OK-response.yml index 7dea4ce772db..6b443343085b 100644 --- a/cassettes/features/v2/rum/Update-a-RUM-application-returns-OK-response.yml +++ b/cassettes/features/v2/rum/Update-a-RUM-application-returns-OK-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Tue, 10 Dec 2024 15:40:47 GMT +- recorded_at: Tue, 19 Aug 2025 14:26:24 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"name":"test-rum-08f8f866ac73a2f6","type":"ios"},"type":"rum_application_create"}}' + string: '{"data":{"attributes":{"name":"test-rum-2befac64eeb0a1b0","type":"ios"},"type":"rum_application_create"}}' headers: Accept: - application/json @@ -14,7 +14,7 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"type":"rum_application","attributes":{"tags":[],"type":"ios","client_token":"pub89c189272956845c68f39e57d34d23f6","hash":"pub89c189272956845c68f39e57d34d23f6","updated_at":1733845247961,"org_id":321813,"product_analytics_disabled_at":1733845247961,"product_analytics_enabled_at":1733845247961,"rum_enabled_at":1733845247961,"application_id":"04898090-77be-4047-a2cb-654f5e050929","is_active":false,"rum_disabled_at":0,"product_analytics_enabled":false,"created_at":1733845247961,"created_by_handle":"frog@datadoghq.com","name":"test-rum-08f8f866ac73a2f6","rum_enabled":true,"updated_by_handle":"frog@datadoghq.com"},"id":"04898090-77be-4047-a2cb-654f5e050929"}} + string: '{"data":{"type":"rum_application","attributes":{"type":"ios","is_active":false,"name":"test-rum-2befac64eeb0a1b0","org_id":321813,"client_token":"pub5771f25e4c8f41666ac4a61cf7fc9d0d","created_by_handle":"frog@datadoghq.com","updated_at":1755613584581,"application_id":"94f76d3a-a8b2-4d1a-9938-771568a36f50","created_at":1755613584581,"updated_by_handle":"frog@datadoghq.com","product_scales":{"rum_event_processing_scale":{"state":"ALL","last_modified_at":1755613584581},"product_analytics_retention_scale":{"state":"NONE","last_modified_at":1755613584581}},"hash":"pub5771f25e4c8f41666ac4a61cf7fc9d0d","tags":[],"product_analytics_replay_sample_rate":100},"id":"94f76d3a-a8b2-4d1a-9938-771568a36f50"}} ' headers: @@ -23,22 +23,22 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Tue, 10 Dec 2024 15:40:47 GMT +- recorded_at: Tue, 19 Aug 2025 14:26:24 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"name":"updated_name_for_my_existing_rum_application","type":"browser"},"id":"04898090-77be-4047-a2cb-654f5e050929","type":"rum_application_update"}}' + string: '{"data":{"attributes":{"name":"updated_name_for_my_existing_rum_application","type":"browser"},"id":"94f76d3a-a8b2-4d1a-9938-771568a36f50","type":"rum_application_update"}}' headers: Accept: - application/json Content-Type: - application/json method: PATCH - uri: https://api.datadoghq.com/api/v2/rum/applications/04898090-77be-4047-a2cb-654f5e050929 + uri: https://api.datadoghq.com/api/v2/rum/applications/94f76d3a-a8b2-4d1a-9938-771568a36f50 response: body: encoding: UTF-8 - string: '{"data":{"type":"rum_application","attributes":{"product_analytics_enabled":false,"tags":[],"updated_at":1733845248476,"rum_enabled":true,"type":"browser","product_analytics_enabled_at":1733845247961,"rum_enabled_at":1733845247961,"rum_disabled_at":0,"name":"updated_name_for_my_existing_rum_application","is_active":false,"client_token":"pub89c189272956845c68f39e57d34d23f6","created_at":1733845247961,"product_analytics_disabled_at":1733845247961,"hash":"pub89c189272956845c68f39e57d34d23f6","org_id":321813,"created_by_handle":"frog@datadoghq.com","updated_by_handle":"frog@datadoghq.com","application_id":"04898090-77be-4047-a2cb-654f5e050929"},"id":"04898090-77be-4047-a2cb-654f5e050929"}} + string: '{"data":{"type":"rum_application","attributes":{"product_scales":{"rum_event_processing_scale":{"state":"ALL","last_modified_at":1755613584581},"product_analytics_retention_scale":{"state":"NONE","last_modified_at":1755613584581}},"hash":"pub5771f25e4c8f41666ac4a61cf7fc9d0d","name":"updated_name_for_my_existing_rum_application","type":"browser","created_at":1755613584581,"org_id":321813,"updated_at":1755613584847,"tags":[],"is_active":false,"client_token":"pub5771f25e4c8f41666ac4a61cf7fc9d0d","created_by_handle":"frog@datadoghq.com","application_id":"94f76d3a-a8b2-4d1a-9938-771568a36f50","updated_by_handle":"frog@datadoghq.com","product_analytics_replay_sample_rate":100},"id":"94f76d3a-a8b2-4d1a-9938-771568a36f50"}} ' headers: @@ -47,14 +47,14 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Tue, 10 Dec 2024 15:40:47 GMT +- recorded_at: Tue, 19 Aug 2025 14:26:24 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/rum/applications/04898090-77be-4047-a2cb-654f5e050929 + uri: https://api.datadoghq.com/api/v2/rum/applications/94f76d3a-a8b2-4d1a-9938-771568a36f50 response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/rum/Update-a-RUM-application-with-Product-Scales-returns-OK-response.frozen b/cassettes/features/v2/rum/Update-a-RUM-application-with-Product-Scales-returns-OK-response.frozen new file mode 100644 index 000000000000..49869dc4be52 --- /dev/null +++ b/cassettes/features/v2/rum/Update-a-RUM-application-with-Product-Scales-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-08-19T14:03:03.148Z \ No newline at end of file diff --git a/cassettes/features/v2/rum/Update-a-RUM-application-with-Product-Scales-returns-OK-response.yml b/cassettes/features/v2/rum/Update-a-RUM-application-with-Product-Scales-returns-OK-response.yml new file mode 100644 index 000000000000..e3ab2c6870a9 --- /dev/null +++ b/cassettes/features/v2/rum/Update-a-RUM-application-with-Product-Scales-returns-OK-response.yml @@ -0,0 +1,66 @@ +http_interactions: +- recorded_at: Tue, 19 Aug 2025 14:03:03 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"test-rum-437f87a61b37ca7e","type":"ios"},"type":"rum_application_create"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/rum/applications + response: + body: + encoding: UTF-8 + string: '{"data":{"type":"rum_application","attributes":{"updated_by_handle":"frog@datadoghq.com","product_scales":{"rum_event_processing_scale":{"state":"ALL","last_modified_at":1755612183425},"product_analytics_retention_scale":{"state":"NONE","last_modified_at":1755612183425}},"client_token":"pub601ee82f2a03f18ee4750e75918179a9","is_active":false,"created_by_handle":"frog@datadoghq.com","tags":[],"org_id":321813,"type":"ios","product_analytics_replay_sample_rate":100,"name":"test-rum-437f87a61b37ca7e","application_id":"c82755b7-9938-4241-ae5a-24dd5760402b","hash":"pub601ee82f2a03f18ee4750e75918179a9","updated_at":1755612183425,"created_at":1755612183425},"id":"c82755b7-9938-4241-ae5a-24dd5760402b"}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Tue, 19 Aug 2025 14:03:03 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"updated_rum_with_product_scales","product_analytics_retention_state":"MAX","rum_event_processing_state":"ALL"},"id":"c82755b7-9938-4241-ae5a-24dd5760402b","type":"rum_application_update"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/rum/applications/c82755b7-9938-4241-ae5a-24dd5760402b + response: + body: + encoding: UTF-8 + string: '{"data":{"type":"rum_application","attributes":{"tags":[],"application_id":"c82755b7-9938-4241-ae5a-24dd5760402b","is_active":false,"hash":"pub601ee82f2a03f18ee4750e75918179a9","product_analytics_replay_sample_rate":100,"product_scales":{"product_analytics_retention_scale":{"state":"MAX","last_modified_at":1755612183687},"rum_event_processing_scale":{"state":"ALL","last_modified_at":1755612183425}},"updated_by_handle":"frog@datadoghq.com","org_id":321813,"created_by_handle":"frog@datadoghq.com","type":"ios","name":"updated_rum_with_product_scales","client_token":"pub601ee82f2a03f18ee4750e75918179a9","created_at":1755612183425,"updated_at":1755612183687},"id":"c82755b7-9938-4241-ae5a-24dd5760402b"}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Tue, 19 Aug 2025 14:03:03 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/rum/applications/c82755b7-9938-4241-ae5a-24dd5760402b + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/examples/v2/rum/CreateRUMApplication_1946294560.rb b/examples/v2/rum/CreateRUMApplication_1946294560.rb new file mode 100644 index 000000000000..286dc19ec010 --- /dev/null +++ b/examples/v2/rum/CreateRUMApplication_1946294560.rb @@ -0,0 +1,17 @@ +# Create a new RUM application with Product Scales returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::RUMAPI.new + +body = DatadogAPIClient::V2::RUMApplicationCreateRequest.new({ + data: DatadogAPIClient::V2::RUMApplicationCreate.new({ + attributes: DatadogAPIClient::V2::RUMApplicationCreateAttributes.new({ + name: "test-rum-with-product-scales-5c67ebb32077e1d9", + type: "browser", + rum_event_processing_state: DatadogAPIClient::V2::RUMEventProcessingState::ERROR_FOCUSED_MODE, + product_analytics_retention_state: DatadogAPIClient::V2::RUMProductAnalyticsRetentionState::NONE, + }), + type: DatadogAPIClient::V2::RUMApplicationCreateType::RUM_APPLICATION_CREATE, + }), +}) +p api_instance.create_rum_application(body) diff --git a/examples/v2/rum/UpdateRUMApplication_394074053.rb b/examples/v2/rum/UpdateRUMApplication_394074053.rb new file mode 100644 index 000000000000..cdaaed7c3a59 --- /dev/null +++ b/examples/v2/rum/UpdateRUMApplication_394074053.rb @@ -0,0 +1,20 @@ +# Update a RUM application with Product Scales returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::RUMAPI.new + +# there is a valid "rum_application" in the system +RUM_APPLICATION_DATA_ID = ENV["RUM_APPLICATION_DATA_ID"] + +body = DatadogAPIClient::V2::RUMApplicationUpdateRequest.new({ + data: DatadogAPIClient::V2::RUMApplicationUpdate.new({ + attributes: DatadogAPIClient::V2::RUMApplicationUpdateAttributes.new({ + name: "updated_rum_with_product_scales", + rum_event_processing_state: DatadogAPIClient::V2::RUMEventProcessingState::ALL, + product_analytics_retention_state: DatadogAPIClient::V2::RUMProductAnalyticsRetentionState::MAX, + }), + id: RUM_APPLICATION_DATA_ID, + type: DatadogAPIClient::V2::RUMApplicationUpdateType::RUM_APPLICATION_UPDATE, + }), +}) +p api_instance.update_rum_application(RUM_APPLICATION_DATA_ID, body) diff --git a/features/v2/rum.feature b/features/v2/rum.feature index f86e1ee618f2..e25922fb48cd 100644 --- a/features/v2/rum.feature +++ b/features/v2/rum.feature @@ -42,6 +42,23 @@ Feature: RUM And the response "data.type" is equal to "rum_application" And the response "data.attributes.type" is equal to "ios" And the response "data.attributes.name" is equal to "test-rum-{{ unique_hash }}" + And the response "data.attributes.product_scales.rum_event_processing_scale.state" is equal to "ALL" + And the response "data.attributes.product_scales.product_analytics_retention_scale.state" is equal to "NONE" + And the response "data.attributes.product_scales.rum_event_processing_scale" has field "last_modified_at" + And the response "data.attributes.product_scales.product_analytics_retention_scale" has field "last_modified_at" + + @skip-validation @team:DataDog/rum-backend + Scenario: Create a new RUM application with Product Scales returns "OK" response + Given new "CreateRUMApplication" request + And body with value {"data": {"attributes": {"name": "test-rum-with-product-scales-{{ unique_hash }}", "type": "browser", "rum_event_processing_state": "ERROR_FOCUSED_MODE", "product_analytics_retention_state": "NONE"}, "type": "rum_application_create"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "rum_application" + And the response "data.attributes.name" is equal to "test-rum-with-product-scales-{{ unique_hash }}" + And the response "data.attributes.product_scales.rum_event_processing_scale.state" is equal to "ERROR_FOCUSED_MODE" + And the response "data.attributes.product_scales.product_analytics_retention_scale.state" is equal to "NONE" + And the response "data.attributes.product_scales.rum_event_processing_scale" has field "last_modified_at" + And the response "data.attributes.product_scales.product_analytics_retention_scale" has field "last_modified_at" @skip-validation @team:DataDog/rum-backend Scenario: Delete a RUM application returns "No Content" response @@ -75,6 +92,7 @@ Feature: RUM And the response "data.type" is equal to "rum_application" And the response "data.attributes.type" is equal to "ios" And the response "data.attributes.name" is equal to "test-rum-{{ unique_hash }}" + And the response "data.attributes" has field "product_scales" @generated @skip @team:DataDog/rum-backend Scenario: Get a list of RUM events returns "Bad Request" response @@ -109,6 +127,8 @@ Feature: RUM When the request is sent Then the response status is 200 OK And the response "data" has item with field "attributes.application_id" with value "{{ rum_application.data.id }}" + And the response "data" has item with field "attributes.product_scales.rum_event_processing_scale.state" with value "ALL" + And the response "data" has item with field "attributes.product_scales.product_analytics_retention_scale.state" with value "NONE" @generated @skip @team:DataDog/rum-backend Scenario: Search RUM events returns "Bad Request" response @@ -136,7 +156,7 @@ Feature: RUM Scenario: Update a RUM application returns "Bad Request" response Given new "UpdateRUMApplication" request And request contains "id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"name": "updated_name_for_my_existing_rum_application", "type": "browser"}, "id": "abcd1234-0000-0000-abcd-1234abcd5678", "type": "rum_application_update"}} + And body with value {"data": {"attributes": {"name": "updated_name_for_my_existing_rum_application", "product_analytics_retention_state": "MAX", "rum_event_processing_state": "ALL", "type": "browser"}, "id": "abcd1234-0000-0000-abcd-1234abcd5678", "type": "rum_application_update"}} When the request is sent Then the response status is 400 Bad Request @@ -144,7 +164,7 @@ Feature: RUM Scenario: Update a RUM application returns "Not Found" response Given new "UpdateRUMApplication" request And request contains "id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"name": "updated_name_for_my_existing_rum_application", "type": "browser"}, "id": "abcd1234-0000-0000-abcd-1234abcd5678", "type": "rum_application_update"}} + And body with value {"data": {"attributes": {"name": "updated_name_for_my_existing_rum_application", "product_analytics_retention_state": "MAX", "rum_event_processing_state": "ALL", "type": "browser"}, "id": "abcd1234-0000-0000-abcd-1234abcd5678", "type": "rum_application_update"}} When the request is sent Then the response status is 404 Not Found @@ -160,6 +180,10 @@ Feature: RUM And the response "data.attributes.application_id" is equal to "{{ rum_application.data.id }}" And the response "data.attributes.type" is equal to "browser" And the response "data.attributes.name" is equal to "updated_name_for_my_existing_rum_application" + And the response "data.attributes.product_scales.rum_event_processing_scale.state" is equal to "ALL" + And the response "data.attributes.product_scales.product_analytics_retention_scale.state" is equal to "NONE" + And the response "data.attributes.product_scales.rum_event_processing_scale" has field "last_modified_at" + And the response "data.attributes.product_scales.product_analytics_retention_scale" has field "last_modified_at" @skip-validation @team:DataDog/rum-backend Scenario: Update a RUM application returns "Unprocessable Entity." response @@ -169,3 +193,18 @@ Feature: RUM And body with value {"data": {"id": "this_id_will_not_match", "type": "rum_application_update"}} When the request is sent Then the response status is 422 Unprocessable Entity. + + @skip-validation @team:DataDog/rum-backend + Scenario: Update a RUM application with Product Scales returns "OK" response + Given there is a valid "rum_application" in the system + And new "UpdateRUMApplication" request + And request contains "id" parameter from "rum_application.data.id" + And body with value {"data": {"attributes": {"name": "updated_rum_with_product_scales", "rum_event_processing_state": "ALL", "product_analytics_retention_state": "MAX"}, "id": "{{ rum_application.data.id }}", "type": "rum_application_update"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "rum_application" + And the response "data.attributes.name" is equal to "updated_rum_with_product_scales" + And the response "data.attributes.product_scales.rum_event_processing_scale.state" is equal to "ALL" + And the response "data.attributes.product_scales.product_analytics_retention_scale.state" is equal to "MAX" + And the response "data.attributes.product_scales.rum_event_processing_scale" has field "last_modified_at" + And the response "data.attributes.product_scales.product_analytics_retention_scale" has field "last_modified_at" diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index ed4cea7f307e..31a9061949a4 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -3102,6 +3102,8 @@ def overrides "v2.rum_compute_type" => "RUMComputeType", "v2.rum_event" => "RUMEvent", "v2.rum_event_attributes" => "RUMEventAttributes", + "v2.rum_event_processing_scale" => "RUMEventProcessingScale", + "v2.rum_event_processing_state" => "RUMEventProcessingState", "v2.rum_events_response" => "RUMEventsResponse", "v2.rum_event_type" => "RUMEventType", "v2.rum_group_by" => "RUMGroupBy", @@ -3131,6 +3133,9 @@ def overrides "v2.rum_metric_update_compute" => "RumMetricUpdateCompute", "v2.rum_metric_update_data" => "RumMetricUpdateData", "v2.rum_metric_update_request" => "RumMetricUpdateRequest", + "v2.rum_product_analytics_retention_scale" => "RUMProductAnalyticsRetentionScale", + "v2.rum_product_analytics_retention_state" => "RUMProductAnalyticsRetentionState", + "v2.rum_product_scales" => "RUMProductScales", "v2.rum_query_filter" => "RUMQueryFilter", "v2.rum_query_options" => "RUMQueryOptions", "v2.rum_query_page_options" => "RUMQueryPageOptions", diff --git a/lib/datadog_api_client/v2/models/rum_application_attributes.rb b/lib/datadog_api_client/v2/models/rum_application_attributes.rb index 45faa326bc75..de3aba8ee6b1 100644 --- a/lib/datadog_api_client/v2/models/rum_application_attributes.rb +++ b/lib/datadog_api_client/v2/models/rum_application_attributes.rb @@ -45,6 +45,9 @@ class RUMApplicationAttributes # Org ID of the RUM application. attr_reader :org_id + # Product Scales configuration for the RUM application. + attr_accessor :product_scales + # Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, `kotlin-multiplatform`. attr_reader :type @@ -68,6 +71,7 @@ def self.attribute_map :'is_active' => :'is_active', :'name' => :'name', :'org_id' => :'org_id', + :'product_scales' => :'product_scales', :'type' => :'type', :'updated_at' => :'updated_at', :'updated_by_handle' => :'updated_by_handle' @@ -86,6 +90,7 @@ def self.openapi_types :'is_active' => :'Boolean', :'name' => :'String', :'org_id' => :'Integer', + :'product_scales' => :'RUMProductScales', :'type' => :'String', :'updated_at' => :'Integer', :'updated_by_handle' => :'String' @@ -142,6 +147,10 @@ def initialize(attributes = {}) self.org_id = attributes[:'org_id'] end + if attributes.key?(:'product_scales') + self.product_scales = attributes[:'product_scales'] + end + if attributes.key?(:'type') self.type = attributes[:'type'] end @@ -299,6 +308,7 @@ def ==(o) is_active == o.is_active && name == o.name && org_id == o.org_id && + product_scales == o.product_scales && type == o.type && updated_at == o.updated_at && updated_by_handle == o.updated_by_handle && @@ -309,7 +319,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [application_id, client_token, created_at, created_by_handle, _hash, is_active, name, org_id, type, updated_at, updated_by_handle, additional_properties].hash + [application_id, client_token, created_at, created_by_handle, _hash, is_active, name, org_id, product_scales, type, updated_at, updated_by_handle, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/rum_application_create_attributes.rb b/lib/datadog_api_client/v2/models/rum_application_create_attributes.rb index a495bcb8fd59..5c0629d98f78 100644 --- a/lib/datadog_api_client/v2/models/rum_application_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/rum_application_create_attributes.rb @@ -24,6 +24,12 @@ class RUMApplicationCreateAttributes # Name of the RUM application. attr_reader :name + # Controls the retention policy for Product Analytics data derived from RUM events. + attr_accessor :product_analytics_retention_state + + # Configures which RUM events are processed and stored for the application. + attr_accessor :rum_event_processing_state + # Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, `kotlin-multiplatform`. attr_accessor :type @@ -34,6 +40,8 @@ class RUMApplicationCreateAttributes def self.attribute_map { :'name' => :'name', + :'product_analytics_retention_state' => :'product_analytics_retention_state', + :'rum_event_processing_state' => :'rum_event_processing_state', :'type' => :'type' } end @@ -43,6 +51,8 @@ def self.attribute_map def self.openapi_types { :'name' => :'String', + :'product_analytics_retention_state' => :'RUMProductAnalyticsRetentionState', + :'rum_event_processing_state' => :'RUMEventProcessingState', :'type' => :'String' } end @@ -69,6 +79,14 @@ def initialize(attributes = {}) self.name = attributes[:'name'] end + if attributes.key?(:'product_analytics_retention_state') + self.product_analytics_retention_state = attributes[:'product_analytics_retention_state'] + end + + if attributes.key?(:'rum_event_processing_state') + self.rum_event_processing_state = attributes[:'rum_event_processing_state'] + end + if attributes.key?(:'type') self.type = attributes[:'type'] end @@ -119,6 +137,8 @@ def ==(o) return true if self.equal?(o) self.class == o.class && name == o.name && + product_analytics_retention_state == o.product_analytics_retention_state && + rum_event_processing_state == o.rum_event_processing_state && type == o.type && additional_properties == o.additional_properties end @@ -127,7 +147,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [name, type, additional_properties].hash + [name, product_analytics_retention_state, rum_event_processing_state, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/rum_application_list_attributes.rb b/lib/datadog_api_client/v2/models/rum_application_list_attributes.rb index 93838c467ad8..c1695e5218d2 100644 --- a/lib/datadog_api_client/v2/models/rum_application_list_attributes.rb +++ b/lib/datadog_api_client/v2/models/rum_application_list_attributes.rb @@ -42,6 +42,9 @@ class RUMApplicationListAttributes # Org ID of the RUM application. attr_reader :org_id + # Product Scales configuration for the RUM application. + attr_accessor :product_scales + # Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, `kotlin-multiplatform`. attr_reader :type @@ -64,6 +67,7 @@ def self.attribute_map :'is_active' => :'is_active', :'name' => :'name', :'org_id' => :'org_id', + :'product_scales' => :'product_scales', :'type' => :'type', :'updated_at' => :'updated_at', :'updated_by_handle' => :'updated_by_handle' @@ -81,6 +85,7 @@ def self.openapi_types :'is_active' => :'Boolean', :'name' => :'String', :'org_id' => :'Integer', + :'product_scales' => :'RUMProductScales', :'type' => :'String', :'updated_at' => :'Integer', :'updated_by_handle' => :'String' @@ -133,6 +138,10 @@ def initialize(attributes = {}) self.org_id = attributes[:'org_id'] end + if attributes.key?(:'product_scales') + self.product_scales = attributes[:'product_scales'] + end + if attributes.key?(:'type') self.type = attributes[:'type'] end @@ -278,6 +287,7 @@ def ==(o) is_active == o.is_active && name == o.name && org_id == o.org_id && + product_scales == o.product_scales && type == o.type && updated_at == o.updated_at && updated_by_handle == o.updated_by_handle && @@ -288,7 +298,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [application_id, created_at, created_by_handle, _hash, is_active, name, org_id, type, updated_at, updated_by_handle, additional_properties].hash + [application_id, created_at, created_by_handle, _hash, is_active, name, org_id, product_scales, type, updated_at, updated_by_handle, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/rum_application_update_attributes.rb b/lib/datadog_api_client/v2/models/rum_application_update_attributes.rb index f614ca1b51ed..d84b5c722dce 100644 --- a/lib/datadog_api_client/v2/models/rum_application_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/rum_application_update_attributes.rb @@ -24,6 +24,12 @@ class RUMApplicationUpdateAttributes # Name of the RUM application. attr_accessor :name + # Controls the retention policy for Product Analytics data derived from RUM events. + attr_accessor :product_analytics_retention_state + + # Configures which RUM events are processed and stored for the application. + attr_accessor :rum_event_processing_state + # Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, `kotlin-multiplatform`. attr_accessor :type @@ -34,6 +40,8 @@ class RUMApplicationUpdateAttributes def self.attribute_map { :'name' => :'name', + :'product_analytics_retention_state' => :'product_analytics_retention_state', + :'rum_event_processing_state' => :'rum_event_processing_state', :'type' => :'type' } end @@ -43,6 +51,8 @@ def self.attribute_map def self.openapi_types { :'name' => :'String', + :'product_analytics_retention_state' => :'RUMProductAnalyticsRetentionState', + :'rum_event_processing_state' => :'RUMEventProcessingState', :'type' => :'String' } end @@ -69,6 +79,14 @@ def initialize(attributes = {}) self.name = attributes[:'name'] end + if attributes.key?(:'product_analytics_retention_state') + self.product_analytics_retention_state = attributes[:'product_analytics_retention_state'] + end + + if attributes.key?(:'rum_event_processing_state') + self.rum_event_processing_state = attributes[:'rum_event_processing_state'] + end + if attributes.key?(:'type') self.type = attributes[:'type'] end @@ -101,6 +119,8 @@ def ==(o) return true if self.equal?(o) self.class == o.class && name == o.name && + product_analytics_retention_state == o.product_analytics_retention_state && + rum_event_processing_state == o.rum_event_processing_state && type == o.type && additional_properties == o.additional_properties end @@ -109,7 +129,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [name, type, additional_properties].hash + [name, product_analytics_retention_state, rum_event_processing_state, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/rum_event_processing_scale.rb b/lib/datadog_api_client/v2/models/rum_event_processing_scale.rb new file mode 100644 index 000000000000..016ef80e8c32 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_event_processing_scale.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 + # RUM event processing scale configuration. + class RUMEventProcessingScale + include BaseGenericModel + + # Timestamp in milliseconds when this scale was last modified. + attr_accessor :last_modified_at + + # Configures which RUM events are processed and stored for the application. + attr_accessor :state + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'last_modified_at' => :'last_modified_at', + :'state' => :'state' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'last_modified_at' => :'Integer', + :'state' => :'RUMEventProcessingState' + } + 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::RUMEventProcessingScale` 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?(:'last_modified_at') + self.last_modified_at = attributes[:'last_modified_at'] + end + + if attributes.key?(:'state') + self.state = attributes[:'state'] + 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 && + last_modified_at == o.last_modified_at && + state == o.state && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [last_modified_at, state, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/rum_event_processing_state.rb b/lib/datadog_api_client/v2/models/rum_event_processing_state.rb new file mode 100644 index 000000000000..f4517c105340 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_event_processing_state.rb @@ -0,0 +1,28 @@ +=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 + # Configures which RUM events are processed and stored for the application. + class RUMEventProcessingState + include BaseEnumModel + + ALL = "ALL".freeze + ERROR_FOCUSED_MODE = "ERROR_FOCUSED_MODE".freeze + NONE = "NONE".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/rum_product_analytics_retention_scale.rb b/lib/datadog_api_client/v2/models/rum_product_analytics_retention_scale.rb new file mode 100644 index 000000000000..16fd94847175 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_product_analytics_retention_scale.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 + # Product Analytics retention scale configuration. + class RUMProductAnalyticsRetentionScale + include BaseGenericModel + + # Timestamp in milliseconds when this scale was last modified. + attr_accessor :last_modified_at + + # Controls the retention policy for Product Analytics data derived from RUM events. + attr_accessor :state + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'last_modified_at' => :'last_modified_at', + :'state' => :'state' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'last_modified_at' => :'Integer', + :'state' => :'RUMProductAnalyticsRetentionState' + } + 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::RUMProductAnalyticsRetentionScale` 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?(:'last_modified_at') + self.last_modified_at = attributes[:'last_modified_at'] + end + + if attributes.key?(:'state') + self.state = attributes[:'state'] + 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 && + last_modified_at == o.last_modified_at && + state == o.state && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [last_modified_at, state, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/rum_product_analytics_retention_state.rb b/lib/datadog_api_client/v2/models/rum_product_analytics_retention_state.rb new file mode 100644 index 000000000000..0cb7d841c42e --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_product_analytics_retention_state.rb @@ -0,0 +1,27 @@ +=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 + # Controls the retention policy for Product Analytics data derived from RUM events. + class RUMProductAnalyticsRetentionState + include BaseEnumModel + + MAX = "MAX".freeze + NONE = "NONE".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/rum_product_scales.rb b/lib/datadog_api_client/v2/models/rum_product_scales.rb new file mode 100644 index 000000000000..cc22bc6d22d1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_product_scales.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 + # Product Scales configuration for the RUM application. + class RUMProductScales + include BaseGenericModel + + # Product Analytics retention scale configuration. + attr_accessor :product_analytics_retention_scale + + # RUM event processing scale configuration. + attr_accessor :rum_event_processing_scale + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'product_analytics_retention_scale' => :'product_analytics_retention_scale', + :'rum_event_processing_scale' => :'rum_event_processing_scale' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'product_analytics_retention_scale' => :'RUMProductAnalyticsRetentionScale', + :'rum_event_processing_scale' => :'RUMEventProcessingScale' + } + 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::RUMProductScales` 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?(:'product_analytics_retention_scale') + self.product_analytics_retention_scale = attributes[:'product_analytics_retention_scale'] + end + + if attributes.key?(:'rum_event_processing_scale') + self.rum_event_processing_scale = attributes[:'rum_event_processing_scale'] + 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 && + product_analytics_retention_scale == o.product_analytics_retention_scale && + rum_event_processing_scale == o.rum_event_processing_scale && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [product_analytics_retention_scale, rum_event_processing_scale, additional_properties].hash + end + end +end