/// A singular time series to associate the event with.
#[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 TimeSeriesChannelAssociation {
    #[builder(into)]
    #[serde(rename = "variableName")]
    variable_name: String,
    #[builder(default, into)]
    #[serde(rename = "tags", skip_serializing_if = "Option::is_none", default)]
    tags: Option<std::collections::BTreeMap<String, String>>,
}
impl TimeSeriesChannelAssociation {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(variable_name: impl Into<String>) -> Self {
        Self::builder().variable_name(variable_name).build()
    }
    #[inline]
    pub fn variable_name(&self) -> &str {
        &*self.variable_name
    }
    /// If this variable is grouped, the tags within the groupings this event should associate with
    #[inline]
    pub fn tags(&self) -> Option<&std::collections::BTreeMap<String, String>> {
        self.tags.as_ref().map(|o| &*o)
    }
}
