Skip to content

Commit 7f8d584

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit fb522ba of spec repo
1 parent 859f207 commit 7f8d584

File tree

7 files changed

+64
-8
lines changed

7 files changed

+64
-8
lines changed

.generated-info

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"spec_repo_commit": "98e3371",
3-
"generated": "2025-08-27 08:45:02.412"
2+
"spec_repo_commit": "fb522ba",
3+
"generated": "2025-08-27 10:19:22.119"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10662,6 +10662,12 @@ components:
1066210662
CreateDataDeletionRequestBodyAttributes:
1066310663
description: Attributes for creating a data deletion request.
1066410664
properties:
10665+
displayed_total:
10666+
description: The total number of elements to be deleted that the UI shows
10667+
to the user.
10668+
example: 25000
10669+
format: int64
10670+
type: integer
1066510671
from:
1066610672
description: Start of requested time window, milliseconds since Unix epoch.
1066710673
example: 1672527600000
@@ -10694,6 +10700,7 @@ components:
1069410700
- query
1069510701
- from
1069610702
- to
10703+
- displayed_total
1069710704
type: object
1069810705
CreateDataDeletionRequestBodyData:
1069910706
description: Data needed to create a data deletion request.
@@ -12947,6 +12954,11 @@ components:
1294712954
example: 1704063600000
1294812955
format: int64
1294912956
type: integer
12957+
total_displayed:
12958+
description: Total number of elements to be deleted according to the UI.
12959+
example: 100
12960+
format: int64
12961+
type: integer
1295012962
total_unrestricted:
1295112963
description: Total number of elements to be deleted. Only the data accessible
1295212964
to the current user that matches the query and timeframe provided will
@@ -12969,6 +12981,7 @@ components:
1296912981
- starting_at
1297012982
- status
1297112983
- to_time
12984+
- total_displayed
1297212985
- total_unrestricted
1297312986
- updated_at
1297412987
type: object

