nominal_api/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}
34impl ManifestOutput {
35 #[inline]
37 pub fn new(
38 ingest_type: super::ManifestIngestType,
39 relative_path: impl Into<String>,
40 ) -> Self {
41 Self::builder().ingest_type(ingest_type).relative_path(relative_path).build()
42 }
43 #[inline]
45 pub fn ingest_type(&self) -> &super::ManifestIngestType {
46 &self.ingest_type
47 }
48 #[inline]
51 pub fn relative_path(&self) -> &str {
52 &*self.relative_path
53 }
54 #[inline]
57 pub fn tag_columns(&self) -> &std::collections::BTreeMap<String, String> {
58 &self.tag_columns
59 }
60 #[inline]
63 pub fn channel_prefix(&self) -> Option<&str> {
64 self.channel_prefix.as_ref().map(|o| &**o)
65 }
66}