#[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 ClickHouseSeriesResolutionDetails {
    #[builder(into)]
    #[serde(rename = "channel")]
    channel: String,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::TagFilters>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "tags", skip_serializing_if = "Option::is_none", default)]
    tags: Option<Box<super::TagFilters>>,
    #[builder(default, set(item(type = String, into)))]
    #[serde(
        rename = "tagsToGroupBy",
        skip_serializing_if = "std::collections::BTreeSet::is_empty",
        default
    )]
    tags_to_group_by: std::collections::BTreeSet<String>,
    #[serde(rename = "orgRid")]
    org_rid: conjure_object::ResourceIdentifier,
}
impl ClickHouseSeriesResolutionDetails {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        channel: impl Into<String>,
        org_rid: conjure_object::ResourceIdentifier,
    ) -> Self {
        Self::builder().channel(channel).org_rid(org_rid).build()
    }
    #[inline]
    pub fn channel(&self) -> &str {
        &*self.channel
    }
    #[inline]
    pub fn tags(&self) -> Option<&super::TagFilters> {
        self.tags.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn tags_to_group_by(&self) -> &std::collections::BTreeSet<String> {
        &self.tags_to_group_by
    }
    #[inline]
    pub fn org_rid(&self) -> &conjure_object::ResourceIdentifier {
        &self.org_rid
    }
}
