#[non_exhaustive]pub struct OpsgenieServiceCreateData {
pub attributes: OpsgenieServiceCreateAttributes,
pub type_: OpsgenieServiceType,
pub additional_properties: BTreeMap<String, Value>,
/* 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.
additional_properties: BTreeMap<String, Value>
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_CreateOpsgenieService.rs (lines 12-19)
11async fn main() {
12 let body = OpsgenieServiceCreateRequest::new(OpsgenieServiceCreateData::new(
13 OpsgenieServiceCreateAttributes::new(
14 "Example-Opsgenie-Integration".to_string(),
15 "00000000-0000-0000-0000-000000000000".to_string(),
16 OpsgenieServiceRegionType::US,
17 ),
18 OpsgenieServiceType::OPSGENIE_SERVICE,
19 ));
20 let configuration = datadog::Configuration::new();
21 let api = OpsgenieIntegrationAPI::with_config(configuration);
22 let resp = api.create_opsgenie_service(body).await;
23 if let Ok(value) = resp {
24 println!("{:#?}", value);
25 } else {
26 println!("{:#?}", resp.unwrap_err());
27 }
28}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for OpsgenieServiceCreateData
impl Clone for OpsgenieServiceCreateData
Source§fn clone(&self) -> OpsgenieServiceCreateData
fn clone(&self) -> OpsgenieServiceCreateData
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 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
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