Skip to content

Commit 0d66279

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 07e3abbd of spec repo
1 parent 4249e96 commit 0d66279

18 files changed

+58
-41
lines changed

.apigentools-info

+4-4
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": "2025-01-15 09:47:00.356255",
8-
"spec_repo_commit": "21b02fc5"
7+
"regenerated": "2025-01-15 18:03:54.653963",
8+
"spec_repo_commit": "07e3abbd"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-01-15 09:47:00.371502",
13-
"spec_repo_commit": "21b02fc5"
12+
"regenerated": "2025-01-15 18:03:54.669393",
13+
"spec_repo_commit": "07e3abbd"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -7194,8 +7194,13 @@ components:
71947194
properties:
71957195
attributes:
71967196
$ref: '#/components/schemas/CreateDataDeletionRequestBodyAttributes'
7197+
type:
7198+
description: The deletion request type.
7199+
example: create_deletion_req
7200+
type: string
71977201
required:
71987202
- attributes
7203+
- type
71997204
type: object
72007205
CreateDataDeletionResponseBody:
72017206
description: The response from the create data deletion request endpoint.

examples/v2_data-deletion_CreateDataDeletionRequest.rs

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ async fn main() {
1818
1704063600000,
1919
)
2020
.indexes(vec!["test-index".to_string(), "test-index-2".to_string()]),
21+
"create_deletion_req".to_string(),
2122
));
2223
let mut configuration = datadog::Configuration::new();
2324
configuration.set_unstable_operation_enabled("v2.CreateDataDeletionRequest", true);

src/datadogV2/model/model_create_data_deletion_request_body_data.rs

+11
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ pub struct CreateDataDeletionRequestBodyData {
1414
/// Attributes for creating a data deletion request.
1515
#[serde(rename = "attributes")]
1616
pub attributes: crate::datadogV2::model::CreateDataDeletionRequestBodyAttributes,
17+
/// The deletion request type.
18+
#[serde(rename = "type")]
19+
pub type_: String,
1720
#[serde(flatten)]
1821
pub additional_properties: std::collections::BTreeMap<String, serde_json::Value>,
1922
#[serde(skip)]
@@ -24,9 +27,11 @@ pub struct CreateDataDeletionRequestBodyData {
2427
impl CreateDataDeletionRequestBodyData {
2528
pub fn new(
2629
attributes: crate::datadogV2::model::CreateDataDeletionRequestBodyAttributes,
30+
type_: String,
2731
) -> CreateDataDeletionRequestBodyData {
2832
CreateDataDeletionRequestBodyData {
2933
attributes,
34+
type_,
3035
additional_properties: std::collections::BTreeMap::new(),
3136
_unparsed: false,
3237
}
@@ -61,6 +66,7 @@ impl<'de> Deserialize<'de> for CreateDataDeletionRequestBodyData {
6166
let mut attributes: Option<
6267
crate::datadogV2::model::CreateDataDeletionRequestBodyAttributes,
6368
> = None;
69+
let mut type_: Option<String> = None;
6470
let mut additional_properties: std::collections::BTreeMap<
6571
String,
6672
serde_json::Value,
@@ -72,6 +78,9 @@ impl<'de> Deserialize<'de> for CreateDataDeletionRequestBodyData {
7278
"attributes" => {
7379
attributes = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
7480
}
81+
"type" => {
82+
type_ = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
83+
}
7584
&_ => {
7685
if let Ok(value) = serde_json::from_value(v.clone()) {
7786
additional_properties.insert(k, value);
@@ -80,9 +89,11 @@ impl<'de> Deserialize<'de> for CreateDataDeletionRequestBodyData {
8089
}
8190
}
8291
let attributes = attributes.ok_or_else(|| M::Error::missing_field("attributes"))?;
92+
let type_ = type_.ok_or_else(|| M::Error::missing_field("type_"))?;
8393

8494
let content = CreateDataDeletionRequestBodyData {
8595
attributes,
96+
type_,
8697
additional_properties,
8798
_unparsed,
8899
};
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-12-05T09:23:41.160Z
1+
2025-01-15T14:25:54.929Z

tests/scenarios/cassettes/v2/data_deletion/Cancels-a-data-deletion-request-returns-Bad-Request-response.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"message": "Bad Request"
2727
}
2828
},
29-
"recorded_at": "Thu, 05 Dec 2024 09:23:41 GMT"
29+
"recorded_at": "Wed, 15 Jan 2025 14:25:54 GMT"
3030
}
3131
],
3232
"recorded_with": "VCR 6.0.0"
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-12-05T09:23:41.674Z
1+
2025-01-15T14:26:08.930Z

tests/scenarios/cassettes/v2/data_deletion/Cancels-a-data-deletion-request-returns-OK-response.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"request": {
55
"body": {
6-
"string": "{\"data\":{\"attributes\":{\"from\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"query\":{\"host\":\"abc\",\"service\":\"xyz\"},\"to\":1704063600000}}}",
6+
"string": "{\"data\":{\"attributes\":{\"from\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"query\":{\"host\":\"abc\",\"service\":\"xyz\"},\"to\":1704063600000},\"type\":\"create_deletion_req\"}}",
77
"encoding": null
88
},
99
"headers": {
@@ -19,7 +19,7 @@
1919
},
2020
"response": {
2121
"body": {
22-
"string": "{\"data\":{\"id\":\"523\",\"type\":\"deletion_request\",\"attributes\":{\"created_at\":\"2024-12-05T09:23:42.016613164Z\",\"created_by\":\"[email protected]\",\"from_time\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"is_created\":false,\"org_id\":321813,\"product\":\"logs\",\"query\":\"host:abc service:xyz\",\"starting_at\":\"0001-01-01T00:00:00Z\",\"status\":\"pending\",\"to_time\":1704063600000,\"total_unrestricted\":0,\"updated_at\":\"2024-12-05T09:23:42.016613164Z\"}},\"meta\":{\"product\":\"logs\"}}",
22+
"string": "{\"data\":{\"id\":\"753\",\"type\":\"deletion_request\",\"attributes\":{\"created_at\":\"2025-01-15T14:26:09.447960191Z\",\"created_by\":\"[email protected]\",\"from_time\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"is_created\":false,\"org_id\":321813,\"product\":\"logs\",\"query\":\"host:abc service:xyz\",\"starting_at\":\"0001-01-01T00:00:00Z\",\"status\":\"pending\",\"to_time\":1704063600000,\"total_unrestricted\":0,\"updated_at\":\"2025-01-15T14:26:09.447960191Z\"}},\"meta\":{\"product\":\"logs\"}}",
2323
"encoding": null
2424
},
2525
"headers": {
@@ -32,7 +32,7 @@
3232
"message": "OK"
3333
}
3434
},
35-
"recorded_at": "Thu, 05 Dec 2024 09:23:41 GMT"
35+
"recorded_at": "Wed, 15 Jan 2025 14:26:08 GMT"
3636
},
3737
{
3838
"request": {
@@ -43,11 +43,11 @@
4343
]
4444
},
4545
"method": "put",
46-
"uri": "https://api.datadoghq.com/api/v2/deletion/requests/523/cancel"
46+
"uri": "https://api.datadoghq.com/api/v2/deletion/requests/753/cancel"
4747
},
4848
"response": {
4949
"body": {
50-
"string": "{\"data\":{\"id\":\"523\",\"type\":\"deletion_request\",\"attributes\":{\"created_at\":\"2024-12-05T09:23:42.016613Z\",\"created_by\":\"[email protected]\",\"from_time\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"is_created\":false,\"org_id\":321813,\"product\":\"logs\",\"query\":\"host:abc service:xyz\",\"starting_at\":\"0001-01-01T00:00:00Z\",\"status\":\"canceled\",\"to_time\":1704063600000,\"total_unrestricted\":0,\"updated_at\":\"2024-12-05T09:23:42.384299Z\"}},\"meta\":{\"product\":\"logs\",\"request_status\":\"canceled\"}}",
50+
"string": "{\"data\":{\"id\":\"753\",\"type\":\"deletion_request\",\"attributes\":{\"created_at\":\"2025-01-15T14:26:09.44796Z\",\"created_by\":\"[email protected]\",\"from_time\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"is_created\":false,\"org_id\":321813,\"product\":\"logs\",\"query\":\"host:abc service:xyz\",\"starting_at\":\"0001-01-01T00:00:00Z\",\"status\":\"canceled\",\"to_time\":1704063600000,\"total_unrestricted\":0,\"updated_at\":\"2025-01-15T14:26:10.016496Z\"}},\"meta\":{\"product\":\"logs\",\"request_status\":\"canceled\"}}",
5151
"encoding": null
5252
},
5353
"headers": {
@@ -60,7 +60,7 @@
6060
"message": "OK"
6161
}
6262
},
63-
"recorded_at": "Thu, 05 Dec 2024 09:23:41 GMT"
63+
"recorded_at": "Wed, 15 Jan 2025 14:26:08 GMT"
6464
},
6565
{
6666
"request": {
@@ -71,11 +71,11 @@
7171
]
7272
},
7373
"method": "put",
74-
"uri": "https://api.datadoghq.com/api/v2/deletion/requests/523/cancel"
74+
"uri": "https://api.datadoghq.com/api/v2/deletion/requests/753/cancel"
7575
},
7676
"response": {
7777
"body": {
78-
"string": "{\"data\":{\"id\":\"523\",\"type\":\"deletion_request\",\"attributes\":{\"created_at\":\"2024-12-05T09:23:42.016613Z\",\"created_by\":\"[email protected]\",\"from_time\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"is_created\":false,\"org_id\":321813,\"product\":\"logs\",\"query\":\"host:abc service:xyz\",\"starting_at\":\"0001-01-01T00:00:00Z\",\"status\":\"canceled\",\"to_time\":1704063600000,\"total_unrestricted\":0,\"updated_at\":\"2024-12-05T09:23:42.384299Z\"}},\"meta\":{\"product\":\"logs\",\"request_status\":\"canceled\"}}",
78+
"string": "{\"data\":{\"id\":\"753\",\"type\":\"deletion_request\",\"attributes\":{\"created_at\":\"2025-01-15T14:26:09.44796Z\",\"created_by\":\"[email protected]\",\"from_time\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"is_created\":false,\"org_id\":321813,\"product\":\"logs\",\"query\":\"host:abc service:xyz\",\"starting_at\":\"0001-01-01T00:00:00Z\",\"status\":\"canceled\",\"to_time\":1704063600000,\"total_unrestricted\":0,\"updated_at\":\"2025-01-15T14:26:10.016496Z\"}},\"meta\":{\"product\":\"logs\",\"request_status\":\"canceled\"}}",
7979
"encoding": null
8080
},
8181
"headers": {
@@ -88,7 +88,7 @@
8888
"message": "OK"
8989
}
9090
},
91-
"recorded_at": "Thu, 05 Dec 2024 09:23:41 GMT"
91+
"recorded_at": "Wed, 15 Jan 2025 14:26:08 GMT"
9292
}
9393
],
9494
"recorded_with": "VCR 6.0.0"
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-12-05T09:23:42.850Z
1+
2025-01-15T14:26:26.195Z

