// @generated by jacquard-lexicon. DO NOT EDIT.
//
// Lexicon: app.bsky.unspecced.defs
//
// This file was automatically generated from Lexicon schemas.
// Any manual changes will be overwritten on the next regeneration.

//! Generated bindings for the `app.bsky.unspecced` Lexicon namespace/module.
pub mod get_age_assurance_state;
pub mod get_config;
pub mod get_onboarding_suggested_starter_packs;
pub mod get_onboarding_suggested_starter_packs_skeleton;
pub mod get_onboarding_suggested_users_skeleton;
pub mod get_popular_feed_generators;
pub mod get_post_thread_other_v2;
pub mod get_post_thread_v2;
pub mod get_suggested_feeds;
pub mod get_suggested_feeds_skeleton;
pub mod get_suggested_onboarding_users;
pub mod get_suggested_starter_packs;
pub mod get_suggested_starter_packs_skeleton;
pub mod get_suggested_users;
pub mod get_suggested_users_for_discover;
pub mod get_suggested_users_for_discover_skeleton;
pub mod get_suggested_users_for_explore;
pub mod get_suggested_users_for_explore_skeleton;
pub mod get_suggested_users_for_see_more;
pub mod get_suggested_users_for_see_more_skeleton;
pub mod get_suggested_users_skeleton;
pub mod get_suggestions_skeleton;
pub mod get_tagged_suggestions;
pub mod get_trending_topics;
pub mod get_trends;
pub mod get_trends_skeleton;
pub mod init_age_assurance;
pub mod search_actors_skeleton;
pub mod search_posts_skeleton;
pub mod search_starter_packs_skeleton;


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

#[allow(unused_imports)]
use core::marker::PhantomData;
use jacquard_common::{CowStr, BosStr, DefaultStr, FromStaticStr};

#[allow(unused_imports)]
use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation;
use jacquard_common::deps::smol_str::SmolStr;
use jacquard_common::types::string::{Did, AtUri, Datetime};
use jacquard_common::types::value::Data;
use jacquard_derive::IntoStatic;
use jacquard_lexicon::lexicon::LexiconDoc;
use jacquard_lexicon::schema::LexiconSchema;

#[allow(unused_imports)]
use jacquard_lexicon::validation::{ConstraintError, ValidationPath};
use serde::{Serialize, Deserialize};
use crate::app_bsky::actor::ProfileViewBasic;
use crate::app_bsky::feed::BlockedAuthor;
use crate::app_bsky::feed::PostView;
/// Object used to store age assurance data in stash.

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
pub struct AgeAssuranceEvent<S: BosStr = DefaultStr> {
    ///The unique identifier for this instance of the age assurance flow, in UUID format.
    pub attempt_id: S,
    ///The IP address used when completing the AA flow.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub complete_ip: Option<S>,
    ///The user agent used when completing the AA flow.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub complete_ua: Option<S>,
    ///The date and time of this write operation.
    pub created_at: Datetime,
    ///The email used for AA.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub email: Option<S>,
    ///The IP address used when initiating the AA flow.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub init_ip: Option<S>,
    ///The user agent used when initiating the AA flow.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub init_ua: Option<S>,
    ///The status of the age assurance process.
    pub status: AgeAssuranceEventStatus<S>,
    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}

/// The status of the age assurance process.

#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum AgeAssuranceEventStatus<S: BosStr = DefaultStr> {
    Unknown,
    Pending,
    Assured,
    Other(S),
}

impl<S: BosStr> AgeAssuranceEventStatus<S> {
    pub fn as_str(&self) -> &str {
        match self {
            Self::Unknown => "unknown",
            Self::Pending => "pending",
            Self::Assured => "assured",
            Self::Other(s) => s.as_ref(),
        }
    }
    /// Construct from a string-like value, matching known values.
    pub fn from_value(s: S) -> Self {
        match s.as_ref() {
            "unknown" => Self::Unknown,
            "pending" => Self::Pending,
            "assured" => Self::Assured,
            _ => Self::Other(s),
        }
    }
}

impl<S: BosStr> core::fmt::Display for AgeAssuranceEventStatus<S> {
    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
        write!(f, "{}", self.as_str())
    }
}

impl<S: BosStr> AsRef<str> for AgeAssuranceEventStatus<S> {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

impl<S: BosStr> Serialize for AgeAssuranceEventStatus<S> {
    fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
    where
        Ser: serde::Serializer,
    {
        serializer.serialize_str(self.as_str())
    }
}

impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for AgeAssuranceEventStatus<S> {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        let s = S::deserialize(deserializer)?;
        Ok(Self::from_value(s))
    }
}

impl<S: BosStr + Default> Default for AgeAssuranceEventStatus<S> {
    fn default() -> Self {
        Self::Other(Default::default())
    }
}

impl<S: BosStr> jacquard_common::IntoStatic for AgeAssuranceEventStatus<S>
where
    S: BosStr + jacquard_common::IntoStatic,
    S::Output: BosStr,
{
    type Output = AgeAssuranceEventStatus<S::Output>;
    fn into_static(self) -> Self::Output {
        match self {
            AgeAssuranceEventStatus::Unknown => AgeAssuranceEventStatus::Unknown,
            AgeAssuranceEventStatus::Pending => AgeAssuranceEventStatus::Pending,
            AgeAssuranceEventStatus::Assured => AgeAssuranceEventStatus::Assured,
            AgeAssuranceEventStatus::Other(v) => {
                AgeAssuranceEventStatus::Other(v.into_static())
            }
        }
    }
}

/// The computed state of the age assurance process, returned to the user in question on certain authenticated requests.

#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
pub struct AgeAssuranceState<S: BosStr = DefaultStr> {
    ///The timestamp when this state was last updated.
    #[serde(skip_serializing_if = "Option::is_none")]
    pub last_initiated_at: Option<Datetime>,
    ///The status of the age assurance process.
    pub status: AgeAssuranceStateStatus<S>,
    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}

/// The status of the age assurance process.

#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum AgeAssuranceStateStatus<S: BosStr = DefaultStr> {
    Unknown,
    Pending,
    Assured,
    Blocked,
    Other(S),
}

impl<S: BosStr> AgeAssuranceStateStatus<S> {
    pub fn as_str(&self) -> &str {
        match self {
            Self::Unknown => "unknown",
            Self::Pending => "pending",
            Self::Assured => "assured",
            Self::Blocked => "blocked",
            Self::Other(s) => s.as_ref(),
        }
    }
    /// Construct from a string-like value, matching known values.
    pub fn from_value(s: S) -> Self {
        match s.as_ref() {
            "unknown" => Self::Unknown,
            "pending" => Self::Pending,
            "assured" => Self::Assured,
            "blocked" => Self::Blocked,
            _ => Self::Other(s),
        }
    }
}

impl<S: BosStr> core::fmt::Display for AgeAssuranceStateStatus<S> {
    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
        write!(f, "{}", self.as_str())
    }
}

impl<S: BosStr> AsRef<str> for AgeAssuranceStateStatus<S> {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

impl<S: BosStr> Serialize for AgeAssuranceStateStatus<S> {
    fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
    where
        Ser: serde::Serializer,
    {
        serializer.serialize_str(self.as_str())
    }
}

impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for AgeAssuranceStateStatus<S> {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        let s = S::deserialize(deserializer)?;
        Ok(Self::from_value(s))
    }
}

impl<S: BosStr + Default> Default for AgeAssuranceStateStatus<S> {
    fn default() -> Self {
        Self::Other(Default::default())
    }
}

impl<S: BosStr> jacquard_common::IntoStatic for AgeAssuranceStateStatus<S>
where
    S: BosStr + jacquard_common::IntoStatic,
    S::Output: BosStr,
{
    type Output = AgeAssuranceStateStatus<S::Output>;
    fn into_static(self) -> Self::Output {
        match self {
            AgeAssuranceStateStatus::Unknown => AgeAssuranceStateStatus::Unknown,
            AgeAssuranceStateStatus::Pending => AgeAssuranceStateStatus::Pending,
            AgeAssuranceStateStatus::Assured => AgeAssuranceStateStatus::Assured,
            AgeAssuranceStateStatus::Blocked => AgeAssuranceStateStatus::Blocked,
            AgeAssuranceStateStatus::Other(v) => {
                AgeAssuranceStateStatus::Other(v.into_static())
            }
        }
    }
}


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


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


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


#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
pub struct SkeletonTrend<S: BosStr = DefaultStr> {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub category: Option<S>,
    pub dids: Vec<Did<S>>,
    pub display_name: S,
    pub link: S,
    pub post_count: i64,
    pub started_at: Datetime,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub status: Option<SkeletonTrendStatus<S>>,
    pub topic: S,
    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}


#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum SkeletonTrendStatus<S: BosStr = DefaultStr> {
    Hot,
    Other(S),
}

impl<S: BosStr> SkeletonTrendStatus<S> {
    pub fn as_str(&self) -> &str {
        match self {
            Self::Hot => "hot",
            Self::Other(s) => s.as_ref(),
        }
    }
    /// Construct from a string-like value, matching known values.
    pub fn from_value(s: S) -> Self {
        match s.as_ref() {
            "hot" => Self::Hot,
            _ => Self::Other(s),
        }
    }
}

impl<S: BosStr> core::fmt::Display for SkeletonTrendStatus<S> {
    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
        write!(f, "{}", self.as_str())
    }
}

