Skip to content

Commit 51a12f2

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit c4a891f3 of spec repo
1 parent d5e3ae3 commit 51a12f2

File tree

7 files changed

+43
-17
lines changed

7 files changed

+43
-17
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-10-16 20:07:14.122500",
8-
"spec_repo_commit": "86072741"
7+
"regenerated": "2024-10-17 13:56:58.028278",
8+
"spec_repo_commit": "c4a891f3"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-10-16 20:07:14.140655",
13-
"spec_repo_commit": "86072741"
12+
"regenerated": "2024-10-17 13:56:58.046978",
13+
"spec_repo_commit": "c4a891f3"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16166,6 +16166,9 @@ components:
1616616166
SyntheticsStepDetail:
1616716167
description: Object describing a step for a Synthetic test.
1616816168
properties:
16169+
allowFailure:
16170+
description: Whether or not the step was allowed to fail.
16171+
type: boolean
1616916172
browserErrors:
1617016173
description: Array of errors collected for a browser test.
1617116174
items:
@@ -16183,6 +16186,8 @@ components:
1618316186
error:
1618416187
description: Error returned by the test.
1618516188
type: string
16189+
failure:
16190+
$ref: '#/components/schemas/SyntheticsBrowserTestResultFailure'
1618616191
playingTab:
1618716192
$ref: '#/components/schemas/SyntheticsPlayingTab'
1618816193
screenshotBucketKey:

.generator/schemas/v2/openapi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28730,7 +28730,7 @@ paths:
2873028730
for cost ending this month.'
2873128731
in: query
2873228732
name: end_month
28733-
required: false
28733+
required: true
2873428734
schema:
2873528735
format: date-time
2873628736
type: string

examples/v2/usage-metering/GetMonthlyCostAttribution.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,4 @@
55
config.unstable_operations["v2.get_monthly_cost_attribution".to_sym] = true
66
end
77
api_instance = DatadogAPIClient::V2::UsageMeteringAPI.new
8-
opts = {
9-
end_month: (Time.now + -3 * 86400),
10-
}
11-
p api_instance.get_monthly_cost_attribution((Time.now + -5 * 86400), "infra_host_total_cost", opts)
8+
p api_instance.get_monthly_cost_attribution((Time.now + -5 * 86400), (Time.now + -3 * 86400), "infra_host_total_cost")

features/v2/usage_metering.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ Feature: Usage Metering
1919
Given operation "GetMonthlyCostAttribution" enabled
2020
And new "GetMonthlyCostAttribution" request
2121
And request contains "start_month" parameter with value "{{ timeISO('now - 5d') }}"
22-
And request contains "fields" parameter with value "not_a_product"
2322
And request contains "end_month" parameter with value "{{ timeISO('now - 3d') }}"
23+
And request contains "fields" parameter with value "not_a_product"
2424
When the request is sent
2525
Then the response status is 400 Bad Request
2626

@@ -29,8 +29,8 @@ Feature: Usage Metering
2929
Given operation "GetMonthlyCostAttribution" enabled
3030
And new "GetMonthlyCostAttribution" request
3131
And request contains "start_month" parameter with value "{{ timeISO('now - 5d') }}"
32-
And request contains "fields" parameter with value "infra_host_total_cost"
3332
And request contains "end_month" parameter with value "{{ timeISO('now - 3d') }}"
33+
And request contains "fields" parameter with value "infra_host_total_cost"
3434
When the request is sent
3535
Then the response status is 200 OK
3636

lib/datadog_api_client/v1/models/synthetics_step_detail.rb

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ module DatadogAPIClient::V1
2121
class SyntheticsStepDetail
2222
include BaseGenericModel
2323

24+
# Whether or not the step was allowed to fail.
25+
attr_accessor :allow_failure
26+
2427
# Array of errors collected for a browser test.
2528
attr_accessor :browser_errors
2629

@@ -36,6 +39,9 @@ class SyntheticsStepDetail
3639
# Error returned by the test.
3740
attr_accessor :error
3841

