nominal_api_conjure/conjure/objects/ingest/manifest/
manifest_output.rs1#[derive(
4 Debug,
5 Clone,
6 conjure_object::serde::Serialize,
7 conjure_object::serde::Deserialize,
8 PartialEq,
9 Eq,
10 PartialOrd,
11 Ord,
12 Hash
13)]
14#[serde(crate = "conjure_object::serde")]
15#[conjure_object::private::staged_builder::staged_builder]
16#[builder(crate = conjure_object::private::staged_builder, update, inline)]
17pub struct ManifestOutput {
18 #[serde(rename = "ingestType")]
19 ingest_type: super::ManifestIngestType,
20 #[builder(into)]
21 #[serde(rename = "relativePath")]
22 relative_path: String,
23 #[builder(default, map(key(type = String, into), value(type = String, into)))]
24 #[serde(
25 rename = "tagColumns",
26 skip_serializing_if = "std::collections::BTreeMap::is_empty",
27 default
28 )]
29 tag_columns: std::collections::BTreeMap<String, String>,
30 #[builder(default, into)]
31 #[serde(rename = "channelPrefix", skip_serializing_if = "Option::is_none", default)]
32 channel_prefix: Option<String>,
33 #[builder(
34 default,
35 custom(
36 type = impl
37 Into<Option<super::ManifestTimestampMetadata>>,
38 convert = |v|v.into().map(Box::new)
39 )
40 )]
41 #[serde(
42 rename = "timestampMetadata",
43 skip_serializing_if = "Option::is_none",
44 default
45 )]
46 timestamp_metadata: Option<Box<super::ManifestTimestampMetadata>>,
47}
48impl ManifestOutput {
49 #[inline]
51 pub fn new(
52 ingest_type: super::ManifestIngestType,
53 relative_path: impl Into<String>,
54 ) -> Self {
55 Self::builder().ingest_type(ingest_type).relative_path(relative_path).build()
56 }
57 #[inline]
59 pub fn ingest_type(&self) -> &super::ManifestIngestType {
60 &self.ingest_type
61 }
62 #[inline]
65 pub fn relative_path(&self) -> &str {
66 &*self.relative_path
67 }
68 #[inline]
71 pub fn tag_columns(&self) -> &std::collections::BTreeMap<String, String> {
72 &self.tag_columns
73 }
74 #[inline]
77 pub fn channel_prefix(&self) -> Option<&str> {
78 self.channel_prefix.as_ref().map(|o| &**o)
79 }
80 #[inline]
85 pub fn timestamp_metadata(&self) -> Option<&super::ManifestTimestampMetadata> {
86 self.timestamp_metadata.as_ref().map(|o| &**o)
87 }
88}