/// Merge one or more values of a property key into a single target value.
#[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 MergePropertyValuesForKey {
    #[builder(into)]
    #[serde(rename = "key")]
    key: String,
    #[builder(default, set(item(type = String, into)))]
    #[serde(
        rename = "source",
        skip_serializing_if = "std::collections::BTreeSet::is_empty",
        default
    )]
    source: std::collections::BTreeSet<String>,
    #[builder(into)]
    #[serde(rename = "target")]
    target: String,
}
impl MergePropertyValuesForKey {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(key: impl Into<String>, target: impl Into<String>) -> Self {
        Self::builder().key(key).target(target).build()
    }
    #[inline]
    pub fn key(&self) -> &str {
        &*self.key
    }
    #[inline]
    pub fn source(&self) -> &std::collections::BTreeSet<String> {
        &self.source
    }
    #[inline]
    pub fn target(&self) -> &str {
        &*self.target
    }
}
