#[non_exhaustive]pub struct OpsgenieServiceCreateRequest {
pub data: OpsgenieServiceCreateData,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Create request for an Opsgenie service.
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: OpsgenieServiceCreateData
Opsgenie service data for a create request.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl OpsgenieServiceCreateRequest
impl OpsgenieServiceCreateRequest
Sourcepub fn new(data: OpsgenieServiceCreateData) -> OpsgenieServiceCreateRequest
pub fn new(data: OpsgenieServiceCreateData) -> OpsgenieServiceCreateRequest
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 OpsgenieServiceCreateRequest
impl Clone for OpsgenieServiceCreateRequest
Source§fn clone(&self) -> OpsgenieServiceCreateRequest
fn clone(&self) -> OpsgenieServiceCreateRequest
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 OpsgenieServiceCreateRequest
impl Debug for OpsgenieServiceCreateRequest
Source§impl<'de> Deserialize<'de> for OpsgenieServiceCreateRequest
impl<'de> Deserialize<'de> for OpsgenieServiceCreateRequest
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 OpsgenieServiceCreateRequest
impl PartialEq for OpsgenieServiceCreateRequest
Source§fn eq(&self, other: &OpsgenieServiceCreateRequest) -> bool
fn eq(&self, other: &OpsgenieServiceCreateRequest) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for OpsgenieServiceCreateRequest
Auto Trait Implementations§
impl Freeze for OpsgenieServiceCreateRequest
impl RefUnwindSafe for OpsgenieServiceCreateRequest
impl Send for OpsgenieServiceCreateRequest
impl Sync for OpsgenieServiceCreateRequest
impl Unpin for OpsgenieServiceCreateRequest
impl UnwindSafe for OpsgenieServiceCreateRequest
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