/// If both sets are empty, an empty page is returned.
/// If one set is empty, that field is not considered for filtering (like a wildcard).
/// If commitId is omitted from a ChecklistRef, it will match all commits.
#[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 FindDataReviewsRequest {
    #[builder(default, set(item(type = super::super::super::run::api::RunRid)))]
    #[serde(
        rename = "runRids",
        skip_serializing_if = "std::collections::BTreeSet::is_empty",
        default
    )]
    run_rids: std::collections::BTreeSet<super::super::super::run::api::RunRid>,
    #[builder(default, set(item(type = super::super::super::rids::api::AssetRid)))]
    #[serde(
        rename = "assetRids",
        skip_serializing_if = "std::collections::BTreeSet::is_empty",
        default
    )]
    asset_rids: std::collections::BTreeSet<super::super::super::rids::api::AssetRid>,
    #[builder(default, into)]
    #[serde(
        rename = "filterByBothRunsAndAssets",
        skip_serializing_if = "Option::is_none",
        default
    )]
    filter_by_both_runs_and_assets: Option<bool>,
    #[builder(default, set(item(type = super::super::super::checks::api::ChecklistRef)))]
    #[serde(
        rename = "checklistRefs",
        skip_serializing_if = "std::collections::BTreeSet::is_empty",
        default
    )]
    checklist_refs: std::collections::BTreeSet<
        super::super::super::checks::api::ChecklistRef,
    >,
    #[builder(default, into)]
    #[serde(rename = "nextPageToken", skip_serializing_if = "Option::is_none", default)]
    next_page_token: Option<String>,
    #[builder(default, into)]
    #[serde(rename = "pageSize", skip_serializing_if = "Option::is_none", default)]
    page_size: Option<i32>,
    #[builder(default, into)]
    #[serde(rename = "showArchived", skip_serializing_if = "Option::is_none", default)]
    show_archived: Option<bool>,
    #[builder(default, into)]
    #[serde(
        rename = "archivedStatuses",
        skip_serializing_if = "Option::is_none",
        default
    )]
    archived_statuses: Option<
        std::collections::BTreeSet<super::super::super::super::api::ArchivedStatus>,
    >,
}
impl FindDataReviewsRequest {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new() -> Self {
        Self::builder().build()
    }
    #[inline]
    pub fn run_rids(
        &self,
    ) -> &std::collections::BTreeSet<super::super::super::run::api::RunRid> {
        &self.run_rids
    }
    #[inline]
    pub fn asset_rids(
        &self,
    ) -> &std::collections::BTreeSet<super::super::super::rids::api::AssetRid> {
        &self.asset_rids
    }
    /// If true, results are filtered to data reviews w/ both run and asset in the requested runs/assets.
    /// Defaults to false, where assets are converted to runs and all data reviews under the linked runs
    /// (including data reviews on other assets sharing the parent run) will be returned.
    /// It is recommended to set this to true and pass in asset RIDs for multi-asset runs.
    /// Toggling this option has no effect if no asset RIDs are supplied.
    #[inline]
    pub fn filter_by_both_runs_and_assets(&self) -> Option<bool> {
        self.filter_by_both_runs_and_assets.as_ref().map(|o| *o)
    }
    #[inline]
    pub fn checklist_refs(
        &self,
    ) -> &std::collections::BTreeSet<super::super::super::checks::api::ChecklistRef> {
        &self.checklist_refs
    }
    #[inline]
    pub fn next_page_token(&self) -> Option<&str> {
        self.next_page_token.as_ref().map(|o| &**o)
    }
    /// Defaults to 1000. Will throw if larger than 1000.
    #[inline]
    pub fn page_size(&self) -> Option<i32> {
        self.page_size.as_ref().map(|o| *o)
    }
    /// To be deprecated. Use archivedStatuses instead. Allows for inclusion of archived data reviews
    /// in search results alongside non-archived ones. Defaults to false if not specified.
    #[inline]
    pub fn show_archived(&self) -> Option<bool> {
        self.show_archived.as_ref().map(|o| *o)
    }
    /// Filters search on data reviews based on the archived statuses provided.
    /// Default is NOT_ARCHIVED only if none are provided.
    #[inline]
    pub fn archived_statuses(
        &self,
    ) -> Option<
        &std::collections::BTreeSet<super::super::super::super::api::ArchivedStatus>,
    > {
        self.archived_statuses.as_ref().map(|o| &*o)
    }
}
