Struct datadog_api_client::datadogV2::model::model_incident_service_create_data::IncidentServiceCreateData
source · #[non_exhaustive]pub struct IncidentServiceCreateData {
pub attributes: Option<IncidentServiceCreateAttributes>,
pub relationships: Option<IncidentServiceRelationships>,
pub type_: IncidentServiceType,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}Expand description
Incident Service payload for create requests.
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: Option<IncidentServiceCreateAttributes>The incident service’s attributes for a create request.
relationships: Option<IncidentServiceRelationships>The incident service’s relationships.
type_: IncidentServiceTypeIncident service resource type.
additional_properties: BTreeMap<String, Value>Implementations§
source§impl IncidentServiceCreateData
impl IncidentServiceCreateData
sourcepub fn new(type_: IncidentServiceType) -> IncidentServiceCreateData
pub fn new(type_: IncidentServiceType) -> IncidentServiceCreateData
Examples found in repository?
examples/v2_incident-services_CreateIncidentService.rs (line 12)
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
async fn main() {
let body = IncidentServiceCreateRequest::new(
IncidentServiceCreateData::new(IncidentServiceType::SERVICES).attributes(
IncidentServiceCreateAttributes::new("Example-Incident-Service".to_string()),
),
);
let mut configuration = datadog::Configuration::new();
configuration.set_unstable_operation_enabled("v2.CreateIncidentService", true);
let api = IncidentServicesAPI::with_config(configuration);
let resp = api.create_incident_service(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}sourcepub fn attributes(self, value: IncidentServiceCreateAttributes) -> Self
pub fn attributes(self, value: IncidentServiceCreateAttributes) -> Self
Examples found in repository?
examples/v2_incident-services_CreateIncidentService.rs (lines 12-14)
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
async fn main() {
let body = IncidentServiceCreateRequest::new(
IncidentServiceCreateData::new(IncidentServiceType::SERVICES).attributes(
IncidentServiceCreateAttributes::new("Example-Incident-Service".to_string()),
),
);
let mut configuration = datadog::Configuration::new();
configuration.set_unstable_operation_enabled("v2.CreateIncidentService", true);
let api = IncidentServicesAPI::with_config(configuration);
let resp = api.create_incident_service(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}pub fn relationships(self, value: IncidentServiceRelationships) -> Self
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
source§impl Clone for IncidentServiceCreateData
impl Clone for IncidentServiceCreateData
source§fn clone(&self) -> IncidentServiceCreateData
fn clone(&self) -> IncidentServiceCreateData
Returns a copy 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 IncidentServiceCreateData
impl Debug for IncidentServiceCreateData
source§impl<'de> Deserialize<'de> for IncidentServiceCreateData
impl<'de> Deserialize<'de> for IncidentServiceCreateData
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 IncidentServiceCreateData
Auto Trait Implementations§
impl Freeze for IncidentServiceCreateData
impl RefUnwindSafe for IncidentServiceCreateData
impl Send for IncidentServiceCreateData
impl Sync for IncidentServiceCreateData
impl Unpin for IncidentServiceCreateData
impl UnwindSafe for IncidentServiceCreateData
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)