#[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 DataScopeFilters {
    #[builder(
        default,
        map(
            key(type = conjure_object::ResourceIdentifier),
            value(
                custom(
                    type = impl
                    IntoIterator<Item = (String, String)>,
                    convert = |v|v.into_iter().collect()
                )
            )
        )
    )]
    #[serde(
        rename = "tags",
        skip_serializing_if = "std::collections::BTreeMap::is_empty",
        default
    )]
    tags: std::collections::BTreeMap<
        conjure_object::ResourceIdentifier,
        std::collections::BTreeMap<String, String>,
    >,
    #[builder(
        custom(
            type = super::super::super::scout::run::api::UtcTimestamp,
            convert = Box::new
        )
    )]
    #[serde(rename = "minDataUpdatedTime")]
    min_data_updated_time: Box<super::super::super::scout::run::api::UtcTimestamp>,
    #[builder(
        custom(
            type = super::super::super::scout::run::api::UtcTimestamp,
            convert = Box::new
        )
    )]
    #[serde(rename = "maxDataStartTime")]
    max_data_start_time: Box<super::super::super::scout::run::api::UtcTimestamp>,
}
impl DataScopeFilters {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        min_data_updated_time: super::super::super::scout::run::api::UtcTimestamp,
        max_data_start_time: super::super::super::scout::run::api::UtcTimestamp,
    ) -> Self {
        Self::builder()
            .min_data_updated_time(min_data_updated_time)
            .max_data_start_time(max_data_start_time)
            .build()
    }
    /// For each data source specified as a key, search will only return channels containing a superset of the
    /// tags specified for that given datasource.
    #[inline]
    pub fn tags(
        &self,
    ) -> &std::collections::BTreeMap<
        conjure_object::ResourceIdentifier,
        std::collections::BTreeMap<String, String>,
    > {
        &self.tags
    }
    /// Will only return channels that have had new data after the specified time.
    #[inline]
    pub fn min_data_updated_time(
        &self,
    ) -> &super::super::super::scout::run::api::UtcTimestamp {
        &*self.min_data_updated_time
    }
    /// Will only return channels that have data before the specified time.
    #[inline]
    pub fn max_data_start_time(
        &self,
    ) -> &super::super::super::scout::run::api::UtcTimestamp {
        &*self.max_data_start_time
    }
}
