Skip to content

Commit d2141f9

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 1b56c3ba of spec repo
1 parent f8d3ffd commit d2141f9

25 files changed

+892
-65
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-08-14 22:32:06.462762",
8-
"spec_repo_commit": "07d72513"
7+
"regenerated": "2024-08-16 13:40:34.967692",
8+
"spec_repo_commit": "1b56c3ba"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-08-14 22:32:06.480578",
13-
"spec_repo_commit": "07d72513"
12+
"regenerated": "2024-08-16 13:40:34.985784",
13+
"spec_repo_commit": "1b56c3ba"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15143,6 +15143,12 @@ components:
1514315143
description: Unique identifier of the global variable.
1514415144
readOnly: true
1514515145
type: string
15146+
is_fido:
15147+
description: Determines if the global variable is a FIDO variable.
15148+
type: boolean
15149+
is_totp:
15150+
description: Determines if the global variable is a TOTP/MFA variable.
15151+
type: boolean
1514615152
name:
1514715153
description: Name of the global variable. Unique across Synthetic global
1514815154
variables.
@@ -15233,6 +15239,53 @@ components:
1523315239
- JSON_PATH
1523415240
- REGEX
1523515241
- X_PATH
15242+
SyntheticsGlobalVariableRequest:
15243+
description: Details of the global variable to create.
15244+
properties:
15245+
attributes:
15246+
$ref: '#/components/schemas/SyntheticsGlobalVariableAttributes'
15247+
description:
15248+
description: Description of the global variable.
15249+
example: Example description
15250+
type: string
15251+
id:
15252+
description: Unique identifier of the global variable.
15253+
readOnly: true
15254+
type: string
15255+
is_fido:
15256+
description: Determines if the global variable is a FIDO variable.
15257+
type: boolean
15258+
is_totp:
15259+
description: Determines if the global variable is a TOTP/MFA variable.
15260+
type: boolean
15261+
name:
15262+
description: Name of the global variable. Unique across Synthetic global
15263+
variables.
15264+
example: MY_VARIABLE
15265+
type: string
15266+
parse_test_options:
15267+
$ref: '#/components/schemas/SyntheticsGlobalVariableParseTestOptions'
15268+
parse_test_public_id:
15269+
description: A Synthetic test ID to use as a test to generate the variable
15270+
value.
15271+
example: abc-def-123
15272+
type: string
15273+
tags:
15274+
description: Tags of the global variable.
15275+
example:
15276+
- team:front
15277+
- test:workflow-1
15278+
items:
15279+
description: Tag name.
15280+
type: string
15281+
type: array
15282+
value:
15283+
$ref: '#/components/schemas/SyntheticsGlobalVariableValue'
15284+
required:
15285+
- description
15286+
- name
15287+
- tags
15288+
type: object
1523615289
SyntheticsGlobalVariableTOTPParameters:
1523715290
description: Parameters for the TOTP/MFA variable
1523815291
properties:
@@ -31194,7 +31247,7 @@ paths:
3119431247
content:
3119531248
application/json:
3119631249
schema:
31197-
$ref: '#/components/schemas/SyntheticsGlobalVariable'
31250+
$ref: '#/components/schemas/SyntheticsGlobalVariableRequest'
3119831251
description: Details of the global variable to create.
3119931252
required: true
3120031253
responses:
@@ -31328,7 +31381,7 @@ paths:
3132831381
content:
3132931382
application/json:
3133031383
schema:
31331-
$ref: '#/components/schemas/SyntheticsGlobalVariable'
31384+
$ref: '#/components/schemas/SyntheticsGlobalVariableRequest'
3133231385
description: Details of the global variable to update.
3133331386
required: true
3133431387
responses:

examples/v1_synthetics_CreateGlobalVariable.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
11
// Create a global variable returns "OK" response
22
use datadog_api_client::datadog;
33
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
4-
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariable;
54
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableAttributes;
65
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableParseTestOptions;
76
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableParseTestOptionsType;
87
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableParserType;
8+
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableRequest;
99
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableValue;
1010
use datadog_api_client::datadogV1::model::SyntheticsVariableParser;
1111

