#[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 UpdateExternalStorageLocator {
    #[serde(rename = "logicalSeriesRid")]
    logical_series_rid: conjure_object::ResourceIdentifier,
    #[builder(default, into)]
    #[serde(rename = "description", skip_serializing_if = "Option::is_none", default)]
    description: Option<String>,
    #[builder(default, into)]
    #[serde(rename = "unit", skip_serializing_if = "Option::is_none", default)]
    unit: Option<String>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::UnitUpdate>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "unitUpdate", skip_serializing_if = "Option::is_none", default)]
    unit_update: Option<Box<super::UnitUpdate>>,
}
impl UpdateExternalStorageLocator {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(logical_series_rid: conjure_object::ResourceIdentifier) -> Self {
        Self::builder().logical_series_rid(logical_series_rid).build()
    }
    #[inline]
    pub fn logical_series_rid(&self) -> &conjure_object::ResourceIdentifier {
        &self.logical_series_rid
    }
    #[inline]
    pub fn description(&self) -> Option<&str> {
        self.description.as_ref().map(|o| &**o)
    }
    #[deprecated(note = "Deprecated. Use unitUpdate instead.")]
    #[inline]
    pub fn unit(&self) -> Option<&str> {
        self.unit.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn unit_update(&self) -> Option<&super::UnitUpdate> {
        self.unit_update.as_ref().map(|o| &**o)
    }
}
