// @generated by jacquard-lexicon. DO NOT EDIT.
//
// Lexicon: tools.ozone.moderation.queryStatuses
//
// This file was automatically generated from Lexicon schemas.
// Any manual changes will be overwritten on the next regeneration.

#[allow(unused_imports)]
use alloc::collections::BTreeMap;

#[allow(unused_imports)]
use core::marker::PhantomData;
use jacquard_common::{CowStr, BosStr, DefaultStr, FromStaticStr};
use jacquard_common::deps::smol_str::SmolStr;
use jacquard_common::types::string::{Did, Nsid, Datetime, UriValue};
use jacquard_common::types::value::Data;
use jacquard_derive::IntoStatic;
use serde::{Serialize, Deserialize};
use crate::tools_ozone::moderation::SubjectStatusView;

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
pub struct QueryStatuses<S: BosStr = DefaultStr> {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub age_assurance_state: Option<S>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub appealed: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub collections: Option<Vec<Nsid<S>>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub comment: Option<S>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cursor: Option<S>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub exclude_tags: Option<Vec<S>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub hosting_deleted_after: Option<Datetime>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub hosting_deleted_before: Option<Datetime>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub hosting_statuses: Option<Vec<S>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub hosting_updated_after: Option<Datetime>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub hosting_updated_before: Option<Datetime>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub ignore_subjects: Option<Vec<UriValue<S>>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub include_all_user_records: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub include_muted: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub last_reviewed_by: Option<Did<S>>,
    /// Defaults to `50`. Min: 1. Max: 100.
    #[serde(default = "_default_limit")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub limit: Option<i64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub min_account_suspend_count: Option<i64>,
    /// (min: 0, max: 100)
    #[serde(skip_serializing_if = "Option::is_none")]
    pub min_priority_score: Option<i64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub min_reported_records_count: Option<i64>,
    /// (min: 1)
    #[serde(skip_serializing_if = "Option::is_none")]
    pub min_strike_count: Option<i64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub min_takendown_records_count: Option<i64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub only_muted: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub queue_count: Option<i64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub queue_index: Option<i64>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub queue_seed: Option<S>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub reported_after: Option<Datetime>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub reported_before: Option<Datetime>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub review_state: Option<S>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub reviewed_after: Option<Datetime>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub reviewed_before: Option<Datetime>,
    /// Defaults to `"desc"`.
    #[serde(default = "_default_sort_direction")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub sort_direction: Option<S>,
    /// Defaults to `"lastReportedAt"`.
    #[serde(default = "_default_sort_field")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub sort_field: Option<S>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub subject: Option<UriValue<S>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub subject_type: Option<S>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<S>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub takendown: Option<bool>,
}


#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
pub struct QueryStatusesOutput<S: BosStr = DefaultStr> {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cursor: Option<S>,
    pub subject_statuses: Vec<SubjectStatusView<S>>,
    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}

/** Response marker for the `tools.ozone.moderation.queryStatuses` query.

Implements `jacquard_common::xrpc::XrpcResp`; successful bodies decode as `Self::Output<S>`, which is `QueryStatusesOutput<S>` for this endpoint.*/
pub struct QueryStatusesResponse;
impl jacquard_common::xrpc::XrpcResp for QueryStatusesResponse {
    const NSID: &'static str = "tools.ozone.moderation.queryStatuses";
    const ENCODING: &'static str = "application/json";
    type Output<S: BosStr> = QueryStatusesOutput<S>;
    type Err = jacquard_common::xrpc::GenericError;
}

impl<S: BosStr> jacquard_common::xrpc::XrpcRequest for QueryStatuses<S> {
    const NSID: &'static str = "tools.ozone.moderation.queryStatuses";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
    type Response = QueryStatusesResponse;
}

/** Endpoint marker for the `tools.ozone.moderation.queryStatuses` query.

Path: `/xrpc/tools.ozone.moderation.queryStatuses`. The request payload type is `QueryStatuses<S>`; send that request with `jacquard::Client` or use this marker through lower-level `XrpcEndpoint` APIs.*/
pub struct QueryStatusesRequest;
impl jacquard_common::xrpc::XrpcEndpoint for QueryStatusesRequest {
    const PATH: &'static str = "/xrpc/tools.ozone.moderation.queryStatuses";
    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
    type Request<S: BosStr> = QueryStatuses<S>;
    type Response = QueryStatusesResponse;
}

