#[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 RetentionPolicy {
    #[serde(rename = "type")]
    type_: super::RetentionPolicyType,
    #[builder(default, into)]
    #[serde(rename = "expiryDays", skip_serializing_if = "Option::is_none", default)]
    expiry_days: Option<i32>,
}
impl RetentionPolicy {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(type_: super::RetentionPolicyType) -> Self {
        Self::builder().type_(type_).build()
    }
    #[inline]
    pub fn type_(&self) -> &super::RetentionPolicyType {
        &self.type_
    }
    #[inline]
    pub fn expiry_days(&self) -> Option<i32> {
        self.expiry_days.as_ref().map(|o| *o)
    }
}