1212
#[tokio::main]
1313
async fn main() {
14-
let body = SyntheticsGlobalVariable::new(
14+
let body = SyntheticsGlobalVariableRequest::new(
1515
"Example description".to_string(),
1616
"MY_VARIABLE".to_string(),
1717
vec!["team:front".to_string(), "test:workflow-1".to_string()],
18-
SyntheticsGlobalVariableValue::new()
19-
.secure(true)
20-
.value("value".to_string()),
2118
)
2219
.attributes(
2320
SyntheticsGlobalVariableAttributes::new()
@@ -34,7 +31,12 @@ async fn main() {
3431
.value(".*".to_string()),
3532
),
3633
)
37-
.parse_test_public_id("abc-def-123".to_string());
34+
.parse_test_public_id("abc-def-123".to_string())
35+
.value(
36+
SyntheticsGlobalVariableValue::new()
37+
.secure(true)
38+
.value("value".to_string()),
39+
);
3840
let configuration = datadog::Configuration::new();
3941
let api = SyntheticsAPI::with_config(configuration);
4042
let resp = api.create_global_variable(body).await;

examples/v1_synthetics_CreateGlobalVariable_1068962881.rs

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,33 @@
11
// Create a global variable from test returns "OK" response
22
use datadog_api_client::datadog;
33
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
4-
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariable;
5-
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableOptions;
64
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableParseTestOptions;
75
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableParseTestOptionsType;
8-
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableTOTPParameters;
6+
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableRequest;
97
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableValue;
108

119
#[tokio::main]
1210
async fn main() {
1311
// there is a valid "synthetics_api_test_multi_step" in the system
1412
let synthetics_api_test_multi_step_public_id =
1513
std::env::var("SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID").unwrap();
16-
let body = SyntheticsGlobalVariable::new(
14+
let body = SyntheticsGlobalVariableRequest::new(
1715
"".to_string(),
18-
"GLOBAL_VARIABLE_PAYLOAD_EXAMPLESYNTHETIC".to_string(),
16+
"GLOBAL_VARIABLE_FROM_TEST_PAYLOAD_EXAMPLESYNTHETIC".to_string(),
1917
vec![],
20-
SyntheticsGlobalVariableValue::new()
21-
.options(
22-
SyntheticsGlobalVariableOptions::new().totp_parameters(
23-
SyntheticsGlobalVariableTOTPParameters::new()
24-
.digits(6)
25-
.refresh_interval(30),
26-
),
27-
)
28-
.secure(false)
29-
.value("".to_string()),
3018
)
3119
.parse_test_options(
3220
SyntheticsGlobalVariableParseTestOptions::new(
3321
SyntheticsGlobalVariableParseTestOptionsType::LOCAL_VARIABLE,
3422
)
3523
.local_variable_name("EXTRACTED_VALUE".to_string()),
3624
)
37-
.parse_test_public_id(synthetics_api_test_multi_step_public_id.clone());
25+
.parse_test_public_id(synthetics_api_test_multi_step_public_id.clone())
26+
.value(
27+
SyntheticsGlobalVariableValue::new()
28+
.secure(false)
29+
.value("".to_string()),
30+
);
3831
let configuration = datadog::Configuration::new();
3932
let api = SyntheticsAPI::with_config(configuration);
4033
let resp = api.create_global_variable(body).await;
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Create a FIDO global variable returns "OK" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
4+
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableRequest;
5+
6+
#[tokio::main]
7+
async fn main() {
8+
let body = SyntheticsGlobalVariableRequest::new(
9+
"".to_string(),
10+
"GLOBAL_VARIABLE_FIDO_PAYLOAD_EXAMPLESYNTHETIC".to_string(),
11+
vec![],
12+
)
13+
.is_fido(true);
14+
let configuration = datadog::Configuration::new();
15+
let api = SyntheticsAPI::with_config(configuration);
16+
let resp = api.create_global_variable(body).await;
17+
if let Ok(value) = resp {
18+
println!("{:#?}", value);
19+
} else {
20+
println!("{:#?}", resp.unwrap_err());
21+
}
22+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// Create a TOTP global variable returns "OK" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
4+
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableOptions;
5+
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableRequest;
6+
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableTOTPParameters;
7+
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableValue;
8+
9+
#[tokio::main]
10+
async fn main() {
11+
let body = SyntheticsGlobalVariableRequest::new(
12+
"".to_string(),
13+
"GLOBAL_VARIABLE_TOTP_PAYLOAD_EXAMPLESYNTHETIC".to_string(),
14+
vec![],
15+
)
16+
.is_totp(true)
17+
.value(
18+
SyntheticsGlobalVariableValue::new()
19+
.options(
20+
SyntheticsGlobalVariableOptions::new().totp_parameters(
21+
SyntheticsGlobalVariableTOTPParameters::new()
22+
.digits(6)
23+
.refresh_interval(30),
24+
),
25+
)
26+
.secure(false)
27+
.value("".to_string()),
28+
);
29+
let configuration = datadog::Configuration::new();
30+
let api = SyntheticsAPI::with_config(configuration);
31+
let resp = api.create_global_variable(body).await;
32+
if let Ok(value) = resp {
33+
println!("{:#?}", value);
34+
} else {
35+
println!("{:#?}", resp.unwrap_err());
36+
}
37+
}

examples/v1_synthetics_EditGlobalVariable.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
11
// Edit a global variable returns "OK" response
22
use datadog_api_client::datadog;
33
use datadog_api_client::datadogV1::api_synthetics::SyntheticsAPI;
4-
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariable;
54
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableAttributes;
65
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableParseTestOptions;
76
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableParseTestOptionsType;
87
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableParserType;
8+
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableRequest;
99
use datadog_api_client::datadogV1::model::SyntheticsGlobalVariableValue;
1010
use datadog_api_client::datadogV1::model::SyntheticsVariableParser;
1111

1212
#[tokio::main]
1313
async fn main() {
14-
let body = SyntheticsGlobalVariable::new(
14+
let body = SyntheticsGlobalVariableRequest::new(
1515
"Example description".to_string(),
1616
"MY_VARIABLE".to_string(),
1717
vec!["team:front".to_string(), "test:workflow-1".to_string()],
18-
SyntheticsGlobalVariableValue::new()
19-
.secure(true)
20-
.value("value".to_string()),
2118
)
2219
.attributes(
2320
SyntheticsGlobalVariableAttributes::new()
@@ -34,7 +31,12 @@ async fn main() {
3431
.value(".*".to_string()),
3532
),
3633
)
37-
.parse_test_public_id("abc-def-123".to_string());
34+
.parse_test_public_id("abc-def-123".to_string())
35+
.value(
36+
SyntheticsGlobalVariableValue::new()
37+
.secure(true)
38+
.value("value".to_string()),
39+
);
3840
let configuration = datadog::Configuration::new();
3941
let api = SyntheticsAPI::with_config(configuration);
4042
let resp = api

src/datadogV1/api/api_synthetics.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ impl SyntheticsAPI {
401401
/// Create a Synthetic global variable.
402402
pub async fn create_global_variable(
403403
&self,
404-
body: crate::datadogV1::model::SyntheticsGlobalVariable,
404+
body: crate::datadogV1::model::SyntheticsGlobalVariableRequest,
405405
) -> Result<
406406
crate::datadogV1::model::SyntheticsGlobalVariable,
407407
datadog::Error<CreateGlobalVariableError>,
@@ -423,7 +423,7 @@ impl SyntheticsAPI {
423423
/// Create a Synthetic global variable.
424424
pub async fn create_global_variable_with_http_info(
425425
&self,
426-
body: crate::datadogV1::model::SyntheticsGlobalVariable,
426+
body: crate::datadogV1::model::SyntheticsGlobalVariableRequest,
427427
) -> Result<
428428
datadog::ResponseContent<crate::datadogV1::model::SyntheticsGlobalVariable>,
429429
datadog::Error<CreateGlobalVariableError>,
@@ -1358,7 +1358,7 @@ impl SyntheticsAPI {
13581358
pub async fn edit_global_variable(
13591359
&self,
13601360
variable_id: String,
1361-
body: crate::datadogV1::model::SyntheticsGlobalVariable,
1361+
body: crate::datadogV1::model::SyntheticsGlobalVariableRequest,
13621362
) -> Result<
13631363
crate::datadogV1::model::SyntheticsGlobalVariable,
13641364
datadog::Error<EditGlobalVariableError>,
@@ -1384,7 +1384,7 @@ impl SyntheticsAPI {
13841384
pub async fn edit_global_variable_with_http_info(
13851385
&self,
13861386
variable_id: String,
1387-
body: crate::datadogV1::model::SyntheticsGlobalVariable,
1387+
body: crate::datadogV1::model::SyntheticsGlobalVariableRequest,
13881388
) -> Result<
13891389
datadog::ResponseContent<crate::datadogV1::model::SyntheticsGlobalVariable>,
13901390
datadog::Error<EditGlobalVariableError>,

src/datadogV1/model/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,6 +1516,8 @@ pub mod model_synthetics_global_variable_options;
15161516
pub use self::model_synthetics_global_variable_options::SyntheticsGlobalVariableOptions;
15171517
pub mod model_synthetics_global_variable_totp_parameters;
15181518
pub use self::model_synthetics_global_variable_totp_parameters::SyntheticsGlobalVariableTOTPParameters;
1519+
pub mod model_synthetics_global_variable_request;
1520+
pub use self::model_synthetics_global_variable_request::SyntheticsGlobalVariableRequest;
15191521
pub mod model_tag_to_hosts;
15201522
pub use self::model_tag_to_hosts::TagToHosts;
15211523
pub mod model_host_tags;

0 commit comments

Comments
 (0)