#[non_exhaustive]pub struct CaseUpdateAttributesRequest {
pub data: CaseUpdateAttributes,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Case update attributes 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: CaseUpdateAttributes
Case update attributes
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl CaseUpdateAttributesRequest
impl CaseUpdateAttributesRequest
Sourcepub fn new(data: CaseUpdateAttributes) -> CaseUpdateAttributesRequest
pub fn new(data: CaseUpdateAttributes) -> CaseUpdateAttributesRequest
Examples found in repository?
examples/v2_case-management_UpdateAttributes.rs (lines 14-24)
11async fn main() {
12 // there is a valid "case" in the system
13 let case_id = std::env::var("CASE_ID").unwrap();
14 let body = CaseUpdateAttributesRequest::new(CaseUpdateAttributes::new(
15 CaseUpdateAttributesAttributes::new(BTreeMap::from([
16 ("env".to_string(), vec!["test".to_string()]),
17 (
18 "service".to_string(),
19 vec!["web-store".to_string(), "web-api".to_string()],
20 ),
21 ("team".to_string(), vec!["engineer".to_string()]),
22 ])),
23 CaseResourceType::CASE,
24 ));
25 let configuration = datadog::Configuration::new();
26 let api = CaseManagementAPI::with_config(configuration);
27 let resp = api.update_attributes(case_id.clone(), body).await;
28 if let Ok(value) = resp {
29 println!("{:#?}", value);
30 } else {
31 println!("{:#?}", resp.unwrap_err());
32 }
33}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for CaseUpdateAttributesRequest
impl Clone for CaseUpdateAttributesRequest
Source§fn clone(&self) -> CaseUpdateAttributesRequest
fn clone(&self) -> CaseUpdateAttributesRequest
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 CaseUpdateAttributesRequest
impl Debug for CaseUpdateAttributesRequest
Source§impl<'de> Deserialize<'de> for CaseUpdateAttributesRequest
impl<'de> Deserialize<'de> for CaseUpdateAttributesRequest
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 CaseUpdateAttributesRequest
Auto Trait Implementations§
impl Freeze for CaseUpdateAttributesRequest
impl RefUnwindSafe for CaseUpdateAttributesRequest
impl Send for CaseUpdateAttributesRequest
impl Sync for CaseUpdateAttributesRequest
impl Unpin for CaseUpdateAttributesRequest
impl UnwindSafe for CaseUpdateAttributesRequest
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