#[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 ChannelWithAvailableTags {
    #[serde(rename = "dataSourceRid")]
    data_source_rid: conjure_object::ResourceIdentifier,
    #[builder(into)]
    #[serde(rename = "channel")]
    channel: String,
    #[builder(
        default,
        map(
            key(type = String, into),
            value(
                custom(
                    type = impl
                    IntoIterator<Item = String>,
                    convert = |v|v.into_iter().collect()
                )
            )
        )
    )]
    #[serde(
        rename = "availableTags",
        skip_serializing_if = "std::collections::BTreeMap::is_empty",
        default
    )]
    available_tags: std::collections::BTreeMap<
        String,
        std::collections::BTreeSet<String>,
    >,
}
impl ChannelWithAvailableTags {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        data_source_rid: conjure_object::ResourceIdentifier,
        channel: impl Into<String>,
    ) -> Self {
        Self::builder().data_source_rid(data_source_rid).channel(channel).build()
    }
    #[inline]
    pub fn data_source_rid(&self) -> &conjure_object::ResourceIdentifier {
        &self.data_source_rid
    }
    #[inline]
    pub fn channel(&self) -> &str {
        &*self.channel
    }
    /// A set of tag keys and their values given the initial set of filters. The initial tag filters
    /// will be included in the map with their corresponding values.
    #[inline]
    pub fn available_tags(
        &self,
    ) -> &std::collections::BTreeMap<String, std::collections::BTreeSet<String>> {
        &self.available_tags
    }
}