fn _default_limit() -> Option<i64> {
    Some(50i64)
}

fn _default_sort_direction<S: jacquard_common::FromStaticStr>() -> Option<S> {
    Some(S::from_static("desc"))
}

fn _default_sort_field<S: jacquard_common::FromStaticStr>() -> Option<S> {
    Some(S::from_static("lastReportedAt"))
}

pub mod query_statuses_state {

    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
    #[allow(unused)]
    use ::core::marker::PhantomData;
    mod sealed {
        pub trait Sealed {}
    }
    /// State trait tracking which required fields have been set
    pub trait State: sealed::Sealed {}
    /// Empty state - all required fields are unset
    pub struct Empty(());
    impl sealed::Sealed for Empty {}
    impl State for Empty {}
    /// Marker types for field names
    #[allow(non_camel_case_types)]
    pub mod members {}
}

/// Builder for constructing an instance of this type.
pub struct QueryStatusesBuilder<
    St: query_statuses_state::State,
    S: BosStr = DefaultStr,
> {
    _state: PhantomData<fn() -> St>,
    _fields: (
        Option<S>,
        Option<bool>,
        Option<Vec<Nsid<S>>>,
        Option<S>,
        Option<S>,
        Option<Vec<S>>,
        Option<Datetime>,
        Option<Datetime>,
        Option<Vec<S>>,
        Option<Datetime>,
        Option<Datetime>,
        Option<Vec<UriValue<S>>>,
        Option<bool>,
        Option<bool>,
        Option<Did<S>>,
        Option<i64>,
        Option<i64>,
        Option<i64>,
        Option<i64>,
        Option<i64>,
        Option<i64>,
        Option<bool>,
        Option<i64>,
        Option<i64>,
        Option<S>,
        Option<Datetime>,
        Option<Datetime>,
        Option<S>,
        Option<Datetime>,
        Option<Datetime>,
        Option<S>,
        Option<S>,
        Option<UriValue<S>>,
        Option<S>,
        Option<Vec<S>>,
        Option<bool>,
    ),
    _type: PhantomData<fn() -> S>,
}

impl QueryStatuses<DefaultStr> {
    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
    pub fn new() -> QueryStatusesBuilder<query_statuses_state::Empty, DefaultStr> {
        QueryStatusesBuilder::new()
    }
}

impl<S: BosStr> QueryStatuses<S> {
    /// Create a new builder for this type
    pub fn builder() -> QueryStatusesBuilder<query_statuses_state::Empty, S> {
        QueryStatusesBuilder::builder()
    }
}

impl QueryStatusesBuilder<query_statuses_state::Empty, DefaultStr> {
    /// Create a new builder with all fields unset, using the default string type, if needed
    pub fn new() -> Self {
        QueryStatusesBuilder {
            _state: PhantomData,
            _fields: (
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
            ),
            _type: PhantomData,
        }
    }
}

