#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct DataflashOpts {
    #[builder(custom(type = super::IngestSource, convert = Box::new))]
    #[serde(rename = "source")]
    source: Box<super::IngestSource>,
    #[builder(custom(type = super::DatasetIngestTarget, convert = Box::new))]
    #[serde(rename = "target")]
    target: Box<super::DatasetIngestTarget>,
    #[builder(default, into)]
    #[serde(
        rename = "ignoreInvalidTimestamps",
        skip_serializing_if = "Option::is_none",
        default
    )]
    ignore_invalid_timestamps: Option<bool>,
    #[builder(default, into)]
    #[serde(
        rename = "additionalFileTags",
        skip_serializing_if = "Option::is_none",
        default
    )]
    additional_file_tags: Option<std::collections::BTreeMap<String, String>>,
}
impl DataflashOpts {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(source: super::IngestSource, target: super::DatasetIngestTarget) -> Self {
        Self::builder().source(source).target(target).build()
    }
    #[inline]
    pub fn source(&self) -> &super::IngestSource {
        &*self.source
    }
    #[inline]
    pub fn target(&self) -> &super::DatasetIngestTarget {
        &*self.target
    }
    /// If true, skips dataflash records whose timestamp cannot be represented (corrupted/out-of-range)
    /// instead of failing the entire ingest. If not provided, defaults to false.
    #[inline]
    pub fn ignore_invalid_timestamps(&self) -> Option<bool> {
        self.ignore_invalid_timestamps.as_ref().map(|o| *o)
    }
    /// Specifies a tag set to apply to all data in the file.
    #[inline]
    pub fn additional_file_tags(
        &self,
    ) -> Option<&std::collections::BTreeMap<String, String>> {
        self.additional_file_tags.as_ref().map(|o| &*o)
    }
}
