#[non_exhaustive]pub struct SyntheticsTriggerTest {
pub metadata: Option<SyntheticsCIBatchMetadata>,
pub public_id: String,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Test configuration for Synthetics
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.metadata: Option<SyntheticsCIBatchMetadata>
Metadata for the Synthetic tests run.
public_id: String
The public ID of the Synthetic test to trigger.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl SyntheticsTriggerTest
impl SyntheticsTriggerTest
Sourcepub fn new(public_id: String) -> SyntheticsTriggerTest
pub fn new(public_id: String) -> SyntheticsTriggerTest
Examples found in repository?
examples/v1_synthetics_TriggerTests.rs (lines 11-13)
8async fn main() {
9 // there is a valid "synthetics_api_test" in the system
10 let synthetics_api_test_public_id = std::env::var("SYNTHETICS_API_TEST_PUBLIC_ID").unwrap();
11 let body = SyntheticsTriggerBody::new(vec![SyntheticsTriggerTest::new(
12 synthetics_api_test_public_id.clone(),
13 )]);
14 let configuration = datadog::Configuration::new();
15 let api = SyntheticsAPI::with_config(configuration);
16 let resp = api.trigger_tests(body).await;
17 if let Ok(value) = resp {
18 println!("{:#?}", value);
19 } else {
20 println!("{:#?}", resp.unwrap_err());
21 }
22}
pub fn metadata(self, value: SyntheticsCIBatchMetadata) -> Self
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for SyntheticsTriggerTest
impl Clone for SyntheticsTriggerTest
Source§fn clone(&self) -> SyntheticsTriggerTest
fn clone(&self) -> SyntheticsTriggerTest
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 SyntheticsTriggerTest
impl Debug for SyntheticsTriggerTest
Source§impl<'de> Deserialize<'de> for SyntheticsTriggerTest
impl<'de> Deserialize<'de> for SyntheticsTriggerTest
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 SyntheticsTriggerTest
impl PartialEq for SyntheticsTriggerTest
Source§impl Serialize for SyntheticsTriggerTest
impl Serialize for SyntheticsTriggerTest
impl StructuralPartialEq for SyntheticsTriggerTest
Auto Trait Implementations§
impl Freeze for SyntheticsTriggerTest
impl RefUnwindSafe for SyntheticsTriggerTest
impl Send for SyntheticsTriggerTest
impl Sync for SyntheticsTriggerTest
impl Unpin for SyntheticsTriggerTest
impl UnwindSafe for SyntheticsTriggerTest
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