#[non_exhaustive]pub struct CaseEmpty {
pub type_: CaseResourceType,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Case empty request data
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.type_: CaseResourceType
Case resource type
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl CaseEmpty
impl CaseEmpty
Sourcepub fn new(type_: CaseResourceType) -> CaseEmpty
pub fn new(type_: CaseResourceType) -> CaseEmpty
Examples found in repository?
examples/v2_case-management_ArchiveCase.rs (line 12)
9async fn main() {
10 // there is a valid "case" in the system
11 let case_id = std::env::var("CASE_ID").unwrap();
12 let body = CaseEmptyRequest::new(CaseEmpty::new(CaseResourceType::CASE));
13 let configuration = datadog::Configuration::new();
14 let api = CaseManagementAPI::with_config(configuration);
15 let resp = api.archive_case(case_id.clone(), body).await;
16 if let Ok(value) = resp {
17 println!("{:#?}", value);
18 } else {
19 println!("{:#?}", resp.unwrap_err());
20 }
21}
More examples
examples/v2_case-management_UnassignCase.rs (line 12)
9async fn main() {
10 // there is a valid "case" in the system
11 let case_id = std::env::var("CASE_ID").unwrap();
12 let body = CaseEmptyRequest::new(CaseEmpty::new(CaseResourceType::CASE));
13 let configuration = datadog::Configuration::new();
14 let api = CaseManagementAPI::with_config(configuration);
15 let resp = api.unassign_case(case_id.clone(), body).await;
16 if let Ok(value) = resp {
17 println!("{:#?}", value);
18 } else {
19 println!("{:#?}", resp.unwrap_err());
20 }
21}
examples/v2_case-management_UnarchiveCase.rs (line 12)
9async fn main() {
10 // there is a valid "case" in the system
11 let case_id = std::env::var("CASE_ID").unwrap();
12 let body = CaseEmptyRequest::new(CaseEmpty::new(CaseResourceType::CASE));
13 let configuration = datadog::Configuration::new();
14 let api = CaseManagementAPI::with_config(configuration);
15 let resp = api.unarchive_case(case_id.clone(), body).await;
16 if let Ok(value) = resp {
17 println!("{:#?}", value);
18 } else {
19 println!("{:#?}", resp.unwrap_err());
20 }
21}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CaseEmpty
impl<'de> Deserialize<'de> for CaseEmpty
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 CaseEmpty
Auto Trait Implementations§
impl Freeze for CaseEmpty
impl RefUnwindSafe for CaseEmpty
impl Send for CaseEmpty
impl Sync for CaseEmpty
impl Unpin for CaseEmpty
impl UnwindSafe for CaseEmpty
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