/// If fields are present, will override existing values.
#[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 UpdateSeriesMetadataRequest {
    #[builder(default, into)]
    #[serde(rename = "unit", skip_serializing_if = "Option::is_none", default)]
    unit: Option<String>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::super::super::logicalseries::api::UnitUpdate>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "unitUpdate", skip_serializing_if = "Option::is_none", default)]
    unit_update: Option<Box<super::super::super::logicalseries::api::UnitUpdate>>,
    #[builder(default, into)]
    #[serde(rename = "description", skip_serializing_if = "Option::is_none", default)]
    description: Option<String>,
}
impl UpdateSeriesMetadataRequest {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new() -> Self {
        Self::builder().build()
    }
    #[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::super::super::logicalseries::api::UnitUpdate> {
        self.unit_update.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn description(&self) -> Option<&str> {
        self.description.as_ref().map(|o| &**o)
    }
}
