nominal_api/conjure/objects/ingest/api/
dataflash_opts.rs1#[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 DataflashOpts {
16 #[builder(custom(type = super::IngestSource, convert = Box::new))]
17 #[serde(rename = "source")]
18 source: Box<super::IngestSource>,
19 #[builder(custom(type = super::DatasetIngestTarget, convert = Box::new))]
20 #[serde(rename = "target")]
21 target: Box<super::DatasetIngestTarget>,
22 #[builder(default, into)]
23 #[serde(
24 rename = "additionalFileTags",
25 skip_serializing_if = "Option::is_none",
26 default
27 )]
28 additional_file_tags: Option<std::collections::BTreeMap<String, String>>,
29}
30impl DataflashOpts {
31 #[inline]
33 pub fn new(source: super::IngestSource, target: super::DatasetIngestTarget) -> Self {
34 Self::builder().source(source).target(target).build()
35 }
36 #[inline]
37 pub fn source(&self) -> &super::IngestSource {
38 &*self.source
39 }
40 #[inline]
41 pub fn target(&self) -> &super::DatasetIngestTarget {
42 &*self.target
43 }
44 #[inline]
46 pub fn additional_file_tags(
47 &self,
48 ) -> Option<&std::collections::BTreeMap<String, String>> {
49 self.additional_file_tags.as_ref().map(|o| &*o)
50 }
51}