Skip to content

Commit 15e93b0

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 2011bb0 of spec repo
1 parent 859f207 commit 15e93b0

File tree

7 files changed

+63
-8
lines changed

7 files changed

+63
-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": "2011bb0",
3+
"generated": "2025-08-27 13:49:33.827"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10662,6 +10662,11 @@ components:
1066210662
CreateDataDeletionRequestBodyAttributes:
1066310663
description: Attributes for creating a data deletion request.
1066410664
properties:
10665+
displayed_total:
10666+
description: Total number of elements to be deleted according to the UI.
10667+
example: 25000
10668+
format: int64
10669+
type: integer
1066510670
from:
1066610671
description: Start of requested time window, milliseconds since Unix epoch.
1066710672
example: 1672527600000
@@ -10694,6 +10699,7 @@ components:
1069410699
- query
1069510700
- from
1069610701
- to
10702+
- displayed_total
1069710703
type: object
1069810704
CreateDataDeletionRequestBodyData:
1069910705
description: Data needed to create a data deletion request.
@@ -12900,6 +12906,11 @@ components:
1290012906
description: User who created the deletion request.
1290112907
1290212908
type: string
12909+
displayed_total:
12910+
description: Total number of elements to be deleted according to the UI.
12911+
example: 25000
12912+
format: int64
12913+
type: integer
1290312914
from_time:
1290412915
description: Start of requested time window, milliseconds since Unix epoch.
1290512916
example: 1672527600000
@@ -12961,6 +12972,7 @@ components:
1296112972
required:
1296212973
- created_at
1296312974
- created_by
12975+
- displayed_total
1296412976
- from_time
1296512977
- is_created
1296612978
- org_id

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 \"displayed_total\": 25000,\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}"
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+
# Total number of elements to be deleted according to the UI.
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
@@ -27,6 +27,9 @@ class DataDeletionResponseItemAttributes
2727
# User who created the deletion request.
2828
attr_reader :created_by
2929

30+
# Total number of elements to be deleted according to the UI.
31+
attr_reader :displayed_total
32+
3033
# Start of requested time window, milliseconds since Unix epoch.
3134
attr_reader :from_time
3235

@@ -68,6 +71,7 @@ def self.attribute_map
6871
{
6972
:'created_at' => :'created_at',
7073
:'created_by' => :'created_by',
74+
:'displayed_total' => :'displayed_total',
7175
:'from_time' => :'from_time',
7276
:'indexes' => :'indexes',
7377
:'is_created' => :'is_created',
@@ -88,6 +92,7 @@ def self.openapi_types
8892
{
8993
:'created_at' => :'String',
9094
:'created_by' => :'String',
95+
:'displayed_total' => :'Integer',
9196
:'from_time' => :'Integer',
9297
:'indexes' => :'Array<String>',
9398
:'is_created' => :'Boolean',
@@ -128,6 +133,10 @@ def initialize(attributes = {})
128133
self.created_by = attributes[:'created_by']
129134
end
130135

136+
if attributes.key?(:'displayed_total')
137+
self.displayed_total = attributes[:'displayed_total']
138+
end
139+
131140
if attributes.key?(:'from_time')
132141
self.from_time = attributes[:'from_time']
133142
end
@@ -181,6 +190,7 @@ def initialize(attributes = {})
181190
def valid?
182191
return false if @created_at.nil?
183192
return false if @created_by.nil?
193+
return false if @displayed_total.nil?
184194
return false if @from_time.nil?
185195
return false if @is_created.nil?
186196
return false if @org_id.nil?
@@ -214,6 +224,16 @@ def created_by=(created_by)
214224
@created_by = created_by
215225
end
216226

227+
# Custom attribute writer method with validation
228+
# @param displayed_total [Object] Object to be assigned
229+
# @!visibility private
230+
def displayed_total=(displayed_total)
231+
if displayed_total.nil?
232+
fail ArgumentError, 'invalid value for "displayed_total", displayed_total cannot be nil.'
233+
end
234+
@displayed_total = displayed_total
235+
end
236+
217237
# Custom attribute writer method with validation
218238
# @param from_time [Object] Object to be assigned
219239
# @!visibility private
@@ -342,6 +362,7 @@ def ==(o)
342362
self.class == o.class &&
343363
created_at == o.created_at &&
344364
created_by == o.created_by &&
365+
displayed_total == o.displayed_total &&
345366
from_time == o.from_time &&
346367
indexes == o.indexes &&
347368
is_created == o.is_created &&
@@ -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, displayed_total, from_time, indexes, is_created, org_id, product, query, starting_at, status, to_time, total_unrestricted, updated_at, additional_properties].hash
364385
end
365386
end
366387
end

0 commit comments

Comments
 (0)