Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update hourly usage API docs for partner program #1904

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-07-18 17:22:38.080265",
"spec_repo_commit": "9ab8be35"
"regenerated": "2024-07-18 19:17:52.208752",
"spec_repo_commit": "8f19ff48"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-07-18 17:22:38.105445",
"spec_repo_commit": "9ab8be35"
"regenerated": "2024-07-18 19:17:52.233137",
"spec_repo_commit": "8f19ff48"
}
}
}
15 changes: 15 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8741,6 +8741,12 @@ components:
description: Attributes of hourly usage for a product family for an org for
a time period.
properties:
account_name:
description: The account name.
type: string
account_public_id:
description: The account public ID.
type: string
measurements:
description: List of the measured usage values for the product family for
the org for the time period.
Expand Down Expand Up @@ -36772,6 +36778,15 @@ paths:
schema:
default: false
type: boolean
- 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: filter[include_connected_accounts]
required: false
schema:
default: false
type: boolean
- description: Include breakdown of usage by subcategories where applicable
(for product family logs only). Defaults to false.
in: query
Expand Down
1 change: 1 addition & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1109,6 +1109,7 @@
"filter_timestamp_end" => "Time",
"filter_product_families" => "String",
"filter_include_descendants" => "Boolean",
"filter_include_connected_accounts" => "Boolean",
"filter_include_breakdown" => "Boolean",
"filter_versions" => "String",
"page_limit" => "Integer",
Expand Down
2 changes: 2 additions & 0 deletions lib/datadog_api_client/v2/api/usage_metering_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ def get_hourly_usage(filter_timestamp_start, filter_product_families, opts = {})
# @param opts [Hash] the optional parameters
# @option opts [Time] :filter_timestamp_end Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour.
# @option opts [Boolean] :filter_include_descendants Include child org usage in the response. Defaults to false.
# @option opts [Boolean] :filter_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.
# @option opts [Boolean] :filter_include_breakdown Include breakdown of usage by subcategories where applicable (for product family logs only). Defaults to false.
# @option opts [String] :filter_versions Comma separated list of product family versions to use in the format `product_family:version`. For example, `infra_hosts:1.0.0`. If this parameter is not used, the API will use the latest version of each requested product family. Currently all families have one version `1.0.0`.
# @option opts [Integer] :page_limit Maximum number of results to return (between 1 and 500) - defaults to 500 if limit not specified.
Expand Down Expand Up @@ -366,6 +367,7 @@ def get_hourly_usage_with_http_info(filter_timestamp_start, filter_product_famil
query_params[:'filter[product_families]'] = filter_product_families
query_params[:'filter[timestamp][end]'] = opts[:'filter_timestamp_end'] if !opts[:'filter_timestamp_end'].nil?
query_params[:'filter[include_descendants]'] = opts[:'filter_include_descendants'] if !opts[:'filter_include_descendants'].nil?
query_params[:'filter[include_connected_accounts]'] = opts[:'filter_include_connected_accounts'] if !opts[:'filter_include_connected_accounts'].nil?
query_params[:'filter[include_breakdown]'] = opts[:'filter_include_breakdown'] if !opts[:'filter_include_breakdown'].nil?
query_params[:'filter[versions]'] = opts[:'filter_versions'] if !opts[:'filter_versions'].nil?
query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil?
Expand Down
22 changes: 21 additions & 1 deletion lib/datadog_api_client/v2/models/hourly_usage_attributes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ module DatadogAPIClient::V2
class HourlyUsageAttributes
include BaseGenericModel

# The account name.
attr_accessor :account_name

# The account public ID.
attr_accessor :account_public_id

# List of the measured usage values for the product family for the org for the time period.
attr_accessor :measurements

Expand All @@ -43,6 +49,8 @@ class HourlyUsageAttributes
# @!visibility private
def self.attribute_map
{
:'account_name' => :'account_name',
:'account_public_id' => :'account_public_id',
:'measurements' => :'measurements',
:'org_name' => :'org_name',
:'product_family' => :'product_family',
Expand All @@ -56,6 +64,8 @@ def self.attribute_map
# @!visibility private
def self.openapi_types
{
:'account_name' => :'String',
:'account_public_id' => :'String',
:'measurements' => :'Array<HourlyUsageMeasurement>',
:'org_name' => :'String',
:'product_family' => :'String',
Expand All @@ -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?(:'measurements')
if (value = attributes[:'measurements']).is_a?(Array)
self.measurements = value
Expand Down Expand Up @@ -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 &&
measurements == o.measurements &&
org_name == o.org_name &&
product_family == o.product_family &&
Expand All @@ -126,7 +146,7 @@ def ==(o)
# @return [Integer] Hash code
# @!visibility private
def hash
[measurements, org_name, product_family, public_id, region, timestamp].hash
[account_name, account_public_id, measurements, org_name, product_family, public_id, region, timestamp].hash
end
end
end
Loading