diff --git a/.apigentools-info b/.apigentools-info index 2a461bcafa82..e0f11358d75a 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-07-11 16:35:06.139859", - "spec_repo_commit": "d83fe206" + "regenerated": "2024-07-16 10:52:41.887335", + "spec_repo_commit": "06d5775d" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-07-11 16:35:06.158034", - "spec_repo_commit": "d83fe206" + "regenerated": "2024-07-16 10:52:41.904999", + "spec_repo_commit": "06d5775d" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 1e2315f4a2ce..de6e0c87893e 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -17269,6 +17269,12 @@ components: UsageBillableSummaryHour: description: Response with monthly summary of data billed by Datadog. properties: + account_name: + description: The account name. + type: string + account_public_id: + description: The account public ID. + type: string billing_plan: description: The billing plan. type: string @@ -31646,6 +31652,15 @@ paths: schema: format: date-time type: string + - description: 'Boolean to specify whether to include accounts connected to + the current account as partner customers in the Datadog partner network + program. Defaults to `false`. ' + in: query + name: include_connected_accounts + required: false + schema: + default: false + type: boolean responses: '200': content: diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index b76b3c30980d..ea353035b907 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -5390,6 +5390,12 @@ components: CostByOrgAttributes: description: Cost attributes data. properties: + account_name: + description: The account name. + type: string + account_public_id: + description: The account public ID. + type: string charges: description: List of charges data reported for the requested month. items: @@ -36185,6 +36191,15 @@ paths: schema: format: date-time type: string + - description: 'Boolean to specify whether to include accounts connected to + the current account as partner customers in the Datadog partner network + program. Defaults to `false`. ' + in: query + name: include_connected_accounts + required: false + schema: + default: false + type: boolean responses: '200': content: diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index d0f8b64ba25b..f8ac8f0f3da3 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -60,6 +60,7 @@ }, "v1.GetUsageBillableSummary" => { "month" => "Time", + "include_connected_accounts" => "Boolean", }, "v1.GetUsageCIApp" => { "start_hr" => "Time", @@ -1096,6 +1097,7 @@ "end_month" => "Time", "start_date" => "Time", "end_date" => "Time", + "include_connected_accounts" => "Boolean", }, "v2.GetHistoricalCostByOrg" => { "view" => "String", diff --git a/lib/datadog_api_client/v1/api/usage_metering_api.rb b/lib/datadog_api_client/v1/api/usage_metering_api.rb index 9db4a02ffc6a..8cdc3af3ffcb 100644 --- a/lib/datadog_api_client/v1/api/usage_metering_api.rb +++ b/lib/datadog_api_client/v1/api/usage_metering_api.rb @@ -839,6 +839,7 @@ def get_usage_billable_summary(opts = {}) # # @param opts [Hash] the optional parameters # @option opts [Time] :month Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage starting this month. + # @option opts [Boolean] :include_connected_accounts Boolean to specify whether to include accounts connected to the current account as partner customers in the Datadog partner network program. Defaults to `false`. # @return [Array<(UsageBillableSummaryResponse, Integer, Hash)>] UsageBillableSummaryResponse data, response status code and response headers def get_usage_billable_summary_with_http_info(opts = {}) @@ -851,6 +852,7 @@ def get_usage_billable_summary_with_http_info(opts = {}) # query parameters query_params = opts[:query_params] || {} query_params[:'month'] = opts[:'month'] if !opts[:'month'].nil? + query_params[:'include_connected_accounts'] = opts[:'include_connected_accounts'] if !opts[:'include_connected_accounts'].nil? # header parameters header_params = opts[:header_params] || {} diff --git a/lib/datadog_api_client/v1/models/usage_billable_summary_hour.rb b/lib/datadog_api_client/v1/models/usage_billable_summary_hour.rb index e752b0530b6c..9716d1d056d8 100644 --- a/lib/datadog_api_client/v1/models/usage_billable_summary_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_billable_summary_hour.rb @@ -21,6 +21,12 @@ module DatadogAPIClient::V1 class UsageBillableSummaryHour include BaseGenericModel + # The account name. + attr_accessor :account_name + + # The account public ID. + attr_accessor :account_public_id + # The billing plan. attr_accessor :billing_plan @@ -52,6 +58,8 @@ class UsageBillableSummaryHour # @!visibility private def self.attribute_map { + :'account_name' => :'account_name', + :'account_public_id' => :'account_public_id', :'billing_plan' => :'billing_plan', :'end_date' => :'end_date', :'num_orgs' => :'num_orgs', @@ -68,6 +76,8 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'account_name' => :'String', + :'account_public_id' => :'String', :'billing_plan' => :'String', :'end_date' => :'Time', :'num_orgs' => :'Integer', @@ -96,6 +106,14 @@ def initialize(attributes = {}) h[k.to_sym] = v } + if attributes.key?(:'account_name') + self.account_name = attributes[:'account_name'] + end + + if attributes.key?(:'account_public_id') + self.account_public_id = attributes[:'account_public_id'] + end + if attributes.key?(:'billing_plan') self.billing_plan = attributes[:'billing_plan'] end @@ -139,6 +157,8 @@ def initialize(attributes = {}) def ==(o) return true if self.equal?(o) self.class == o.class && + account_name == o.account_name && + account_public_id == o.account_public_id && billing_plan == o.billing_plan && end_date == o.end_date && num_orgs == o.num_orgs && @@ -154,7 +174,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [billing_plan, end_date, num_orgs, org_name, public_id, ratio_in_month, region, start_date, usage].hash + [account_name, account_public_id, billing_plan, end_date, num_orgs, org_name, public_id, ratio_in_month, region, start_date, usage].hash end end end diff --git a/lib/datadog_api_client/v2/api/usage_metering_api.rb b/lib/datadog_api_client/v2/api/usage_metering_api.rb index ccab3f50ebd4..b757c0bd2793 100644 --- a/lib/datadog_api_client/v2/api/usage_metering_api.rb +++ b/lib/datadog_api_client/v2/api/usage_metering_api.rb @@ -189,6 +189,7 @@ def get_estimated_cost_by_org(opts = {}) # @option opts [Time] :end_month Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost ending this month. # @option opts [Time] :start_date Datetime in ISO-8601 format, UTC, precise to day: `[YYYY-MM-DD]` for cost beginning this day. Either start_month or start_date should be specified, but not both. (start_date cannot go beyond two months in the past). Provide an `end_date` to view day-over-day cumulative cost. # @option opts [Time] :end_date Datetime in ISO-8601 format, UTC, precise to day: `[YYYY-MM-DD]` for cost ending this day. + # @option opts [Boolean] :include_connected_accounts Boolean to specify whether to include accounts connected to the current account as partner customers in the Datadog partner network program. Defaults to `false`. # @return [Array<(CostByOrgResponse, Integer, Hash)>] CostByOrgResponse data, response status code and response headers def get_estimated_cost_by_org_with_http_info(opts = {}) @@ -205,6 +206,7 @@ def get_estimated_cost_by_org_with_http_info(opts = {}) query_params[:'end_month'] = opts[:'end_month'] if !opts[:'end_month'].nil? query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil? query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil? + query_params[:'include_connected_accounts'] = opts[:'include_connected_accounts'] if !opts[:'include_connected_accounts'].nil? # header parameters header_params = opts[:header_params] || {} diff --git a/lib/datadog_api_client/v2/models/cost_by_org_attributes.rb b/lib/datadog_api_client/v2/models/cost_by_org_attributes.rb index 6f0462f5aac5..1599a8d0926a 100644 --- a/lib/datadog_api_client/v2/models/cost_by_org_attributes.rb +++ b/lib/datadog_api_client/v2/models/cost_by_org_attributes.rb @@ -21,6 +21,12 @@ module DatadogAPIClient::V2 class CostByOrgAttributes include BaseGenericModel + # The account name. + attr_accessor :account_name + + # The account public ID. + attr_accessor :account_public_id + # List of charges data reported for the requested month. attr_accessor :charges @@ -43,6 +49,8 @@ class CostByOrgAttributes # @!visibility private def self.attribute_map { + :'account_name' => :'account_name', + :'account_public_id' => :'account_public_id', :'charges' => :'charges', :'date' => :'date', :'org_name' => :'org_name', @@ -56,6 +64,8 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'account_name' => :'String', + :'account_public_id' => :'String', :'charges' => :'Array', :'date' => :'Time', :'org_name' => :'String', @@ -81,6 +91,14 @@ def initialize(attributes = {}) h[k.to_sym] = v } + if attributes.key?(:'account_name') + self.account_name = attributes[:'account_name'] + end + + if attributes.key?(:'account_public_id') + self.account_public_id = attributes[:'account_public_id'] + end + if attributes.key?(:'charges') if (value = attributes[:'charges']).is_a?(Array) self.charges = value @@ -114,6 +132,8 @@ def initialize(attributes = {}) def ==(o) return true if self.equal?(o) self.class == o.class && + account_name == o.account_name && + account_public_id == o.account_public_id && charges == o.charges && date == o.date && org_name == o.org_name && @@ -126,7 +146,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [charges, date, org_name, public_id, region, total_cost].hash + [account_name, account_public_id, charges, date, org_name, public_id, region, total_cost].hash end end end