examples/v2/data-deletion/CreateDataDeletionRequest.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
body = DatadogAPIClient::V2::CreateDataDeletionRequestBody.new({
1010
data: DatadogAPIClient::V2::CreateDataDeletionRequestBodyData.new({
1111
attributes: DatadogAPIClient::V2::CreateDataDeletionRequestBodyAttributes.new({
12+
displayed_total: 25000,
1213
from: 1672527600000,
1314
indexes: [
1415
"test-index",

features/v2/data_deletion.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Feature: Data Deletion
4343
Given operation "CreateDataDeletionRequest" enabled
4444
And new "CreateDataDeletionRequest" request
4545
And request contains "product" parameter from "REPLACE.ME"
46-
And body with value {"data": {"attributes": {"from": 1672527600000, "indexes": ["test-index", "test-index-2"], "query": {"host": "abc", "service": "xyz"}, "to": 1704063600000}, "type": "create_deletion_req"}}
46+
And body with value {"data": {"attributes": {"displayed_total": 25000, "from": 1672527600000, "indexes": ["test-index", "test-index-2"], "query": {"host": "abc", "service": "xyz"}, "to": 1704063600000}, "type": "create_deletion_req"}}
4747
When the request is sent
4848
Then the response status is 400 Bad Request
4949

@@ -52,7 +52,7 @@ Feature: Data Deletion
5252
Given operation "CreateDataDeletionRequest" enabled
5353
And new "CreateDataDeletionRequest" request
5454
And request contains "product" parameter with value "logs"
55-
And body with value {"data": {"attributes": {"from": 1672527600000, "indexes": ["test-index", "test-index-2"], "query": {"host": "abc", "service": "xyz"}, "to": 1704063600000}, "type": "create_deletion_req"}}
55+
And body with value {"data": {"attributes": {"displayed_total": 25000, "from": 1672527600000, "indexes": ["test-index", "test-index-2"], "query": {"host": "abc", "service": "xyz"}, "to": 1704063600000}, "type": "create_deletion_req"}}
5656
When the request is sent
5757
Then the response status is 200 OK
5858
And the response "data.type" is equal to "deletion_request"
@@ -64,7 +64,7 @@ Feature: Data Deletion
6464
Given operation "CreateDataDeletionRequest" enabled
6565
And new "CreateDataDeletionRequest" request
6666
And request contains "product" parameter with value "logs"
67-
And body with value {"data": {"attributes": {"from": 1672527600000, "indexes": ["test-index", "test-index-2"], "query": {}, "to": 1704063600000}, "type": "create_deletion_req"}}
67+
And body with value {"data": {"attributes": {"displayed_total": 25000, "from": 1672527600000, "indexes": ["test-index", "test-index-2"], "query": {}, "to": 1704063600000}, "type": "create_deletion_req"}}
6868
When the request is sent
6969
Then the response status is 412 Precondition failed error
7070

features/v2/given.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197
},
198198
{
199199
"name": "body",
200-
"value": "{\n \"data\": {\n \"attributes\": {\n \"from\": 1672527600000,\n \"to\": 1704063600000,\n \"indexes\": [\"test-index\", \"test-index-2\"],\n \"query\": {\"host\": \"abc\", \"service\": \"xyz\"}\n },\n \"type\": \"create_deletion_req\"\n }\n}"
200+
"value": "{\n \"data\": {\n \"attributes\": {\n \"from\": 1672527600000,\n \"to\": 1704063600000,\n \"indexes\": [\"test-index\", \"test-index-2\"],\n \"query\": {\"host\": \"abc\", \"service\": \"xyz\"},\n \"displayed_total\": 25000\n },\n \"type\": \"create_deletion_req\"\n }\n}"
201201
}
202202
],
203203
"step": "there is a valid \"deletion_request\" in the system",

lib/datadog_api_client/v2/models/create_data_deletion_request_body_attributes.rb

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

24+
# The total number of elements to be deleted that the UI shows to the user.
25+
attr_reader :displayed_total
26+
2427
# Start of requested time window, milliseconds since Unix epoch.
2528
attr_reader :from
2629

@@ -39,6 +42,7 @@ class CreateDataDeletionRequestBodyAttributes
3942
# @!visibility private
4043
def self.attribute_map
4144
{
45+
:'displayed_total' => :'displayed_total',
4246
:'from' => :'from',
4347
:'indexes' => :'indexes',
4448
:'query' => :'query',
@@ -50,6 +54,7 @@ def self.attribute_map
5054
# @!visibility private
5155
def self.openapi_types
5256
{
57+
:'displayed_total' => :'Integer',
5358
:'from' => :'Integer',
5459
:'indexes' => :'Array<String>',
5560
:'query' => :'Hash<String, String>',
@@ -75,6 +80,10 @@ def initialize(attributes = {})
7580
end
7681
}
7782

83+
if attributes.key?(:'displayed_total')
84+
self.displayed_total = attributes[:'displayed_total']
85+
end
86+
7887
if attributes.key?(:'from')
7988
self.from = attributes[:'from']
8089
end
@@ -98,12 +107,23 @@ def initialize(attributes = {})
98107
# @return true if the model is valid
99108
# @!visibility private
100109
def valid?
110+
return false if @displayed_total.nil?
101111
return false if @from.nil?
102112
return false if @query.nil?
103113
return false if @to.nil?
104114
true
105115
end
106116

117+
# Custom attribute writer method with validation
118+
# @param displayed_total [Object] Object to be assigned
119+
# @!visibility private
120+
def displayed_total=(displayed_total)
121+
if displayed_total.nil?
122+
fail ArgumentError, 'invalid value for "displayed_total", displayed_total cannot be nil.'
123+
end
124+
@displayed_total = displayed_total
125+
end
126+
107127
# Custom attribute writer method with validation
108128
# @param from [Object] Object to be assigned
109129
# @!visibility private
@@ -160,6 +180,7 @@ def to_hash
160180
def ==(o)
161181
return true if self.equal?(o)
162182
self.class == o.class &&
183+
displayed_total == o.displayed_total &&
163184
from == o.from &&
164185
indexes == o.indexes &&
165186
query == o.query &&
@@ -171,7 +192,7 @@ def ==(o)
171192
# @return [Integer] Hash code
172193
# @!visibility private
173194
def hash
174-
[from, indexes, query, to, additional_properties].hash
195+
[displayed_total, from, indexes, query, to, additional_properties].hash
175196
end
176197
end
177198
end

lib/datadog_api_client/v2/models/data_deletion_response_item_attributes.rb

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ class DataDeletionResponseItemAttributes
5454
# End of requested time window, milliseconds since Unix epoch.
5555
attr_reader :to_time
5656

57+
# Total number of elements to be deleted according to the UI.
58+
attr_reader :total_displayed
59+
5760
# Total number of elements to be deleted. Only the data accessible to the current user that matches the query and timeframe provided will be deleted.
5861
attr_reader :total_unrestricted
5962

@@ -77,6 +80,7 @@ def self.attribute_map
7780
:'starting_at' => :'starting_at',
7881
:'status' => :'status',
7982
:'to_time' => :'to_time',
83+
:'total_displayed' => :'total_displayed',
8084
:'total_unrestricted' => :'total_unrestricted',
8185
:'updated_at' => :'updated_at'
8286
}
@@ -97,6 +101,7 @@ def self.openapi_types
97101
:'starting_at' => :'String',
98102
:'status' => :'String',
99103
:'to_time' => :'Integer',
104+
:'total_displayed' => :'Integer',
100105
:'total_unrestricted' => :'Integer',
101106
:'updated_at' => :'String'
102107
}
@@ -166,6 +171,10 @@ def initialize(attributes = {})
166171
self.to_time = attributes[:'to_time']
167172
end
168173

174+
if attributes.key?(:'total_displayed')
175+
self.total_displayed = attributes[:'total_displayed']
176+
end
177+
169178
if attributes.key?(:'total_unrestricted')
170179
self.total_unrestricted = attributes[:'total_unrestricted']
171180
end
@@ -189,6 +198,7 @@ def valid?
189198
return false if @starting_at.nil?
190199
return false if @status.nil?
191200
return false if @to_time.nil?
201+
return false if @total_displayed.nil?
192202
return false if @total_unrestricted.nil?
193203
return false if @updated_at.nil?
194204
true
@@ -294,6 +304,16 @@ def to_time=(to_time)
294304
@to_time = to_time
295305
end
296306

307+
# Custom attribute writer method with validation
308+
# @param total_displayed [Object] Object to be assigned
309+
# @!visibility private
310+
def total_displayed=(total_displayed)
311+
if total_displayed.nil?
312+
fail ArgumentError, 'invalid value for "total_displayed", total_displayed cannot be nil.'
313+
end
314+
@total_displayed = total_displayed
315+
end
316+
297317
# Custom attribute writer method with validation
298318
# @param total_unrestricted [Object] Object to be assigned
299319
# @!visibility private
@@ -351,6 +371,7 @@ def ==(o)
351371
starting_at == o.starting_at &&
352372
status == o.status &&
353373
to_time == o.to_time &&
374+
total_displayed == o.total_displayed &&
354375
total_unrestricted == o.total_unrestricted &&
355376
updated_at == o.updated_at &&
356377
additional_properties == o.additional_properties
@@ -360,7 +381,7 @@ def ==(o)
360381
# @return [Integer] Hash code
361382
# @!visibility private
362383
def hash
363-
[created_at, created_by, from_time, indexes, is_created, org_id, product, query, starting_at, status, to_time, total_unrestricted, updated_at, additional_properties].hash
384+
[created_at, created_by, from_time, indexes, is_created, org_id, product, query, starting_at, status, to_time, total_displayed, total_unrestricted, updated_at, additional_properties].hash
364385
end
365386
end
366387
end

0 commit comments

Comments
 (0)