// @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. 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; #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct AdultContentPref<'a> { pub enabled: bool, } 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 S>); 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<'a, S: adult_content_pref_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: (::core::option::Option,), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> AdultContentPref<'a> { /// Create a new builder for this type pub fn new() -> AdultContentPrefBuilder<'a, adult_content_pref_state::Empty> { AdultContentPrefBuilder::new() } } impl<'a> AdultContentPrefBuilder<'a, adult_content_pref_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { AdultContentPrefBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None,), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> AdultContentPrefBuilder<'a, S> where S: adult_content_pref_state::State, S::Enabled: adult_content_pref_state::IsUnset, { /// Set the `enabled` field (required) pub fn enabled( mut self, value: impl Into, ) -> AdultContentPrefBuilder<'a, adult_content_pref_state::SetEnabled> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); AdultContentPrefBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> AdultContentPrefBuilder<'a, S> where S: adult_content_pref_state::State, S::Enabled: adult_content_pref_state::IsSet, { /// Build the final struct pub fn build(self) -> AdultContentPref<'a> { AdultContentPref { enabled: self.__unsafe_private_named.0.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> AdultContentPref<'a> { AdultContentPref { enabled: self.__unsafe_private_named.0.unwrap(), extra_data: Some(extra_data), } } } fn lexicon_doc_app_bsky_actor_defs() -> ::jacquard_lexicon::lexicon::LexiconDoc< 'static, > { ::jacquard_lexicon::lexicon::LexiconDoc { lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1, id: ::jacquard_common::CowStr::new_static("app.bsky.actor.defs"), revision: None, description: None, defs: { let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("adultContentPref"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![::jacquard_common::smol_str::SmolStr::new_static("enabled")], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("enabled"), ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { description: None, default: None, r#const: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("bskyAppProgressGuide"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: Some( ::jacquard_common::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![::jacquard_common::smol_str::SmolStr::new_static("guide")], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("guide"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: Some(100usize), min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("bskyAppStatePref"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: Some( ::jacquard_common::CowStr::new_static( "A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this.", ), ), required: None, nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "activeProgressGuide", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "#bskyAppProgressGuide", ), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("nuxs"), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: Some( ::jacquard_common::CowStr::new_static( "Storage for NUXs the user has encountered.", ), ), items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "app.bsky.actor.defs#nux", ), }), min_length: None, max_length: Some(100usize), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "queuedNudges", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: Some( ::jacquard_common::CowStr::new_static( "An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user.", ), ), items: ::jacquard_lexicon::lexicon::LexArrayItem::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: Some(100usize), min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), min_length: None, max_length: Some(1000usize), }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("contentLabelPref"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("label"), ::jacquard_common::smol_str::SmolStr::new_static("visibility") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("label"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "labelerDid", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "Which labeler does this preference apply to? If undefined, applies globally.", ), ), format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Did, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "visibility", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("feedViewPref"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![::jacquard_common::smol_str::SmolStr::new_static("feed")], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("feed"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "The URI of the feed, or an identifier which describes the feed.", ), ), format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "hideQuotePosts", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { description: None, default: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "hideReplies", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { description: None, default: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "hideRepliesByLikeCount", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger { description: None, default: None, minimum: None, maximum: None, r#enum: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "hideRepliesByUnfollowed", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { description: None, default: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "hideReposts", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { description: None, default: None, r#const: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("hiddenPostsPref"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![::jacquard_common::smol_str::SmolStr::new_static("items")], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("items"), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: Some( ::jacquard_common::CowStr::new_static( "A list of URIs of posts the account owner has hidden.", ), ), items: ::jacquard_lexicon::lexicon::LexArrayItem::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::AtUri, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), min_length: None, max_length: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("interestsPref"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![::jacquard_common::smol_str::SmolStr::new_static("tags")], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("tags"), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: Some( ::jacquard_common::CowStr::new_static( "A list of tags which describe the account owner's interests gathered during onboarding.", ), ), items: ::jacquard_lexicon::lexicon::LexArrayItem::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: Some(640usize), min_graphemes: None, max_graphemes: Some(64usize), r#enum: None, r#const: None, known_values: None, }), min_length: None, max_length: Some(100usize), }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("knownFollowers"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: Some( ::jacquard_common::CowStr::new_static( "The subject's followers whom you also follow", ), ), required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("count"), ::jacquard_common::smol_str::SmolStr::new_static("followers") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("count"), ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger { description: None, default: None, minimum: None, maximum: None, r#enum: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "followers", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: None, items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "#profileViewBasic", ), }), min_length: Some(0usize), max_length: Some(5usize), }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("labelerPrefItem"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![::jacquard_common::smol_str::SmolStr::new_static("did")], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("did"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Did, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("labelersPref"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("labelers") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("labelers"), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: None, items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "#labelerPrefItem", ), }), min_length: None, max_length: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("mutedWord"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: Some( ::jacquard_common::CowStr::new_static( "A word that the account owner has muted.", ), ), required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("value"), ::jacquard_common::smol_str::SmolStr::new_static("targets") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "actorTarget", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "Groups of users to apply the muted word to. If undefined, applies to all users.", ), ), format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "expiresAt", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "The date and time at which the muted word will expire and no longer be applied.", ), ), format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Datetime, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("id"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("targets"), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: Some( ::jacquard_common::CowStr::new_static( "The intended targets of the muted word.", ), ), items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "app.bsky.actor.defs#mutedWordTarget", ), }), min_length: None, max_length: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("value"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "The muted word itself.", ), ), format: None, default: None, min_length: None, max_length: Some(10000usize), min_graphemes: None, max_graphemes: Some(1000usize), r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("mutedWordTarget"), ::jacquard_lexicon::lexicon::LexUserType::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: Some(640usize), min_graphemes: None, max_graphemes: Some(64usize), r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("mutedWordsPref"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![::jacquard_common::smol_str::SmolStr::new_static("items")], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("items"), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: Some( ::jacquard_common::CowStr::new_static( "A list of words the account owner has muted.", ), ), items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "app.bsky.actor.defs#mutedWord", ), }), min_length: None, max_length: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("nux"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: Some( ::jacquard_common::CowStr::new_static( "A new user experiences (NUX) storage object", ), ), required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("id"), ::jacquard_common::smol_str::SmolStr::new_static("completed") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "completed", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { description: None, default: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("data"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters.", ), ), format: None, default: None, min_length: None, max_length: Some(3000usize), min_graphemes: None, max_graphemes: Some(300usize), r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "expiresAt", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "The date and time at which the NUX will expire and should be considered completed.", ), ), format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Datetime, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("id"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: Some(100usize), min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("personalDetailsPref"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: None, nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "birthDate", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "The birth date of account owner.", ), ), format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Datetime, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "postInteractionSettingsPref", ), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: Some( ::jacquard_common::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![]), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "postgateEmbeddingRules", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: Some( ::jacquard_common::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: ::jacquard_lexicon::lexicon::LexArrayItem::Union(::jacquard_lexicon::lexicon::LexRefUnion { description: None, refs: vec![ ::jacquard_common::CowStr::new_static("app.bsky.feed.postgate#disableRule") ], closed: None, }), min_length: None, max_length: Some(5usize), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "threadgateAllowRules", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: Some( ::jacquard_common::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: ::jacquard_lexicon::lexicon::LexArrayItem::Union(::jacquard_lexicon::lexicon::LexRefUnion { description: None, refs: vec![ ::jacquard_common::CowStr::new_static("app.bsky.feed.threadgate#mentionRule"), ::jacquard_common::CowStr::new_static("app.bsky.feed.threadgate#followerRule"), ::jacquard_common::CowStr::new_static("app.bsky.feed.threadgate#followingRule"), ::jacquard_common::CowStr::new_static("app.bsky.feed.threadgate#listRule") ], closed: None, }), min_length: None, max_length: Some(5usize), }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("preferences"), ::jacquard_lexicon::lexicon::LexUserType::Array(::jacquard_lexicon::lexicon::LexArray { description: None, items: ::jacquard_lexicon::lexicon::LexArrayItem::Union(::jacquard_lexicon::lexicon::LexRefUnion { description: None, refs: vec![ ::jacquard_common::CowStr::new_static("#adultContentPref"), ::jacquard_common::CowStr::new_static("#contentLabelPref"), ::jacquard_common::CowStr::new_static("#savedFeedsPref"), ::jacquard_common::CowStr::new_static("#savedFeedsPrefV2"), ::jacquard_common::CowStr::new_static("#personalDetailsPref"), ::jacquard_common::CowStr::new_static("#feedViewPref"), ::jacquard_common::CowStr::new_static("#threadViewPref"), ::jacquard_common::CowStr::new_static("#interestsPref"), ::jacquard_common::CowStr::new_static("#mutedWordsPref"), ::jacquard_common::CowStr::new_static("#hiddenPostsPref"), ::jacquard_common::CowStr::new_static("#bskyAppStatePref"), ::jacquard_common::CowStr::new_static("#labelersPref"), ::jacquard_common::CowStr::new_static("#postInteractionSettingsPref"), ::jacquard_common::CowStr::new_static("#verificationPrefs") ], closed: None, }), min_length: None, max_length: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("profileAssociated"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: None, nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "activitySubscription", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "#profileAssociatedActivitySubscription", ), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("chat"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "#profileAssociatedChat", ), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("feedgens"), ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger { description: None, default: None, minimum: None, maximum: None, r#enum: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("labeler"), ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { description: None, default: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("lists"), ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger { description: None, default: None, minimum: None, maximum: None, r#enum: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "starterPacks", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger { description: None, default: None, minimum: None, maximum: None, r#enum: None, r#const: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "profileAssociatedActivitySubscription", ), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("allowSubscriptions") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "allowSubscriptions", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "profileAssociatedChat", ), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("allowIncoming") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "allowIncoming", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("profileView"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("did"), ::jacquard_common::smol_str::SmolStr::new_static("handle") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "associated", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "#profileAssociated", ), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("avatar"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Uri, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "createdAt", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Datetime, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("debug"), ::jacquard_lexicon::lexicon::LexObjectProperty::Unknown(::jacquard_lexicon::lexicon::LexUnknown { description: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "description", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: Some(2560usize), min_graphemes: None, max_graphemes: Some(256usize), r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("did"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Did, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "displayName", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: Some(640usize), min_graphemes: None, max_graphemes: Some(64usize), r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("handle"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Handle, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "indexedAt", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Datetime, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("labels"), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: None, items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "com.atproto.label.defs#label", ), }), min_length: None, max_length: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("pronouns"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("status"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static("#statusView"), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "verification", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "#verificationState", ), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("viewer"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static("#viewerState"), }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("profileViewBasic"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("did"), ::jacquard_common::smol_str::SmolStr::new_static("handle") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "associated", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "#profileAssociated", ), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("avatar"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Uri, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "createdAt", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Datetime, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("debug"), ::jacquard_lexicon::lexicon::LexObjectProperty::Unknown(::jacquard_lexicon::lexicon::LexUnknown { description: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("did"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Did, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "displayName", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: Some(640usize), min_graphemes: None, max_graphemes: Some(64usize), r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("handle"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Handle, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("labels"), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: None, items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "com.atproto.label.defs#label", ), }), min_length: None, max_length: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("pronouns"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("status"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static("#statusView"), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "verification", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "#verificationState", ), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("viewer"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static("#viewerState"), }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("profileViewDetailed"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("did"), ::jacquard_common::smol_str::SmolStr::new_static("handle") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "associated", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "#profileAssociated", ), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("avatar"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Uri, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("banner"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Uri, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "createdAt", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Datetime, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("debug"), ::jacquard_lexicon::lexicon::LexObjectProperty::Unknown(::jacquard_lexicon::lexicon::LexUnknown { description: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "description", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: Some(2560usize), min_graphemes: None, max_graphemes: Some(256usize), r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("did"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Did, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "displayName", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: Some(640usize), min_graphemes: None, max_graphemes: Some(64usize), r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "followersCount", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger { description: None, default: None, minimum: None, maximum: None, r#enum: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "followsCount", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger { description: None, default: None, minimum: None, maximum: None, r#enum: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("handle"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Handle, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "indexedAt", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Datetime, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "joinedViaStarterPack", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "app.bsky.graph.defs#starterPackViewBasic", ), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("labels"), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: None, items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "com.atproto.label.defs#label", ), }), min_length: None, max_length: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "pinnedPost", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "com.atproto.repo.strongRef", ), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "postsCount", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger { description: None, default: None, minimum: None, maximum: None, r#enum: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("pronouns"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("status"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static("#statusView"), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "verification", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "#verificationState", ), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("viewer"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static("#viewerState"), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("website"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Uri, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("savedFeed"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("id"), ::jacquard_common::smol_str::SmolStr::new_static("type"), ::jacquard_common::smol_str::SmolStr::new_static("value"), ::jacquard_common::smol_str::SmolStr::new_static("pinned") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("id"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("pinned"), ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { description: None, default: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("type"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("value"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("savedFeedsPref"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("pinned"), ::jacquard_common::smol_str::SmolStr::new_static("saved") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("pinned"), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: None, items: ::jacquard_lexicon::lexicon::LexArrayItem::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::AtUri, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), min_length: None, max_length: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("saved"), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: None, items: ::jacquard_lexicon::lexicon::LexArrayItem::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::AtUri, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), min_length: None, max_length: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "timelineIndex", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger { description: None, default: None, minimum: None, maximum: None, r#enum: None, r#const: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("savedFeedsPrefV2"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![::jacquard_common::smol_str::SmolStr::new_static("items")], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("items"), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: None, items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "app.bsky.actor.defs#savedFeed", ), }), min_length: None, max_length: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("statusView"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("status"), ::jacquard_common::smol_str::SmolStr::new_static("record") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("embed"), ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion { description: Some( ::jacquard_common::CowStr::new_static( "An optional embed associated with the status.", ), ), refs: vec![ ::jacquard_common::CowStr::new_static("app.bsky.embed.external#view") ], closed: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "expiresAt", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "The date when this status will expire. The application might choose to no longer return the status after expiration.", ), ), format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Datetime, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("isActive"), ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { description: None, default: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("record"), ::jacquard_lexicon::lexicon::LexObjectProperty::Unknown(::jacquard_lexicon::lexicon::LexUnknown { description: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("status"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "The status for the account.", ), ), format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("threadViewPref"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: None, nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("sort"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "Sorting mode for threads.", ), ), format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("verificationPrefs"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: Some( ::jacquard_common::CowStr::new_static( "Preferences for how verified accounts appear in the app.", ), ), required: Some(vec![]), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "hideBadges", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { description: None, default: None, r#const: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("verificationState"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: Some( ::jacquard_common::CowStr::new_static( "Represents the verification information about the user this object is attached to.", ), ), required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("verifications"), ::jacquard_common::smol_str::SmolStr::new_static("verifiedStatus"), ::jacquard_common::smol_str::SmolStr::new_static("trustedVerifierStatus") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "trustedVerifierStatus", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "The user's status as a trusted verifier.", ), ), format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "verifications", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: Some( ::jacquard_common::CowStr::new_static( "All verifications issued by trusted verifiers on behalf of this user. Verifications by untrusted verifiers are not included.", ), ), items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "#verificationView", ), }), min_length: None, max_length: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "verifiedStatus", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "The user's status as a verified account.", ), ), format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("verificationView"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: Some( ::jacquard_common::CowStr::new_static( "An individual verification for an associated subject.", ), ), required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("issuer"), ::jacquard_common::smol_str::SmolStr::new_static("uri"), ::jacquard_common::smol_str::SmolStr::new_static("isValid"), ::jacquard_common::smol_str::SmolStr::new_static("createdAt") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "createdAt", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "Timestamp when the verification was created.", ), ), format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Datetime, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("isValid"), ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { description: None, default: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("issuer"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "The user who issued this verification.", ), ), format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Did, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("uri"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "The AT-URI of the verification record.", ), ), format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::AtUri, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("viewerState"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: Some( ::jacquard_common::CowStr::new_static( "Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.", ), ), required: None, nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "activitySubscription", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "app.bsky.notification.defs#activitySubscription", ), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "blockedBy", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { description: None, default: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("blocking"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::AtUri, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "blockingByList", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "app.bsky.graph.defs#listViewBasic", ), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "followedBy", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::AtUri, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "following", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::AtUri, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "knownFollowers", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "#knownFollowers", ), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("muted"), ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { description: None, default: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "mutedByList", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "app.bsky.graph.defs#listViewBasic", ), }), ); map }, }), ); map }, } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for AdultContentPref<'a> { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "adultContentPref" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } /// If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct BskyAppProgressGuide<'a> { #[serde(borrow)] pub guide: jacquard_common::CowStr<'a>, } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for BskyAppProgressGuide<'a> { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "bskyAppProgressGuide" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { { let value = &self.guide; #[allow(unused_comparisons)] if ::len(value.as_ref()) > 100usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "guide", ), max: 100usize, actual: ::len(value.as_ref()), }); } } Ok(()) } } /// A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct BskyAppStatePref<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub active_progress_guide: std::option::Option< crate::app_bsky::actor::BskyAppProgressGuide<'a>, >, /// Storage for NUXs the user has encountered. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub nuxs: std::option::Option>>, /// An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub queued_nudges: std::option::Option>>, } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for BskyAppStatePref<'a> { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "bskyAppStatePref" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { if let Some(ref value) = self.nuxs { #[allow(unused_comparisons)] if value.len() > 100usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::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(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "queued_nudges", ), max: 1000usize, actual: value.len(), }); } } Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct ContentLabelPref<'a> { #[serde(borrow)] pub label: jacquard_common::CowStr<'a>, /// Which labeler does this preference apply to? If undefined, applies globally. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub labeler_did: std::option::Option>, #[serde(borrow)] pub visibility: ContentLabelPrefVisibility<'a>, } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum ContentLabelPrefVisibility<'a> { Ignore, Show, Warn, Hide, Other(jacquard_common::CowStr<'a>), } impl<'a> ContentLabelPrefVisibility<'a> { 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(), } } } impl<'a> From<&'a str> for ContentLabelPrefVisibility<'a> { fn from(s: &'a str) -> Self { match s { "ignore" => Self::Ignore, "show" => Self::Show, "warn" => Self::Warn, "hide" => Self::Hide, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> From for ContentLabelPrefVisibility<'a> { fn from(s: String) -> Self { match s.as_str() { "ignore" => Self::Ignore, "show" => Self::Show, "warn" => Self::Warn, "hide" => Self::Hide, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> core::fmt::Display for ContentLabelPrefVisibility<'a> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{}", self.as_str()) } } impl<'a> AsRef for ContentLabelPrefVisibility<'a> { fn as_ref(&self) -> &str { self.as_str() } } impl<'a> serde::Serialize for ContentLabelPrefVisibility<'a> { fn serialize(&self, serializer: S) -> Result where S: serde::Serializer, { serializer.serialize_str(self.as_str()) } } impl<'de, 'a> serde::Deserialize<'de> for ContentLabelPrefVisibility<'a> where 'de: 'a, { fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'de>, { let s = <&'de str>::deserialize(deserializer)?; Ok(Self::from(s)) } } impl<'a> Default for ContentLabelPrefVisibility<'a> { fn default() -> Self { Self::Other(Default::default()) } } impl jacquard_common::IntoStatic for ContentLabelPrefVisibility<'_> { type Output = ContentLabelPrefVisibility<'static>; 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()) } } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ContentLabelPref<'a> { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "contentLabelPref" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct FeedViewPref<'a> { /// The URI of the feed, or an identifier which describes the feed. #[serde(borrow)] pub feed: jacquard_common::CowStr<'a>, /// Hide quote posts in the feed. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub hide_quote_posts: std::option::Option, /// Hide replies in the feed. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub hide_replies: std::option::Option, /// Hide replies in the feed if they do not have this number of likes. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub hide_replies_by_like_count: std::option::Option, /// Hide replies in the feed if they are not by followed users. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub hide_replies_by_unfollowed: std::option::Option, /// Hide reposts in the feed. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub hide_reposts: std::option::Option, } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for FeedViewPref<'a> { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "feedViewPref" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct HiddenPostsPref<'a> { /// A list of URIs of posts the account owner has hidden. #[serde(borrow)] pub items: Vec>, } 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 S>); 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<'a, S: hidden_posts_pref_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> HiddenPostsPref<'a> { /// Create a new builder for this type pub fn new() -> HiddenPostsPrefBuilder<'a, hidden_posts_pref_state::Empty> { HiddenPostsPrefBuilder::new() } } impl<'a> HiddenPostsPrefBuilder<'a, hidden_posts_pref_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { HiddenPostsPrefBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None,), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> HiddenPostsPrefBuilder<'a, S> where S: hidden_posts_pref_state::State, S::Items: hidden_posts_pref_state::IsUnset, { /// Set the `items` field (required) pub fn items( mut self, value: impl Into>>, ) -> HiddenPostsPrefBuilder<'a, hidden_posts_pref_state::SetItems> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); HiddenPostsPrefBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> HiddenPostsPrefBuilder<'a, S> where S: hidden_posts_pref_state::State, S::Items: hidden_posts_pref_state::IsSet, { /// Build the final struct pub fn build(self) -> HiddenPostsPref<'a> { HiddenPostsPref { items: self.__unsafe_private_named.0.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> HiddenPostsPref<'a> { HiddenPostsPref { items: self.__unsafe_private_named.0.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for HiddenPostsPref<'a> { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "hiddenPostsPref" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct InterestsPref<'a> { /// A list of tags which describe the account owner's interests gathered during onboarding. #[serde(borrow)] pub tags: Vec>, } 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 S>); 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<'a, S: interests_pref_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: (::core::option::Option>>,), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> InterestsPref<'a> { /// Create a new builder for this type pub fn new() -> InterestsPrefBuilder<'a, interests_pref_state::Empty> { InterestsPrefBuilder::new() } } impl<'a> InterestsPrefBuilder<'a, interests_pref_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { InterestsPrefBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None,), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> InterestsPrefBuilder<'a, S> where S: interests_pref_state::State, S::Tags: interests_pref_state::IsUnset, { /// Set the `tags` field (required) pub fn tags( mut self, value: impl Into>>, ) -> InterestsPrefBuilder<'a, interests_pref_state::SetTags> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); InterestsPrefBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> InterestsPrefBuilder<'a, S> where S: interests_pref_state::State, S::Tags: interests_pref_state::IsSet, { /// Build the final struct pub fn build(self) -> InterestsPref<'a> { InterestsPref { tags: self.__unsafe_private_named.0.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> InterestsPref<'a> { InterestsPref { tags: self.__unsafe_private_named.0.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for InterestsPref<'a> { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "interestsPref" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { { let value = &self.tags; #[allow(unused_comparisons)] if value.len() > 100usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "tags", ), max: 100usize, actual: value.len(), }); } } Ok(()) } } /// The subject's followers whom you also follow #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct KnownFollowers<'a> { pub count: i64, #[serde(borrow)] pub followers: Vec>, } 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 Followers; type Count; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Followers = Unset; type Count = Unset; } ///State transition - sets the `followers` field to Set pub struct SetFollowers(PhantomData S>); impl sealed::Sealed for SetFollowers {} impl State for SetFollowers { type Followers = Set; type Count = S::Count; } ///State transition - sets the `count` field to Set pub struct SetCount(PhantomData S>); impl sealed::Sealed for SetCount {} impl State for SetCount { type Followers = S::Followers; type Count = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `followers` field pub struct followers(()); ///Marker type for the `count` field pub struct count(()); } } /// Builder for constructing an instance of this type pub struct KnownFollowersBuilder<'a, S: known_followers_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option, ::core::option::Option>>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> KnownFollowers<'a> { /// Create a new builder for this type pub fn new() -> KnownFollowersBuilder<'a, known_followers_state::Empty> { KnownFollowersBuilder::new() } } impl<'a> KnownFollowersBuilder<'a, known_followers_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { KnownFollowersBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> KnownFollowersBuilder<'a, S> where S: known_followers_state::State, S::Count: known_followers_state::IsUnset, { /// Set the `count` field (required) pub fn count( mut self, value: impl Into, ) -> KnownFollowersBuilder<'a, known_followers_state::SetCount> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); KnownFollowersBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> KnownFollowersBuilder<'a, S> where S: known_followers_state::State, S::Followers: known_followers_state::IsUnset, { /// Set the `followers` field (required) pub fn followers( mut self, value: impl Into>>, ) -> KnownFollowersBuilder<'a, known_followers_state::SetFollowers> { self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); KnownFollowersBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> KnownFollowersBuilder<'a, S> where S: known_followers_state::State, S::Followers: known_followers_state::IsSet, S::Count: known_followers_state::IsSet, { /// Build the final struct pub fn build(self) -> KnownFollowers<'a> { KnownFollowers { count: self.__unsafe_private_named.0.unwrap(), followers: self.__unsafe_private_named.1.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> KnownFollowers<'a> { KnownFollowers { count: self.__unsafe_private_named.0.unwrap(), followers: self.__unsafe_private_named.1.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for KnownFollowers<'a> { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "knownFollowers" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { { let value = &self.followers; #[allow(unused_comparisons)] if value.len() > 5usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "followers", ), max: 5usize, actual: value.len(), }); } } { let value = &self.followers; #[allow(unused_comparisons)] if value.len() < 0usize { return Err(::jacquard_lexicon::validation::ConstraintError::MinLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "followers", ), min: 0usize, actual: value.len(), }); } } Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct LabelerPrefItem<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } 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 S>); 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<'a, S: labeler_pref_item_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> LabelerPrefItem<'a> { /// Create a new builder for this type pub fn new() -> LabelerPrefItemBuilder<'a, labeler_pref_item_state::Empty> { LabelerPrefItemBuilder::new() } } impl<'a> LabelerPrefItemBuilder<'a, labeler_pref_item_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { LabelerPrefItemBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None,), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> LabelerPrefItemBuilder<'a, S> where S: labeler_pref_item_state::State, S::Did: labeler_pref_item_state::IsUnset, { /// Set the `did` field (required) pub fn did( mut self, value: impl Into>, ) -> LabelerPrefItemBuilder<'a, labeler_pref_item_state::SetDid> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); LabelerPrefItemBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> LabelerPrefItemBuilder<'a, S> where S: labeler_pref_item_state::State, S::Did: labeler_pref_item_state::IsSet, { /// Build the final struct pub fn build(self) -> LabelerPrefItem<'a> { LabelerPrefItem { did: self.__unsafe_private_named.0.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> LabelerPrefItem<'a> { LabelerPrefItem { did: self.__unsafe_private_named.0.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for LabelerPrefItem<'a> { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "labelerPrefItem" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct LabelersPref<'a> { #[serde(borrow)] pub labelers: Vec>, } 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 S>); 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<'a, S: labelers_pref_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> LabelersPref<'a> { /// Create a new builder for this type pub fn new() -> LabelersPrefBuilder<'a, labelers_pref_state::Empty> { LabelersPrefBuilder::new() } } impl<'a> LabelersPrefBuilder<'a, labelers_pref_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { LabelersPrefBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None,), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> LabelersPrefBuilder<'a, S> where S: labelers_pref_state::State, S::Labelers: labelers_pref_state::IsUnset, { /// Set the `labelers` field (required) pub fn labelers( mut self, value: impl Into>>, ) -> LabelersPrefBuilder<'a, labelers_pref_state::SetLabelers> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); LabelersPrefBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> LabelersPrefBuilder<'a, S> where S: labelers_pref_state::State, S::Labelers: labelers_pref_state::IsSet, { /// Build the final struct pub fn build(self) -> LabelersPref<'a> { LabelersPref { labelers: self.__unsafe_private_named.0.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> LabelersPref<'a> { LabelersPref { labelers: self.__unsafe_private_named.0.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for LabelersPref<'a> { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "labelersPref" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } /// A word that the account owner has muted. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct MutedWord<'a> { /// Groups of users to apply the muted word to. If undefined, applies to all users. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub actor_target: std::option::Option>, /// The date and time at which the muted word will expire and no longer be applied. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub expires_at: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub id: std::option::Option>, /// The intended targets of the muted word. #[serde(borrow)] pub targets: Vec>, /// The muted word itself. #[serde(borrow)] pub value: jacquard_common::CowStr<'a>, } 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 Value; type Targets; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Value = Unset; type Targets = Unset; } ///State transition - sets the `value` field to Set pub struct SetValue(PhantomData S>); impl sealed::Sealed for SetValue {} impl State for SetValue { type Value = Set; type Targets = S::Targets; } ///State transition - sets the `targets` field to Set pub struct SetTargets(PhantomData S>); impl sealed::Sealed for SetTargets {} impl State for SetTargets { type Value = S::Value; type Targets = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `value` field pub struct value(()); ///Marker type for the `targets` field pub struct targets(()); } } /// Builder for constructing an instance of this type pub struct MutedWordBuilder<'a, S: muted_word_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ::core::option::Option, ::core::option::Option>, ::core::option::Option>>, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> MutedWord<'a> { /// Create a new builder for this type pub fn new() -> MutedWordBuilder<'a, muted_word_state::Empty> { MutedWordBuilder::new() } } impl<'a> MutedWordBuilder<'a, muted_word_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { MutedWordBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S: muted_word_state::State> MutedWordBuilder<'a, S> { /// Set the `actorTarget` field (optional) pub fn actor_target( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.0 = value.into(); self } /// Set the `actorTarget` field to an Option value (optional) pub fn maybe_actor_target( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.0 = value; self } } impl<'a, S: muted_word_state::State> MutedWordBuilder<'a, S> { /// Set the `expiresAt` field (optional) pub fn expires_at( mut self, value: impl Into>, ) -> Self { self.__unsafe_private_named.1 = value.into(); self } /// Set the `expiresAt` field to an Option value (optional) pub fn maybe_expires_at( mut self, value: Option, ) -> Self { self.__unsafe_private_named.1 = value; self } } impl<'a, S: muted_word_state::State> MutedWordBuilder<'a, S> { /// Set the `id` field (optional) pub fn id(mut self, value: impl Into>>) -> Self { self.__unsafe_private_named.2 = value.into(); self } /// Set the `id` field to an Option value (optional) pub fn maybe_id(mut self, value: Option>) -> Self { self.__unsafe_private_named.2 = value; self } } impl<'a, S> MutedWordBuilder<'a, S> where S: muted_word_state::State, S::Targets: muted_word_state::IsUnset, { /// Set the `targets` field (required) pub fn targets( mut self, value: impl Into>>, ) -> MutedWordBuilder<'a, muted_word_state::SetTargets> { self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into()); MutedWordBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> MutedWordBuilder<'a, S> where S: muted_word_state::State, S::Value: muted_word_state::IsUnset, { /// Set the `value` field (required) pub fn value( mut self, value: impl Into>, ) -> MutedWordBuilder<'a, muted_word_state::SetValue> { self.__unsafe_private_named.4 = ::core::option::Option::Some(value.into()); MutedWordBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> MutedWordBuilder<'a, S> where S: muted_word_state::State, S::Value: muted_word_state::IsSet, S::Targets: muted_word_state::IsSet, { /// Build the final struct pub fn build(self) -> MutedWord<'a> { MutedWord { actor_target: self.__unsafe_private_named.0, expires_at: self.__unsafe_private_named.1, id: self.__unsafe_private_named.2, targets: self.__unsafe_private_named.3.unwrap(), value: self.__unsafe_private_named.4.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> MutedWord<'a> { MutedWord { actor_target: self.__unsafe_private_named.0, expires_at: self.__unsafe_private_named.1, id: self.__unsafe_private_named.2, targets: self.__unsafe_private_named.3.unwrap(), value: self.__unsafe_private_named.4.unwrap(), extra_data: Some(extra_data), } } } /// Groups of users to apply the muted word to. If undefined, applies to all users. #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum MutedWordActorTarget<'a> { All, ExcludeFollowing, Other(jacquard_common::CowStr<'a>), } impl<'a> MutedWordActorTarget<'a> { pub fn as_str(&self) -> &str { match self { Self::All => "all", Self::ExcludeFollowing => "exclude-following", Self::Other(s) => s.as_ref(), } } } impl<'a> From<&'a str> for MutedWordActorTarget<'a> { fn from(s: &'a str) -> Self { match s { "all" => Self::All, "exclude-following" => Self::ExcludeFollowing, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> From for MutedWordActorTarget<'a> { fn from(s: String) -> Self { match s.as_str() { "all" => Self::All, "exclude-following" => Self::ExcludeFollowing, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> core::fmt::Display for MutedWordActorTarget<'a> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{}", self.as_str()) } } impl<'a> AsRef for MutedWordActorTarget<'a> { fn as_ref(&self) -> &str { self.as_str() } } impl<'a> serde::Serialize for MutedWordActorTarget<'a> { fn serialize(&self, serializer: S) -> Result where S: serde::Serializer, { serializer.serialize_str(self.as_str()) } } impl<'de, 'a> serde::Deserialize<'de> for MutedWordActorTarget<'a> where 'de: 'a, { fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'de>, { let s = <&'de str>::deserialize(deserializer)?; Ok(Self::from(s)) } } impl<'a> Default for MutedWordActorTarget<'a> { fn default() -> Self { Self::Other(Default::default()) } } impl jacquard_common::IntoStatic for MutedWordActorTarget<'_> { type Output = MutedWordActorTarget<'static>; fn into_static(self) -> Self::Output { match self { MutedWordActorTarget::All => MutedWordActorTarget::All, MutedWordActorTarget::ExcludeFollowing => { MutedWordActorTarget::ExcludeFollowing } MutedWordActorTarget::Other(v) => { MutedWordActorTarget::Other(v.into_static()) } } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for MutedWord<'a> { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "mutedWord" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { { let value = &self.value; #[allow(unused_comparisons)] if ::len(value.as_ref()) > 10000usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "value", ), max: 10000usize, actual: ::len(value.as_ref()), }); } } { let value = &self.value; { let count = ::unicode_segmentation::UnicodeSegmentation::graphemes( value.as_ref(), true, ) .count(); if count > 1000usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxGraphemes { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "value", ), max: 1000usize, actual: count, }); } } } Ok(()) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum MutedWordTarget<'a> { Content, Tag, Other(jacquard_common::CowStr<'a>), } impl<'a> MutedWordTarget<'a> { pub fn as_str(&self) -> &str { match self { Self::Content => "content", Self::Tag => "tag", Self::Other(s) => s.as_ref(), } } } impl<'a> From<&'a str> for MutedWordTarget<'a> { fn from(s: &'a str) -> Self { match s { "content" => Self::Content, "tag" => Self::Tag, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> From for MutedWordTarget<'a> { fn from(s: String) -> Self { match s.as_str() { "content" => Self::Content, "tag" => Self::Tag, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> AsRef for MutedWordTarget<'a> { fn as_ref(&self) -> &str { self.as_str() } } impl<'a> core::fmt::Display for MutedWordTarget<'a> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{}", self.as_str()) } } impl<'a> serde::Serialize for MutedWordTarget<'a> { fn serialize(&self, serializer: S) -> Result where S: serde::Serializer, { serializer.serialize_str(self.as_str()) } } impl<'de, 'a> serde::Deserialize<'de> for MutedWordTarget<'a> where 'de: 'a, { fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'de>, { let s = <&'de str>::deserialize(deserializer)?; Ok(Self::from(s)) } } impl jacquard_common::IntoStatic for MutedWordTarget<'_> { type Output = MutedWordTarget<'static>; fn into_static(self) -> Self::Output { match self { MutedWordTarget::Content => MutedWordTarget::Content, MutedWordTarget::Tag => MutedWordTarget::Tag, MutedWordTarget::Other(v) => MutedWordTarget::Other(v.into_static()), } } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct MutedWordsPref<'a> { /// A list of words the account owner has muted. #[serde(borrow)] pub items: Vec>, } 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 S>); 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<'a, S: muted_words_pref_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> MutedWordsPref<'a> { /// Create a new builder for this type pub fn new() -> MutedWordsPrefBuilder<'a, muted_words_pref_state::Empty> { MutedWordsPrefBuilder::new() } } impl<'a> MutedWordsPrefBuilder<'a, muted_words_pref_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { MutedWordsPrefBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None,), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> MutedWordsPrefBuilder<'a, S> where S: muted_words_pref_state::State, S::Items: muted_words_pref_state::IsUnset, { /// Set the `items` field (required) pub fn items( mut self, value: impl Into>>, ) -> MutedWordsPrefBuilder<'a, muted_words_pref_state::SetItems> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); MutedWordsPrefBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> MutedWordsPrefBuilder<'a, S> where S: muted_words_pref_state::State, S::Items: muted_words_pref_state::IsSet, { /// Build the final struct pub fn build(self) -> MutedWordsPref<'a> { MutedWordsPref { items: self.__unsafe_private_named.0.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> MutedWordsPref<'a> { MutedWordsPref { items: self.__unsafe_private_named.0.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for MutedWordsPref<'a> { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "mutedWordsPref" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } /// A new user experiences (NUX) storage object #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct Nux<'a> { pub completed: bool, /// Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub data: std::option::Option>, /// The date and time at which the NUX will expire and should be considered completed. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub expires_at: std::option::Option, #[serde(borrow)] pub id: jacquard_common::CowStr<'a>, } 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 Id; type Completed; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Id = Unset; type Completed = Unset; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData S>); impl sealed::Sealed for SetId {} impl State for SetId { type Id = Set; type Completed = S::Completed; } ///State transition - sets the `completed` field to Set pub struct SetCompleted(PhantomData S>); impl sealed::Sealed for SetCompleted {} impl State for SetCompleted { type Id = S::Id; type Completed = 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 `completed` field pub struct completed(()); } } /// Builder for constructing an instance of this type pub struct NuxBuilder<'a, S: nux_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option, ::core::option::Option>, ::core::option::Option, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> Nux<'a> { /// Create a new builder for this type pub fn new() -> NuxBuilder<'a, nux_state::Empty> { NuxBuilder::new() } } impl<'a> NuxBuilder<'a, nux_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { NuxBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> NuxBuilder<'a, S> where S: nux_state::State, S::Completed: nux_state::IsUnset, { /// Set the `completed` field (required) pub fn completed( mut self, value: impl Into, ) -> NuxBuilder<'a, nux_state::SetCompleted> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); NuxBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: nux_state::State> NuxBuilder<'a, S> { /// Set the `data` field (optional) pub fn data( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.1 = value.into(); self } /// Set the `data` field to an Option value (optional) pub fn maybe_data(mut self, value: Option>) -> Self { self.__unsafe_private_named.1 = value; self } } impl<'a, S: nux_state::State> NuxBuilder<'a, S> { /// Set the `expiresAt` field (optional) pub fn expires_at( mut self, value: impl Into>, ) -> Self { self.__unsafe_private_named.2 = value.into(); self } /// Set the `expiresAt` field to an Option value (optional) pub fn maybe_expires_at( mut self, value: Option, ) -> Self { self.__unsafe_private_named.2 = value; self } } impl<'a, S> NuxBuilder<'a, S> where S: nux_state::State, S::Id: nux_state::IsUnset, { /// Set the `id` field (required) pub fn id( mut self, value: impl Into>, ) -> NuxBuilder<'a, nux_state::SetId> { self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into()); NuxBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> NuxBuilder<'a, S> where S: nux_state::State, S::Id: nux_state::IsSet, S::Completed: nux_state::IsSet, { /// Build the final struct pub fn build(self) -> Nux<'a> { Nux { completed: self.__unsafe_private_named.0.unwrap(), data: self.__unsafe_private_named.1, expires_at: self.__unsafe_private_named.2, id: self.__unsafe_private_named.3.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> Nux<'a> { Nux { completed: self.__unsafe_private_named.0.unwrap(), data: self.__unsafe_private_named.1, expires_at: self.__unsafe_private_named.2, id: self.__unsafe_private_named.3.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Nux<'a> { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "nux" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { if let Some(ref value) = self.data { #[allow(unused_comparisons)] if ::len(value.as_ref()) > 3000usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "data", ), max: 3000usize, actual: ::len(value.as_ref()), }); } } if let Some(ref value) = self.data { { let count = ::unicode_segmentation::UnicodeSegmentation::graphemes( value.as_ref(), true, ) .count(); if count > 300usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxGraphemes { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "data", ), max: 300usize, actual: count, }); } } } { let value = &self.id; #[allow(unused_comparisons)] if ::len(value.as_ref()) > 100usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "id", ), max: 100usize, actual: ::len(value.as_ref()), }); } } Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct PersonalDetailsPref<'a> { /// The birth date of account owner. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub birth_date: std::option::Option, } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for PersonalDetailsPref<'a> { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "personalDetailsPref" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } /// 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. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct PostInteractionSettingsPref<'a> { /// 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 = "std::option::Option::is_none")] #[serde(borrow)] pub postgate_embedding_rules: std::option::Option< Vec>, >, /// 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 = "std::option::Option::is_none")] #[serde(borrow)] pub threadgate_allow_rules: std::option::Option< Vec>, >, } #[jacquard_derive::open_union] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(tag = "$type")] #[serde(bound(deserialize = "'de: 'a"))] pub enum PostInteractionSettingsPrefThreadgateAllowRulesItem<'a> { #[serde(rename = "app.bsky.feed.threadgate#mentionRule")] ThreadgateMentionRule(Box>), #[serde(rename = "app.bsky.feed.threadgate#followerRule")] ThreadgateFollowerRule(Box>), #[serde(rename = "app.bsky.feed.threadgate#followingRule")] ThreadgateFollowingRule(Box>), #[serde(rename = "app.bsky.feed.threadgate#listRule")] ThreadgateListRule(Box>), } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for PostInteractionSettingsPref<'a> { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "postInteractionSettingsPref" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { if let Some(ref value) = self.postgate_embedding_rules { #[allow(unused_comparisons)] if value.len() > 5usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::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(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "threadgate_allow_rules", ), max: 5usize, actual: value.len(), }); } } Ok(()) } } #[jacquard_derive::open_union] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(tag = "$type")] #[serde(bound(deserialize = "'de: 'a"))] pub enum PreferencesItem<'a> { #[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#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>), } pub type Preferences<'a> = Vec>; #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct ProfileAssociated<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub activity_subscription: std::option::Option< crate::app_bsky::actor::ProfileAssociatedActivitySubscription<'a>, >, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub chat: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub feedgens: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub labeler: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub lists: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub starter_packs: std::option::Option, } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ProfileAssociated<'a> { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "profileAssociated" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct ProfileAssociatedActivitySubscription<'a> { #[serde(borrow)] pub allow_subscriptions: ProfileAssociatedActivitySubscriptionAllowSubscriptions<'a>, } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum ProfileAssociatedActivitySubscriptionAllowSubscriptions<'a> { Followers, Mutuals, None, Other(jacquard_common::CowStr<'a>), } impl<'a> ProfileAssociatedActivitySubscriptionAllowSubscriptions<'a> { pub fn as_str(&self) -> &str { match self { Self::Followers => "followers", Self::Mutuals => "mutuals", Self::None => "none", Self::Other(s) => s.as_ref(), } } } impl<'a> From<&'a str> for ProfileAssociatedActivitySubscriptionAllowSubscriptions<'a> { fn from(s: &'a str) -> Self { match s { "followers" => Self::Followers, "mutuals" => Self::Mutuals, "none" => Self::None, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> From for ProfileAssociatedActivitySubscriptionAllowSubscriptions<'a> { fn from(s: String) -> Self { match s.as_str() { "followers" => Self::Followers, "mutuals" => Self::Mutuals, "none" => Self::None, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> core::fmt::Display for ProfileAssociatedActivitySubscriptionAllowSubscriptions<'a> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{}", self.as_str()) } } impl<'a> AsRef for ProfileAssociatedActivitySubscriptionAllowSubscriptions<'a> { fn as_ref(&self) -> &str { self.as_str() } } impl<'a> serde::Serialize for ProfileAssociatedActivitySubscriptionAllowSubscriptions<'a> { fn serialize(&self, serializer: S) -> Result where S: serde::Serializer, { serializer.serialize_str(self.as_str()) } } impl<'de, 'a> serde::Deserialize<'de> for ProfileAssociatedActivitySubscriptionAllowSubscriptions<'a> where 'de: 'a, { fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'de>, { let s = <&'de str>::deserialize(deserializer)?; Ok(Self::from(s)) } } impl<'a> Default for ProfileAssociatedActivitySubscriptionAllowSubscriptions<'a> { fn default() -> Self { Self::Other(Default::default()) } } impl jacquard_common::IntoStatic for ProfileAssociatedActivitySubscriptionAllowSubscriptions<'_> { type Output = ProfileAssociatedActivitySubscriptionAllowSubscriptions<'static>; 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(), ) } } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ProfileAssociatedActivitySubscription<'a> { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "profileAssociatedActivitySubscription" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct ProfileAssociatedChat<'a> { #[serde(borrow)] pub allow_incoming: ProfileAssociatedChatAllowIncoming<'a>, } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum ProfileAssociatedChatAllowIncoming<'a> { All, None, Following, Other(jacquard_common::CowStr<'a>), } impl<'a> ProfileAssociatedChatAllowIncoming<'a> { pub fn as_str(&self) -> &str { match self { Self::All => "all", Self::None => "none", Self::Following => "following", Self::Other(s) => s.as_ref(), } } } impl<'a> From<&'a str> for ProfileAssociatedChatAllowIncoming<'a> { fn from(s: &'a str) -> Self { match s { "all" => Self::All, "none" => Self::None, "following" => Self::Following, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> From for ProfileAssociatedChatAllowIncoming<'a> { fn from(s: String) -> Self { match s.as_str() { "all" => Self::All, "none" => Self::None, "following" => Self::Following, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> core::fmt::Display for ProfileAssociatedChatAllowIncoming<'a> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{}", self.as_str()) } } impl<'a> AsRef for ProfileAssociatedChatAllowIncoming<'a> { fn as_ref(&self) -> &str { self.as_str() } } impl<'a> serde::Serialize for ProfileAssociatedChatAllowIncoming<'a> { fn serialize(&self, serializer: S) -> Result where S: serde::Serializer, { serializer.serialize_str(self.as_str()) } } impl<'de, 'a> serde::Deserialize<'de> for ProfileAssociatedChatAllowIncoming<'a> where 'de: 'a, { fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'de>, { let s = <&'de str>::deserialize(deserializer)?; Ok(Self::from(s)) } } impl<'a> Default for ProfileAssociatedChatAllowIncoming<'a> { fn default() -> Self { Self::Other(Default::default()) } } impl jacquard_common::IntoStatic for ProfileAssociatedChatAllowIncoming<'_> { type Output = ProfileAssociatedChatAllowIncoming<'static>; 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()) } } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ProfileAssociatedChat<'a> { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "profileAssociatedChat" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ProfileView<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub associated: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub avatar: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub created_at: std::option::Option, /// Debug information for internal development #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub debug: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub description: std::option::Option>, #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub display_name: std::option::Option>, #[serde(borrow)] pub handle: jacquard_common::types::string::Handle<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub indexed_at: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub labels: std::option::Option>>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub pronouns: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub status: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub verification: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub viewer: std::option::Option>, } 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 Handle; type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Handle = Unset; type Did = Unset; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData S>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { type Handle = Set; type Did = S::Did; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { type Handle = S::Handle; type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `handle` field pub struct handle(()); ///Marker type for the `did` field pub struct did(()); } } /// Builder for constructing an instance of this type pub struct ProfileViewBuilder<'a, S: profile_view_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ::core::option::Option>, ::core::option::Option, ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option, ::core::option::Option>>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> ProfileView<'a> { /// Create a new builder for this type pub fn new() -> ProfileViewBuilder<'a, profile_view_state::Empty> { ProfileViewBuilder::new() } } impl<'a> ProfileViewBuilder<'a, profile_view_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { ProfileViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: ( None, None, None, None, None, None, None, None, None, None, None, None, None, None, ), _phantom: ::core::marker::PhantomData, } } } impl<'a, S: profile_view_state::State> ProfileViewBuilder<'a, S> { /// Set the `associated` field (optional) pub fn associated( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.0 = value.into(); self } /// Set the `associated` field to an Option value (optional) pub fn maybe_associated( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.0 = value; self } } impl<'a, S: profile_view_state::State> ProfileViewBuilder<'a, S> { /// Set the `avatar` field (optional) pub fn avatar( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.1 = value.into(); self } /// Set the `avatar` field to an Option value (optional) pub fn maybe_avatar( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.1 = value; self } } impl<'a, S: profile_view_state::State> ProfileViewBuilder<'a, S> { /// Set the `createdAt` field (optional) pub fn created_at( mut self, value: impl Into>, ) -> Self { self.__unsafe_private_named.2 = value.into(); self } /// Set the `createdAt` field to an Option value (optional) pub fn maybe_created_at( mut self, value: Option, ) -> Self { self.__unsafe_private_named.2 = value; self } } impl<'a, S: profile_view_state::State> ProfileViewBuilder<'a, S> { /// Set the `debug` field (optional) pub fn debug( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.3 = value.into(); self } /// Set the `debug` field to an Option value (optional) pub fn maybe_debug( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.3 = value; self } } impl<'a, S: profile_view_state::State> ProfileViewBuilder<'a, S> { /// Set the `description` field (optional) pub fn description( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.4 = value.into(); self } /// Set the `description` field to an Option value (optional) pub fn maybe_description( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.4 = value; self } } impl<'a, S> ProfileViewBuilder<'a, S> where S: profile_view_state::State, S::Did: profile_view_state::IsUnset, { /// Set the `did` field (required) pub fn did( mut self, value: impl Into>, ) -> ProfileViewBuilder<'a, profile_view_state::SetDid> { self.__unsafe_private_named.5 = ::core::option::Option::Some(value.into()); ProfileViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: profile_view_state::State> ProfileViewBuilder<'a, S> { /// Set the `displayName` field (optional) pub fn display_name( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.6 = value.into(); self } /// Set the `displayName` field to an Option value (optional) pub fn maybe_display_name( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.6 = value; self } } impl<'a, S> ProfileViewBuilder<'a, S> where S: profile_view_state::State, S::Handle: profile_view_state::IsUnset, { /// Set the `handle` field (required) pub fn handle( mut self, value: impl Into>, ) -> ProfileViewBuilder<'a, profile_view_state::SetHandle> { self.__unsafe_private_named.7 = ::core::option::Option::Some(value.into()); ProfileViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: profile_view_state::State> ProfileViewBuilder<'a, S> { /// Set the `indexedAt` field (optional) pub fn indexed_at( mut self, value: impl Into>, ) -> Self { self.__unsafe_private_named.8 = value.into(); self } /// Set the `indexedAt` field to an Option value (optional) pub fn maybe_indexed_at( mut self, value: Option, ) -> Self { self.__unsafe_private_named.8 = value; self } } impl<'a, S: profile_view_state::State> ProfileViewBuilder<'a, S> { /// Set the `labels` field (optional) pub fn labels( mut self, value: impl Into>>>, ) -> Self { self.__unsafe_private_named.9 = value.into(); self } /// Set the `labels` field to an Option value (optional) pub fn maybe_labels( mut self, value: Option>>, ) -> Self { self.__unsafe_private_named.9 = value; self } } impl<'a, S: profile_view_state::State> ProfileViewBuilder<'a, S> { /// Set the `pronouns` field (optional) pub fn pronouns( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.10 = value.into(); self } /// Set the `pronouns` field to an Option value (optional) pub fn maybe_pronouns(mut self, value: Option>) -> Self { self.__unsafe_private_named.10 = value; self } } impl<'a, S: profile_view_state::State> ProfileViewBuilder<'a, S> { /// Set the `status` field (optional) pub fn status( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.11 = value.into(); self } /// Set the `status` field to an Option value (optional) pub fn maybe_status( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.11 = value; self } } impl<'a, S: profile_view_state::State> ProfileViewBuilder<'a, S> { /// Set the `verification` field (optional) pub fn verification( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.12 = value.into(); self } /// Set the `verification` field to an Option value (optional) pub fn maybe_verification( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.12 = value; self } } impl<'a, S: profile_view_state::State> ProfileViewBuilder<'a, S> { /// Set the `viewer` field (optional) pub fn viewer( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.13 = value.into(); self } /// Set the `viewer` field to an Option value (optional) pub fn maybe_viewer( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.13 = value; self } } impl<'a, S> ProfileViewBuilder<'a, S> where S: profile_view_state::State, S::Handle: profile_view_state::IsSet, S::Did: profile_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ProfileView<'a> { ProfileView { associated: self.__unsafe_private_named.0, avatar: self.__unsafe_private_named.1, created_at: self.__unsafe_private_named.2, debug: self.__unsafe_private_named.3, description: self.__unsafe_private_named.4, did: self.__unsafe_private_named.5.unwrap(), display_name: self.__unsafe_private_named.6, handle: self.__unsafe_private_named.7.unwrap(), indexed_at: self.__unsafe_private_named.8, labels: self.__unsafe_private_named.9, pronouns: self.__unsafe_private_named.10, status: self.__unsafe_private_named.11, verification: self.__unsafe_private_named.12, viewer: self.__unsafe_private_named.13, extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> ProfileView<'a> { ProfileView { associated: self.__unsafe_private_named.0, avatar: self.__unsafe_private_named.1, created_at: self.__unsafe_private_named.2, debug: self.__unsafe_private_named.3, description: self.__unsafe_private_named.4, did: self.__unsafe_private_named.5.unwrap(), display_name: self.__unsafe_private_named.6, handle: self.__unsafe_private_named.7.unwrap(), indexed_at: self.__unsafe_private_named.8, labels: self.__unsafe_private_named.9, pronouns: self.__unsafe_private_named.10, status: self.__unsafe_private_named.11, verification: self.__unsafe_private_named.12, viewer: self.__unsafe_private_named.13, extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ProfileView<'a> { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "profileView" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { if let Some(ref value) = self.description { #[allow(unused_comparisons)] if ::len(value.as_ref()) > 2560usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "description", ), max: 2560usize, actual: ::len(value.as_ref()), }); } } if let Some(ref value) = self.description { { let count = ::unicode_segmentation::UnicodeSegmentation::graphemes( value.as_ref(), true, ) .count(); if count > 256usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxGraphemes { path: ::jacquard_lexicon::validation::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(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "display_name", ), max: 640usize, actual: ::len(value.as_ref()), }); } } if let Some(ref value) = self.display_name { { let count = ::unicode_segmentation::UnicodeSegmentation::graphemes( value.as_ref(), true, ) .count(); if count > 64usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxGraphemes { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "display_name", ), max: 64usize, actual: count, }); } } } Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ProfileViewBasic<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub associated: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub avatar: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub created_at: std::option::Option, /// Debug information for internal development #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub debug: std::option::Option>, #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub display_name: std::option::Option>, #[serde(borrow)] pub handle: jacquard_common::types::string::Handle<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub labels: std::option::Option>>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub pronouns: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub status: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub verification: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub viewer: std::option::Option>, } 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 Handle; type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Handle = Unset; type Did = Unset; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData S>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { type Handle = Set; type Did = S::Did; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { type Handle = S::Handle; type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `handle` field pub struct handle(()); ///Marker type for the `did` field pub struct did(()); } } /// Builder for constructing an instance of this type pub struct ProfileViewBasicBuilder<'a, S: profile_view_basic_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ::core::option::Option>, ::core::option::Option, ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option>>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> ProfileViewBasic<'a> { /// Create a new builder for this type pub fn new() -> ProfileViewBasicBuilder<'a, profile_view_basic_state::Empty> { ProfileViewBasicBuilder::new() } } impl<'a> ProfileViewBasicBuilder<'a, profile_view_basic_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { ProfileViewBasicBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: ( None, None, None, None, None, None, None, None, None, None, None, None, ), _phantom: ::core::marker::PhantomData, } } } impl<'a, S: profile_view_basic_state::State> ProfileViewBasicBuilder<'a, S> { /// Set the `associated` field (optional) pub fn associated( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.0 = value.into(); self } /// Set the `associated` field to an Option value (optional) pub fn maybe_associated( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.0 = value; self } } impl<'a, S: profile_view_basic_state::State> ProfileViewBasicBuilder<'a, S> { /// Set the `avatar` field (optional) pub fn avatar( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.1 = value.into(); self } /// Set the `avatar` field to an Option value (optional) pub fn maybe_avatar( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.1 = value; self } } impl<'a, S: profile_view_basic_state::State> ProfileViewBasicBuilder<'a, S> { /// Set the `createdAt` field (optional) pub fn created_at( mut self, value: impl Into>, ) -> Self { self.__unsafe_private_named.2 = value.into(); self } /// Set the `createdAt` field to an Option value (optional) pub fn maybe_created_at( mut self, value: Option, ) -> Self { self.__unsafe_private_named.2 = value; self } } impl<'a, S: profile_view_basic_state::State> ProfileViewBasicBuilder<'a, S> { /// Set the `debug` field (optional) pub fn debug( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.3 = value.into(); self } /// Set the `debug` field to an Option value (optional) pub fn maybe_debug( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.3 = value; self } } impl<'a, S> ProfileViewBasicBuilder<'a, S> where S: profile_view_basic_state::State, S::Did: profile_view_basic_state::IsUnset, { /// Set the `did` field (required) pub fn did( mut self, value: impl Into>, ) -> ProfileViewBasicBuilder<'a, profile_view_basic_state::SetDid> { self.__unsafe_private_named.4 = ::core::option::Option::Some(value.into()); ProfileViewBasicBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: profile_view_basic_state::State> ProfileViewBasicBuilder<'a, S> { /// Set the `displayName` field (optional) pub fn display_name( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.5 = value.into(); self } /// Set the `displayName` field to an Option value (optional) pub fn maybe_display_name( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.5 = value; self } } impl<'a, S> ProfileViewBasicBuilder<'a, S> where S: profile_view_basic_state::State, S::Handle: profile_view_basic_state::IsUnset, { /// Set the `handle` field (required) pub fn handle( mut self, value: impl Into>, ) -> ProfileViewBasicBuilder<'a, profile_view_basic_state::SetHandle> { self.__unsafe_private_named.6 = ::core::option::Option::Some(value.into()); ProfileViewBasicBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: profile_view_basic_state::State> ProfileViewBasicBuilder<'a, S> { /// Set the `labels` field (optional) pub fn labels( mut self, value: impl Into>>>, ) -> Self { self.__unsafe_private_named.7 = value.into(); self } /// Set the `labels` field to an Option value (optional) pub fn maybe_labels( mut self, value: Option>>, ) -> Self { self.__unsafe_private_named.7 = value; self } } impl<'a, S: profile_view_basic_state::State> ProfileViewBasicBuilder<'a, S> { /// Set the `pronouns` field (optional) pub fn pronouns( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.8 = value.into(); self } /// Set the `pronouns` field to an Option value (optional) pub fn maybe_pronouns(mut self, value: Option>) -> Self { self.__unsafe_private_named.8 = value; self } } impl<'a, S: profile_view_basic_state::State> ProfileViewBasicBuilder<'a, S> { /// Set the `status` field (optional) pub fn status( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.9 = value.into(); self } /// Set the `status` field to an Option value (optional) pub fn maybe_status( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.9 = value; self } } impl<'a, S: profile_view_basic_state::State> ProfileViewBasicBuilder<'a, S> { /// Set the `verification` field (optional) pub fn verification( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.10 = value.into(); self } /// Set the `verification` field to an Option value (optional) pub fn maybe_verification( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.10 = value; self } } impl<'a, S: profile_view_basic_state::State> ProfileViewBasicBuilder<'a, S> { /// Set the `viewer` field (optional) pub fn viewer( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.11 = value.into(); self } /// Set the `viewer` field to an Option value (optional) pub fn maybe_viewer( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.11 = value; self } } impl<'a, S> ProfileViewBasicBuilder<'a, S> where S: profile_view_basic_state::State, S::Handle: profile_view_basic_state::IsSet, S::Did: profile_view_basic_state::IsSet, { /// Build the final struct pub fn build(self) -> ProfileViewBasic<'a> { ProfileViewBasic { associated: self.__unsafe_private_named.0, avatar: self.__unsafe_private_named.1, created_at: self.__unsafe_private_named.2, debug: self.__unsafe_private_named.3, did: self.__unsafe_private_named.4.unwrap(), display_name: self.__unsafe_private_named.5, handle: self.__unsafe_private_named.6.unwrap(), labels: self.__unsafe_private_named.7, pronouns: self.__unsafe_private_named.8, status: self.__unsafe_private_named.9, verification: self.__unsafe_private_named.10, viewer: self.__unsafe_private_named.11, extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> ProfileViewBasic<'a> { ProfileViewBasic { associated: self.__unsafe_private_named.0, avatar: self.__unsafe_private_named.1, created_at: self.__unsafe_private_named.2, debug: self.__unsafe_private_named.3, did: self.__unsafe_private_named.4.unwrap(), display_name: self.__unsafe_private_named.5, handle: self.__unsafe_private_named.6.unwrap(), labels: self.__unsafe_private_named.7, pronouns: self.__unsafe_private_named.8, status: self.__unsafe_private_named.9, verification: self.__unsafe_private_named.10, viewer: self.__unsafe_private_named.11, extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ProfileViewBasic<'a> { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "profileViewBasic" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { if let Some(ref value) = self.display_name { #[allow(unused_comparisons)] if ::len(value.as_ref()) > 640usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "display_name", ), max: 640usize, actual: ::len(value.as_ref()), }); } } if let Some(ref value) = self.display_name { { let count = ::unicode_segmentation::UnicodeSegmentation::graphemes( value.as_ref(), true, ) .count(); if count > 64usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxGraphemes { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "display_name", ), max: 64usize, actual: count, }); } } } Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ProfileViewDetailed<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub associated: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub avatar: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub banner: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub created_at: std::option::Option, /// Debug information for internal development #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub debug: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub description: std::option::Option>, #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub display_name: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub followers_count: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub follows_count: std::option::Option, #[serde(borrow)] pub handle: jacquard_common::types::string::Handle<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub indexed_at: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub joined_via_starter_pack: std::option::Option< crate::app_bsky::graph::StarterPackViewBasic<'a>, >, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub labels: std::option::Option>>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub pinned_post: std::option::Option< crate::com_atproto::repo::strong_ref::StrongRef<'a>, >, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub posts_count: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub pronouns: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub status: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub verification: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub viewer: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub website: std::option::Option>, } 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 S>); impl sealed::Sealed for SetDid {} impl State for SetDid { type Did = Set; type Handle = S::Handle; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData S>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { type Did = S::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<'a, S: profile_view_detailed_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option, ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option, ::core::option::Option, ::core::option::Option>, ::core::option::Option, ::core::option::Option>, ::core::option::Option>>, ::core::option::Option>, ::core::option::Option, ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> ProfileViewDetailed<'a> { /// Create a new builder for this type pub fn new() -> ProfileViewDetailedBuilder<'a, profile_view_detailed_state::Empty> { ProfileViewDetailedBuilder::new() } } impl<'a> ProfileViewDetailedBuilder<'a, profile_view_detailed_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { ProfileViewDetailedBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: ( None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, ), _phantom: ::core::marker::PhantomData, } } } impl<'a, S: profile_view_detailed_state::State> ProfileViewDetailedBuilder<'a, S> { /// Set the `associated` field (optional) pub fn associated( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.0 = value.into(); self } /// Set the `associated` field to an Option value (optional) pub fn maybe_associated( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.0 = value; self } } impl<'a, S: profile_view_detailed_state::State> ProfileViewDetailedBuilder<'a, S> { /// Set the `avatar` field (optional) pub fn avatar( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.1 = value.into(); self } /// Set the `avatar` field to an Option value (optional) pub fn maybe_avatar( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.1 = value; self } } impl<'a, S: profile_view_detailed_state::State> ProfileViewDetailedBuilder<'a, S> { /// Set the `banner` field (optional) pub fn banner( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.2 = value.into(); self } /// Set the `banner` field to an Option value (optional) pub fn maybe_banner( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.2 = value; self } } impl<'a, S: profile_view_detailed_state::State> ProfileViewDetailedBuilder<'a, S> { /// Set the `createdAt` field (optional) pub fn created_at( mut self, value: impl Into>, ) -> Self { self.__unsafe_private_named.3 = value.into(); self } /// Set the `createdAt` field to an Option value (optional) pub fn maybe_created_at( mut self, value: Option, ) -> Self { self.__unsafe_private_named.3 = value; self } } impl<'a, S: profile_view_detailed_state::State> ProfileViewDetailedBuilder<'a, S> { /// Set the `debug` field (optional) pub fn debug( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.4 = value.into(); self } /// Set the `debug` field to an Option value (optional) pub fn maybe_debug( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.4 = value; self } } impl<'a, S: profile_view_detailed_state::State> ProfileViewDetailedBuilder<'a, S> { /// Set the `description` field (optional) pub fn description( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.5 = value.into(); self } /// Set the `description` field to an Option value (optional) pub fn maybe_description( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.5 = value; self } } impl<'a, S> ProfileViewDetailedBuilder<'a, S> where S: profile_view_detailed_state::State, S::Did: profile_view_detailed_state::IsUnset, { /// Set the `did` field (required) pub fn did( mut self, value: impl Into>, ) -> ProfileViewDetailedBuilder<'a, profile_view_detailed_state::SetDid> { self.__unsafe_private_named.6 = ::core::option::Option::Some(value.into()); ProfileViewDetailedBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: profile_view_detailed_state::State> ProfileViewDetailedBuilder<'a, S> { /// Set the `displayName` field (optional) pub fn display_name( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.7 = value.into(); self } /// Set the `displayName` field to an Option value (optional) pub fn maybe_display_name( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.7 = value; self } } impl<'a, S: profile_view_detailed_state::State> ProfileViewDetailedBuilder<'a, S> { /// Set the `followersCount` field (optional) pub fn followers_count(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.8 = value.into(); self } /// Set the `followersCount` field to an Option value (optional) pub fn maybe_followers_count(mut self, value: Option) -> Self { self.__unsafe_private_named.8 = value; self } } impl<'a, S: profile_view_detailed_state::State> ProfileViewDetailedBuilder<'a, S> { /// Set the `followsCount` field (optional) pub fn follows_count(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.9 = value.into(); self } /// Set the `followsCount` field to an Option value (optional) pub fn maybe_follows_count(mut self, value: Option) -> Self { self.__unsafe_private_named.9 = value; self } } impl<'a, S> ProfileViewDetailedBuilder<'a, S> where S: profile_view_detailed_state::State, S::Handle: profile_view_detailed_state::IsUnset, { /// Set the `handle` field (required) pub fn handle( mut self, value: impl Into>, ) -> ProfileViewDetailedBuilder<'a, profile_view_detailed_state::SetHandle> { self.__unsafe_private_named.10 = ::core::option::Option::Some(value.into()); ProfileViewDetailedBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: profile_view_detailed_state::State> ProfileViewDetailedBuilder<'a, S> { /// Set the `indexedAt` field (optional) pub fn indexed_at( mut self, value: impl Into>, ) -> Self { self.__unsafe_private_named.11 = value.into(); self } /// Set the `indexedAt` field to an Option value (optional) pub fn maybe_indexed_at( mut self, value: Option, ) -> Self { self.__unsafe_private_named.11 = value; self } } impl<'a, S: profile_view_detailed_state::State> ProfileViewDetailedBuilder<'a, S> { /// Set the `joinedViaStarterPack` field (optional) pub fn joined_via_starter_pack( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.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.__unsafe_private_named.12 = value; self } } impl<'a, S: profile_view_detailed_state::State> ProfileViewDetailedBuilder<'a, S> { /// Set the `labels` field (optional) pub fn labels( mut self, value: impl Into>>>, ) -> Self { self.__unsafe_private_named.13 = value.into(); self } /// Set the `labels` field to an Option value (optional) pub fn maybe_labels( mut self, value: Option>>, ) -> Self { self.__unsafe_private_named.13 = value; self } } impl<'a, S: profile_view_detailed_state::State> ProfileViewDetailedBuilder<'a, S> { /// Set the `pinnedPost` field (optional) pub fn pinned_post( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.14 = value.into(); self } /// Set the `pinnedPost` field to an Option value (optional) pub fn maybe_pinned_post( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.14 = value; self } } impl<'a, S: profile_view_detailed_state::State> ProfileViewDetailedBuilder<'a, S> { /// Set the `postsCount` field (optional) pub fn posts_count(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.15 = value.into(); self } /// Set the `postsCount` field to an Option value (optional) pub fn maybe_posts_count(mut self, value: Option) -> Self { self.__unsafe_private_named.15 = value; self } } impl<'a, S: profile_view_detailed_state::State> ProfileViewDetailedBuilder<'a, S> { /// Set the `pronouns` field (optional) pub fn pronouns( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.16 = value.into(); self } /// Set the `pronouns` field to an Option value (optional) pub fn maybe_pronouns(mut self, value: Option>) -> Self { self.__unsafe_private_named.16 = value; self } } impl<'a, S: profile_view_detailed_state::State> ProfileViewDetailedBuilder<'a, S> { /// Set the `status` field (optional) pub fn status( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.17 = value.into(); self } /// Set the `status` field to an Option value (optional) pub fn maybe_status( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.17 = value; self } } impl<'a, S: profile_view_detailed_state::State> ProfileViewDetailedBuilder<'a, S> { /// Set the `verification` field (optional) pub fn verification( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.18 = value.into(); self } /// Set the `verification` field to an Option value (optional) pub fn maybe_verification( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.18 = value; self } } impl<'a, S: profile_view_detailed_state::State> ProfileViewDetailedBuilder<'a, S> { /// Set the `viewer` field (optional) pub fn viewer( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.19 = value.into(); self } /// Set the `viewer` field to an Option value (optional) pub fn maybe_viewer( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.19 = value; self } } impl<'a, S: profile_view_detailed_state::State> ProfileViewDetailedBuilder<'a, S> { /// Set the `website` field (optional) pub fn website( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.20 = value.into(); self } /// Set the `website` field to an Option value (optional) pub fn maybe_website( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.20 = value; self } } impl<'a, S> ProfileViewDetailedBuilder<'a, S> where S: profile_view_detailed_state::State, S::Did: profile_view_detailed_state::IsSet, S::Handle: profile_view_detailed_state::IsSet, { /// Build the final struct pub fn build(self) -> ProfileViewDetailed<'a> { ProfileViewDetailed { associated: self.__unsafe_private_named.0, avatar: self.__unsafe_private_named.1, banner: self.__unsafe_private_named.2, created_at: self.__unsafe_private_named.3, debug: self.__unsafe_private_named.4, description: self.__unsafe_private_named.5, did: self.__unsafe_private_named.6.unwrap(), display_name: self.__unsafe_private_named.7, followers_count: self.__unsafe_private_named.8, follows_count: self.__unsafe_private_named.9, handle: self.__unsafe_private_named.10.unwrap(), indexed_at: self.__unsafe_private_named.11, joined_via_starter_pack: self.__unsafe_private_named.12, labels: self.__unsafe_private_named.13, pinned_post: self.__unsafe_private_named.14, posts_count: self.__unsafe_private_named.15, pronouns: self.__unsafe_private_named.16, status: self.__unsafe_private_named.17, verification: self.__unsafe_private_named.18, viewer: self.__unsafe_private_named.19, website: self.__unsafe_private_named.20, extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> ProfileViewDetailed<'a> { ProfileViewDetailed { associated: self.__unsafe_private_named.0, avatar: self.__unsafe_private_named.1, banner: self.__unsafe_private_named.2, created_at: self.__unsafe_private_named.3, debug: self.__unsafe_private_named.4, description: self.__unsafe_private_named.5, did: self.__unsafe_private_named.6.unwrap(), display_name: self.__unsafe_private_named.7, followers_count: self.__unsafe_private_named.8, follows_count: self.__unsafe_private_named.9, handle: self.__unsafe_private_named.10.unwrap(), indexed_at: self.__unsafe_private_named.11, joined_via_starter_pack: self.__unsafe_private_named.12, labels: self.__unsafe_private_named.13, pinned_post: self.__unsafe_private_named.14, posts_count: self.__unsafe_private_named.15, pronouns: self.__unsafe_private_named.16, status: self.__unsafe_private_named.17, verification: self.__unsafe_private_named.18, viewer: self.__unsafe_private_named.19, website: self.__unsafe_private_named.20, extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ProfileViewDetailed<'a> { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "profileViewDetailed" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { if let Some(ref value) = self.description { #[allow(unused_comparisons)] if ::len(value.as_ref()) > 2560usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "description", ), max: 2560usize, actual: ::len(value.as_ref()), }); } } if let Some(ref value) = self.description { { let count = ::unicode_segmentation::UnicodeSegmentation::graphemes( value.as_ref(), true, ) .count(); if count > 256usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxGraphemes { path: ::jacquard_lexicon::validation::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(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "display_name", ), max: 640usize, actual: ::len(value.as_ref()), }); } } if let Some(ref value) = self.display_name { { let count = ::unicode_segmentation::UnicodeSegmentation::graphemes( value.as_ref(), true, ) .count(); if count > 64usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxGraphemes { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "display_name", ), max: 64usize, actual: count, }); } } } Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct SavedFeed<'a> { #[serde(borrow)] pub id: jacquard_common::CowStr<'a>, pub pinned: bool, #[serde(borrow)] pub r#type: SavedFeedType<'a>, #[serde(borrow)] pub value: jacquard_common::CowStr<'a>, } 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 Type; type Value; type Pinned; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Id = Unset; type Type = Unset; type Value = Unset; type Pinned = Unset; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData S>); impl sealed::Sealed for SetId {} impl State for SetId { type Id = Set; type Type = S::Type; type Value = S::Value; type Pinned = S::Pinned; } ///State transition - sets the `type` field to Set pub struct SetType(PhantomData S>); impl sealed::Sealed for SetType {} impl State for SetType { type Id = S::Id; type Type = Set; type Value = S::Value; type Pinned = S::Pinned; } ///State transition - sets the `value` field to Set pub struct SetValue(PhantomData S>); impl sealed::Sealed for SetValue {} impl State for SetValue { type Id = S::Id; type Type = S::Type; type Value = Set; type Pinned = S::Pinned; } ///State transition - sets the `pinned` field to Set pub struct SetPinned(PhantomData S>); impl sealed::Sealed for SetPinned {} impl State for SetPinned { type Id = S::Id; type Type = S::Type; type Value = S::Value; type Pinned = 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 `type` field pub struct r#type(()); ///Marker type for the `value` field pub struct value(()); ///Marker type for the `pinned` field pub struct pinned(()); } } /// Builder for constructing an instance of this type pub struct SavedFeedBuilder<'a, S: saved_feed_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ::core::option::Option, ::core::option::Option>, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> SavedFeed<'a> { /// Create a new builder for this type pub fn new() -> SavedFeedBuilder<'a, saved_feed_state::Empty> { SavedFeedBuilder::new() } } impl<'a> SavedFeedBuilder<'a, saved_feed_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { SavedFeedBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> SavedFeedBuilder<'a, S> where S: saved_feed_state::State, S::Id: saved_feed_state::IsUnset, { /// Set the `id` field (required) pub fn id( mut self, value: impl Into>, ) -> SavedFeedBuilder<'a, saved_feed_state::SetId> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); SavedFeedBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> SavedFeedBuilder<'a, S> where S: saved_feed_state::State, S::Pinned: saved_feed_state::IsUnset, { /// Set the `pinned` field (required) pub fn pinned( mut self, value: impl Into, ) -> SavedFeedBuilder<'a, saved_feed_state::SetPinned> { self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); SavedFeedBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> SavedFeedBuilder<'a, S> where S: saved_feed_state::State, S::Type: saved_feed_state::IsUnset, { /// Set the `type` field (required) pub fn r#type( mut self, value: impl Into>, ) -> SavedFeedBuilder<'a, saved_feed_state::SetType> { self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); SavedFeedBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> SavedFeedBuilder<'a, S> where S: saved_feed_state::State, S::Value: saved_feed_state::IsUnset, { /// Set the `value` field (required) pub fn value( mut self, value: impl Into>, ) -> SavedFeedBuilder<'a, saved_feed_state::SetValue> { self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into()); SavedFeedBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> SavedFeedBuilder<'a, S> where S: saved_feed_state::State, S::Id: saved_feed_state::IsSet, S::Type: saved_feed_state::IsSet, S::Value: saved_feed_state::IsSet, S::Pinned: saved_feed_state::IsSet, { /// Build the final struct pub fn build(self) -> SavedFeed<'a> { SavedFeed { id: self.__unsafe_private_named.0.unwrap(), pinned: self.__unsafe_private_named.1.unwrap(), r#type: self.__unsafe_private_named.2.unwrap(), value: self.__unsafe_private_named.3.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> SavedFeed<'a> { SavedFeed { id: self.__unsafe_private_named.0.unwrap(), pinned: self.__unsafe_private_named.1.unwrap(), r#type: self.__unsafe_private_named.2.unwrap(), value: self.__unsafe_private_named.3.unwrap(), extra_data: Some(extra_data), } } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum SavedFeedType<'a> { Feed, List, Timeline, Other(jacquard_common::CowStr<'a>), } impl<'a> SavedFeedType<'a> { pub fn as_str(&self) -> &str { match self { Self::Feed => "feed", Self::List => "list", Self::Timeline => "timeline", Self::Other(s) => s.as_ref(), } } } impl<'a> From<&'a str> for SavedFeedType<'a> { fn from(s: &'a str) -> Self { match s { "feed" => Self::Feed, "list" => Self::List, "timeline" => Self::Timeline, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> From for SavedFeedType<'a> { fn from(s: String) -> Self { match s.as_str() { "feed" => Self::Feed, "list" => Self::List, "timeline" => Self::Timeline, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> core::fmt::Display for SavedFeedType<'a> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{}", self.as_str()) } } impl<'a> AsRef for SavedFeedType<'a> { fn as_ref(&self) -> &str { self.as_str() } } impl<'a> serde::Serialize for SavedFeedType<'a> { fn serialize(&self, serializer: S) -> Result where S: serde::Serializer, { serializer.serialize_str(self.as_str()) } } impl<'de, 'a> serde::Deserialize<'de> for SavedFeedType<'a> where 'de: 'a, { fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'de>, { let s = <&'de str>::deserialize(deserializer)?; Ok(Self::from(s)) } } impl<'a> Default for SavedFeedType<'a> { fn default() -> Self { Self::Other(Default::default()) } } impl jacquard_common::IntoStatic for SavedFeedType<'_> { type Output = SavedFeedType<'static>; 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()), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for SavedFeed<'a> { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "savedFeed" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct SavedFeedsPref<'a> { #[serde(borrow)] pub pinned: Vec>, #[serde(borrow)] pub saved: Vec>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub timeline_index: std::option::Option, } 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 S>); impl sealed::Sealed for SetPinned {} impl State for SetPinned { type Pinned = Set; type Saved = S::Saved; } ///State transition - sets the `saved` field to Set pub struct SetSaved(PhantomData S>); impl sealed::Sealed for SetSaved {} impl State for SetSaved { type Pinned = S::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<'a, S: saved_feeds_pref_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>>, ::core::option::Option>>, ::core::option::Option, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> SavedFeedsPref<'a> { /// Create a new builder for this type pub fn new() -> SavedFeedsPrefBuilder<'a, saved_feeds_pref_state::Empty> { SavedFeedsPrefBuilder::new() } } impl<'a> SavedFeedsPrefBuilder<'a, saved_feeds_pref_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { SavedFeedsPrefBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> SavedFeedsPrefBuilder<'a, S> where S: saved_feeds_pref_state::State, S::Pinned: saved_feeds_pref_state::IsUnset, { /// Set the `pinned` field (required) pub fn pinned( mut self, value: impl Into>>, ) -> SavedFeedsPrefBuilder<'a, saved_feeds_pref_state::SetPinned> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); SavedFeedsPrefBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> SavedFeedsPrefBuilder<'a, S> where S: saved_feeds_pref_state::State, S::Saved: saved_feeds_pref_state::IsUnset, { /// Set the `saved` field (required) pub fn saved( mut self, value: impl Into>>, ) -> SavedFeedsPrefBuilder<'a, saved_feeds_pref_state::SetSaved> { self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); SavedFeedsPrefBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: saved_feeds_pref_state::State> SavedFeedsPrefBuilder<'a, S> { /// Set the `timelineIndex` field (optional) pub fn timeline_index(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.2 = value.into(); self } /// Set the `timelineIndex` field to an Option value (optional) pub fn maybe_timeline_index(mut self, value: Option) -> Self { self.__unsafe_private_named.2 = value; self } } impl<'a, S> SavedFeedsPrefBuilder<'a, S> where S: saved_feeds_pref_state::State, S::Pinned: saved_feeds_pref_state::IsSet, S::Saved: saved_feeds_pref_state::IsSet, { /// Build the final struct pub fn build(self) -> SavedFeedsPref<'a> { SavedFeedsPref { pinned: self.__unsafe_private_named.0.unwrap(), saved: self.__unsafe_private_named.1.unwrap(), timeline_index: self.__unsafe_private_named.2, extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> SavedFeedsPref<'a> { SavedFeedsPref { pinned: self.__unsafe_private_named.0.unwrap(), saved: self.__unsafe_private_named.1.unwrap(), timeline_index: self.__unsafe_private_named.2, extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for SavedFeedsPref<'a> { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "savedFeedsPref" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct SavedFeedsPrefV2<'a> { #[serde(borrow)] pub items: Vec>, } 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 S>); 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<'a, S: saved_feeds_pref_v2_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> SavedFeedsPrefV2<'a> { /// Create a new builder for this type pub fn new() -> SavedFeedsPrefV2Builder<'a, saved_feeds_pref_v2_state::Empty> { SavedFeedsPrefV2Builder::new() } } impl<'a> SavedFeedsPrefV2Builder<'a, saved_feeds_pref_v2_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { SavedFeedsPrefV2Builder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None,), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> SavedFeedsPrefV2Builder<'a, S> where S: saved_feeds_pref_v2_state::State, S::Items: saved_feeds_pref_v2_state::IsUnset, { /// Set the `items` field (required) pub fn items( mut self, value: impl Into>>, ) -> SavedFeedsPrefV2Builder<'a, saved_feeds_pref_v2_state::SetItems> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); SavedFeedsPrefV2Builder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> SavedFeedsPrefV2Builder<'a, S> where S: saved_feeds_pref_v2_state::State, S::Items: saved_feeds_pref_v2_state::IsSet, { /// Build the final struct pub fn build(self) -> SavedFeedsPrefV2<'a> { SavedFeedsPrefV2 { items: self.__unsafe_private_named.0.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> SavedFeedsPrefV2<'a> { SavedFeedsPrefV2 { items: self.__unsafe_private_named.0.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for SavedFeedsPrefV2<'a> { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "savedFeedsPrefV2" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct StatusView<'a> { /// An optional embed associated with the status. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub embed: std::option::Option>, /// The date when this status will expire. The application might choose to no longer return the status after expiration. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub expires_at: std::option::Option, /// True if the status is not expired, false if it is expired. Only present if expiration was set. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub is_active: std::option::Option, #[serde(borrow)] pub record: jacquard_common::types::value::Data<'a>, /// The status for the account. #[serde(borrow)] pub status: StatusViewStatus<'a>, } 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 Status; type Record; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Status = Unset; type Record = Unset; } ///State transition - sets the `status` field to Set pub struct SetStatus(PhantomData S>); impl sealed::Sealed for SetStatus {} impl State for SetStatus { type Status = Set; type Record = S::Record; } ///State transition - sets the `record` field to Set pub struct SetRecord(PhantomData S>); impl sealed::Sealed for SetRecord {} impl State for SetRecord { type Status = S::Status; type Record = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `status` field pub struct status(()); ///Marker type for the `record` field pub struct record(()); } } /// Builder for constructing an instance of this type pub struct StatusViewBuilder<'a, S: status_view_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ::core::option::Option, ::core::option::Option, ::core::option::Option>, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> StatusView<'a> { /// Create a new builder for this type pub fn new() -> StatusViewBuilder<'a, status_view_state::Empty> { StatusViewBuilder::new() } } impl<'a> StatusViewBuilder<'a, status_view_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { StatusViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S: status_view_state::State> StatusViewBuilder<'a, S> { /// Set the `embed` field (optional) pub fn embed( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.0 = value.into(); self } /// Set the `embed` field to an Option value (optional) pub fn maybe_embed( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.0 = value; self } } impl<'a, S: status_view_state::State> StatusViewBuilder<'a, S> { /// Set the `expiresAt` field (optional) pub fn expires_at( mut self, value: impl Into>, ) -> Self { self.__unsafe_private_named.1 = value.into(); self } /// Set the `expiresAt` field to an Option value (optional) pub fn maybe_expires_at( mut self, value: Option, ) -> Self { self.__unsafe_private_named.1 = value; self } } impl<'a, S: status_view_state::State> StatusViewBuilder<'a, S> { /// Set the `isActive` field (optional) pub fn is_active(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.2 = value.into(); self } /// Set the `isActive` field to an Option value (optional) pub fn maybe_is_active(mut self, value: Option) -> Self { self.__unsafe_private_named.2 = value; self } } impl<'a, S> StatusViewBuilder<'a, S> where S: status_view_state::State, S::Record: status_view_state::IsUnset, { /// Set the `record` field (required) pub fn record( mut self, value: impl Into>, ) -> StatusViewBuilder<'a, status_view_state::SetRecord> { self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into()); StatusViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> StatusViewBuilder<'a, S> where S: status_view_state::State, S::Status: status_view_state::IsUnset, { /// Set the `status` field (required) pub fn status( mut self, value: impl Into>, ) -> StatusViewBuilder<'a, status_view_state::SetStatus> { self.__unsafe_private_named.4 = ::core::option::Option::Some(value.into()); StatusViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> StatusViewBuilder<'a, S> where S: status_view_state::State, S::Status: status_view_state::IsSet, S::Record: status_view_state::IsSet, { /// Build the final struct pub fn build(self) -> StatusView<'a> { StatusView { embed: self.__unsafe_private_named.0, expires_at: self.__unsafe_private_named.1, is_active: self.__unsafe_private_named.2, record: self.__unsafe_private_named.3.unwrap(), status: self.__unsafe_private_named.4.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> StatusView<'a> { StatusView { embed: self.__unsafe_private_named.0, expires_at: self.__unsafe_private_named.1, is_active: self.__unsafe_private_named.2, record: self.__unsafe_private_named.3.unwrap(), status: self.__unsafe_private_named.4.unwrap(), extra_data: Some(extra_data), } } } /// The status for the account. #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum StatusViewStatus<'a> { Live, Other(jacquard_common::CowStr<'a>), } impl<'a> StatusViewStatus<'a> { pub fn as_str(&self) -> &str { match self { Self::Live => "app.bsky.actor.status#live", Self::Other(s) => s.as_ref(), } } } impl<'a> From<&'a str> for StatusViewStatus<'a> { fn from(s: &'a str) -> Self { match s { "app.bsky.actor.status#live" => Self::Live, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> From for StatusViewStatus<'a> { fn from(s: String) -> Self { match s.as_str() { "app.bsky.actor.status#live" => Self::Live, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> core::fmt::Display for StatusViewStatus<'a> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{}", self.as_str()) } } impl<'a> AsRef for StatusViewStatus<'a> { fn as_ref(&self) -> &str { self.as_str() } } impl<'a> serde::Serialize for StatusViewStatus<'a> { fn serialize(&self, serializer: S) -> Result where S: serde::Serializer, { serializer.serialize_str(self.as_str()) } } impl<'de, 'a> serde::Deserialize<'de> for StatusViewStatus<'a> where 'de: 'a, { fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'de>, { let s = <&'de str>::deserialize(deserializer)?; Ok(Self::from(s)) } } impl<'a> Default for StatusViewStatus<'a> { fn default() -> Self { Self::Other(Default::default()) } } impl jacquard_common::IntoStatic for StatusViewStatus<'_> { type Output = StatusViewStatus<'static>; fn into_static(self) -> Self::Output { match self { StatusViewStatus::Live => StatusViewStatus::Live, StatusViewStatus::Other(v) => StatusViewStatus::Other(v.into_static()), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for StatusView<'a> { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "statusView" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct ThreadViewPref<'a> { /// Sorting mode for threads. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub sort: std::option::Option>, } /// Sorting mode for threads. #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum ThreadViewPrefSort<'a> { Oldest, Newest, MostLikes, Random, Hotness, Other(jacquard_common::CowStr<'a>), } impl<'a> ThreadViewPrefSort<'a> { 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(), } } } impl<'a> From<&'a str> for ThreadViewPrefSort<'a> { fn from(s: &'a str) -> Self { match s { "oldest" => Self::Oldest, "newest" => Self::Newest, "most-likes" => Self::MostLikes, "random" => Self::Random, "hotness" => Self::Hotness, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> From for ThreadViewPrefSort<'a> { fn from(s: String) -> Self { match s.as_str() { "oldest" => Self::Oldest, "newest" => Self::Newest, "most-likes" => Self::MostLikes, "random" => Self::Random, "hotness" => Self::Hotness, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> core::fmt::Display for ThreadViewPrefSort<'a> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{}", self.as_str()) } } impl<'a> AsRef for ThreadViewPrefSort<'a> { fn as_ref(&self) -> &str { self.as_str() } } impl<'a> serde::Serialize for ThreadViewPrefSort<'a> { fn serialize(&self, serializer: S) -> Result where S: serde::Serializer, { serializer.serialize_str(self.as_str()) } } impl<'de, 'a> serde::Deserialize<'de> for ThreadViewPrefSort<'a> where 'de: 'a, { fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'de>, { let s = <&'de str>::deserialize(deserializer)?; Ok(Self::from(s)) } } impl<'a> Default for ThreadViewPrefSort<'a> { fn default() -> Self { Self::Other(Default::default()) } } impl jacquard_common::IntoStatic for ThreadViewPrefSort<'_> { type Output = ThreadViewPrefSort<'static>; 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()), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ThreadViewPref<'a> { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "threadViewPref" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } /// Preferences for how verified accounts appear in the app. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct VerificationPrefs<'a> { /// Hide the blue check badges for verified accounts and trusted verifiers. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub hide_badges: std::option::Option, } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for VerificationPrefs<'a> { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "verificationPrefs" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } /// Represents the verification information about the user this object is attached to. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct VerificationState<'a> { /// The user's status as a trusted verifier. #[serde(borrow)] pub trusted_verifier_status: VerificationStateTrustedVerifierStatus<'a>, /// All verifications issued by trusted verifiers on behalf of this user. Verifications by untrusted verifiers are not included. #[serde(borrow)] pub verifications: Vec>, /// The user's status as a verified account. #[serde(borrow)] pub verified_status: VerificationStateVerifiedStatus<'a>, } 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 VerifiedStatus; type TrustedVerifierStatus; type Verifications; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type VerifiedStatus = Unset; type TrustedVerifierStatus = Unset; type Verifications = Unset; } ///State transition - sets the `verified_status` field to Set pub struct SetVerifiedStatus(PhantomData S>); impl sealed::Sealed for SetVerifiedStatus {} impl State for SetVerifiedStatus { type VerifiedStatus = Set; type TrustedVerifierStatus = S::TrustedVerifierStatus; type Verifications = S::Verifications; } ///State transition - sets the `trusted_verifier_status` field to Set pub struct SetTrustedVerifierStatus(PhantomData S>); impl sealed::Sealed for SetTrustedVerifierStatus {} impl State for SetTrustedVerifierStatus { type VerifiedStatus = S::VerifiedStatus; type TrustedVerifierStatus = Set; type Verifications = S::Verifications; } ///State transition - sets the `verifications` field to Set pub struct SetVerifications(PhantomData S>); impl sealed::Sealed for SetVerifications {} impl State for SetVerifications { type VerifiedStatus = S::VerifiedStatus; type TrustedVerifierStatus = S::TrustedVerifierStatus; type Verifications = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `verified_status` field pub struct verified_status(()); ///Marker type for the `trusted_verifier_status` field pub struct trusted_verifier_status(()); ///Marker type for the `verifications` field pub struct verifications(()); } } /// Builder for constructing an instance of this type pub struct VerificationStateBuilder<'a, S: verification_state_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ::core::option::Option>>, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> VerificationState<'a> { /// Create a new builder for this type pub fn new() -> VerificationStateBuilder<'a, verification_state_state::Empty> { VerificationStateBuilder::new() } } impl<'a> VerificationStateBuilder<'a, verification_state_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { VerificationStateBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> VerificationStateBuilder<'a, S> where S: verification_state_state::State, S::TrustedVerifierStatus: verification_state_state::IsUnset, { /// Set the `trustedVerifierStatus` field (required) pub fn trusted_verifier_status( mut self, value: impl Into>, ) -> VerificationStateBuilder< 'a, verification_state_state::SetTrustedVerifierStatus, > { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); VerificationStateBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> VerificationStateBuilder<'a, S> where S: verification_state_state::State, S::Verifications: verification_state_state::IsUnset, { /// Set the `verifications` field (required) pub fn verifications( mut self, value: impl Into>>, ) -> VerificationStateBuilder<'a, verification_state_state::SetVerifications> { self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); VerificationStateBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> VerificationStateBuilder<'a, S> where S: verification_state_state::State, S::VerifiedStatus: verification_state_state::IsUnset, { /// Set the `verifiedStatus` field (required) pub fn verified_status( mut self, value: impl Into>, ) -> VerificationStateBuilder<'a, verification_state_state::SetVerifiedStatus> { self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); VerificationStateBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> VerificationStateBuilder<'a, S> where S: verification_state_state::State, S::VerifiedStatus: verification_state_state::IsSet, S::TrustedVerifierStatus: verification_state_state::IsSet, S::Verifications: verification_state_state::IsSet, { /// Build the final struct pub fn build(self) -> VerificationState<'a> { VerificationState { trusted_verifier_status: self.__unsafe_private_named.0.unwrap(), verifications: self.__unsafe_private_named.1.unwrap(), verified_status: self.__unsafe_private_named.2.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> VerificationState<'a> { VerificationState { trusted_verifier_status: self.__unsafe_private_named.0.unwrap(), verifications: self.__unsafe_private_named.1.unwrap(), verified_status: self.__unsafe_private_named.2.unwrap(), extra_data: Some(extra_data), } } } /// The user's status as a trusted verifier. #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum VerificationStateTrustedVerifierStatus<'a> { Valid, Invalid, None, Other(jacquard_common::CowStr<'a>), } impl<'a> VerificationStateTrustedVerifierStatus<'a> { pub fn as_str(&self) -> &str { match self { Self::Valid => "valid", Self::Invalid => "invalid", Self::None => "none", Self::Other(s) => s.as_ref(), } } } impl<'a> From<&'a str> for VerificationStateTrustedVerifierStatus<'a> { fn from(s: &'a str) -> Self { match s { "valid" => Self::Valid, "invalid" => Self::Invalid, "none" => Self::None, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> From for VerificationStateTrustedVerifierStatus<'a> { fn from(s: String) -> Self { match s.as_str() { "valid" => Self::Valid, "invalid" => Self::Invalid, "none" => Self::None, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> core::fmt::Display for VerificationStateTrustedVerifierStatus<'a> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{}", self.as_str()) } } impl<'a> AsRef for VerificationStateTrustedVerifierStatus<'a> { fn as_ref(&self) -> &str { self.as_str() } } impl<'a> serde::Serialize for VerificationStateTrustedVerifierStatus<'a> { fn serialize(&self, serializer: S) -> Result where S: serde::Serializer, { serializer.serialize_str(self.as_str()) } } impl<'de, 'a> serde::Deserialize<'de> for VerificationStateTrustedVerifierStatus<'a> where 'de: 'a, { fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'de>, { let s = <&'de str>::deserialize(deserializer)?; Ok(Self::from(s)) } } impl<'a> Default for VerificationStateTrustedVerifierStatus<'a> { fn default() -> Self { Self::Other(Default::default()) } } impl jacquard_common::IntoStatic for VerificationStateTrustedVerifierStatus<'_> { type Output = VerificationStateTrustedVerifierStatus<'static>; 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<'a> { Valid, Invalid, None, Other(jacquard_common::CowStr<'a>), } impl<'a> VerificationStateVerifiedStatus<'a> { pub fn as_str(&self) -> &str { match self { Self::Valid => "valid", Self::Invalid => "invalid", Self::None => "none", Self::Other(s) => s.as_ref(), } } } impl<'a> From<&'a str> for VerificationStateVerifiedStatus<'a> { fn from(s: &'a str) -> Self { match s { "valid" => Self::Valid, "invalid" => Self::Invalid, "none" => Self::None, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> From for VerificationStateVerifiedStatus<'a> { fn from(s: String) -> Self { match s.as_str() { "valid" => Self::Valid, "invalid" => Self::Invalid, "none" => Self::None, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> core::fmt::Display for VerificationStateVerifiedStatus<'a> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{}", self.as_str()) } } impl<'a> AsRef for VerificationStateVerifiedStatus<'a> { fn as_ref(&self) -> &str { self.as_str() } } impl<'a> serde::Serialize for VerificationStateVerifiedStatus<'a> { fn serialize(&self, serializer: S) -> Result where S: serde::Serializer, { serializer.serialize_str(self.as_str()) } } impl<'de, 'a> serde::Deserialize<'de> for VerificationStateVerifiedStatus<'a> where 'de: 'a, { fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'de>, { let s = <&'de str>::deserialize(deserializer)?; Ok(Self::from(s)) } } impl<'a> Default for VerificationStateVerifiedStatus<'a> { fn default() -> Self { Self::Other(Default::default()) } } impl jacquard_common::IntoStatic for VerificationStateVerifiedStatus<'_> { type Output = VerificationStateVerifiedStatus<'static>; 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()) } } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for VerificationState<'a> { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "verificationState" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } /// An individual verification for an associated subject. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct VerificationView<'a> { /// Timestamp when the verification was created. pub created_at: jacquard_common::types::string::Datetime, /// True if the verification passes validation, otherwise false. pub is_valid: bool, /// The user who issued this verification. #[serde(borrow)] pub issuer: jacquard_common::types::string::Did<'a>, /// The AT-URI of the verification record. #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } 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 Issuer; type Uri; type IsValid; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type CreatedAt = Unset; type Issuer = Unset; type Uri = Unset; type IsValid = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type CreatedAt = Set; type Issuer = S::Issuer; type Uri = S::Uri; type IsValid = S::IsValid; } ///State transition - sets the `issuer` field to Set pub struct SetIssuer(PhantomData S>); impl sealed::Sealed for SetIssuer {} impl State for SetIssuer { type CreatedAt = S::CreatedAt; type Issuer = Set; type Uri = S::Uri; type IsValid = S::IsValid; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { type CreatedAt = S::CreatedAt; type Issuer = S::Issuer; type Uri = Set; type IsValid = S::IsValid; } ///State transition - sets the `is_valid` field to Set pub struct SetIsValid(PhantomData S>); impl sealed::Sealed for SetIsValid {} impl State for SetIsValid { type CreatedAt = S::CreatedAt; type Issuer = S::Issuer; type Uri = S::Uri; type IsValid = 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 `issuer` field pub struct issuer(()); ///Marker type for the `uri` field pub struct uri(()); ///Marker type for the `is_valid` field pub struct is_valid(()); } } /// Builder for constructing an instance of this type pub struct VerificationViewBuilder<'a, S: verification_view_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option, ::core::option::Option, ::core::option::Option>, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> VerificationView<'a> { /// Create a new builder for this type pub fn new() -> VerificationViewBuilder<'a, verification_view_state::Empty> { VerificationViewBuilder::new() } } impl<'a> VerificationViewBuilder<'a, verification_view_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { VerificationViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> VerificationViewBuilder<'a, S> where S: verification_view_state::State, S::CreatedAt: verification_view_state::IsUnset, { /// Set the `createdAt` field (required) pub fn created_at( mut self, value: impl Into, ) -> VerificationViewBuilder<'a, verification_view_state::SetCreatedAt> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); VerificationViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> VerificationViewBuilder<'a, S> where S: verification_view_state::State, S::IsValid: verification_view_state::IsUnset, { /// Set the `isValid` field (required) pub fn is_valid( mut self, value: impl Into, ) -> VerificationViewBuilder<'a, verification_view_state::SetIsValid> { self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); VerificationViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> VerificationViewBuilder<'a, S> where S: verification_view_state::State, S::Issuer: verification_view_state::IsUnset, { /// Set the `issuer` field (required) pub fn issuer( mut self, value: impl Into>, ) -> VerificationViewBuilder<'a, verification_view_state::SetIssuer> { self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); VerificationViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> VerificationViewBuilder<'a, S> where S: verification_view_state::State, S::Uri: verification_view_state::IsUnset, { /// Set the `uri` field (required) pub fn uri( mut self, value: impl Into>, ) -> VerificationViewBuilder<'a, verification_view_state::SetUri> { self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into()); VerificationViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> VerificationViewBuilder<'a, S> where S: verification_view_state::State, S::CreatedAt: verification_view_state::IsSet, S::Issuer: verification_view_state::IsSet, S::Uri: verification_view_state::IsSet, S::IsValid: verification_view_state::IsSet, { /// Build the final struct pub fn build(self) -> VerificationView<'a> { VerificationView { created_at: self.__unsafe_private_named.0.unwrap(), is_valid: self.__unsafe_private_named.1.unwrap(), issuer: self.__unsafe_private_named.2.unwrap(), uri: self.__unsafe_private_named.3.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> VerificationView<'a> { VerificationView { created_at: self.__unsafe_private_named.0.unwrap(), is_valid: self.__unsafe_private_named.1.unwrap(), issuer: self.__unsafe_private_named.2.unwrap(), uri: self.__unsafe_private_named.3.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for VerificationView<'a> { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "verificationView" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } /// Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct ViewerState<'a> { /// This property is present only in selected cases, as an optimization. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub activity_subscription: std::option::Option< crate::app_bsky::notification::ActivitySubscription<'a>, >, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub blocked_by: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub blocking: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub blocking_by_list: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub followed_by: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub following: std::option::Option>, /// This property is present only in selected cases, as an optimization. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub known_followers: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub muted: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub muted_by_list: std::option::Option>, } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ViewerState<'a> { fn nsid() -> &'static str { "app.bsky.actor.defs" } fn def_name() -> &'static str { "viewerState" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } }