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 SearchModulesRequest {
    #[builder(custom(type = super::SearchModulesQuery, convert = Box::new))]
    #[serde(rename = "query")]
    query: Box<super::SearchModulesQuery>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::SearchModulesSortOptions>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "sort", skip_serializing_if = "Option::is_none", default)]
    sort: Option<Box<super::SearchModulesSortOptions>>,
    #[serde(rename = "pageSize")]
    page_size: i32,
    #[builder(default, into)]
    #[serde(rename = "nextPageToken", skip_serializing_if = "Option::is_none", default)]
    next_page_token: Option<super::super::api::Token>,
    #[builder(default, into)]
    #[serde(
        rename = "archivedStatuses",
        skip_serializing_if = "Option::is_none",
        default
    )]
    archived_statuses: Option<
        std::collections::BTreeSet<super::super::api::ArchivedStatus>,
    >,
}
impl SearchModulesRequest {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(query: super::SearchModulesQuery, page_size: i32) -> Self {
        Self::builder().query(query).page_size(page_size).build()
    }
    #[inline]
    pub fn query(&self) -> &super::SearchModulesQuery {
        &*self.query
    }
    #[inline]
    pub fn sort(&self) -> Option<&super::SearchModulesSortOptions> {
        self.sort.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn page_size(&self) -> i32 {
        self.page_size
    }
    #[inline]
    pub fn next_page_token(&self) -> Option<&super::super::api::Token> {
        self.next_page_token.as_ref().map(|o| &*o)
    }
    /// Default search status is NOT_ARCHIVED if none are provided. Allows for including archived modules in search.
    #[inline]
    pub fn archived_statuses(
        &self,
    ) -> Option<&std::collections::BTreeSet<super::super::api::ArchivedStatus>> {
        self.archived_statuses.as_ref().map(|o| &*o)
    }
}