Struct SyntheticsMobileTest

Source
#[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.

§tags: Option<Vec<String>>

Array of tags attached to the test.

§type_: SyntheticsMobileTestType

Type of the Synthetic test, mobile.

§additional_properties: BTreeMap<String, Value>

Implementations§

Source§

impl SyntheticsMobileTest

Source

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
Hide additional 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}
Source

pub fn device_ids(self, value: Vec<String>) -> Self

Source

pub fn monitor_id(self, value: i64) -> Self

Source

pub fn public_id(self, value: String) -> Self

Source

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
Hide additional 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}
Source

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
Hide additional 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}
Source

pub fn tags(self, value: Vec<String>) -> Self

Source

pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self

Trait Implementations§

Source§

impl Clone for SyntheticsMobileTest

Source§

fn clone(&self) -> SyntheticsMobileTest

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SyntheticsMobileTest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for SyntheticsMobileTest

Source§

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

Source§

fn eq(&self, other: &SyntheticsMobileTest) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for SyntheticsMobileTest

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for SyntheticsMobileTest

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,