impl<S: BosStr> QueryStatusesBuilder<query_statuses_state::Empty, S> {
    /// Create a new builder with all fields unset
    pub fn builder() -> Self {
        QueryStatusesBuilder {
            _state: PhantomData,
            _fields: (
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
                None,
            ),
            _type: PhantomData,
        }
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `ageAssuranceState` field (optional)
    pub fn age_assurance_state(mut self, value: impl Into<Option<S>>) -> Self {
        self._fields.0 = value.into();
        self
    }
    /// Set the `ageAssuranceState` field to an Option value (optional)
    pub fn maybe_age_assurance_state(mut self, value: Option<S>) -> Self {
        self._fields.0 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `appealed` field (optional)
    pub fn appealed(mut self, value: impl Into<Option<bool>>) -> Self {
        self._fields.1 = value.into();
        self
    }
    /// Set the `appealed` field to an Option value (optional)
    pub fn maybe_appealed(mut self, value: Option<bool>) -> Self {
        self._fields.1 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `collections` field (optional)
    pub fn collections(mut self, value: impl Into<Option<Vec<Nsid<S>>>>) -> Self {
        self._fields.2 = value.into();
        self
    }
    /// Set the `collections` field to an Option value (optional)
    pub fn maybe_collections(mut self, value: Option<Vec<Nsid<S>>>) -> Self {
        self._fields.2 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `comment` field (optional)
    pub fn comment(mut self, value: impl Into<Option<S>>) -> Self {
        self._fields.3 = value.into();
        self
    }
    /// Set the `comment` field to an Option value (optional)
    pub fn maybe_comment(mut self, value: Option<S>) -> Self {
        self._fields.3 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `cursor` field (optional)
    pub fn cursor(mut self, value: impl Into<Option<S>>) -> Self {
        self._fields.4 = value.into();
        self
    }
    /// Set the `cursor` field to an Option value (optional)
    pub fn maybe_cursor(mut self, value: Option<S>) -> Self {
        self._fields.4 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `excludeTags` field (optional)
    pub fn exclude_tags(mut self, value: impl Into<Option<Vec<S>>>) -> Self {
        self._fields.5 = value.into();
        self
    }
    /// Set the `excludeTags` field to an Option value (optional)
    pub fn maybe_exclude_tags(mut self, value: Option<Vec<S>>) -> Self {
        self._fields.5 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `hostingDeletedAfter` field (optional)
    pub fn hosting_deleted_after(mut self, value: impl Into<Option<Datetime>>) -> Self {
        self._fields.6 = value.into();
        self
    }
    /// Set the `hostingDeletedAfter` field to an Option value (optional)
    pub fn maybe_hosting_deleted_after(mut self, value: Option<Datetime>) -> Self {
        self._fields.6 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `hostingDeletedBefore` field (optional)
    pub fn hosting_deleted_before(mut self, value: impl Into<Option<Datetime>>) -> Self {
        self._fields.7 = value.into();
        self
    }
    /// Set the `hostingDeletedBefore` field to an Option value (optional)
    pub fn maybe_hosting_deleted_before(mut self, value: Option<Datetime>) -> Self {
        self._fields.7 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `hostingStatuses` field (optional)
    pub fn hosting_statuses(mut self, value: impl Into<Option<Vec<S>>>) -> Self {
        self._fields.8 = value.into();
        self
    }
    /// Set the `hostingStatuses` field to an Option value (optional)
    pub fn maybe_hosting_statuses(mut self, value: Option<Vec<S>>) -> Self {
        self._fields.8 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `hostingUpdatedAfter` field (optional)
    pub fn hosting_updated_after(mut self, value: impl Into<Option<Datetime>>) -> Self {
        self._fields.9 = value.into();
        self
    }
    /// Set the `hostingUpdatedAfter` field to an Option value (optional)
    pub fn maybe_hosting_updated_after(mut self, value: Option<Datetime>) -> Self {
        self._fields.9 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `hostingUpdatedBefore` field (optional)
    pub fn hosting_updated_before(mut self, value: impl Into<Option<Datetime>>) -> Self {
        self._fields.10 = value.into();
        self
    }
    /// Set the `hostingUpdatedBefore` field to an Option value (optional)
    pub fn maybe_hosting_updated_before(mut self, value: Option<Datetime>) -> Self {
        self._fields.10 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `ignoreSubjects` field (optional)
    pub fn ignore_subjects(
        mut self,
        value: impl Into<Option<Vec<UriValue<S>>>>,
    ) -> Self {
        self._fields.11 = value.into();
        self
    }
    /// Set the `ignoreSubjects` field to an Option value (optional)
    pub fn maybe_ignore_subjects(mut self, value: Option<Vec<UriValue<S>>>) -> Self {
        self._fields.11 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `includeAllUserRecords` field (optional)
    pub fn include_all_user_records(mut self, value: impl Into<Option<bool>>) -> Self {
        self._fields.12 = value.into();
        self
    }
    /// Set the `includeAllUserRecords` field to an Option value (optional)
    pub fn maybe_include_all_user_records(mut self, value: Option<bool>) -> Self {
        self._fields.12 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `includeMuted` field (optional)
    pub fn include_muted(mut self, value: impl Into<Option<bool>>) -> Self {
        self._fields.13 = value.into();
        self
    }
    /// Set the `includeMuted` field to an Option value (optional)
    pub fn maybe_include_muted(mut self, value: Option<bool>) -> Self {
        self._fields.13 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `lastReviewedBy` field (optional)
    pub fn last_reviewed_by(mut self, value: impl Into<Option<Did<S>>>) -> Self {
        self._fields.14 = value.into();
        self
    }
    /// Set the `lastReviewedBy` field to an Option value (optional)
    pub fn maybe_last_reviewed_by(mut self, value: Option<Did<S>>) -> Self {
        self._fields.14 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `limit` field (optional)
    pub fn limit(mut self, value: impl Into<Option<i64>>) -> Self {
        self._fields.15 = value.into();
        self
    }
    /// Set the `limit` field to an Option value (optional)
    pub fn maybe_limit(mut self, value: Option<i64>) -> Self {
        self._fields.15 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `minAccountSuspendCount` field (optional)
    pub fn min_account_suspend_count(mut self, value: impl Into<Option<i64>>) -> Self {
        self._fields.16 = value.into();
        self
    }
    /// Set the `minAccountSuspendCount` field to an Option value (optional)
    pub fn maybe_min_account_suspend_count(mut self, value: Option<i64>) -> Self {
        self._fields.16 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `minPriorityScore` field (optional)
    pub fn min_priority_score(mut self, value: impl Into<Option<i64>>) -> Self {
        self._fields.17 = value.into();
        self
    }
    /// Set the `minPriorityScore` field to an Option value (optional)
    pub fn maybe_min_priority_score(mut self, value: Option<i64>) -> Self {
        self._fields.17 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `minReportedRecordsCount` field (optional)
    pub fn min_reported_records_count(mut self, value: impl Into<Option<i64>>) -> Self {
        self._fields.18 = value.into();
        self
    }
    /// Set the `minReportedRecordsCount` field to an Option value (optional)
    pub fn maybe_min_reported_records_count(mut self, value: Option<i64>) -> Self {
        self._fields.18 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `minStrikeCount` field (optional)
    pub fn min_strike_count(mut self, value: impl Into<Option<i64>>) -> Self {
        self._fields.19 = value.into();
        self
    }
    /// Set the `minStrikeCount` field to an Option value (optional)
    pub fn maybe_min_strike_count(mut self, value: Option<i64>) -> Self {
        self._fields.19 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `minTakendownRecordsCount` field (optional)
    pub fn min_takendown_records_count(mut self, value: impl Into<Option<i64>>) -> Self {
        self._fields.20 = value.into();
        self
    }
    /// Set the `minTakendownRecordsCount` field to an Option value (optional)
    pub fn maybe_min_takendown_records_count(mut self, value: Option<i64>) -> Self {
        self._fields.20 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `onlyMuted` field (optional)
    pub fn only_muted(mut self, value: impl Into<Option<bool>>) -> Self {
        self._fields.21 = value.into();
        self
    }
    /// Set the `onlyMuted` field to an Option value (optional)
    pub fn maybe_only_muted(mut self, value: Option<bool>) -> Self {
        self._fields.21 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `queueCount` field (optional)
    pub fn queue_count(mut self, value: impl Into<Option<i64>>) -> Self {
        self._fields.22 = value.into();
        self
    }
    /// Set the `queueCount` field to an Option value (optional)
    pub fn maybe_queue_count(mut self, value: Option<i64>) -> Self {
        self._fields.22 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `queueIndex` field (optional)
    pub fn queue_index(mut self, value: impl Into<Option<i64>>) -> Self {
        self._fields.23 = value.into();
        self
    }
    /// Set the `queueIndex` field to an Option value (optional)
    pub fn maybe_queue_index(mut self, value: Option<i64>) -> Self {
        self._fields.23 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `queueSeed` field (optional)
    pub fn queue_seed(mut self, value: impl Into<Option<S>>) -> Self {
        self._fields.24 = value.into();
        self
    }
    /// Set the `queueSeed` field to an Option value (optional)
    pub fn maybe_queue_seed(mut self, value: Option<S>) -> Self {
        self._fields.24 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `reportedAfter` field (optional)
    pub fn reported_after(mut self, value: impl Into<Option<Datetime>>) -> Self {
        self._fields.25 = value.into();
        self
    }
    /// Set the `reportedAfter` field to an Option value (optional)
    pub fn maybe_reported_after(mut self, value: Option<Datetime>) -> Self {
        self._fields.25 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `reportedBefore` field (optional)
    pub fn reported_before(mut self, value: impl Into<Option<Datetime>>) -> Self {
        self._fields.26 = value.into();
        self
    }
    /// Set the `reportedBefore` field to an Option value (optional)
    pub fn maybe_reported_before(mut self, value: Option<Datetime>) -> Self {
        self._fields.26 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `reviewState` field (optional)
    pub fn review_state(mut self, value: impl Into<Option<S>>) -> Self {
        self._fields.27 = value.into();
        self
    }
    /// Set the `reviewState` field to an Option value (optional)
    pub fn maybe_review_state(mut self, value: Option<S>) -> Self {
        self._fields.27 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `reviewedAfter` field (optional)
    pub fn reviewed_after(mut self, value: impl Into<Option<Datetime>>) -> Self {
        self._fields.28 = value.into();
        self
    }
    /// Set the `reviewedAfter` field to an Option value (optional)
    pub fn maybe_reviewed_after(mut self, value: Option<Datetime>) -> Self {
        self._fields.28 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `reviewedBefore` field (optional)
    pub fn reviewed_before(mut self, value: impl Into<Option<Datetime>>) -> Self {
        self._fields.29 = value.into();
        self
    }
    /// Set the `reviewedBefore` field to an Option value (optional)
    pub fn maybe_reviewed_before(mut self, value: Option<Datetime>) -> Self {
        self._fields.29 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `sortDirection` field (optional)
    pub fn sort_direction(mut self, value: impl Into<Option<S>>) -> Self {
        self._fields.30 = value.into();
        self
    }
    /// Set the `sortDirection` field to an Option value (optional)
    pub fn maybe_sort_direction(mut self, value: Option<S>) -> Self {
        self._fields.30 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `sortField` field (optional)
    pub fn sort_field(mut self, value: impl Into<Option<S>>) -> Self {
        self._fields.31 = value.into();
        self
    }
    /// Set the `sortField` field to an Option value (optional)
    pub fn maybe_sort_field(mut self, value: Option<S>) -> Self {
        self._fields.31 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `subject` field (optional)
    pub fn subject(mut self, value: impl Into<Option<UriValue<S>>>) -> Self {
        self._fields.32 = value.into();
        self
    }
    /// Set the `subject` field to an Option value (optional)
    pub fn maybe_subject(mut self, value: Option<UriValue<S>>) -> Self {
        self._fields.32 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `subjectType` field (optional)
    pub fn subject_type(mut self, value: impl Into<Option<S>>) -> Self {
        self._fields.33 = value.into();
        self
    }
    /// Set the `subjectType` field to an Option value (optional)
    pub fn maybe_subject_type(mut self, value: Option<S>) -> Self {
        self._fields.33 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `tags` field (optional)
    pub fn tags(mut self, value: impl Into<Option<Vec<S>>>) -> Self {
        self._fields.34 = value.into();
        self
    }
    /// Set the `tags` field to an Option value (optional)
    pub fn maybe_tags(mut self, value: Option<Vec<S>>) -> Self {
        self._fields.34 = value;
        self
    }
}

impl<St: query_statuses_state::State, S: BosStr> QueryStatusesBuilder<St, S> {
    /// Set the `takendown` field (optional)
    pub fn takendown(mut self, value: impl Into<Option<bool>>) -> Self {
        self._fields.35 = value.into();
        self
    }
    /// Set the `takendown` field to an Option value (optional)
    pub fn maybe_takendown(mut self, value: Option<bool>) -> Self {
        self._fields.35 = value;
        self
    }
}

impl<St, S: BosStr> QueryStatusesBuilder<St, S>
where
    St: query_statuses_state::State,
{
    /// Build the final struct.
    pub fn build(self) -> QueryStatuses<S> {
        QueryStatuses {
            age_assurance_state: self._fields.0,
            appealed: self._fields.1,
            collections: self._fields.2,
            comment: self._fields.3,
            cursor: self._fields.4,
            exclude_tags: self._fields.5,
            hosting_deleted_after: self._fields.6,
            hosting_deleted_before: self._fields.7,
            hosting_statuses: self._fields.8,
            hosting_updated_after: self._fields.9,
            hosting_updated_before: self._fields.10,
            ignore_subjects: self._fields.11,
            include_all_user_records: self._fields.12,
            include_muted: self._fields.13,
            last_reviewed_by: self._fields.14,
            limit: self._fields.15,
            min_account_suspend_count: self._fields.16,
            min_priority_score: self._fields.17,
            min_reported_records_count: self._fields.18,
            min_strike_count: self._fields.19,
            min_takendown_records_count: self._fields.20,
            only_muted: self._fields.21,
            queue_count: self._fields.22,
            queue_index: self._fields.23,
            queue_seed: self._fields.24,
            reported_after: self._fields.25,
            reported_before: self._fields.26,
            review_state: self._fields.27,
            reviewed_after: self._fields.28,
            reviewed_before: self._fields.29,
            sort_direction: self._fields.30,
            sort_field: self._fields.31,
            subject: self._fields.32,
            subject_type: self._fields.33,
            tags: self._fields.34,
            takendown: self._fields.35,
        }
    }
}