#[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(into)]
    #[serde(rename = "key")]
    key: String,
    #[builder(default, set(item(type = String, into)))]
    #[serde(
        rename = "values",
        skip_serializing_if = "std::collections::BTreeSet::is_empty",
        default
    )]
    values: std::collections::BTreeSet<String>,
    #[serde(rename = "operator")]
    operator: super::TagFilterOperator,
}
impl TagFilter {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(key: impl Into<String>, operator: super::TagFilterOperator) -> Self {
        Self::builder().key(key).operator(operator).build()
    }
    #[inline]
    pub fn key(&self) -> &str {
        &*self.key
    }
    #[inline]
    pub fn values(&self) -> &std::collections::BTreeSet<String> {
        &self.values
    }
    #[inline]
    pub fn operator(&self) -> &super::TagFilterOperator {
        &self.operator
    }
}
