#[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 BigQueryScrapingConfig {
    #[serde(rename = "timeColumn")]
    time_column: super::ColumnName,
    #[builder(default, set(item(type = super::ColumnName)))]
    #[serde(
        rename = "tagColumns",
        skip_serializing_if = "std::collections::BTreeSet::is_empty",
        default
    )]
    tag_columns: std::collections::BTreeSet<super::ColumnName>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::BigQueryChannelNameComponent>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(
        rename = "channelNameComponents",
        skip_serializing_if = "Option::is_none",
        default
    )]
    channel_name_components: Option<Box<super::BigQueryChannelNameComponent>>,
    #[builder(default, into)]
    #[serde(rename = "separator", skip_serializing_if = "Option::is_none", default)]
    separator: Option<String>,
}
impl BigQueryScrapingConfig {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(time_column: super::ColumnName) -> Self {
        Self::builder().time_column(time_column).build()
    }
    /// The name of the column that holds the timestamp.
    #[inline]
    pub fn time_column(&self) -> &super::ColumnName {
        &self.time_column
    }
    /// The name of the columns that should be interpreted as tag columns
    #[inline]
    pub fn tag_columns(&self) -> &std::collections::BTreeSet<super::ColumnName> {
        &self.tag_columns
    }
    /// channelNameComponents will be combined, together with separator, to form
    /// a fully qualified channel name. By default, we don't add anything
    /// to the column name.
    #[inline]
    pub fn channel_name_components(
        &self,
    ) -> Option<&super::BigQueryChannelNameComponent> {
        self.channel_name_components.as_ref().map(|o| &**o)
    }
    /// The separator that delimits the parts of the channel name. If
    /// ommitted, the default is a ".".
    #[inline]
    pub fn separator(&self) -> Option<&str> {
        self.separator.as_ref().map(|o| &**o)
    }
}
