#[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 GetTagValuesForDataSourceRequest {
    #[builder(default, into)]
    #[serde(rename = "tagKeys", skip_serializing_if = "Option::is_none", default)]
    tag_keys: Option<std::collections::BTreeSet<String>>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::super::super::api::Range>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "range", skip_serializing_if = "Option::is_none", default)]
    range: Option<Box<super::super::super::api::Range>>,
    #[builder(default, into)]
    #[serde(
        rename = "maxValuesPerKey",
        skip_serializing_if = "Option::is_none",
        default
    )]
    max_values_per_key: Option<i32>,
}
impl GetTagValuesForDataSourceRequest {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new() -> Self {
        Self::builder().build()
    }
    /// If empty, returns all available tag keys.
    #[inline]
    pub fn tag_keys(&self) -> Option<&std::collections::BTreeSet<String>> {
        self.tag_keys.as_ref().map(|o| &*o)
    }
    /// For Nominal data sources, a time range can be provided to filter tag values to those present within the
    /// months spanned by the range. If left empty, this defaults to the last month. For external data sources,
    /// the range must not be specified, as all tag values are returned.
    #[inline]
    pub fn range(&self) -> Option<&super::super::super::api::Range> {
        self.range.as_ref().map(|o| &**o)
    }
    /// If supplied, caps the number of values per key at the specified value.
    #[inline]
    pub fn max_values_per_key(&self) -> Option<i32> {
        self.max_values_per_key.as_ref().map(|o| *o)
    }
}
