#[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 SearchDatasetFilesRequest {
    #[serde(rename = "datasetRid")]
    dataset_rid: conjure_object::ResourceIdentifier,
    #[builder(custom(type = super::SearchDatasetFilesQuery, convert = Box::new))]
    #[serde(rename = "query")]
    query: Box<super::SearchDatasetFilesQuery>,
    #[builder(default, into)]
    #[serde(rename = "pageSize", skip_serializing_if = "Option::is_none", default)]
    page_size: Option<i32>,
    #[builder(default, into)]
    #[serde(rename = "token", skip_serializing_if = "Option::is_none", default)]
    token: Option<String>,
    #[builder(custom(type = super::DatasetFileSortOptions, convert = Box::new))]
    #[serde(rename = "sortOptions")]
    sort_options: Box<super::DatasetFileSortOptions>,
}
impl SearchDatasetFilesRequest {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        dataset_rid: conjure_object::ResourceIdentifier,
        query: super::SearchDatasetFilesQuery,
        sort_options: super::DatasetFileSortOptions,
    ) -> Self {
        Self::builder()
            .dataset_rid(dataset_rid)
            .query(query)
            .sort_options(sort_options)
            .build()
    }
    #[inline]
    pub fn dataset_rid(&self) -> &conjure_object::ResourceIdentifier {
        &self.dataset_rid
    }
    #[inline]
    pub fn query(&self) -> &super::SearchDatasetFilesQuery {
        &*self.query
    }
    /// Defaults to 100. Will throw if larger than 1000.
    #[inline]
    pub fn page_size(&self) -> Option<i32> {
        self.page_size.as_ref().map(|o| *o)
    }
    #[inline]
    pub fn token(&self) -> Option<&str> {
        self.token.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn sort_options(&self) -> &super::DatasetFileSortOptions {
        &*self.sort_options
    }
}
