#[non_exhaustive]pub struct CaseUpdateAttributesAttributes {
pub attributes: BTreeMap<String, Vec<String>>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Case update attributes attributes
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.attributes: BTreeMap<String, Vec<String>>
The definition of CaseObjectAttributes
object.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl CaseUpdateAttributesAttributes
impl CaseUpdateAttributesAttributes
Sourcepub fn new(
attributes: BTreeMap<String, Vec<String>>,
) -> CaseUpdateAttributesAttributes
pub fn new( attributes: BTreeMap<String, Vec<String>>, ) -> CaseUpdateAttributesAttributes
Examples found in repository?
examples/v2_case-management_UpdateAttributes.rs (lines 15-22)
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 CaseUpdateAttributesAttributes
impl Clone for CaseUpdateAttributesAttributes
Source§fn clone(&self) -> CaseUpdateAttributesAttributes
fn clone(&self) -> CaseUpdateAttributesAttributes
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 CaseUpdateAttributesAttributes
impl<'de> Deserialize<'de> for CaseUpdateAttributesAttributes
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 CaseUpdateAttributesAttributes
impl PartialEq for CaseUpdateAttributesAttributes
Source§fn eq(&self, other: &CaseUpdateAttributesAttributes) -> bool
fn eq(&self, other: &CaseUpdateAttributesAttributes) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for CaseUpdateAttributesAttributes
Auto Trait Implementations§
impl Freeze for CaseUpdateAttributesAttributes
impl RefUnwindSafe for CaseUpdateAttributesAttributes
impl Send for CaseUpdateAttributesAttributes
impl Sync for CaseUpdateAttributesAttributes
impl Unpin for CaseUpdateAttributesAttributes
impl UnwindSafe for CaseUpdateAttributesAttributes
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