Skip to main content

nominal_api/conjure/objects/ingest/api/
mcap_protobuf_timeseries_opts.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 McapProtobufTimeseriesOpts {
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(custom(type = super::McapChannels, convert = Box::new))]
23    #[serde(rename = "channelFilter")]
24    channel_filter: Box<super::McapChannels>,
25    #[builder(custom(type = super::McapTimestampType, convert = Box::new))]
26    #[serde(rename = "timestampType")]
27    timestamp_type: Box<super::McapTimestampType>,
28    #[builder(default, into)]
29    #[serde(
30        rename = "ignoreInvalidTopics",
31        skip_serializing_if = "Option::is_none",
32        default
33    )]
34    ignore_invalid_topics: Option<bool>,
35    #[builder(default, into)]
36    #[serde(
37        rename = "additionalFileTags",
38        skip_serializing_if = "Option::is_none",
39        default
40    )]
41    additional_file_tags: Option<std::collections::BTreeMap<String, String>>,
42}
43impl McapProtobufTimeseriesOpts {
44    #[inline]
45    pub fn source(&self) -> &super::IngestSource {
46        &*self.source
47    }
48    #[inline]
49    pub fn target(&self) -> &super::DatasetIngestTarget {
50        &*self.target
51    }
52    #[inline]
53    pub fn channel_filter(&self) -> &super::McapChannels {
54        &*self.channel_filter
55    }
56    #[inline]
57    pub fn timestamp_type(&self) -> &super::McapTimestampType {
58        &*self.timestamp_type
59    }
60    /// If true, skips invalid MCAP topics during ingestion instead of failing the entire ingest.
61    /// If not provided, defaults to false.
62    #[inline]
63    pub fn ignore_invalid_topics(&self) -> Option<bool> {
64        self.ignore_invalid_topics.as_ref().map(|o| *o)
65    }
66    /// Specifies a tag set to apply to all data in the file.
67    #[inline]
68    pub fn additional_file_tags(
69        &self,
70    ) -> Option<&std::collections::BTreeMap<String, String>> {
71        self.additional_file_tags.as_ref().map(|o| &*o)
72    }
73}