nominal-api 0.1239.0

API bindings for the Nominal platform
Documentation
/// Options for ingesting parquet files.
/// Supported file formats include .parquet, .parquet.gz
/// and archives such as .tar, .tar.gz, and .zip (must set the isArchive flag).
#[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 ParquetOpts {
    #[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(custom(type = super::TimestampMetadata, convert = Box::new))]
    #[serde(rename = "timestampMetadata")]
    timestamp_metadata: Box<super::TimestampMetadata>,
    #[builder(default)]
    #[serde(rename = "channelPrefix", skip_serializing_if = "Option::is_none", default)]
    channel_prefix: super::ChannelPrefix,
    #[builder(default, into)]
    #[serde(
        rename = "tagKeysFromColumns",
        skip_serializing_if = "Option::is_none",
        default
    )]
    tag_keys_from_columns: Option<
        std::collections::BTreeSet<super::super::super::api::TagName>,
    >,
    #[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,
        >,
    >,
    #[builder(default, into)]
    #[serde(rename = "isArchive", skip_serializing_if = "Option::is_none", default)]
    is_archive: Option<bool>,
    #[builder(default, set(item(type = super::super::super::api::ColumnName)))]
    #[serde(
        rename = "excludeColumns",
        skip_serializing_if = "std::collections::BTreeSet::is_empty",
        default
    )]
    exclude_columns: std::collections::BTreeSet<super::super::super::api::ColumnName>,
}
impl ParquetOpts {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        source: super::IngestSource,
        target: super::DatasetIngestTarget,
        timestamp_metadata: super::TimestampMetadata,
    ) -> Self {
        Self::builder()
            .source(source)
            .target(target)
            .timestamp_metadata(timestamp_metadata)
            .build()
    }
    #[inline]
    pub fn source(&self) -> &super::IngestSource {
        &*self.source
    }
    #[inline]
    pub fn target(&self) -> &super::DatasetIngestTarget {
        &*self.target
    }
    #[inline]
    pub fn timestamp_metadata(&self) -> &super::TimestampMetadata {
        &*self.timestamp_metadata
    }
    #[inline]
    pub fn channel_prefix(&self) -> &super::ChannelPrefix {
        &self.channel_prefix
    }
    #[deprecated(note = "Deprecated in favor of tagColumns.")]
    #[inline]
    pub fn tag_keys_from_columns(
        &self,
    ) -> Option<&std::collections::BTreeSet<super::super::super::api::TagName>> {
        self.tag_keys_from_columns.as_ref().map(|o| &*o)
    }
    /// A map of tag names to column names to derive the tag values from.
    #[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)
    }
    /// Specifies a tag set to apply to all data in the file.
    #[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)
    }
    /// If true, the file is an archive. Supported archive formats include
    /// .tar, .tar.gz, and .zip. Only files ending in .parquet
    /// within the archive will be ingested. If field not provided, defaults to false.
    #[inline]
    pub fn is_archive(&self) -> Option<bool> {
        self.is_archive.as_ref().map(|o| *o)
    }
    /// A set of column names to exclude from ingestion. These columns will not be
    /// ingested as channels. Useful for excluding columns that contain unsupported
    /// data types like multidimensional arrays.
    #[inline]
    pub fn exclude_columns(
        &self,
    ) -> &std::collections::BTreeSet<super::super::super::api::ColumnName> {
        &self.exclude_columns
    }
}