#[non_exhaustive]pub struct UpdateOutcomesAsyncRequest {
pub data: Option<UpdateOutcomesAsyncRequestData>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Scorecard outcomes batch request.
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.data: Option<UpdateOutcomesAsyncRequestData>
Scorecard outcomes batch request data.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl UpdateOutcomesAsyncRequest
impl UpdateOutcomesAsyncRequest
Sourcepub fn new() -> UpdateOutcomesAsyncRequest
pub fn new() -> UpdateOutcomesAsyncRequest
Examples found in repository?
examples/v2_service-scorecards_UpdateScorecardOutcomesAsync.rs (line 15)
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 data(self, value: UpdateOutcomesAsyncRequestData) -> Self
pub fn data(self, value: UpdateOutcomesAsyncRequestData) -> Self
Examples found in repository?
examples/v2_service-scorecards_UpdateScorecardOutcomesAsync.rs (lines 15-29)
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 UpdateOutcomesAsyncRequest
impl Clone for UpdateOutcomesAsyncRequest
Source§fn clone(&self) -> UpdateOutcomesAsyncRequest
fn clone(&self) -> UpdateOutcomesAsyncRequest
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 UpdateOutcomesAsyncRequest
impl Debug for UpdateOutcomesAsyncRequest
Source§impl Default for UpdateOutcomesAsyncRequest
impl Default for UpdateOutcomesAsyncRequest
Source§impl<'de> Deserialize<'de> for UpdateOutcomesAsyncRequest
impl<'de> Deserialize<'de> for UpdateOutcomesAsyncRequest
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
impl StructuralPartialEq for UpdateOutcomesAsyncRequest
Auto Trait Implementations§
impl Freeze for UpdateOutcomesAsyncRequest
impl RefUnwindSafe for UpdateOutcomesAsyncRequest
impl Send for UpdateOutcomesAsyncRequest
impl Sync for UpdateOutcomesAsyncRequest
impl Unpin for UpdateOutcomesAsyncRequest
impl UnwindSafe for UpdateOutcomesAsyncRequest
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