#[non_exhaustive]pub struct IncidentServiceUpdateRequest {
pub data: IncidentServiceUpdateData,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Update request with an incident service payload.
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: IncidentServiceUpdateData
Incident Service payload for update requests.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl IncidentServiceUpdateRequest
impl IncidentServiceUpdateRequest
Sourcepub fn new(data: IncidentServiceUpdateData) -> IncidentServiceUpdateRequest
pub fn new(data: IncidentServiceUpdateData) -> IncidentServiceUpdateRequest
Examples found in repository?
examples/v2_incident-services_UpdateIncidentService.rs (lines 13-17)
10async fn main() {
11 // there is a valid "service" in the system
12 let service_data_id = std::env::var("SERVICE_DATA_ID").unwrap();
13 let body = IncidentServiceUpdateRequest::new(
14 IncidentServiceUpdateData::new(IncidentServiceType::SERVICES).attributes(
15 IncidentServiceUpdateAttributes::new("service name-updated".to_string()),
16 ),
17 );
18 let mut configuration = datadog::Configuration::new();
19 configuration.set_unstable_operation_enabled("v2.UpdateIncidentService", true);
20 let api = IncidentServicesAPI::with_config(configuration);
21 let resp = api
22 .update_incident_service(service_data_id.clone(), body)
23 .await;
24 if let Ok(value) = resp {
25 println!("{:#?}", value);
26 } else {
27 println!("{:#?}", resp.unwrap_err());
28 }
29}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for IncidentServiceUpdateRequest
impl Clone for IncidentServiceUpdateRequest
Source§fn clone(&self) -> IncidentServiceUpdateRequest
fn clone(&self) -> IncidentServiceUpdateRequest
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 IncidentServiceUpdateRequest
impl Debug for IncidentServiceUpdateRequest
Source§impl<'de> Deserialize<'de> for IncidentServiceUpdateRequest
impl<'de> Deserialize<'de> for IncidentServiceUpdateRequest
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 IncidentServiceUpdateRequest
impl PartialEq for IncidentServiceUpdateRequest
Source§fn eq(&self, other: &IncidentServiceUpdateRequest) -> bool
fn eq(&self, other: &IncidentServiceUpdateRequest) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for IncidentServiceUpdateRequest
Auto Trait Implementations§
impl Freeze for IncidentServiceUpdateRequest
impl RefUnwindSafe for IncidentServiceUpdateRequest
impl Send for IncidentServiceUpdateRequest
impl Sync for IncidentServiceUpdateRequest
impl Unpin for IncidentServiceUpdateRequest
impl UnwindSafe for IncidentServiceUpdateRequest
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