/// A filter on a single tag key and set of values. For an IN operator, the tag key must match at least one of the
/// values in the set. For a NOT_IN operator, it must not match any of the values in the set.
#[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 TagFilter {
    #[builder(custom(type = super::StringConstant, convert = Box::new))]
    #[serde(rename = "key")]
    key: Box<super::StringConstant>,
    #[builder(default, set(item(type = super::StringConstant)))]
    #[serde(
        rename = "values",
        skip_serializing_if = "std::collections::BTreeSet::is_empty",
        default
    )]
    values: std::collections::BTreeSet<super::StringConstant>,
    #[serde(rename = "operator")]
    operator: super::TagFilterOperator,
}
impl TagFilter {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(key: super::StringConstant, operator: super::TagFilterOperator) -> Self {
        Self::builder().key(key).operator(operator).build()
    }
    #[inline]
    pub fn key(&self) -> &super::StringConstant {
        &*self.key
    }
    #[inline]
    pub fn values(&self) -> &std::collections::BTreeSet<super::StringConstant> {
        &self.values
    }
    #[inline]
    pub fn operator(&self) -> &super::TagFilterOperator {
        &self.operator
    }
}
