#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    conjure_object::private::DeriveWith
)]
#[serde(crate = "conjure_object::serde")]
#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct UpdateSpatialMetadataRequest {
    #[builder(default, into)]
    #[serde(rename = "title", skip_serializing_if = "Option::is_none", default)]
    title: Option<String>,
    #[builder(default, into)]
    #[serde(rename = "description", skip_serializing_if = "Option::is_none", default)]
    description: Option<String>,
    #[builder(default, into)]
    #[serde(rename = "labels", skip_serializing_if = "Option::is_none", default)]
    labels: Option<std::collections::BTreeSet<String>>,
    #[builder(default, into)]
    #[serde(rename = "properties", skip_serializing_if = "Option::is_none", default)]
    properties: Option<std::collections::BTreeMap<String, String>>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::SpatialTypeMetadata>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "typeMetadata", skip_serializing_if = "Option::is_none", default)]
    type_metadata: Option<Box<super::SpatialTypeMetadata>>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::super::super::super::api::Timestamp>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "startTimestamp", skip_serializing_if = "Option::is_none", default)]
    start_timestamp: Option<Box<super::super::super::super::api::Timestamp>>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::super::super::super::api::Timestamp>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "endTimestamp", skip_serializing_if = "Option::is_none", default)]
    end_timestamp: Option<Box<super::super::super::super::api::Timestamp>>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::super::super::super::api::Handle>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "sourceHandle", skip_serializing_if = "Option::is_none", default)]
    source_handle: Option<Box<super::super::super::super::api::Handle>>,
}
impl UpdateSpatialMetadataRequest {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new() -> Self {
        Self::builder().build()
    }
    #[inline]
    pub fn title(&self) -> Option<&str> {
        self.title.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn description(&self) -> Option<&str> {
        self.description.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn labels(&self) -> Option<&std::collections::BTreeSet<String>> {
        self.labels.as_ref().map(|o| &*o)
    }
    #[inline]
    pub fn properties(&self) -> Option<&std::collections::BTreeMap<String, String>> {
        self.properties.as_ref().map(|o| &*o)
    }
    #[inline]
    pub fn type_metadata(&self) -> Option<&super::SpatialTypeMetadata> {
        self.type_metadata.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn start_timestamp(
        &self,
    ) -> Option<&super::super::super::super::api::Timestamp> {
        self.start_timestamp.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn end_timestamp(&self) -> Option<&super::super::super::super::api::Timestamp> {
        self.end_timestamp.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn source_handle(&self) -> Option<&super::super::super::super::api::Handle> {
        self.source_handle.as_ref().map(|o| &**o)
    }
}
