// @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;
use jacquard_common::types::string::{Did, Nsid, Datetime, UriValue};
use jacquard_derive::{IntoStatic, lexicon};
use serde::{Serialize, Deserialize};
use crate::tools_ozone::moderation::SubjectStatusView;

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct QueryStatuses<'a> {
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub age_assurance_state: Option<CowStr<'a>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub appealed: Option<bool>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub collections: Option<Vec<Nsid<'a>>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub comment: Option<CowStr<'a>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub cursor: Option<CowStr<'a>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub exclude_tags: Option<Vec<CowStr<'a>>>,
    #[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")]
    #[serde(borrow)]
    pub hosting_statuses: Option<Vec<CowStr<'a>>>,
    #[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")]
    #[serde(borrow)]
    pub ignore_subjects: Option<Vec<UriValue<'a>>>,
    #[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")]
    #[serde(borrow)]
    pub last_reviewed_by: Option<Did<'a>>,
    ///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")]
    #[serde(borrow)]
    pub queue_seed: Option<CowStr<'a>>,
    #[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")]
    #[serde(borrow)]
    pub review_state: Option<CowStr<'a>>,
    #[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")]
    #[serde(borrow)]
    pub sort_direction: Option<CowStr<'a>>,
    ///Defaults to `"lastReportedAt"`.
    #[serde(default = "_default_sort_field")]
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub sort_field: Option<CowStr<'a>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub subject: Option<UriValue<'a>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub subject_type: Option<CowStr<'a>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub tags: Option<Vec<CowStr<'a>>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub takendown: Option<bool>,
}


#[lexicon]
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase")]
pub struct QueryStatusesOutput<'a> {
    #[serde(skip_serializing_if = "Option::is_none")]
    #[serde(borrow)]
    pub cursor: Option<CowStr<'a>>,
    #[serde(borrow)]
    pub subject_statuses: Vec<SubjectStatusView<'a>>,
}

/// Response type for tools.ozone.moderation.queryStatuses
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<'de> = QueryStatusesOutput<'de>;
    type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
}

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

/// Endpoint type for tools.ozone.moderation.queryStatuses
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<'de> = QueryStatuses<'de>;
    type Response = QueryStatusesResponse;
}

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

fn _default_sort_direction() -> Option<CowStr<'static>> {
    Some(CowStr::from("desc"))
}

fn _default_sort_field() -> Option<CowStr<'static>> {
    Some(CowStr::from("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<'a, S: query_statuses_state::State> {
    _state: PhantomData<fn() -> S>,
    _fields: (
        Option<CowStr<'a>>,
        Option<bool>,
        Option<Vec<Nsid<'a>>>,
        Option<CowStr<'a>>,
        Option<CowStr<'a>>,
        Option<Vec<CowStr<'a>>>,
        Option<Datetime>,
        Option<Datetime>,
        Option<Vec<CowStr<'a>>>,
        Option<Datetime>,
        Option<Datetime>,
        Option<Vec<UriValue<'a>>>,
        Option<bool>,
        Option<bool>,
        Option<Did<'a>>,
        Option<i64>,
        Option<i64>,
        Option<i64>,
        Option<i64>,
        Option<i64>,
        Option<i64>,
        Option<bool>,
        Option<i64>,
        Option<i64>,
        Option<CowStr<'a>>,
        Option<Datetime>,
        Option<Datetime>,
        Option<CowStr<'a>>,
        Option<Datetime>,
        Option<Datetime>,
        Option<CowStr<'a>>,
        Option<CowStr<'a>>,
        Option<UriValue<'a>>,
        Option<CowStr<'a>>,
        Option<Vec<CowStr<'a>>>,
        Option<bool>,
    ),
    _lifetime: PhantomData<&'a ()>,
}

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

impl<'a> QueryStatusesBuilder<'a, query_statuses_state::Empty> {
    /// Create a new builder with all fields unset
    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,
            ),
            _lifetime: PhantomData,
        }
    }
}

impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
    /// Set the `ageAssuranceState` field (optional)
    pub fn age_assurance_state(mut self, value: impl Into<Option<CowStr<'a>>>) -> 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<CowStr<'a>>) -> Self {
        self._fields.0 = value;
        self
    }
}

impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, 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<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
    /// Set the `collections` field (optional)
    pub fn collections(mut self, value: impl Into<Option<Vec<Nsid<'a>>>>) -> 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<'a>>>) -> Self {
        self._fields.2 = value;
        self
    }
}

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

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

impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
    /// Set the `excludeTags` field (optional)
    pub fn exclude_tags(mut self, value: impl Into<Option<Vec<CowStr<'a>>>>) -> 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<CowStr<'a>>>) -> Self {
        self._fields.5 = value;
        self
    }
}

impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, 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<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, 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<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
    /// Set the `hostingStatuses` field (optional)
    pub fn hosting_statuses(
        mut self,
        value: impl Into<Option<Vec<CowStr<'a>>>>,
    ) -> 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<CowStr<'a>>>) -> Self {
        self._fields.8 = value;
        self
    }
}

impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, 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<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, 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<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
    /// Set the `ignoreSubjects` field (optional)
    pub fn ignore_subjects(
        mut self,
        value: impl Into<Option<Vec<UriValue<'a>>>>,
    ) -> 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<'a>>>) -> Self {
        self._fields.11 = value;
        self
    }
}

impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, 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<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, 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<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
    /// Set the `lastReviewedBy` field (optional)
    pub fn last_reviewed_by(mut self, value: impl Into<Option<Did<'a>>>) -> 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<'a>>) -> Self {
        self._fields.14 = value;
        self
    }
}

impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, 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<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, 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<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, 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<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, 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<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, 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<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, 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<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, 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<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, 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<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, 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<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
    /// Set the `queueSeed` field (optional)
    pub fn queue_seed(mut self, value: impl Into<Option<CowStr<'a>>>) -> 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<CowStr<'a>>) -> Self {
        self._fields.24 = value;
        self
    }
}

impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, 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<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, 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<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
    /// Set the `reviewState` field (optional)
    pub fn review_state(mut self, value: impl Into<Option<CowStr<'a>>>) -> 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<CowStr<'a>>) -> Self {
        self._fields.27 = value;
        self
    }
}

impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, 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<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, 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<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
    /// Set the `sortDirection` field (optional)
    pub fn sort_direction(mut self, value: impl Into<Option<CowStr<'a>>>) -> 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<CowStr<'a>>) -> Self {
        self._fields.30 = value;
        self
    }
}

impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
    /// Set the `sortField` field (optional)
    pub fn sort_field(mut self, value: impl Into<Option<CowStr<'a>>>) -> 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<CowStr<'a>>) -> Self {
        self._fields.31 = value;
        self
    }
}

impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
    /// Set the `subject` field (optional)
    pub fn subject(mut self, value: impl Into<Option<UriValue<'a>>>) -> 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<'a>>) -> Self {
        self._fields.32 = value;
        self
    }
}

impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
    /// Set the `subjectType` field (optional)
    pub fn subject_type(mut self, value: impl Into<Option<CowStr<'a>>>) -> 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<CowStr<'a>>) -> Self {
        self._fields.33 = value;
        self
    }
}

impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, S> {
    /// Set the `tags` field (optional)
    pub fn tags(mut self, value: impl Into<Option<Vec<CowStr<'a>>>>) -> 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<CowStr<'a>>>) -> Self {
        self._fields.34 = value;
        self
    }
}

impl<'a, S: query_statuses_state::State> QueryStatusesBuilder<'a, 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<'a, S> QueryStatusesBuilder<'a, S>
where
    S: query_statuses_state::State,
{
    /// Build the final struct
    pub fn build(self) -> QueryStatuses<'a> {
        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,
        }
    }
}