diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 9e31333a3d0c..329c447be34e 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1799,7 +1799,9 @@ components: example: cd73a516-a481-4af5-8352-9b577465c77b type: string RumRetentionQuotaScopeTypeParameter: - description: The type of scope the retention quota configuration applies to. + description: |- + The type of scope the retention quota configuration applies to. + `application` is the only supported scope type. in: path name: scope_type required: true @@ -92488,25 +92490,9 @@ components: $ref: "#/components/schemas/RumRetentionFilterData" type: array type: object - RumRetentionQuotaAdaptiveConfig: - description: The configuration used when `mode` is `adaptive`. - properties: - max_retention_rate: - description: The maximum fraction of sessions to retain, in the range `(0, 1]`. - example: 0.5 - exclusiveMinimum: true - format: double - maximum: 1 - minimum: 0 - type: number - required: - - max_retention_rate - type: object RumRetentionQuotaConfigAttributes: description: The RUM retention quota configuration properties. properties: - adaptive: - $ref: "#/components/schemas/RumRetentionQuotaAdaptiveConfig" custom: $ref: "#/components/schemas/RumRetentionQuotaCustomConfig" mode: @@ -92564,8 +92550,6 @@ components: RumRetentionQuotaConfigUpdateAttributes: description: The RUM retention quota configuration properties to create or update. properties: - adaptive: - $ref: "#/components/schemas/RumRetentionQuotaAdaptiveConfig" custom: $ref: "#/components/schemas/RumRetentionQuotaCustomConfig" mode: @@ -92631,14 +92615,13 @@ components: type: object RumRetentionQuotaMode: description: |- - The retention quota mode. `custom` enforces a fixed session limit, while - `adaptive` dynamically adjusts retention. + The retention quota mode. `custom` enforces a fixed session limit. + `custom` is the only supported mode. enum: - custom - - adaptive example: custom type: string - x-enum-varnames: ["CUSTOM", "ADAPTIVE"] + x-enum-varnames: ["CUSTOM"] RumRetentionQuotaReachedAction: description: The action to take when the session quota is reached. enum: @@ -92649,7 +92632,9 @@ components: x-enum-varnames: ["STOP", "SLOWDOWN"] RumRetentionQuotaScopeType: default: application - description: The type of scope the retention quota configuration applies to. + description: |- + The type of scope the retention quota configuration applies to. + `application` is the only supported scope type. enum: - application example: application @@ -187415,7 +187400,7 @@ paths: $ref: "#/components/responses/TooManyRequestsResponse" summary: Delete a RUM retention quota configuration tags: - - RUM Retention Quota + - RUM Retention Quotas x-permission: operator: OR permissions: @@ -187478,7 +187463,7 @@ paths: $ref: "#/components/responses/TooManyRequestsResponse" summary: Get a RUM retention quota configuration tags: - - RUM Retention Quota + - RUM Retention Quotas x-permission: operator: OR permissions: @@ -187564,7 +187549,7 @@ paths: $ref: "#/components/responses/TooManyRequestsResponse" summary: Create or update a RUM retention quota config tags: - - RUM Retention Quota + - RUM Retention Quotas x-codegen-request-body-name: body x-permission: operator: OR @@ -218487,7 +218472,7 @@ tags: name: RUM Remote Config - description: |- Manage RUM retention quota configurations for your organization's RUM applications. - name: RUM Retention Quota + name: RUM Retention Quotas - description: View and manage Reference Tables in your organization. name: Reference Tables - description: |- diff --git a/examples/v2/rum-retention-quota/DeleteRumQuotaConfig.rb b/examples/v2/rum-retention-quotas/DeleteRumQuotaConfig.rb similarity index 59% rename from examples/v2/rum-retention-quota/DeleteRumQuotaConfig.rb rename to examples/v2/rum-retention-quotas/DeleteRumQuotaConfig.rb index 65026eebcde4..7f6b283e33fe 100644 --- a/examples/v2/rum-retention-quota/DeleteRumQuotaConfig.rb +++ b/examples/v2/rum-retention-quotas/DeleteRumQuotaConfig.rb @@ -1,5 +1,5 @@ # Delete a RUM retention quota configuration returns "No Content" response require "datadog_api_client" -api_instance = DatadogAPIClient::V2::RUMRetentionQuotaAPI.new -api_instance.delete_rum_quota_config(RumRetentionQuotaScopeType::APPLICATION, "ced16651-97b6-4e67-8590-8caec3af0695") +api_instance = DatadogAPIClient::V2::RUMRetentionQuotasAPI.new +api_instance.delete_rum_quota_config(RumRetentionQuotaScopeType::APPLICATION, "cd73a516-a481-4af5-8352-9b577465c77b") diff --git a/examples/v2/rum-retention-quota/GetRumQuotaConfig.rb b/examples/v2/rum-retention-quotas/GetRumQuotaConfig.rb similarity index 57% rename from examples/v2/rum-retention-quota/GetRumQuotaConfig.rb rename to examples/v2/rum-retention-quotas/GetRumQuotaConfig.rb index bdf61f624abb..da600a5155ad 100644 --- a/examples/v2/rum-retention-quota/GetRumQuotaConfig.rb +++ b/examples/v2/rum-retention-quotas/GetRumQuotaConfig.rb @@ -1,5 +1,5 @@ # Get a RUM retention quota configuration returns "OK" response require "datadog_api_client" -api_instance = DatadogAPIClient::V2::RUMRetentionQuotaAPI.new -p api_instance.get_rum_quota_config(RumRetentionQuotaScopeType::APPLICATION, "ced16651-97b6-4e67-8590-8caec3af0695") +api_instance = DatadogAPIClient::V2::RUMRetentionQuotasAPI.new +p api_instance.get_rum_quota_config(RumRetentionQuotaScopeType::APPLICATION, "cd73a516-a481-4af5-8352-9b577465c77b") diff --git a/examples/v2/rum-retention-quota/UpsertRumQuotaConfig.rb b/examples/v2/rum-retention-quotas/UpsertRumQuotaConfig.rb similarity index 75% rename from examples/v2/rum-retention-quota/UpsertRumQuotaConfig.rb rename to examples/v2/rum-retention-quotas/UpsertRumQuotaConfig.rb index 2e99cf3b4011..e550d8bf4764 100644 --- a/examples/v2/rum-retention-quota/UpsertRumQuotaConfig.rb +++ b/examples/v2/rum-retention-quotas/UpsertRumQuotaConfig.rb @@ -1,14 +1,11 @@ # Create or update a RUM retention quota config returns "OK" response require "datadog_api_client" -api_instance = DatadogAPIClient::V2::RUMRetentionQuotaAPI.new +api_instance = DatadogAPIClient::V2::RUMRetentionQuotasAPI.new body = DatadogAPIClient::V2::RumRetentionQuotaConfigUpdateRequest.new({ data: DatadogAPIClient::V2::RumRetentionQuotaConfigUpdateData.new({ attributes: DatadogAPIClient::V2::RumRetentionQuotaConfigUpdateAttributes.new({ - adaptive: DatadogAPIClient::V2::RumRetentionQuotaAdaptiveConfig.new({ - max_retention_rate: 0.5, - }), custom: DatadogAPIClient::V2::RumRetentionQuotaCustomConfig.new({ daily_reset_time: "08:00", daily_reset_timezone: "+09:00", @@ -18,8 +15,8 @@ }), mode: DatadogAPIClient::V2::RumRetentionQuotaMode::CUSTOM, }), - id: "ced16651-97b6-4e67-8590-8caec3af0695", + id: "cd73a516-a481-4af5-8352-9b577465c77b", type: DatadogAPIClient::V2::RumRetentionQuotaConfigType::RUM_QUOTA_CONFIG, }), }) -p api_instance.upsert_rum_quota_config(RumRetentionQuotaScopeType::APPLICATION, "ced16651-97b6-4e67-8590-8caec3af0695", body) +p api_instance.upsert_rum_quota_config(RumRetentionQuotaScopeType::APPLICATION, "cd73a516-a481-4af5-8352-9b577465c77b", body) diff --git a/features/v2/rum_retention_quota.feature b/features/v2/rum_retention_quota.feature deleted file mode 100644 index 527a1597d4d8..000000000000 --- a/features/v2/rum_retention_quota.feature +++ /dev/null @@ -1,100 +0,0 @@ -@endpoint(rum-retention-quota) @endpoint(rum-retention-quota-v2) -Feature: RUM Retention Quota - Manage RUM retention quota configurations for your organization's RUM - applications. - - Background: - Given a valid "apiKeyAuth" key in the system - And a valid "appKeyAuth" key in the system - And an instance of "RUMRetentionQuota" API - - @skip @team:DataDog/rum-backend - Scenario: Create or update a RUM retention quota config returns "Bad Request" response - Given new "UpsertRumQuotaConfig" request - And request contains "scope_type" parameter with value "application" - And request contains "scope_id" parameter with value "invalid-scope-id" - And body with value {"data": {"attributes": {"adaptive": {"max_retention_rate": 0.5}, "custom": {"daily_reset_time": "08:00", "daily_reset_timezone": "+09:00", "quota_reached_action": "stop", "session_limit": 1000000, "window_type": "daily"}, "mode": "custom"}, "id": "cd73a516-a481-4af5-8352-9b577465c77b", "type": "rum_quota_config"}} - When the request is sent - Then the response status is 400 Bad Request - - @skip @team:DataDog/rum-backend - Scenario: Create or update a RUM retention quota config returns "Not Found" response - Given new "UpsertRumQuotaConfig" request - And request contains "scope_type" parameter with value "application" - And request contains "scope_id" parameter with value "{{ unique }}" - And body with value {"data": {"attributes": {"adaptive": {"max_retention_rate": 0.5}, "custom": {"daily_reset_time": "08:00", "daily_reset_timezone": "+09:00", "quota_reached_action": "stop", "session_limit": 1000000, "window_type": "daily"}, "mode": "custom"}, "id": "{{ unique }}", "type": "rum_quota_config"}} - When the request is sent - Then the response status is 404 Not Found - - @skip @team:DataDog/rum-backend - Scenario: Create or update a RUM retention quota config returns "OK" response - Given new "UpsertRumQuotaConfig" request - And request contains "scope_type" parameter with value "application" - And request contains "scope_id" parameter with value "ced16651-97b6-4e67-8590-8caec3af0695" - And body with value {"data": {"attributes": {"adaptive": {"max_retention_rate": 0.5}, "custom": {"daily_reset_time": "08:00", "daily_reset_timezone": "+09:00", "quota_reached_action": "stop", "session_limit": 1000000, "window_type": "daily"}, "mode": "custom"}, "id": "ced16651-97b6-4e67-8590-8caec3af0695", "type": "rum_quota_config"}} - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/rum-backend - Scenario: Delete a RUM retention quota configuration returns "Bad Request" response - Given new "DeleteRumQuotaConfig" request - And request contains "scope_type" parameter from "REPLACE.ME" - And request contains "scope_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @skip @team:DataDog/rum-backend - Scenario: Delete a RUM retention quota configuration returns "No Content" response - Given new "DeleteRumQuotaConfig" request - And request contains "scope_type" parameter with value "application" - And request contains "scope_id" parameter with value "ced16651-97b6-4e67-8590-8caec3af0695" - When the request is sent - Then the response status is 204 No Content - - @skip @team:DataDog/rum-backend - Scenario: Delete a RUM retention quota configuration returns "Not Found" response - Given new "DeleteRumQuotaConfig" request - And request contains "scope_type" parameter with value "application" - And request contains "scope_id" parameter with value "{{ unique }}" - When the request is sent - Then the response status is 404 Not Found - - @skip @team:DataDog/rum-backend - Scenario: Delete a RUM retention quota configuration returns "Not Found" response for an invalid scope_id - Given new "DeleteRumQuotaConfig" request - And request contains "scope_type" parameter with value "application" - And request contains "scope_id" parameter with value "invalid-scope-id" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/rum-backend - Scenario: Get a RUM retention quota configuration returns "Bad Request" response - Given new "GetRumQuotaConfig" request - And request contains "scope_type" parameter from "REPLACE.ME" - And request contains "scope_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @skip @team:DataDog/rum-backend - Scenario: Get a RUM retention quota configuration returns "Not Found" response - Given new "GetRumQuotaConfig" request - And request contains "scope_type" parameter with value "application" - And request contains "scope_id" parameter with value "1d4b9c34-7ac4-423a-91cf-9902d926e9b3" - When the request is sent - Then the response status is 404 Not Found - - @skip @team:DataDog/rum-backend - Scenario: Get a RUM retention quota configuration returns "Not Found" response for an invalid scope_id - Given new "GetRumQuotaConfig" request - And request contains "scope_type" parameter with value "application" - And request contains "scope_id" parameter with value "invalid-scope-id" - When the request is sent - Then the response status is 404 Not Found - - @skip @team:DataDog/rum-backend - Scenario: Get a RUM retention quota configuration returns "OK" response - Given new "GetRumQuotaConfig" request - And request contains "scope_type" parameter with value "application" - And request contains "scope_id" parameter with value "ced16651-97b6-4e67-8590-8caec3af0695" - When the request is sent - Then the response status is 200 OK diff --git a/features/v2/rum_retention_quotas.feature b/features/v2/rum_retention_quotas.feature new file mode 100644 index 000000000000..8f9c1bbe6e44 --- /dev/null +++ b/features/v2/rum_retention_quotas.feature @@ -0,0 +1,84 @@ +@endpoint(rum-retention-quotas) @endpoint(rum-retention-quotas-v2) +Feature: RUM Retention Quotas + Manage RUM retention quota configurations for your organization's RUM + applications. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "RUMRetentionQuotas" API + + @generated @skip @team:DataDog/rum-backend + Scenario: Create or update a RUM retention quota config returns "Bad Request" response + Given new "UpsertRumQuotaConfig" request + And request contains "scope_type" parameter from "REPLACE.ME" + And request contains "scope_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"custom": {"daily_reset_time": "08:00", "daily_reset_timezone": "+09:00", "quota_reached_action": "stop", "session_limit": 1000000, "window_type": "daily"}, "mode": "custom"}, "id": "cd73a516-a481-4af5-8352-9b577465c77b", "type": "rum_quota_config"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: Create or update a RUM retention quota config returns "Not Found" response + Given new "UpsertRumQuotaConfig" request + And request contains "scope_type" parameter from "REPLACE.ME" + And request contains "scope_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"custom": {"daily_reset_time": "08:00", "daily_reset_timezone": "+09:00", "quota_reached_action": "stop", "session_limit": 1000000, "window_type": "daily"}, "mode": "custom"}, "id": "cd73a516-a481-4af5-8352-9b577465c77b", "type": "rum_quota_config"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/rum-backend + Scenario: Create or update a RUM retention quota config returns "OK" response + Given new "UpsertRumQuotaConfig" request + And request contains "scope_type" parameter from "REPLACE.ME" + And request contains "scope_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"custom": {"daily_reset_time": "08:00", "daily_reset_timezone": "+09:00", "quota_reached_action": "stop", "session_limit": 1000000, "window_type": "daily"}, "mode": "custom"}, "id": "cd73a516-a481-4af5-8352-9b577465c77b", "type": "rum_quota_config"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/rum-backend + Scenario: Delete a RUM retention quota configuration returns "Bad Request" response + Given new "DeleteRumQuotaConfig" request + And request contains "scope_type" parameter from "REPLACE.ME" + And request contains "scope_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: Delete a RUM retention quota configuration returns "No Content" response + Given new "DeleteRumQuotaConfig" request + And request contains "scope_type" parameter from "REPLACE.ME" + And request contains "scope_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/rum-backend + Scenario: Delete a RUM retention quota configuration returns "Not Found" response + Given new "DeleteRumQuotaConfig" request + And request contains "scope_type" parameter from "REPLACE.ME" + And request contains "scope_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/rum-backend + Scenario: Get a RUM retention quota configuration returns "Bad Request" response + Given new "GetRumQuotaConfig" request + And request contains "scope_type" parameter from "REPLACE.ME" + And request contains "scope_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: Get a RUM retention quota configuration returns "Not Found" response + Given new "GetRumQuotaConfig" request + And request contains "scope_type" parameter from "REPLACE.ME" + And request contains "scope_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/rum-backend + Scenario: Get a RUM retention quota configuration returns "OK" response + Given new "GetRumQuotaConfig" request + And request contains "scope_type" parameter from "REPLACE.ME" + And request contains "scope_id" parameter from "REPLACE.ME" + 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 b10abaebef67..d74ca348ae81 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -7147,19 +7147,19 @@ } }, "DeleteRumQuotaConfig": { - "tag": "RUM Retention Quota", + "tag": "RUM Retention Quotas", "undo": { "type": "idempotent" } }, "GetRumQuotaConfig": { - "tag": "RUM Retention Quota", + "tag": "RUM Retention Quotas", "undo": { "type": "safe" } }, "UpsertRumQuotaConfig": { - "tag": "RUM Retention Quota", + "tag": "RUM Retention Quotas", "undo": { "type": "idempotent" } diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 105d969ef8bb..026815a0d37c 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -6801,7 +6801,6 @@ def overrides "v2.rum_retention_filter_update_attributes" => "RumRetentionFilterUpdateAttributes", "v2.rum_retention_filter_update_data" => "RumRetentionFilterUpdateData", "v2.rum_retention_filter_update_request" => "RumRetentionFilterUpdateRequest", - "v2.rum_retention_quota_adaptive_config" => "RumRetentionQuotaAdaptiveConfig", "v2.rum_retention_quota_config_attributes" => "RumRetentionQuotaConfigAttributes", "v2.rum_retention_quota_config_data" => "RumRetentionQuotaConfigData", "v2.rum_retention_quota_config_response" => "RumRetentionQuotaConfigResponse", @@ -8837,7 +8836,7 @@ def overrides "v2.rum_replay_sessions_api" => "RumReplaySessionsAPI", "v2.rum_replay_viewership_api" => "RumReplayViewershipAPI", "v2.rum_retention_filters_api" => "RumRetentionFiltersAPI", - "v2.rum_retention_quota_api" => "RUMRetentionQuotaAPI", + "v2.rum_retention_quotas_api" => "RUMRetentionQuotasAPI", "v2.salesforce_integration_api" => "SalesforceIntegrationAPI", "v2.scorecards_api" => "ScorecardsAPI", "v2.seats_api" => "SeatsAPI", diff --git a/lib/datadog_api_client/v2/api/rum_retention_quota_api.rb b/lib/datadog_api_client/v2/api/rum_retention_quotas_api.rb similarity index 89% rename from lib/datadog_api_client/v2/api/rum_retention_quota_api.rb rename to lib/datadog_api_client/v2/api/rum_retention_quotas_api.rb index 65fe397690bd..4909e0216e7e 100644 --- a/lib/datadog_api_client/v2/api/rum_retention_quota_api.rb +++ b/lib/datadog_api_client/v2/api/rum_retention_quotas_api.rb @@ -16,7 +16,7 @@ require 'cgi' module DatadogAPIClient::V2 - class RUMRetentionQuotaAPI + class RUMRetentionQuotasAPI attr_accessor :api_client def initialize(api_client = DatadogAPIClient::APIClient.default) @@ -35,18 +35,18 @@ def delete_rum_quota_config(scope_type, scope_id, opts = {}) # # Delete the RUM retention quota configuration for a given scope. # - # @param scope_type [RumRetentionQuotaScopeType] The type of scope the retention quota configuration applies to. + # @param scope_type [RumRetentionQuotaScopeType] The type of scope the retention quota configuration applies to. `application` is the only supported scope type. # @param scope_id [String] The identifier of the scope the retention quota configuration applies to. For the `application` scope, this is the RUM application ID. # @param opts [Hash] the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def delete_rum_quota_config_with_http_info(scope_type, scope_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: RUMRetentionQuotaAPI.delete_rum_quota_config ...' + @api_client.config.logger.debug 'Calling API: RUMRetentionQuotasAPI.delete_rum_quota_config ...' end # verify the required parameter 'scope_type' is set if @api_client.config.client_side_validation && scope_type.nil? - fail ArgumentError, "Missing the required parameter 'scope_type' when calling RUMRetentionQuotaAPI.delete_rum_quota_config" + fail ArgumentError, "Missing the required parameter 'scope_type' when calling RUMRetentionQuotasAPI.delete_rum_quota_config" end # verify enum value allowable_values = ['application'] @@ -55,7 +55,7 @@ def delete_rum_quota_config_with_http_info(scope_type, scope_id, opts = {}) end # verify the required parameter 'scope_id' is set if @api_client.config.client_side_validation && scope_id.nil? - fail ArgumentError, "Missing the required parameter 'scope_id' when calling RUMRetentionQuotaAPI.delete_rum_quota_config" + fail ArgumentError, "Missing the required parameter 'scope_id' when calling RUMRetentionQuotasAPI.delete_rum_quota_config" end # resource path local_var_path = '/api/v2/rum/config/retention-quota/{scope_type}/{scope_id}'.sub('{scope_type}', CGI.escape(scope_type.to_s).gsub('%2F', '/')).sub('{scope_id}', CGI.escape(scope_id.to_s).gsub('%2F', '/')) @@ -93,7 +93,7 @@ def delete_rum_quota_config_with_http_info(scope_type, scope_id, opts = {}) 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: RUMRetentionQuotaAPI#delete_rum_quota_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: RUMRetentionQuotasAPI#delete_rum_quota_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -110,18 +110,18 @@ def get_rum_quota_config(scope_type, scope_id, opts = {}) # # Get the RUM retention quota configuration for a given scope. # - # @param scope_type [RumRetentionQuotaScopeType] The type of scope the retention quota configuration applies to. + # @param scope_type [RumRetentionQuotaScopeType] The type of scope the retention quota configuration applies to. `application` is the only supported scope type. # @param scope_id [String] The identifier of the scope the retention quota configuration applies to. For the `application` scope, this is the RUM application ID. # @param opts [Hash] the optional parameters # @return [Array<(RumRetentionQuotaConfigResponse, Integer, Hash)>] RumRetentionQuotaConfigResponse data, response status code and response headers def get_rum_quota_config_with_http_info(scope_type, scope_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: RUMRetentionQuotaAPI.get_rum_quota_config ...' + @api_client.config.logger.debug 'Calling API: RUMRetentionQuotasAPI.get_rum_quota_config ...' end # verify the required parameter 'scope_type' is set if @api_client.config.client_side_validation && scope_type.nil? - fail ArgumentError, "Missing the required parameter 'scope_type' when calling RUMRetentionQuotaAPI.get_rum_quota_config" + fail ArgumentError, "Missing the required parameter 'scope_type' when calling RUMRetentionQuotasAPI.get_rum_quota_config" end # verify enum value allowable_values = ['application'] @@ -130,7 +130,7 @@ def get_rum_quota_config_with_http_info(scope_type, scope_id, opts = {}) end # verify the required parameter 'scope_id' is set if @api_client.config.client_side_validation && scope_id.nil? - fail ArgumentError, "Missing the required parameter 'scope_id' when calling RUMRetentionQuotaAPI.get_rum_quota_config" + fail ArgumentError, "Missing the required parameter 'scope_id' when calling RUMRetentionQuotasAPI.get_rum_quota_config" end # resource path local_var_path = '/api/v2/rum/config/retention-quota/{scope_type}/{scope_id}'.sub('{scope_type}', CGI.escape(scope_type.to_s).gsub('%2F', '/')).sub('{scope_id}', CGI.escape(scope_id.to_s).gsub('%2F', '/')) @@ -168,7 +168,7 @@ def get_rum_quota_config_with_http_info(scope_type, scope_id, opts = {}) 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: RUMRetentionQuotaAPI#get_rum_quota_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: RUMRetentionQuotasAPI#get_rum_quota_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -186,7 +186,7 @@ def upsert_rum_quota_config(scope_type, scope_id, body, opts = {}) # Create or update the RUM retention quota configuration for a given scope. # Returns the retention quota configuration object when the request is successful. # - # @param scope_type [RumRetentionQuotaScopeType] The type of scope the retention quota configuration applies to. + # @param scope_type [RumRetentionQuotaScopeType] The type of scope the retention quota configuration applies to. `application` is the only supported scope type. # @param scope_id [String] The identifier of the scope the retention quota configuration applies to. For the `application` scope, this is the RUM application ID. # @param body [RumRetentionQuotaConfigUpdateRequest] The definition of the RUM retention quota configuration to create or update. # @param opts [Hash] the optional parameters @@ -194,11 +194,11 @@ def upsert_rum_quota_config(scope_type, scope_id, body, opts = {}) def upsert_rum_quota_config_with_http_info(scope_type, scope_id, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: RUMRetentionQuotaAPI.upsert_rum_quota_config ...' + @api_client.config.logger.debug 'Calling API: RUMRetentionQuotasAPI.upsert_rum_quota_config ...' end # verify the required parameter 'scope_type' is set if @api_client.config.client_side_validation && scope_type.nil? - fail ArgumentError, "Missing the required parameter 'scope_type' when calling RUMRetentionQuotaAPI.upsert_rum_quota_config" + fail ArgumentError, "Missing the required parameter 'scope_type' when calling RUMRetentionQuotasAPI.upsert_rum_quota_config" end # verify enum value allowable_values = ['application'] @@ -207,11 +207,11 @@ def upsert_rum_quota_config_with_http_info(scope_type, scope_id, body, opts = {} end # verify the required parameter 'scope_id' is set if @api_client.config.client_side_validation && scope_id.nil? - fail ArgumentError, "Missing the required parameter 'scope_id' when calling RUMRetentionQuotaAPI.upsert_rum_quota_config" + fail ArgumentError, "Missing the required parameter 'scope_id' when calling RUMRetentionQuotasAPI.upsert_rum_quota_config" 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 RUMRetentionQuotaAPI.upsert_rum_quota_config" + fail ArgumentError, "Missing the required parameter 'body' when calling RUMRetentionQuotasAPI.upsert_rum_quota_config" end # resource path local_var_path = '/api/v2/rum/config/retention-quota/{scope_type}/{scope_id}'.sub('{scope_type}', CGI.escape(scope_type.to_s).gsub('%2F', '/')).sub('{scope_id}', CGI.escape(scope_id.to_s).gsub('%2F', '/')) @@ -251,7 +251,7 @@ def upsert_rum_quota_config_with_http_info(scope_type, scope_id, body, opts = {} 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: RUMRetentionQuotaAPI#upsert_rum_quota_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: RUMRetentionQuotasAPI#upsert_rum_quota_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end diff --git a/lib/datadog_api_client/v2/models/rum_retention_quota_adaptive_config.rb b/lib/datadog_api_client/v2/models/rum_retention_quota_adaptive_config.rb deleted file mode 100644 index d7f0958dbe5e..000000000000 --- a/lib/datadog_api_client/v2/models/rum_retention_quota_adaptive_config.rb +++ /dev/null @@ -1,131 +0,0 @@ -=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 - # The configuration used when `mode` is `adaptive`. - class RumRetentionQuotaAdaptiveConfig - include BaseGenericModel - - # The maximum fraction of sessions to retain, in the range `(0, 1]`. - attr_reader :max_retention_rate - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'max_retention_rate' => :'max_retention_rate' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'max_retention_rate' => :'Float' - } - 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::RumRetentionQuotaAdaptiveConfig` 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?(:'max_retention_rate') - self.max_retention_rate = attributes[:'max_retention_rate'] - 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 @max_retention_rate.nil? - return false if @max_retention_rate > 1 - return false if @max_retention_rate <= 0 - true - end - - # Custom attribute writer method with validation - # @param max_retention_rate [Object] Object to be assigned - # @!visibility private - def max_retention_rate=(max_retention_rate) - if max_retention_rate.nil? - fail ArgumentError, 'invalid value for "max_retention_rate", max_retention_rate cannot be nil.' - end - if max_retention_rate > 1 - fail ArgumentError, 'invalid value for "max_retention_rate", must be smaller than or equal to 1.' - end - if max_retention_rate <= 0 - fail ArgumentError, 'invalid value for "max_retention_rate", must be greater than 0.' - end - @max_retention_rate = max_retention_rate - 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 && - max_retention_rate == o.max_retention_rate && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [max_retention_rate, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/rum_retention_quota_config_attributes.rb b/lib/datadog_api_client/v2/models/rum_retention_quota_config_attributes.rb index 294836fc157f..04bcd27b7f9e 100644 --- a/lib/datadog_api_client/v2/models/rum_retention_quota_config_attributes.rb +++ b/lib/datadog_api_client/v2/models/rum_retention_quota_config_attributes.rb @@ -21,14 +21,11 @@ module DatadogAPIClient::V2 class RumRetentionQuotaConfigAttributes include BaseGenericModel - # The configuration used when `mode` is `adaptive`. - attr_accessor :adaptive - # The configuration used when `mode` is `custom`. attr_accessor :custom - # The retention quota mode. `custom` enforces a fixed session limit, while - # `adaptive` dynamically adjusts retention. + # The retention quota mode. `custom` enforces a fixed session limit. + # `custom` is the only supported mode. attr_reader :mode # The ID of the organization the retention quota configuration belongs to. @@ -46,7 +43,6 @@ class RumRetentionQuotaConfigAttributes # @!visibility private def self.attribute_map { - :'adaptive' => :'adaptive', :'custom' => :'custom', :'mode' => :'mode', :'org_id' => :'org_id', @@ -59,7 +55,6 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'adaptive' => :'RumRetentionQuotaAdaptiveConfig', :'custom' => :'RumRetentionQuotaCustomConfig', :'mode' => :'RumRetentionQuotaMode', :'org_id' => :'Integer', @@ -86,10 +81,6 @@ def initialize(attributes = {}) end } - if attributes.key?(:'adaptive') - self.adaptive = attributes[:'adaptive'] - end - if attributes.key?(:'custom') self.custom = attributes[:'custom'] end @@ -166,7 +157,6 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - adaptive == o.adaptive && custom == o.custom && mode == o.mode && org_id == o.org_id && @@ -179,7 +169,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [adaptive, custom, mode, org_id, updated_at, updated_by, additional_properties].hash + [custom, mode, org_id, updated_at, updated_by, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/rum_retention_quota_config_update_attributes.rb b/lib/datadog_api_client/v2/models/rum_retention_quota_config_update_attributes.rb index 37f49d47b722..a899d9fd53f0 100644 --- a/lib/datadog_api_client/v2/models/rum_retention_quota_config_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/rum_retention_quota_config_update_attributes.rb @@ -21,14 +21,11 @@ module DatadogAPIClient::V2 class RumRetentionQuotaConfigUpdateAttributes include BaseGenericModel - # The configuration used when `mode` is `adaptive`. - attr_accessor :adaptive - # The configuration used when `mode` is `custom`. attr_accessor :custom - # The retention quota mode. `custom` enforces a fixed session limit, while - # `adaptive` dynamically adjusts retention. + # The retention quota mode. `custom` enforces a fixed session limit. + # `custom` is the only supported mode. attr_reader :mode attr_accessor :additional_properties @@ -37,7 +34,6 @@ class RumRetentionQuotaConfigUpdateAttributes # @!visibility private def self.attribute_map { - :'adaptive' => :'adaptive', :'custom' => :'custom', :'mode' => :'mode' } @@ -47,7 +43,6 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'adaptive' => :'RumRetentionQuotaAdaptiveConfig', :'custom' => :'RumRetentionQuotaCustomConfig', :'mode' => :'RumRetentionQuotaMode' } @@ -71,10 +66,6 @@ def initialize(attributes = {}) end } - if attributes.key?(:'adaptive') - self.adaptive = attributes[:'adaptive'] - end - if attributes.key?(:'custom') self.custom = attributes[:'custom'] end @@ -128,7 +119,6 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - adaptive == o.adaptive && custom == o.custom && mode == o.mode && additional_properties == o.additional_properties @@ -138,7 +128,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [adaptive, custom, mode, additional_properties].hash + [custom, mode, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/rum_retention_quota_mode.rb b/lib/datadog_api_client/v2/models/rum_retention_quota_mode.rb index 8a21aba5f12c..409ac395bd70 100644 --- a/lib/datadog_api_client/v2/models/rum_retention_quota_mode.rb +++ b/lib/datadog_api_client/v2/models/rum_retention_quota_mode.rb @@ -17,12 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # The retention quota mode. `custom` enforces a fixed session limit, while - # `adaptive` dynamically adjusts retention. + # The retention quota mode. `custom` enforces a fixed session limit. + # `custom` is the only supported mode. class RumRetentionQuotaMode include BaseEnumModel CUSTOM = "custom".freeze - ADAPTIVE = "adaptive".freeze end end diff --git a/lib/datadog_api_client/v2/models/rum_retention_quota_scope_type.rb b/lib/datadog_api_client/v2/models/rum_retention_quota_scope_type.rb index 6f14857fb31f..61cb0f436f77 100644 --- a/lib/datadog_api_client/v2/models/rum_retention_quota_scope_type.rb +++ b/lib/datadog_api_client/v2/models/rum_retention_quota_scope_type.rb @@ -18,6 +18,7 @@ module DatadogAPIClient::V2 # The type of scope the retention quota configuration applies to. + # `application` is the only supported scope type. class RumRetentionQuotaScopeType include BaseEnumModel