Struct datadog_api_client::datadogV2::model::model_opsgenie_service_create_data::OpsgenieServiceCreateData
source · #[non_exhaustive]pub struct OpsgenieServiceCreateData {
pub attributes: OpsgenieServiceCreateAttributes,
pub type_: OpsgenieServiceType,
/* private fields */
}
Expand description
Opsgenie service data for a create request.
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: OpsgenieServiceCreateAttributes
The Opsgenie service attributes for a create request.
type_: OpsgenieServiceType
Opsgenie service resource type.
Implementations§
source§impl OpsgenieServiceCreateData
impl OpsgenieServiceCreateData
sourcepub fn new(
attributes: OpsgenieServiceCreateAttributes,
type_: OpsgenieServiceType,
) -> OpsgenieServiceCreateData
pub fn new( attributes: OpsgenieServiceCreateAttributes, type_: OpsgenieServiceType, ) -> OpsgenieServiceCreateData
Examples found in repository?
examples/v2_opsgenie-integration_create_opsgenie_service.rs (lines 12-19)
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
async fn main() {
let body = OpsgenieServiceCreateRequest::new(OpsgenieServiceCreateData::new(
OpsgenieServiceCreateAttributes::new(
"Example-Opsgenie-Integration".to_string(),
"00000000-0000-0000-0000-000000000000".to_string(),
OpsgenieServiceRegionType::US,
),
OpsgenieServiceType::OPSGENIE_SERVICE,
));
let configuration = datadog::Configuration::new();
let api = OpsgenieIntegrationAPI::with_config(configuration);
let resp = api.create_opsgenie_service(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}
Trait Implementations§
source§impl Clone for OpsgenieServiceCreateData
impl Clone for OpsgenieServiceCreateData
source§fn clone(&self) -> OpsgenieServiceCreateData
fn clone(&self) -> OpsgenieServiceCreateData
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 OpsgenieServiceCreateData
impl Debug for OpsgenieServiceCreateData
source§impl<'de> Deserialize<'de> for OpsgenieServiceCreateData
impl<'de> Deserialize<'de> for OpsgenieServiceCreateData
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 OpsgenieServiceCreateData
impl PartialEq for OpsgenieServiceCreateData
source§fn eq(&self, other: &OpsgenieServiceCreateData) -> bool
fn eq(&self, other: &OpsgenieServiceCreateData) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for OpsgenieServiceCreateData
Auto Trait Implementations§
impl Freeze for OpsgenieServiceCreateData
impl RefUnwindSafe for OpsgenieServiceCreateData
impl Send for OpsgenieServiceCreateData
impl Sync for OpsgenieServiceCreateData
impl Unpin for OpsgenieServiceCreateData
impl UnwindSafe for OpsgenieServiceCreateData
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)