Skip to main content

nominal_api/conjure/objects/scout/integrations/api/
create_opsgenie_integration_details.rs

1#[derive(
2    Debug,
3    Clone,
4    conjure_object::serde::Serialize,
5    conjure_object::serde::Deserialize,
6    PartialEq,
7    Eq,
8    PartialOrd,
9    Ord,
10    Hash
11)]
12#[serde(crate = "conjure_object::serde")]
13#[conjure_object::private::staged_builder::staged_builder]
14#[builder(crate = conjure_object::private::staged_builder, update, inline)]
15pub struct CreateOpsgenieIntegrationDetails {
16    #[builder(into)]
17    #[serde(rename = "apiKey")]
18    api_key: String,
19    #[serde(rename = "region")]
20    region: super::OpsgenieRegion,
21}
22impl CreateOpsgenieIntegrationDetails {
23    /// Constructs a new instance of the type.
24    #[inline]
25    pub fn new(api_key: impl Into<String>, region: super::OpsgenieRegion) -> Self {
26        Self::builder().api_key(api_key).region(region).build()
27    }
28    #[inline]
29    pub fn api_key(&self) -> &str {
30        &*self.api_key
31    }
32    #[inline]
33    pub fn region(&self) -> &super::OpsgenieRegion {
34        &self.region
35    }
36}