#[non_exhaustive]pub struct SyntheticsMobileTest {
pub config: SyntheticsMobileTestConfig,
pub device_ids: Option<Vec<String>>,
pub message: String,
pub monitor_id: Option<i64>,
pub name: String,
pub options: SyntheticsMobileTestOptions,
pub public_id: Option<String>,
pub status: Option<SyntheticsTestPauseStatus>,
pub steps: Option<Vec<SyntheticsMobileStep>>,
pub tags: Option<Vec<String>>,
pub type_: SyntheticsMobileTestType,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Object containing details about a Synthetic mobile test.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.config: SyntheticsMobileTestConfig
Configuration object for a Synthetic mobile test.
device_ids: Option<Vec<String>>
Array with the different device IDs used to run the test.
message: String
Notification message associated with the test.
monitor_id: Option<i64>
The associated monitor ID.
name: String
Name of the test.
options: SyntheticsMobileTestOptions
Object describing the extra options for a Synthetic test.
public_id: Option<String>
The public ID of the test.
status: Option<SyntheticsTestPauseStatus>
Define whether you want to start (live
) or pause (paused
) a
Synthetic test.
steps: Option<Vec<SyntheticsMobileStep>>
Array of steps for the test.
Array of tags attached to the test.
type_: SyntheticsMobileTestType
Type of the Synthetic test, mobile
.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl SyntheticsMobileTest
impl SyntheticsMobileTest
Sourcepub fn new(
config: SyntheticsMobileTestConfig,
message: String,
name: String,
options: SyntheticsMobileTestOptions,
type_: SyntheticsMobileTestType,
) -> SyntheticsMobileTest
pub fn new( config: SyntheticsMobileTestConfig, message: String, name: String, options: SyntheticsMobileTestOptions, type_: SyntheticsMobileTestType, ) -> SyntheticsMobileTest
Examples found in repository?
examples/v1_synthetics_CreateSyntheticsMobileTest.rs (lines 14-28)
13async fn main() {
14 let body = SyntheticsMobileTest::new(
15 SyntheticsMobileTestConfig::new().variables(vec![]),
16 "".to_string(),
17 "Example-Synthetic".to_string(),
18 SyntheticsMobileTestOptions::new(
19 vec!["synthetics:mobile:device:iphone_15_ios_17".to_string()],
20 SyntheticsMobileTestsMobileApplication::new(
21 "ab0e0aed-536d-411a-9a99-5428c27d8f8e".to_string(),
22 "6115922a-5f5d-455e-bc7e-7955a57f3815".to_string(),
23 SyntheticsMobileTestsMobileApplicationReferenceType::VERSION,
24 ),
25 3600,
26 ),
27 SyntheticsMobileTestType::MOBILE,
28 )
29 .status(SyntheticsTestPauseStatus::PAUSED)
30 .steps(vec![]);
31 let configuration = datadog::Configuration::new();
32 let api = SyntheticsAPI::with_config(configuration);
33 let resp = api.create_synthetics_mobile_test(body).await;
34 if let Ok(value) = resp {
35 println!("{:#?}", value);
36 } else {
37 println!("{:#?}", resp.unwrap_err());
38 }
39}
More examples
examples/v1_synthetics_UpdateMobileTest.rs (lines 17-31)
13async fn main() {
14 // there is a valid "synthetics_mobile_test" in the system
15 let synthetics_mobile_test_public_id =
16 std::env::var("SYNTHETICS_MOBILE_TEST_PUBLIC_ID").unwrap();
17 let body = SyntheticsMobileTest::new(
18 SyntheticsMobileTestConfig::new().variables(vec![]),
19 "".to_string(),
20 "Example-Synthetic-updated".to_string(),
21 SyntheticsMobileTestOptions::new(
22 vec!["synthetics:mobile:device:iphone_15_ios_17".to_string()],
23 SyntheticsMobileTestsMobileApplication::new(
24 "ab0e0aed-536d-411a-9a99-5428c27d8f8e".to_string(),
25 "6115922a-5f5d-455e-bc7e-7955a57f3815".to_string(),
26 SyntheticsMobileTestsMobileApplicationReferenceType::VERSION,
27 ),
28 3600,
29 ),
30 SyntheticsMobileTestType::MOBILE,
31 )
32 .status(SyntheticsTestPauseStatus::PAUSED)
33 .steps(vec![]);
34 let configuration = datadog::Configuration::new();
35 let api = SyntheticsAPI::with_config(configuration);
36 let resp = api
37 .update_mobile_test(synthetics_mobile_test_public_id.clone(), body)
38 .await;
39 if let Ok(value) = resp {
40 println!("{:#?}", value);
41 } else {
42 println!("{:#?}", resp.unwrap_err());
43 }
44}
pub fn device_ids(self, value: Vec<String>) -> Self
pub fn monitor_id(self, value: i64) -> Self
pub fn public_id(self, value: String) -> Self
Sourcepub fn status(self, value: SyntheticsTestPauseStatus) -> Self
pub fn status(self, value: SyntheticsTestPauseStatus) -> Self
Examples found in repository?
examples/v1_synthetics_CreateSyntheticsMobileTest.rs (line 29)
13async fn main() {
14 let body = SyntheticsMobileTest::new(
15 SyntheticsMobileTestConfig::new().variables(vec![]),
16 "".to_string(),
17 "Example-Synthetic".to_string(),
18 SyntheticsMobileTestOptions::new(
19 vec!["synthetics:mobile:device:iphone_15_ios_17".to_string()],
20 SyntheticsMobileTestsMobileApplication::new(
21 "ab0e0aed-536d-411a-9a99-5428c27d8f8e".to_string(),
22 "6115922a-5f5d-455e-bc7e-7955a57f3815".to_string(),
23 SyntheticsMobileTestsMobileApplicationReferenceType::VERSION,
24 ),
25 3600,
26 ),
27 SyntheticsMobileTestType::MOBILE,
28 )
29 .status(SyntheticsTestPauseStatus::PAUSED)
30 .steps(vec![]);
31 let configuration = datadog::Configuration::new();
32 let api = SyntheticsAPI::with_config(configuration);
33 let resp = api.create_synthetics_mobile_test(body).await;
34 if let Ok(value) = resp {
35 println!("{:#?}", value);
36 } else {
37 println!("{:#?}", resp.unwrap_err());
38 }
39}
More examples
examples/v1_synthetics_UpdateMobileTest.rs (line 32)
13async fn main() {
14 // there is a valid "synthetics_mobile_test" in the system
15 let synthetics_mobile_test_public_id =
16 std::env::var("SYNTHETICS_MOBILE_TEST_PUBLIC_ID").unwrap();
17 let body = SyntheticsMobileTest::new(
18 SyntheticsMobileTestConfig::new().variables(vec![]),
19 "".to_string(),
20 "Example-Synthetic-updated".to_string(),
21 SyntheticsMobileTestOptions::new(
22 vec!["synthetics:mobile:device:iphone_15_ios_17".to_string()],
23 SyntheticsMobileTestsMobileApplication::new(
24 "ab0e0aed-536d-411a-9a99-5428c27d8f8e".to_string(),
25 "6115922a-5f5d-455e-bc7e-7955a57f3815".to_string(),
26 SyntheticsMobileTestsMobileApplicationReferenceType::VERSION,
27 ),
28 3600,
29 ),
30 SyntheticsMobileTestType::MOBILE,
31 )
32 .status(SyntheticsTestPauseStatus::PAUSED)
33 .steps(vec![]);
34 let configuration = datadog::Configuration::new();
35 let api = SyntheticsAPI::with_config(configuration);
36 let resp = api
37 .update_mobile_test(synthetics_mobile_test_public_id.clone(), body)
38 .await;
39 if let Ok(value) = resp {
40 println!("{:#?}", value);
41 } else {
42 println!("{:#?}", resp.unwrap_err());
43 }
44}
Sourcepub fn steps(self, value: Vec<SyntheticsMobileStep>) -> Self
pub fn steps(self, value: Vec<SyntheticsMobileStep>) -> Self
Examples found in repository?
examples/v1_synthetics_CreateSyntheticsMobileTest.rs (line 30)
13async fn main() {
14 let body = SyntheticsMobileTest::new(
15 SyntheticsMobileTestConfig::new().variables(vec![]),
16 "".to_string(),
17 "Example-Synthetic".to_string(),
18 SyntheticsMobileTestOptions::new(
19 vec!["synthetics:mobile:device:iphone_15_ios_17".to_string()],
20 SyntheticsMobileTestsMobileApplication::new(
21 "ab0e0aed-536d-411a-9a99-5428c27d8f8e".to_string(),
22 "6115922a-5f5d-455e-bc7e-7955a57f3815".to_string(),
23 SyntheticsMobileTestsMobileApplicationReferenceType::VERSION,
24 ),
25 3600,
26 ),
27 SyntheticsMobileTestType::MOBILE,
28 )
29 .status(SyntheticsTestPauseStatus::PAUSED)
30 .steps(vec![]);
31 let configuration = datadog::Configuration::new();
32 let api = SyntheticsAPI::with_config(configuration);
33 let resp = api.create_synthetics_mobile_test(body).await;
34 if let Ok(value) = resp {
35 println!("{:#?}", value);
36 } else {
37 println!("{:#?}", resp.unwrap_err());
38 }
39}
More examples
examples/v1_synthetics_UpdateMobileTest.rs (line 33)
13async fn main() {
14 // there is a valid "synthetics_mobile_test" in the system
15 let synthetics_mobile_test_public_id =
16 std::env::var("SYNTHETICS_MOBILE_TEST_PUBLIC_ID").unwrap();
17 let body = SyntheticsMobileTest::new(
18 SyntheticsMobileTestConfig::new().variables(vec![]),
19 "".to_string(),
20 "Example-Synthetic-updated".to_string(),
21 SyntheticsMobileTestOptions::new(
22 vec!["synthetics:mobile:device:iphone_15_ios_17".to_string()],
23 SyntheticsMobileTestsMobileApplication::new(
24 "ab0e0aed-536d-411a-9a99-5428c27d8f8e".to_string(),
25 "6115922a-5f5d-455e-bc7e-7955a57f3815".to_string(),
26 SyntheticsMobileTestsMobileApplicationReferenceType::VERSION,
27 ),
28 3600,
29 ),
30 SyntheticsMobileTestType::MOBILE,
31 )
32 .status(SyntheticsTestPauseStatus::PAUSED)
33 .steps(vec![]);
34 let configuration = datadog::Configuration::new();
35 let api = SyntheticsAPI::with_config(configuration);
36 let resp = api
37 .update_mobile_test(synthetics_mobile_test_public_id.clone(), body)
38 .await;
39 if let Ok(value) = resp {
40 println!("{:#?}", value);
41 } else {
42 println!("{:#?}", resp.unwrap_err());
43 }
44}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for SyntheticsMobileTest
impl Clone for SyntheticsMobileTest
Source§fn clone(&self) -> SyntheticsMobileTest
fn clone(&self) -> SyntheticsMobileTest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SyntheticsMobileTest
impl Debug for SyntheticsMobileTest
Source§impl<'de> Deserialize<'de> for SyntheticsMobileTest
impl<'de> Deserialize<'de> for SyntheticsMobileTest
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SyntheticsMobileTest
impl PartialEq for SyntheticsMobileTest
Source§impl Serialize for SyntheticsMobileTest
impl Serialize for SyntheticsMobileTest
impl StructuralPartialEq for SyntheticsMobileTest
Auto Trait Implementations§
impl Freeze for SyntheticsMobileTest
impl RefUnwindSafe for SyntheticsMobileTest
impl Send for SyntheticsMobileTest
impl Sync for SyntheticsMobileTest
impl Unpin for SyntheticsMobileTest
impl UnwindSafe for SyntheticsMobileTest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more