#[non_exhaustive]pub struct CaseUpdateAttributes {
pub attributes: CaseUpdateAttributesAttributes,
pub type_: CaseResourceType,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Case update 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: CaseUpdateAttributesAttributes
Case update attributes attributes
type_: CaseResourceType
Case resource type
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl CaseUpdateAttributes
impl CaseUpdateAttributes
Sourcepub fn new(
attributes: CaseUpdateAttributesAttributes,
type_: CaseResourceType,
) -> CaseUpdateAttributes
pub fn new( attributes: CaseUpdateAttributesAttributes, type_: CaseResourceType, ) -> CaseUpdateAttributes
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 CaseUpdateAttributes
impl Clone for CaseUpdateAttributes
Source§fn clone(&self) -> CaseUpdateAttributes
fn clone(&self) -> CaseUpdateAttributes
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 CaseUpdateAttributes
impl Debug for CaseUpdateAttributes
Source§impl<'de> Deserialize<'de> for CaseUpdateAttributes
impl<'de> Deserialize<'de> for CaseUpdateAttributes
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 CaseUpdateAttributes
impl PartialEq for CaseUpdateAttributes
Source§impl Serialize for CaseUpdateAttributes
impl Serialize for CaseUpdateAttributes
impl StructuralPartialEq for CaseUpdateAttributes
Auto Trait Implementations§
impl Freeze for CaseUpdateAttributes
impl RefUnwindSafe for CaseUpdateAttributes
impl Send for CaseUpdateAttributes
impl Sync for CaseUpdateAttributes
impl Unpin for CaseUpdateAttributes
impl UnwindSafe for CaseUpdateAttributes
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