#[non_exhaustive]pub struct OpsgenieServiceCreateAttributes {
pub custom_url: Option<String>,
pub name: String,
pub opsgenie_api_key: String,
pub region: OpsgenieServiceRegionType,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
The Opsgenie service attributes 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.custom_url: Option<String>
The custom URL for a custom region.
name: String
The name for the Opsgenie service.
opsgenie_api_key: String
The Opsgenie API key for your Opsgenie service.
region: OpsgenieServiceRegionType
The region for the Opsgenie service.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl OpsgenieServiceCreateAttributes
impl OpsgenieServiceCreateAttributes
Sourcepub fn new(
name: String,
opsgenie_api_key: String,
region: OpsgenieServiceRegionType,
) -> OpsgenieServiceCreateAttributes
pub fn new( name: String, opsgenie_api_key: String, region: OpsgenieServiceRegionType, ) -> OpsgenieServiceCreateAttributes
Examples found in repository?
examples/v2_opsgenie-integration_CreateOpsgenieService.rs (lines 13-17)
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 custom_url(self, value: String) -> Self
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for OpsgenieServiceCreateAttributes
impl Clone for OpsgenieServiceCreateAttributes
Source§fn clone(&self) -> OpsgenieServiceCreateAttributes
fn clone(&self) -> OpsgenieServiceCreateAttributes
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<'de> Deserialize<'de> for OpsgenieServiceCreateAttributes
impl<'de> Deserialize<'de> for OpsgenieServiceCreateAttributes
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 OpsgenieServiceCreateAttributes
impl PartialEq for OpsgenieServiceCreateAttributes
Source§fn eq(&self, other: &OpsgenieServiceCreateAttributes) -> bool
fn eq(&self, other: &OpsgenieServiceCreateAttributes) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for OpsgenieServiceCreateAttributes
Auto Trait Implementations§
impl Freeze for OpsgenieServiceCreateAttributes
impl RefUnwindSafe for OpsgenieServiceCreateAttributes
impl Send for OpsgenieServiceCreateAttributes
impl Sync for OpsgenieServiceCreateAttributes
impl Unpin for OpsgenieServiceCreateAttributes
impl UnwindSafe for OpsgenieServiceCreateAttributes
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