impl<S: BosStr> AsRef<str> for SkeletonTrendStatus<S> {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

impl<S: BosStr> Serialize for SkeletonTrendStatus<S> {
    fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
    where
        Ser: serde::Serializer,
    {
        serializer.serialize_str(self.as_str())
    }
}

impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for SkeletonTrendStatus<S> {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        let s = S::deserialize(deserializer)?;
        Ok(Self::from_value(s))
    }
}

impl<S: BosStr + Default> Default for SkeletonTrendStatus<S> {
    fn default() -> Self {
        Self::Other(Default::default())
    }
}

impl<S: BosStr> jacquard_common::IntoStatic for SkeletonTrendStatus<S>
where
    S: BosStr + jacquard_common::IntoStatic,
    S::Output: BosStr,
{
    type Output = SkeletonTrendStatus<S::Output>;
    fn into_static(self) -> Self::Output {
        match self {
            SkeletonTrendStatus::Hot => SkeletonTrendStatus::Hot,
            SkeletonTrendStatus::Other(v) => SkeletonTrendStatus::Other(v.into_static()),
        }
    }
}


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


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


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


#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
pub struct ThreadItemPost<S: BosStr = DefaultStr> {
    ///The threadgate created by the author indicates this post as a reply to be hidden for everyone consuming the thread.
    pub hidden_by_threadgate: bool,
    ///This post has more parents that were not present in the response. This is just a boolean, without the number of parents.
    pub more_parents: bool,
    ///This post has more replies that were not present in the response. This is a numeric value, which is best-effort and might not be accurate.
    pub more_replies: i64,
    ///This is by an account muted by the viewer requesting it.
    pub muted_by_viewer: bool,
    ///This post is part of a contiguous thread by the OP from the thread root. Many different OP threads can happen in the same thread.
    pub op_thread: bool,
    pub post: PostView<S>,
    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}


#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
pub struct TrendView<S: BosStr = DefaultStr> {
    pub actors: Vec<ProfileViewBasic<S>>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub category: Option<S>,
    pub display_name: S,
    pub link: S,
    pub post_count: i64,
    pub started_at: Datetime,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub status: Option<TrendViewStatus<S>>,
    pub topic: S,
    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}


#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum TrendViewStatus<S: BosStr = DefaultStr> {
    Hot,
    Other(S),
}

impl<S: BosStr> TrendViewStatus<S> {
    pub fn as_str(&self) -> &str {
        match self {
            Self::Hot => "hot",
            Self::Other(s) => s.as_ref(),
        }
    }
    /// Construct from a string-like value, matching known values.
    pub fn from_value(s: S) -> Self {
        match s.as_ref() {
            "hot" => Self::Hot,
            _ => Self::Other(s),
        }
    }
}

impl<S: BosStr> core::fmt::Display for TrendViewStatus<S> {
    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
        write!(f, "{}", self.as_str())
    }
}

impl<S: BosStr> AsRef<str> for TrendViewStatus<S> {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

impl<S: BosStr> Serialize for TrendViewStatus<S> {
    fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
    where
        Ser: serde::Serializer,
    {
        serializer.serialize_str(self.as_str())
    }
}

impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for TrendViewStatus<S> {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        let s = S::deserialize(deserializer)?;
        Ok(Self::from_value(s))
    }
}

impl<S: BosStr + Default> Default for TrendViewStatus<S> {
    fn default() -> Self {
        Self::Other(Default::default())
    }
}

impl<S: BosStr> jacquard_common::IntoStatic for TrendViewStatus<S>
where
    S: BosStr + jacquard_common::IntoStatic,
    S::Output: BosStr,
{
    type Output = TrendViewStatus<S::Output>;
    fn into_static(self) -> Self::Output {
        match self {
            TrendViewStatus::Hot => TrendViewStatus::Hot,
            TrendViewStatus::Other(v) => TrendViewStatus::Other(v.into_static()),
        }
    }
}


#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
pub struct TrendingTopic<S: BosStr = DefaultStr> {
    #[serde(skip_serializing_if = "Option::is_none")]
    pub description: Option<S>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub display_name: Option<S>,
    pub link: S,
    pub topic: S,
    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
}

impl<S: BosStr> LexiconSchema for AgeAssuranceEvent<S> {
    fn nsid() -> &'static str {
        "app.bsky.unspecced.defs"
    }
    fn def_name() -> &'static str {
        "ageAssuranceEvent"
    }
    fn lexicon_doc() -> LexiconDoc<'static> {
        lexicon_doc_app_bsky_unspecced_defs()
    }
    fn validate(&self) -> Result<(), ConstraintError> {
        Ok(())
    }
}

impl<S: BosStr> LexiconSchema for AgeAssuranceState<S> {
    fn nsid() -> &'static str {
        "app.bsky.unspecced.defs"
    }
    fn def_name() -> &'static str {
        "ageAssuranceState"
    }
    fn lexicon_doc() -> LexiconDoc<'static> {
        lexicon_doc_app_bsky_unspecced_defs()
    }
    fn validate(&self) -> Result<(), ConstraintError> {
        Ok(())
    }
}

impl<S: BosStr> LexiconSchema for SkeletonSearchActor<S> {
    fn nsid() -> &'static str {
        "app.bsky.unspecced.defs"
    }
    fn def_name() -> &'static str {
        "skeletonSearchActor"
    }
    fn lexicon_doc() -> LexiconDoc<'static> {
        lexicon_doc_app_bsky_unspecced_defs()
    }
    fn validate(&self) -> Result<(), ConstraintError> {
        Ok(())
    }
}

impl<S: BosStr> LexiconSchema for SkeletonSearchPost<S> {
    fn nsid() -> &'static str {
        "app.bsky.unspecced.defs"
    }
    fn def_name() -> &'static str {
        "skeletonSearchPost"
    }
    fn lexicon_doc() -> LexiconDoc<'static> {
        lexicon_doc_app_bsky_unspecced_defs()
    }
    fn validate(&self) -> Result<(), ConstraintError> {
        Ok(())
    }
}

impl<S: BosStr> LexiconSchema for SkeletonSearchStarterPack<S> {
    fn nsid() -> &'static str {
        "app.bsky.unspecced.defs"
    }
    fn def_name() -> &'static str {
        "skeletonSearchStarterPack"
    }
    fn lexicon_doc() -> LexiconDoc<'static> {
        lexicon_doc_app_bsky_unspecced_defs()
    }
    fn validate(&self) -> Result<(), ConstraintError> {
        Ok(())
    }
}

impl<S: BosStr> LexiconSchema for SkeletonTrend<S> {
    fn nsid() -> &'static str {
        "app.bsky.unspecced.defs"
    }
    fn def_name() -> &'static str {
        "skeletonTrend"
    }
    fn lexicon_doc() -> LexiconDoc<'static> {
        lexicon_doc_app_bsky_unspecced_defs()
    }
    fn validate(&self) -> Result<(), ConstraintError> {
        Ok(())
    }
}

impl<S: BosStr> LexiconSchema for ThreadItemBlocked<S> {
    fn nsid() -> &'static str {
        "app.bsky.unspecced.defs"
    }
    fn def_name() -> &'static str {
        "threadItemBlocked"
    }
    fn lexicon_doc() -> LexiconDoc<'static> {
        lexicon_doc_app_bsky_unspecced_defs()
    }
    fn validate(&self) -> Result<(), ConstraintError> {
        Ok(())
    }
}

impl<S: BosStr> LexiconSchema for ThreadItemNoUnauthenticated<S> {
    fn nsid() -> &'static str {
        "app.bsky.unspecced.defs"
    }
    fn def_name() -> &'static str {
        "threadItemNoUnauthenticated"
    }
    fn lexicon_doc() -> LexiconDoc<'static> {
        lexicon_doc_app_bsky_unspecced_defs()
    }
    fn validate(&self) -> Result<(), ConstraintError> {
        Ok(())
    }
}

impl<S: BosStr> LexiconSchema for ThreadItemNotFound<S> {
    fn nsid() -> &'static str {
        "app.bsky.unspecced.defs"
    }
    fn def_name() -> &'static str {
        "threadItemNotFound"
    }
    fn lexicon_doc() -> LexiconDoc<'static> {
        lexicon_doc_app_bsky_unspecced_defs()
    }
    fn validate(&self) -> Result<(), ConstraintError> {
        Ok(())
    }
}

impl<S: BosStr> LexiconSchema for ThreadItemPost<S> {
    fn nsid() -> &'static str {
        "app.bsky.unspecced.defs"
    }
    fn def_name() -> &'static str {
        "threadItemPost"
    }
    fn lexicon_doc() -> LexiconDoc<'static> {
        lexicon_doc_app_bsky_unspecced_defs()
    }
    fn validate(&self) -> Result<(), ConstraintError> {
        Ok(())
    }
}

impl<S: BosStr> LexiconSchema for TrendView<S> {
    fn nsid() -> &'static str {
        "app.bsky.unspecced.defs"
    }
    fn def_name() -> &'static str {
        "trendView"
    }
    fn lexicon_doc() -> LexiconDoc<'static> {
        lexicon_doc_app_bsky_unspecced_defs()
    }
    fn validate(&self) -> Result<(), ConstraintError> {
        Ok(())
    }
}

