/// Configuration details used to connect to an external service.
#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct Integration {
    #[serde(rename = "rid")]
    rid: super::IntegrationRid,
    #[builder(into)]
    #[serde(rename = "name")]
    name: String,
    #[builder(default, into)]
    #[serde(rename = "description", skip_serializing_if = "Option::is_none", default)]
    description: Option<String>,
    #[builder(custom(type = super::IntegrationDetails, convert = Box::new))]
    #[serde(rename = "integrationDetails")]
    integration_details: Box<super::IntegrationDetails>,
    #[serde(rename = "createdAt")]
    created_at: conjure_object::DateTime<conjure_object::Utc>,
    #[serde(rename = "createdBy")]
    created_by: conjure_object::ResourceIdentifier,
    #[serde(rename = "isArchived")]
    is_archived: bool,
}
impl Integration {
    #[inline]
    pub fn rid(&self) -> &super::IntegrationRid {
        &self.rid
    }
    #[inline]
    pub fn name(&self) -> &str {
        &*self.name
    }
    #[inline]
    pub fn description(&self) -> Option<&str> {
        self.description.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn integration_details(&self) -> &super::IntegrationDetails {
        &*self.integration_details
    }
    #[inline]
    pub fn created_at(&self) -> conjure_object::DateTime<conjure_object::Utc> {
        self.created_at
    }
    #[inline]
    pub fn created_by(&self) -> &conjure_object::ResourceIdentifier {
        &self.created_by
    }
    #[inline]
    pub fn is_archived(&self) -> bool {
        self.is_archived
    }
}
