nominal-api 0.1239.0

API bindings for the Nominal platform
Documentation
/// Request to import a spatial data file (e.g. LAS, LAZ, PLY, PCD, E57, PCAP).
#[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 ImportFileRequest {
    #[builder(
        custom(type = super::super::super::super::api::Handle, convert = Box::new)
    )]
    #[serde(rename = "source")]
    source: Box<super::super::super::super::api::Handle>,
    #[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, set(item(type = super::super::super::super::api::Label)))]
    #[serde(
        rename = "labels",
        skip_serializing_if = "std::collections::BTreeSet::is_empty",
        default
    )]
    labels: std::collections::BTreeSet<super::super::super::super::api::Label>,
    #[builder(
        default,
        map(
            key(type = super::super::super::super::api::PropertyName),
            value(type = super::super::super::super::api::PropertyValue)
        )
    )]
    #[serde(
        rename = "properties",
        skip_serializing_if = "std::collections::BTreeMap::is_empty",
        default
    )]
    properties: std::collections::BTreeMap<
        super::super::super::super::api::PropertyName,
        super::super::super::super::api::PropertyValue,
    >,
    #[builder(custom(type = super::SpatialTypeMetadata, convert = Box::new))]
    #[serde(rename = "typeMetadata")]
    type_metadata: Box<super::SpatialTypeMetadata>,
    #[builder(default, into)]
    #[serde(rename = "workspace", skip_serializing_if = "Option::is_none", default)]
    workspace: Option<super::super::super::super::api::rids::WorkspaceRid>,
    #[builder(default, set(item(type = super::super::super::rids::api::MarkingRid)))]
    #[serde(
        rename = "markingRids",
        skip_serializing_if = "std::collections::BTreeSet::is_empty",
        default
    )]
    marking_rids: std::collections::BTreeSet<super::super::super::rids::api::MarkingRid>,
}
impl ImportFileRequest {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        source: super::super::super::super::api::Handle,
        type_metadata: super::SpatialTypeMetadata,
    ) -> Self {
        Self::builder().source(source).type_metadata(type_metadata).build()
    }
    /// The location of the file to import.
    #[inline]
    pub fn source(&self) -> &super::super::super::super::api::Handle {
        &*self.source
    }
    #[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,
    ) -> &std::collections::BTreeSet<super::super::super::super::api::Label> {
        &self.labels
    }
    #[inline]
    pub fn properties(
        &self,
    ) -> &std::collections::BTreeMap<
        super::super::super::super::api::PropertyName,
        super::super::super::super::api::PropertyValue,
    > {
        &self.properties
    }
    #[inline]
    pub fn type_metadata(&self) -> &super::SpatialTypeMetadata {
        &*self.type_metadata
    }
    /// The workspace in which to create the spatial asset. If not provided, the asset will be created in
    /// the default workspace for the user's organization.
    #[inline]
    pub fn workspace(
        &self,
    ) -> Option<&super::super::super::super::api::rids::WorkspaceRid> {
        self.workspace.as_ref().map(|o| &*o)
    }
    /// The markings to apply to the created spatial asset.
    #[inline]
    pub fn marking_rids(
        &self,
    ) -> &std::collections::BTreeSet<super::super::super::rids::api::MarkingRid> {
        &self.marking_rids
    }
}