// @generated by jacquard-lexicon. DO NOT EDIT. // // Lexicon: app.bsky.actor.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.actor` Lexicon namespace/module. pub mod get_preferences; pub mod get_profile; pub mod get_profiles; pub mod get_suggestions; pub mod profile; pub mod put_preferences; pub mod search_actors; pub mod search_actors_typeahead; pub mod status; #[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, Handle, AtUri, Cid, Datetime, UriValue}; use jacquard_common::types::value::Data; use jacquard_derive::{IntoStatic, open_union}; 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::com_atproto::label::Label; use crate::com_atproto::repo::strong_ref::StrongRef; use crate::app_bsky::actor; #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] #[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub struct AdultContentPref { /// Defaults to `false`. #[serde(default = "_default_adult_content_pref_enabled")] pub enabled: bool, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } /// If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress. #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] #[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub struct BskyAppProgressGuide { pub guide: S, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } /// A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this. #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] #[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub struct BskyAppStatePref { #[serde(skip_serializing_if = "Option::is_none")] pub active_progress_guide: Option>, ///Indicates if the user is participating in the beta features program. #[serde(skip_serializing_if = "Option::is_none")] pub is_beta_user: Option, ///Storage for NUXs the user has encountered. #[serde(skip_serializing_if = "Option::is_none")] pub nuxs: Option>>, ///An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user. #[serde(skip_serializing_if = "Option::is_none")] pub queued_nudges: Option>, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] #[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub struct ContentLabelPref { pub label: S, ///Which labeler does this preference apply to? If undefined, applies globally. #[serde(skip_serializing_if = "Option::is_none")] pub labeler_did: Option>, pub visibility: ContentLabelPrefVisibility, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum ContentLabelPrefVisibility { Ignore, Show, Warn, Hide, Other(S), } impl ContentLabelPrefVisibility { pub fn as_str(&self) -> &str { match self { Self::Ignore => "ignore", Self::Show => "show", Self::Warn => "warn", Self::Hide => "hide", 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() { "ignore" => Self::Ignore, "show" => Self::Show, "warn" => Self::Warn, "hide" => Self::Hide, _ => Self::Other(s), } } } impl core::fmt::Display for ContentLabelPrefVisibility { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{}", self.as_str()) } } impl AsRef for ContentLabelPrefVisibility { fn as_ref(&self) -> &str { self.as_str() } } impl Serialize for ContentLabelPrefVisibility { fn serialize(&self, serializer: Ser) -> Result where Ser: serde::Serializer, { serializer.serialize_str(self.as_str()) } } impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for ContentLabelPrefVisibility { fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'de>, { let s = S::deserialize(deserializer)?; Ok(Self::from_value(s)) } } impl Default for ContentLabelPrefVisibility { fn default() -> Self { Self::Other(Default::default()) } } impl jacquard_common::IntoStatic for ContentLabelPrefVisibility where S: BosStr + jacquard_common::IntoStatic, S::Output: BosStr, { type Output = ContentLabelPrefVisibility; fn into_static(self) -> Self::Output { match self { ContentLabelPrefVisibility::Ignore => ContentLabelPrefVisibility::Ignore, ContentLabelPrefVisibility::Show => ContentLabelPrefVisibility::Show, ContentLabelPrefVisibility::Warn => ContentLabelPrefVisibility::Warn, ContentLabelPrefVisibility::Hide => ContentLabelPrefVisibility::Hide, ContentLabelPrefVisibility::Other(v) => { ContentLabelPrefVisibility::Other(v.into_static()) } } } } /// Read-only preference containing value(s) inferred from the user's declared birthdate. Absence of this preference object in the response indicates that the user has not made a declaration. #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] #[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub struct DeclaredAgePref { ///Indicates if the user has declared that they are over 13 years of age. #[serde(skip_serializing_if = "Option::is_none")] pub is_over_age13: Option, ///Indicates if the user has declared that they are over 16 years of age. #[serde(skip_serializing_if = "Option::is_none")] pub is_over_age16: Option, ///Indicates if the user has declared that they are over 18 years of age. #[serde(skip_serializing_if = "Option::is_none")] pub is_over_age18: Option, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] #[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub struct FeedViewPref { ///The URI of the feed, or an identifier which describes the feed. pub feed: S, ///Hide quote posts in the feed. #[serde(skip_serializing_if = "Option::is_none")] pub hide_quote_posts: Option, ///Hide replies in the feed. #[serde(skip_serializing_if = "Option::is_none")] pub hide_replies: Option, ///Hide replies in the feed if they do not have this number of likes. #[serde(skip_serializing_if = "Option::is_none")] pub hide_replies_by_like_count: Option, ///Hide replies in the feed if they are not by followed users. Defaults to `true`. #[serde(skip_serializing_if = "Option::is_none")] #[serde(default = "_default_feed_view_pref_hide_replies_by_unfollowed")] pub hide_replies_by_unfollowed: Option, ///Hide reposts in the feed. #[serde(skip_serializing_if = "Option::is_none")] pub hide_reposts: Option, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] #[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub struct HiddenPostsPref { ///A list of URIs of posts the account owner has hidden. pub items: Vec>, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] #[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub struct InterestsPref { ///A list of tags which describe the account owner's interests gathered during onboarding. pub tags: Vec, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } /// The subject's followers whom you also follow #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] #[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub struct KnownFollowers { pub count: i64, pub followers: Vec>, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] #[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub struct LabelerPrefItem { pub did: Did, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] #[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub struct LabelersPref { pub labelers: Vec>, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } /// Preferences for live events. #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] #[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub struct LiveEventPreferences { ///A list of feed IDs that the user has hidden from live events. #[serde(skip_serializing_if = "Option::is_none")] pub hidden_feed_ids: Option>, ///Whether to hide all feeds from live events. Defaults to `false`. #[serde(skip_serializing_if = "Option::is_none")] #[serde(default = "_default_live_event_preferences_hide_all_feeds")] pub hide_all_feeds: Option, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } /// A word that the account owner has muted. #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] #[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub struct MutedWord { ///Groups of users to apply the muted word to. If undefined, applies to all users. #[serde(skip_serializing_if = "Option::is_none")] pub actor_target: Option>, ///The date and time at which the muted word will expire and no longer be applied. #[serde(skip_serializing_if = "Option::is_none")] pub expires_at: Option, #[serde(skip_serializing_if = "Option::is_none")] pub id: Option, ///The intended targets of the muted word. pub targets: Vec>, ///The muted word itself. pub value: S, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } /// Groups of users to apply the muted word to. If undefined, applies to all users. #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum MutedWordActorTarget { All, ExcludeFollowing, Other(S), } impl MutedWordActorTarget { pub fn as_str(&self) -> &str { match self { Self::All => "all", Self::ExcludeFollowing => "exclude-following", 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() { "all" => Self::All, "exclude-following" => Self::ExcludeFollowing, _ => Self::Other(s), } } } impl core::fmt::Display for MutedWordActorTarget { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{}", self.as_str()) } } impl AsRef for MutedWordActorTarget { fn as_ref(&self) -> &str { self.as_str() } } impl Serialize for MutedWordActorTarget { fn serialize(&self, serializer: Ser) -> Result where Ser: serde::Serializer, { serializer.serialize_str(self.as_str()) } } impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for MutedWordActorTarget { fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'de>, { let s = S::deserialize(deserializer)?; Ok(Self::from_value(s)) } } impl Default for MutedWordActorTarget { fn default() -> Self { Self::Other(Default::default()) } } impl jacquard_common::IntoStatic for MutedWordActorTarget where S: BosStr + jacquard_common::IntoStatic, S::Output: BosStr, { type Output = MutedWordActorTarget; fn into_static(self) -> Self::Output { match self { MutedWordActorTarget::All => MutedWordActorTarget::All, MutedWordActorTarget::ExcludeFollowing => { MutedWordActorTarget::ExcludeFollowing } MutedWordActorTarget::Other(v) => { MutedWordActorTarget::Other(v.into_static()) } } } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum MutedWordTarget { Content, Tag, Other(S), } impl MutedWordTarget { pub fn as_str(&self) -> &str { match self { Self::Content => "content", Self::Tag => "tag", 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() { "content" => Self::Content, "tag" => Self::Tag, _ => Self::Other(s), } } } impl AsRef for MutedWordTarget { fn as_ref(&self) -> &str { self.as_str() } } impl core::fmt::Display for MutedWordTarget { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{}", self.as_str()) } } impl Serialize for MutedWordTarget { fn serialize(&self, serializer: Ser) -> Result where Ser: serde::Serializer, { serializer.serialize_str(self.as_str()) } } impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for MutedWordTarget { fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'de>, { let s = S::deserialize(deserializer)?; Ok(Self::from_value(s)) } } impl jacquard_common::IntoStatic for MutedWordTarget where S: BosStr + jacquard_common::IntoStatic, S::Output: BosStr, { type Output = MutedWordTarget; fn into_static(self) -> Self::Output { match self { MutedWordTarget::Content => MutedWordTarget::Content, MutedWordTarget::Tag => MutedWordTarget::Tag, MutedWordTarget::Other(v) => MutedWordTarget::Other(v.into_static()), } } } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] #[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub struct MutedWordsPref { ///A list of words the account owner has muted. pub items: Vec>, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } /// A new user experiences (NUX) storage object #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] #[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub struct Nux { /// Defaults to `false`. #[serde(default = "_default_nux_completed")] pub completed: bool, ///Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters. #[serde(skip_serializing_if = "Option::is_none")] pub data: Option, ///The date and time at which the NUX will expire and should be considered completed. #[serde(skip_serializing_if = "Option::is_none")] pub expires_at: Option, pub id: S, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] #[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub struct PersonalDetailsPref { ///The birth date of account owner. #[serde(skip_serializing_if = "Option::is_none")] pub birth_date: Option, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } /// Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly. #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] #[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub struct PostInteractionSettingsPref { ///Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed. #[serde(skip_serializing_if = "Option::is_none")] pub postgate_embedding_rules: Option>>, ///Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply. #[serde(skip_serializing_if = "Option::is_none")] pub threadgate_allow_rules: Option< Vec>, >, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } #[open_union] #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] #[serde(tag = "$type", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub enum PostInteractionSettingsPrefThreadgateAllowRulesItem {} #[open_union] #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] #[serde(tag = "$type", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub enum PreferencesItem { #[serde(rename = "app.bsky.actor.defs#adultContentPref")] AdultContentPref(Box>), #[serde(rename = "app.bsky.actor.defs#contentLabelPref")] ContentLabelPref(Box>), #[serde(rename = "app.bsky.actor.defs#savedFeedsPref")] SavedFeedsPref(Box>), #[serde(rename = "app.bsky.actor.defs#savedFeedsPrefV2")] SavedFeedsPrefV2(Box>), #[serde(rename = "app.bsky.actor.defs#personalDetailsPref")] PersonalDetailsPref(Box>), #[serde(rename = "app.bsky.actor.defs#declaredAgePref")] DeclaredAgePref(Box>), #[serde(rename = "app.bsky.actor.defs#feedViewPref")] FeedViewPref(Box>), #[serde(rename = "app.bsky.actor.defs#threadViewPref")] ThreadViewPref(Box>), #[serde(rename = "app.bsky.actor.defs#interestsPref")] InterestsPref(Box>), #[serde(rename = "app.bsky.actor.defs#mutedWordsPref")] MutedWordsPref(Box>), #[serde(rename = "app.bsky.actor.defs#hiddenPostsPref")] HiddenPostsPref(Box>), #[serde(rename = "app.bsky.actor.defs#bskyAppStatePref")] BskyAppStatePref(Box>), #[serde(rename = "app.bsky.actor.defs#labelersPref")] LabelersPref(Box>), #[serde(rename = "app.bsky.actor.defs#postInteractionSettingsPref")] PostInteractionSettingsPref(Box>), #[serde(rename = "app.bsky.actor.defs#verificationPrefs")] VerificationPrefs(Box>), #[serde(rename = "app.bsky.actor.defs#liveEventPreferences")] LiveEventPreferences(Box>), } pub type Preferences = Vec>; #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] #[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub struct ProfileAssociated { #[serde(skip_serializing_if = "Option::is_none")] pub activity_subscription: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub chat: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub feedgens: Option, #[serde(skip_serializing_if = "Option::is_none")] pub germ: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub labeler: Option, #[serde(skip_serializing_if = "Option::is_none")] pub lists: Option, #[serde(skip_serializing_if = "Option::is_none")] pub starter_packs: Option, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] #[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub struct ProfileAssociatedActivitySubscription { pub allow_subscriptions: ProfileAssociatedActivitySubscriptionAllowSubscriptions, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum ProfileAssociatedActivitySubscriptionAllowSubscriptions< S: BosStr = DefaultStr, > { Followers, Mutuals, None, Other(S), } impl ProfileAssociatedActivitySubscriptionAllowSubscriptions { pub fn as_str(&self) -> &str { match self { Self::Followers => "followers", Self::Mutuals => "mutuals", Self::None => "none", 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() { "followers" => Self::Followers, "mutuals" => Self::Mutuals, "none" => Self::None, _ => Self::Other(s), } } } impl core::fmt::Display for ProfileAssociatedActivitySubscriptionAllowSubscriptions { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{}", self.as_str()) } } impl AsRef for ProfileAssociatedActivitySubscriptionAllowSubscriptions { fn as_ref(&self) -> &str { self.as_str() } } impl Serialize for ProfileAssociatedActivitySubscriptionAllowSubscriptions { fn serialize(&self, serializer: Ser) -> Result where Ser: serde::Serializer, { serializer.serialize_str(self.as_str()) } } impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for ProfileAssociatedActivitySubscriptionAllowSubscriptions { fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'de>, { let s = S::deserialize(deserializer)?; Ok(Self::from_value(s)) } } impl Default for ProfileAssociatedActivitySubscriptionAllowSubscriptions { fn default() -> Self { Self::Other(Default::default()) } } impl jacquard_common::IntoStatic for ProfileAssociatedActivitySubscriptionAllowSubscriptions where S: BosStr + jacquard_common::IntoStatic, S::Output: BosStr, { type Output = ProfileAssociatedActivitySubscriptionAllowSubscriptions; fn into_static(self) -> Self::Output { match self { ProfileAssociatedActivitySubscriptionAllowSubscriptions::Followers => { ProfileAssociatedActivitySubscriptionAllowSubscriptions::Followers } ProfileAssociatedActivitySubscriptionAllowSubscriptions::Mutuals => { ProfileAssociatedActivitySubscriptionAllowSubscriptions::Mutuals } ProfileAssociatedActivitySubscriptionAllowSubscriptions::None => { ProfileAssociatedActivitySubscriptionAllowSubscriptions::None } ProfileAssociatedActivitySubscriptionAllowSubscriptions::Other(v) => { ProfileAssociatedActivitySubscriptionAllowSubscriptions::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 ProfileAssociatedChat { #[serde(skip_serializing_if = "Option::is_none")] pub allow_group_invites: Option>, pub allow_incoming: ProfileAssociatedChatAllowIncoming, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum ProfileAssociatedChatAllowGroupInvites { All, None, Following, Other(S), } impl ProfileAssociatedChatAllowGroupInvites { pub fn as_str(&self) -> &str { match self { Self::All => "all", Self::None => "none", Self::Following => "following", 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() { "all" => Self::All, "none" => Self::None, "following" => Self::Following, _ => Self::Other(s), } } } impl core::fmt::Display for ProfileAssociatedChatAllowGroupInvites { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{}", self.as_str()) } } impl AsRef for ProfileAssociatedChatAllowGroupInvites { fn as_ref(&self) -> &str { self.as_str() } } impl Serialize for ProfileAssociatedChatAllowGroupInvites { fn serialize(&self, serializer: Ser) -> Result where Ser: serde::Serializer, { serializer.serialize_str(self.as_str()) } } impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for ProfileAssociatedChatAllowGroupInvites { fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'de>, { let s = S::deserialize(deserializer)?; Ok(Self::from_value(s)) } } impl Default for ProfileAssociatedChatAllowGroupInvites { fn default() -> Self { Self::Other(Default::default()) } } impl jacquard_common::IntoStatic for ProfileAssociatedChatAllowGroupInvites where S: BosStr + jacquard_common::IntoStatic, S::Output: BosStr, { type Output = ProfileAssociatedChatAllowGroupInvites; fn into_static(self) -> Self::Output { match self { ProfileAssociatedChatAllowGroupInvites::All => { ProfileAssociatedChatAllowGroupInvites::All } ProfileAssociatedChatAllowGroupInvites::None => { ProfileAssociatedChatAllowGroupInvites::None } ProfileAssociatedChatAllowGroupInvites::Following => { ProfileAssociatedChatAllowGroupInvites::Following } ProfileAssociatedChatAllowGroupInvites::Other(v) => { ProfileAssociatedChatAllowGroupInvites::Other(v.into_static()) } } } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum ProfileAssociatedChatAllowIncoming { All, None, Following, Other(S), } impl ProfileAssociatedChatAllowIncoming { pub fn as_str(&self) -> &str { match self { Self::All => "all", Self::None => "none", Self::Following => "following", 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() { "all" => Self::All, "none" => Self::None, "following" => Self::Following, _ => Self::Other(s), } } } impl core::fmt::Display for ProfileAssociatedChatAllowIncoming { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{}", self.as_str()) } } impl AsRef for ProfileAssociatedChatAllowIncoming { fn as_ref(&self) -> &str { self.as_str() } } impl Serialize for ProfileAssociatedChatAllowIncoming { fn serialize(&self, serializer: Ser) -> Result where Ser: serde::Serializer, { serializer.serialize_str(self.as_str()) } } impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for ProfileAssociatedChatAllowIncoming { fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'de>, { let s = S::deserialize(deserializer)?; Ok(Self::from_value(s)) } } impl Default for ProfileAssociatedChatAllowIncoming { fn default() -> Self { Self::Other(Default::default()) } } impl jacquard_common::IntoStatic for ProfileAssociatedChatAllowIncoming where S: BosStr + jacquard_common::IntoStatic, S::Output: BosStr, { type Output = ProfileAssociatedChatAllowIncoming; fn into_static(self) -> Self::Output { match self { ProfileAssociatedChatAllowIncoming::All => { ProfileAssociatedChatAllowIncoming::All } ProfileAssociatedChatAllowIncoming::None => { ProfileAssociatedChatAllowIncoming::None } ProfileAssociatedChatAllowIncoming::Following => { ProfileAssociatedChatAllowIncoming::Following } ProfileAssociatedChatAllowIncoming::Other(v) => { ProfileAssociatedChatAllowIncoming::Other(v.into_static()) } } } } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] #[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub struct ProfileAssociatedGerm { pub message_me_url: UriValue, pub show_button_to: ProfileAssociatedGermShowButtonTo, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum ProfileAssociatedGermShowButtonTo { UsersIFollow, Everyone, Other(S), } impl ProfileAssociatedGermShowButtonTo { pub fn as_str(&self) -> &str { match self { Self::UsersIFollow => "usersIFollow", Self::Everyone => "everyone", 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() { "usersIFollow" => Self::UsersIFollow, "everyone" => Self::Everyone, _ => Self::Other(s), } } } impl core::fmt::Display for ProfileAssociatedGermShowButtonTo { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{}", self.as_str()) } } impl AsRef for ProfileAssociatedGermShowButtonTo { fn as_ref(&self) -> &str { self.as_str() } } impl Serialize for ProfileAssociatedGermShowButtonTo { fn serialize(&self, serializer: Ser) -> Result where Ser: serde::Serializer, { serializer.serialize_str(self.as_str()) } } impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for ProfileAssociatedGermShowButtonTo { fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'de>, { let s = S::deserialize(deserializer)?; Ok(Self::from_value(s)) } } impl Default for ProfileAssociatedGermShowButtonTo { fn default() -> Self { Self::Other(Default::default()) } } impl jacquard_common::IntoStatic for ProfileAssociatedGermShowButtonTo where S: BosStr + jacquard_common::IntoStatic, S::Output: BosStr, { type Output = ProfileAssociatedGermShowButtonTo; fn into_static(self) -> Self::Output { match self { ProfileAssociatedGermShowButtonTo::UsersIFollow => { ProfileAssociatedGermShowButtonTo::UsersIFollow } ProfileAssociatedGermShowButtonTo::Everyone => { ProfileAssociatedGermShowButtonTo::Everyone } ProfileAssociatedGermShowButtonTo::Other(v) => { ProfileAssociatedGermShowButtonTo::Other(v.into_static()) } } } } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] #[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub struct ProfileView { #[serde(skip_serializing_if = "Option::is_none")] pub associated: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub avatar: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub created_at: Option, ///Debug information for internal development #[serde(skip_serializing_if = "Option::is_none")] pub debug: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, pub did: Did, #[serde(skip_serializing_if = "Option::is_none")] pub display_name: Option, pub handle: Handle, #[serde(skip_serializing_if = "Option::is_none")] pub indexed_at: Option, #[serde(skip_serializing_if = "Option::is_none")] pub labels: Option>>, #[serde(skip_serializing_if = "Option::is_none")] pub pronouns: Option, #[serde(skip_serializing_if = "Option::is_none")] pub status: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub verification: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub viewer: Option>, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] #[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub struct ProfileViewBasic { #[serde(skip_serializing_if = "Option::is_none")] pub associated: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub avatar: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub created_at: Option, ///Debug information for internal development #[serde(skip_serializing_if = "Option::is_none")] pub debug: Option>, pub did: Did, #[serde(skip_serializing_if = "Option::is_none")] pub display_name: Option, pub handle: Handle, #[serde(skip_serializing_if = "Option::is_none")] pub labels: Option>>, #[serde(skip_serializing_if = "Option::is_none")] pub pronouns: Option, #[serde(skip_serializing_if = "Option::is_none")] pub status: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub verification: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub viewer: Option>, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] #[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub struct ProfileViewDetailed { #[serde(skip_serializing_if = "Option::is_none")] pub associated: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub avatar: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub banner: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub created_at: Option, ///Debug information for internal development #[serde(skip_serializing_if = "Option::is_none")] pub debug: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, pub did: Did, #[serde(skip_serializing_if = "Option::is_none")] pub display_name: Option, #[serde(skip_serializing_if = "Option::is_none")] pub followers_count: Option, #[serde(skip_serializing_if = "Option::is_none")] pub follows_count: Option, pub handle: Handle, #[serde(skip_serializing_if = "Option::is_none")] pub indexed_at: Option, #[serde(skip_serializing_if = "Option::is_none")] pub joined_via_starter_pack: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub labels: Option>>, #[serde(skip_serializing_if = "Option::is_none")] pub pinned_post: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub posts_count: Option, #[serde(skip_serializing_if = "Option::is_none")] pub pronouns: Option, #[serde(skip_serializing_if = "Option::is_none")] pub status: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub verification: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub viewer: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub website: Option>, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] #[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub struct SavedFeed { pub id: S, pub pinned: bool, pub r#type: SavedFeedType, pub value: S, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum SavedFeedType { Feed, List, Timeline, Other(S), } impl SavedFeedType { pub fn as_str(&self) -> &str { match self { Self::Feed => "feed", Self::List => "list", Self::Timeline => "timeline", 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() { "feed" => Self::Feed, "list" => Self::List, "timeline" => Self::Timeline, _ => Self::Other(s), } } } impl core::fmt::Display for SavedFeedType { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{}", self.as_str()) } } impl AsRef for SavedFeedType { fn as_ref(&self) -> &str { self.as_str() } } impl Serialize for SavedFeedType { fn serialize(&self, serializer: Ser) -> Result where Ser: serde::Serializer, { serializer.serialize_str(self.as_str()) } } impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for SavedFeedType { fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'de>, { let s = S::deserialize(deserializer)?; Ok(Self::from_value(s)) } } impl Default for SavedFeedType { fn default() -> Self { Self::Other(Default::default()) } } impl jacquard_common::IntoStatic for SavedFeedType where S: BosStr + jacquard_common::IntoStatic, S::Output: BosStr, { type Output = SavedFeedType; fn into_static(self) -> Self::Output { match self { SavedFeedType::Feed => SavedFeedType::Feed, SavedFeedType::List => SavedFeedType::List, SavedFeedType::Timeline => SavedFeedType::Timeline, SavedFeedType::Other(v) => SavedFeedType::Other(v.into_static()), } } } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] #[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub struct SavedFeedsPref { pub pinned: Vec>, pub saved: Vec>, #[serde(skip_serializing_if = "Option::is_none")] pub timeline_index: Option, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] #[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub struct SavedFeedsPrefV2 { pub items: Vec>, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] #[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub struct StatusView { #[serde(skip_serializing_if = "Option::is_none")] pub cid: Option>, ///An optional embed associated with the status. #[serde(skip_serializing_if = "Option::is_none")] pub embed: Option>, ///The date when this status will expire. The application might choose to no longer return the status after expiration. #[serde(skip_serializing_if = "Option::is_none")] pub expires_at: Option, ///True if the status is not expired, false if it is expired. Only present if expiration was set. #[serde(skip_serializing_if = "Option::is_none")] pub is_active: Option, ///True if the user's go-live access has been disabled by a moderator, false otherwise. #[serde(skip_serializing_if = "Option::is_none")] pub is_disabled: Option, #[serde(skip_serializing_if = "Option::is_none")] pub labels: Option>>, pub record: Data, ///The status for the account. pub status: StatusViewStatus, #[serde(skip_serializing_if = "Option::is_none")] pub uri: Option>, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } /// The status for the account. #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum StatusViewStatus { Live, Other(S), } impl StatusViewStatus { pub fn as_str(&self) -> &str { match self { Self::Live => "app.bsky.actor.status#live", 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() { "app.bsky.actor.status#live" => Self::Live, _ => Self::Other(s), } } } impl core::fmt::Display for StatusViewStatus { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{}", self.as_str()) } } impl AsRef for StatusViewStatus { fn as_ref(&self) -> &str { self.as_str() } } impl Serialize for StatusViewStatus { fn serialize(&self, serializer: Ser) -> Result where Ser: serde::Serializer, { serializer.serialize_str(self.as_str()) } } impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for StatusViewStatus { fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'de>, { let s = S::deserialize(deserializer)?; Ok(Self::from_value(s)) } } impl Default for StatusViewStatus { fn default() -> Self { Self::Other(Default::default()) } } impl jacquard_common::IntoStatic for StatusViewStatus where S: BosStr + jacquard_common::IntoStatic, S::Output: BosStr, { type Output = StatusViewStatus; fn into_static(self) -> Self::Output { match self { StatusViewStatus::Live => StatusViewStatus::Live, StatusViewStatus::Other(v) => StatusViewStatus::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 ThreadViewPref { ///Sorting mode for threads. #[serde(skip_serializing_if = "Option::is_none")] pub sort: Option>, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } /// Sorting mode for threads. #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum ThreadViewPrefSort { Oldest, Newest, MostLikes, Random, Hotness, Other(S), } impl ThreadViewPrefSort { pub fn as_str(&self) -> &str { match self { Self::Oldest => "oldest", Self::Newest => "newest", Self::MostLikes => "most-likes", Self::Random => "random", Self::Hotness => "hotness", 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() { "oldest" => Self::Oldest, "newest" => Self::Newest, "most-likes" => Self::MostLikes, "random" => Self::Random, "hotness" => Self::Hotness, _ => Self::Other(s), } } } impl core::fmt::Display for ThreadViewPrefSort { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{}", self.as_str()) } } impl AsRef for ThreadViewPrefSort { fn as_ref(&self) -> &str { self.as_str() } } impl Serialize for ThreadViewPrefSort { fn serialize(&self, serializer: Ser) -> Result where Ser: serde::Serializer, { serializer.serialize_str(self.as_str()) } } impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for ThreadViewPrefSort { fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'de>, { let s = S::deserialize(deserializer)?; Ok(Self::from_value(s)) } } impl Default for ThreadViewPrefSort { fn default() -> Self { Self::Other(Default::default()) } } impl jacquard_common::IntoStatic for ThreadViewPrefSort where S: BosStr + jacquard_common::IntoStatic, S::Output: BosStr, { type Output = ThreadViewPrefSort; fn into_static(self) -> Self::Output { match self { ThreadViewPrefSort::Oldest => ThreadViewPrefSort::Oldest, ThreadViewPrefSort::Newest => ThreadViewPrefSort::Newest, ThreadViewPrefSort::MostLikes => ThreadViewPrefSort::MostLikes, ThreadViewPrefSort::Random => ThreadViewPrefSort::Random, ThreadViewPrefSort::Hotness => ThreadViewPrefSort::Hotness, ThreadViewPrefSort::Other(v) => ThreadViewPrefSort::Other(v.into_static()), } } } /// Preferences for how verified accounts appear in the app. #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] #[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub struct VerificationPrefs { ///Hide the blue check badges for verified accounts and trusted verifiers. Defaults to `false`. #[serde(skip_serializing_if = "Option::is_none")] #[serde(default = "_default_verification_prefs_hide_badges")] pub hide_badges: Option, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } /// Represents the verification information about the user this object is attached to. #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] #[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub struct VerificationState { ///The user's status as a trusted verifier. pub trusted_verifier_status: VerificationStateTrustedVerifierStatus, ///All verifications issued by trusted verifiers on behalf of this user. Verifications by untrusted verifiers are not included. pub verifications: Vec>, ///The user's status as a verified account. pub verified_status: VerificationStateVerifiedStatus, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } /// The user's status as a trusted verifier. #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum VerificationStateTrustedVerifierStatus { Valid, Invalid, None, Other(S), } impl VerificationStateTrustedVerifierStatus { pub fn as_str(&self) -> &str { match self { Self::Valid => "valid", Self::Invalid => "invalid", Self::None => "none", 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() { "valid" => Self::Valid, "invalid" => Self::Invalid, "none" => Self::None, _ => Self::Other(s), } } } impl core::fmt::Display for VerificationStateTrustedVerifierStatus { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{}", self.as_str()) } } impl AsRef for VerificationStateTrustedVerifierStatus { fn as_ref(&self) -> &str { self.as_str() } } impl Serialize for VerificationStateTrustedVerifierStatus { fn serialize(&self, serializer: Ser) -> Result where Ser: serde::Serializer, { serializer.serialize_str(self.as_str()) } } impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for VerificationStateTrustedVerifierStatus { fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'de>, { let s = S::deserialize(deserializer)?; Ok(Self::from_value(s)) } } impl Default for VerificationStateTrustedVerifierStatus { fn default() -> Self { Self::Other(Default::default()) } } impl jacquard_common::IntoStatic for VerificationStateTrustedVerifierStatus where S: BosStr + jacquard_common::IntoStatic, S::Output: BosStr, { type Output = VerificationStateTrustedVerifierStatus; fn into_static(self) -> Self::Output { match self { VerificationStateTrustedVerifierStatus::Valid => { VerificationStateTrustedVerifierStatus::Valid } VerificationStateTrustedVerifierStatus::Invalid => { VerificationStateTrustedVerifierStatus::Invalid } VerificationStateTrustedVerifierStatus::None => { VerificationStateTrustedVerifierStatus::None } VerificationStateTrustedVerifierStatus::Other(v) => { VerificationStateTrustedVerifierStatus::Other(v.into_static()) } } } } /// The user's status as a verified account. #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum VerificationStateVerifiedStatus { Valid, Invalid, None, Other(S), } impl VerificationStateVerifiedStatus { pub fn as_str(&self) -> &str { match self { Self::Valid => "valid", Self::Invalid => "invalid", Self::None => "none", 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() { "valid" => Self::Valid, "invalid" => Self::Invalid, "none" => Self::None, _ => Self::Other(s), } } } impl core::fmt::Display for VerificationStateVerifiedStatus { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{}", self.as_str()) } } impl AsRef for VerificationStateVerifiedStatus { fn as_ref(&self) -> &str { self.as_str() } } impl Serialize for VerificationStateVerifiedStatus { fn serialize(&self, serializer: Ser) -> Result where Ser: serde::Serializer, { serializer.serialize_str(self.as_str()) } } impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for VerificationStateVerifiedStatus { fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'de>, { let s = S::deserialize(deserializer)?; Ok(Self::from_value(s)) } } impl Default for VerificationStateVerifiedStatus { fn default() -> Self { Self::Other(Default::default()) } } impl jacquard_common::IntoStatic for VerificationStateVerifiedStatus where S: BosStr + jacquard_common::IntoStatic, S::Output: BosStr, { type Output = VerificationStateVerifiedStatus; fn into_static(self) -> Self::Output { match self { VerificationStateVerifiedStatus::Valid => { VerificationStateVerifiedStatus::Valid } VerificationStateVerifiedStatus::Invalid => { VerificationStateVerifiedStatus::Invalid } VerificationStateVerifiedStatus::None => { VerificationStateVerifiedStatus::None } VerificationStateVerifiedStatus::Other(v) => { VerificationStateVerifiedStatus::Other(v.into_static()) } } } } /// An individual verification for an associated subject. #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] #[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub struct VerificationView { ///Timestamp when the verification was created. pub created_at: Datetime, ///True if the verification passes validation, otherwise false. pub is_valid: bool, ///The user who issued this verification. pub issuer: Did, ///The display name of the issuer. #[serde(skip_serializing_if = "Option::is_none")] pub issuer_display_name: Option, ///The handle of the issuer. #[serde(skip_serializing_if = "Option::is_none")] pub issuer_handle: Option>, ///The AT-URI of the verification record. pub uri: AtUri, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } /// Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests. #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] #[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] pub struct ViewerState { ///This property is present only in selected cases, as an optimization. #[serde(skip_serializing_if = "Option::is_none")] pub activity_subscription: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub blocked_by: Option, #[serde(skip_serializing_if = "Option::is_none")] pub blocking: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub blocking_by_list: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub followed_by: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub following: Option>, ///This property is present only in selected cases, as an optimization. #[serde(skip_serializing_if = "Option::is_none")] pub known_followers: Option>, ///Whether the account is fully muted, directly or via a mutelist. False when the mute is scoped to specific kinds; see mutedOnlyReposts and mutedOnlyQuoteposts. #[serde(skip_serializing_if = "Option::is_none")] pub muted: Option, #[serde(skip_serializing_if = "Option::is_none")] pub muted_by_list: Option>, ///Whether the account's quote posts are muted. Scoped mutes are exclusive with muted: this can be true while muted is false. If muted is true, this will be false. #[serde(skip_serializing_if = "Option::is_none")] pub muted_only_quoteposts: Option, ///Whether the account's reposts are muted. Scoped mutes are exclusive with muted: this can be true while muted is false. If muted is true, this will be false. #[serde(skip_serializing_if = "Option::is_none")] pub muted_only_reposts: Option, #[serde(flatten, default, skip_serializing_if = "Option::is_none")] pub extra_data: Option>>, } impl LexiconSchema for AdultContentPref { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "adultContentPref" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { Ok(()) } } impl LexiconSchema for BskyAppProgressGuide { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "bskyAppProgressGuide" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { { let value = &self.guide; #[allow(unused_comparisons)] if ::len(value.as_ref()) > 100usize { return Err(ConstraintError::MaxLength { path: ValidationPath::from_field("guide"), max: 100usize, actual: ::len(value.as_ref()), }); } } Ok(()) } } impl LexiconSchema for BskyAppStatePref { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "bskyAppStatePref" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { if let Some(ref value) = self.nuxs { #[allow(unused_comparisons)] if value.len() > 100usize { return Err(ConstraintError::MaxLength { path: ValidationPath::from_field("nuxs"), max: 100usize, actual: value.len(), }); } } if let Some(ref value) = self.queued_nudges { #[allow(unused_comparisons)] if value.len() > 1000usize { return Err(ConstraintError::MaxLength { path: ValidationPath::from_field("queued_nudges"), max: 1000usize, actual: value.len(), }); } } if let Some(values) = &self.queued_nudges { for value in values { #[allow(unused_comparisons)] if ::len(value.as_ref()) > 100usize { return Err(ConstraintError::MaxLength { path: ValidationPath::from_field("queued_nudges"), max: 100usize, actual: ::len(value.as_ref()), }); } } } Ok(()) } } impl LexiconSchema for ContentLabelPref { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "contentLabelPref" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { Ok(()) } } impl LexiconSchema for DeclaredAgePref { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "declaredAgePref" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { Ok(()) } } impl LexiconSchema for FeedViewPref { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "feedViewPref" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { Ok(()) } } impl LexiconSchema for HiddenPostsPref { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "hiddenPostsPref" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { Ok(()) } } impl LexiconSchema for InterestsPref { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "interestsPref" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { { let value = &self.tags; #[allow(unused_comparisons)] if value.len() > 100usize { return Err(ConstraintError::MaxLength { path: ValidationPath::from_field("tags"), max: 100usize, actual: value.len(), }); } } for value in &self.tags { #[allow(unused_comparisons)] if ::len(value.as_ref()) > 640usize { return Err(ConstraintError::MaxLength { path: ValidationPath::from_field("tags"), max: 640usize, actual: ::len(value.as_ref()), }); } } for value in &self.tags { { let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); if count > 64usize { return Err(ConstraintError::MaxGraphemes { path: ValidationPath::from_field("tags"), max: 64usize, actual: count, }); } } } Ok(()) } } impl LexiconSchema for KnownFollowers { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "knownFollowers" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { { let value = &self.followers; #[allow(unused_comparisons)] if value.len() > 5usize { return Err(ConstraintError::MaxLength { path: ValidationPath::from_field("followers"), max: 5usize, actual: value.len(), }); } } { let value = &self.followers; #[allow(unused_comparisons)] if value.len() < 0usize { return Err(ConstraintError::MinLength { path: ValidationPath::from_field("followers"), min: 0usize, actual: value.len(), }); } } Ok(()) } } impl LexiconSchema for LabelerPrefItem { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "labelerPrefItem" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { Ok(()) } } impl LexiconSchema for LabelersPref { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "labelersPref" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { Ok(()) } } impl LexiconSchema for LiveEventPreferences { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "liveEventPreferences" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { Ok(()) } } impl LexiconSchema for MutedWord { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "mutedWord" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { for value in &self.targets { #[allow(unused_comparisons)] if ::len(value.as_ref()) > 640usize { return Err(ConstraintError::MaxLength { path: ValidationPath::from_field("targets"), max: 640usize, actual: ::len(value.as_ref()), }); } } for value in &self.targets { { let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); if count > 64usize { return Err(ConstraintError::MaxGraphemes { path: ValidationPath::from_field("targets"), max: 64usize, actual: count, }); } } } { let value = &self.value; #[allow(unused_comparisons)] if ::len(value.as_ref()) > 10000usize { return Err(ConstraintError::MaxLength { path: ValidationPath::from_field("value"), max: 10000usize, actual: ::len(value.as_ref()), }); } } { let value = &self.value; { let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); if count > 1000usize { return Err(ConstraintError::MaxGraphemes { path: ValidationPath::from_field("value"), max: 1000usize, actual: count, }); } } } Ok(()) } } impl LexiconSchema for MutedWordsPref { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "mutedWordsPref" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { Ok(()) } } impl LexiconSchema for Nux { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "nux" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { if let Some(ref value) = self.data { #[allow(unused_comparisons)] if ::len(value.as_ref()) > 3000usize { return Err(ConstraintError::MaxLength { path: ValidationPath::from_field("data"), max: 3000usize, actual: ::len(value.as_ref()), }); } } if let Some(ref value) = self.data { { let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); if count > 300usize { return Err(ConstraintError::MaxGraphemes { path: ValidationPath::from_field("data"), max: 300usize, actual: count, }); } } } { let value = &self.id; #[allow(unused_comparisons)] if ::len(value.as_ref()) > 100usize { return Err(ConstraintError::MaxLength { path: ValidationPath::from_field("id"), max: 100usize, actual: ::len(value.as_ref()), }); } } Ok(()) } } impl LexiconSchema for PersonalDetailsPref { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "personalDetailsPref" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { Ok(()) } } impl LexiconSchema for PostInteractionSettingsPref { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "postInteractionSettingsPref" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { if let Some(ref value) = self.postgate_embedding_rules { #[allow(unused_comparisons)] if value.len() > 5usize { return Err(ConstraintError::MaxLength { path: ValidationPath::from_field("postgate_embedding_rules"), max: 5usize, actual: value.len(), }); } } if let Some(ref value) = self.threadgate_allow_rules { #[allow(unused_comparisons)] if value.len() > 5usize { return Err(ConstraintError::MaxLength { path: ValidationPath::from_field("threadgate_allow_rules"), max: 5usize, actual: value.len(), }); } } Ok(()) } } impl LexiconSchema for ProfileAssociated { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "profileAssociated" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { Ok(()) } } impl LexiconSchema for ProfileAssociatedActivitySubscription { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "profileAssociatedActivitySubscription" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { Ok(()) } } impl LexiconSchema for ProfileAssociatedChat { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "profileAssociatedChat" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { Ok(()) } } impl LexiconSchema for ProfileAssociatedGerm { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "profileAssociatedGerm" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { Ok(()) } } impl LexiconSchema for ProfileView { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "profileView" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { if let Some(ref value) = self.description { #[allow(unused_comparisons)] if ::len(value.as_ref()) > 2560usize { return Err(ConstraintError::MaxLength { path: ValidationPath::from_field("description"), max: 2560usize, actual: ::len(value.as_ref()), }); } } if let Some(ref value) = self.description { { let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); if count > 256usize { return Err(ConstraintError::MaxGraphemes { path: ValidationPath::from_field("description"), max: 256usize, actual: count, }); } } } if let Some(ref value) = self.display_name { #[allow(unused_comparisons)] if ::len(value.as_ref()) > 640usize { return Err(ConstraintError::MaxLength { path: ValidationPath::from_field("display_name"), max: 640usize, actual: ::len(value.as_ref()), }); } } if let Some(ref value) = self.display_name { { let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); if count > 64usize { return Err(ConstraintError::MaxGraphemes { path: ValidationPath::from_field("display_name"), max: 64usize, actual: count, }); } } } Ok(()) } } impl LexiconSchema for ProfileViewBasic { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "profileViewBasic" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { if let Some(ref value) = self.display_name { #[allow(unused_comparisons)] if ::len(value.as_ref()) > 640usize { return Err(ConstraintError::MaxLength { path: ValidationPath::from_field("display_name"), max: 640usize, actual: ::len(value.as_ref()), }); } } if let Some(ref value) = self.display_name { { let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); if count > 64usize { return Err(ConstraintError::MaxGraphemes { path: ValidationPath::from_field("display_name"), max: 64usize, actual: count, }); } } } Ok(()) } } impl LexiconSchema for ProfileViewDetailed { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "profileViewDetailed" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { if let Some(ref value) = self.description { #[allow(unused_comparisons)] if ::len(value.as_ref()) > 2560usize { return Err(ConstraintError::MaxLength { path: ValidationPath::from_field("description"), max: 2560usize, actual: ::len(value.as_ref()), }); } } if let Some(ref value) = self.description { { let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); if count > 256usize { return Err(ConstraintError::MaxGraphemes { path: ValidationPath::from_field("description"), max: 256usize, actual: count, }); } } } if let Some(ref value) = self.display_name { #[allow(unused_comparisons)] if ::len(value.as_ref()) > 640usize { return Err(ConstraintError::MaxLength { path: ValidationPath::from_field("display_name"), max: 640usize, actual: ::len(value.as_ref()), }); } } if let Some(ref value) = self.display_name { { let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); if count > 64usize { return Err(ConstraintError::MaxGraphemes { path: ValidationPath::from_field("display_name"), max: 64usize, actual: count, }); } } } Ok(()) } } impl LexiconSchema for SavedFeed { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "savedFeed" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { Ok(()) } } impl LexiconSchema for SavedFeedsPref { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "savedFeedsPref" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { Ok(()) } } impl LexiconSchema for SavedFeedsPrefV2 { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "savedFeedsPrefV2" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { Ok(()) } } impl LexiconSchema for StatusView { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "statusView" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { Ok(()) } } impl LexiconSchema for ThreadViewPref { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "threadViewPref" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { Ok(()) } } impl LexiconSchema for VerificationPrefs { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "verificationPrefs" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { Ok(()) } } impl LexiconSchema for VerificationState { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "verificationState" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { Ok(()) } } impl LexiconSchema for VerificationView { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "verificationView" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { Ok(()) } } impl LexiconSchema for ViewerState { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "viewerState" } fn lexicon_doc() -> LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate(&self) -> Result<(), ConstraintError> { Ok(()) } } fn _default_adult_content_pref_enabled() -> bool { false } impl Default for AdultContentPref { fn default() -> Self { Self { enabled: false, extra_data: Default::default(), } } } pub mod adult_content_pref_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 Enabled; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Enabled = Unset; } ///State transition - sets the `enabled` field to Set pub struct SetEnabled(PhantomData St>); impl sealed::Sealed for SetEnabled {} impl State for SetEnabled { type Enabled = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `enabled` field pub struct enabled(()); } } /// Builder for constructing an instance of this type. pub struct AdultContentPrefBuilder< St: adult_content_pref_state::State, S: BosStr = DefaultStr, > { _state: PhantomData St>, _fields: (Option,), _type: PhantomData S>, } impl AdultContentPref { /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed pub fn new() -> AdultContentPrefBuilder< adult_content_pref_state::Empty, DefaultStr, > { AdultContentPrefBuilder::new() } } impl AdultContentPref { /// Create a new builder for this type pub fn builder() -> AdultContentPrefBuilder { AdultContentPrefBuilder::builder() } } impl AdultContentPrefBuilder { /// Create a new builder with all fields unset, using the default string type, if needed pub fn new() -> Self { AdultContentPrefBuilder { _state: PhantomData, _fields: (None,), _type: PhantomData, } } } impl AdultContentPrefBuilder { /// Create a new builder with all fields unset pub fn builder() -> Self { AdultContentPrefBuilder { _state: PhantomData, _fields: (None,), _type: PhantomData, } } } impl AdultContentPrefBuilder where St: adult_content_pref_state::State, St::Enabled: adult_content_pref_state::IsUnset, { /// Set the `enabled` field (required) pub fn enabled( mut self, value: impl Into, ) -> AdultContentPrefBuilder, S> { self._fields.0 = Option::Some(value.into()); AdultContentPrefBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl AdultContentPrefBuilder where St: adult_content_pref_state::State, St::Enabled: adult_content_pref_state::IsSet, { /// Build the final struct. pub fn build(self) -> AdultContentPref { AdultContentPref { enabled: 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>, ) -> AdultContentPref { AdultContentPref { enabled: self._fields.0.unwrap(), extra_data: Some(extra_data), } } } fn lexicon_doc_app_bsky_actor_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.actor.defs"), defs: { let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("adultContentPref"), LexUserType::Object(LexObject { required: Some(vec![SmolStr::new_static("enabled")]), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("enabled"), LexObjectProperty::Boolean(LexBoolean { ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("bskyAppProgressGuide"), LexUserType::Object(LexObject { description: Some( CowStr::new_static( "If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress.", ), ), required: Some(vec![SmolStr::new_static("guide")]), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("guide"), LexObjectProperty::String(LexString { max_length: Some(100usize), ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("bskyAppStatePref"), LexUserType::Object(LexObject { description: Some( CowStr::new_static( "A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this.", ), ), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("activeProgressGuide"), LexObjectProperty::Ref(LexRef { r#ref: CowStr::new_static("#bskyAppProgressGuide"), ..Default::default() }), ); map.insert( SmolStr::new_static("isBetaUser"), LexObjectProperty::Boolean(LexBoolean { ..Default::default() }), ); map.insert( SmolStr::new_static("nuxs"), LexObjectProperty::Array(LexArray { description: Some( CowStr::new_static( "Storage for NUXs the user has encountered.", ), ), items: LexArrayItem::Ref(LexRef { r#ref: CowStr::new_static("app.bsky.actor.defs#nux"), ..Default::default() }), max_length: Some(100usize), ..Default::default() }), ); map.insert( SmolStr::new_static("queuedNudges"), LexObjectProperty::Array(LexArray { description: Some( CowStr::new_static( "An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user.", ), ), items: LexArrayItem::String(LexString { max_length: Some(100usize), ..Default::default() }), max_length: Some(1000usize), ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("contentLabelPref"), LexUserType::Object(LexObject { required: Some( vec![ SmolStr::new_static("label"), SmolStr::new_static("visibility") ], ), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("label"), LexObjectProperty::String(LexString { ..Default::default() }), ); map.insert( SmolStr::new_static("labelerDid"), LexObjectProperty::String(LexString { description: Some( CowStr::new_static( "Which labeler does this preference apply to? If undefined, applies globally.", ), ), format: Some(LexStringFormat::Did), ..Default::default() }), ); map.insert( SmolStr::new_static("visibility"), LexObjectProperty::String(LexString { ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("declaredAgePref"), LexUserType::Object(LexObject { description: Some( CowStr::new_static( "Read-only preference containing value(s) inferred from the user's declared birthdate. Absence of this preference object in the response indicates that the user has not made a declaration.", ), ), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("isOverAge13"), LexObjectProperty::Boolean(LexBoolean { ..Default::default() }), ); map.insert( SmolStr::new_static("isOverAge16"), LexObjectProperty::Boolean(LexBoolean { ..Default::default() }), ); map.insert( SmolStr::new_static("isOverAge18"), LexObjectProperty::Boolean(LexBoolean { ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("feedViewPref"), LexUserType::Object(LexObject { required: Some(vec![SmolStr::new_static("feed")]), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("feed"), LexObjectProperty::String(LexString { description: Some( CowStr::new_static( "The URI of the feed, or an identifier which describes the feed.", ), ), ..Default::default() }), ); map.insert( SmolStr::new_static("hideQuotePosts"), LexObjectProperty::Boolean(LexBoolean { ..Default::default() }), ); map.insert( SmolStr::new_static("hideReplies"), LexObjectProperty::Boolean(LexBoolean { ..Default::default() }), ); map.insert( SmolStr::new_static("hideRepliesByLikeCount"), LexObjectProperty::Integer(LexInteger { ..Default::default() }), ); map.insert( SmolStr::new_static("hideRepliesByUnfollowed"), LexObjectProperty::Boolean(LexBoolean { ..Default::default() }), ); map.insert( SmolStr::new_static("hideReposts"), LexObjectProperty::Boolean(LexBoolean { ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("hiddenPostsPref"), LexUserType::Object(LexObject { required: Some(vec![SmolStr::new_static("items")]), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("items"), LexObjectProperty::Array(LexArray { description: Some( CowStr::new_static( "A list of URIs of posts the account owner has hidden.", ), ), items: LexArrayItem::String(LexString { format: Some(LexStringFormat::AtUri), ..Default::default() }), ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("interestsPref"), LexUserType::Object(LexObject { required: Some(vec![SmolStr::new_static("tags")]), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("tags"), LexObjectProperty::Array(LexArray { description: Some( CowStr::new_static( "A list of tags which describe the account owner's interests gathered during onboarding.", ), ), items: LexArrayItem::String(LexString { max_length: Some(640usize), max_graphemes: Some(64usize), ..Default::default() }), max_length: Some(100usize), ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("knownFollowers"), LexUserType::Object(LexObject { description: Some( CowStr::new_static( "The subject's followers whom you also follow", ), ), required: Some( vec![ SmolStr::new_static("count"), SmolStr::new_static("followers") ], ), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("count"), LexObjectProperty::Integer(LexInteger { ..Default::default() }), ); map.insert( SmolStr::new_static("followers"), LexObjectProperty::Array(LexArray { items: LexArrayItem::Ref(LexRef { r#ref: CowStr::new_static("#profileViewBasic"), ..Default::default() }), min_length: Some(0usize), max_length: Some(5usize), ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("labelerPrefItem"), 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("labelersPref"), LexUserType::Object(LexObject { required: Some(vec![SmolStr::new_static("labelers")]), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("labelers"), LexObjectProperty::Array(LexArray { items: LexArrayItem::Ref(LexRef { r#ref: CowStr::new_static("#labelerPrefItem"), ..Default::default() }), ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("liveEventPreferences"), LexUserType::Object(LexObject { description: Some( CowStr::new_static("Preferences for live events."), ), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("hiddenFeedIds"), LexObjectProperty::Array(LexArray { description: Some( CowStr::new_static( "A list of feed IDs that the user has hidden from live events.", ), ), items: LexArrayItem::String(LexString { ..Default::default() }), ..Default::default() }), ); map.insert( SmolStr::new_static("hideAllFeeds"), LexObjectProperty::Boolean(LexBoolean { ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("mutedWord"), LexUserType::Object(LexObject { description: Some( CowStr::new_static("A word that the account owner has muted."), ), required: Some( vec![ SmolStr::new_static("value"), SmolStr::new_static("targets") ], ), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("actorTarget"), LexObjectProperty::String(LexString { description: Some( CowStr::new_static( "Groups of users to apply the muted word to. If undefined, applies to all users.", ), ), ..Default::default() }), ); map.insert( SmolStr::new_static("expiresAt"), LexObjectProperty::String(LexString { description: Some( CowStr::new_static( "The date and time at which the muted word will expire and no longer be applied.", ), ), format: Some(LexStringFormat::Datetime), ..Default::default() }), ); map.insert( SmolStr::new_static("id"), LexObjectProperty::String(LexString { ..Default::default() }), ); map.insert( SmolStr::new_static("targets"), LexObjectProperty::Array(LexArray { description: Some( CowStr::new_static( "The intended targets of the muted word.", ), ), items: LexArrayItem::Ref(LexRef { r#ref: CowStr::new_static( "app.bsky.actor.defs#mutedWordTarget", ), ..Default::default() }), ..Default::default() }), ); map.insert( SmolStr::new_static("value"), LexObjectProperty::String(LexString { description: Some( CowStr::new_static("The muted word itself."), ), max_length: Some(10000usize), max_graphemes: Some(1000usize), ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("mutedWordTarget"), LexUserType::String(LexString { max_length: Some(640usize), max_graphemes: Some(64usize), ..Default::default() }), ); map.insert( SmolStr::new_static("mutedWordsPref"), LexUserType::Object(LexObject { required: Some(vec![SmolStr::new_static("items")]), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("items"), LexObjectProperty::Array(LexArray { description: Some( CowStr::new_static( "A list of words the account owner has muted.", ), ), items: LexArrayItem::Ref(LexRef { r#ref: CowStr::new_static("app.bsky.actor.defs#mutedWord"), ..Default::default() }), ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("nux"), LexUserType::Object(LexObject { description: Some( CowStr::new_static("A new user experiences (NUX) storage object"), ), required: Some( vec![SmolStr::new_static("id"), SmolStr::new_static("completed")], ), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("completed"), LexObjectProperty::Boolean(LexBoolean { ..Default::default() }), ); map.insert( SmolStr::new_static("data"), LexObjectProperty::String(LexString { description: Some( CowStr::new_static( "Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters.", ), ), max_length: Some(3000usize), max_graphemes: Some(300usize), ..Default::default() }), ); map.insert( SmolStr::new_static("expiresAt"), LexObjectProperty::String(LexString { description: Some( CowStr::new_static( "The date and time at which the NUX will expire and should be considered completed.", ), ), format: Some(LexStringFormat::Datetime), ..Default::default() }), ); map.insert( SmolStr::new_static("id"), LexObjectProperty::String(LexString { max_length: Some(100usize), ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("personalDetailsPref"), LexUserType::Object(LexObject { properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("birthDate"), LexObjectProperty::String(LexString { description: Some( CowStr::new_static("The birth date of account owner."), ), format: Some(LexStringFormat::Datetime), ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("postInteractionSettingsPref"), LexUserType::Object(LexObject { description: Some( CowStr::new_static( "Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly.", ), ), required: Some(vec![]), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("postgateEmbeddingRules"), LexObjectProperty::Array(LexArray { description: Some( CowStr::new_static( "Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed.", ), ), items: LexArrayItem::Union(LexRefUnion { refs: vec![ CowStr::new_static("app.bsky.feed.postgate#disableRule") ], ..Default::default() }), max_length: Some(5usize), ..Default::default() }), ); map.insert( SmolStr::new_static("threadgateAllowRules"), LexObjectProperty::Array(LexArray { description: Some( CowStr::new_static( "Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply.", ), ), items: LexArrayItem::Union(LexRefUnion { refs: vec![ CowStr::new_static("app.bsky.feed.threadgate#mentionRule"), CowStr::new_static("app.bsky.feed.threadgate#followerRule"), CowStr::new_static("app.bsky.feed.threadgate#followingRule"), CowStr::new_static("app.bsky.feed.threadgate#listRule") ], ..Default::default() }), max_length: Some(5usize), ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("preferences"), LexUserType::Array(LexArray { items: LexArrayItem::Union(LexRefUnion { refs: vec![ CowStr::new_static("#adultContentPref"), CowStr::new_static("#contentLabelPref"), CowStr::new_static("#savedFeedsPref"), CowStr::new_static("#savedFeedsPrefV2"), CowStr::new_static("#personalDetailsPref"), CowStr::new_static("#declaredAgePref"), CowStr::new_static("#feedViewPref"), CowStr::new_static("#threadViewPref"), CowStr::new_static("#interestsPref"), CowStr::new_static("#mutedWordsPref"), CowStr::new_static("#hiddenPostsPref"), CowStr::new_static("#bskyAppStatePref"), CowStr::new_static("#labelersPref"), CowStr::new_static("#postInteractionSettingsPref"), CowStr::new_static("#verificationPrefs"), CowStr::new_static("#liveEventPreferences") ], ..Default::default() }), ..Default::default() }), ); map.insert( SmolStr::new_static("profileAssociated"), LexUserType::Object(LexObject { properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("activitySubscription"), LexObjectProperty::Ref(LexRef { r#ref: CowStr::new_static( "#profileAssociatedActivitySubscription", ), ..Default::default() }), ); map.insert( SmolStr::new_static("chat"), LexObjectProperty::Ref(LexRef { r#ref: CowStr::new_static("#profileAssociatedChat"), ..Default::default() }), ); map.insert( SmolStr::new_static("feedgens"), LexObjectProperty::Integer(LexInteger { ..Default::default() }), ); map.insert( SmolStr::new_static("germ"), LexObjectProperty::Ref(LexRef { r#ref: CowStr::new_static("#profileAssociatedGerm"), ..Default::default() }), ); map.insert( SmolStr::new_static("labeler"), LexObjectProperty::Boolean(LexBoolean { ..Default::default() }), ); map.insert( SmolStr::new_static("lists"), LexObjectProperty::Integer(LexInteger { ..Default::default() }), ); map.insert( SmolStr::new_static("starterPacks"), LexObjectProperty::Integer(LexInteger { ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("profileAssociatedActivitySubscription"), LexUserType::Object(LexObject { required: Some(vec![SmolStr::new_static("allowSubscriptions")]), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("allowSubscriptions"), LexObjectProperty::String(LexString { ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("profileAssociatedChat"), LexUserType::Object(LexObject { required: Some(vec![SmolStr::new_static("allowIncoming")]), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("allowGroupInvites"), LexObjectProperty::String(LexString { ..Default::default() }), ); map.insert( SmolStr::new_static("allowIncoming"), LexObjectProperty::String(LexString { ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("profileAssociatedGerm"), LexUserType::Object(LexObject { required: Some( vec![ SmolStr::new_static("showButtonTo"), SmolStr::new_static("messageMeUrl") ], ), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("messageMeUrl"), LexObjectProperty::String(LexString { format: Some(LexStringFormat::Uri), ..Default::default() }), ); map.insert( SmolStr::new_static("showButtonTo"), LexObjectProperty::String(LexString { ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("profileView"), LexUserType::Object(LexObject { required: Some( vec![SmolStr::new_static("did"), SmolStr::new_static("handle")], ), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("associated"), LexObjectProperty::Ref(LexRef { r#ref: CowStr::new_static("#profileAssociated"), ..Default::default() }), ); map.insert( SmolStr::new_static("avatar"), LexObjectProperty::String(LexString { format: Some(LexStringFormat::Uri), ..Default::default() }), ); map.insert( SmolStr::new_static("createdAt"), LexObjectProperty::String(LexString { format: Some(LexStringFormat::Datetime), ..Default::default() }), ); map.insert( SmolStr::new_static("debug"), LexObjectProperty::Unknown(LexUnknown { ..Default::default() }), ); map.insert( SmolStr::new_static("description"), LexObjectProperty::String(LexString { max_length: Some(2560usize), max_graphemes: Some(256usize), ..Default::default() }), ); map.insert( SmolStr::new_static("did"), LexObjectProperty::String(LexString { format: Some(LexStringFormat::Did), ..Default::default() }), ); map.insert( SmolStr::new_static("displayName"), LexObjectProperty::String(LexString { max_length: Some(640usize), max_graphemes: Some(64usize), ..Default::default() }), ); map.insert( SmolStr::new_static("handle"), LexObjectProperty::String(LexString { format: Some(LexStringFormat::Handle), ..Default::default() }), ); map.insert( SmolStr::new_static("indexedAt"), LexObjectProperty::String(LexString { format: Some(LexStringFormat::Datetime), ..Default::default() }), ); map.insert( SmolStr::new_static("labels"), LexObjectProperty::Array(LexArray { items: LexArrayItem::Ref(LexRef { r#ref: CowStr::new_static("com.atproto.label.defs#label"), ..Default::default() }), ..Default::default() }), ); map.insert( SmolStr::new_static("pronouns"), LexObjectProperty::String(LexString { ..Default::default() }), ); map.insert( SmolStr::new_static("status"), LexObjectProperty::Ref(LexRef { r#ref: CowStr::new_static("#statusView"), ..Default::default() }), ); map.insert( SmolStr::new_static("verification"), LexObjectProperty::Ref(LexRef { r#ref: CowStr::new_static("#verificationState"), ..Default::default() }), ); map.insert( SmolStr::new_static("viewer"), LexObjectProperty::Ref(LexRef { r#ref: CowStr::new_static("#viewerState"), ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("profileViewBasic"), LexUserType::Object(LexObject { required: Some( vec![SmolStr::new_static("did"), SmolStr::new_static("handle")], ), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("associated"), LexObjectProperty::Ref(LexRef { r#ref: CowStr::new_static("#profileAssociated"), ..Default::default() }), ); map.insert( SmolStr::new_static("avatar"), LexObjectProperty::String(LexString { format: Some(LexStringFormat::Uri), ..Default::default() }), ); map.insert( SmolStr::new_static("createdAt"), LexObjectProperty::String(LexString { format: Some(LexStringFormat::Datetime), ..Default::default() }), ); map.insert( SmolStr::new_static("debug"), LexObjectProperty::Unknown(LexUnknown { ..Default::default() }), ); map.insert( SmolStr::new_static("did"), LexObjectProperty::String(LexString { format: Some(LexStringFormat::Did), ..Default::default() }), ); map.insert( SmolStr::new_static("displayName"), LexObjectProperty::String(LexString { max_length: Some(640usize), max_graphemes: Some(64usize), ..Default::default() }), ); map.insert( SmolStr::new_static("handle"), LexObjectProperty::String(LexString { format: Some(LexStringFormat::Handle), ..Default::default() }), ); map.insert( SmolStr::new_static("labels"), LexObjectProperty::Array(LexArray { items: LexArrayItem::Ref(LexRef { r#ref: CowStr::new_static("com.atproto.label.defs#label"), ..Default::default() }), ..Default::default() }), ); map.insert( SmolStr::new_static("pronouns"), LexObjectProperty::String(LexString { ..Default::default() }), ); map.insert( SmolStr::new_static("status"), LexObjectProperty::Ref(LexRef { r#ref: CowStr::new_static("#statusView"), ..Default::default() }), ); map.insert( SmolStr::new_static("verification"), LexObjectProperty::Ref(LexRef { r#ref: CowStr::new_static("#verificationState"), ..Default::default() }), ); map.insert( SmolStr::new_static("viewer"), LexObjectProperty::Ref(LexRef { r#ref: CowStr::new_static("#viewerState"), ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("profileViewDetailed"), LexUserType::Object(LexObject { required: Some( vec![SmolStr::new_static("did"), SmolStr::new_static("handle")], ), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("associated"), LexObjectProperty::Ref(LexRef { r#ref: CowStr::new_static("#profileAssociated"), ..Default::default() }), ); map.insert( SmolStr::new_static("avatar"), LexObjectProperty::String(LexString { format: Some(LexStringFormat::Uri), ..Default::default() }), ); map.insert( SmolStr::new_static("banner"), LexObjectProperty::String(LexString { format: Some(LexStringFormat::Uri), ..Default::default() }), ); map.insert( SmolStr::new_static("createdAt"), LexObjectProperty::String(LexString { format: Some(LexStringFormat::Datetime), ..Default::default() }), ); map.insert( SmolStr::new_static("debug"), LexObjectProperty::Unknown(LexUnknown { ..Default::default() }), ); map.insert( SmolStr::new_static("description"), LexObjectProperty::String(LexString { max_length: Some(2560usize), max_graphemes: Some(256usize), ..Default::default() }), ); map.insert( SmolStr::new_static("did"), LexObjectProperty::String(LexString { format: Some(LexStringFormat::Did), ..Default::default() }), ); map.insert( SmolStr::new_static("displayName"), LexObjectProperty::String(LexString { max_length: Some(640usize), max_graphemes: Some(64usize), ..Default::default() }), ); map.insert( SmolStr::new_static("followersCount"), LexObjectProperty::Integer(LexInteger { ..Default::default() }), ); map.insert( SmolStr::new_static("followsCount"), LexObjectProperty::Integer(LexInteger { ..Default::default() }), ); map.insert( SmolStr::new_static("handle"), LexObjectProperty::String(LexString { format: Some(LexStringFormat::Handle), ..Default::default() }), ); map.insert( SmolStr::new_static("indexedAt"), LexObjectProperty::String(LexString { format: Some(LexStringFormat::Datetime), ..Default::default() }), ); map.insert( SmolStr::new_static("joinedViaStarterPack"), LexObjectProperty::Ref(LexRef { r#ref: CowStr::new_static( "app.bsky.graph.defs#starterPackViewBasic", ), ..Default::default() }), ); map.insert( SmolStr::new_static("labels"), LexObjectProperty::Array(LexArray { items: LexArrayItem::Ref(LexRef { r#ref: CowStr::new_static("com.atproto.label.defs#label"), ..Default::default() }), ..Default::default() }), ); map.insert( SmolStr::new_static("pinnedPost"), LexObjectProperty::Ref(LexRef { r#ref: CowStr::new_static("com.atproto.repo.strongRef"), ..Default::default() }), ); map.insert( SmolStr::new_static("postsCount"), LexObjectProperty::Integer(LexInteger { ..Default::default() }), ); map.insert( SmolStr::new_static("pronouns"), LexObjectProperty::String(LexString { ..Default::default() }), ); map.insert( SmolStr::new_static("status"), LexObjectProperty::Ref(LexRef { r#ref: CowStr::new_static("#statusView"), ..Default::default() }), ); map.insert( SmolStr::new_static("verification"), LexObjectProperty::Ref(LexRef { r#ref: CowStr::new_static("#verificationState"), ..Default::default() }), ); map.insert( SmolStr::new_static("viewer"), LexObjectProperty::Ref(LexRef { r#ref: CowStr::new_static("#viewerState"), ..Default::default() }), ); map.insert( SmolStr::new_static("website"), LexObjectProperty::String(LexString { format: Some(LexStringFormat::Uri), ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("savedFeed"), LexUserType::Object(LexObject { required: Some( vec![ SmolStr::new_static("id"), SmolStr::new_static("type"), SmolStr::new_static("value"), SmolStr::new_static("pinned") ], ), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("id"), LexObjectProperty::String(LexString { ..Default::default() }), ); map.insert( SmolStr::new_static("pinned"), LexObjectProperty::Boolean(LexBoolean { ..Default::default() }), ); map.insert( SmolStr::new_static("type"), LexObjectProperty::String(LexString { ..Default::default() }), ); map.insert( SmolStr::new_static("value"), LexObjectProperty::String(LexString { ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("savedFeedsPref"), LexUserType::Object(LexObject { required: Some( vec![SmolStr::new_static("pinned"), SmolStr::new_static("saved")], ), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("pinned"), LexObjectProperty::Array(LexArray { items: LexArrayItem::String(LexString { format: Some(LexStringFormat::AtUri), ..Default::default() }), ..Default::default() }), ); map.insert( SmolStr::new_static("saved"), LexObjectProperty::Array(LexArray { items: LexArrayItem::String(LexString { format: Some(LexStringFormat::AtUri), ..Default::default() }), ..Default::default() }), ); map.insert( SmolStr::new_static("timelineIndex"), LexObjectProperty::Integer(LexInteger { ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("savedFeedsPrefV2"), LexUserType::Object(LexObject { required: Some(vec![SmolStr::new_static("items")]), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("items"), LexObjectProperty::Array(LexArray { items: LexArrayItem::Ref(LexRef { r#ref: CowStr::new_static("app.bsky.actor.defs#savedFeed"), ..Default::default() }), ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("statusView"), LexUserType::Object(LexObject { required: Some( vec![ SmolStr::new_static("status"), SmolStr::new_static("record") ], ), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("cid"), LexObjectProperty::String(LexString { format: Some(LexStringFormat::Cid), ..Default::default() }), ); map.insert( SmolStr::new_static("embed"), LexObjectProperty::Union(LexRefUnion { description: Some( CowStr::new_static( "An optional embed associated with the status.", ), ), refs: vec![ CowStr::new_static("app.bsky.embed.external#view") ], ..Default::default() }), ); map.insert( SmolStr::new_static("expiresAt"), LexObjectProperty::String(LexString { description: Some( CowStr::new_static( "The date when this status will expire. The application might choose to no longer return the status after expiration.", ), ), format: Some(LexStringFormat::Datetime), ..Default::default() }), ); map.insert( SmolStr::new_static("isActive"), LexObjectProperty::Boolean(LexBoolean { ..Default::default() }), ); map.insert( SmolStr::new_static("isDisabled"), LexObjectProperty::Boolean(LexBoolean { ..Default::default() }), ); map.insert( SmolStr::new_static("labels"), LexObjectProperty::Array(LexArray { items: LexArrayItem::Ref(LexRef { r#ref: CowStr::new_static("com.atproto.label.defs#label"), ..Default::default() }), ..Default::default() }), ); map.insert( SmolStr::new_static("record"), LexObjectProperty::Unknown(LexUnknown { ..Default::default() }), ); map.insert( SmolStr::new_static("status"), LexObjectProperty::String(LexString { description: Some( CowStr::new_static("The status for the account."), ), ..Default::default() }), ); map.insert( SmolStr::new_static("uri"), LexObjectProperty::String(LexString { format: Some(LexStringFormat::AtUri), ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("threadViewPref"), LexUserType::Object(LexObject { properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("sort"), LexObjectProperty::String(LexString { description: Some( CowStr::new_static("Sorting mode for threads."), ), ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("verificationPrefs"), LexUserType::Object(LexObject { description: Some( CowStr::new_static( "Preferences for how verified accounts appear in the app.", ), ), required: Some(vec![]), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("hideBadges"), LexObjectProperty::Boolean(LexBoolean { ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("verificationState"), LexUserType::Object(LexObject { description: Some( CowStr::new_static( "Represents the verification information about the user this object is attached to.", ), ), required: Some( vec![ SmolStr::new_static("verifications"), SmolStr::new_static("verifiedStatus"), SmolStr::new_static("trustedVerifierStatus") ], ), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("trustedVerifierStatus"), LexObjectProperty::String(LexString { description: Some( CowStr::new_static( "The user's status as a trusted verifier.", ), ), ..Default::default() }), ); map.insert( SmolStr::new_static("verifications"), LexObjectProperty::Array(LexArray { description: Some( CowStr::new_static( "All verifications issued by trusted verifiers on behalf of this user. Verifications by untrusted verifiers are not included.", ), ), items: LexArrayItem::Ref(LexRef { r#ref: CowStr::new_static("#verificationView"), ..Default::default() }), ..Default::default() }), ); map.insert( SmolStr::new_static("verifiedStatus"), LexObjectProperty::String(LexString { description: Some( CowStr::new_static( "The user's status as a verified account.", ), ), ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("verificationView"), LexUserType::Object(LexObject { description: Some( CowStr::new_static( "An individual verification for an associated subject.", ), ), required: Some( vec![ SmolStr::new_static("issuer"), SmolStr::new_static("uri"), SmolStr::new_static("isValid"), SmolStr::new_static("createdAt") ], ), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("createdAt"), LexObjectProperty::String(LexString { description: Some( CowStr::new_static( "Timestamp when the verification was created.", ), ), format: Some(LexStringFormat::Datetime), ..Default::default() }), ); map.insert( SmolStr::new_static("isValid"), LexObjectProperty::Boolean(LexBoolean { ..Default::default() }), ); map.insert( SmolStr::new_static("issuer"), LexObjectProperty::String(LexString { description: Some( CowStr::new_static("The user who issued this verification."), ), format: Some(LexStringFormat::Did), ..Default::default() }), ); map.insert( SmolStr::new_static("issuerDisplayName"), LexObjectProperty::String(LexString { description: Some( CowStr::new_static("The display name of the issuer."), ), ..Default::default() }), ); map.insert( SmolStr::new_static("issuerHandle"), LexObjectProperty::String(LexString { description: Some( CowStr::new_static("The handle of the issuer."), ), format: Some(LexStringFormat::Handle), ..Default::default() }), ); map.insert( SmolStr::new_static("uri"), LexObjectProperty::String(LexString { description: Some( CowStr::new_static("The AT-URI of the verification record."), ), format: Some(LexStringFormat::AtUri), ..Default::default() }), ); map }, ..Default::default() }), ); map.insert( SmolStr::new_static("viewerState"), LexUserType::Object(LexObject { description: Some( CowStr::new_static( "Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.", ), ), properties: { #[allow(unused_mut)] let mut map = BTreeMap::new(); map.insert( SmolStr::new_static("activitySubscription"), LexObjectProperty::Ref(LexRef { r#ref: CowStr::new_static( "app.bsky.notification.defs#activitySubscription", ), ..Default::default() }), ); map.insert( SmolStr::new_static("blockedBy"), LexObjectProperty::Boolean(LexBoolean { ..Default::default() }), ); map.insert( SmolStr::new_static("blocking"), LexObjectProperty::String(LexString { format: Some(LexStringFormat::AtUri), ..Default::default() }), ); map.insert( SmolStr::new_static("blockingByList"), LexObjectProperty::Ref(LexRef { r#ref: CowStr::new_static( "app.bsky.graph.defs#listViewBasic", ), ..Default::default() }), ); map.insert( SmolStr::new_static("followedBy"), LexObjectProperty::String(LexString { format: Some(LexStringFormat::AtUri), ..Default::default() }), ); map.insert( SmolStr::new_static("following"), LexObjectProperty::String(LexString { format: Some(LexStringFormat::AtUri), ..Default::default() }), ); map.insert( SmolStr::new_static("knownFollowers"), LexObjectProperty::Ref(LexRef { r#ref: CowStr::new_static("#knownFollowers"), ..Default::default() }), ); map.insert( SmolStr::new_static("muted"), LexObjectProperty::Boolean(LexBoolean { ..Default::default() }), ); map.insert( SmolStr::new_static("mutedByList"), LexObjectProperty::Ref(LexRef { r#ref: CowStr::new_static( "app.bsky.graph.defs#listViewBasic", ), ..Default::default() }), ); map.insert( SmolStr::new_static("mutedOnlyQuoteposts"), LexObjectProperty::Boolean(LexBoolean { ..Default::default() }), ); map.insert( SmolStr::new_static("mutedOnlyReposts"), LexObjectProperty::Boolean(LexBoolean { ..Default::default() }), ); map }, ..Default::default() }), ); map }, ..Default::default() } } fn _default_feed_view_pref_hide_replies_by_unfollowed() -> Option { Some(true) } pub mod hidden_posts_pref_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 Items; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Items = Unset; } ///State transition - sets the `items` field to Set pub struct SetItems(PhantomData St>); impl sealed::Sealed for SetItems {} impl State for SetItems { type Items = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `items` field pub struct items(()); } } /// Builder for constructing an instance of this type. pub struct HiddenPostsPrefBuilder< St: hidden_posts_pref_state::State, S: BosStr = DefaultStr, > { _state: PhantomData St>, _fields: (Option>>,), _type: PhantomData S>, } impl HiddenPostsPref { /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed pub fn new() -> HiddenPostsPrefBuilder { HiddenPostsPrefBuilder::new() } } impl HiddenPostsPref { /// Create a new builder for this type pub fn builder() -> HiddenPostsPrefBuilder { HiddenPostsPrefBuilder::builder() } } impl HiddenPostsPrefBuilder { /// Create a new builder with all fields unset, using the default string type, if needed pub fn new() -> Self { HiddenPostsPrefBuilder { _state: PhantomData, _fields: (None,), _type: PhantomData, } } } impl HiddenPostsPrefBuilder { /// Create a new builder with all fields unset pub fn builder() -> Self { HiddenPostsPrefBuilder { _state: PhantomData, _fields: (None,), _type: PhantomData, } } } impl HiddenPostsPrefBuilder where St: hidden_posts_pref_state::State, St::Items: hidden_posts_pref_state::IsUnset, { /// Set the `items` field (required) pub fn items( mut self, value: impl Into>>, ) -> HiddenPostsPrefBuilder, S> { self._fields.0 = Option::Some(value.into()); HiddenPostsPrefBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl HiddenPostsPrefBuilder where St: hidden_posts_pref_state::State, St::Items: hidden_posts_pref_state::IsSet, { /// Build the final struct. pub fn build(self) -> HiddenPostsPref { HiddenPostsPref { items: 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>, ) -> HiddenPostsPref { HiddenPostsPref { items: self._fields.0.unwrap(), extra_data: Some(extra_data), } } } pub mod interests_pref_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 Tags; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Tags = Unset; } ///State transition - sets the `tags` field to Set pub struct SetTags(PhantomData St>); impl sealed::Sealed for SetTags {} impl State for SetTags { type Tags = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `tags` field pub struct tags(()); } } /// Builder for constructing an instance of this type. pub struct InterestsPrefBuilder< St: interests_pref_state::State, S: BosStr = DefaultStr, > { _state: PhantomData St>, _fields: (Option>,), _type: PhantomData S>, } impl InterestsPref { /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed pub fn new() -> InterestsPrefBuilder { InterestsPrefBuilder::new() } } impl InterestsPref { /// Create a new builder for this type pub fn builder() -> InterestsPrefBuilder { InterestsPrefBuilder::builder() } } impl InterestsPrefBuilder { /// Create a new builder with all fields unset, using the default string type, if needed pub fn new() -> Self { InterestsPrefBuilder { _state: PhantomData, _fields: (None,), _type: PhantomData, } } } impl InterestsPrefBuilder { /// Create a new builder with all fields unset pub fn builder() -> Self { InterestsPrefBuilder { _state: PhantomData, _fields: (None,), _type: PhantomData, } } } impl InterestsPrefBuilder where St: interests_pref_state::State, St::Tags: interests_pref_state::IsUnset, { /// Set the `tags` field (required) pub fn tags( mut self, value: impl Into>, ) -> InterestsPrefBuilder, S> { self._fields.0 = Option::Some(value.into()); InterestsPrefBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl InterestsPrefBuilder where St: interests_pref_state::State, St::Tags: interests_pref_state::IsSet, { /// Build the final struct. pub fn build(self) -> InterestsPref { InterestsPref { tags: 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>, ) -> InterestsPref { InterestsPref { tags: self._fields.0.unwrap(), extra_data: Some(extra_data), } } } pub mod known_followers_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 Count; type Followers; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Count = Unset; type Followers = Unset; } ///State transition - sets the `count` field to Set pub struct SetCount(PhantomData St>); impl sealed::Sealed for SetCount {} impl State for SetCount { type Count = Set; type Followers = St::Followers; } ///State transition - sets the `followers` field to Set pub struct SetFollowers(PhantomData St>); impl sealed::Sealed for SetFollowers {} impl State for SetFollowers { type Count = St::Count; type Followers = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `count` field pub struct count(()); ///Marker type for the `followers` field pub struct followers(()); } } /// Builder for constructing an instance of this type. pub struct KnownFollowersBuilder< St: known_followers_state::State, S: BosStr = DefaultStr, > { _state: PhantomData St>, _fields: (Option, Option>>), _type: PhantomData S>, } impl KnownFollowers { /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed pub fn new() -> KnownFollowersBuilder { KnownFollowersBuilder::new() } } impl KnownFollowers { /// Create a new builder for this type pub fn builder() -> KnownFollowersBuilder { KnownFollowersBuilder::builder() } } impl KnownFollowersBuilder { /// Create a new builder with all fields unset, using the default string type, if needed pub fn new() -> Self { KnownFollowersBuilder { _state: PhantomData, _fields: (None, None), _type: PhantomData, } } } impl KnownFollowersBuilder { /// Create a new builder with all fields unset pub fn builder() -> Self { KnownFollowersBuilder { _state: PhantomData, _fields: (None, None), _type: PhantomData, } } } impl KnownFollowersBuilder where St: known_followers_state::State, St::Count: known_followers_state::IsUnset, { /// Set the `count` field (required) pub fn count( mut self, value: impl Into, ) -> KnownFollowersBuilder, S> { self._fields.0 = Option::Some(value.into()); KnownFollowersBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl KnownFollowersBuilder where St: known_followers_state::State, St::Followers: known_followers_state::IsUnset, { /// Set the `followers` field (required) pub fn followers( mut self, value: impl Into>>, ) -> KnownFollowersBuilder, S> { self._fields.1 = Option::Some(value.into()); KnownFollowersBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl KnownFollowersBuilder where St: known_followers_state::State, St::Count: known_followers_state::IsSet, St::Followers: known_followers_state::IsSet, { /// Build the final struct. pub fn build(self) -> KnownFollowers { KnownFollowers { count: self._fields.0.unwrap(), followers: self._fields.1.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data. pub fn build_with_data( self, extra_data: BTreeMap>, ) -> KnownFollowers { KnownFollowers { count: self._fields.0.unwrap(), followers: self._fields.1.unwrap(), extra_data: Some(extra_data), } } } pub mod labeler_pref_item_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(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { type Did = Set; } /// 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 LabelerPrefItemBuilder< St: labeler_pref_item_state::State, S: BosStr = DefaultStr, > { _state: PhantomData St>, _fields: (Option>,), _type: PhantomData S>, } impl LabelerPrefItem { /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed pub fn new() -> LabelerPrefItemBuilder { LabelerPrefItemBuilder::new() } } impl LabelerPrefItem { /// Create a new builder for this type pub fn builder() -> LabelerPrefItemBuilder { LabelerPrefItemBuilder::builder() } } impl LabelerPrefItemBuilder { /// Create a new builder with all fields unset, using the default string type, if needed pub fn new() -> Self { LabelerPrefItemBuilder { _state: PhantomData, _fields: (None,), _type: PhantomData, } } } impl LabelerPrefItemBuilder { /// Create a new builder with all fields unset pub fn builder() -> Self { LabelerPrefItemBuilder { _state: PhantomData, _fields: (None,), _type: PhantomData, } } } impl LabelerPrefItemBuilder where St: labeler_pref_item_state::State, St::Did: labeler_pref_item_state::IsUnset, { /// Set the `did` field (required) pub fn did( mut self, value: impl Into>, ) -> LabelerPrefItemBuilder, S> { self._fields.0 = Option::Some(value.into()); LabelerPrefItemBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl LabelerPrefItemBuilder where St: labeler_pref_item_state::State, St::Did: labeler_pref_item_state::IsSet, { /// Build the final struct. pub fn build(self) -> LabelerPrefItem { LabelerPrefItem { 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>, ) -> LabelerPrefItem { LabelerPrefItem { did: self._fields.0.unwrap(), extra_data: Some(extra_data), } } } pub mod labelers_pref_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 Labelers; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Labelers = Unset; } ///State transition - sets the `labelers` field to Set pub struct SetLabelers(PhantomData St>); impl sealed::Sealed for SetLabelers {} impl State for SetLabelers { type Labelers = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `labelers` field pub struct labelers(()); } } /// Builder for constructing an instance of this type. pub struct LabelersPrefBuilder { _state: PhantomData St>, _fields: (Option>>,), _type: PhantomData S>, } impl LabelersPref { /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed pub fn new() -> LabelersPrefBuilder { LabelersPrefBuilder::new() } } impl LabelersPref { /// Create a new builder for this type pub fn builder() -> LabelersPrefBuilder { LabelersPrefBuilder::builder() } } impl LabelersPrefBuilder { /// Create a new builder with all fields unset, using the default string type, if needed pub fn new() -> Self { LabelersPrefBuilder { _state: PhantomData, _fields: (None,), _type: PhantomData, } } } impl LabelersPrefBuilder { /// Create a new builder with all fields unset pub fn builder() -> Self { LabelersPrefBuilder { _state: PhantomData, _fields: (None,), _type: PhantomData, } } } impl LabelersPrefBuilder where St: labelers_pref_state::State, St::Labelers: labelers_pref_state::IsUnset, { /// Set the `labelers` field (required) pub fn labelers( mut self, value: impl Into>>, ) -> LabelersPrefBuilder, S> { self._fields.0 = Option::Some(value.into()); LabelersPrefBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl LabelersPrefBuilder where St: labelers_pref_state::State, St::Labelers: labelers_pref_state::IsSet, { /// Build the final struct. pub fn build(self) -> LabelersPref { LabelersPref { labelers: 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>, ) -> LabelersPref { LabelersPref { labelers: self._fields.0.unwrap(), extra_data: Some(extra_data), } } } fn _default_live_event_preferences_hide_all_feeds() -> Option { Some(false) } impl Default for LiveEventPreferences { fn default() -> Self { Self { hidden_feed_ids: None, hide_all_feeds: Some(false), extra_data: Default::default(), } } } pub mod muted_word_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 Targets; type Value; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Targets = Unset; type Value = Unset; } ///State transition - sets the `targets` field to Set pub struct SetTargets(PhantomData St>); impl sealed::Sealed for SetTargets {} impl State for SetTargets { type Targets = Set; type Value = St::Value; } ///State transition - sets the `value` field to Set pub struct SetValue(PhantomData St>); impl sealed::Sealed for SetValue {} impl State for SetValue { type Targets = St::Targets; type Value = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `targets` field pub struct targets(()); ///Marker type for the `value` field pub struct value(()); } } /// Builder for constructing an instance of this type. pub struct MutedWordBuilder { _state: PhantomData St>, _fields: ( Option>, Option, Option, Option>>, Option, ), _type: PhantomData S>, } impl MutedWord { /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed pub fn new() -> MutedWordBuilder { MutedWordBuilder::new() } } impl MutedWord { /// Create a new builder for this type pub fn builder() -> MutedWordBuilder { MutedWordBuilder::builder() } } impl MutedWordBuilder { /// Create a new builder with all fields unset, using the default string type, if needed pub fn new() -> Self { MutedWordBuilder { _state: PhantomData, _fields: (None, None, None, None, None), _type: PhantomData, } } } impl MutedWordBuilder { /// Create a new builder with all fields unset pub fn builder() -> Self { MutedWordBuilder { _state: PhantomData, _fields: (None, None, None, None, None), _type: PhantomData, } } } impl MutedWordBuilder { /// Set the `actorTarget` field (optional) pub fn actor_target( mut self, value: impl Into>>, ) -> Self { self._fields.0 = value.into(); self } /// Set the `actorTarget` field to an Option value (optional) pub fn maybe_actor_target(mut self, value: Option>) -> Self { self._fields.0 = value; self } } impl MutedWordBuilder { /// Set the `expiresAt` field (optional) pub fn expires_at(mut self, value: impl Into>) -> Self { self._fields.1 = value.into(); self } /// Set the `expiresAt` field to an Option value (optional) pub fn maybe_expires_at(mut self, value: Option) -> Self { self._fields.1 = value; self } } impl MutedWordBuilder { /// Set the `id` field (optional) pub fn id(mut self, value: impl Into>) -> Self { self._fields.2 = value.into(); self } /// Set the `id` field to an Option value (optional) pub fn maybe_id(mut self, value: Option) -> Self { self._fields.2 = value; self } } impl MutedWordBuilder where St: muted_word_state::State, St::Targets: muted_word_state::IsUnset, { /// Set the `targets` field (required) pub fn targets( mut self, value: impl Into>>, ) -> MutedWordBuilder, S> { self._fields.3 = Option::Some(value.into()); MutedWordBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl MutedWordBuilder where St: muted_word_state::State, St::Value: muted_word_state::IsUnset, { /// Set the `value` field (required) pub fn value( mut self, value: impl Into, ) -> MutedWordBuilder, S> { self._fields.4 = Option::Some(value.into()); MutedWordBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl MutedWordBuilder where St: muted_word_state::State, St::Targets: muted_word_state::IsSet, St::Value: muted_word_state::IsSet, { /// Build the final struct. pub fn build(self) -> MutedWord { MutedWord { actor_target: self._fields.0, expires_at: self._fields.1, id: self._fields.2, targets: self._fields.3.unwrap(), value: self._fields.4.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data. pub fn build_with_data( self, extra_data: BTreeMap>, ) -> MutedWord { MutedWord { actor_target: self._fields.0, expires_at: self._fields.1, id: self._fields.2, targets: self._fields.3.unwrap(), value: self._fields.4.unwrap(), extra_data: Some(extra_data), } } } pub mod muted_words_pref_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 Items; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Items = Unset; } ///State transition - sets the `items` field to Set pub struct SetItems(PhantomData St>); impl sealed::Sealed for SetItems {} impl State for SetItems { type Items = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `items` field pub struct items(()); } } /// Builder for constructing an instance of this type. pub struct MutedWordsPrefBuilder< St: muted_words_pref_state::State, S: BosStr = DefaultStr, > { _state: PhantomData St>, _fields: (Option>>,), _type: PhantomData S>, } impl MutedWordsPref { /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed pub fn new() -> MutedWordsPrefBuilder { MutedWordsPrefBuilder::new() } } impl MutedWordsPref { /// Create a new builder for this type pub fn builder() -> MutedWordsPrefBuilder { MutedWordsPrefBuilder::builder() } } impl MutedWordsPrefBuilder { /// Create a new builder with all fields unset, using the default string type, if needed pub fn new() -> Self { MutedWordsPrefBuilder { _state: PhantomData, _fields: (None,), _type: PhantomData, } } } impl MutedWordsPrefBuilder { /// Create a new builder with all fields unset pub fn builder() -> Self { MutedWordsPrefBuilder { _state: PhantomData, _fields: (None,), _type: PhantomData, } } } impl MutedWordsPrefBuilder where St: muted_words_pref_state::State, St::Items: muted_words_pref_state::IsUnset, { /// Set the `items` field (required) pub fn items( mut self, value: impl Into>>, ) -> MutedWordsPrefBuilder, S> { self._fields.0 = Option::Some(value.into()); MutedWordsPrefBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl MutedWordsPrefBuilder where St: muted_words_pref_state::State, St::Items: muted_words_pref_state::IsSet, { /// Build the final struct. pub fn build(self) -> MutedWordsPref { MutedWordsPref { items: 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>, ) -> MutedWordsPref { MutedWordsPref { items: self._fields.0.unwrap(), extra_data: Some(extra_data), } } } fn _default_nux_completed() -> bool { false } pub mod nux_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 Completed; type Id; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Completed = Unset; type Id = Unset; } ///State transition - sets the `completed` field to Set pub struct SetCompleted(PhantomData St>); impl sealed::Sealed for SetCompleted {} impl State for SetCompleted { type Completed = Set; type Id = St::Id; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData St>); impl sealed::Sealed for SetId {} impl State for SetId { type Completed = St::Completed; type Id = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `completed` field pub struct completed(()); ///Marker type for the `id` field pub struct id(()); } } /// Builder for constructing an instance of this type. pub struct NuxBuilder { _state: PhantomData St>, _fields: (Option, Option, Option, Option), _type: PhantomData S>, } impl Nux { /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed pub fn new() -> NuxBuilder { NuxBuilder::new() } } impl Nux { /// Create a new builder for this type pub fn builder() -> NuxBuilder { NuxBuilder::builder() } } impl NuxBuilder { /// Create a new builder with all fields unset, using the default string type, if needed pub fn new() -> Self { NuxBuilder { _state: PhantomData, _fields: (None, None, None, None), _type: PhantomData, } } } impl NuxBuilder { /// Create a new builder with all fields unset pub fn builder() -> Self { NuxBuilder { _state: PhantomData, _fields: (None, None, None, None), _type: PhantomData, } } } impl NuxBuilder where St: nux_state::State, St::Completed: nux_state::IsUnset, { /// Set the `completed` field (required) pub fn completed( mut self, value: impl Into, ) -> NuxBuilder, S> { self._fields.0 = Option::Some(value.into()); NuxBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl NuxBuilder { /// Set the `data` field (optional) pub fn data(mut self, value: impl Into>) -> Self { self._fields.1 = value.into(); self } /// Set the `data` field to an Option value (optional) pub fn maybe_data(mut self, value: Option) -> Self { self._fields.1 = value; self } } impl NuxBuilder { /// Set the `expiresAt` field (optional) pub fn expires_at(mut self, value: impl Into>) -> Self { self._fields.2 = value.into(); self } /// Set the `expiresAt` field to an Option value (optional) pub fn maybe_expires_at(mut self, value: Option) -> Self { self._fields.2 = value; self } } impl NuxBuilder where St: nux_state::State, St::Id: nux_state::IsUnset, { /// Set the `id` field (required) pub fn id(mut self, value: impl Into) -> NuxBuilder, S> { self._fields.3 = Option::Some(value.into()); NuxBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl NuxBuilder where St: nux_state::State, St::Completed: nux_state::IsSet, St::Id: nux_state::IsSet, { /// Build the final struct. pub fn build(self) -> Nux { Nux { completed: self._fields.0.unwrap(), data: self._fields.1, expires_at: self._fields.2, id: self._fields.3.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data. pub fn build_with_data(self, extra_data: BTreeMap>) -> Nux { Nux { completed: self._fields.0.unwrap(), data: self._fields.1, expires_at: self._fields.2, id: self._fields.3.unwrap(), extra_data: Some(extra_data), } } } pub mod profile_associated_germ_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 MessageMeUrl; type ShowButtonTo; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type MessageMeUrl = Unset; type ShowButtonTo = Unset; } ///State transition - sets the `message_me_url` field to Set pub struct SetMessageMeUrl(PhantomData St>); impl sealed::Sealed for SetMessageMeUrl {} impl State for SetMessageMeUrl { type MessageMeUrl = Set; type ShowButtonTo = St::ShowButtonTo; } ///State transition - sets the `show_button_to` field to Set pub struct SetShowButtonTo(PhantomData St>); impl sealed::Sealed for SetShowButtonTo {} impl State for SetShowButtonTo { type MessageMeUrl = St::MessageMeUrl; type ShowButtonTo = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `message_me_url` field pub struct message_me_url(()); ///Marker type for the `show_button_to` field pub struct show_button_to(()); } } /// Builder for constructing an instance of this type. pub struct ProfileAssociatedGermBuilder< St: profile_associated_germ_state::State, S: BosStr = DefaultStr, > { _state: PhantomData St>, _fields: (Option>, Option>), _type: PhantomData S>, } impl ProfileAssociatedGerm { /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed pub fn new() -> ProfileAssociatedGermBuilder< profile_associated_germ_state::Empty, DefaultStr, > { ProfileAssociatedGermBuilder::new() } } impl ProfileAssociatedGerm { /// Create a new builder for this type pub fn builder() -> ProfileAssociatedGermBuilder< profile_associated_germ_state::Empty, S, > { ProfileAssociatedGermBuilder::builder() } } impl ProfileAssociatedGermBuilder { /// Create a new builder with all fields unset, using the default string type, if needed pub fn new() -> Self { ProfileAssociatedGermBuilder { _state: PhantomData, _fields: (None, None), _type: PhantomData, } } } impl ProfileAssociatedGermBuilder { /// Create a new builder with all fields unset pub fn builder() -> Self { ProfileAssociatedGermBuilder { _state: PhantomData, _fields: (None, None), _type: PhantomData, } } } impl ProfileAssociatedGermBuilder where St: profile_associated_germ_state::State, St::MessageMeUrl: profile_associated_germ_state::IsUnset, { /// Set the `messageMeUrl` field (required) pub fn message_me_url( mut self, value: impl Into>, ) -> ProfileAssociatedGermBuilder< profile_associated_germ_state::SetMessageMeUrl, S, > { self._fields.0 = Option::Some(value.into()); ProfileAssociatedGermBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl ProfileAssociatedGermBuilder where St: profile_associated_germ_state::State, St::ShowButtonTo: profile_associated_germ_state::IsUnset, { /// Set the `showButtonTo` field (required) pub fn show_button_to( mut self, value: impl Into>, ) -> ProfileAssociatedGermBuilder< profile_associated_germ_state::SetShowButtonTo, S, > { self._fields.1 = Option::Some(value.into()); ProfileAssociatedGermBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl ProfileAssociatedGermBuilder where St: profile_associated_germ_state::State, St::MessageMeUrl: profile_associated_germ_state::IsSet, St::ShowButtonTo: profile_associated_germ_state::IsSet, { /// Build the final struct. pub fn build(self) -> ProfileAssociatedGerm { ProfileAssociatedGerm { message_me_url: self._fields.0.unwrap(), show_button_to: self._fields.1.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data. pub fn build_with_data( self, extra_data: BTreeMap>, ) -> ProfileAssociatedGerm { ProfileAssociatedGerm { message_me_url: self._fields.0.unwrap(), show_button_to: self._fields.1.unwrap(), extra_data: Some(extra_data), } } } pub mod profile_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 Did; type Handle; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Did = Unset; type Handle = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { type Did = Set; type Handle = St::Handle; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData St>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { type Did = St::Did; type Handle = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `did` field pub struct did(()); ///Marker type for the `handle` field pub struct handle(()); } } /// Builder for constructing an instance of this type. pub struct ProfileViewBuilder { _state: PhantomData St>, _fields: ( Option>, Option>, Option, Option>, Option, Option>, Option, Option>, Option, Option>>, Option, Option>, Option>, Option>, ), _type: PhantomData S>, } impl ProfileView { /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed pub fn new() -> ProfileViewBuilder { ProfileViewBuilder::new() } } impl ProfileView { /// Create a new builder for this type pub fn builder() -> ProfileViewBuilder { ProfileViewBuilder::builder() } } impl ProfileViewBuilder { /// Create a new builder with all fields unset, using the default string type, if needed pub fn new() -> Self { ProfileViewBuilder { _state: PhantomData, _fields: ( None, None, None, None, None, None, None, None, None, None, None, None, None, None, ), _type: PhantomData, } } } impl ProfileViewBuilder { /// Create a new builder with all fields unset pub fn builder() -> Self { ProfileViewBuilder { _state: PhantomData, _fields: ( None, None, None, None, None, None, None, None, None, None, None, None, None, None, ), _type: PhantomData, } } } impl ProfileViewBuilder { /// Set the `associated` field (optional) pub fn associated( mut self, value: impl Into>>, ) -> Self { self._fields.0 = value.into(); self } /// Set the `associated` field to an Option value (optional) pub fn maybe_associated( mut self, value: Option>, ) -> Self { self._fields.0 = value; self } } impl ProfileViewBuilder { /// Set the `avatar` field (optional) pub fn avatar(mut self, value: impl Into>>) -> Self { self._fields.1 = value.into(); self } /// Set the `avatar` field to an Option value (optional) pub fn maybe_avatar(mut self, value: Option>) -> Self { self._fields.1 = value; self } } impl ProfileViewBuilder { /// Set the `createdAt` field (optional) pub fn created_at(mut self, value: impl Into>) -> Self { self._fields.2 = value.into(); self } /// Set the `createdAt` field to an Option value (optional) pub fn maybe_created_at(mut self, value: Option) -> Self { self._fields.2 = value; self } } impl ProfileViewBuilder { /// Set the `debug` field (optional) pub fn debug(mut self, value: impl Into>>) -> Self { self._fields.3 = value.into(); self } /// Set the `debug` field to an Option value (optional) pub fn maybe_debug(mut self, value: Option>) -> Self { self._fields.3 = value; self } } impl ProfileViewBuilder { /// Set the `description` field (optional) pub fn description(mut self, value: impl Into>) -> Self { self._fields.4 = value.into(); self } /// Set the `description` field to an Option value (optional) pub fn maybe_description(mut self, value: Option) -> Self { self._fields.4 = value; self } } impl ProfileViewBuilder where St: profile_view_state::State, St::Did: profile_view_state::IsUnset, { /// Set the `did` field (required) pub fn did( mut self, value: impl Into>, ) -> ProfileViewBuilder, S> { self._fields.5 = Option::Some(value.into()); ProfileViewBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl ProfileViewBuilder { /// Set the `displayName` field (optional) pub fn display_name(mut self, value: impl Into>) -> Self { self._fields.6 = value.into(); self } /// Set the `displayName` field to an Option value (optional) pub fn maybe_display_name(mut self, value: Option) -> Self { self._fields.6 = value; self } } impl ProfileViewBuilder where St: profile_view_state::State, St::Handle: profile_view_state::IsUnset, { /// Set the `handle` field (required) pub fn handle( mut self, value: impl Into>, ) -> ProfileViewBuilder, S> { self._fields.7 = Option::Some(value.into()); ProfileViewBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl ProfileViewBuilder { /// Set the `indexedAt` field (optional) pub fn indexed_at(mut self, value: impl Into>) -> Self { self._fields.8 = value.into(); self } /// Set the `indexedAt` field to an Option value (optional) pub fn maybe_indexed_at(mut self, value: Option) -> Self { self._fields.8 = value; self } } impl ProfileViewBuilder { /// Set the `labels` field (optional) pub fn labels(mut self, value: impl Into>>>) -> Self { self._fields.9 = value.into(); self } /// Set the `labels` field to an Option value (optional) pub fn maybe_labels(mut self, value: Option>>) -> Self { self._fields.9 = value; self } } impl ProfileViewBuilder { /// Set the `pronouns` field (optional) pub fn pronouns(mut self, value: impl Into>) -> Self { self._fields.10 = value.into(); self } /// Set the `pronouns` field to an Option value (optional) pub fn maybe_pronouns(mut self, value: Option) -> Self { self._fields.10 = value; self } } impl ProfileViewBuilder { /// Set the `status` field (optional) pub fn status(mut self, value: impl Into>>) -> Self { self._fields.11 = value.into(); self } /// Set the `status` field to an Option value (optional) pub fn maybe_status(mut self, value: Option>) -> Self { self._fields.11 = value; self } } impl ProfileViewBuilder { /// Set the `verification` field (optional) pub fn verification( mut self, value: impl Into>>, ) -> Self { self._fields.12 = value.into(); self } /// Set the `verification` field to an Option value (optional) pub fn maybe_verification( mut self, value: Option>, ) -> Self { self._fields.12 = value; self } } impl ProfileViewBuilder { /// Set the `viewer` field (optional) pub fn viewer(mut self, value: impl Into>>) -> Self { self._fields.13 = value.into(); self } /// Set the `viewer` field to an Option value (optional) pub fn maybe_viewer(mut self, value: Option>) -> Self { self._fields.13 = value; self } } impl ProfileViewBuilder where St: profile_view_state::State, St::Did: profile_view_state::IsSet, St::Handle: profile_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> ProfileView { ProfileView { associated: self._fields.0, avatar: self._fields.1, created_at: self._fields.2, debug: self._fields.3, description: self._fields.4, did: self._fields.5.unwrap(), display_name: self._fields.6, handle: self._fields.7.unwrap(), indexed_at: self._fields.8, labels: self._fields.9, pronouns: self._fields.10, status: self._fields.11, verification: self._fields.12, viewer: self._fields.13, extra_data: Default::default(), } } /// Build the final struct with custom extra_data. pub fn build_with_data( self, extra_data: BTreeMap>, ) -> ProfileView { ProfileView { associated: self._fields.0, avatar: self._fields.1, created_at: self._fields.2, debug: self._fields.3, description: self._fields.4, did: self._fields.5.unwrap(), display_name: self._fields.6, handle: self._fields.7.unwrap(), indexed_at: self._fields.8, labels: self._fields.9, pronouns: self._fields.10, status: self._fields.11, verification: self._fields.12, viewer: self._fields.13, extra_data: Some(extra_data), } } } pub mod profile_view_basic_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; type Handle; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Did = Unset; type Handle = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { type Did = Set; type Handle = St::Handle; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData St>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { type Did = St::Did; type Handle = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `did` field pub struct did(()); ///Marker type for the `handle` field pub struct handle(()); } } /// Builder for constructing an instance of this type. pub struct ProfileViewBasicBuilder< St: profile_view_basic_state::State, S: BosStr = DefaultStr, > { _state: PhantomData St>, _fields: ( Option>, Option>, Option, Option>, Option>, Option, Option>, Option>>, Option, Option>, Option>, Option>, ), _type: PhantomData S>, } impl ProfileViewBasic { /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed pub fn new() -> ProfileViewBasicBuilder< profile_view_basic_state::Empty, DefaultStr, > { ProfileViewBasicBuilder::new() } } impl ProfileViewBasic { /// Create a new builder for this type pub fn builder() -> ProfileViewBasicBuilder { ProfileViewBasicBuilder::builder() } } impl ProfileViewBasicBuilder { /// Create a new builder with all fields unset, using the default string type, if needed pub fn new() -> Self { ProfileViewBasicBuilder { _state: PhantomData, _fields: ( None, None, None, None, None, None, None, None, None, None, None, None, ), _type: PhantomData, } } } impl ProfileViewBasicBuilder { /// Create a new builder with all fields unset pub fn builder() -> Self { ProfileViewBasicBuilder { _state: PhantomData, _fields: ( None, None, None, None, None, None, None, None, None, None, None, None, ), _type: PhantomData, } } } impl ProfileViewBasicBuilder { /// Set the `associated` field (optional) pub fn associated( mut self, value: impl Into>>, ) -> Self { self._fields.0 = value.into(); self } /// Set the `associated` field to an Option value (optional) pub fn maybe_associated( mut self, value: Option>, ) -> Self { self._fields.0 = value; self } } impl ProfileViewBasicBuilder { /// Set the `avatar` field (optional) pub fn avatar(mut self, value: impl Into>>) -> Self { self._fields.1 = value.into(); self } /// Set the `avatar` field to an Option value (optional) pub fn maybe_avatar(mut self, value: Option>) -> Self { self._fields.1 = value; self } } impl ProfileViewBasicBuilder { /// Set the `createdAt` field (optional) pub fn created_at(mut self, value: impl Into>) -> Self { self._fields.2 = value.into(); self } /// Set the `createdAt` field to an Option value (optional) pub fn maybe_created_at(mut self, value: Option) -> Self { self._fields.2 = value; self } } impl ProfileViewBasicBuilder { /// Set the `debug` field (optional) pub fn debug(mut self, value: impl Into>>) -> Self { self._fields.3 = value.into(); self } /// Set the `debug` field to an Option value (optional) pub fn maybe_debug(mut self, value: Option>) -> Self { self._fields.3 = value; self } } impl ProfileViewBasicBuilder where St: profile_view_basic_state::State, St::Did: profile_view_basic_state::IsUnset, { /// Set the `did` field (required) pub fn did( mut self, value: impl Into>, ) -> ProfileViewBasicBuilder, S> { self._fields.4 = Option::Some(value.into()); ProfileViewBasicBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl ProfileViewBasicBuilder { /// Set the `displayName` field (optional) pub fn display_name(mut self, value: impl Into>) -> Self { self._fields.5 = value.into(); self } /// Set the `displayName` field to an Option value (optional) pub fn maybe_display_name(mut self, value: Option) -> Self { self._fields.5 = value; self } } impl ProfileViewBasicBuilder where St: profile_view_basic_state::State, St::Handle: profile_view_basic_state::IsUnset, { /// Set the `handle` field (required) pub fn handle( mut self, value: impl Into>, ) -> ProfileViewBasicBuilder, S> { self._fields.6 = Option::Some(value.into()); ProfileViewBasicBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl ProfileViewBasicBuilder { /// Set the `labels` field (optional) pub fn labels(mut self, value: impl Into>>>) -> Self { self._fields.7 = value.into(); self } /// Set the `labels` field to an Option value (optional) pub fn maybe_labels(mut self, value: Option>>) -> Self { self._fields.7 = value; self } } impl ProfileViewBasicBuilder { /// Set the `pronouns` field (optional) pub fn pronouns(mut self, value: impl Into>) -> Self { self._fields.8 = value.into(); self } /// Set the `pronouns` field to an Option value (optional) pub fn maybe_pronouns(mut self, value: Option) -> Self { self._fields.8 = value; self } } impl ProfileViewBasicBuilder { /// Set the `status` field (optional) pub fn status(mut self, value: impl Into>>) -> Self { self._fields.9 = value.into(); self } /// Set the `status` field to an Option value (optional) pub fn maybe_status(mut self, value: Option>) -> Self { self._fields.9 = value; self } } impl ProfileViewBasicBuilder { /// Set the `verification` field (optional) pub fn verification( mut self, value: impl Into>>, ) -> Self { self._fields.10 = value.into(); self } /// Set the `verification` field to an Option value (optional) pub fn maybe_verification( mut self, value: Option>, ) -> Self { self._fields.10 = value; self } } impl ProfileViewBasicBuilder { /// Set the `viewer` field (optional) pub fn viewer(mut self, value: impl Into>>) -> Self { self._fields.11 = value.into(); self } /// Set the `viewer` field to an Option value (optional) pub fn maybe_viewer(mut self, value: Option>) -> Self { self._fields.11 = value; self } } impl ProfileViewBasicBuilder where St: profile_view_basic_state::State, St::Did: profile_view_basic_state::IsSet, St::Handle: profile_view_basic_state::IsSet, { /// Build the final struct. pub fn build(self) -> ProfileViewBasic { ProfileViewBasic { associated: self._fields.0, avatar: self._fields.1, created_at: self._fields.2, debug: self._fields.3, did: self._fields.4.unwrap(), display_name: self._fields.5, handle: self._fields.6.unwrap(), labels: self._fields.7, pronouns: self._fields.8, status: self._fields.9, verification: self._fields.10, viewer: self._fields.11, extra_data: Default::default(), } } /// Build the final struct with custom extra_data. pub fn build_with_data( self, extra_data: BTreeMap>, ) -> ProfileViewBasic { ProfileViewBasic { associated: self._fields.0, avatar: self._fields.1, created_at: self._fields.2, debug: self._fields.3, did: self._fields.4.unwrap(), display_name: self._fields.5, handle: self._fields.6.unwrap(), labels: self._fields.7, pronouns: self._fields.8, status: self._fields.9, verification: self._fields.10, viewer: self._fields.11, extra_data: Some(extra_data), } } } pub mod profile_view_detailed_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; type Handle; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Did = Unset; type Handle = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { type Did = Set; type Handle = St::Handle; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData St>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { type Did = St::Did; type Handle = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `did` field pub struct did(()); ///Marker type for the `handle` field pub struct handle(()); } } /// Builder for constructing an instance of this type. pub struct ProfileViewDetailedBuilder< St: profile_view_detailed_state::State, S: BosStr = DefaultStr, > { _state: PhantomData St>, _fields: ( Option>, Option>, Option>, Option, Option>, Option, Option>, Option, Option, Option, Option>, Option, Option>, Option>>, Option>, Option, Option, Option>, Option>, Option>, Option>, ), _type: PhantomData S>, } impl ProfileViewDetailed { /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed pub fn new() -> ProfileViewDetailedBuilder< profile_view_detailed_state::Empty, DefaultStr, > { ProfileViewDetailedBuilder::new() } } impl ProfileViewDetailed { /// Create a new builder for this type pub fn builder() -> ProfileViewDetailedBuilder< profile_view_detailed_state::Empty, S, > { ProfileViewDetailedBuilder::builder() } } impl ProfileViewDetailedBuilder { /// Create a new builder with all fields unset, using the default string type, if needed pub fn new() -> Self { ProfileViewDetailedBuilder { _state: PhantomData, _fields: ( None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, ), _type: PhantomData, } } } impl ProfileViewDetailedBuilder { /// Create a new builder with all fields unset pub fn builder() -> Self { ProfileViewDetailedBuilder { _state: PhantomData, _fields: ( None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, ), _type: PhantomData, } } } impl< St: profile_view_detailed_state::State, S: BosStr, > ProfileViewDetailedBuilder { /// Set the `associated` field (optional) pub fn associated( mut self, value: impl Into>>, ) -> Self { self._fields.0 = value.into(); self } /// Set the `associated` field to an Option value (optional) pub fn maybe_associated( mut self, value: Option>, ) -> Self { self._fields.0 = value; self } } impl< St: profile_view_detailed_state::State, S: BosStr, > ProfileViewDetailedBuilder { /// Set the `avatar` field (optional) pub fn avatar(mut self, value: impl Into>>) -> Self { self._fields.1 = value.into(); self } /// Set the `avatar` field to an Option value (optional) pub fn maybe_avatar(mut self, value: Option>) -> Self { self._fields.1 = value; self } } impl< St: profile_view_detailed_state::State, S: BosStr, > ProfileViewDetailedBuilder { /// Set the `banner` field (optional) pub fn banner(mut self, value: impl Into>>) -> Self { self._fields.2 = value.into(); self } /// Set the `banner` field to an Option value (optional) pub fn maybe_banner(mut self, value: Option>) -> Self { self._fields.2 = value; self } } impl< St: profile_view_detailed_state::State, S: BosStr, > ProfileViewDetailedBuilder { /// Set the `createdAt` field (optional) pub fn created_at(mut self, value: impl Into>) -> Self { self._fields.3 = value.into(); self } /// Set the `createdAt` field to an Option value (optional) pub fn maybe_created_at(mut self, value: Option) -> Self { self._fields.3 = value; self } } impl< St: profile_view_detailed_state::State, S: BosStr, > ProfileViewDetailedBuilder { /// Set the `debug` field (optional) pub fn debug(mut self, value: impl Into>>) -> Self { self._fields.4 = value.into(); self } /// Set the `debug` field to an Option value (optional) pub fn maybe_debug(mut self, value: Option>) -> Self { self._fields.4 = value; self } } impl< St: profile_view_detailed_state::State, S: BosStr, > ProfileViewDetailedBuilder { /// Set the `description` field (optional) pub fn description(mut self, value: impl Into>) -> Self { self._fields.5 = value.into(); self } /// Set the `description` field to an Option value (optional) pub fn maybe_description(mut self, value: Option) -> Self { self._fields.5 = value; self } } impl ProfileViewDetailedBuilder where St: profile_view_detailed_state::State, St::Did: profile_view_detailed_state::IsUnset, { /// Set the `did` field (required) pub fn did( mut self, value: impl Into>, ) -> ProfileViewDetailedBuilder, S> { self._fields.6 = Option::Some(value.into()); ProfileViewDetailedBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl< St: profile_view_detailed_state::State, S: BosStr, > ProfileViewDetailedBuilder { /// Set the `displayName` field (optional) pub fn display_name(mut self, value: impl Into>) -> Self { self._fields.7 = value.into(); self } /// Set the `displayName` field to an Option value (optional) pub fn maybe_display_name(mut self, value: Option) -> Self { self._fields.7 = value; self } } impl< St: profile_view_detailed_state::State, S: BosStr, > ProfileViewDetailedBuilder { /// Set the `followersCount` field (optional) pub fn followers_count(mut self, value: impl Into>) -> Self { self._fields.8 = value.into(); self } /// Set the `followersCount` field to an Option value (optional) pub fn maybe_followers_count(mut self, value: Option) -> Self { self._fields.8 = value; self } } impl< St: profile_view_detailed_state::State, S: BosStr, > ProfileViewDetailedBuilder { /// Set the `followsCount` field (optional) pub fn follows_count(mut self, value: impl Into>) -> Self { self._fields.9 = value.into(); self } /// Set the `followsCount` field to an Option value (optional) pub fn maybe_follows_count(mut self, value: Option) -> Self { self._fields.9 = value; self } } impl ProfileViewDetailedBuilder where St: profile_view_detailed_state::State, St::Handle: profile_view_detailed_state::IsUnset, { /// Set the `handle` field (required) pub fn handle( mut self, value: impl Into>, ) -> ProfileViewDetailedBuilder, S> { self._fields.10 = Option::Some(value.into()); ProfileViewDetailedBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl< St: profile_view_detailed_state::State, S: BosStr, > ProfileViewDetailedBuilder { /// Set the `indexedAt` field (optional) pub fn indexed_at(mut self, value: impl Into>) -> Self { self._fields.11 = value.into(); self } /// Set the `indexedAt` field to an Option value (optional) pub fn maybe_indexed_at(mut self, value: Option) -> Self { self._fields.11 = value; self } } impl< St: profile_view_detailed_state::State, S: BosStr, > ProfileViewDetailedBuilder { /// Set the `joinedViaStarterPack` field (optional) pub fn joined_via_starter_pack(mut self, value: impl Into>>) -> Self { self._fields.12 = value.into(); self } /// Set the `joinedViaStarterPack` field to an Option value (optional) pub fn maybe_joined_via_starter_pack(mut self, value: Option>) -> Self { self._fields.12 = value; self } } impl< St: profile_view_detailed_state::State, S: BosStr, > ProfileViewDetailedBuilder { /// Set the `labels` field (optional) pub fn labels(mut self, value: impl Into>>>) -> Self { self._fields.13 = value.into(); self } /// Set the `labels` field to an Option value (optional) pub fn maybe_labels(mut self, value: Option>>) -> Self { self._fields.13 = value; self } } impl< St: profile_view_detailed_state::State, S: BosStr, > ProfileViewDetailedBuilder { /// Set the `pinnedPost` field (optional) pub fn pinned_post(mut self, value: impl Into>>) -> Self { self._fields.14 = value.into(); self } /// Set the `pinnedPost` field to an Option value (optional) pub fn maybe_pinned_post(mut self, value: Option>) -> Self { self._fields.14 = value; self } } impl< St: profile_view_detailed_state::State, S: BosStr, > ProfileViewDetailedBuilder { /// Set the `postsCount` field (optional) pub fn posts_count(mut self, value: impl Into>) -> Self { self._fields.15 = value.into(); self } /// Set the `postsCount` field to an Option value (optional) pub fn maybe_posts_count(mut self, value: Option) -> Self { self._fields.15 = value; self } } impl< St: profile_view_detailed_state::State, S: BosStr, > ProfileViewDetailedBuilder { /// Set the `pronouns` field (optional) pub fn pronouns(mut self, value: impl Into>) -> Self { self._fields.16 = value.into(); self } /// Set the `pronouns` field to an Option value (optional) pub fn maybe_pronouns(mut self, value: Option) -> Self { self._fields.16 = value; self } } impl< St: profile_view_detailed_state::State, S: BosStr, > ProfileViewDetailedBuilder { /// Set the `status` field (optional) pub fn status(mut self, value: impl Into>>) -> Self { self._fields.17 = value.into(); self } /// Set the `status` field to an Option value (optional) pub fn maybe_status(mut self, value: Option>) -> Self { self._fields.17 = value; self } } impl< St: profile_view_detailed_state::State, S: BosStr, > ProfileViewDetailedBuilder { /// Set the `verification` field (optional) pub fn verification( mut self, value: impl Into>>, ) -> Self { self._fields.18 = value.into(); self } /// Set the `verification` field to an Option value (optional) pub fn maybe_verification( mut self, value: Option>, ) -> Self { self._fields.18 = value; self } } impl< St: profile_view_detailed_state::State, S: BosStr, > ProfileViewDetailedBuilder { /// Set the `viewer` field (optional) pub fn viewer(mut self, value: impl Into>>) -> Self { self._fields.19 = value.into(); self } /// Set the `viewer` field to an Option value (optional) pub fn maybe_viewer(mut self, value: Option>) -> Self { self._fields.19 = value; self } } impl< St: profile_view_detailed_state::State, S: BosStr, > ProfileViewDetailedBuilder { /// Set the `website` field (optional) pub fn website(mut self, value: impl Into>>) -> Self { self._fields.20 = value.into(); self } /// Set the `website` field to an Option value (optional) pub fn maybe_website(mut self, value: Option>) -> Self { self._fields.20 = value; self } } impl ProfileViewDetailedBuilder where St: profile_view_detailed_state::State, St::Did: profile_view_detailed_state::IsSet, St::Handle: profile_view_detailed_state::IsSet, { /// Build the final struct. pub fn build(self) -> ProfileViewDetailed { ProfileViewDetailed { associated: self._fields.0, avatar: self._fields.1, banner: self._fields.2, created_at: self._fields.3, debug: self._fields.4, description: self._fields.5, did: self._fields.6.unwrap(), display_name: self._fields.7, followers_count: self._fields.8, follows_count: self._fields.9, handle: self._fields.10.unwrap(), indexed_at: self._fields.11, joined_via_starter_pack: self._fields.12, labels: self._fields.13, pinned_post: self._fields.14, posts_count: self._fields.15, pronouns: self._fields.16, status: self._fields.17, verification: self._fields.18, viewer: self._fields.19, website: self._fields.20, extra_data: Default::default(), } } /// Build the final struct with custom extra_data. pub fn build_with_data( self, extra_data: BTreeMap>, ) -> ProfileViewDetailed { ProfileViewDetailed { associated: self._fields.0, avatar: self._fields.1, banner: self._fields.2, created_at: self._fields.3, debug: self._fields.4, description: self._fields.5, did: self._fields.6.unwrap(), display_name: self._fields.7, followers_count: self._fields.8, follows_count: self._fields.9, handle: self._fields.10.unwrap(), indexed_at: self._fields.11, joined_via_starter_pack: self._fields.12, labels: self._fields.13, pinned_post: self._fields.14, posts_count: self._fields.15, pronouns: self._fields.16, status: self._fields.17, verification: self._fields.18, viewer: self._fields.19, website: self._fields.20, extra_data: Some(extra_data), } } } pub mod saved_feed_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 Id; type Pinned; type Type; type Value; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Id = Unset; type Pinned = Unset; type Type = Unset; type Value = Unset; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData St>); impl sealed::Sealed for SetId {} impl State for SetId { type Id = Set; type Pinned = St::Pinned; type Type = St::Type; type Value = St::Value; } ///State transition - sets the `pinned` field to Set pub struct SetPinned(PhantomData St>); impl sealed::Sealed for SetPinned {} impl State for SetPinned { type Id = St::Id; type Pinned = Set; type Type = St::Type; type Value = St::Value; } ///State transition - sets the `type` field to Set pub struct SetType(PhantomData St>); impl sealed::Sealed for SetType {} impl State for SetType { type Id = St::Id; type Pinned = St::Pinned; type Type = Set; type Value = St::Value; } ///State transition - sets the `value` field to Set pub struct SetValue(PhantomData St>); impl sealed::Sealed for SetValue {} impl State for SetValue { type Id = St::Id; type Pinned = St::Pinned; type Type = St::Type; type Value = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `id` field pub struct id(()); ///Marker type for the `pinned` field pub struct pinned(()); ///Marker type for the `type` field pub struct r#type(()); ///Marker type for the `value` field pub struct value(()); } } /// Builder for constructing an instance of this type. pub struct SavedFeedBuilder { _state: PhantomData St>, _fields: (Option, Option, Option>, Option), _type: PhantomData S>, } impl SavedFeed { /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed pub fn new() -> SavedFeedBuilder { SavedFeedBuilder::new() } } impl SavedFeed { /// Create a new builder for this type pub fn builder() -> SavedFeedBuilder { SavedFeedBuilder::builder() } } impl SavedFeedBuilder { /// Create a new builder with all fields unset, using the default string type, if needed pub fn new() -> Self { SavedFeedBuilder { _state: PhantomData, _fields: (None, None, None, None), _type: PhantomData, } } } impl SavedFeedBuilder { /// Create a new builder with all fields unset pub fn builder() -> Self { SavedFeedBuilder { _state: PhantomData, _fields: (None, None, None, None), _type: PhantomData, } } } impl SavedFeedBuilder where St: saved_feed_state::State, St::Id: saved_feed_state::IsUnset, { /// Set the `id` field (required) pub fn id( mut self, value: impl Into, ) -> SavedFeedBuilder, S> { self._fields.0 = Option::Some(value.into()); SavedFeedBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl SavedFeedBuilder where St: saved_feed_state::State, St::Pinned: saved_feed_state::IsUnset, { /// Set the `pinned` field (required) pub fn pinned( mut self, value: impl Into, ) -> SavedFeedBuilder, S> { self._fields.1 = Option::Some(value.into()); SavedFeedBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl SavedFeedBuilder where St: saved_feed_state::State, St::Type: saved_feed_state::IsUnset, { /// Set the `type` field (required) pub fn r#type( mut self, value: impl Into>, ) -> SavedFeedBuilder, S> { self._fields.2 = Option::Some(value.into()); SavedFeedBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl SavedFeedBuilder where St: saved_feed_state::State, St::Value: saved_feed_state::IsUnset, { /// Set the `value` field (required) pub fn value( mut self, value: impl Into, ) -> SavedFeedBuilder, S> { self._fields.3 = Option::Some(value.into()); SavedFeedBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl SavedFeedBuilder where St: saved_feed_state::State, St::Id: saved_feed_state::IsSet, St::Pinned: saved_feed_state::IsSet, St::Type: saved_feed_state::IsSet, St::Value: saved_feed_state::IsSet, { /// Build the final struct. pub fn build(self) -> SavedFeed { SavedFeed { id: self._fields.0.unwrap(), pinned: self._fields.1.unwrap(), r#type: self._fields.2.unwrap(), value: self._fields.3.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data. pub fn build_with_data( self, extra_data: BTreeMap>, ) -> SavedFeed { SavedFeed { id: self._fields.0.unwrap(), pinned: self._fields.1.unwrap(), r#type: self._fields.2.unwrap(), value: self._fields.3.unwrap(), extra_data: Some(extra_data), } } } pub mod saved_feeds_pref_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 Pinned; type Saved; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Pinned = Unset; type Saved = Unset; } ///State transition - sets the `pinned` field to Set pub struct SetPinned(PhantomData St>); impl sealed::Sealed for SetPinned {} impl State for SetPinned { type Pinned = Set; type Saved = St::Saved; } ///State transition - sets the `saved` field to Set pub struct SetSaved(PhantomData St>); impl sealed::Sealed for SetSaved {} impl State for SetSaved { type Pinned = St::Pinned; type Saved = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `pinned` field pub struct pinned(()); ///Marker type for the `saved` field pub struct saved(()); } } /// Builder for constructing an instance of this type. pub struct SavedFeedsPrefBuilder< St: saved_feeds_pref_state::State, S: BosStr = DefaultStr, > { _state: PhantomData St>, _fields: (Option>>, Option>>, Option), _type: PhantomData S>, } impl SavedFeedsPref { /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed pub fn new() -> SavedFeedsPrefBuilder { SavedFeedsPrefBuilder::new() } } impl SavedFeedsPref { /// Create a new builder for this type pub fn builder() -> SavedFeedsPrefBuilder { SavedFeedsPrefBuilder::builder() } } impl SavedFeedsPrefBuilder { /// Create a new builder with all fields unset, using the default string type, if needed pub fn new() -> Self { SavedFeedsPrefBuilder { _state: PhantomData, _fields: (None, None, None), _type: PhantomData, } } } impl SavedFeedsPrefBuilder { /// Create a new builder with all fields unset pub fn builder() -> Self { SavedFeedsPrefBuilder { _state: PhantomData, _fields: (None, None, None), _type: PhantomData, } } } impl SavedFeedsPrefBuilder where St: saved_feeds_pref_state::State, St::Pinned: saved_feeds_pref_state::IsUnset, { /// Set the `pinned` field (required) pub fn pinned( mut self, value: impl Into>>, ) -> SavedFeedsPrefBuilder, S> { self._fields.0 = Option::Some(value.into()); SavedFeedsPrefBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl SavedFeedsPrefBuilder where St: saved_feeds_pref_state::State, St::Saved: saved_feeds_pref_state::IsUnset, { /// Set the `saved` field (required) pub fn saved( mut self, value: impl Into>>, ) -> SavedFeedsPrefBuilder, S> { self._fields.1 = Option::Some(value.into()); SavedFeedsPrefBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl SavedFeedsPrefBuilder { /// Set the `timelineIndex` field (optional) pub fn timeline_index(mut self, value: impl Into>) -> Self { self._fields.2 = value.into(); self } /// Set the `timelineIndex` field to an Option value (optional) pub fn maybe_timeline_index(mut self, value: Option) -> Self { self._fields.2 = value; self } } impl SavedFeedsPrefBuilder where St: saved_feeds_pref_state::State, St::Pinned: saved_feeds_pref_state::IsSet, St::Saved: saved_feeds_pref_state::IsSet, { /// Build the final struct. pub fn build(self) -> SavedFeedsPref { SavedFeedsPref { pinned: self._fields.0.unwrap(), saved: self._fields.1.unwrap(), timeline_index: self._fields.2, extra_data: Default::default(), } } /// Build the final struct with custom extra_data. pub fn build_with_data( self, extra_data: BTreeMap>, ) -> SavedFeedsPref { SavedFeedsPref { pinned: self._fields.0.unwrap(), saved: self._fields.1.unwrap(), timeline_index: self._fields.2, extra_data: Some(extra_data), } } } pub mod saved_feeds_pref_v2_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 Items; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Items = Unset; } ///State transition - sets the `items` field to Set pub struct SetItems(PhantomData St>); impl sealed::Sealed for SetItems {} impl State for SetItems { type Items = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `items` field pub struct items(()); } } /// Builder for constructing an instance of this type. pub struct SavedFeedsPrefV2Builder< St: saved_feeds_pref_v2_state::State, S: BosStr = DefaultStr, > { _state: PhantomData St>, _fields: (Option>>,), _type: PhantomData S>, } impl SavedFeedsPrefV2 { /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed pub fn new() -> SavedFeedsPrefV2Builder< saved_feeds_pref_v2_state::Empty, DefaultStr, > { SavedFeedsPrefV2Builder::new() } } impl SavedFeedsPrefV2 { /// Create a new builder for this type pub fn builder() -> SavedFeedsPrefV2Builder { SavedFeedsPrefV2Builder::builder() } } impl SavedFeedsPrefV2Builder { /// Create a new builder with all fields unset, using the default string type, if needed pub fn new() -> Self { SavedFeedsPrefV2Builder { _state: PhantomData, _fields: (None,), _type: PhantomData, } } } impl SavedFeedsPrefV2Builder { /// Create a new builder with all fields unset pub fn builder() -> Self { SavedFeedsPrefV2Builder { _state: PhantomData, _fields: (None,), _type: PhantomData, } } } impl SavedFeedsPrefV2Builder where St: saved_feeds_pref_v2_state::State, St::Items: saved_feeds_pref_v2_state::IsUnset, { /// Set the `items` field (required) pub fn items( mut self, value: impl Into>>, ) -> SavedFeedsPrefV2Builder, S> { self._fields.0 = Option::Some(value.into()); SavedFeedsPrefV2Builder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl SavedFeedsPrefV2Builder where St: saved_feeds_pref_v2_state::State, St::Items: saved_feeds_pref_v2_state::IsSet, { /// Build the final struct. pub fn build(self) -> SavedFeedsPrefV2 { SavedFeedsPrefV2 { items: 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>, ) -> SavedFeedsPrefV2 { SavedFeedsPrefV2 { items: self._fields.0.unwrap(), extra_data: Some(extra_data), } } } pub mod status_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 Record; type Status; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Record = Unset; type Status = Unset; } ///State transition - sets the `record` field to Set pub struct SetRecord(PhantomData St>); impl sealed::Sealed for SetRecord {} impl State for SetRecord { type Record = Set; type Status = St::Status; } ///State transition - sets the `status` field to Set pub struct SetStatus(PhantomData St>); impl sealed::Sealed for SetStatus {} impl State for SetStatus { type Record = St::Record; type Status = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `record` field pub struct record(()); ///Marker type for the `status` field pub struct status(()); } } /// Builder for constructing an instance of this type. pub struct StatusViewBuilder { _state: PhantomData St>, _fields: ( Option>, Option>, Option, Option, Option, Option>>, Option>, Option>, Option>, ), _type: PhantomData S>, } impl StatusView { /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed pub fn new() -> StatusViewBuilder { StatusViewBuilder::new() } } impl StatusView { /// Create a new builder for this type pub fn builder() -> StatusViewBuilder { StatusViewBuilder::builder() } } impl StatusViewBuilder { /// Create a new builder with all fields unset, using the default string type, if needed pub fn new() -> Self { StatusViewBuilder { _state: PhantomData, _fields: (None, None, None, None, None, None, None, None, None), _type: PhantomData, } } } impl StatusViewBuilder { /// Create a new builder with all fields unset pub fn builder() -> Self { StatusViewBuilder { _state: PhantomData, _fields: (None, None, None, None, None, None, None, None, None), _type: PhantomData, } } } impl StatusViewBuilder { /// Set the `cid` field (optional) pub fn cid(mut self, value: impl Into>>) -> Self { self._fields.0 = value.into(); self } /// Set the `cid` field to an Option value (optional) pub fn maybe_cid(mut self, value: Option>) -> Self { self._fields.0 = value; self } } impl StatusViewBuilder { /// Set the `embed` field (optional) pub fn embed(mut self, value: impl Into>>) -> Self { self._fields.1 = value.into(); self } /// Set the `embed` field to an Option value (optional) pub fn maybe_embed(mut self, value: Option>) -> Self { self._fields.1 = value; self } } impl StatusViewBuilder { /// Set the `expiresAt` field (optional) pub fn expires_at(mut self, value: impl Into>) -> Self { self._fields.2 = value.into(); self } /// Set the `expiresAt` field to an Option value (optional) pub fn maybe_expires_at(mut self, value: Option) -> Self { self._fields.2 = value; self } } impl StatusViewBuilder { /// Set the `isActive` field (optional) pub fn is_active(mut self, value: impl Into>) -> Self { self._fields.3 = value.into(); self } /// Set the `isActive` field to an Option value (optional) pub fn maybe_is_active(mut self, value: Option) -> Self { self._fields.3 = value; self } } impl StatusViewBuilder { /// Set the `isDisabled` field (optional) pub fn is_disabled(mut self, value: impl Into>) -> Self { self._fields.4 = value.into(); self } /// Set the `isDisabled` field to an Option value (optional) pub fn maybe_is_disabled(mut self, value: Option) -> Self { self._fields.4 = value; self } } impl StatusViewBuilder { /// Set the `labels` field (optional) pub fn labels(mut self, value: impl Into>>>) -> Self { self._fields.5 = value.into(); self } /// Set the `labels` field to an Option value (optional) pub fn maybe_labels(mut self, value: Option>>) -> Self { self._fields.5 = value; self } } impl StatusViewBuilder where St: status_view_state::State, St::Record: status_view_state::IsUnset, { /// Set the `record` field (required) pub fn record( mut self, value: impl Into>, ) -> StatusViewBuilder, S> { self._fields.6 = Option::Some(value.into()); StatusViewBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl StatusViewBuilder where St: status_view_state::State, St::Status: status_view_state::IsUnset, { /// Set the `status` field (required) pub fn status( mut self, value: impl Into>, ) -> StatusViewBuilder, S> { self._fields.7 = Option::Some(value.into()); StatusViewBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl StatusViewBuilder { /// Set the `uri` field (optional) pub fn uri(mut self, value: impl Into>>) -> Self { self._fields.8 = value.into(); self } /// Set the `uri` field to an Option value (optional) pub fn maybe_uri(mut self, value: Option>) -> Self { self._fields.8 = value; self } } impl StatusViewBuilder where St: status_view_state::State, St::Record: status_view_state::IsSet, St::Status: status_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> StatusView { StatusView { cid: self._fields.0, embed: self._fields.1, expires_at: self._fields.2, is_active: self._fields.3, is_disabled: self._fields.4, labels: self._fields.5, record: self._fields.6.unwrap(), status: self._fields.7.unwrap(), uri: self._fields.8, extra_data: Default::default(), } } /// Build the final struct with custom extra_data. pub fn build_with_data( self, extra_data: BTreeMap>, ) -> StatusView { StatusView { cid: self._fields.0, embed: self._fields.1, expires_at: self._fields.2, is_active: self._fields.3, is_disabled: self._fields.4, labels: self._fields.5, record: self._fields.6.unwrap(), status: self._fields.7.unwrap(), uri: self._fields.8, extra_data: Some(extra_data), } } } fn _default_verification_prefs_hide_badges() -> Option { Some(false) } impl Default for VerificationPrefs { fn default() -> Self { Self { hide_badges: Some(false), extra_data: Default::default(), } } } pub mod verification_state_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 TrustedVerifierStatus; type Verifications; type VerifiedStatus; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type TrustedVerifierStatus = Unset; type Verifications = Unset; type VerifiedStatus = Unset; } ///State transition - sets the `trusted_verifier_status` field to Set pub struct SetTrustedVerifierStatus(PhantomData St>); impl sealed::Sealed for SetTrustedVerifierStatus {} impl State for SetTrustedVerifierStatus { type TrustedVerifierStatus = Set; type Verifications = St::Verifications; type VerifiedStatus = St::VerifiedStatus; } ///State transition - sets the `verifications` field to Set pub struct SetVerifications(PhantomData St>); impl sealed::Sealed for SetVerifications {} impl State for SetVerifications { type TrustedVerifierStatus = St::TrustedVerifierStatus; type Verifications = Set; type VerifiedStatus = St::VerifiedStatus; } ///State transition - sets the `verified_status` field to Set pub struct SetVerifiedStatus(PhantomData St>); impl sealed::Sealed for SetVerifiedStatus {} impl State for SetVerifiedStatus { type TrustedVerifierStatus = St::TrustedVerifierStatus; type Verifications = St::Verifications; type VerifiedStatus = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `trusted_verifier_status` field pub struct trusted_verifier_status(()); ///Marker type for the `verifications` field pub struct verifications(()); ///Marker type for the `verified_status` field pub struct verified_status(()); } } /// Builder for constructing an instance of this type. pub struct VerificationStateBuilder< St: verification_state_state::State, S: BosStr = DefaultStr, > { _state: PhantomData St>, _fields: ( Option>, Option>>, Option>, ), _type: PhantomData S>, } impl VerificationState { /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed pub fn new() -> VerificationStateBuilder< verification_state_state::Empty, DefaultStr, > { VerificationStateBuilder::new() } } impl VerificationState { /// Create a new builder for this type pub fn builder() -> VerificationStateBuilder { VerificationStateBuilder::builder() } } impl VerificationStateBuilder { /// Create a new builder with all fields unset, using the default string type, if needed pub fn new() -> Self { VerificationStateBuilder { _state: PhantomData, _fields: (None, None, None), _type: PhantomData, } } } impl VerificationStateBuilder { /// Create a new builder with all fields unset pub fn builder() -> Self { VerificationStateBuilder { _state: PhantomData, _fields: (None, None, None), _type: PhantomData, } } } impl VerificationStateBuilder where St: verification_state_state::State, St::TrustedVerifierStatus: verification_state_state::IsUnset, { /// Set the `trustedVerifierStatus` field (required) pub fn trusted_verifier_status( mut self, value: impl Into>, ) -> VerificationStateBuilder< verification_state_state::SetTrustedVerifierStatus, S, > { self._fields.0 = Option::Some(value.into()); VerificationStateBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl VerificationStateBuilder where St: verification_state_state::State, St::Verifications: verification_state_state::IsUnset, { /// Set the `verifications` field (required) pub fn verifications( mut self, value: impl Into>>, ) -> VerificationStateBuilder, S> { self._fields.1 = Option::Some(value.into()); VerificationStateBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl VerificationStateBuilder where St: verification_state_state::State, St::VerifiedStatus: verification_state_state::IsUnset, { /// Set the `verifiedStatus` field (required) pub fn verified_status( mut self, value: impl Into>, ) -> VerificationStateBuilder, S> { self._fields.2 = Option::Some(value.into()); VerificationStateBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl VerificationStateBuilder where St: verification_state_state::State, St::TrustedVerifierStatus: verification_state_state::IsSet, St::Verifications: verification_state_state::IsSet, St::VerifiedStatus: verification_state_state::IsSet, { /// Build the final struct. pub fn build(self) -> VerificationState { VerificationState { trusted_verifier_status: self._fields.0.unwrap(), verifications: self._fields.1.unwrap(), verified_status: self._fields.2.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data. pub fn build_with_data( self, extra_data: BTreeMap>, ) -> VerificationState { VerificationState { trusted_verifier_status: self._fields.0.unwrap(), verifications: self._fields.1.unwrap(), verified_status: self._fields.2.unwrap(), extra_data: Some(extra_data), } } } pub mod verification_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 CreatedAt; type IsValid; type Issuer; type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type CreatedAt = Unset; type IsValid = Unset; type Issuer = Unset; type Uri = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type CreatedAt = Set; type IsValid = St::IsValid; type Issuer = St::Issuer; type Uri = St::Uri; } ///State transition - sets the `is_valid` field to Set pub struct SetIsValid(PhantomData St>); impl sealed::Sealed for SetIsValid {} impl State for SetIsValid { type CreatedAt = St::CreatedAt; type IsValid = Set; type Issuer = St::Issuer; type Uri = St::Uri; } ///State transition - sets the `issuer` field to Set pub struct SetIssuer(PhantomData St>); impl sealed::Sealed for SetIssuer {} impl State for SetIssuer { type CreatedAt = St::CreatedAt; type IsValid = St::IsValid; type Issuer = Set; type Uri = St::Uri; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { type CreatedAt = St::CreatedAt; type IsValid = St::IsValid; type Issuer = St::Issuer; type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `is_valid` field pub struct is_valid(()); ///Marker type for the `issuer` field pub struct issuer(()); ///Marker type for the `uri` field pub struct uri(()); } } /// Builder for constructing an instance of this type. pub struct VerificationViewBuilder< St: verification_view_state::State, S: BosStr = DefaultStr, > { _state: PhantomData St>, _fields: ( Option, Option, Option>, Option, Option>, Option>, ), _type: PhantomData S>, } impl VerificationView { /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed pub fn new() -> VerificationViewBuilder { VerificationViewBuilder::new() } } impl VerificationView { /// Create a new builder for this type pub fn builder() -> VerificationViewBuilder { VerificationViewBuilder::builder() } } impl VerificationViewBuilder { /// Create a new builder with all fields unset, using the default string type, if needed pub fn new() -> Self { VerificationViewBuilder { _state: PhantomData, _fields: (None, None, None, None, None, None), _type: PhantomData, } } } impl VerificationViewBuilder { /// Create a new builder with all fields unset pub fn builder() -> Self { VerificationViewBuilder { _state: PhantomData, _fields: (None, None, None, None, None, None), _type: PhantomData, } } } impl VerificationViewBuilder where St: verification_view_state::State, St::CreatedAt: verification_view_state::IsUnset, { /// Set the `createdAt` field (required) pub fn created_at( mut self, value: impl Into, ) -> VerificationViewBuilder, S> { self._fields.0 = Option::Some(value.into()); VerificationViewBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl VerificationViewBuilder where St: verification_view_state::State, St::IsValid: verification_view_state::IsUnset, { /// Set the `isValid` field (required) pub fn is_valid( mut self, value: impl Into, ) -> VerificationViewBuilder, S> { self._fields.1 = Option::Some(value.into()); VerificationViewBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl VerificationViewBuilder where St: verification_view_state::State, St::Issuer: verification_view_state::IsUnset, { /// Set the `issuer` field (required) pub fn issuer( mut self, value: impl Into>, ) -> VerificationViewBuilder, S> { self._fields.2 = Option::Some(value.into()); VerificationViewBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl VerificationViewBuilder { /// Set the `issuerDisplayName` field (optional) pub fn issuer_display_name(mut self, value: impl Into>) -> Self { self._fields.3 = value.into(); self } /// Set the `issuerDisplayName` field to an Option value (optional) pub fn maybe_issuer_display_name(mut self, value: Option) -> Self { self._fields.3 = value; self } } impl VerificationViewBuilder { /// Set the `issuerHandle` field (optional) pub fn issuer_handle(mut self, value: impl Into>>) -> Self { self._fields.4 = value.into(); self } /// Set the `issuerHandle` field to an Option value (optional) pub fn maybe_issuer_handle(mut self, value: Option>) -> Self { self._fields.4 = value; self } } impl VerificationViewBuilder where St: verification_view_state::State, St::Uri: verification_view_state::IsUnset, { /// Set the `uri` field (required) pub fn uri( mut self, value: impl Into>, ) -> VerificationViewBuilder, S> { self._fields.5 = Option::Some(value.into()); VerificationViewBuilder { _state: PhantomData, _fields: self._fields, _type: PhantomData, } } } impl VerificationViewBuilder where St: verification_view_state::State, St::CreatedAt: verification_view_state::IsSet, St::IsValid: verification_view_state::IsSet, St::Issuer: verification_view_state::IsSet, St::Uri: verification_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> VerificationView { VerificationView { created_at: self._fields.0.unwrap(), is_valid: self._fields.1.unwrap(), issuer: self._fields.2.unwrap(), issuer_display_name: self._fields.3, issuer_handle: self._fields.4, uri: 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>, ) -> VerificationView { VerificationView { created_at: self._fields.0.unwrap(), is_valid: self._fields.1.unwrap(), issuer: self._fields.2.unwrap(), issuer_display_name: self._fields.3, issuer_handle: self._fields.4, uri: self._fields.5.unwrap(), extra_data: Some(extra_data), } } }