Skip to content

Commit 4942496

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Synthetics mobile test message field is now required (#750)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent d4f657a commit 4942496

File tree

5 files changed

+11
-16
lines changed

5 files changed

+11
-16
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": "2025-06-26 17:56:17.758022",
8-
"spec_repo_commit": "76086f13"
7+
"regenerated": "2025-06-30 10:29:36.333199",
8+
"spec_repo_commit": "be63084a"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-06-26 17:56:17.774479",
13-
"spec_repo_commit": "76086f13"
12+
"regenerated": "2025-06-30 10:29:36.349093",
13+
"spec_repo_commit": "be63084a"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16173,6 +16173,7 @@ components:
1617316173
- name
1617416174
- options
1617516175
- type
16176+
- message
1617616177
type: object
1617716178
SyntheticsMobileTestConfig:
1617816179
description: Configuration object for a Synthetic mobile test.

examples/v1_synthetics_CreateSyntheticsMobileTest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use datadog_api_client::datadogV1::model::SyntheticsTestPauseStatus;
1313
async fn main() {
1414
let body = SyntheticsMobileTest::new(
1515
SyntheticsMobileTestConfig::new().variables(vec![]),
16+
"".to_string(),
1617
"Example-Synthetic".to_string(),
1718
SyntheticsMobileTestOptions::new(
1819
vec!["synthetics:mobile:device:iphone_15_ios_17".to_string()],
@@ -25,7 +26,6 @@ async fn main() {
2526
),
2627
SyntheticsMobileTestType::MOBILE,
2728
)
28-
.message("".to_string())
2929
.status(SyntheticsTestPauseStatus::PAUSED)
3030
.steps(vec![]);
3131
let configuration = datadog::Configuration::new();

examples/v1_synthetics_UpdateMobileTest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ async fn main() {
1616
std::env::var("SYNTHETICS_MOBILE_TEST_PUBLIC_ID").unwrap();
1717
let body = SyntheticsMobileTest::new(
1818
SyntheticsMobileTestConfig::new().variables(vec![]),
19+
"".to_string(),
1920
"Example-Synthetic-updated".to_string(),
2021
SyntheticsMobileTestOptions::new(
2122
vec!["synthetics:mobile:device:iphone_15_ios_17".to_string()],
@@ -28,7 +29,6 @@ async fn main() {
2829
),
2930
SyntheticsMobileTestType::MOBILE,
3031
)
31-
.message("".to_string())
3232
.status(SyntheticsTestPauseStatus::PAUSED)
3333
.steps(vec![]);
3434
let configuration = datadog::Configuration::new();

src/datadogV1/model/model_synthetics_mobile_test.rs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub struct SyntheticsMobileTest {
1919
pub device_ids: Option<Vec<String>>,
2020
/// Notification message associated with the test.
2121
#[serde(rename = "message")]
22-
pub message: Option<String>,
22+
pub message: String,
2323
/// The associated monitor ID.
2424
#[serde(rename = "monitor_id")]
2525
pub monitor_id: Option<i64>,
@@ -55,14 +55,15 @@ pub struct SyntheticsMobileTest {
5555
impl SyntheticsMobileTest {
5656
pub fn new(
5757
config: crate::datadogV1::model::SyntheticsMobileTestConfig,
58+
message: String,
5859
name: String,
5960
options: crate::datadogV1::model::SyntheticsMobileTestOptions,
6061
type_: crate::datadogV1::model::SyntheticsMobileTestType,
6162
) -> SyntheticsMobileTest {
6263
SyntheticsMobileTest {
6364
config,
6465
device_ids: None,
65-
message: None,
66+
message,
6667
monitor_id: None,
6768
name,
6869
options,
@@ -81,11 +82,6 @@ impl SyntheticsMobileTest {
8182
self
8283
}
8384

84-
pub fn message(mut self, value: String) -> Self {
85-
self.message = Some(value);
86-
self
87-
}
88-
8985
pub fn monitor_id(mut self, value: i64) -> Self {
9086
self.monitor_id = Some(value);
9187
self
@@ -167,9 +163,6 @@ impl<'de> Deserialize<'de> for SyntheticsMobileTest {
167163
device_ids = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
168164
}
169165
"message" => {
170-
if v.is_null() {
171-
continue;
172-
}
173166
message = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
174167
}
175168
"monitor_id" => {
@@ -235,6 +228,7 @@ impl<'de> Deserialize<'de> for SyntheticsMobileTest {
235228
}
236229
}
237230
let config = config.ok_or_else(|| M::Error::missing_field("config"))?;
231+
let message = message.ok_or_else(|| M::Error::missing_field("message"))?;
238232
let name = name.ok_or_else(|| M::Error::missing_field("name"))?;
239233
let options = options.ok_or_else(|| M::Error::missing_field("options"))?;
240234
let type_ = type_.ok_or_else(|| M::Error::missing_field("type_"))?;

0 commit comments

Comments
 (0)