42+
# The browser test failure details.
43+
attr_accessor :failure
44+
3945
# Navigate between different tabs for your browser test.
4046
attr_accessor :playing_tab
4147

@@ -79,11 +85,13 @@ class SyntheticsStepDetail
7985
# @!visibility private
8086
def self.attribute_map
8187
{
88+
:'allow_failure' => :'allowFailure',
8289
:'browser_errors' => :'browserErrors',
8390
:'check_type' => :'checkType',
8491
:'description' => :'description',
8592
:'duration' => :'duration',
8693
:'error' => :'error',
94+
:'failure' => :'failure',
8795
:'playing_tab' => :'playingTab',
8896
:'screenshot_bucket_key' => :'screenshotBucketKey',
8997
:'skipped' => :'skipped',
@@ -103,11 +111,13 @@ def self.attribute_map
103111
# @!visibility private
104112
def self.openapi_types
105113
{
114+
:'allow_failure' => :'Boolean',
106115
:'browser_errors' => :'Array<SyntheticsBrowserError>',
107116
:'check_type' => :'SyntheticsCheckType',
108117
:'description' => :'String',
109118
:'duration' => :'Float',
110119
:'error' => :'String',
120+
:'failure' => :'SyntheticsBrowserTestResultFailure',
111121
:'playing_tab' => :'SyntheticsPlayingTab',
112122
:'screenshot_bucket_key' => :'Boolean',
113123
:'skipped' => :'Boolean',
@@ -141,6 +151,10 @@ def initialize(attributes = {})
141151
end
142152
}
143153

154+
if attributes.key?(:'allow_failure')
155+
self.allow_failure = attributes[:'allow_failure']
156+
end
157+
144158
if attributes.key?(:'browser_errors')
145159
if (value = attributes[:'browser_errors']).is_a?(Array)
146160
self.browser_errors = value
@@ -163,6 +177,10 @@ def initialize(attributes = {})
163177
self.error = attributes[:'error']
164178
end
165179

180+
if attributes.key?(:'failure')
181+
self.failure = attributes[:'failure']
182+
end
183+
166184
if attributes.key?(:'playing_tab')
167185
self.playing_tab = attributes[:'playing_tab']
168186
end
@@ -244,11 +262,13 @@ def to_hash
244262
def ==(o)
245263
return true if self.equal?(o)
246264
self.class == o.class &&
265+
allow_failure == o.allow_failure &&
247266
browser_errors == o.browser_errors &&
248267
check_type == o.check_type &&
249268
description == o.description &&
250269
duration == o.duration &&
251270
error == o.error &&
271+
failure == o.failure &&
252272
playing_tab == o.playing_tab &&
253273
screenshot_bucket_key == o.screenshot_bucket_key &&
254274
skipped == o.skipped &&
@@ -268,7 +288,7 @@ def ==(o)
268288
# @return [Integer] Hash code
269289
# @!visibility private
270290
def hash
271-
[browser_errors, check_type, description, duration, error, playing_tab, screenshot_bucket_key, skipped, snapshot_bucket_key, step_id, sub_test_step_details, time_to_interactive, type, url, value, vitals_metrics, warnings].hash
291+
[allow_failure, browser_errors, check_type, description, duration, error, failure, playing_tab, screenshot_bucket_key, skipped, snapshot_bucket_key, step_id, sub_test_step_details, time_to_interactive, type, url, value, vitals_metrics, warnings].hash
272292
end
273293
end
274294
end

lib/datadog_api_client/v2/api/usage_metering_api.rb

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -413,8 +413,8 @@ def get_hourly_usage_with_http_info(filter_timestamp_start, filter_product_famil
413413
# Get Monthly Cost Attribution.
414414
#
415415
# @see #get_monthly_cost_attribution_with_http_info
416-
def get_monthly_cost_attribution(start_month, fields, opts = {})
417-
data, _status_code, _headers = get_monthly_cost_attribution_with_http_info(start_month, fields, opts)
416+
def get_monthly_cost_attribution(start_month, end_month, fields, opts = {})
417+
data, _status_code, _headers = get_monthly_cost_attribution_with_http_info(start_month, end_month, fields, opts)
418418
data
419419
end
420420

@@ -438,16 +438,16 @@ def get_monthly_cost_attribution(start_month, fields, opts = {})
438438
# This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).
439439
#
440440
# @param start_month [Time] Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost beginning in this month.
441+
# @param end_month [Time] Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost ending this month.
441442
# @param fields [String] Comma-separated list specifying cost types (e.g., `<billing_dimension>_on_demand_cost`, `<billing_dimension>_committed_cost`, `<billing_dimension>_total_cost`) and the proportions (`<billing_dimension>_percentage_in_org`, `<billing_dimension>_percentage_in_account`). Use `*` to retrieve all fields. Example: `infra_host_on_demand_cost,infra_host_percentage_in_account` To obtain the complete list of active billing dimensions that can be used to replace `<billing_dimension>` in the field names, make a request to the [Get active billing dimensions API](https://docs.datadoghq.com/api/latest/usage-metering/#get-active-billing-dimensions-for-cost-attribution).
442443
# @param opts [Hash] the optional parameters
443-
# @option opts [Time] :end_month Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost ending this month.
444444
# @option opts [SortDirection] :sort_direction The direction to sort by: `[desc, asc]`.
445445
# @option opts [String] :sort_name The billing dimension to sort by. Always sorted by total cost. Example: `infra_host`.
446446
# @option opts [String] :tag_breakdown_keys Comma separated list of tag keys used to group cost. If no value is provided the cost will not be broken down by tags. To see which tags are available, look for the value of `tag_config_source` in the API response.
447447
# @option opts [String] :next_record_id List following results with a next_record_id provided in the previous query.
448448
# @option opts [Boolean] :include_descendants Include child org cost in the response. Defaults to `true`.
449449
# @return [Array<(MonthlyCostAttributionResponse, Integer, Hash)>] MonthlyCostAttributionResponse data, response status code and response headers
450-
def get_monthly_cost_attribution_with_http_info(start_month, fields, opts = {})
450+
def get_monthly_cost_attribution_with_http_info(start_month, end_month, fields, opts = {})
451451
unstable_enabled = @api_client.config.unstable_operations["v2.get_monthly_cost_attribution".to_sym]
452452
if unstable_enabled
453453
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_monthly_cost_attribution")
@@ -462,6 +462,10 @@ def get_monthly_cost_attribution_with_http_info(start_month, fields, opts = {})
462462
if @api_client.config.client_side_validation && start_month.nil?
463463
fail ArgumentError, "Missing the required parameter 'start_month' when calling UsageMeteringAPI.get_monthly_cost_attribution"
464464
end
465+
# verify the required parameter 'end_month' is set
466+
if @api_client.config.client_side_validation && end_month.nil?
467+
fail ArgumentError, "Missing the required parameter 'end_month' when calling UsageMeteringAPI.get_monthly_cost_attribution"
468+
end
465469
# verify the required parameter 'fields' is set
466470
if @api_client.config.client_side_validation && fields.nil?
467471
fail ArgumentError, "Missing the required parameter 'fields' when calling UsageMeteringAPI.get_monthly_cost_attribution"
@@ -476,8 +480,8 @@ def get_monthly_cost_attribution_with_http_info(start_month, fields, opts = {})
476480
# query parameters
477481
query_params = opts[:query_params] || {}
478482
query_params[:'start_month'] = start_month
483+
query_params[:'end_month'] = end_month
479484
query_params[:'fields'] = fields
480-
query_params[:'end_month'] = opts[:'end_month'] if !opts[:'end_month'].nil?
481485
query_params[:'sort_direction'] = opts[:'sort_direction'] if !opts[:'sort_direction'].nil?
482486
query_params[:'sort_name'] = opts[:'sort_name'] if !opts[:'sort_name'].nil?
483487
query_params[:'tag_breakdown_keys'] = opts[:'tag_breakdown_keys'] if !opts[:'tag_breakdown_keys'].nil?

0 commit comments

Comments
 (0)