nominal-api 0.1239.0

API bindings for the Nominal platform
Documentation
#[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 SearchHierarchicalChannelsRequest {
    #[builder(default, list(item(type = String, into)))]
    #[serde(rename = "parent", skip_serializing_if = "Vec::is_empty", default)]
    parent: Vec<String>,
    #[builder(default, set(item(type = super::super::super::api::rids::DataSourceRid)))]
    #[serde(
        rename = "dataSources",
        skip_serializing_if = "std::collections::BTreeSet::is_empty",
        default
    )]
    data_sources: std::collections::BTreeSet<
        super::super::super::api::rids::DataSourceRid,
    >,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::DataScopeFilters>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(
        rename = "dataScopeFilters",
        skip_serializing_if = "Option::is_none",
        default
    )]
    data_scope_filters: Option<Box<super::DataScopeFilters>>,
}
impl SearchHierarchicalChannelsRequest {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new() -> Self {
        Self::builder().build()
    }
    /// The parent (represented as a list of parts) to search under. If empty, will return all top-level channels.
    #[inline]
    pub fn parent(&self) -> &[String] {
        &*self.parent
    }
    #[inline]
    pub fn data_sources(
        &self,
    ) -> &std::collections::BTreeSet<super::super::super::api::rids::DataSourceRid> {
        &self.data_sources
    }
    /// When dataScopeFilters are specified, the set of data sources must match the set of data sources in
    /// DataScopeFilters#tags
    #[inline]
    pub fn data_scope_filters(&self) -> Option<&super::DataScopeFilters> {
        self.data_scope_filters.as_ref().map(|o| &**o)
    }
}