From c840b26ddbfd958372dfb2c0fd9fe192e8850cc4 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 10 Dec 2024 14:44:17 +0000 Subject: [PATCH] Regenerate client from commit 408f0b84 of spec repo --- .apigentools-info | 8 +- .generator/schemas/v2/openapi.yaml | 68 --------- .../GetCloudCostActivity.rb | 5 - features/v2/cloud_cost_management.feature | 6 - features/v2/undo.json | 6 - lib/datadog_api_client/inflector.rb | 4 - .../v2/api/cloud_cost_management_api.rb | 63 -------- .../v2/models/cloud_cost_activity.rb | 144 ------------------ .../models/cloud_cost_activity_attributes.rb | 123 --------------- .../v2/models/cloud_cost_activity_response.rb | 105 ------------- .../v2/models/cloud_cost_activity_type.rb | 26 ---- 11 files changed, 4 insertions(+), 554 deletions(-) delete mode 100644 examples/v2/cloud-cost-management/GetCloudCostActivity.rb delete mode 100644 lib/datadog_api_client/v2/models/cloud_cost_activity.rb delete mode 100644 lib/datadog_api_client/v2/models/cloud_cost_activity_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/cloud_cost_activity_response.rb delete mode 100644 lib/datadog_api_client/v2/models/cloud_cost_activity_type.rb diff --git a/.apigentools-info b/.apigentools-info index 6808f09f7db9..a32a0d555cb0 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-12-10 13:52:29.278222", - "spec_repo_commit": "4f71be94" + "regenerated": "2024-12-10 14:43:50.257656", + "spec_repo_commit": "408f0b84" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-12-10 13:52:29.297144", - "spec_repo_commit": "4f71be94" + "regenerated": "2024-12-10 14:43:50.276347", + "spec_repo_commit": "408f0b84" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index af3105008c24..e7c715f38a1f 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -4929,42 +4929,6 @@ components: type: string x-enum-varnames: - CLOUD_CONFIGURATION - CloudCostActivity: - description: Cloud Cost Activity. - properties: - attributes: - $ref: '#/components/schemas/CloudCostActivityAttributes' - type: - $ref: '#/components/schemas/CloudCostActivityType' - required: - - attributes - - type - type: object - CloudCostActivityAttributes: - description: Attributes for Cloud Cost activity. - properties: - is_enabled: - description: Whether or not the cloud account is enabled. - example: true - type: boolean - required: - - is_enabled - type: object - CloudCostActivityResponse: - description: Response for Cloud Cost activity. - properties: - data: - $ref: '#/components/schemas/CloudCostActivity' - type: object - CloudCostActivityType: - default: cloud_cost_activity - description: Type of Cloud Cost Activity. - enum: - - cloud_cost_activity - example: cloud_cost_activity - type: string - x-enum-varnames: - - CLOUD_COST_ACTIVITY CloudWorkloadSecurityAgentRuleAction: description: The action the rule can perform if triggered. properties: @@ -30572,38 +30536,6 @@ paths: summary: Get Custom Costs file tags: - Cloud Cost Management - /api/v2/cost/enabled: - get: - deprecated: true - description: Get the Cloud Cost Management activity. - operationId: GetCloudCostActivity - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/CloudCostActivityResponse' - description: OK - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cloud_cost_management_read - summary: Cloud Cost Enabled - tags: - - Cloud Cost Management - x-permission: - operator: OR - permissions: - - cloud_cost_management_read /api/v2/cost_by_tag/active_billing_dimensions: get: description: Get active billing dimensions for cost attribution. Cost data for diff --git a/examples/v2/cloud-cost-management/GetCloudCostActivity.rb b/examples/v2/cloud-cost-management/GetCloudCostActivity.rb deleted file mode 100644 index 922f16dc1713..000000000000 --- a/examples/v2/cloud-cost-management/GetCloudCostActivity.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Cloud Cost Enabled returns "OK" response - -require "datadog_api_client" -api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new -p api_instance.get_cloud_cost_activity() diff --git a/features/v2/cloud_cost_management.feature b/features/v2/cloud_cost_management.feature index 2b87e8fe98df..4bef351f25c0 100644 --- a/features/v2/cloud_cost_management.feature +++ b/features/v2/cloud_cost_management.feature @@ -13,12 +13,6 @@ Feature: Cloud Cost Management And a valid "appKeyAuth" key in the system And an instance of "CloudCostManagement" API - @generated @skip @team:Datadog/cloud-cost-management - Scenario: Cloud Cost Enabled returns "OK" response - Given new "GetCloudCostActivity" request - When the request is sent - Then the response status is 200 OK - @generated @skip @team:Datadog/cloud-cost-management Scenario: Create Cloud Cost Management AWS CUR config returns "Bad Request" response Given new "CreateCostAWSCURConfig" request diff --git a/features/v2/undo.json b/features/v2/undo.json index 608035022755..9db842c40add 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -462,12 +462,6 @@ "type": "safe" } }, - "GetCloudCostActivity": { - "tag": "Cloud Cost Management", - "undo": { - "type": "safe" - } - }, "GetActiveBillingDimensions": { "tag": "Usage Metering", "undo": { diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index cac40f02cd92..7389ea3b544e 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1167,10 +1167,6 @@ def overrides "v2.cloud_configuration_rule_options" => "CloudConfigurationRuleOptions", "v2.cloud_configuration_rule_payload" => "CloudConfigurationRulePayload", "v2.cloud_configuration_rule_type" => "CloudConfigurationRuleType", - "v2.cloud_cost_activity" => "CloudCostActivity", - "v2.cloud_cost_activity_attributes" => "CloudCostActivityAttributes", - "v2.cloud_cost_activity_response" => "CloudCostActivityResponse", - "v2.cloud_cost_activity_type" => "CloudCostActivityType", "v2.cloudflare_account_create_request" => "CloudflareAccountCreateRequest", "v2.cloudflare_account_create_request_attributes" => "CloudflareAccountCreateRequestAttributes", "v2.cloudflare_account_create_request_data" => "CloudflareAccountCreateRequestData", diff --git a/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb b/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb index 55314ef5a6de..c791a345d9fd 100644 --- a/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb +++ b/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb @@ -352,69 +352,6 @@ def delete_custom_costs_file_with_http_info(file_id, opts = {}) return data, status_code, headers end - # Cloud Cost Enabled. - # - # @see #get_cloud_cost_activity_with_http_info - def get_cloud_cost_activity(opts = {}) - data, _status_code, _headers = get_cloud_cost_activity_with_http_info(opts) - data - end - - # Cloud Cost Enabled. - # - # Get the Cloud Cost Management activity. - # - # @deprecated This API is deprecated. - # - # @param opts [Hash] the optional parameters - # @return [Array<(CloudCostActivityResponse, Integer, Hash)>] CloudCostActivityResponse data, response status code and response headers - def get_cloud_cost_activity_with_http_info(opts = {}) - warn "[DEPRECATION] `GetCloudCostActivity` is deprecated." - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.get_cloud_cost_activity ...' - end - # resource path - local_var_path = '/api/v2/cost/enabled' - - # 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] || 'CloudCostActivityResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :get_cloud_cost_activity, - :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: CloudCostManagementAPI#get_cloud_cost_activity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Get Custom Costs file. # # @see #get_custom_costs_file_with_http_info diff --git a/lib/datadog_api_client/v2/models/cloud_cost_activity.rb b/lib/datadog_api_client/v2/models/cloud_cost_activity.rb deleted file mode 100644 index a47c7ab00506..000000000000 --- a/lib/datadog_api_client/v2/models/cloud_cost_activity.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 - # Cloud Cost Activity. - class CloudCostActivity - include BaseGenericModel - - # Attributes for Cloud Cost activity. - attr_reader :attributes - - # Type of Cloud Cost Activity. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'CloudCostActivityAttributes', - :'type' => :'CloudCostActivityType' - } - 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::CloudCostActivity` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @attributes.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 type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - type == o.type - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, type].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/cloud_cost_activity_attributes.rb b/lib/datadog_api_client/v2/models/cloud_cost_activity_attributes.rb deleted file mode 100644 index 14f980a622ec..000000000000 --- a/lib/datadog_api_client/v2/models/cloud_cost_activity_attributes.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 - # Attributes for Cloud Cost activity. - class CloudCostActivityAttributes - include BaseGenericModel - - # Whether or not the cloud account is enabled. - attr_reader :is_enabled - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'is_enabled' => :'is_enabled' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'is_enabled' => :'Boolean' - } - 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::CloudCostActivityAttributes` 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?(:'is_enabled') - self.is_enabled = attributes[:'is_enabled'] - 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 @is_enabled.nil? - true - end - - # Custom attribute writer method with validation - # @param is_enabled [Object] Object to be assigned - # @!visibility private - def is_enabled=(is_enabled) - if is_enabled.nil? - fail ArgumentError, 'invalid value for "is_enabled", is_enabled cannot be nil.' - end - @is_enabled = is_enabled - 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 && - is_enabled == o.is_enabled - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [is_enabled].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/cloud_cost_activity_response.rb b/lib/datadog_api_client/v2/models/cloud_cost_activity_response.rb deleted file mode 100644 index 80a6018bfc60..000000000000 --- a/lib/datadog_api_client/v2/models/cloud_cost_activity_response.rb +++ /dev/null @@ -1,105 +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 - # Response for Cloud Cost activity. - class CloudCostActivityResponse - include BaseGenericModel - - # Cloud Cost Activity. - 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' => :'CloudCostActivity' - } - 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::CloudCostActivityResponse` 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].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/cloud_cost_activity_type.rb b/lib/datadog_api_client/v2/models/cloud_cost_activity_type.rb deleted file mode 100644 index 2099122bcf2e..000000000000 --- a/lib/datadog_api_client/v2/models/cloud_cost_activity_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 - # Type of Cloud Cost Activity. - class CloudCostActivityType - include BaseEnumModel - - CLOUD_COST_ACTIVITY = "cloud_cost_activity".freeze - end -end