tests/scenarios/cassettes/v2/data_deletion/Cancels-a-data-deletion-request-returns-Precondition-failed-error-response.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"message": "Precondition Failed"
2727
}
2828
},
29-
"recorded_at": "Thu, 05 Dec 2024 09:23:42 GMT"
29+
"recorded_at": "Wed, 15 Jan 2025 14:26:26 GMT"
3030
}
3131
],
3232
"recorded_with": "VCR 6.0.0"
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-12-05T09:23:43.197Z
1+
2025-01-15T14:27:27.929Z

tests/scenarios/cassettes/v2/data_deletion/Creates-a-data-deletion-request-returns-OK-response.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"request": {
55
"body": {
6-
"string": "{\"data\":{\"attributes\":{\"from\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"query\":{\"host\":\"abc\",\"service\":\"xyz\"},\"to\":1704063600000}}}",
6+
"string": "{\"data\":{\"attributes\":{\"from\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"query\":{\"host\":\"abc\",\"service\":\"xyz\"},\"to\":1704063600000},\"type\":\"create_deletion_req\"}}",
77
"encoding": null
88
},
99
"headers": {
@@ -19,7 +19,7 @@
1919
},
2020
"response": {
2121
"body": {
22-
"string": "{\"data\":{\"id\":\"524\",\"type\":\"deletion_request\",\"attributes\":{\"created_at\":\"2024-12-05T09:23:43.527574137Z\",\"created_by\":\"[email protected]\",\"from_time\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"is_created\":false,\"org_id\":321813,\"product\":\"logs\",\"query\":\"host:abc service:xyz\",\"starting_at\":\"0001-01-01T00:00:00Z\",\"status\":\"pending\",\"to_time\":1704063600000,\"total_unrestricted\":0,\"updated_at\":\"2024-12-05T09:23:43.527574137Z\"}},\"meta\":{\"product\":\"logs\"}}",
22+
"string": "{\"data\":{\"id\":\"754\",\"type\":\"deletion_request\",\"attributes\":{\"created_at\":\"2025-01-15T14:27:28.457837225Z\",\"created_by\":\"[email protected]\",\"from_time\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"is_created\":false,\"org_id\":321813,\"product\":\"logs\",\"query\":\"host:abc service:xyz\",\"starting_at\":\"0001-01-01T00:00:00Z\",\"status\":\"pending\",\"to_time\":1704063600000,\"total_unrestricted\":0,\"updated_at\":\"2025-01-15T14:27:28.457837225Z\"}},\"meta\":{\"product\":\"logs\"}}",
2323
"encoding": null
2424
},
2525
"headers": {
@@ -32,7 +32,7 @@
3232
"message": "OK"
3333
}
3434
},
35-
"recorded_at": "Thu, 05 Dec 2024 09:23:43 GMT"
35+
"recorded_at": "Wed, 15 Jan 2025 14:27:27 GMT"
3636
},
3737
{
3838
"request": {
@@ -43,11 +43,11 @@
4343
]
4444
},
4545
"method": "put",
46-
"uri": "https://api.datadoghq.com/api/v2/deletion/requests/524/cancel"
46+
"uri": "https://api.datadoghq.com/api/v2/deletion/requests/754/cancel"
4747
},
4848
"response": {
4949
"body": {
50-
"string": "{\"data\":{\"id\":\"524\",\"type\":\"deletion_request\",\"attributes\":{\"created_at\":\"2024-12-05T09:23:43.527574Z\",\"created_by\":\"[email protected]\",\"from_time\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"is_created\":false,\"org_id\":321813,\"product\":\"logs\",\"query\":\"host:abc service:xyz\",\"starting_at\":\"0001-01-01T00:00:00Z\",\"status\":\"canceled\",\"to_time\":1704063600000,\"total_unrestricted\":0,\"updated_at\":\"2024-12-05T09:23:44.017414Z\"}},\"meta\":{\"product\":\"logs\",\"request_status\":\"canceled\"}}",
50+
"string": "{\"data\":{\"id\":\"754\",\"type\":\"deletion_request\",\"attributes\":{\"created_at\":\"2025-01-15T14:27:28.457837Z\",\"created_by\":\"[email protected]\",\"from_time\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"is_created\":false,\"org_id\":321813,\"product\":\"logs\",\"query\":\"host:abc service:xyz\",\"starting_at\":\"0001-01-01T00:00:00Z\",\"status\":\"canceled\",\"to_time\":1704063600000,\"total_unrestricted\":0,\"updated_at\":\"2025-01-15T14:27:28.841156Z\"}},\"meta\":{\"product\":\"logs\",\"request_status\":\"canceled\"}}",
5151
"encoding": null
5252
},
5353
"headers": {
@@ -60,7 +60,7 @@
6060
"message": "OK"
6161
}
6262
},
63-
"recorded_at": "Thu, 05 Dec 2024 09:23:43 GMT"
63+
"recorded_at": "Wed, 15 Jan 2025 14:27:27 GMT"
6464
}
6565
],
6666
"recorded_with": "VCR 6.0.0"
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-12-05T09:23:44.038Z
1+
2025-01-15T14:27:45.329Z

