diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 397d1a8cdca0..2c0f436fe341 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1773,23 +1773,6 @@ components: required: true schema: $ref: "#/components/schemas/RumPermanentRetentionFilterID" - RumRateLimitScopeIDParameter: - description: |- - The identifier of the scope the rate limit configuration applies to. - For the `application` scope, this is the RUM application ID. - in: path - name: scope_id - required: true - schema: - example: cd73a516-a481-4af5-8352-9b577465c77b - type: string - RumRateLimitScopeTypeParameter: - description: The type of scope the rate limit configuration applies to. - in: path - name: scope_type - required: true - schema: - $ref: "#/components/schemas/RumRateLimitScopeType" RumRetentionFilterIDParameter: description: Retention filter ID. in: path @@ -39424,35 +39407,11 @@ components: description: The operating system version. example: "Ubuntu 20.04" type: string - otel_collector_deployment_types: - description: OpenTelemetry collector deployment types associated with the agent. - items: - description: An OpenTelemetry collector deployment type. - type: string - type: array - otel_collector_distributions: - description: OpenTelemetry collector distributions associated with the agent. - items: - description: An OpenTelemetry collector distribution. - type: string - type: array - otel_collector_versions: - description: List of OpenTelemetry collector versions (if applicable). - items: - description: An OpenTelemetry collector version string. - type: string - type: array otel_collectors: description: OpenTelemetry collectors associated with the agent (if applicable). items: $ref: "#/components/schemas/FleetOtelCollector" type: array - otel_resource_attributes: - description: OpenTelemetry resource attributes reported by the agent. - items: - description: An OpenTelemetry resource attribute. - type: string - type: array pod_name: description: Kubernetes pod name (if applicable). type: string @@ -44735,10 +44694,6 @@ components: description: A human-readable description of what the control detects. example: "Identifies API keys that have not been used within your specified time threshold, helping reduce security risks from dormant credentials." type: string - detection_frequency: - description: How often detections are evaluated for the control. - example: "daily" - type: string detection_parameters: $ref: "#/components/schemas/GovernanceControlParametersMap" nullable: true @@ -44808,7 +44763,6 @@ components: - type - priority - detection_parameters - - detection_frequency - mitigation_type - mitigation_parameters - created_at @@ -45167,17 +45121,14 @@ components: - label type: object GovernanceControlSupportedValueArray: - description: The supported values for an enumerated parameter. + description: The supported values for an enumerated parameter. `null` when the parameter is not an enumerated type. items: $ref: "#/components/schemas/GovernanceControlSupportedValue" + nullable: true type: array GovernanceControlUpdateAttributes: description: The attributes of a governance control that can be updated. Only the attributes present in the request are modified. properties: - detection_frequency: - description: How often detections should be evaluated for the control. - example: "daily" - type: string detection_parameters: $ref: "#/components/schemas/GovernanceControlParametersMap" nullable: true @@ -89457,179 +89408,6 @@ components: $ref: "#/components/schemas/RumPermanentRetentionFilterData" type: array type: object - RumRateLimitAdaptiveConfig: - 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 - RumRateLimitConfigAttributes: - description: The RUM rate limit configuration properties. - properties: - adaptive: - $ref: "#/components/schemas/RumRateLimitAdaptiveConfig" - custom: - $ref: "#/components/schemas/RumRateLimitCustomConfig" - mode: - $ref: "#/components/schemas/RumRateLimitMode" - org_id: - description: The ID of the organization the rate limit configuration belongs to. - example: 2 - format: int64 - type: integer - updated_at: - description: The date the rate limit configuration was last updated. - example: "2026-03-04T15:37:54.951447Z" - type: string - updated_by: - description: The handle of the user who last updated the rate limit configuration. - example: test@example.com - type: string - required: - - mode - - org_id - type: object - RumRateLimitConfigData: - description: The RUM rate limit configuration object. - properties: - attributes: - $ref: "#/components/schemas/RumRateLimitConfigAttributes" - id: - description: The identifier of the scope the rate limit configuration applies to. - example: cd73a516-a481-4af5-8352-9b577465c77b - type: string - type: - $ref: "#/components/schemas/RumRateLimitConfigType" - required: - - id - - type - - attributes - type: object - RumRateLimitConfigResponse: - description: The RUM rate limit configuration response. - properties: - data: - $ref: "#/components/schemas/RumRateLimitConfigData" - required: - - data - type: object - RumRateLimitConfigType: - default: rum_rate_limit_config - description: The type of the resource, always `rum_rate_limit_config`. - enum: - - rum_rate_limit_config - example: rum_rate_limit_config - type: string - x-enum-varnames: ["RUM_RATE_LIMIT_CONFIG"] - RumRateLimitConfigUpdateAttributes: - description: The RUM rate limit configuration properties to create or update. - properties: - adaptive: - $ref: "#/components/schemas/RumRateLimitAdaptiveConfig" - custom: - $ref: "#/components/schemas/RumRateLimitCustomConfig" - mode: - $ref: "#/components/schemas/RumRateLimitMode" - required: - - mode - type: object - RumRateLimitConfigUpdateData: - description: The RUM rate limit configuration to create or update. - properties: - attributes: - $ref: "#/components/schemas/RumRateLimitConfigUpdateAttributes" - id: - description: |- - The identifier of the scope the rate limit configuration applies to. - Must match `scope_id` in the path. - example: cd73a516-a481-4af5-8352-9b577465c77b - type: string - type: - $ref: "#/components/schemas/RumRateLimitConfigType" - required: - - id - - type - - attributes - type: object - RumRateLimitConfigUpdateRequest: - description: The body of a request to create or update a RUM rate limit configuration. - properties: - data: - $ref: "#/components/schemas/RumRateLimitConfigUpdateData" - required: - - data - type: object - RumRateLimitCustomConfig: - description: The configuration used when `mode` is `custom`. - properties: - daily_reset_time: - description: The time of day when the daily quota resets, in `HH:MM` 24-hour format. - example: "08:00" - pattern: "^([01]\\d|2[0-3]):[0-5]\\d$" - type: string - daily_reset_timezone: - description: The timezone offset used for the daily reset time, in `±HH:MM` format. - example: "+09:00" - pattern: "^[+-](0\\d|1[0-4]):[0-5]\\d$" - type: string - quota_reached_action: - $ref: "#/components/schemas/RumRateLimitQuotaReachedAction" - session_limit: - description: The maximum number of sessions allowed within the window. - example: 1000000 - format: int64 - minimum: 1 - type: integer - window_type: - $ref: "#/components/schemas/RumRateLimitWindowType" - required: - - window_type - - session_limit - - daily_reset_time - - daily_reset_timezone - - quota_reached_action - type: object - RumRateLimitMode: - description: |- - The rate limit mode. `custom` enforces a fixed session limit, while - `adaptive` dynamically adjusts retention. - enum: - - custom - - adaptive - example: custom - type: string - x-enum-varnames: ["CUSTOM", "ADAPTIVE"] - RumRateLimitQuotaReachedAction: - description: The action to take when the session quota is reached. - enum: - - stop - - slowdown - example: stop - type: string - x-enum-varnames: ["STOP", "SLOWDOWN"] - RumRateLimitScopeType: - default: application - description: The type of scope the rate limit configuration applies to. - enum: - - application - example: application - type: string - x-enum-varnames: ["APPLICATION"] - RumRateLimitWindowType: - description: The window type over which the session limit is enforced. - enum: - - daily - example: daily - type: string - x-enum-varnames: ["DAILY"] RumRetentionFilterAttributes: description: The object describing attributes of a RUM retention filter. properties: @@ -145322,7 +145100,6 @@ paths: created_at: "2024-01-15T09:30:00Z" created_by: "11111111-2222-3333-4444-555555555555" description: "Identifies API keys that have not been used within your specified time threshold, helping reduce security risks from dormant credentials." - detection_frequency: "daily" detection_parameters: api_key_threshold: 30 insights: [] @@ -145352,7 +145129,7 @@ paths: display_name: "Unused API Key Threshold" name: "api_key_threshold" required: false - supported_values: [] + supported_values: type: "integer" type: "Proactive" id: "unused_api_keys" @@ -145422,7 +145199,6 @@ paths: created_at: "2024-01-15T09:30:00Z" created_by: "11111111-2222-3333-4444-555555555555" description: "Identifies API keys that have not been used within your specified time threshold, helping reduce security risks from dormant credentials." - detection_frequency: "daily" detection_parameters: api_key_threshold: 30 insights: [] @@ -145442,7 +145218,7 @@ paths: display_name: "Unused API Key Threshold" name: "api_key_threshold" required: false - supported_values: [] + supported_values: type: "integer" type: "Proactive" id: "unused_api_keys" @@ -145533,7 +145309,6 @@ paths: created_at: "2024-01-15T09:30:00Z" created_by: "11111111-2222-3333-4444-555555555555" description: "Identifies API keys that have not been used within your specified time threshold, helping reduce security risks from dormant credentials." - detection_frequency: "daily" detection_parameters: api_key_threshold: 60 insights: [] @@ -183012,142 +182787,6 @@ paths: tags: - Rum Metrics x-codegen-request-body-name: body - /api/v2/rum/config/rate-limit/{scope_type}/{scope_id}: - delete: - description: Delete the RUM rate limit configuration for a given scope. - operationId: DeleteRumRateLimitConfig - parameters: - - $ref: "#/components/parameters/RumRateLimitScopeTypeParameter" - - $ref: "#/components/parameters/RumRateLimitScopeIDParameter" - responses: - "204": - description: No Content - "400": - $ref: "#/components/responses/BadRequestResponse" - "403": - $ref: "#/components/responses/NotAuthorizedResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - summary: Delete a RUM rate limit configuration - tags: - - Rum Rate Limit - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - get: - description: Get the RUM rate limit configuration for a given scope. - operationId: GetRumRateLimitConfig - parameters: - - $ref: "#/components/parameters/RumRateLimitScopeTypeParameter" - - $ref: "#/components/parameters/RumRateLimitScopeIDParameter" - responses: - "200": - content: - application/json: - examples: - default: - 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 - org_id: 2 - updated_at: "2026-03-04T15:37:54.951447Z" - updated_by: test@example.com - id: cd73a516-a481-4af5-8352-9b577465c77b - type: rum_rate_limit_config - schema: - $ref: "#/components/schemas/RumRateLimitConfigResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "403": - $ref: "#/components/responses/NotAuthorizedResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - summary: Get a RUM rate limit configuration - tags: - - Rum Rate Limit - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - put: - description: |- - Create or update the RUM rate limit configuration for a given scope. - Returns the rate limit configuration object when the request is successful. - operationId: UpdateRumRateLimitConfig - parameters: - - $ref: "#/components/parameters/RumRateLimitScopeTypeParameter" - - $ref: "#/components/parameters/RumRateLimitScopeIDParameter" - requestBody: - content: - application/json: - examples: - default: - 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_rate_limit_config - schema: - $ref: "#/components/schemas/RumRateLimitConfigUpdateRequest" - description: The definition of the RUM rate limit configuration to create or update. - required: true - responses: - "200": - content: - application/json: - examples: - default: - 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 - org_id: 2 - updated_at: "2026-03-04T21:52:53.526022Z" - updated_by: test@example.com - id: cd73a516-a481-4af5-8352-9b577465c77b - type: rum_rate_limit_config - schema: - $ref: "#/components/schemas/RumRateLimitConfigResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "403": - $ref: "#/components/responses/NotAuthorizedResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - summary: Create or update a RUM rate limit configuration - tags: - - Rum Rate Limit - x-codegen-request-body-name: body - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/rum/events: get: description: |- @@ -213567,9 +213206,6 @@ tags: description: Find out more at url: https://docs.datadoghq.com/real_user_monitoring/platform/generate_metrics/ name: Rum Metrics - - description: |- - Manage RUM rate limit configurations for your organization's RUM applications. - name: Rum Rate Limit - description: Manage heatmap snapshots for RUM replay sessions. Create, update, delete, and retrieve snapshots to visualize user interactions on specific views. name: Rum Replay Heatmaps - description: Create and manage playlists of RUM replay sessions. Organize, categorize, and share collections of replay sessions for analysis and collaboration. diff --git a/examples/v2/governance-console/UpdateGovernanceControl.rb b/examples/v2/governance-console/UpdateGovernanceControl.rb index a3b1594161cd..9725781d496c 100644 --- a/examples/v2/governance-console/UpdateGovernanceControl.rb +++ b/examples/v2/governance-console/UpdateGovernanceControl.rb @@ -9,7 +9,6 @@ body = DatadogAPIClient::V2::GovernanceControlUpdateRequest.new({ data: DatadogAPIClient::V2::GovernanceControlUpdateData.new({ attributes: DatadogAPIClient::V2::GovernanceControlUpdateAttributes.new({ - detection_frequency: "daily", mitigation_type: "revoke_api_key", }), type: DatadogAPIClient::V2::GovernanceControlResourceType::GOVERNANCE_CONTROL, diff --git a/examples/v2/rum-rate-limit/DeleteRumRateLimitConfig.rb b/examples/v2/rum-rate-limit/DeleteRumRateLimitConfig.rb deleted file mode 100644 index e28a4b3c89cb..000000000000 --- a/examples/v2/rum-rate-limit/DeleteRumRateLimitConfig.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Delete a RUM rate limit configuration returns "No Content" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.delete_rum_rate_limit_config".to_sym] = true -end -api_instance = DatadogAPIClient::V2::RumRateLimitAPI.new -api_instance.delete_rum_rate_limit_config(RumRateLimitScopeType::APPLICATION, "cd73a516-a481-4af5-8352-9b577465c77b") diff --git a/examples/v2/rum-rate-limit/GetRumRateLimitConfig.rb b/examples/v2/rum-rate-limit/GetRumRateLimitConfig.rb deleted file mode 100644 index 3f0ae8a6ecd4..000000000000 --- a/examples/v2/rum-rate-limit/GetRumRateLimitConfig.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Get a RUM rate limit configuration returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.get_rum_rate_limit_config".to_sym] = true -end -api_instance = DatadogAPIClient::V2::RumRateLimitAPI.new -p api_instance.get_rum_rate_limit_config(RumRateLimitScopeType::APPLICATION, "cd73a516-a481-4af5-8352-9b577465c77b") diff --git a/examples/v2/rum-rate-limit/UpdateRumRateLimitConfig.rb b/examples/v2/rum-rate-limit/UpdateRumRateLimitConfig.rb deleted file mode 100644 index 45986f3207e5..000000000000 --- a/examples/v2/rum-rate-limit/UpdateRumRateLimitConfig.rb +++ /dev/null @@ -1,28 +0,0 @@ -# Create or update a RUM rate limit configuration returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.update_rum_rate_limit_config".to_sym] = true -end -api_instance = DatadogAPIClient::V2::RumRateLimitAPI.new - -body = DatadogAPIClient::V2::RumRateLimitConfigUpdateRequest.new({ - data: DatadogAPIClient::V2::RumRateLimitConfigUpdateData.new({ - attributes: DatadogAPIClient::V2::RumRateLimitConfigUpdateAttributes.new({ - adaptive: DatadogAPIClient::V2::RumRateLimitAdaptiveConfig.new({ - max_retention_rate: 0.5, - }), - custom: DatadogAPIClient::V2::RumRateLimitCustomConfig.new({ - daily_reset_time: "08:00", - daily_reset_timezone: "+09:00", - quota_reached_action: DatadogAPIClient::V2::RumRateLimitQuotaReachedAction::STOP, - session_limit: 1000000, - window_type: DatadogAPIClient::V2::RumRateLimitWindowType::DAILY, - }), - mode: DatadogAPIClient::V2::RumRateLimitMode::CUSTOM, - }), - id: "cd73a516-a481-4af5-8352-9b577465c77b", - type: DatadogAPIClient::V2::RumRateLimitConfigType::RUM_RATE_LIMIT_CONFIG, - }), -}) -p api_instance.update_rum_rate_limit_config(RumRateLimitScopeType::APPLICATION, "cd73a516-a481-4af5-8352-9b577465c77b", body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 18b721d24b12..71f9655b8d0d 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -5414,19 +5414,6 @@ "metric_id" => "String", "body" => "RumMetricUpdateRequest", }, - "v2.DeleteRumRateLimitConfig" => { - "scope_type" => "RumRateLimitScopeType", - "scope_id" => "String", - }, - "v2.GetRumRateLimitConfig" => { - "scope_type" => "RumRateLimitScopeType", - "scope_id" => "String", - }, - "v2.UpdateRumRateLimitConfig" => { - "scope_type" => "RumRateLimitScopeType", - "scope_id" => "String", - "body" => "RumRateLimitConfigUpdateRequest", - }, "v2.CreateRUMOperation" => { "body" => "RUMOperationCreateRequest", }, diff --git a/features/v2/governance_console.feature b/features/v2/governance_console.feature index 075b0f0e4cb3..7db27be44d82 100644 --- a/features/v2/governance_console.feature +++ b/features/v2/governance_console.feature @@ -175,7 +175,7 @@ Feature: Governance Console Given operation "UpdateGovernanceControl" enabled And new "UpdateGovernanceControl" request And request contains "detection_type" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"detection_frequency": "daily", "mitigation_type": "revoke_api_key"}, "type": "governance_control"}} + And body with value {"data": {"attributes": {"mitigation_type": "revoke_api_key"}, "type": "governance_control"}} When the request is sent Then the response status is 400 Bad Request @@ -184,7 +184,7 @@ Feature: Governance Console Given operation "UpdateGovernanceControl" enabled And new "UpdateGovernanceControl" request And request contains "detection_type" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"detection_frequency": "daily", "mitigation_type": "revoke_api_key"}, "type": "governance_control"}} + And body with value {"data": {"attributes": {"mitigation_type": "revoke_api_key"}, "type": "governance_control"}} When the request is sent Then the response status is 404 Not Found @@ -193,7 +193,7 @@ Feature: Governance Console Given operation "UpdateGovernanceControl" enabled And new "UpdateGovernanceControl" request And request contains "detection_type" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"detection_frequency": "daily", "mitigation_type": "revoke_api_key"}, "type": "governance_control"}} + And body with value {"data": {"attributes": {"mitigation_type": "revoke_api_key"}, "type": "governance_control"}} When the request is sent Then the response status is 200 OK diff --git a/features/v2/rum_rate_limit.feature b/features/v2/rum_rate_limit.feature deleted file mode 100644 index 90869ed17829..000000000000 --- a/features/v2/rum_rate_limit.feature +++ /dev/null @@ -1,93 +0,0 @@ -@endpoint(rum-rate-limit) @endpoint(rum-rate-limit-v2) -Feature: Rum Rate Limit - Manage RUM rate limit 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 "RumRateLimit" API - - @generated @skip @team:DataDog/rum-backend - Scenario: Create or update a RUM rate limit configuration returns "Bad Request" response - Given operation "UpdateRumRateLimitConfig" enabled - And new "UpdateRumRateLimitConfig" 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": {"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_rate_limit_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 rate limit configuration returns "Not Found" response - Given operation "UpdateRumRateLimitConfig" enabled - And new "UpdateRumRateLimitConfig" 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": {"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_rate_limit_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 rate limit configuration returns "OK" response - Given operation "UpdateRumRateLimitConfig" enabled - And new "UpdateRumRateLimitConfig" 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": {"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_rate_limit_config"}} - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/rum-backend - Scenario: Delete a RUM rate limit configuration returns "Bad Request" response - Given operation "DeleteRumRateLimitConfig" enabled - And new "DeleteRumRateLimitConfig" 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 rate limit configuration returns "No Content" response - Given operation "DeleteRumRateLimitConfig" enabled - And new "DeleteRumRateLimitConfig" 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 rate limit configuration returns "Not Found" response - Given operation "DeleteRumRateLimitConfig" enabled - And new "DeleteRumRateLimitConfig" 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 rate limit configuration returns "Bad Request" response - Given operation "GetRumRateLimitConfig" enabled - And new "GetRumRateLimitConfig" 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 rate limit configuration returns "Not Found" response - Given operation "GetRumRateLimitConfig" enabled - And new "GetRumRateLimitConfig" 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 rate limit configuration returns "OK" response - Given operation "GetRumRateLimitConfig" enabled - And new "GetRumRateLimitConfig" 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 9903d959ffb8..1060e48a4840 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -7039,24 +7039,6 @@ "type": "idempotent" } }, - "DeleteRumRateLimitConfig": { - "tag": "Rum Rate Limit", - "undo": { - "type": "idempotent" - } - }, - "GetRumRateLimitConfig": { - "tag": "Rum Rate Limit", - "undo": { - "type": "safe" - } - }, - "UpdateRumRateLimitConfig": { - "tag": "Rum Rate Limit", - "undo": { - "type": "idempotent" - } - }, "ListRUMEvents": { "tag": "RUM", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index f1a2c808bb39..0c9c5d481106 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -672,9 +672,6 @@ def initialize "v2.create_rum_config": false, "v2.get_rum_config": false, "v2.update_rum_config": false, - "v2.delete_rum_rate_limit_config": false, - "v2.get_rum_rate_limit_config": false, - "v2.update_rum_rate_limit_config": false, "v2.create_rum_operation": false, "v2.create_rum_operation_strong_link": false, "v2.delete_rum_operation": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 88723a44e31c..1d7d09b79811 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -6586,19 +6586,6 @@ def overrides "v2.rum_query_filter" => "RUMQueryFilter", "v2.rum_query_options" => "RUMQueryOptions", "v2.rum_query_page_options" => "RUMQueryPageOptions", - "v2.rum_rate_limit_adaptive_config" => "RumRateLimitAdaptiveConfig", - "v2.rum_rate_limit_config_attributes" => "RumRateLimitConfigAttributes", - "v2.rum_rate_limit_config_data" => "RumRateLimitConfigData", - "v2.rum_rate_limit_config_response" => "RumRateLimitConfigResponse", - "v2.rum_rate_limit_config_type" => "RumRateLimitConfigType", - "v2.rum_rate_limit_config_update_attributes" => "RumRateLimitConfigUpdateAttributes", - "v2.rum_rate_limit_config_update_data" => "RumRateLimitConfigUpdateData", - "v2.rum_rate_limit_config_update_request" => "RumRateLimitConfigUpdateRequest", - "v2.rum_rate_limit_custom_config" => "RumRateLimitCustomConfig", - "v2.rum_rate_limit_mode" => "RumRateLimitMode", - "v2.rum_rate_limit_quota_reached_action" => "RumRateLimitQuotaReachedAction", - "v2.rum_rate_limit_scope_type" => "RumRateLimitScopeType", - "v2.rum_rate_limit_window_type" => "RumRateLimitWindowType", "v2.rum_response_links" => "RUMResponseLinks", "v2.rum_response_metadata" => "RUMResponseMetadata", "v2.rum_response_page" => "RUMResponsePage", @@ -8614,7 +8601,6 @@ def overrides "v2.rum_insights_api" => "RUMInsightsAPI", "v2.rum_metrics_api" => "RumMetricsAPI", "v2.rum_operations_api" => "RUMOperationsAPI", - "v2.rum_rate_limit_api" => "RumRateLimitAPI", "v2.rum_remote_config_api" => "RUMRemoteConfigAPI", "v2.rum_replay_heatmaps_api" => "RumReplayHeatmapsAPI", "v2.rum_replay_playlists_api" => "RumReplayPlaylistsAPI", diff --git a/lib/datadog_api_client/v2/api/rum_rate_limit_api.rb b/lib/datadog_api_client/v2/api/rum_rate_limit_api.rb deleted file mode 100644 index bd18a5fba3af..000000000000 --- a/lib/datadog_api_client/v2/api/rum_rate_limit_api.rb +++ /dev/null @@ -1,277 +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 'cgi' - -module DatadogAPIClient::V2 - class RumRateLimitAPI - attr_accessor :api_client - - def initialize(api_client = DatadogAPIClient::APIClient.default) - @api_client = api_client - end - - # Delete a RUM rate limit configuration. - # - # @see #delete_rum_rate_limit_config_with_http_info - def delete_rum_rate_limit_config(scope_type, scope_id, opts = {}) - delete_rum_rate_limit_config_with_http_info(scope_type, scope_id, opts) - nil - end - - # Delete a RUM rate limit configuration. - # - # Delete the RUM rate limit configuration for a given scope. - # - # @param scope_type [RumRateLimitScopeType] The type of scope the rate limit configuration applies to. - # @param scope_id [String] The identifier of the scope the rate limit 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_rate_limit_config_with_http_info(scope_type, scope_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.delete_rum_rate_limit_config".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_rum_rate_limit_config") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_rum_rate_limit_config")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: RumRateLimitAPI.delete_rum_rate_limit_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 RumRateLimitAPI.delete_rum_rate_limit_config" - end - # verify enum value - allowable_values = ['application'] - if @api_client.config.client_side_validation && !allowable_values.include?(scope_type) - fail ArgumentError, "invalid value for \"scope_type\", must be one of #{allowable_values}" - 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 RumRateLimitAPI.delete_rum_rate_limit_config" - end - # resource path - local_var_path = '/api/v2/rum/config/rate-limit/{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', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] - - new_options = opts.merge( - :operation => :delete_rum_rate_limit_config, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: RumRateLimitAPI#delete_rum_rate_limit_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get a RUM rate limit configuration. - # - # @see #get_rum_rate_limit_config_with_http_info - def get_rum_rate_limit_config(scope_type, scope_id, opts = {}) - data, _status_code, _headers = get_rum_rate_limit_config_with_http_info(scope_type, scope_id, opts) - data - end - - # Get a RUM rate limit configuration. - # - # Get the RUM rate limit configuration for a given scope. - # - # @param scope_type [RumRateLimitScopeType] The type of scope the rate limit configuration applies to. - # @param scope_id [String] The identifier of the scope the rate limit configuration applies to. For the `application` scope, this is the RUM application ID. - # @param opts [Hash] the optional parameters - # @return [Array<(RumRateLimitConfigResponse, Integer, Hash)>] RumRateLimitConfigResponse data, response status code and response headers - def get_rum_rate_limit_config_with_http_info(scope_type, scope_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.get_rum_rate_limit_config".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_rum_rate_limit_config") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_rum_rate_limit_config")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: RumRateLimitAPI.get_rum_rate_limit_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 RumRateLimitAPI.get_rum_rate_limit_config" - end - # verify enum value - allowable_values = ['application'] - if @api_client.config.client_side_validation && !allowable_values.include?(scope_type) - fail ArgumentError, "invalid value for \"scope_type\", must be one of #{allowable_values}" - 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 RumRateLimitAPI.get_rum_rate_limit_config" - end - # resource path - local_var_path = '/api/v2/rum/config/rate-limit/{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', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'RumRateLimitConfigResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] - - new_options = opts.merge( - :operation => :get_rum_rate_limit_config, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: RumRateLimitAPI#get_rum_rate_limit_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Create or update a RUM rate limit configuration. - # - # @see #update_rum_rate_limit_config_with_http_info - def update_rum_rate_limit_config(scope_type, scope_id, body, opts = {}) - data, _status_code, _headers = update_rum_rate_limit_config_with_http_info(scope_type, scope_id, body, opts) - data - end - - # Create or update a RUM rate limit configuration. - # - # Create or update the RUM rate limit configuration for a given scope. - # Returns the rate limit configuration object when the request is successful. - # - # @param scope_type [RumRateLimitScopeType] The type of scope the rate limit configuration applies to. - # @param scope_id [String] The identifier of the scope the rate limit configuration applies to. For the `application` scope, this is the RUM application ID. - # @param body [RumRateLimitConfigUpdateRequest] The definition of the RUM rate limit configuration to create or update. - # @param opts [Hash] the optional parameters - # @return [Array<(RumRateLimitConfigResponse, Integer, Hash)>] RumRateLimitConfigResponse data, response status code and response headers - def update_rum_rate_limit_config_with_http_info(scope_type, scope_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.update_rum_rate_limit_config".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_rum_rate_limit_config") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_rum_rate_limit_config")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: RumRateLimitAPI.update_rum_rate_limit_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 RumRateLimitAPI.update_rum_rate_limit_config" - end - # verify enum value - allowable_values = ['application'] - if @api_client.config.client_side_validation && !allowable_values.include?(scope_type) - fail ArgumentError, "invalid value for \"scope_type\", must be one of #{allowable_values}" - 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 RumRateLimitAPI.update_rum_rate_limit_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 RumRateLimitAPI.update_rum_rate_limit_config" - end - # resource path - local_var_path = '/api/v2/rum/config/rate-limit/{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', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] || 'RumRateLimitConfigResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] - - new_options = opts.merge( - :operation => :update_rum_rate_limit_config, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: RumRateLimitAPI#update_rum_rate_limit_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/lib/datadog_api_client/v2/models/fleet_agent_info_details_v2.rb b/lib/datadog_api_client/v2/models/fleet_agent_info_details_v2.rb index 2c9597daff82..b71495567746 100644 --- a/lib/datadog_api_client/v2/models/fleet_agent_info_details_v2.rb +++ b/lib/datadog_api_client/v2/models/fleet_agent_info_details_v2.rb @@ -96,21 +96,9 @@ class FleetAgentInfoDetailsV2 # The operating system version. attr_accessor :os_version - # OpenTelemetry collector deployment types associated with the agent. - attr_accessor :otel_collector_deployment_types - - # OpenTelemetry collector distributions associated with the agent. - attr_accessor :otel_collector_distributions - - # List of OpenTelemetry collector versions (if applicable). - attr_accessor :otel_collector_versions - # OpenTelemetry collectors associated with the agent (if applicable). attr_accessor :otel_collectors - # OpenTelemetry resource attributes reported by the agent. - attr_accessor :otel_resource_attributes - # Kubernetes pod name (if applicable). attr_accessor :pod_name @@ -172,11 +160,7 @@ def self.attribute_map :'last_restart_at' => :'last_restart_at', :'os' => :'os', :'os_version' => :'os_version', - :'otel_collector_deployment_types' => :'otel_collector_deployment_types', - :'otel_collector_distributions' => :'otel_collector_distributions', - :'otel_collector_versions' => :'otel_collector_versions', :'otel_collectors' => :'otel_collectors', - :'otel_resource_attributes' => :'otel_resource_attributes', :'pod_name' => :'pod_name', :'preferred_ha_active_agent' => :'preferred_ha_active_agent', :'python_version' => :'python_version', @@ -219,11 +203,7 @@ def self.openapi_types :'last_restart_at' => :'Integer', :'os' => :'String', :'os_version' => :'String', - :'otel_collector_deployment_types' => :'Array', - :'otel_collector_distributions' => :'Array', - :'otel_collector_versions' => :'Array', :'otel_collectors' => :'Array>', - :'otel_resource_attributes' => :'Array', :'pod_name' => :'String', :'preferred_ha_active_agent' => :'String', :'python_version' => :'String', @@ -365,36 +345,12 @@ def initialize(attributes = {}) self.os_version = attributes[:'os_version'] end - if attributes.key?(:'otel_collector_deployment_types') - if (value = attributes[:'otel_collector_deployment_types']).is_a?(Array) - self.otel_collector_deployment_types = value - end - end - - if attributes.key?(:'otel_collector_distributions') - if (value = attributes[:'otel_collector_distributions']).is_a?(Array) - self.otel_collector_distributions = value - end - end - - if attributes.key?(:'otel_collector_versions') - if (value = attributes[:'otel_collector_versions']).is_a?(Array) - self.otel_collector_versions = value - end - end - if attributes.key?(:'otel_collectors') if (value = attributes[:'otel_collectors']).is_a?(Array) self.otel_collectors = value end end - if attributes.key?(:'otel_resource_attributes') - if (value = attributes[:'otel_resource_attributes']).is_a?(Array) - self.otel_resource_attributes = value - end - end - if attributes.key?(:'pod_name') self.pod_name = attributes[:'pod_name'] end @@ -493,11 +449,7 @@ def ==(o) last_restart_at == o.last_restart_at && os == o.os && os_version == o.os_version && - otel_collector_deployment_types == o.otel_collector_deployment_types && - otel_collector_distributions == o.otel_collector_distributions && - otel_collector_versions == o.otel_collector_versions && otel_collectors == o.otel_collectors && - otel_resource_attributes == o.otel_resource_attributes && pod_name == o.pod_name && preferred_ha_active_agent == o.preferred_ha_active_agent && python_version == o.python_version && @@ -515,7 +467,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [active_ha_agent, agent_version, api_key_name, api_key_uuid, cloud_provider, cluster_name, config_id, datadog_agent_key, datadog_data_center, ecs_fargate_cluster_name, ecs_fargate_task_arn, enabled_products, env, first_seen_at, ha_agent_hosts, ha_agent_state, hostname, hostname_aliases, install_method_installer_version, install_method_tool, ip_addresses, is_single_step_instrumentation_enabled, last_restart_at, os, os_version, otel_collector_deployment_types, otel_collector_distributions, otel_collector_versions, otel_collectors, otel_resource_attributes, pod_name, preferred_ha_active_agent, python_version, region, remote_agent_management, remote_config_status, services, support_agent_upgrade, tags, team, additional_properties].hash + [active_ha_agent, agent_version, api_key_name, api_key_uuid, cloud_provider, cluster_name, config_id, datadog_agent_key, datadog_data_center, ecs_fargate_cluster_name, ecs_fargate_task_arn, enabled_products, env, first_seen_at, ha_agent_hosts, ha_agent_state, hostname, hostname_aliases, install_method_installer_version, install_method_tool, ip_addresses, is_single_step_instrumentation_enabled, last_restart_at, os, os_version, otel_collectors, pod_name, preferred_ha_active_agent, python_version, region, remote_agent_management, remote_config_status, services, support_agent_upgrade, tags, team, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/governance_control_attributes.rb b/lib/datadog_api_client/v2/models/governance_control_attributes.rb index 3def91138a69..6e7f9b5ef4d7 100644 --- a/lib/datadog_api_client/v2/models/governance_control_attributes.rb +++ b/lib/datadog_api_client/v2/models/governance_control_attributes.rb @@ -36,9 +36,6 @@ class GovernanceControlAttributes # A human-readable description of what the control detects. attr_reader :description - # How often detections are evaluated for the control. - attr_reader :detection_frequency - # A free-form map of parameter names to their configured values. attr_reader :detection_parameters @@ -92,7 +89,6 @@ def self.attribute_map :'created_at' => :'created_at', :'created_by' => :'created_by', :'description' => :'description', - :'detection_frequency' => :'detection_frequency', :'detection_parameters' => :'detection_parameters', :'insights' => :'insights', :'last_detection_at' => :'last_detection_at', @@ -119,7 +115,6 @@ def self.openapi_types :'created_at' => :'Time', :'created_by' => :'String', :'description' => :'String', - :'detection_frequency' => :'String', :'detection_parameters' => :'Hash', :'insights' => :'Array', :'last_detection_at' => :'Time', @@ -183,10 +178,6 @@ def initialize(attributes = {}) self.description = attributes[:'description'] end - if attributes.key?(:'detection_frequency') - self.detection_frequency = attributes[:'detection_frequency'] - end - if attributes.key?(:'detection_parameters') self.detection_parameters = attributes[:'detection_parameters'] end @@ -259,7 +250,6 @@ def valid? return false if @created_at.nil? return false if @created_by.nil? return false if @description.nil? - return false if @detection_frequency.nil? return false if @detection_parameters.nil? return false if @insights.nil? return false if @mitigated_detections_count.nil? @@ -326,16 +316,6 @@ def description=(description) @description = description end - # Custom attribute writer method with validation - # @param detection_frequency [Object] Object to be assigned - # @!visibility private - def detection_frequency=(detection_frequency) - if detection_frequency.nil? - fail ArgumentError, 'invalid value for "detection_frequency", detection_frequency cannot be nil.' - end - @detection_frequency = detection_frequency - end - # Custom attribute writer method with validation # @param detection_parameters [Object] Object to be assigned # @!visibility private @@ -497,7 +477,6 @@ def ==(o) created_at == o.created_at && created_by == o.created_by && description == o.description && - detection_frequency == o.detection_frequency && detection_parameters == o.detection_parameters && insights == o.insights && last_detection_at == o.last_detection_at && @@ -519,7 +498,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [active_detections_count, category, created_at, created_by, description, detection_frequency, detection_parameters, insights, last_detection_at, mitigated_detections_count, mitigation_parameters, mitigation_type, mitigations, name, priority, product, resource_type, resource_type_display_name, supported_detection_parameters, type, additional_properties].hash + [active_detections_count, category, created_at, created_by, description, detection_parameters, insights, last_detection_at, mitigated_detections_count, mitigation_parameters, mitigation_type, mitigations, name, priority, product, resource_type, resource_type_display_name, supported_detection_parameters, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/governance_control_parameter_definition.rb b/lib/datadog_api_client/v2/models/governance_control_parameter_definition.rb index 8b1d22c2f931..9bed27066ea9 100644 --- a/lib/datadog_api_client/v2/models/governance_control_parameter_definition.rb +++ b/lib/datadog_api_client/v2/models/governance_control_parameter_definition.rb @@ -36,8 +36,8 @@ class GovernanceControlParameterDefinition # Whether the parameter must be provided. attr_reader :required - # The supported values for an enumerated parameter. - attr_reader :supported_values + # The supported values for an enumerated parameter. `null` when the parameter is not an enumerated type. + attr_accessor :supported_values # The type of the parameter, such as `integer`, `string`, `boolean`, `enum`, or `pattern_list`. attr_reader :type @@ -72,6 +72,14 @@ def self.openapi_types } end + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'supported_values', + ]) + end + # Initializes the object # @param attributes [Hash] Model attributes in the form of hash # @!visibility private @@ -130,7 +138,6 @@ def valid? return false if @display_name.nil? return false if @name.nil? return false if @required.nil? - return false if @supported_values.nil? return false if @type.nil? true end @@ -185,16 +192,6 @@ def required=(required) @required = required end - # Custom attribute writer method with validation - # @param supported_values [Object] Object to be assigned - # @!visibility private - def supported_values=(supported_values) - if supported_values.nil? - fail ArgumentError, 'invalid value for "supported_values", supported_values cannot be nil.' - end - @supported_values = supported_values - end - # Custom attribute writer method with validation # @param type [Object] Object to be assigned # @!visibility private diff --git a/lib/datadog_api_client/v2/models/governance_control_update_attributes.rb b/lib/datadog_api_client/v2/models/governance_control_update_attributes.rb index b3644cd23629..6ebc92050de9 100644 --- a/lib/datadog_api_client/v2/models/governance_control_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/governance_control_update_attributes.rb @@ -21,9 +21,6 @@ module DatadogAPIClient::V2 class GovernanceControlUpdateAttributes include BaseGenericModel - # How often detections should be evaluated for the control. - attr_accessor :detection_frequency - # A free-form map of parameter names to their configured values. attr_accessor :detection_parameters @@ -39,7 +36,6 @@ class GovernanceControlUpdateAttributes # @!visibility private def self.attribute_map { - :'detection_frequency' => :'detection_frequency', :'detection_parameters' => :'detection_parameters', :'mitigation_parameters' => :'mitigation_parameters', :'mitigation_type' => :'mitigation_type' @@ -50,7 +46,6 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'detection_frequency' => :'String', :'detection_parameters' => :'Hash', :'mitigation_parameters' => :'Hash', :'mitigation_type' => :'String' @@ -75,10 +70,6 @@ def initialize(attributes = {}) end } - if attributes.key?(:'detection_frequency') - self.detection_frequency = attributes[:'detection_frequency'] - end - if attributes.key?(:'detection_parameters') self.detection_parameters = attributes[:'detection_parameters'] end @@ -118,7 +109,6 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - detection_frequency == o.detection_frequency && detection_parameters == o.detection_parameters && mitigation_parameters == o.mitigation_parameters && mitigation_type == o.mitigation_type && @@ -129,7 +119,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [detection_frequency, detection_parameters, mitigation_parameters, mitigation_type, additional_properties].hash + [detection_parameters, mitigation_parameters, mitigation_type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/rum_rate_limit_adaptive_config.rb b/lib/datadog_api_client/v2/models/rum_rate_limit_adaptive_config.rb deleted file mode 100644 index 8f4926708947..000000000000 --- a/lib/datadog_api_client/v2/models/rum_rate_limit_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 RumRateLimitAdaptiveConfig - 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::RumRateLimitAdaptiveConfig` 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_rate_limit_config_attributes.rb b/lib/datadog_api_client/v2/models/rum_rate_limit_config_attributes.rb deleted file mode 100644 index f38f30239bba..000000000000 --- a/lib/datadog_api_client/v2/models/rum_rate_limit_config_attributes.rb +++ /dev/null @@ -1,185 +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 RUM rate limit configuration properties. - class RumRateLimitConfigAttributes - include BaseGenericModel - - # The configuration used when `mode` is `adaptive`. - attr_accessor :adaptive - - # The configuration used when `mode` is `custom`. - attr_accessor :custom - - # The rate limit mode. `custom` enforces a fixed session limit, while - # `adaptive` dynamically adjusts retention. - attr_reader :mode - - # The ID of the organization the rate limit configuration belongs to. - attr_reader :org_id - - # The date the rate limit configuration was last updated. - attr_accessor :updated_at - - # The handle of the user who last updated the rate limit configuration. - attr_accessor :updated_by - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'adaptive' => :'adaptive', - :'custom' => :'custom', - :'mode' => :'mode', - :'org_id' => :'org_id', - :'updated_at' => :'updated_at', - :'updated_by' => :'updated_by' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'adaptive' => :'RumRateLimitAdaptiveConfig', - :'custom' => :'RumRateLimitCustomConfig', - :'mode' => :'RumRateLimitMode', - :'org_id' => :'Integer', - :'updated_at' => :'String', - :'updated_by' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RumRateLimitConfigAttributes` 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?(:'adaptive') - self.adaptive = attributes[:'adaptive'] - end - - if attributes.key?(:'custom') - self.custom = attributes[:'custom'] - end - - if attributes.key?(:'mode') - self.mode = attributes[:'mode'] - end - - if attributes.key?(:'org_id') - self.org_id = attributes[:'org_id'] - end - - if attributes.key?(:'updated_at') - self.updated_at = attributes[:'updated_at'] - end - - if attributes.key?(:'updated_by') - self.updated_by = attributes[:'updated_by'] - 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 @mode.nil? - return false if @org_id.nil? - true - end - - # Custom attribute writer method with validation - # @param mode [Object] Object to be assigned - # @!visibility private - def mode=(mode) - if mode.nil? - fail ArgumentError, 'invalid value for "mode", mode cannot be nil.' - end - @mode = mode - end - - # Custom attribute writer method with validation - # @param org_id [Object] Object to be assigned - # @!visibility private - def org_id=(org_id) - if org_id.nil? - fail ArgumentError, 'invalid value for "org_id", org_id cannot be nil.' - end - @org_id = org_id - 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 && - adaptive == o.adaptive && - custom == o.custom && - mode == o.mode && - org_id == o.org_id && - updated_at == o.updated_at && - updated_by == o.updated_by && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [adaptive, custom, mode, org_id, updated_at, updated_by, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/rum_rate_limit_config_data.rb b/lib/datadog_api_client/v2/models/rum_rate_limit_config_data.rb deleted file mode 100644 index 519fee8ca879..000000000000 --- a/lib/datadog_api_client/v2/models/rum_rate_limit_config_data.rb +++ /dev/null @@ -1,165 +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 RUM rate limit configuration object. - class RumRateLimitConfigData - include BaseGenericModel - - # The RUM rate limit configuration properties. - attr_reader :attributes - - # The identifier of the scope the rate limit configuration applies to. - attr_reader :id - - # The type of the resource, always `rum_rate_limit_config`. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'id' => :'id', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'RumRateLimitConfigAttributes', - :'id' => :'String', - :'type' => :'RumRateLimitConfigType' - } - 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::RumRateLimitConfigData` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @attributes.nil? - return false if @id.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param id [Object] Object to be assigned - # @!visibility private - def id=(id) - if id.nil? - fail ArgumentError, 'invalid value for "id", id cannot be nil.' - end - @id = id - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - id == o.id && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, id, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/rum_rate_limit_config_response.rb b/lib/datadog_api_client/v2/models/rum_rate_limit_config_response.rb deleted file mode 100644 index 491c626ae168..000000000000 --- a/lib/datadog_api_client/v2/models/rum_rate_limit_config_response.rb +++ /dev/null @@ -1,123 +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 RUM rate limit configuration response. - class RumRateLimitConfigResponse - include BaseGenericModel - - # The RUM rate limit configuration object. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'RumRateLimitConfigData' - } - 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::RumRateLimitConfigResponse` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/rum_rate_limit_config_type.rb b/lib/datadog_api_client/v2/models/rum_rate_limit_config_type.rb deleted file mode 100644 index 5a8f50118fe5..000000000000 --- a/lib/datadog_api_client/v2/models/rum_rate_limit_config_type.rb +++ /dev/null @@ -1,26 +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 type of the resource, always `rum_rate_limit_config`. - class RumRateLimitConfigType - include BaseEnumModel - - RUM_RATE_LIMIT_CONFIG = "rum_rate_limit_config".freeze - end -end diff --git a/lib/datadog_api_client/v2/models/rum_rate_limit_config_update_attributes.rb b/lib/datadog_api_client/v2/models/rum_rate_limit_config_update_attributes.rb deleted file mode 100644 index 37e6e4647d23..000000000000 --- a/lib/datadog_api_client/v2/models/rum_rate_limit_config_update_attributes.rb +++ /dev/null @@ -1,144 +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 RUM rate limit configuration properties to create or update. - class RumRateLimitConfigUpdateAttributes - include BaseGenericModel - - # The configuration used when `mode` is `adaptive`. - attr_accessor :adaptive - - # The configuration used when `mode` is `custom`. - attr_accessor :custom - - # The rate limit mode. `custom` enforces a fixed session limit, while - # `adaptive` dynamically adjusts retention. - attr_reader :mode - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'adaptive' => :'adaptive', - :'custom' => :'custom', - :'mode' => :'mode' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'adaptive' => :'RumRateLimitAdaptiveConfig', - :'custom' => :'RumRateLimitCustomConfig', - :'mode' => :'RumRateLimitMode' - } - 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::RumRateLimitConfigUpdateAttributes` 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?(:'adaptive') - self.adaptive = attributes[:'adaptive'] - end - - if attributes.key?(:'custom') - self.custom = attributes[:'custom'] - end - - if attributes.key?(:'mode') - self.mode = attributes[:'mode'] - 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 @mode.nil? - true - end - - # Custom attribute writer method with validation - # @param mode [Object] Object to be assigned - # @!visibility private - def mode=(mode) - if mode.nil? - fail ArgumentError, 'invalid value for "mode", mode cannot be nil.' - end - @mode = mode - 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 && - adaptive == o.adaptive && - custom == o.custom && - mode == o.mode && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [adaptive, custom, mode, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/rum_rate_limit_config_update_data.rb b/lib/datadog_api_client/v2/models/rum_rate_limit_config_update_data.rb deleted file mode 100644 index e28f2817f63a..000000000000 --- a/lib/datadog_api_client/v2/models/rum_rate_limit_config_update_data.rb +++ /dev/null @@ -1,166 +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 RUM rate limit configuration to create or update. - class RumRateLimitConfigUpdateData - include BaseGenericModel - - # The RUM rate limit configuration properties to create or update. - attr_reader :attributes - - # The identifier of the scope the rate limit configuration applies to. - # Must match `scope_id` in the path. - attr_reader :id - - # The type of the resource, always `rum_rate_limit_config`. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'id' => :'id', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'RumRateLimitConfigUpdateAttributes', - :'id' => :'String', - :'type' => :'RumRateLimitConfigType' - } - 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::RumRateLimitConfigUpdateData` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @attributes.nil? - return false if @id.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param id [Object] Object to be assigned - # @!visibility private - def id=(id) - if id.nil? - fail ArgumentError, 'invalid value for "id", id cannot be nil.' - end - @id = id - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - id == o.id && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, id, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/rum_rate_limit_config_update_request.rb b/lib/datadog_api_client/v2/models/rum_rate_limit_config_update_request.rb deleted file mode 100644 index a85f60f7a1fd..000000000000 --- a/lib/datadog_api_client/v2/models/rum_rate_limit_config_update_request.rb +++ /dev/null @@ -1,123 +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 body of a request to create or update a RUM rate limit configuration. - class RumRateLimitConfigUpdateRequest - include BaseGenericModel - - # The RUM rate limit configuration to create or update. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'RumRateLimitConfigUpdateData' - } - 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::RumRateLimitConfigUpdateRequest` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/rum_rate_limit_custom_config.rb b/lib/datadog_api_client/v2/models/rum_rate_limit_custom_config.rb deleted file mode 100644 index 9b3e48d73fdc..000000000000 --- a/lib/datadog_api_client/v2/models/rum_rate_limit_custom_config.rb +++ /dev/null @@ -1,223 +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 `custom`. - class RumRateLimitCustomConfig - include BaseGenericModel - - # The time of day when the daily quota resets, in `HH:MM` 24-hour format. - attr_reader :daily_reset_time - - # The timezone offset used for the daily reset time, in `±HH:MM` format. - attr_reader :daily_reset_timezone - - # The action to take when the session quota is reached. - attr_reader :quota_reached_action - - # The maximum number of sessions allowed within the window. - attr_reader :session_limit - - # The window type over which the session limit is enforced. - attr_reader :window_type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'daily_reset_time' => :'daily_reset_time', - :'daily_reset_timezone' => :'daily_reset_timezone', - :'quota_reached_action' => :'quota_reached_action', - :'session_limit' => :'session_limit', - :'window_type' => :'window_type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'daily_reset_time' => :'String', - :'daily_reset_timezone' => :'String', - :'quota_reached_action' => :'RumRateLimitQuotaReachedAction', - :'session_limit' => :'Integer', - :'window_type' => :'RumRateLimitWindowType' - } - 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::RumRateLimitCustomConfig` 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?(:'daily_reset_time') - self.daily_reset_time = attributes[:'daily_reset_time'] - end - - if attributes.key?(:'daily_reset_timezone') - self.daily_reset_timezone = attributes[:'daily_reset_timezone'] - end - - if attributes.key?(:'quota_reached_action') - self.quota_reached_action = attributes[:'quota_reached_action'] - end - - if attributes.key?(:'session_limit') - self.session_limit = attributes[:'session_limit'] - end - - if attributes.key?(:'window_type') - self.window_type = attributes[:'window_type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @daily_reset_time.nil? - pattern = Regexp.new(/^([01]\d|2[0-3]):[0-5]\d$/) - return false if @daily_reset_time !~ pattern - return false if @daily_reset_timezone.nil? - pattern = Regexp.new(/^[+-](0\d|1[0-4]):[0-5]\d$/) - return false if @daily_reset_timezone !~ pattern - return false if @quota_reached_action.nil? - return false if @session_limit.nil? - return false if @session_limit < 1 - return false if @window_type.nil? - true - end - - # Custom attribute writer method with validation - # @param daily_reset_time [Object] Object to be assigned - # @!visibility private - def daily_reset_time=(daily_reset_time) - if daily_reset_time.nil? - fail ArgumentError, 'invalid value for "daily_reset_time", daily_reset_time cannot be nil.' - end - pattern = Regexp.new(/^([01]\d|2[0-3]):[0-5]\d$/) - if daily_reset_time !~ pattern - fail ArgumentError, "invalid value for \"daily_reset_time\", must conform to the pattern #{pattern}." - end - @daily_reset_time = daily_reset_time - end - - # Custom attribute writer method with validation - # @param daily_reset_timezone [Object] Object to be assigned - # @!visibility private - def daily_reset_timezone=(daily_reset_timezone) - if daily_reset_timezone.nil? - fail ArgumentError, 'invalid value for "daily_reset_timezone", daily_reset_timezone cannot be nil.' - end - pattern = Regexp.new(/^[+-](0\d|1[0-4]):[0-5]\d$/) - if daily_reset_timezone !~ pattern - fail ArgumentError, "invalid value for \"daily_reset_timezone\", must conform to the pattern #{pattern}." - end - @daily_reset_timezone = daily_reset_timezone - end - - # Custom attribute writer method with validation - # @param quota_reached_action [Object] Object to be assigned - # @!visibility private - def quota_reached_action=(quota_reached_action) - if quota_reached_action.nil? - fail ArgumentError, 'invalid value for "quota_reached_action", quota_reached_action cannot be nil.' - end - @quota_reached_action = quota_reached_action - end - - # Custom attribute writer method with validation - # @param session_limit [Object] Object to be assigned - # @!visibility private - def session_limit=(session_limit) - if session_limit.nil? - fail ArgumentError, 'invalid value for "session_limit", session_limit cannot be nil.' - end - if session_limit < 1 - fail ArgumentError, 'invalid value for "session_limit", must be greater than or equal to 1.' - end - @session_limit = session_limit - end - - # Custom attribute writer method with validation - # @param window_type [Object] Object to be assigned - # @!visibility private - def window_type=(window_type) - if window_type.nil? - fail ArgumentError, 'invalid value for "window_type", window_type cannot be nil.' - end - @window_type = window_type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - daily_reset_time == o.daily_reset_time && - daily_reset_timezone == o.daily_reset_timezone && - quota_reached_action == o.quota_reached_action && - session_limit == o.session_limit && - window_type == o.window_type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [daily_reset_time, daily_reset_timezone, quota_reached_action, session_limit, window_type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/rum_rate_limit_mode.rb b/lib/datadog_api_client/v2/models/rum_rate_limit_mode.rb deleted file mode 100644 index 50c41f38e0e6..000000000000 --- a/lib/datadog_api_client/v2/models/rum_rate_limit_mode.rb +++ /dev/null @@ -1,28 +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 rate limit mode. `custom` enforces a fixed session limit, while - # `adaptive` dynamically adjusts retention. - class RumRateLimitMode - include BaseEnumModel - - CUSTOM = "custom".freeze - ADAPTIVE = "adaptive".freeze - end -end diff --git a/lib/datadog_api_client/v2/models/rum_rate_limit_quota_reached_action.rb b/lib/datadog_api_client/v2/models/rum_rate_limit_quota_reached_action.rb deleted file mode 100644 index 54a606998cce..000000000000 --- a/lib/datadog_api_client/v2/models/rum_rate_limit_quota_reached_action.rb +++ /dev/null @@ -1,27 +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 action to take when the session quota is reached. - class RumRateLimitQuotaReachedAction - include BaseEnumModel - - STOP = "stop".freeze - SLOWDOWN = "slowdown".freeze - end -end diff --git a/lib/datadog_api_client/v2/models/rum_rate_limit_scope_type.rb b/lib/datadog_api_client/v2/models/rum_rate_limit_scope_type.rb deleted file mode 100644 index 518286948539..000000000000 --- a/lib/datadog_api_client/v2/models/rum_rate_limit_scope_type.rb +++ /dev/null @@ -1,26 +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 type of scope the rate limit configuration applies to. - class RumRateLimitScopeType - include BaseEnumModel - - APPLICATION = "application".freeze - end -end diff --git a/lib/datadog_api_client/v2/models/rum_rate_limit_window_type.rb b/lib/datadog_api_client/v2/models/rum_rate_limit_window_type.rb deleted file mode 100644 index 4348d507068f..000000000000 --- a/lib/datadog_api_client/v2/models/rum_rate_limit_window_type.rb +++ /dev/null @@ -1,26 +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 window type over which the session limit is enforced. - class RumRateLimitWindowType - include BaseEnumModel - - DAILY = "daily".freeze - end -end