Skip to main content

nominal_api/conjure/objects/ingest/api/
new_point_cloud_ingest_destination.rs

1#[derive(
2    Debug,
3    Clone,
4    conjure_object::serde::Serialize,
5    conjure_object::serde::Deserialize,
6    PartialEq,
7    Eq,
8    PartialOrd,
9    Ord,
10    Hash
11)]
12#[serde(crate = "conjure_object::serde")]
13#[conjure_object::private::staged_builder::staged_builder]
14#[builder(crate = conjure_object::private::staged_builder, update, inline)]
15pub struct NewPointCloudIngestDestination {
16    #[builder(default, into)]
17    #[serde(rename = "title", skip_serializing_if = "Option::is_none", default)]
18    title: Option<String>,
19    #[builder(default, into)]
20    #[serde(rename = "description", skip_serializing_if = "Option::is_none", default)]
21    description: Option<String>,
22    #[builder(default, map(key(type = String, into), value(type = String, into)))]
23    #[serde(
24        rename = "properties",
25        skip_serializing_if = "std::collections::BTreeMap::is_empty",
26        default
27    )]
28    properties: std::collections::BTreeMap<String, String>,
29    #[builder(default, set(item(type = String, into)))]
30    #[serde(
31        rename = "labels",
32        skip_serializing_if = "std::collections::BTreeSet::is_empty",
33        default
34    )]
35    labels: std::collections::BTreeSet<String>,
36    #[builder(default, into)]
37    #[serde(rename = "workspace", skip_serializing_if = "Option::is_none", default)]
38    workspace: Option<conjure_object::ResourceIdentifier>,
39    #[builder(
40        default,
41        set(item(type = super::super::super::scout::rids::api::MarkingRid))
42    )]
43    #[serde(
44        rename = "markingRids",
45        skip_serializing_if = "std::collections::BTreeSet::is_empty",
46        default
47    )]
48    marking_rids: std::collections::BTreeSet<
49        super::super::super::scout::rids::api::MarkingRid,
50    >,
51}
52impl NewPointCloudIngestDestination {
53    /// Constructs a new instance of the type.
54    #[inline]
55    pub fn new() -> Self {
56        Self::builder().build()
57    }
58    /// Title of the point cloud that will be created.
59    #[inline]
60    pub fn title(&self) -> Option<&str> {
61        self.title.as_ref().map(|o| &**o)
62    }
63    #[inline]
64    pub fn description(&self) -> Option<&str> {
65        self.description.as_ref().map(|o| &**o)
66    }
67    #[inline]
68    pub fn properties(&self) -> &std::collections::BTreeMap<String, String> {
69        &self.properties
70    }
71    #[inline]
72    pub fn labels(&self) -> &std::collections::BTreeSet<String> {
73        &self.labels
74    }
75    /// The workspace in which to create the point cloud. If not provided, the point cloud will be created in the
76    /// default workspace for the user's organization, if the default workspace is configured.
77    #[inline]
78    pub fn workspace(&self) -> Option<&conjure_object::ResourceIdentifier> {
79        self.workspace.as_ref().map(|o| &*o)
80    }
81    /// The markings to apply to the created point cloud.
82    #[inline]
83    pub fn marking_rids(
84        &self,
85    ) -> &std::collections::BTreeSet<super::super::super::scout::rids::api::MarkingRid> {
86        &self.marking_rids
87    }
88}