Skip to content

Commit d1fe5dd

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit fae9d797 of spec repo
1 parent 57bdfb3 commit d1fe5dd

File tree

4 files changed

+32
-6
lines changed

4 files changed

+32
-6
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-07-02 18:17:53.184204",
8-
"spec_repo_commit": "464f0cec"
7+
"regenerated": "2024-07-02 18:50:32.192164",
8+
"spec_repo_commit": "fae9d797"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-07-02 18:17:53.201791",
13-
"spec_repo_commit": "464f0cec"
12+
"regenerated": "2024-07-02 18:50:32.211734",
13+
"spec_repo_commit": "fae9d797"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14944,6 +14944,13 @@ components:
1494414944

1494514945
to delete.'
1494614946
properties:
14947+
force_delete_dependencies:
14948+
description: 'Delete the Synthetic test even if it''s referenced by other
14949+
resources
14950+
14951+
(for example, SLOs and composite monitors).'
14952+
example: false
14953+
type: boolean
1494714954
public_ids:
1494814955
description: An array of Synthetic test IDs you want to delete.
1494914956
example: []

src/datadogV1/model/model_synthetics_delete_tests_payload.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ use std::fmt::{self, Formatter};
1212
#[skip_serializing_none]
1313
#[derive(Clone, Debug, PartialEq, Serialize)]
1414
pub struct SyntheticsDeleteTestsPayload {
15+
/// Delete the Synthetic test even if it's referenced by other resources
16+
/// (for example, SLOs and composite monitors).
17+
#[serde(rename = "force_delete_dependencies")]
18+
pub force_delete_dependencies: Option<bool>,
1519
/// An array of Synthetic test IDs you want to delete.
1620
#[serde(rename = "public_ids")]
1721
pub public_ids: Option<Vec<String>>,
@@ -23,11 +27,17 @@ pub struct SyntheticsDeleteTestsPayload {
2327
impl SyntheticsDeleteTestsPayload {
2428
pub fn new() -> SyntheticsDeleteTestsPayload {
2529
SyntheticsDeleteTestsPayload {
30+
force_delete_dependencies: None,
2631
public_ids: None,
2732
_unparsed: false,
2833
}
2934
}
3035

36+
pub fn force_delete_dependencies(mut self, value: bool) -> Self {
37+
self.force_delete_dependencies = Some(value);
38+
self
39+
}
40+
3141
pub fn public_ids(mut self, value: Vec<String>) -> Self {
3242
self.public_ids = Some(value);
3343
self
@@ -57,11 +67,19 @@ impl<'de> Deserialize<'de> for SyntheticsDeleteTestsPayload {
5767
where
5868
M: MapAccess<'a>,
5969
{
70+
let mut force_delete_dependencies: Option<bool> = None;
6071
let mut public_ids: Option<Vec<String>> = None;
6172
let mut _unparsed = false;
6273

6374
while let Some((k, v)) = map.next_entry::<String, serde_json::Value>()? {
6475
match k.as_str() {
76+
"force_delete_dependencies" => {
77+
if v.is_null() {
78+
continue;
79+
}
80+
force_delete_dependencies =
81+
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
82+
}
6583
"public_ids" => {
6684
if v.is_null() {
6785
continue;
@@ -73,6 +91,7 @@ impl<'de> Deserialize<'de> for SyntheticsDeleteTestsPayload {
7391
}
7492

7593
let content = SyntheticsDeleteTestsPayload {
94+
force_delete_dependencies,
7695
public_ids,
7796
_unparsed,
7897
};

tests/scenarios/features/v1/synthetics.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,14 +269,14 @@ Feature: Synthetics
269269
@generated @skip @team:DataDog/synthetics-ct
270270
Scenario: Delete tests returns "- JSON format is wrong" response
271271
Given new "DeleteTests" request
272-
And body with value {"public_ids": []}
272+
And body with value {"force_delete_dependencies": false, "public_ids": []}
273273
When the request is sent
274274
Then the response status is 400 - JSON format is wrong
275275

276276
@generated @skip @team:DataDog/synthetics-ct
277277
Scenario: Delete tests returns "- Tests to be deleted can't be found" response
278278
Given new "DeleteTests" request
279-
And body with value {"public_ids": []}
279+
And body with value {"force_delete_dependencies": false, "public_ids": []}
280280
When the request is sent
281281
Then the response status is 404 - Tests to be deleted can't be found
282282

0 commit comments

Comments
 (0)