nominal_api_conjure/conjure/objects/scout/catalog/
enriched_dataset.rs1#[derive(
2 Debug,
3 Clone,
4 conjure_object::serde::Serialize,
5 conjure_object::serde::Deserialize,
6 conjure_object::private::DeriveWith
7)]
8#[serde(crate = "conjure_object::serde")]
9#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
10#[conjure_object::private::staged_builder::staged_builder]
11#[builder(crate = conjure_object::private::staged_builder, update, inline)]
12pub struct EnrichedDataset {
13 #[serde(rename = "rid")]
14 rid: conjure_object::ResourceIdentifier,
15 #[serde(rename = "uuid")]
16 uuid: conjure_object::Uuid,
17 #[builder(into)]
18 #[serde(rename = "name")]
19 name: String,
20 #[builder(default, into)]
21 #[serde(rename = "description", skip_serializing_if = "Option::is_none", default)]
22 description: Option<String>,
23 #[builder(into)]
24 #[serde(rename = "displayName")]
25 display_name: String,
26 #[builder(default, into)]
27 #[serde(rename = "metadata", skip_serializing_if = "Option::is_none", default)]
28 metadata: Option<std::collections::BTreeMap<String, String>>,
29 #[builder(
30 default,
31 custom(
32 type = impl
33 Into<Option<super::Handle>>,
34 convert = |v|v.into().map(Box::new)
35 )
36 )]
37 #[serde(rename = "handle", skip_serializing_if = "Option::is_none", default)]
38 handle: Option<Box<super::Handle>>,
39 #[serde(rename = "ingestDate")]
40 ingest_date: conjure_object::DateTime<conjure_object::Utc>,
41 #[builder(default, into)]
42 #[serde(rename = "ingestStatus", skip_serializing_if = "Option::is_none", default)]
43 ingest_status: Option<super::IngestStatus>,
44 #[builder(custom(type = super::DatasetOriginMetadata, convert = Box::new))]
45 #[serde(rename = "originMetadata")]
46 origin_metadata: Box<super::DatasetOriginMetadata>,
47 #[builder(
48 custom(type = super::super::super::api::IngestStatusV2, convert = Box::new)
49 )]
50 #[serde(rename = "lastIngestStatus")]
51 last_ingest_status: Box<super::super::super::api::IngestStatusV2>,
52 #[builder(custom(type = super::RetentionPolicy, convert = Box::new))]
53 #[serde(rename = "retentionPolicy")]
54 retention_policy: Box<super::RetentionPolicy>,
55 #[builder(default, into)]
56 #[serde(rename = "source", skip_serializing_if = "Option::is_none", default)]
57 source: Option<String>,
58 #[builder(
59 default,
60 custom(
61 type = impl
62 Into<Option<super::Bounds>>,
63 convert = |v|v.into().map(Box::new)
64 )
65 )]
66 #[serde(rename = "bounds", skip_serializing_if = "Option::is_none", default)]
67 bounds: Option<Box<super::Bounds>>,
68 #[serde(rename = "timestampType")]
69 timestamp_type: super::WeakTimestampType,
70 #[builder(default, set(item(type = String, into)))]
71 #[serde(
72 rename = "labels",
73 skip_serializing_if = "std::collections::BTreeSet::is_empty",
74 default
75 )]
76 labels: std::collections::BTreeSet<String>,
77 #[builder(default, map(key(type = String, into), value(type = String, into)))]
78 #[serde(
79 rename = "properties",
80 skip_serializing_if = "std::collections::BTreeMap::is_empty",
81 default
82 )]
83 properties: std::collections::BTreeMap<String, String>,
84 #[serde(rename = "granularity")]
85 granularity: super::super::super::api::Granularity,
86 #[serde(rename = "allowStreaming")]
87 allow_streaming: bool,
88 #[serde(rename = "isArchived")]
89 is_archived: bool,
90 #[builder(default, into)]
91 #[serde(rename = "datasetType", skip_serializing_if = "Option::is_none", default)]
92 dataset_type: Option<super::DatasetBackingType>,
93 #[builder(default, into)]
94 #[serde(
95 rename = "migratedFromConnectionRid",
96 skip_serializing_if = "Option::is_none",
97 default
98 )]
99 migrated_from_connection_rid: Option<
100 super::super::datasource::connection::api::ConnectionRid,
101 >,
102 #[builder(
103 default,
104 custom(
105 type = impl
106 Into<Option<super::ExternalConnectionMetadata>>,
107 convert = |v|v.into().map(Box::new)
108 )
109 )]
110 #[serde(
111 rename = "externalConnectionMetadata",
112 skip_serializing_if = "Option::is_none",
113 default
114 )]
115 external_connection_metadata: Option<Box<super::ExternalConnectionMetadata>>,
116 #[builder(
117 default,
118 custom(
119 type = impl
120 Into<Option<super::DerivedDefinition>>,
121 convert = |v|v.into().map(Box::new)
122 )
123 )]
124 #[serde(
125 rename = "derivedDefinition",
126 skip_serializing_if = "Option::is_none",
127 default
128 )]
129 derived_definition: Option<Box<super::DerivedDefinition>>,
130}
131impl EnrichedDataset {
132 #[inline]
133 pub fn rid(&self) -> &conjure_object::ResourceIdentifier {
134 &self.rid
135 }
136 #[inline]
137 pub fn uuid(&self) -> conjure_object::Uuid {
138 self.uuid
139 }
140 #[inline]
141 pub fn name(&self) -> &str {
142 &*self.name
143 }
144 #[inline]
145 pub fn description(&self) -> Option<&str> {
146 self.description.as_ref().map(|o| &**o)
147 }
148 #[inline]
149 pub fn display_name(&self) -> &str {
150 &*self.display_name
151 }
152 #[deprecated(note = "Deprecated in favor of properties.")]
153 #[inline]
154 pub fn metadata(&self) -> Option<&std::collections::BTreeMap<String, String>> {
155 self.metadata.as_ref().map(|o| &*o)
156 }
157 #[deprecated(note = "Deprecated. Use DatasetFile#handle")]
158 #[inline]
159 pub fn handle(&self) -> Option<&super::Handle> {
160 self.handle.as_ref().map(|o| &**o)
161 }
162 #[inline]
163 pub fn ingest_date(&self) -> conjure_object::DateTime<conjure_object::Utc> {
164 self.ingest_date
165 }
166 #[deprecated(note = "Deprecated. Use lastIngestStatus.")]
167 #[inline]
168 pub fn ingest_status(&self) -> Option<&super::IngestStatus> {
169 self.ingest_status.as_ref().map(|o| &*o)
170 }
171 #[inline]
172 pub fn origin_metadata(&self) -> &super::DatasetOriginMetadata {
173 &*self.origin_metadata
174 }
175 #[inline]
176 pub fn last_ingest_status(&self) -> &super::super::super::api::IngestStatusV2 {
177 &*self.last_ingest_status
178 }
179 #[inline]
180 pub fn retention_policy(&self) -> &super::RetentionPolicy {
181 &*self.retention_policy
182 }
183 #[inline]
184 pub fn source(&self) -> Option<&str> {
185 self.source.as_ref().map(|o| &**o)
186 }
187 #[inline]
188 pub fn bounds(&self) -> Option<&super::Bounds> {
189 self.bounds.as_ref().map(|o| &**o)
190 }
191 #[inline]
192 pub fn timestamp_type(&self) -> &super::WeakTimestampType {
193 &self.timestamp_type
194 }
195 #[inline]
196 pub fn labels(&self) -> &std::collections::BTreeSet<String> {
197 &self.labels
198 }
199 #[inline]
200 pub fn properties(&self) -> &std::collections::BTreeMap<String, String> {
201 &self.properties
202 }
203 #[inline]
204 pub fn granularity(&self) -> &super::super::super::api::Granularity {
205 &self.granularity
206 }
207 #[inline]
208 pub fn allow_streaming(&self) -> bool {
209 self.allow_streaming
210 }
211 #[inline]
212 pub fn is_archived(&self) -> bool {
213 self.is_archived
214 }
215 #[inline]
216 pub fn dataset_type(&self) -> Option<&super::DatasetBackingType> {
217 self.dataset_type.as_ref().map(|o| &*o)
218 }
219 #[inline]
222 pub fn migrated_from_connection_rid(
223 &self,
224 ) -> Option<&super::super::datasource::connection::api::ConnectionRid> {
225 self.migrated_from_connection_rid.as_ref().map(|o| &*o)
226 }
227 #[inline]
228 pub fn external_connection_metadata(
229 &self,
230 ) -> Option<&super::ExternalConnectionMetadata> {
231 self.external_connection_metadata.as_ref().map(|o| &**o)
232 }
233 #[inline]
236 pub fn derived_definition(&self) -> Option<&super::DerivedDefinition> {
237 self.derived_definition.as_ref().map(|o| &**o)
238 }
239}