#[non_exhaustive]pub struct UpdateOutcomesAsyncAttributes {
pub results: Option<Vec<UpdateOutcomesAsyncRequestItem>>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
The JSON:API attributes for a batched set of scorecard outcomes.
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.results: Option<Vec<UpdateOutcomesAsyncRequestItem>>
Set of scorecard outcomes to update asynchronously.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl UpdateOutcomesAsyncAttributes
impl UpdateOutcomesAsyncAttributes
Sourcepub fn new() -> UpdateOutcomesAsyncAttributes
pub fn new() -> UpdateOutcomesAsyncAttributes
Examples found in repository?
examples/v2_service-scorecards_UpdateScorecardOutcomesAsync.rs (line 17)
12async fn main() {
13 // there is a valid "create_scorecard_rule" in the system
14 let create_scorecard_rule_data_id = std::env::var("CREATE_SCORECARD_RULE_DATA_ID").unwrap();
15 let body = UpdateOutcomesAsyncRequest::new().data(
16 UpdateOutcomesAsyncRequestData::new()
17 .attributes(UpdateOutcomesAsyncAttributes::new().results(vec![
18 UpdateOutcomesAsyncRequestItem::new(
19 "service:my-service".to_string(),
20 create_scorecard_rule_data_id.clone(),
21 State::PASS,
22 )
23 .remarks(
24 r#"See: <a href="https://app.datadoghq.com/services">Services</a>"#
25 .to_string(),
26 ),
27 ]))
28 .type_(UpdateOutcomesAsyncType::BATCHED_OUTCOME),
29 );
30 let mut configuration = datadog::Configuration::new();
31 configuration.set_unstable_operation_enabled("v2.UpdateScorecardOutcomesAsync", true);
32 let api = ServiceScorecardsAPI::with_config(configuration);
33 let resp = api.update_scorecard_outcomes_async(body).await;
34 if let Ok(value) = resp {
35 println!("{:#?}", value);
36 } else {
37 println!("{:#?}", resp.unwrap_err());
38 }
39}
Sourcepub fn results(self, value: Vec<UpdateOutcomesAsyncRequestItem>) -> Self
pub fn results(self, value: Vec<UpdateOutcomesAsyncRequestItem>) -> Self
Examples found in repository?
examples/v2_service-scorecards_UpdateScorecardOutcomesAsync.rs (lines 17-27)
12async fn main() {
13 // there is a valid "create_scorecard_rule" in the system
14 let create_scorecard_rule_data_id = std::env::var("CREATE_SCORECARD_RULE_DATA_ID").unwrap();
15 let body = UpdateOutcomesAsyncRequest::new().data(
16 UpdateOutcomesAsyncRequestData::new()
17 .attributes(UpdateOutcomesAsyncAttributes::new().results(vec![
18 UpdateOutcomesAsyncRequestItem::new(
19 "service:my-service".to_string(),
20 create_scorecard_rule_data_id.clone(),
21 State::PASS,
22 )
23 .remarks(
24 r#"See: <a href="https://app.datadoghq.com/services">Services</a>"#
25 .to_string(),
26 ),
27 ]))
28 .type_(UpdateOutcomesAsyncType::BATCHED_OUTCOME),
29 );
30 let mut configuration = datadog::Configuration::new();
31 configuration.set_unstable_operation_enabled("v2.UpdateScorecardOutcomesAsync", true);
32 let api = ServiceScorecardsAPI::with_config(configuration);
33 let resp = api.update_scorecard_outcomes_async(body).await;
34 if let Ok(value) = resp {
35 println!("{:#?}", value);
36 } else {
37 println!("{:#?}", resp.unwrap_err());
38 }
39}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for UpdateOutcomesAsyncAttributes
impl Clone for UpdateOutcomesAsyncAttributes
Source§fn clone(&self) -> UpdateOutcomesAsyncAttributes
fn clone(&self) -> UpdateOutcomesAsyncAttributes
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<'de> Deserialize<'de> for UpdateOutcomesAsyncAttributes
impl<'de> Deserialize<'de> for UpdateOutcomesAsyncAttributes
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 UpdateOutcomesAsyncAttributes
impl PartialEq for UpdateOutcomesAsyncAttributes
Source§fn eq(&self, other: &UpdateOutcomesAsyncAttributes) -> bool
fn eq(&self, other: &UpdateOutcomesAsyncAttributes) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for UpdateOutcomesAsyncAttributes
Auto Trait Implementations§
impl Freeze for UpdateOutcomesAsyncAttributes
impl RefUnwindSafe for UpdateOutcomesAsyncAttributes
impl Send for UpdateOutcomesAsyncAttributes
impl Sync for UpdateOutcomesAsyncAttributes
impl Unpin for UpdateOutcomesAsyncAttributes
impl UnwindSafe for UpdateOutcomesAsyncAttributes
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