From 8a713d2d91205b774d08a1642a79bd87381c6430 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 29 Oct 2026 15:34:29 +0000 Subject: [PATCH] Regenerate client from commit 94e6018 of spec repo --- .generator/schemas/v2/openapi.yaml | 308 ------------------ .../CreateBulkTagsMetricsConfiguration.rb | 27 -- .../DeleteBulkTagsMetricsConfiguration.rb | 21 -- features/scenarios_model_mapping.rb | 6 - features/v2/metrics.feature | 49 --- features/v2/undo.json | 19 -- generated-test/test-runner-data/manifest.json | 7 - ...ple-metrics-returns-accepted-response.json | 40 --- .../test-server-data/v2/metrics.json | 130 -------- lib/datadog_api_client/inflector.rb | 10 - lib/datadog_api_client/v2/api/metrics_api.rb | 153 --------- .../models/metric_bulk_configure_tags_type.rb | 26 -- .../models/metric_bulk_tag_config_create.rb | 154 --------- ...etric_bulk_tag_config_create_attributes.rb | 180 ---------- .../metric_bulk_tag_config_create_request.rb | 123 ------- .../models/metric_bulk_tag_config_delete.rb | 154 --------- ...etric_bulk_tag_config_delete_attributes.rb | 107 ------ .../metric_bulk_tag_config_delete_request.rb | 123 ------- .../models/metric_bulk_tag_config_response.rb | 106 ------ .../models/metric_bulk_tag_config_status.rb | 155 --------- ...etric_bulk_tag_config_status_attributes.rb | 140 -------- 21 files changed, 2038 deletions(-) delete mode 100644 examples/v2/metrics/CreateBulkTagsMetricsConfiguration.rb delete mode 100644 examples/v2/metrics/DeleteBulkTagsMetricsConfiguration.rb delete mode 100644 generated-test/test-runner-data/v2/metrics/configure-tags-for-multiple-metrics-returns-accepted-response.json delete mode 100644 lib/datadog_api_client/v2/models/metric_bulk_configure_tags_type.rb delete mode 100644 lib/datadog_api_client/v2/models/metric_bulk_tag_config_create.rb delete mode 100644 lib/datadog_api_client/v2/models/metric_bulk_tag_config_create_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/metric_bulk_tag_config_create_request.rb delete mode 100644 lib/datadog_api_client/v2/models/metric_bulk_tag_config_delete.rb delete mode 100644 lib/datadog_api_client/v2/models/metric_bulk_tag_config_delete_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/metric_bulk_tag_config_delete_request.rb delete mode 100644 lib/datadog_api_client/v2/models/metric_bulk_tag_config_response.rb delete mode 100644 lib/datadog_api_client/v2/models/metric_bulk_tag_config_status.rb delete mode 100644 lib/datadog_api_client/v2/models/metric_bulk_tag_config_status_attributes.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index f5dd9090d398..5ea08de286e7 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -80103,153 +80103,6 @@ components: $ref: "#/components/schemas/MetricAssetResponseIncluded" type: array type: object - MetricBulkConfigureTagsType: - default: metric_bulk_configure_tags - description: The metric bulk configure tags resource. - enum: - - metric_bulk_configure_tags - example: metric_bulk_configure_tags - type: string - x-enum-varnames: - - BULK_MANAGE_TAGS - MetricBulkTagConfigCreate: - description: Request object to bulk configure tags for metrics matching the given prefix. - properties: - attributes: - $ref: "#/components/schemas/MetricBulkTagConfigCreateAttributes" - id: - $ref: "#/components/schemas/MetricBulkTagConfigNamePrefix" - type: - $ref: "#/components/schemas/MetricBulkConfigureTagsType" - required: - - id - - type - type: object - MetricBulkTagConfigCreateAttributes: - description: Optional parameters for bulk creating metric tag configurations. - properties: - emails: - $ref: "#/components/schemas/MetricBulkTagConfigEmailList" - exclude_tags_mode: - description: |- - When set to true, the configuration will exclude the configured tags and include any other submitted tags. - When set to false, the configuration will include the configured tags and exclude any other submitted tags. - Defaults to false. - type: boolean - include_actively_queried_tags_window: - description: |- - When provided, all tags that have been actively queried are - configured (and, therefore, remain queryable) for each metric that - matches the given prefix. Minimum value is 1 second, and maximum - value is 7,776,000 seconds (90 days). - format: double - maximum: 7776000 - minimum: 1 - type: number - override_existing_configurations: - description: |- - When set to true, the configuration overrides any existing - configurations for the given metric with the new set of tags in this - configuration request. If false, old configurations are kept and - are merged with the set of tags in this configuration request. - Defaults to true. - type: boolean - tags: - $ref: "#/components/schemas/MetricBulkTagConfigTagNameList" - type: object - MetricBulkTagConfigCreateRequest: - description: Wrapper object for a single bulk tag configuration request. - properties: - data: - $ref: "#/components/schemas/MetricBulkTagConfigCreate" - required: - - data - type: object - MetricBulkTagConfigDelete: - description: Request object to bulk delete all tag configurations for metrics matching the given prefix. - properties: - attributes: - $ref: "#/components/schemas/MetricBulkTagConfigDeleteAttributes" - id: - $ref: "#/components/schemas/MetricBulkTagConfigNamePrefix" - type: - $ref: "#/components/schemas/MetricBulkConfigureTagsType" - required: - - id - - type - type: object - MetricBulkTagConfigDeleteAttributes: - description: Optional parameters for bulk deleting metric tag configurations. - properties: - emails: - $ref: "#/components/schemas/MetricBulkTagConfigEmailList" - type: object - MetricBulkTagConfigDeleteRequest: - description: Wrapper object for a single bulk tag deletion request. - properties: - data: - $ref: "#/components/schemas/MetricBulkTagConfigDelete" - required: - - data - type: object - MetricBulkTagConfigEmailList: - description: A list of account emails to notify when the configuration is applied. - example: ["sue@example.com", "bob@example.com"] - items: - description: An email address. - type: string - type: array - MetricBulkTagConfigNamePrefix: - description: A text prefix to match against metric names. - example: "kafka.lag" - type: string - MetricBulkTagConfigResponse: - description: Wrapper for a single bulk tag configuration status response. - properties: - data: - $ref: "#/components/schemas/MetricBulkTagConfigStatus" - type: object - MetricBulkTagConfigStatus: - description: |- - The status of a request to bulk configure metric tags. - It contains the fields from the original request for reference. - properties: - attributes: - $ref: "#/components/schemas/MetricBulkTagConfigStatusAttributes" - id: - $ref: "#/components/schemas/MetricBulkTagConfigNamePrefix" - type: - $ref: "#/components/schemas/MetricBulkConfigureTagsType" - required: - - id - - type - type: object - MetricBulkTagConfigStatusAttributes: - description: Optional attributes for the status of a bulk tag configuration request. - properties: - emails: - $ref: "#/components/schemas/MetricBulkTagConfigEmailList" - exclude_tags_mode: - description: |- - When set to true, the configuration will exclude the configured tags and include any other submitted tags. - When set to false, the configuration will include the configured tags and exclude any other submitted tags. - type: boolean - status: - description: The status of the request. - example: "Accepted" - type: string - tags: - $ref: "#/components/schemas/MetricBulkTagConfigTagNameList" - type: object - MetricBulkTagConfigTagNameList: - description: A list of tag names to apply to the configuration. - example: ["host", "pod_name", "is_shadow"] - items: - description: A metric tag name. - maxLength: 200 - pattern: ^[A-Za-z][A-Za-z0-9\.\-\_:\/]*$ - type: string - type: array MetricContentEncoding: default: deflate description: HTTP header used to compress the media-type. @@ -202025,167 +201878,6 @@ paths: operator: OR permissions: - metrics_read - /api/v2/metrics/config/bulk-tags: - delete: - deprecated: true - description: |- - **Note**: This endpoint is deprecated. Use [Tag Indexing Rules](/api/latest/metrics/#create-a-tag-indexing-rule) (`POST /api/v2/metrics/tag-indexing-rules`) instead. - - Delete all custom lists of queryable tag keys for a set of existing count, gauge, rate, and distribution metrics. - Metrics are selected by passing a metric name prefix. - Results can be sent to a set of account email addresses, just like the same operation in the Datadog web app. - Can only be used with application keys of users with the `Manage Tags for Metrics` permission. - operationId: DeleteBulkTagsMetricsConfiguration - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - emails: - - sue@example.com - - bob@example.com - id: kafka.lag - type: metric_bulk_configure_tags - schema: - $ref: "#/components/schemas/MetricBulkTagConfigDeleteRequest" - required: true - responses: - "202": - content: - application/json: - examples: - default: - value: - data: - attributes: - emails: - - test@example.com - status: Accepted - id: kafka.lag - type: metric_bulk_configure_tags - schema: - $ref: "#/components/schemas/MetricBulkTagConfigResponse" - description: Accepted - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Bad Request - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Forbidden - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Not Found - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Too Many Requests - summary: Delete tags for multiple metrics - tags: - - Metrics - x-codegen-request-body-name: body - "x-permission": - operator: OR - permissions: - - metric_tags_write - x-sunset: "2026-11-01" - post: - deprecated: true - description: |- - **Note**: This endpoint is deprecated. Use [Tag Indexing Rules](/api/latest/metrics/#create-a-tag-indexing-rule) (`POST /api/v2/metrics/tag-indexing-rules`) instead. - - Create and define a list of queryable tag keys for a set of existing count, gauge, rate, and distribution metrics. - Metrics are selected by passing a metric name prefix. Use the Delete method of this API path to remove tag configurations. - Results can be sent to a set of account email addresses, just like the same operation in the Datadog web app. - If multiple calls include the same metric, the last configuration applied (not by submit order) is used, do not - expect deterministic ordering of concurrent calls. The `exclude_tags_mode` value will set all metrics that match the prefix to - the same exclusion state, metric tag configurations do not support mixed inclusion and exclusion for tags on the same metric. - Can only be used with application keys of users with the `Manage Tags for Metrics` permission. - operationId: CreateBulkTagsMetricsConfiguration - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - emails: - - sue@example.com - - bob@example.com - tags: - - host - - pod_name - - is_shadow - id: kafka.lag - type: metric_bulk_configure_tags - schema: - $ref: "#/components/schemas/MetricBulkTagConfigCreateRequest" - required: true - responses: - "202": - content: - application/json: - examples: - default: - value: - data: - attributes: - emails: - - test@example.com - tags: - - host - id: kafka.lag - type: metric_bulk_configure_tags - schema: - $ref: "#/components/schemas/MetricBulkTagConfigResponse" - description: Accepted - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Bad Request - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Forbidden - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Not Found - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Too Many Requests - summary: Configure tags for multiple metrics - tags: - - Metrics - x-codegen-request-body-name: body - "x-permission": - operator: OR - permissions: - - metric_tags_write - x-sunset: "2026-11-01" /api/v2/metrics/derived-metrics: post: description: |- diff --git a/examples/v2/metrics/CreateBulkTagsMetricsConfiguration.rb b/examples/v2/metrics/CreateBulkTagsMetricsConfiguration.rb deleted file mode 100644 index e082bff8854e..000000000000 --- a/examples/v2/metrics/CreateBulkTagsMetricsConfiguration.rb +++ /dev/null @@ -1,27 +0,0 @@ -# Configure tags for multiple metrics returns "Accepted" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.access_token = ENV["DD_BEARER_TOKEN"] -end -api_instance = DatadogAPIClient::V2::MetricsAPI.new - -# there is a valid "user" in the system -USER_DATA_ATTRIBUTES_EMAIL = ENV["USER_DATA_ATTRIBUTES_EMAIL"] - -body = DatadogAPIClient::V2::MetricBulkTagConfigCreateRequest.new({ - data: DatadogAPIClient::V2::MetricBulkTagConfigCreate.new({ - attributes: DatadogAPIClient::V2::MetricBulkTagConfigCreateAttributes.new({ - emails: [ - USER_DATA_ATTRIBUTES_EMAIL, - ], - tags: [ - "test", - "examplemetric", - ], - }), - id: "system.load.1", - type: DatadogAPIClient::V2::MetricBulkConfigureTagsType::BULK_MANAGE_TAGS, - }), -}) -p api_instance.create_bulk_tags_metrics_configuration(body) diff --git a/examples/v2/metrics/DeleteBulkTagsMetricsConfiguration.rb b/examples/v2/metrics/DeleteBulkTagsMetricsConfiguration.rb deleted file mode 100644 index 927ecc0d4774..000000000000 --- a/examples/v2/metrics/DeleteBulkTagsMetricsConfiguration.rb +++ /dev/null @@ -1,21 +0,0 @@ -# Delete tags for multiple metrics returns "Accepted" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.access_token = ENV["DD_BEARER_TOKEN"] -end -api_instance = DatadogAPIClient::V2::MetricsAPI.new - -body = DatadogAPIClient::V2::MetricBulkTagConfigDeleteRequest.new({ - data: DatadogAPIClient::V2::MetricBulkTagConfigDelete.new({ - attributes: DatadogAPIClient::V2::MetricBulkTagConfigDeleteAttributes.new({ - emails: [ - "sue@example.com", - "bob@example.com", - ], - }), - id: "kafka.lag", - type: DatadogAPIClient::V2::MetricBulkConfigureTagsType::BULK_MANAGE_TAGS, - }), -}) -p api_instance.delete_bulk_tags_metrics_configuration(body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 667752b60e29..c4f13c3244c7 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -5011,12 +5011,6 @@ "page_size" => "Integer", "page_cursor" => "String", }, - "v2.DeleteBulkTagsMetricsConfiguration" => { - "body" => "MetricBulkTagConfigDeleteRequest", - }, - "v2.CreateBulkTagsMetricsConfiguration" => { - "body" => "MetricBulkTagConfigCreateRequest", - }, "v2.CreateDerivedMetric" => { "body" => "DerivedMetricCreateRequest", }, diff --git a/features/v2/metrics.feature b/features/v2/metrics.feature index 765d383d9d51..c8810c750a04 100644 --- a/features/v2/metrics.feature +++ b/features/v2/metrics.feature @@ -15,31 +15,6 @@ Feature: Metrics Given a valid "apiKeyAuth" key in the system And an instance of "Metrics" API - @skip-typescript @team:ddoghq/metrics-experience - Scenario: Configure tags for multiple metrics returns "Accepted" response - Given a valid "appKeyAuth" key in the system - And there is a valid "user" in the system - And new "CreateBulkTagsMetricsConfiguration" request - And body with value {"data": {"attributes": {"emails": ["{{ user.data.attributes.email }}"], "tags": ["test", "{{ unique_lower_alnum }}"]}, "id": "system.load.1", "type": "metric_bulk_configure_tags"}} - When the request is sent - Then the response status is 202 Accepted - - @generated @skip @team:ddoghq/metrics-experience - Scenario: Configure tags for multiple metrics returns "Bad Request" response - Given a valid "appKeyAuth" key in the system - And new "CreateBulkTagsMetricsConfiguration" request - And body with value {"data": {"attributes": {"emails": ["sue@example.com", "bob@example.com"], "tags": ["host", "pod_name", "is_shadow"]}, "id": "kafka.lag", "type": "metric_bulk_configure_tags"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:ddoghq/metrics-experience - Scenario: Configure tags for multiple metrics returns "Not Found" response - Given a valid "appKeyAuth" key in the system - And new "CreateBulkTagsMetricsConfiguration" request - And body with value {"data": {"attributes": {"emails": ["sue@example.com", "bob@example.com"], "tags": ["host", "pod_name", "is_shadow"]}, "id": "kafka.lag", "type": "metric_bulk_configure_tags"}} - When the request is sent - Then the response status is 404 Not Found - @team:ddoghq/metrics-experience Scenario: Create a derived metric returns "Bad Request" response Given a valid "appKeyAuth" key in the system @@ -263,30 +238,6 @@ Feature: Metrics When the request is sent Then the response status is 204 No Content - @generated @skip @team:ddoghq/metrics-experience - Scenario: Delete tags for multiple metrics returns "Accepted" response - Given a valid "appKeyAuth" key in the system - And new "DeleteBulkTagsMetricsConfiguration" request - And body with value {"data": {"attributes": {"emails": ["sue@example.com", "bob@example.com"]}, "id": "kafka.lag", "type": "metric_bulk_configure_tags"}} - When the request is sent - Then the response status is 202 Accepted - - @generated @skip @team:ddoghq/metrics-experience - Scenario: Delete tags for multiple metrics returns "Bad Request" response - Given a valid "appKeyAuth" key in the system - And new "DeleteBulkTagsMetricsConfiguration" request - And body with value {"data": {"attributes": {"emails": ["sue@example.com", "bob@example.com"]}, "id": "kafka.lag", "type": "metric_bulk_configure_tags"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:ddoghq/metrics-experience - Scenario: Delete tags for multiple metrics returns "Not Found" response - Given a valid "appKeyAuth" key in the system - And new "DeleteBulkTagsMetricsConfiguration" request - And body with value {"data": {"attributes": {"emails": ["sue@example.com", "bob@example.com"]}, "id": "kafka.lag", "type": "metric_bulk_configure_tags"}} - When the request is sent - Then the response status is 404 Not Found - @generated @skip @team:ddoghq/metrics-experience Scenario: Enable historical metrics ingestion returns "Bad Request" response Given a valid "appKeyAuth" key in the system diff --git a/features/v2/undo.json b/features/v2/undo.json index f78687679186..61ce613fba64 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -6059,25 +6059,6 @@ "type": "safe" } }, - "DeleteBulkTagsMetricsConfiguration": { - "tag": "Metrics", - "undo": { - "type": "idempotent" - } - }, - "CreateBulkTagsMetricsConfiguration": { - "tag": "Metrics", - "undo": { - "operationId": "DeleteBulkTagsMetricsConfiguration", - "parameters": [ - { - "name": "body", - "template": "{\n \"data\": {\n \"id\":\"{{ data.id }}\",\n \"type\":\"metric_bulk_configure_tags\",\n \"attributes\": {\n \"emails\": [\"{{ data.attributes.emails[0] }}\"]\n }\n }\n}" - } - ], - "type": "unsafe" - } - }, "CreateDerivedMetric": { "tag": "Metrics", "undo": { diff --git a/generated-test/test-runner-data/manifest.json b/generated-test/test-runner-data/manifest.json index 2c68906d492e..63cc77af477f 100644 --- a/generated-test/test-runner-data/manifest.json +++ b/generated-test/test-runner-data/manifest.json @@ -7483,13 +7483,6 @@ "scenario": "List roles for a restriction query returns \"OK\" response", "version": "v2" }, - { - "feature": "Metrics", - "feature_file": "../../features/v2/metrics.feature", - "file": "v2/metrics/configure-tags-for-multiple-metrics-returns-accepted-response.json", - "scenario": "Configure tags for multiple metrics returns \"Accepted\" response", - "version": "v2" - }, { "feature": "Metrics", "feature_file": "../../features/v2/metrics.feature", diff --git a/generated-test/test-runner-data/v2/metrics/configure-tags-for-multiple-metrics-returns-accepted-response.json b/generated-test/test-runner-data/v2/metrics/configure-tags-for-multiple-metrics-returns-accepted-response.json deleted file mode 100644 index b35d60b6a5b1..000000000000 --- a/generated-test/test-runner-data/v2/metrics/configure-tags-for-multiple-metrics-returns-accepted-response.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "api": "Metrics", - "expected_status": 202, - "feature": "Metrics", - "id": "v2/Metrics/Configure tags for multiple metrics returns \"Accepted\" response", - "operation_id": "CreateBulkTagsMetricsConfiguration", - "request": { - "body": { - "schema": { - "format": null, - "ref": "MetricBulkTagConfigCreateRequest", - "type": "object" - }, - "source": "inline", - "value": { - "data": { - "attributes": { - "emails": [ - "{{ user.data.attributes.email }}" - ], - "tags": [ - "test", - "{{ unique_lower_alnum }}" - ] - }, - "id": "system.load.1", - "type": "metric_bulk_configure_tags" - } - } - }, - "content_type": "application/json", - "method": "POST", - "pagination": false, - "parameters": [], - "path": "/api/v2/metrics/config/bulk-tags" - }, - "scenario": "Configure tags for multiple metrics returns \"Accepted\" response", - "schema_version": 1, - "version": "v2" -} diff --git a/generated-test/test-server-data/v2/metrics.json b/generated-test/test-server-data/v2/metrics.json index 2b790b368214..173fcac09c40 100644 --- a/generated-test/test-server-data/v2/metrics.json +++ b/generated-test/test-server-data/v2/metrics.json @@ -1,136 +1,6 @@ { "feature": "Metrics", "recordings": [ - { - "feature": "Metrics", - "frozen_at": "2026-06-04T17:13:08.947Z", - "interactions": [ - { - "request": { - "body": { - "type": "json", - "value": { - "data": { - "attributes": { - "email": "Test-Configure_tags_for_multiple_metrics_returns_Accepted_response-1780593188@datadoghq.com", - "title": "user title" - }, - "type": "users" - } - } - }, - "content_type": "application/json", - "method": "POST", - "path": "/api/v2/users", - "query": [] - }, - "response": { - "body": { - "encoding": "text", - "value": "{\"data\":{\"type\":\"users\",\"id\":\"bbd25c81-fae3-46b3-99b3-4251859017c4\",\"attributes\":{\"uuid\":\"bbd25c81-fae3-46b3-99b3-4251859017c4\",\"name\":null,\"handle\":\"test-configure_tags_for_multiple_metrics_returns_accepted_response-1780593188@datadoghq.com\",\"created_at\":\"2026-06-04T17:13:10.281475+00:00\",\"modified_at\":\"2026-06-04T17:13:10.281475+00:00\",\"email\":\"test-configure_tags_for_multiple_metrics_returns_accepted_response-1780593188@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/f08cc2909ca7eae455a0969e3664ec09?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\",\"last_login_time\":null},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n" - }, - "headers": { - "content-type": "application/json" - }, - "reason": "Created", - "status": 201 - } - }, - { - "request": { - "body": { - "type": "json", - "value": { - "data": { - "attributes": { - "emails": [ - "test-configure_tags_for_multiple_metrics_returns_accepted_response-1780593188@datadoghq.com" - ], - "tags": [ - "test", - "testconfiguretagsformultiplemetricsreturnsacceptedresponse1780593188" - ] - }, - "id": "system.load.1", - "type": "metric_bulk_configure_tags" - } - } - }, - "content_type": "application/json", - "method": "POST", - "path": "/api/v2/metrics/config/bulk-tags", - "query": [] - }, - "response": { - "body": { - "encoding": "text", - "value": "{\"data\":{\"type\":\"metric_bulk_configure_tags\",\"id\":\"system.load.1\",\"attributes\":{\"tags\":[\"test\",\"testconfiguretagsformultiplemetricsreturnsacceptedresponse1780593188\"],\"emails\":[\"test-configure_tags_for_multiple_metrics_returns_accepted_response-1780593188@datadoghq.com\"],\"status\":\"Accepted\",\"exclude_tags_mode\":null,\"override_existing_configurations\":true,\"include_actively_queried_tags_window\":null}}}\n" - }, - "headers": { - "content-type": "application/json" - }, - "reason": "Accepted", - "status": 202 - } - }, - { - "request": { - "body": { - "type": "json", - "value": { - "data": { - "attributes": { - "emails": [ - "test-configure_tags_for_multiple_metrics_returns_accepted_response-1780593188@datadoghq.com" - ] - }, - "id": "system.load.1", - "type": "metric_bulk_configure_tags" - } - } - }, - "content_type": "application/json", - "method": "DELETE", - "path": "/api/v2/metrics/config/bulk-tags", - "query": [] - }, - "response": { - "body": { - "encoding": "text", - "value": "{\"data\":{\"type\":\"metric_bulk_configure_tags\",\"id\":\"system.load.1\",\"attributes\":{\"emails\":[\"test-configure_tags_for_multiple_metrics_returns_accepted_response-1780593188@datadoghq.com\"],\"status\":\"Accepted\",\"override_existing_configurations\":true}}}\n" - }, - "headers": { - "content-type": "application/json" - }, - "reason": "Accepted", - "status": 202 - } - }, - { - "request": { - "body": { - "type": "empty", - "value": null - }, - "content_type": "", - "method": "DELETE", - "path": "/api/v2/users/bbd25c81-fae3-46b3-99b3-4251859017c4", - "query": [] - }, - "response": { - "body": { - "encoding": "text", - "value": "" - }, - "headers": {}, - "reason": "No Content", - "status": 204 - } - } - ], - "scenario": "Configure tags for multiple metrics returns \"Accepted\" response", - "version": "v2" - }, { "feature": "Metrics", "frozen_at": "2026-10-13T19:38:42.783Z", diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 01623f61fc34..3c6b6389f718 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -5688,16 +5688,6 @@ def overrides "v2.metric_asset_slo_relationship" => "MetricAssetSLORelationship", "v2.metric_asset_slo_relationships" => "MetricAssetSLORelationships", "v2.metric_assets_response" => "MetricAssetsResponse", - "v2.metric_bulk_configure_tags_type" => "MetricBulkConfigureTagsType", - "v2.metric_bulk_tag_config_create" => "MetricBulkTagConfigCreate", - "v2.metric_bulk_tag_config_create_attributes" => "MetricBulkTagConfigCreateAttributes", - "v2.metric_bulk_tag_config_create_request" => "MetricBulkTagConfigCreateRequest", - "v2.metric_bulk_tag_config_delete" => "MetricBulkTagConfigDelete", - "v2.metric_bulk_tag_config_delete_attributes" => "MetricBulkTagConfigDeleteAttributes", - "v2.metric_bulk_tag_config_delete_request" => "MetricBulkTagConfigDeleteRequest", - "v2.metric_bulk_tag_config_response" => "MetricBulkTagConfigResponse", - "v2.metric_bulk_tag_config_status" => "MetricBulkTagConfigStatus", - "v2.metric_bulk_tag_config_status_attributes" => "MetricBulkTagConfigStatusAttributes", "v2.metric_content_encoding" => "MetricContentEncoding", "v2.metric_custom_aggregation" => "MetricCustomAggregation", "v2.metric_custom_space_aggregation" => "MetricCustomSpaceAggregation", diff --git a/lib/datadog_api_client/v2/api/metrics_api.rb b/lib/datadog_api_client/v2/api/metrics_api.rb index 4020bf291e70..8b5d88105f3d 100644 --- a/lib/datadog_api_client/v2/api/metrics_api.rb +++ b/lib/datadog_api_client/v2/api/metrics_api.rb @@ -23,84 +23,6 @@ def initialize(api_client = DatadogAPIClient::APIClient.default) @api_client = api_client end - # Configure tags for multiple metrics. - # - # @see #create_bulk_tags_metrics_configuration_with_http_info - def create_bulk_tags_metrics_configuration(body, opts = {}) - data, _status_code, _headers = create_bulk_tags_metrics_configuration_with_http_info(body, opts) - data - end - - # Configure tags for multiple metrics. - # - # **Note**: This endpoint is deprecated. Use [Tag Indexing Rules](/api/latest/metrics/#create-a-tag-indexing-rule) (`POST /api/v2/metrics/tag-indexing-rules`) instead. - # - # Create and define a list of queryable tag keys for a set of existing count, gauge, rate, and distribution metrics. - # Metrics are selected by passing a metric name prefix. Use the Delete method of this API path to remove tag configurations. - # Results can be sent to a set of account email addresses, just like the same operation in the Datadog web app. - # If multiple calls include the same metric, the last configuration applied (not by submit order) is used, do not - # expect deterministic ordering of concurrent calls. The `exclude_tags_mode` value will set all metrics that match the prefix to - # the same exclusion state, metric tag configurations do not support mixed inclusion and exclusion for tags on the same metric. - # Can only be used with application keys of users with the `Manage Tags for Metrics` permission. - # - # @deprecated This API is deprecated. - # - # @param body [MetricBulkTagConfigCreateRequest] - # @param opts [Hash] the optional parameters - # @return [Array<(MetricBulkTagConfigResponse, Integer, Hash)>] MetricBulkTagConfigResponse data, response status code and response headers - def create_bulk_tags_metrics_configuration_with_http_info(body, opts = {}) - warn "[DEPRECATION] `CreateBulkTagsMetricsConfiguration` is deprecated." - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: MetricsAPI.create_bulk_tags_metrics_configuration ...' - 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 MetricsAPI.create_bulk_tags_metrics_configuration" - end - # resource path - local_var_path = '/api/v2/metrics/config/bulk-tags' - - # 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] || 'MetricBulkTagConfigResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :create_bulk_tags_metrics_configuration, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: MetricsAPI#create_bulk_tags_metrics_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Create a derived metric. # # @see #create_derived_metric_with_http_info @@ -476,81 +398,6 @@ def create_tag_indexing_rule_exemption_with_http_info(metric_name, body, opts = return data, status_code, headers end - # Delete tags for multiple metrics. - # - # @see #delete_bulk_tags_metrics_configuration_with_http_info - def delete_bulk_tags_metrics_configuration(body, opts = {}) - data, _status_code, _headers = delete_bulk_tags_metrics_configuration_with_http_info(body, opts) - data - end - - # Delete tags for multiple metrics. - # - # **Note**: This endpoint is deprecated. Use [Tag Indexing Rules](/api/latest/metrics/#create-a-tag-indexing-rule) (`POST /api/v2/metrics/tag-indexing-rules`) instead. - # - # Delete all custom lists of queryable tag keys for a set of existing count, gauge, rate, and distribution metrics. - # Metrics are selected by passing a metric name prefix. - # Results can be sent to a set of account email addresses, just like the same operation in the Datadog web app. - # Can only be used with application keys of users with the `Manage Tags for Metrics` permission. - # - # @deprecated This API is deprecated. - # - # @param body [MetricBulkTagConfigDeleteRequest] - # @param opts [Hash] the optional parameters - # @return [Array<(MetricBulkTagConfigResponse, Integer, Hash)>] MetricBulkTagConfigResponse data, response status code and response headers - def delete_bulk_tags_metrics_configuration_with_http_info(body, opts = {}) - warn "[DEPRECATION] `DeleteBulkTagsMetricsConfiguration` is deprecated." - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: MetricsAPI.delete_bulk_tags_metrics_configuration ...' - 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 MetricsAPI.delete_bulk_tags_metrics_configuration" - end - # resource path - local_var_path = '/api/v2/metrics/config/bulk-tags' - - # 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] || 'MetricBulkTagConfigResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :delete_bulk_tags_metrics_configuration, - :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: MetricsAPI#delete_bulk_tags_metrics_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Delete a derived metric. # # @see #delete_derived_metric_with_http_info diff --git a/lib/datadog_api_client/v2/models/metric_bulk_configure_tags_type.rb b/lib/datadog_api_client/v2/models/metric_bulk_configure_tags_type.rb deleted file mode 100644 index 3e8f87d9f95e..000000000000 --- a/lib/datadog_api_client/v2/models/metric_bulk_configure_tags_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 metric bulk configure tags resource. - class MetricBulkConfigureTagsType - include BaseEnumModel - - BULK_MANAGE_TAGS = "metric_bulk_configure_tags".freeze - end -end diff --git a/lib/datadog_api_client/v2/models/metric_bulk_tag_config_create.rb b/lib/datadog_api_client/v2/models/metric_bulk_tag_config_create.rb deleted file mode 100644 index 8181f2843a82..000000000000 --- a/lib/datadog_api_client/v2/models/metric_bulk_tag_config_create.rb +++ /dev/null @@ -1,154 +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 - # Request object to bulk configure tags for metrics matching the given prefix. - class MetricBulkTagConfigCreate - include BaseGenericModel - - # Optional parameters for bulk creating metric tag configurations. - attr_accessor :attributes - - # A text prefix to match against metric names. - attr_reader :id - - # The metric bulk configure tags resource. - 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' => :'MetricBulkTagConfigCreateAttributes', - :'id' => :'String', - :'type' => :'MetricBulkConfigureTagsType' - } - 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::MetricBulkTagConfigCreate` 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 @id.nil? - return false if @type.nil? - true - 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/metric_bulk_tag_config_create_attributes.rb b/lib/datadog_api_client/v2/models/metric_bulk_tag_config_create_attributes.rb deleted file mode 100644 index bcc509421a7d..000000000000 --- a/lib/datadog_api_client/v2/models/metric_bulk_tag_config_create_attributes.rb +++ /dev/null @@ -1,180 +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 - # Optional parameters for bulk creating metric tag configurations. - class MetricBulkTagConfigCreateAttributes - include BaseGenericModel - - # A list of account emails to notify when the configuration is applied. - attr_accessor :emails - - # When set to true, the configuration will exclude the configured tags and include any other submitted tags. - # When set to false, the configuration will include the configured tags and exclude any other submitted tags. - # Defaults to false. - attr_accessor :exclude_tags_mode - - # When provided, all tags that have been actively queried are - # configured (and, therefore, remain queryable) for each metric that - # matches the given prefix. Minimum value is 1 second, and maximum - # value is 7,776,000 seconds (90 days). - attr_reader :include_actively_queried_tags_window - - # When set to true, the configuration overrides any existing - # configurations for the given metric with the new set of tags in this - # configuration request. If false, old configurations are kept and - # are merged with the set of tags in this configuration request. - # Defaults to true. - attr_accessor :override_existing_configurations - - # A list of tag names to apply to the configuration. - attr_accessor :tags - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'emails' => :'emails', - :'exclude_tags_mode' => :'exclude_tags_mode', - :'include_actively_queried_tags_window' => :'include_actively_queried_tags_window', - :'override_existing_configurations' => :'override_existing_configurations', - :'tags' => :'tags' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'emails' => :'Array', - :'exclude_tags_mode' => :'Boolean', - :'include_actively_queried_tags_window' => :'Float', - :'override_existing_configurations' => :'Boolean', - :'tags' => :'Array' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricBulkTagConfigCreateAttributes` 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?(:'emails') - if (value = attributes[:'emails']).is_a?(Array) - self.emails = value - end - end - - if attributes.key?(:'exclude_tags_mode') - self.exclude_tags_mode = attributes[:'exclude_tags_mode'] - end - - if attributes.key?(:'include_actively_queried_tags_window') - self.include_actively_queried_tags_window = attributes[:'include_actively_queried_tags_window'] - end - - if attributes.key?(:'override_existing_configurations') - self.override_existing_configurations = attributes[:'override_existing_configurations'] - end - - if attributes.key?(:'tags') - if (value = attributes[:'tags']).is_a?(Array) - self.tags = value - end - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if !@include_actively_queried_tags_window.nil? && @include_actively_queried_tags_window > 7776000 - return false if !@include_actively_queried_tags_window.nil? && @include_actively_queried_tags_window < 1 - true - end - - # Custom attribute writer method with validation - # @param include_actively_queried_tags_window [Object] Object to be assigned - # @!visibility private - def include_actively_queried_tags_window=(include_actively_queried_tags_window) - if !include_actively_queried_tags_window.nil? && include_actively_queried_tags_window > 7776000 - fail ArgumentError, 'invalid value for "include_actively_queried_tags_window", must be smaller than or equal to 7776000.' - end - if !include_actively_queried_tags_window.nil? && include_actively_queried_tags_window < 1 - fail ArgumentError, 'invalid value for "include_actively_queried_tags_window", must be greater than or equal to 1.' - end - @include_actively_queried_tags_window = include_actively_queried_tags_window - 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 && - emails == o.emails && - exclude_tags_mode == o.exclude_tags_mode && - include_actively_queried_tags_window == o.include_actively_queried_tags_window && - override_existing_configurations == o.override_existing_configurations && - tags == o.tags && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [emails, exclude_tags_mode, include_actively_queried_tags_window, override_existing_configurations, tags, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/metric_bulk_tag_config_create_request.rb b/lib/datadog_api_client/v2/models/metric_bulk_tag_config_create_request.rb deleted file mode 100644 index a674c609927e..000000000000 --- a/lib/datadog_api_client/v2/models/metric_bulk_tag_config_create_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 - # Wrapper object for a single bulk tag configuration request. - class MetricBulkTagConfigCreateRequest - include BaseGenericModel - - # Request object to bulk configure tags for metrics matching the given prefix. - 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' => :'MetricBulkTagConfigCreate' - } - 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::MetricBulkTagConfigCreateRequest` 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/metric_bulk_tag_config_delete.rb b/lib/datadog_api_client/v2/models/metric_bulk_tag_config_delete.rb deleted file mode 100644 index 4848ea1d9816..000000000000 --- a/lib/datadog_api_client/v2/models/metric_bulk_tag_config_delete.rb +++ /dev/null @@ -1,154 +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 - # Request object to bulk delete all tag configurations for metrics matching the given prefix. - class MetricBulkTagConfigDelete - include BaseGenericModel - - # Optional parameters for bulk deleting metric tag configurations. - attr_accessor :attributes - - # A text prefix to match against metric names. - attr_reader :id - - # The metric bulk configure tags resource. - 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' => :'MetricBulkTagConfigDeleteAttributes', - :'id' => :'String', - :'type' => :'MetricBulkConfigureTagsType' - } - 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::MetricBulkTagConfigDelete` 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 @id.nil? - return false if @type.nil? - true - 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/metric_bulk_tag_config_delete_attributes.rb b/lib/datadog_api_client/v2/models/metric_bulk_tag_config_delete_attributes.rb deleted file mode 100644 index 79d2716d3d28..000000000000 --- a/lib/datadog_api_client/v2/models/metric_bulk_tag_config_delete_attributes.rb +++ /dev/null @@ -1,107 +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 - # Optional parameters for bulk deleting metric tag configurations. - class MetricBulkTagConfigDeleteAttributes - include BaseGenericModel - - # A list of account emails to notify when the configuration is applied. - attr_accessor :emails - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'emails' => :'emails' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'emails' => :'Array' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricBulkTagConfigDeleteAttributes` 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?(:'emails') - if (value = attributes[:'emails']).is_a?(Array) - self.emails = value - end - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - emails == o.emails && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [emails, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/metric_bulk_tag_config_delete_request.rb b/lib/datadog_api_client/v2/models/metric_bulk_tag_config_delete_request.rb deleted file mode 100644 index 64795526abaa..000000000000 --- a/lib/datadog_api_client/v2/models/metric_bulk_tag_config_delete_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 - # Wrapper object for a single bulk tag deletion request. - class MetricBulkTagConfigDeleteRequest - include BaseGenericModel - - # Request object to bulk delete all tag configurations for metrics matching the given prefix. - 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' => :'MetricBulkTagConfigDelete' - } - 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::MetricBulkTagConfigDeleteRequest` 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/metric_bulk_tag_config_response.rb b/lib/datadog_api_client/v2/models/metric_bulk_tag_config_response.rb deleted file mode 100644 index 583a527166d7..000000000000 --- a/lib/datadog_api_client/v2/models/metric_bulk_tag_config_response.rb +++ /dev/null @@ -1,106 +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 - # Wrapper for a single bulk tag configuration status response. - class MetricBulkTagConfigResponse - include BaseGenericModel - - # The status of a request to bulk configure metric tags. - # It contains the fields from the original request for reference. - attr_accessor :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'MetricBulkTagConfigStatus' - } - 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::MetricBulkTagConfigResponse` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/metric_bulk_tag_config_status.rb b/lib/datadog_api_client/v2/models/metric_bulk_tag_config_status.rb deleted file mode 100644 index 9809cb889352..000000000000 --- a/lib/datadog_api_client/v2/models/metric_bulk_tag_config_status.rb +++ /dev/null @@ -1,155 +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 status of a request to bulk configure metric tags. - # It contains the fields from the original request for reference. - class MetricBulkTagConfigStatus - include BaseGenericModel - - # Optional attributes for the status of a bulk tag configuration request. - attr_accessor :attributes - - # A text prefix to match against metric names. - attr_reader :id - - # The metric bulk configure tags resource. - 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' => :'MetricBulkTagConfigStatusAttributes', - :'id' => :'String', - :'type' => :'MetricBulkConfigureTagsType' - } - 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::MetricBulkTagConfigStatus` 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 @id.nil? - return false if @type.nil? - true - 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/metric_bulk_tag_config_status_attributes.rb b/lib/datadog_api_client/v2/models/metric_bulk_tag_config_status_attributes.rb deleted file mode 100644 index 07532b1b65bb..000000000000 --- a/lib/datadog_api_client/v2/models/metric_bulk_tag_config_status_attributes.rb +++ /dev/null @@ -1,140 +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 - # Optional attributes for the status of a bulk tag configuration request. - class MetricBulkTagConfigStatusAttributes - include BaseGenericModel - - # A list of account emails to notify when the configuration is applied. - attr_accessor :emails - - # When set to true, the configuration will exclude the configured tags and include any other submitted tags. - # When set to false, the configuration will include the configured tags and exclude any other submitted tags. - attr_accessor :exclude_tags_mode - - # The status of the request. - attr_accessor :status - - # A list of tag names to apply to the configuration. - attr_accessor :tags - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'emails' => :'emails', - :'exclude_tags_mode' => :'exclude_tags_mode', - :'status' => :'status', - :'tags' => :'tags' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'emails' => :'Array', - :'exclude_tags_mode' => :'Boolean', - :'status' => :'String', - :'tags' => :'Array' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricBulkTagConfigStatusAttributes` 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?(:'emails') - if (value = attributes[:'emails']).is_a?(Array) - self.emails = value - end - end - - if attributes.key?(:'exclude_tags_mode') - self.exclude_tags_mode = attributes[:'exclude_tags_mode'] - end - - if attributes.key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.key?(:'tags') - if (value = attributes[:'tags']).is_a?(Array) - self.tags = value - end - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - emails == o.emails && - exclude_tags_mode == o.exclude_tags_mode && - status == o.status && - tags == o.tags && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [emails, exclude_tags_mode, status, tags, additional_properties].hash - end - end -end