impl<S: BosStr> LexiconSchema for TrendingTopic<S> {
    fn nsid() -> &'static str {
        "app.bsky.unspecced.defs"
    }
    fn def_name() -> &'static str {
        "trendingTopic"
    }
    fn lexicon_doc() -> LexiconDoc<'static> {
        lexicon_doc_app_bsky_unspecced_defs()
    }
    fn validate(&self) -> Result<(), ConstraintError> {
        Ok(())
    }
}

pub mod age_assurance_event_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 {
        type AttemptId;
        type CreatedAt;
        type Status;
    }
    /// Empty state - all required fields are unset
    pub struct Empty(());
    impl sealed::Sealed for Empty {}
    impl State for Empty {
        type AttemptId = Unset;
        type CreatedAt = Unset;
        type Status = Unset;
    }
    ///State transition - sets the `attempt_id` field to Set
    pub struct SetAttemptId<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetAttemptId<St> {}
    impl<St: State> State for SetAttemptId<St> {
        type AttemptId = Set<members::attempt_id>;
        type CreatedAt = St::CreatedAt;
        type Status = St::Status;
    }
    ///State transition - sets the `created_at` field to Set
    pub struct SetCreatedAt<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetCreatedAt<St> {}
    impl<St: State> State for SetCreatedAt<St> {
        type AttemptId = St::AttemptId;
        type CreatedAt = Set<members::created_at>;
        type Status = St::Status;
    }
    ///State transition - sets the `status` field to Set
    pub struct SetStatus<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetStatus<St> {}
    impl<St: State> State for SetStatus<St> {
        type AttemptId = St::AttemptId;
        type CreatedAt = St::CreatedAt;
        type Status = Set<members::status>;
    }
    /// Marker types for field names
    #[allow(non_camel_case_types)]
    pub mod members {
        ///Marker type for the `attempt_id` field
        pub struct attempt_id(());
        ///Marker type for the `created_at` field
        pub struct created_at(());
        ///Marker type for the `status` field
        pub struct status(());
    }
}

/// Builder for constructing an instance of this type.
pub struct AgeAssuranceEventBuilder<
    St: age_assurance_event_state::State,
    S: BosStr = DefaultStr,
> {
    _state: PhantomData<fn() -> St>,
    _fields: (
        Option<S>,
        Option<S>,
        Option<S>,
        Option<Datetime>,
        Option<S>,
        Option<S>,
        Option<S>,
        Option<AgeAssuranceEventStatus<S>>,
    ),
    _type: PhantomData<fn() -> S>,
}

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

impl<S: BosStr> AgeAssuranceEvent<S> {
    /// Create a new builder for this type
    pub fn builder() -> AgeAssuranceEventBuilder<age_assurance_event_state::Empty, S> {
        AgeAssuranceEventBuilder::builder()
    }
}

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

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