tests/scenarios/cassettes/v2/data_deletion/Creates-a-data-deletion-request-returns-Precondition-failed-error-response.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"request": {
55
"body": {
6-
"string": "{\"data\":{\"attributes\":{\"from\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"query\":{},\"to\":1704063600000}}}",
6+
"string": "{\"data\":{\"attributes\":{\"from\":1672527600000,\"indexes\":[\"test-index\",\"test-index-2\"],\"query\":{},\"to\":1704063600000},\"type\":\"create_deletion_req\"}}",
77
"encoding": null
88
},
99
"headers": {
@@ -32,7 +32,7 @@
3232
"message": "Precondition Failed"
3333
}
3434
},
35-
"recorded_at": "Thu, 05 Dec 2024 09:23:44 GMT"
35+
"recorded_at": "Wed, 15 Jan 2025 14:27:45 GMT"
3636
}
3737
],
3838
"recorded_with": "VCR 6.0.0"
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-12-05T09:23:44.395Z
1+
2025-01-15T14:28:03.053Z

tests/scenarios/cassettes/v2/data_deletion/Gets-a-list-of-data-deletion-requests-returns-OK-response.json

+8-8
Large diffs are not rendered by default.

tests/scenarios/features/v2/data_deletion.feature

+3-3
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}}}
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"}}
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}}}
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"}}
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}}}
67+
And body with value {"data": {"attributes": {"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

tests/scenarios/features/v2/given.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
},
149149
{
150150
"name": "body",
151-
"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 }\n}"
151+
"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}"
152152
}
153153
],
154154
"step": "there is a valid \"deletion_request\" in the system",

0 commit comments

Comments
 (0)