/// Filters applied when searching for available tag keys and values.
/// For batch requests these are applied to every request id.
#[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 TagSearchFilters {
    #[builder(default, into)]
    #[serde(rename = "channel", skip_serializing_if = "Option::is_none", default)]
    channel: Option<String>,
    #[builder(default, map(key(type = String, into), value(type = String, into)))]
    #[serde(
        rename = "tagFilters",
        skip_serializing_if = "std::collections::BTreeMap::is_empty",
        default
    )]
    tag_filters: std::collections::BTreeMap<String, String>,
    #[builder(custom(type = super::super::super::super::api::Range, convert = Box::new))]
    #[serde(rename = "range")]
    range: Box<super::super::super::super::api::Range>,
}
impl TagSearchFilters {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(range: super::super::super::super::api::Range) -> Self {
        Self::builder().range(range).build()
    }
    /// Optional, defaults to all channels in the scope.
    #[inline]
    pub fn channel(&self) -> Option<&str> {
        self.channel.as_ref().map(|o| &**o)
    }
    /// Optional, defaults to no tag filter. Tag keys present here are omitted from tag-key results.
    #[inline]
    pub fn tag_filters(&self) -> &std::collections::BTreeMap<String, String> {
        &self.tag_filters
    }
    #[inline]
    pub fn range(&self) -> &super::super::super::super::api::Range {
        &*self.range
    }
}