impl<St, S: BosStr> AgeAssuranceEventBuilder<St, S>
where
    St: age_assurance_event_state::State,
    St::AttemptId: age_assurance_event_state::IsUnset,
{
    /// Set the `attemptId` field (required)
    pub fn attempt_id(
        mut self,
        value: impl Into<S>,
    ) -> AgeAssuranceEventBuilder<age_assurance_event_state::SetAttemptId<St>, S> {
        self._fields.0 = Option::Some(value.into());
        AgeAssuranceEventBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

impl<St: age_assurance_event_state::State, S: BosStr> AgeAssuranceEventBuilder<St, S> {
    /// Set the `completeIp` field (optional)
    pub fn complete_ip(mut self, value: impl Into<Option<S>>) -> Self {
        self._fields.1 = value.into();
        self
    }
    /// Set the `completeIp` field to an Option value (optional)
    pub fn maybe_complete_ip(mut self, value: Option<S>) -> Self {
        self._fields.1 = value;
        self
    }
}

impl<St: age_assurance_event_state::State, S: BosStr> AgeAssuranceEventBuilder<St, S> {
    /// Set the `completeUa` field (optional)
    pub fn complete_ua(mut self, value: impl Into<Option<S>>) -> Self {
        self._fields.2 = value.into();
        self
    }
    /// Set the `completeUa` field to an Option value (optional)
    pub fn maybe_complete_ua(mut self, value: Option<S>) -> Self {
        self._fields.2 = value;
        self
    }
}

impl<St, S: BosStr> AgeAssuranceEventBuilder<St, S>
where
    St: age_assurance_event_state::State,
    St::CreatedAt: age_assurance_event_state::IsUnset,
{
    /// Set the `createdAt` field (required)
    pub fn created_at(
        mut self,
        value: impl Into<Datetime>,
    ) -> AgeAssuranceEventBuilder<age_assurance_event_state::SetCreatedAt<St>, S> {
        self._fields.3 = Option::Some(value.into());
        AgeAssuranceEventBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

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

impl<St: age_assurance_event_state::State, S: BosStr> AgeAssuranceEventBuilder<St, S> {
    /// Set the `initIp` field (optional)
    pub fn init_ip(mut self, value: impl Into<Option<S>>) -> Self {
        self._fields.5 = value.into();
        self
    }
    /// Set the `initIp` field to an Option value (optional)
    pub fn maybe_init_ip(mut self, value: Option<S>) -> Self {
        self._fields.5 = value;
        self
    }
}

impl<St: age_assurance_event_state::State, S: BosStr> AgeAssuranceEventBuilder<St, S> {
    /// Set the `initUa` field (optional)
    pub fn init_ua(mut self, value: impl Into<Option<S>>) -> Self {
        self._fields.6 = value.into();
        self
    }
    /// Set the `initUa` field to an Option value (optional)
    pub fn maybe_init_ua(mut self, value: Option<S>) -> Self {
        self._fields.6 = value;
        self
    }
}

impl<St, S: BosStr> AgeAssuranceEventBuilder<St, S>
where
    St: age_assurance_event_state::State,
    St::Status: age_assurance_event_state::IsUnset,
{
    /// Set the `status` field (required)
    pub fn status(
        mut self,
        value: impl Into<AgeAssuranceEventStatus<S>>,
    ) -> AgeAssuranceEventBuilder<age_assurance_event_state::SetStatus<St>, S> {
        self._fields.7 = Option::Some(value.into());
        AgeAssuranceEventBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

impl<St, S: BosStr> AgeAssuranceEventBuilder<St, S>
where
    St: age_assurance_event_state::State,
    St::AttemptId: age_assurance_event_state::IsSet,
    St::CreatedAt: age_assurance_event_state::IsSet,
    St::Status: age_assurance_event_state::IsSet,
{
    /// Build the final struct.
    pub fn build(self) -> AgeAssuranceEvent<S> {
        AgeAssuranceEvent {
            attempt_id: self._fields.0.unwrap(),
            complete_ip: self._fields.1,
            complete_ua: self._fields.2,
            created_at: self._fields.3.unwrap(),
            email: self._fields.4,
            init_ip: self._fields.5,
            init_ua: self._fields.6,
            status: self._fields.7.unwrap(),
            extra_data: Default::default(),
        }
    }
    /// Build the final struct with custom extra_data.
    pub fn build_with_data(
        self,
        extra_data: BTreeMap<SmolStr, Data<S>>,
    ) -> AgeAssuranceEvent<S> {
        AgeAssuranceEvent {
            attempt_id: self._fields.0.unwrap(),
            complete_ip: self._fields.1,
            complete_ua: self._fields.2,
            created_at: self._fields.3.unwrap(),
            email: self._fields.4,
            init_ip: self._fields.5,
            init_ua: self._fields.6,
            status: self._fields.7.unwrap(),
            extra_data: Some(extra_data),
        }
    }
}

fn lexicon_doc_app_bsky_unspecced_defs() -> LexiconDoc<'static> {
    #[allow(unused_imports)]
    use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType};
    use jacquard_lexicon::lexicon::*;
    use alloc::collections::BTreeMap;
    LexiconDoc {
        lexicon: Lexicon::Lexicon1,
        id: CowStr::new_static("app.bsky.unspecced.defs"),
        defs: {
            let mut map = BTreeMap::new();
            map.insert(
                SmolStr::new_static("ageAssuranceEvent"),
                LexUserType::Object(LexObject {
                    description: Some(
                        CowStr::new_static(
                            "Object used to store age assurance data in stash.",
                        ),
                    ),
                    required: Some(
                        vec![
                            SmolStr::new_static("createdAt"),
                            SmolStr::new_static("status"),
                            SmolStr::new_static("attemptId")
                        ],
                    ),
                    properties: {
                        #[allow(unused_mut)]
                        let mut map = BTreeMap::new();
                        map.insert(
                            SmolStr::new_static("attemptId"),
                            LexObjectProperty::String(LexString {
                                description: Some(
                                    CowStr::new_static(
                                        "The unique identifier for this instance of the age assurance flow, in UUID format.",
                                    ),
                                ),
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("completeIp"),
                            LexObjectProperty::String(LexString {
                                description: Some(
                                    CowStr::new_static(
                                        "The IP address used when completing the AA flow.",
                                    ),
                                ),
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("completeUa"),
                            LexObjectProperty::String(LexString {
                                description: Some(
                                    CowStr::new_static(
                                        "The user agent used when completing the AA flow.",
                                    ),
                                ),
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("createdAt"),
                            LexObjectProperty::String(LexString {
                                description: Some(
                                    CowStr::new_static(
                                        "The date and time of this write operation.",
                                    ),
                                ),
                                format: Some(LexStringFormat::Datetime),
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("email"),
                            LexObjectProperty::String(LexString {
                                description: Some(
                                    CowStr::new_static("The email used for AA."),
                                ),
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("initIp"),
                            LexObjectProperty::String(LexString {
                                description: Some(
                                    CowStr::new_static(
                                        "The IP address used when initiating the AA flow.",
                                    ),
                                ),
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("initUa"),
                            LexObjectProperty::String(LexString {
                                description: Some(
                                    CowStr::new_static(
                                        "The user agent used when initiating the AA flow.",
                                    ),
                                ),
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("status"),
                            LexObjectProperty::String(LexString {
                                description: Some(
                                    CowStr::new_static(
                                        "The status of the age assurance process.",
                                    ),
                                ),
                                ..Default::default()
                            }),
                        );
                        map
                    },
                    ..Default::default()
                }),
            );
            map.insert(
                SmolStr::new_static("ageAssuranceState"),
                LexUserType::Object(LexObject {
                    description: Some(
                        CowStr::new_static(
                            "The computed state of the age assurance process, returned to the user in question on certain authenticated requests.",
                        ),
                    ),
                    required: Some(vec![SmolStr::new_static("status")]),
                    properties: {
                        #[allow(unused_mut)]
                        let mut map = BTreeMap::new();
                        map.insert(
                            SmolStr::new_static("lastInitiatedAt"),
                            LexObjectProperty::String(LexString {
                                description: Some(
                                    CowStr::new_static(
                                        "The timestamp when this state was last updated.",
                                    ),
                                ),
                                format: Some(LexStringFormat::Datetime),
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("status"),
                            LexObjectProperty::String(LexString {
                                description: Some(
                                    CowStr::new_static(
                                        "The status of the age assurance process.",
                                    ),
                                ),
                                ..Default::default()
                            }),
                        );
                        map
                    },
                    ..Default::default()
                }),
            );
            map.insert(
                SmolStr::new_static("skeletonSearchActor"),
                LexUserType::Object(LexObject {
                    required: Some(vec![SmolStr::new_static("did")]),
                    properties: {
                        #[allow(unused_mut)]
                        let mut map = BTreeMap::new();
                        map.insert(
                            SmolStr::new_static("did"),
                            LexObjectProperty::String(LexString {
                                format: Some(LexStringFormat::Did),
                                ..Default::default()
                            }),
                        );
                        map
                    },
                    ..Default::default()
                }),
            );
            map.insert(
                SmolStr::new_static("skeletonSearchPost"),
                LexUserType::Object(LexObject {
                    required: Some(vec![SmolStr::new_static("uri")]),
                    properties: {
                        #[allow(unused_mut)]
                        let mut map = BTreeMap::new();
                        map.insert(
                            SmolStr::new_static("uri"),
                            LexObjectProperty::String(LexString {
                                format: Some(LexStringFormat::AtUri),
                                ..Default::default()
                            }),
                        );
                        map
                    },
                    ..Default::default()
                }),
            );
            map.insert(
                SmolStr::new_static("skeletonSearchStarterPack"),
                LexUserType::Object(LexObject {
                    required: Some(vec![SmolStr::new_static("uri")]),
                    properties: {
                        #[allow(unused_mut)]
                        let mut map = BTreeMap::new();
                        map.insert(
                            SmolStr::new_static("uri"),
                            LexObjectProperty::String(LexString {
                                format: Some(LexStringFormat::AtUri),
                                ..Default::default()
                            }),
                        );
                        map
                    },
                    ..Default::default()
                }),
            );
            map.insert(
                SmolStr::new_static("skeletonTrend"),
                LexUserType::Object(LexObject {
                    required: Some(
                        vec![
                            SmolStr::new_static("topic"),
                            SmolStr::new_static("displayName"),
                            SmolStr::new_static("link"),
                            SmolStr::new_static("startedAt"),
                            SmolStr::new_static("postCount"), SmolStr::new_static("dids")
                        ],
                    ),
                    properties: {
                        #[allow(unused_mut)]
                        let mut map = BTreeMap::new();
                        map.insert(
                            SmolStr::new_static("category"),
                            LexObjectProperty::String(LexString { ..Default::default() }),
                        );
                        map.insert(
                            SmolStr::new_static("dids"),
                            LexObjectProperty::Array(LexArray {
                                items: LexArrayItem::String(LexString {
                                    format: Some(LexStringFormat::Did),
                                    ..Default::default()
                                }),
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("displayName"),
                            LexObjectProperty::String(LexString { ..Default::default() }),
                        );
                        map.insert(
                            SmolStr::new_static("link"),
                            LexObjectProperty::String(LexString { ..Default::default() }),
                        );
                        map.insert(
                            SmolStr::new_static("postCount"),
                            LexObjectProperty::Integer(LexInteger {
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("startedAt"),
                            LexObjectProperty::String(LexString {
                                format: Some(LexStringFormat::Datetime),
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("status"),
                            LexObjectProperty::String(LexString { ..Default::default() }),
                        );
                        map.insert(
                            SmolStr::new_static("topic"),
                            LexObjectProperty::String(LexString { ..Default::default() }),
                        );
                        map
                    },
                    ..Default::default()
                }),
            );
            map.insert(
                SmolStr::new_static("threadItemBlocked"),
                LexUserType::Object(LexObject {
                    required: Some(vec![SmolStr::new_static("author")]),
                    properties: {
                        #[allow(unused_mut)]
                        let mut map = BTreeMap::new();
                        map.insert(
                            SmolStr::new_static("author"),
                            LexObjectProperty::Ref(LexRef {
                                r#ref: CowStr::new_static(
                                    "app.bsky.feed.defs#blockedAuthor",
                                ),
                                ..Default::default()
                            }),
                        );
                        map
                    },
                    ..Default::default()
                }),
            );
            map.insert(
                SmolStr::new_static("threadItemNoUnauthenticated"),
                LexUserType::Object(LexObject {
                    properties: {
                        #[allow(unused_mut)]
                        let mut map = BTreeMap::new();
                        map
                    },
                    ..Default::default()
                }),
            );
            map.insert(
                SmolStr::new_static("threadItemNotFound"),
                LexUserType::Object(LexObject {
                    properties: {
                        #[allow(unused_mut)]
                        let mut map = BTreeMap::new();
                        map
                    },
                    ..Default::default()
                }),
            );
            map.insert(
                SmolStr::new_static("threadItemPost"),
                LexUserType::Object(LexObject {
                    required: Some(
                        vec![
                            SmolStr::new_static("post"),
                            SmolStr::new_static("moreParents"),
                            SmolStr::new_static("moreReplies"),
                            SmolStr::new_static("opThread"),
                            SmolStr::new_static("hiddenByThreadgate"),
                            SmolStr::new_static("mutedByViewer")
                        ],
                    ),
                    properties: {
                        #[allow(unused_mut)]
                        let mut map = BTreeMap::new();
                        map.insert(
                            SmolStr::new_static("hiddenByThreadgate"),
                            LexObjectProperty::Boolean(LexBoolean {
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("moreParents"),
                            LexObjectProperty::Boolean(LexBoolean {
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("moreReplies"),
                            LexObjectProperty::Integer(LexInteger {
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("mutedByViewer"),
                            LexObjectProperty::Boolean(LexBoolean {
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("opThread"),
                            LexObjectProperty::Boolean(LexBoolean {
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("post"),
                            LexObjectProperty::Ref(LexRef {
                                r#ref: CowStr::new_static("app.bsky.feed.defs#postView"),
                                ..Default::default()
                            }),
                        );
                        map
                    },
                    ..Default::default()
                }),
            );
            map.insert(
                SmolStr::new_static("trendView"),
                LexUserType::Object(LexObject {
                    required: Some(
                        vec![
                            SmolStr::new_static("topic"),
                            SmolStr::new_static("displayName"),
                            SmolStr::new_static("link"),
                            SmolStr::new_static("startedAt"),
                            SmolStr::new_static("postCount"),
                            SmolStr::new_static("actors")
                        ],
                    ),
                    properties: {
                        #[allow(unused_mut)]
                        let mut map = BTreeMap::new();
                        map.insert(
                            SmolStr::new_static("actors"),
                            LexObjectProperty::Array(LexArray {
                                items: LexArrayItem::Ref(LexRef {
                                    r#ref: CowStr::new_static(
                                        "app.bsky.actor.defs#profileViewBasic",
                                    ),
                                    ..Default::default()
                                }),
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("category"),
                            LexObjectProperty::String(LexString { ..Default::default() }),
                        );
                        map.insert(
                            SmolStr::new_static("displayName"),
                            LexObjectProperty::String(LexString { ..Default::default() }),
                        );
                        map.insert(
                            SmolStr::new_static("link"),
                            LexObjectProperty::String(LexString { ..Default::default() }),
                        );
                        map.insert(
                            SmolStr::new_static("postCount"),
                            LexObjectProperty::Integer(LexInteger {
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("startedAt"),
                            LexObjectProperty::String(LexString {
                                format: Some(LexStringFormat::Datetime),
                                ..Default::default()
                            }),
                        );
                        map.insert(
                            SmolStr::new_static("status"),
                            LexObjectProperty::String(LexString { ..Default::default() }),
                        );
                        map.insert(
                            SmolStr::new_static("topic"),
                            LexObjectProperty::String(LexString { ..Default::default() }),
                        );
                        map
                    },
                    ..Default::default()
                }),
            );
            map.insert(
                SmolStr::new_static("trendingTopic"),
                LexUserType::Object(LexObject {
                    required: Some(
                        vec![SmolStr::new_static("topic"), SmolStr::new_static("link")],
                    ),
                    properties: {
                        #[allow(unused_mut)]
                        let mut map = BTreeMap::new();
                        map.insert(
                            SmolStr::new_static("description"),
                            LexObjectProperty::String(LexString { ..Default::default() }),
                        );
                        map.insert(
                            SmolStr::new_static("displayName"),
                            LexObjectProperty::String(LexString { ..Default::default() }),
                        );
                        map.insert(
                            SmolStr::new_static("link"),
                            LexObjectProperty::String(LexString { ..Default::default() }),
                        );
                        map.insert(
                            SmolStr::new_static("topic"),
                            LexObjectProperty::String(LexString { ..Default::default() }),
                        );
                        map
                    },
                    ..Default::default()
                }),
            );
            map
        },
        ..Default::default()
    }
}

pub mod skeleton_search_actor_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 {
        type Did;
    }
    /// Empty state - all required fields are unset
    pub struct Empty(());
    impl sealed::Sealed for Empty {}
    impl State for Empty {
        type Did = Unset;
    }
    ///State transition - sets the `did` field to Set
    pub struct SetDid<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetDid<St> {}
    impl<St: State> State for SetDid<St> {
        type Did = Set<members::did>;
    }
    /// Marker types for field names
    #[allow(non_camel_case_types)]
    pub mod members {
        ///Marker type for the `did` field
        pub struct did(());
    }
}

/// Builder for constructing an instance of this type.
pub struct SkeletonSearchActorBuilder<
    St: skeleton_search_actor_state::State,
    S: BosStr = DefaultStr,
> {
    _state: PhantomData<fn() -> St>,
    _fields: (Option<Did<S>>,),
    _type: PhantomData<fn() -> S>,
}

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

impl<S: BosStr> SkeletonSearchActor<S> {
    /// Create a new builder for this type
    pub fn builder() -> SkeletonSearchActorBuilder<
        skeleton_search_actor_state::Empty,
        S,
    > {
        SkeletonSearchActorBuilder::builder()
    }
}

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

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

impl<St, S: BosStr> SkeletonSearchActorBuilder<St, S>
where
    St: skeleton_search_actor_state::State,
    St::Did: skeleton_search_actor_state::IsUnset,
{
    /// Set the `did` field (required)
    pub fn did(
        mut self,
        value: impl Into<Did<S>>,
    ) -> SkeletonSearchActorBuilder<skeleton_search_actor_state::SetDid<St>, S> {
        self._fields.0 = Option::Some(value.into());
        SkeletonSearchActorBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

impl<St, S: BosStr> SkeletonSearchActorBuilder<St, S>
where
    St: skeleton_search_actor_state::State,
    St::Did: skeleton_search_actor_state::IsSet,
{
    /// Build the final struct.
    pub fn build(self) -> SkeletonSearchActor<S> {
        SkeletonSearchActor {
            did: self._fields.0.unwrap(),
            extra_data: Default::default(),
        }
    }
    /// Build the final struct with custom extra_data.
    pub fn build_with_data(
        self,
        extra_data: BTreeMap<SmolStr, Data<S>>,
    ) -> SkeletonSearchActor<S> {
        SkeletonSearchActor {
            did: self._fields.0.unwrap(),
            extra_data: Some(extra_data),
        }
    }
}

pub mod skeleton_search_post_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 {
        type Uri;
    }
    /// Empty state - all required fields are unset
    pub struct Empty(());
    impl sealed::Sealed for Empty {}
    impl State for Empty {
        type Uri = Unset;
    }
    ///State transition - sets the `uri` field to Set
    pub struct SetUri<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetUri<St> {}
    impl<St: State> State for SetUri<St> {
        type Uri = Set<members::uri>;
    }
    /// Marker types for field names
    #[allow(non_camel_case_types)]
    pub mod members {
        ///Marker type for the `uri` field
        pub struct uri(());
    }
}

/// Builder for constructing an instance of this type.
pub struct SkeletonSearchPostBuilder<
    St: skeleton_search_post_state::State,
    S: BosStr = DefaultStr,
> {
    _state: PhantomData<fn() -> St>,
    _fields: (Option<AtUri<S>>,),
    _type: PhantomData<fn() -> S>,
}

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

impl<S: BosStr> SkeletonSearchPost<S> {
    /// Create a new builder for this type
    pub fn builder() -> SkeletonSearchPostBuilder<skeleton_search_post_state::Empty, S> {
        SkeletonSearchPostBuilder::builder()
    }
}

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

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

impl<St, S: BosStr> SkeletonSearchPostBuilder<St, S>
where
    St: skeleton_search_post_state::State,
    St::Uri: skeleton_search_post_state::IsUnset,
{
    /// Set the `uri` field (required)
    pub fn uri(
        mut self,
        value: impl Into<AtUri<S>>,
    ) -> SkeletonSearchPostBuilder<skeleton_search_post_state::SetUri<St>, S> {
        self._fields.0 = Option::Some(value.into());
        SkeletonSearchPostBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

impl<St, S: BosStr> SkeletonSearchPostBuilder<St, S>
where
    St: skeleton_search_post_state::State,
    St::Uri: skeleton_search_post_state::IsSet,
{
    /// Build the final struct.
    pub fn build(self) -> SkeletonSearchPost<S> {
        SkeletonSearchPost {
            uri: self._fields.0.unwrap(),
            extra_data: Default::default(),
        }
    }
    /// Build the final struct with custom extra_data.
    pub fn build_with_data(
        self,
        extra_data: BTreeMap<SmolStr, Data<S>>,
    ) -> SkeletonSearchPost<S> {
        SkeletonSearchPost {
            uri: self._fields.0.unwrap(),
            extra_data: Some(extra_data),
        }
    }
}

pub mod skeleton_search_starter_pack_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 {
        type Uri;
    }
    /// Empty state - all required fields are unset
    pub struct Empty(());
    impl sealed::Sealed for Empty {}
    impl State for Empty {
        type Uri = Unset;
    }
    ///State transition - sets the `uri` field to Set
    pub struct SetUri<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetUri<St> {}
    impl<St: State> State for SetUri<St> {
        type Uri = Set<members::uri>;
    }
    /// Marker types for field names
    #[allow(non_camel_case_types)]
    pub mod members {
        ///Marker type for the `uri` field
        pub struct uri(());
    }
}

/// Builder for constructing an instance of this type.
pub struct SkeletonSearchStarterPackBuilder<
    St: skeleton_search_starter_pack_state::State,
    S: BosStr = DefaultStr,
> {
    _state: PhantomData<fn() -> St>,
    _fields: (Option<AtUri<S>>,),
    _type: PhantomData<fn() -> S>,
}

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

impl<S: BosStr> SkeletonSearchStarterPack<S> {
    /// Create a new builder for this type
    pub fn builder() -> SkeletonSearchStarterPackBuilder<
        skeleton_search_starter_pack_state::Empty,
        S,
    > {
        SkeletonSearchStarterPackBuilder::builder()
    }
}

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

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

impl<St, S: BosStr> SkeletonSearchStarterPackBuilder<St, S>
where
    St: skeleton_search_starter_pack_state::State,
    St::Uri: skeleton_search_starter_pack_state::IsUnset,
{
    /// Set the `uri` field (required)
    pub fn uri(
        mut self,
        value: impl Into<AtUri<S>>,
    ) -> SkeletonSearchStarterPackBuilder<
        skeleton_search_starter_pack_state::SetUri<St>,
        S,
    > {
        self._fields.0 = Option::Some(value.into());
        SkeletonSearchStarterPackBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

impl<St, S: BosStr> SkeletonSearchStarterPackBuilder<St, S>
where
    St: skeleton_search_starter_pack_state::State,
    St::Uri: skeleton_search_starter_pack_state::IsSet,
{
    /// Build the final struct.
    pub fn build(self) -> SkeletonSearchStarterPack<S> {
        SkeletonSearchStarterPack {
            uri: self._fields.0.unwrap(),
            extra_data: Default::default(),
        }
    }
    /// Build the final struct with custom extra_data.
    pub fn build_with_data(
        self,
        extra_data: BTreeMap<SmolStr, Data<S>>,
    ) -> SkeletonSearchStarterPack<S> {
        SkeletonSearchStarterPack {
            uri: self._fields.0.unwrap(),
            extra_data: Some(extra_data),
        }
    }
}

pub mod skeleton_trend_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 {
        type Dids;
        type DisplayName;
        type Link;
        type PostCount;
        type StartedAt;
        type Topic;
    }
    /// Empty state - all required fields are unset
    pub struct Empty(());
    impl sealed::Sealed for Empty {}
    impl State for Empty {
        type Dids = Unset;
        type DisplayName = Unset;
        type Link = Unset;
        type PostCount = Unset;
        type StartedAt = Unset;
        type Topic = Unset;
    }
    ///State transition - sets the `dids` field to Set
    pub struct SetDids<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetDids<St> {}
    impl<St: State> State for SetDids<St> {
        type Dids = Set<members::dids>;
        type DisplayName = St::DisplayName;
        type Link = St::Link;
        type PostCount = St::PostCount;
        type StartedAt = St::StartedAt;
        type Topic = St::Topic;
    }
    ///State transition - sets the `display_name` field to Set
    pub struct SetDisplayName<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetDisplayName<St> {}
    impl<St: State> State for SetDisplayName<St> {
        type Dids = St::Dids;
        type DisplayName = Set<members::display_name>;
        type Link = St::Link;
        type PostCount = St::PostCount;
        type StartedAt = St::StartedAt;
        type Topic = St::Topic;
    }
    ///State transition - sets the `link` field to Set
    pub struct SetLink<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetLink<St> {}
    impl<St: State> State for SetLink<St> {
        type Dids = St::Dids;
        type DisplayName = St::DisplayName;
        type Link = Set<members::link>;
        type PostCount = St::PostCount;
        type StartedAt = St::StartedAt;
        type Topic = St::Topic;
    }
    ///State transition - sets the `post_count` field to Set
    pub struct SetPostCount<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetPostCount<St> {}
    impl<St: State> State for SetPostCount<St> {
        type Dids = St::Dids;
        type DisplayName = St::DisplayName;
        type Link = St::Link;
        type PostCount = Set<members::post_count>;
        type StartedAt = St::StartedAt;
        type Topic = St::Topic;
    }
    ///State transition - sets the `started_at` field to Set
    pub struct SetStartedAt<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetStartedAt<St> {}
    impl<St: State> State for SetStartedAt<St> {
        type Dids = St::Dids;
        type DisplayName = St::DisplayName;
        type Link = St::Link;
        type PostCount = St::PostCount;
        type StartedAt = Set<members::started_at>;
        type Topic = St::Topic;
    }
    ///State transition - sets the `topic` field to Set
    pub struct SetTopic<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetTopic<St> {}
    impl<St: State> State for SetTopic<St> {
        type Dids = St::Dids;
        type DisplayName = St::DisplayName;
        type Link = St::Link;
        type PostCount = St::PostCount;
        type StartedAt = St::StartedAt;
        type Topic = Set<members::topic>;
    }
    /// Marker types for field names
    #[allow(non_camel_case_types)]
    pub mod members {
        ///Marker type for the `dids` field
        pub struct dids(());
        ///Marker type for the `display_name` field
        pub struct display_name(());
        ///Marker type for the `link` field
        pub struct link(());
        ///Marker type for the `post_count` field
        pub struct post_count(());
        ///Marker type for the `started_at` field
        pub struct started_at(());
        ///Marker type for the `topic` field
        pub struct topic(());
    }
}

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

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

impl<S: BosStr> SkeletonTrend<S> {
    /// Create a new builder for this type
    pub fn builder() -> SkeletonTrendBuilder<skeleton_trend_state::Empty, S> {
        SkeletonTrendBuilder::builder()
    }
}

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

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

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

impl<St, S: BosStr> SkeletonTrendBuilder<St, S>
where
    St: skeleton_trend_state::State,
    St::Dids: skeleton_trend_state::IsUnset,
{
    /// Set the `dids` field (required)
    pub fn dids(
        mut self,
        value: impl Into<Vec<Did<S>>>,
    ) -> SkeletonTrendBuilder<skeleton_trend_state::SetDids<St>, S> {
        self._fields.1 = Option::Some(value.into());
        SkeletonTrendBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

impl<St, S: BosStr> SkeletonTrendBuilder<St, S>
where
    St: skeleton_trend_state::State,
    St::DisplayName: skeleton_trend_state::IsUnset,
{
    /// Set the `displayName` field (required)
    pub fn display_name(
        mut self,
        value: impl Into<S>,
    ) -> SkeletonTrendBuilder<skeleton_trend_state::SetDisplayName<St>, S> {
        self._fields.2 = Option::Some(value.into());
        SkeletonTrendBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

impl<St, S: BosStr> SkeletonTrendBuilder<St, S>
where
    St: skeleton_trend_state::State,
    St::Link: skeleton_trend_state::IsUnset,
{
    /// Set the `link` field (required)
    pub fn link(
        mut self,
        value: impl Into<S>,
    ) -> SkeletonTrendBuilder<skeleton_trend_state::SetLink<St>, S> {
        self._fields.3 = Option::Some(value.into());
        SkeletonTrendBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

impl<St, S: BosStr> SkeletonTrendBuilder<St, S>
where
    St: skeleton_trend_state::State,
    St::PostCount: skeleton_trend_state::IsUnset,
{
    /// Set the `postCount` field (required)
    pub fn post_count(
        mut self,
        value: impl Into<i64>,
    ) -> SkeletonTrendBuilder<skeleton_trend_state::SetPostCount<St>, S> {
        self._fields.4 = Option::Some(value.into());
        SkeletonTrendBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

impl<St, S: BosStr> SkeletonTrendBuilder<St, S>
where
    St: skeleton_trend_state::State,
    St::StartedAt: skeleton_trend_state::IsUnset,
{
    /// Set the `startedAt` field (required)
    pub fn started_at(
        mut self,
        value: impl Into<Datetime>,
    ) -> SkeletonTrendBuilder<skeleton_trend_state::SetStartedAt<St>, S> {
        self._fields.5 = Option::Some(value.into());
        SkeletonTrendBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

impl<St: skeleton_trend_state::State, S: BosStr> SkeletonTrendBuilder<St, S> {
    /// Set the `status` field (optional)
    pub fn status(mut self, value: impl Into<Option<SkeletonTrendStatus<S>>>) -> Self {
        self._fields.6 = value.into();
        self
    }
    /// Set the `status` field to an Option value (optional)
    pub fn maybe_status(mut self, value: Option<SkeletonTrendStatus<S>>) -> Self {
        self._fields.6 = value;
        self
    }
}

impl<St, S: BosStr> SkeletonTrendBuilder<St, S>
where
    St: skeleton_trend_state::State,
    St::Topic: skeleton_trend_state::IsUnset,
{
    /// Set the `topic` field (required)
    pub fn topic(
        mut self,
        value: impl Into<S>,
    ) -> SkeletonTrendBuilder<skeleton_trend_state::SetTopic<St>, S> {
        self._fields.7 = Option::Some(value.into());
        SkeletonTrendBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

impl<St, S: BosStr> SkeletonTrendBuilder<St, S>
where
    St: skeleton_trend_state::State,
    St::Dids: skeleton_trend_state::IsSet,
    St::DisplayName: skeleton_trend_state::IsSet,
    St::Link: skeleton_trend_state::IsSet,
    St::PostCount: skeleton_trend_state::IsSet,
    St::StartedAt: skeleton_trend_state::IsSet,
    St::Topic: skeleton_trend_state::IsSet,
{
    /// Build the final struct.
    pub fn build(self) -> SkeletonTrend<S> {
        SkeletonTrend {
            category: self._fields.0,
            dids: self._fields.1.unwrap(),
            display_name: self._fields.2.unwrap(),
            link: self._fields.3.unwrap(),
            post_count: self._fields.4.unwrap(),
            started_at: self._fields.5.unwrap(),
            status: self._fields.6,
            topic: self._fields.7.unwrap(),
            extra_data: Default::default(),
        }
    }
    /// Build the final struct with custom extra_data.
    pub fn build_with_data(
        self,
        extra_data: BTreeMap<SmolStr, Data<S>>,
    ) -> SkeletonTrend<S> {
        SkeletonTrend {
            category: self._fields.0,
            dids: self._fields.1.unwrap(),
            display_name: self._fields.2.unwrap(),
            link: self._fields.3.unwrap(),
            post_count: self._fields.4.unwrap(),
            started_at: self._fields.5.unwrap(),
            status: self._fields.6,
            topic: self._fields.7.unwrap(),
            extra_data: Some(extra_data),
        }
    }
}

pub mod thread_item_blocked_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 {
        type Author;
    }
    /// Empty state - all required fields are unset
    pub struct Empty(());
    impl sealed::Sealed for Empty {}
    impl State for Empty {
        type Author = Unset;
    }
    ///State transition - sets the `author` field to Set
    pub struct SetAuthor<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetAuthor<St> {}
    impl<St: State> State for SetAuthor<St> {
        type Author = Set<members::author>;
    }
    /// Marker types for field names
    #[allow(non_camel_case_types)]
    pub mod members {
        ///Marker type for the `author` field
        pub struct author(());
    }
}

/// Builder for constructing an instance of this type.
pub struct ThreadItemBlockedBuilder<
    St: thread_item_blocked_state::State,
    S: BosStr = DefaultStr,
> {
    _state: PhantomData<fn() -> St>,
    _fields: (Option<BlockedAuthor<S>>,),
    _type: PhantomData<fn() -> S>,
}

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

impl<S: BosStr> ThreadItemBlocked<S> {
    /// Create a new builder for this type
    pub fn builder() -> ThreadItemBlockedBuilder<thread_item_blocked_state::Empty, S> {
        ThreadItemBlockedBuilder::builder()
    }
}

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

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

impl<St, S: BosStr> ThreadItemBlockedBuilder<St, S>
where
    St: thread_item_blocked_state::State,
    St::Author: thread_item_blocked_state::IsUnset,
{
    /// Set the `author` field (required)
    pub fn author(
        mut self,
        value: impl Into<BlockedAuthor<S>>,
    ) -> ThreadItemBlockedBuilder<thread_item_blocked_state::SetAuthor<St>, S> {
        self._fields.0 = Option::Some(value.into());
        ThreadItemBlockedBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

impl<St, S: BosStr> ThreadItemBlockedBuilder<St, S>
where
    St: thread_item_blocked_state::State,
    St::Author: thread_item_blocked_state::IsSet,
{
    /// Build the final struct.
    pub fn build(self) -> ThreadItemBlocked<S> {
        ThreadItemBlocked {
            author: self._fields.0.unwrap(),
            extra_data: Default::default(),
        }
    }
    /// Build the final struct with custom extra_data.
    pub fn build_with_data(
        self,
        extra_data: BTreeMap<SmolStr, Data<S>>,
    ) -> ThreadItemBlocked<S> {
        ThreadItemBlocked {
            author: self._fields.0.unwrap(),
            extra_data: Some(extra_data),
        }
    }
}

pub mod thread_item_post_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 {
        type HiddenByThreadgate;
        type MoreParents;
        type MoreReplies;
        type MutedByViewer;
        type OpThread;
        type Post;
    }
    /// Empty state - all required fields are unset
    pub struct Empty(());
    impl sealed::Sealed for Empty {}
    impl State for Empty {
        type HiddenByThreadgate = Unset;
        type MoreParents = Unset;
        type MoreReplies = Unset;
        type MutedByViewer = Unset;
        type OpThread = Unset;
        type Post = Unset;
    }
    ///State transition - sets the `hidden_by_threadgate` field to Set
    pub struct SetHiddenByThreadgate<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetHiddenByThreadgate<St> {}
    impl<St: State> State for SetHiddenByThreadgate<St> {
        type HiddenByThreadgate = Set<members::hidden_by_threadgate>;
        type MoreParents = St::MoreParents;
        type MoreReplies = St::MoreReplies;
        type MutedByViewer = St::MutedByViewer;
        type OpThread = St::OpThread;
        type Post = St::Post;
    }
    ///State transition - sets the `more_parents` field to Set
    pub struct SetMoreParents<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetMoreParents<St> {}
    impl<St: State> State for SetMoreParents<St> {
        type HiddenByThreadgate = St::HiddenByThreadgate;
        type MoreParents = Set<members::more_parents>;
        type MoreReplies = St::MoreReplies;
        type MutedByViewer = St::MutedByViewer;
        type OpThread = St::OpThread;
        type Post = St::Post;
    }
    ///State transition - sets the `more_replies` field to Set
    pub struct SetMoreReplies<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetMoreReplies<St> {}
    impl<St: State> State for SetMoreReplies<St> {
        type HiddenByThreadgate = St::HiddenByThreadgate;
        type MoreParents = St::MoreParents;
        type MoreReplies = Set<members::more_replies>;
        type MutedByViewer = St::MutedByViewer;
        type OpThread = St::OpThread;
        type Post = St::Post;
    }
    ///State transition - sets the `muted_by_viewer` field to Set
    pub struct SetMutedByViewer<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetMutedByViewer<St> {}
    impl<St: State> State for SetMutedByViewer<St> {
        type HiddenByThreadgate = St::HiddenByThreadgate;
        type MoreParents = St::MoreParents;
        type MoreReplies = St::MoreReplies;
        type MutedByViewer = Set<members::muted_by_viewer>;
        type OpThread = St::OpThread;
        type Post = St::Post;
    }
    ///State transition - sets the `op_thread` field to Set
    pub struct SetOpThread<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetOpThread<St> {}
    impl<St: State> State for SetOpThread<St> {
        type HiddenByThreadgate = St::HiddenByThreadgate;
        type MoreParents = St::MoreParents;
        type MoreReplies = St::MoreReplies;
        type MutedByViewer = St::MutedByViewer;
        type OpThread = Set<members::op_thread>;
        type Post = St::Post;
    }
    ///State transition - sets the `post` field to Set
    pub struct SetPost<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetPost<St> {}
    impl<St: State> State for SetPost<St> {
        type HiddenByThreadgate = St::HiddenByThreadgate;
        type MoreParents = St::MoreParents;
        type MoreReplies = St::MoreReplies;
        type MutedByViewer = St::MutedByViewer;
        type OpThread = St::OpThread;
        type Post = Set<members::post>;
    }
    /// Marker types for field names
    #[allow(non_camel_case_types)]
    pub mod members {
        ///Marker type for the `hidden_by_threadgate` field
        pub struct hidden_by_threadgate(());
        ///Marker type for the `more_parents` field
        pub struct more_parents(());
        ///Marker type for the `more_replies` field
        pub struct more_replies(());
        ///Marker type for the `muted_by_viewer` field
        pub struct muted_by_viewer(());
        ///Marker type for the `op_thread` field
        pub struct op_thread(());
        ///Marker type for the `post` field
        pub struct post(());
    }
}

/// Builder for constructing an instance of this type.
pub struct ThreadItemPostBuilder<
    St: thread_item_post_state::State,
    S: BosStr = DefaultStr,
> {
    _state: PhantomData<fn() -> St>,
    _fields: (
        Option<bool>,
        Option<bool>,
        Option<i64>,
        Option<bool>,
        Option<bool>,
        Option<PostView<S>>,
    ),
    _type: PhantomData<fn() -> S>,
}

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

impl<S: BosStr> ThreadItemPost<S> {
    /// Create a new builder for this type
    pub fn builder() -> ThreadItemPostBuilder<thread_item_post_state::Empty, S> {
        ThreadItemPostBuilder::builder()
    }
}

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

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

impl<St, S: BosStr> ThreadItemPostBuilder<St, S>
where
    St: thread_item_post_state::State,
    St::HiddenByThreadgate: thread_item_post_state::IsUnset,
{
    /// Set the `hiddenByThreadgate` field (required)
    pub fn hidden_by_threadgate(
        mut self,
        value: impl Into<bool>,
    ) -> ThreadItemPostBuilder<thread_item_post_state::SetHiddenByThreadgate<St>, S> {
        self._fields.0 = Option::Some(value.into());
        ThreadItemPostBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

impl<St, S: BosStr> ThreadItemPostBuilder<St, S>
where
    St: thread_item_post_state::State,
    St::MoreParents: thread_item_post_state::IsUnset,
{
    /// Set the `moreParents` field (required)
    pub fn more_parents(
        mut self,
        value: impl Into<bool>,
    ) -> ThreadItemPostBuilder<thread_item_post_state::SetMoreParents<St>, S> {
        self._fields.1 = Option::Some(value.into());
        ThreadItemPostBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

impl<St, S: BosStr> ThreadItemPostBuilder<St, S>
where
    St: thread_item_post_state::State,
    St::MoreReplies: thread_item_post_state::IsUnset,
{
    /// Set the `moreReplies` field (required)
    pub fn more_replies(
        mut self,
        value: impl Into<i64>,
    ) -> ThreadItemPostBuilder<thread_item_post_state::SetMoreReplies<St>, S> {
        self._fields.2 = Option::Some(value.into());
        ThreadItemPostBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

impl<St, S: BosStr> ThreadItemPostBuilder<St, S>
where
    St: thread_item_post_state::State,
    St::MutedByViewer: thread_item_post_state::IsUnset,
{
    /// Set the `mutedByViewer` field (required)
    pub fn muted_by_viewer(
        mut self,
        value: impl Into<bool>,
    ) -> ThreadItemPostBuilder<thread_item_post_state::SetMutedByViewer<St>, S> {
        self._fields.3 = Option::Some(value.into());
        ThreadItemPostBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

impl<St, S: BosStr> ThreadItemPostBuilder<St, S>
where
    St: thread_item_post_state::State,
    St::OpThread: thread_item_post_state::IsUnset,
{
    /// Set the `opThread` field (required)
    pub fn op_thread(
        mut self,
        value: impl Into<bool>,
    ) -> ThreadItemPostBuilder<thread_item_post_state::SetOpThread<St>, S> {
        self._fields.4 = Option::Some(value.into());
        ThreadItemPostBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

impl<St, S: BosStr> ThreadItemPostBuilder<St, S>
where
    St: thread_item_post_state::State,
    St::Post: thread_item_post_state::IsUnset,
{
    /// Set the `post` field (required)
    pub fn post(
        mut self,
        value: impl Into<PostView<S>>,
    ) -> ThreadItemPostBuilder<thread_item_post_state::SetPost<St>, S> {
        self._fields.5 = Option::Some(value.into());
        ThreadItemPostBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

impl<St, S: BosStr> ThreadItemPostBuilder<St, S>
where
    St: thread_item_post_state::State,
    St::HiddenByThreadgate: thread_item_post_state::IsSet,
    St::MoreParents: thread_item_post_state::IsSet,
    St::MoreReplies: thread_item_post_state::IsSet,
    St::MutedByViewer: thread_item_post_state::IsSet,
    St::OpThread: thread_item_post_state::IsSet,
    St::Post: thread_item_post_state::IsSet,
{
    /// Build the final struct.
    pub fn build(self) -> ThreadItemPost<S> {
        ThreadItemPost {
            hidden_by_threadgate: self._fields.0.unwrap(),
            more_parents: self._fields.1.unwrap(),
            more_replies: self._fields.2.unwrap(),
            muted_by_viewer: self._fields.3.unwrap(),
            op_thread: self._fields.4.unwrap(),
            post: self._fields.5.unwrap(),
            extra_data: Default::default(),
        }
    }
    /// Build the final struct with custom extra_data.
    pub fn build_with_data(
        self,
        extra_data: BTreeMap<SmolStr, Data<S>>,
    ) -> ThreadItemPost<S> {
        ThreadItemPost {
            hidden_by_threadgate: self._fields.0.unwrap(),
            more_parents: self._fields.1.unwrap(),
            more_replies: self._fields.2.unwrap(),
            muted_by_viewer: self._fields.3.unwrap(),
            op_thread: self._fields.4.unwrap(),
            post: self._fields.5.unwrap(),
            extra_data: Some(extra_data),
        }
    }
}

pub mod trend_view_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 {
        type Actors;
        type DisplayName;
        type Link;
        type PostCount;
        type StartedAt;
        type Topic;
    }
    /// Empty state - all required fields are unset
    pub struct Empty(());
    impl sealed::Sealed for Empty {}
    impl State for Empty {
        type Actors = Unset;
        type DisplayName = Unset;
        type Link = Unset;
        type PostCount = Unset;
        type StartedAt = Unset;
        type Topic = Unset;
    }
    ///State transition - sets the `actors` field to Set
    pub struct SetActors<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetActors<St> {}
    impl<St: State> State for SetActors<St> {
        type Actors = Set<members::actors>;
        type DisplayName = St::DisplayName;
        type Link = St::Link;
        type PostCount = St::PostCount;
        type StartedAt = St::StartedAt;
        type Topic = St::Topic;
    }
    ///State transition - sets the `display_name` field to Set
    pub struct SetDisplayName<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetDisplayName<St> {}
    impl<St: State> State for SetDisplayName<St> {
        type Actors = St::Actors;
        type DisplayName = Set<members::display_name>;
        type Link = St::Link;
        type PostCount = St::PostCount;
        type StartedAt = St::StartedAt;
        type Topic = St::Topic;
    }
    ///State transition - sets the `link` field to Set
    pub struct SetLink<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetLink<St> {}
    impl<St: State> State for SetLink<St> {
        type Actors = St::Actors;
        type DisplayName = St::DisplayName;
        type Link = Set<members::link>;
        type PostCount = St::PostCount;
        type StartedAt = St::StartedAt;
        type Topic = St::Topic;
    }
    ///State transition - sets the `post_count` field to Set
    pub struct SetPostCount<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetPostCount<St> {}
    impl<St: State> State for SetPostCount<St> {
        type Actors = St::Actors;
        type DisplayName = St::DisplayName;
        type Link = St::Link;
        type PostCount = Set<members::post_count>;
        type StartedAt = St::StartedAt;
        type Topic = St::Topic;
    }
    ///State transition - sets the `started_at` field to Set
    pub struct SetStartedAt<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetStartedAt<St> {}
    impl<St: State> State for SetStartedAt<St> {
        type Actors = St::Actors;
        type DisplayName = St::DisplayName;
        type Link = St::Link;
        type PostCount = St::PostCount;
        type StartedAt = Set<members::started_at>;
        type Topic = St::Topic;
    }
    ///State transition - sets the `topic` field to Set
    pub struct SetTopic<St: State = Empty>(PhantomData<fn() -> St>);
    impl<St: State> sealed::Sealed for SetTopic<St> {}
    impl<St: State> State for SetTopic<St> {
        type Actors = St::Actors;
        type DisplayName = St::DisplayName;
        type Link = St::Link;
        type PostCount = St::PostCount;
        type StartedAt = St::StartedAt;
        type Topic = Set<members::topic>;
    }
    /// Marker types for field names
    #[allow(non_camel_case_types)]
    pub mod members {
        ///Marker type for the `actors` field
        pub struct actors(());
        ///Marker type for the `display_name` field
        pub struct display_name(());
        ///Marker type for the `link` field
        pub struct link(());
        ///Marker type for the `post_count` field
        pub struct post_count(());
        ///Marker type for the `started_at` field
        pub struct started_at(());
        ///Marker type for the `topic` field
        pub struct topic(());
    }
}

/// Builder for constructing an instance of this type.
pub struct TrendViewBuilder<St: trend_view_state::State, S: BosStr = DefaultStr> {
    _state: PhantomData<fn() -> St>,
    _fields: (
        Option<Vec<ProfileViewBasic<S>>>,
        Option<S>,
        Option<S>,
        Option<S>,
        Option<i64>,
        Option<Datetime>,
        Option<TrendViewStatus<S>>,
        Option<S>,
    ),
    _type: PhantomData<fn() -> S>,
}

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

impl<S: BosStr> TrendView<S> {
    /// Create a new builder for this type
    pub fn builder() -> TrendViewBuilder<trend_view_state::Empty, S> {
        TrendViewBuilder::builder()
    }
}

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

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

impl<St, S: BosStr> TrendViewBuilder<St, S>
where
    St: trend_view_state::State,
    St::Actors: trend_view_state::IsUnset,
{
    /// Set the `actors` field (required)
    pub fn actors(
        mut self,
        value: impl Into<Vec<ProfileViewBasic<S>>>,
    ) -> TrendViewBuilder<trend_view_state::SetActors<St>, S> {
        self._fields.0 = Option::Some(value.into());
        TrendViewBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

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

impl<St, S: BosStr> TrendViewBuilder<St, S>
where
    St: trend_view_state::State,
    St::DisplayName: trend_view_state::IsUnset,
{
    /// Set the `displayName` field (required)
    pub fn display_name(
        mut self,
        value: impl Into<S>,
    ) -> TrendViewBuilder<trend_view_state::SetDisplayName<St>, S> {
        self._fields.2 = Option::Some(value.into());
        TrendViewBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

impl<St, S: BosStr> TrendViewBuilder<St, S>
where
    St: trend_view_state::State,
    St::Link: trend_view_state::IsUnset,
{
    /// Set the `link` field (required)
    pub fn link(
        mut self,
        value: impl Into<S>,
    ) -> TrendViewBuilder<trend_view_state::SetLink<St>, S> {
        self._fields.3 = Option::Some(value.into());
        TrendViewBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

impl<St, S: BosStr> TrendViewBuilder<St, S>
where
    St: trend_view_state::State,
    St::PostCount: trend_view_state::IsUnset,
{
    /// Set the `postCount` field (required)
    pub fn post_count(
        mut self,
        value: impl Into<i64>,
    ) -> TrendViewBuilder<trend_view_state::SetPostCount<St>, S> {
        self._fields.4 = Option::Some(value.into());
        TrendViewBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

impl<St, S: BosStr> TrendViewBuilder<St, S>
where
    St: trend_view_state::State,
    St::StartedAt: trend_view_state::IsUnset,
{
    /// Set the `startedAt` field (required)
    pub fn started_at(
        mut self,
        value: impl Into<Datetime>,
    ) -> TrendViewBuilder<trend_view_state::SetStartedAt<St>, S> {
        self._fields.5 = Option::Some(value.into());
        TrendViewBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

impl<St: trend_view_state::State, S: BosStr> TrendViewBuilder<St, S> {
    /// Set the `status` field (optional)
    pub fn status(mut self, value: impl Into<Option<TrendViewStatus<S>>>) -> Self {
        self._fields.6 = value.into();
        self
    }
    /// Set the `status` field to an Option value (optional)
    pub fn maybe_status(mut self, value: Option<TrendViewStatus<S>>) -> Self {
        self._fields.6 = value;
        self
    }
}

impl<St, S: BosStr> TrendViewBuilder<St, S>
where
    St: trend_view_state::State,
    St::Topic: trend_view_state::IsUnset,
{
    /// Set the `topic` field (required)
    pub fn topic(
        mut self,
        value: impl Into<S>,
    ) -> TrendViewBuilder<trend_view_state::SetTopic<St>, S> {
        self._fields.7 = Option::Some(value.into());
        TrendViewBuilder {
            _state: PhantomData,
            _fields: self._fields,
            _type: PhantomData,
        }
    }
}

impl<St, S: BosStr> TrendViewBuilder<St, S>
where
    St: trend_view_state::State,
    St::Actors: trend_view_state::IsSet,
    St::DisplayName: trend_view_state::IsSet,
    St::Link: trend_view_state::IsSet,
    St::PostCount: trend_view_state::IsSet,
    St::StartedAt: trend_view_state::IsSet,
    St::Topic: trend_view_state::IsSet,
{
    /// Build the final struct.
    pub fn build(self) -> TrendView<S> {
        TrendView {
            actors: self._fields.0.unwrap(),
            category: self._fields.1,
            display_name: self._fields.2.unwrap(),
            link: self._fields.3.unwrap(),
            post_count: self._fields.4.unwrap(),
            started_at: self._fields.5.unwrap(),
            status: self._fields.6,
            topic: self._fields.7.unwrap(),
            extra_data: Default::default(),
        }
    }
    /// Build the final struct with custom extra_data.
    pub fn build_with_data(
        self,
        extra_data: BTreeMap<SmolStr, Data<S>>,
    ) -> TrendView<S> {
        TrendView {
            actors: self._fields.0.unwrap(),
            category: self._fields.1,
            display_name: self._fields.2.unwrap(),
            link: self._fields.3.unwrap(),
            post_count: self._fields.4.unwrap(),
            started_at: self._fields.5.unwrap(),
            status: self._fields.6,
            topic: self._fields.7.unwrap(),
            extra_data: Some(extra_data),
        }
    }
}