nominal-api 0.1239.0

API bindings for the Nominal platform
Documentation
#[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 IngestMetadata {
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::TimestampMetadata>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(
        rename = "timestampMetadata",
        skip_serializing_if = "Option::is_none",
        default
    )]
    timestamp_metadata: Option<Box<super::TimestampMetadata>>,
    #[builder(default, into)]
    #[serde(rename = "channelPrefix", skip_serializing_if = "Option::is_none", default)]
    channel_prefix: Option<String>,
    #[builder(default, into)]
    #[serde(rename = "tagColumns", skip_serializing_if = "Option::is_none", default)]
    tag_columns: Option<
        std::collections::BTreeMap<
            super::super::super::api::TagName,
            super::super::super::api::ColumnName,
        >,
    >,
    #[builder(default, into)]
    #[serde(
        rename = "additionalFileTags",
        skip_serializing_if = "Option::is_none",
        default
    )]
    additional_file_tags: Option<
        std::collections::BTreeMap<
            super::super::super::api::TagName,
            super::super::super::api::TagValue,
        >,
    >,
}
impl IngestMetadata {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new() -> Self {
        Self::builder().build()
    }
    /// The timestamp metadata will be recovered from the dataset files if possible.
    /// Older datasets may have unrecoverable timestamp metadata.
    /// If unrecoverable, reingestion will throw MissingMetadataForReingest if not provided in request.
    #[inline]
    pub fn timestamp_metadata(&self) -> Option<&super::TimestampMetadata> {
        self.timestamp_metadata.as_ref().map(|o| &**o)
    }
    /// Channel prefix to use when reingesting the dataset.
    /// Defaults to empty string. Not recoverable from prior ingests and must be provided in request if needed.
    #[inline]
    pub fn channel_prefix(&self) -> Option<&str> {
        self.channel_prefix.as_ref().map(|o| &**o)
    }
    /// A map of tag names to column names to derive the tag values from.
    /// Not recoverable from prior ingests and must be provided in request if needed.
    #[inline]
    pub fn tag_columns(
        &self,
    ) -> Option<
        &std::collections::BTreeMap<
            super::super::super::api::TagName,
            super::super::super::api::ColumnName,
        >,
    > {
        self.tag_columns.as_ref().map(|o| &*o)
    }
    /// Additional tags to apply to all dataset files within the the given dataset.
    /// Not recoverable from prior ingests and must be provided in request if needed.
    #[inline]
    pub fn additional_file_tags(
        &self,
    ) -> Option<
        &std::collections::BTreeMap<
            super::super::super::api::TagName,
            super::super::super::api::TagValue,
        >,
    > {
        self.additional_file_tags.as_ref().map(|o| &*o)
    }
}