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(
23        default,
24        map(
25            key(type = super::super::super::api::PropertyName),
26            value(type = super::super::super::api::PropertyValue)
27        )
28    )]
29    #[serde(
30        rename = "properties",
31        skip_serializing_if = "std::collections::BTreeMap::is_empty",
32        default
33    )]
34    properties: std::collections::BTreeMap<
35        super::super::super::api::PropertyName,
36        super::super::super::api::PropertyValue,
37    >,
38    #[builder(default, set(item(type = super::super::super::api::Label)))]
39    #[serde(
40        rename = "labels",
41        skip_serializing_if = "std::collections::BTreeSet::is_empty",
42        default
43    )]
44    labels: std::collections::BTreeSet<super::super::super::api::Label>,
45    #[builder(default, into)]
46    #[serde(rename = "workspace", skip_serializing_if = "Option::is_none", default)]
47    workspace: Option<super::super::super::api::rids::WorkspaceRid>,
48    #[builder(
49        default,
50        set(item(type = super::super::super::scout::rids::api::MarkingRid))
51    )]
52    #[serde(
53        rename = "markingRids",
54        skip_serializing_if = "std::collections::BTreeSet::is_empty",
55        default
56    )]
57    marking_rids: std::collections::BTreeSet<
58        super::super::super::scout::rids::api::MarkingRid,
59    >,
60}
61impl NewPointCloudIngestDestination {
62    /// Constructs a new instance of the type.
63    #[inline]
64    pub fn new() -> Self {
65        Self::builder().build()
66    }
67    /// Title of the point cloud that will be created.
68    #[inline]
69    pub fn title(&self) -> Option<&str> {
70        self.title.as_ref().map(|o| &**o)
71    }
72    #[inline]
73    pub fn description(&self) -> Option<&str> {
74        self.description.as_ref().map(|o| &**o)
75    }
76    #[inline]
77    pub fn properties(
78        &self,
79    ) -> &std::collections::BTreeMap<
80        super::super::super::api::PropertyName,
81        super::super::super::api::PropertyValue,
82    > {
83        &self.properties
84    }
85    #[inline]
86    pub fn labels(
87        &self,
88    ) -> &std::collections::BTreeSet<super::super::super::api::Label> {
89        &self.labels
90    }
91    /// The workspace in which to create the point cloud. If not provided, the point cloud will be created in the
92    /// default workspace for the user's organization, if the default workspace is configured.
93    #[inline]
94    pub fn workspace(&self) -> Option<&super::super::super::api::rids::WorkspaceRid> {
95        self.workspace.as_ref().map(|o| &*o)
96    }
97    /// The markings to apply to the created point cloud.
98    #[inline]
99    pub fn marking_rids(
100        &self,
101    ) -> &std::collections::BTreeSet<super::super::super::scout::rids::api::MarkingRid> {
102        &self.marking_rids
103    }
104}