// @generated by jacquard-lexicon. DO NOT EDIT. // // Lexicon: sh.weaver.actor.defs // // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. pub mod get_actor_entries; pub mod get_actor_notebooks; pub mod get_profile; pub mod get_suggested_authors; pub mod profile; pub mod search_actors; pub mod search_actors_typeahead; /// A single author in a Weaver notebook. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct Author<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, /// signed bytes of the corresponding notebook record in the author's repo #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(default, with = "jacquard_common::opt_serde_bytes_helper")] pub signature: std::option::Option, } pub mod author_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 AuthorBuilder<'a, S: author_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ::core::option::Option, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> Author<'a> { /// Create a new builder for this type pub fn new() -> AuthorBuilder<'a, author_state::Empty> { AuthorBuilder::new() } } impl<'a> AuthorBuilder<'a, author_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { AuthorBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> AuthorBuilder<'a, S> where S: author_state::State, S::Did: author_state::IsUnset, { /// Set the `did` field (required) pub fn did( mut self, value: impl Into>, ) -> AuthorBuilder<'a, author_state::SetDid> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); AuthorBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: author_state::State> AuthorBuilder<'a, S> { /// Set the `signature` field (optional) pub fn signature(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.1 = value.into(); self } /// Set the `signature` field to an Option value (optional) pub fn maybe_signature(mut self, value: Option) -> Self { self.__unsafe_private_named.1 = value; self } } impl<'a, S> AuthorBuilder<'a, S> where S: author_state::State, S::Did: author_state::IsSet, { /// Build the final struct pub fn build(self) -> Author<'a> { Author { did: self.__unsafe_private_named.0.unwrap(), signature: self.__unsafe_private_named.1, 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>, >, ) -> Author<'a> { Author { did: self.__unsafe_private_named.0.unwrap(), signature: self.__unsafe_private_named.1, extra_data: Some(extra_data), } } } fn lexicon_doc_sh_weaver_actor_defs() -> ::jacquard_lexicon::lexicon::LexiconDoc< 'static, > { ::jacquard_lexicon::lexicon::LexiconDoc { lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1, id: ::jacquard_common::CowStr::new_static("sh.weaver.actor.defs"), revision: None, description: None, defs: { let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("author"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: Some( ::jacquard_common::CowStr::new_static( "A single author in a Weaver notebook.", ), ), 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.insert( ::jacquard_common::smol_str::SmolStr::new_static( "signature", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Bytes(::jacquard_lexicon::lexicon::LexBytes { description: None, max_length: None, min_length: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("pinnedList"), ::jacquard_lexicon::lexicon::LexUserType::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.repo.strongRef", ), }), min_length: None, max_length: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("profileDataView"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![::jacquard_common::smol_str::SmolStr::new_static("inner")], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "collaborationCount", ), ::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( "entryCount", ), ::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( "followerCount", ), ::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( "followingCount", ), ::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("inner"), ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion { description: None, refs: vec![ ::jacquard_common::CowStr::new_static("#profileView"), ::jacquard_common::CowStr::new_static("app.bsky.actor.defs#profileViewDetailed"), ::jacquard_common::CowStr::new_static("#tangledProfileView") ], closed: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "notebookCount", ), ::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("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("profileDataViewBasic"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![::jacquard_common::smol_str::SmolStr::new_static("inner")], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "followerCount", ), ::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( "followingCount", ), ::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("inner"), ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion { description: None, refs: vec![ ::jacquard_common::CowStr::new_static("#profileViewBasic"), ::jacquard_common::CowStr::new_static("app.bsky.actor.defs#profileViewBasic"), ::jacquard_common::CowStr::new_static("#tangledProfileView") ], closed: None, }), ); 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( "#viewerStateBasic", ), }), ); 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("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("bluesky"), ::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( "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( "description", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: Some(10240usize), min_graphemes: None, max_graphemes: Some(1024usize), 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("links"), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: None, items: ::jacquard_lexicon::lexicon::LexArrayItem::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "Any URI, intended for social profiles or websites, can be used to link DIDs/AT-URIs too.", ), ), 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, }), min_length: Some(0usize), max_length: Some(5usize), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("location"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "Free-form location text.", ), ), format: None, default: None, min_length: None, max_length: Some(400usize), min_graphemes: None, max_graphemes: Some(40usize), r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("pinned"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static("#pinnedList"), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("pronouns"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "#pronounsList", ), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "streamplace", ), ::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( "subscribedCount", ), ::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( "subscriberCount", ), ::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("tangled"), ::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("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("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("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::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "#pronounsList", ), }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("pronounsList"), ::jacquard_lexicon::lexicon::LexUserType::Array(::jacquard_lexicon::lexicon::LexArray { description: None, items: ::jacquard_lexicon::lexicon::LexArrayItem::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: Some(500usize), min_graphemes: None, max_graphemes: Some(50usize), r#enum: None, r#const: None, known_values: None, }), min_length: None, max_length: Some(5usize), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("subscribedNotebook"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: Some( ::jacquard_common::CowStr::new_static( "A notebook the viewer subscribes to without a global follow.", ), ), required: Some( vec![::jacquard_common::smol_str::SmolStr::new_static("uri")], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("path"), ::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("title"), ::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("uri"), ::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 }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("tangledProfileView"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("bluesky"), ::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("bluesky"), ::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( "description", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "Free-form profile description text.", ), ), 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("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("links"), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: None, items: ::jacquard_lexicon::lexicon::LexArrayItem::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "Any URI, intended for social profiles or websites, can be used to link DIDs/AT-URIs too.", ), ), 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, }), min_length: Some(0usize), max_length: Some(5usize), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("location"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "Free-form location text.", ), ), format: None, default: None, min_length: None, max_length: Some(400usize), min_graphemes: None, max_graphemes: Some(40usize), r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "pinnedRepositories", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: Some( ::jacquard_common::CowStr::new_static( "Any ATURI, it is up to appviews to validate these fields.", ), ), 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: Some(0usize), max_length: Some(6usize), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("stats"), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: None, items: ::jacquard_lexicon::lexicon::LexArrayItem::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static("Vanity stats."), ), 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, }), min_length: Some(0usize), max_length: Some(2usize), }), ); 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( "Viewer's relationship state with an actor (detailed version).", ), ), required: None, nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("blocked"), ::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( "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( "followRequested", ), ::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( "followRequestedBy", ), ::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( "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("muted"), ::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( "subscribedNotebooks", ), ::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( "#subscribedNotebook", ), }), min_length: None, max_length: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("viewerStateBasic"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: Some( ::jacquard_common::CowStr::new_static( "Viewer's relationship state with an actor (basic version).", ), ), required: None, nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("blocked"), ::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( "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( "followRequested", ), ::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( "followRequestedBy", ), ::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( "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("muted"), ::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( "subscribedNotebookCount", ), ::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 }, } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Author<'a> { fn nsid() -> &'static str { "sh.weaver.actor.defs" } fn def_name() -> &'static str { "author" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_sh_weaver_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } pub type PinnedList<'a> = Vec>; #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ProfileDataView<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub collaboration_count: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub entry_count: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub follower_count: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub following_count: std::option::Option, #[serde(borrow)] pub inner: ProfileDataViewInner<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub notebook_count: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub viewer: std::option::Option>, } pub mod profile_data_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 Inner; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Inner = Unset; } ///State transition - sets the `inner` field to Set pub struct SetInner(PhantomData S>); impl sealed::Sealed for SetInner {} impl State for SetInner { type Inner = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `inner` field pub struct inner(()); } } /// Builder for constructing an instance of this type pub struct ProfileDataViewBuilder<'a, S: profile_data_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>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> ProfileDataView<'a> { /// Create a new builder for this type pub fn new() -> ProfileDataViewBuilder<'a, profile_data_view_state::Empty> { ProfileDataViewBuilder::new() } } impl<'a> ProfileDataViewBuilder<'a, profile_data_view_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { ProfileDataViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None, None, None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S: profile_data_view_state::State> ProfileDataViewBuilder<'a, S> { /// Set the `collaborationCount` field (optional) pub fn collaboration_count(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.0 = value.into(); self } /// Set the `collaborationCount` field to an Option value (optional) pub fn maybe_collaboration_count(mut self, value: Option) -> Self { self.__unsafe_private_named.0 = value; self } } impl<'a, S: profile_data_view_state::State> ProfileDataViewBuilder<'a, S> { /// Set the `entryCount` field (optional) pub fn entry_count(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.1 = value.into(); self } /// Set the `entryCount` field to an Option value (optional) pub fn maybe_entry_count(mut self, value: Option) -> Self { self.__unsafe_private_named.1 = value; self } } impl<'a, S: profile_data_view_state::State> ProfileDataViewBuilder<'a, S> { /// Set the `followerCount` field (optional) pub fn follower_count(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.2 = value.into(); self } /// Set the `followerCount` field to an Option value (optional) pub fn maybe_follower_count(mut self, value: Option) -> Self { self.__unsafe_private_named.2 = value; self } } impl<'a, S: profile_data_view_state::State> ProfileDataViewBuilder<'a, S> { /// Set the `followingCount` field (optional) pub fn following_count(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.3 = value.into(); self } /// Set the `followingCount` field to an Option value (optional) pub fn maybe_following_count(mut self, value: Option) -> Self { self.__unsafe_private_named.3 = value; self } } impl<'a, S> ProfileDataViewBuilder<'a, S> where S: profile_data_view_state::State, S::Inner: profile_data_view_state::IsUnset, { /// Set the `inner` field (required) pub fn inner( mut self, value: impl Into>, ) -> ProfileDataViewBuilder<'a, profile_data_view_state::SetInner> { self.__unsafe_private_named.4 = ::core::option::Option::Some(value.into()); ProfileDataViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: profile_data_view_state::State> ProfileDataViewBuilder<'a, S> { /// Set the `notebookCount` field (optional) pub fn notebook_count(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.5 = value.into(); self } /// Set the `notebookCount` field to an Option value (optional) pub fn maybe_notebook_count(mut self, value: Option) -> Self { self.__unsafe_private_named.5 = value; self } } impl<'a, S: profile_data_view_state::State> ProfileDataViewBuilder<'a, S> { /// Set the `viewer` field (optional) pub fn viewer( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.6 = 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.6 = value; self } } impl<'a, S> ProfileDataViewBuilder<'a, S> where S: profile_data_view_state::State, S::Inner: profile_data_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ProfileDataView<'a> { ProfileDataView { collaboration_count: self.__unsafe_private_named.0, entry_count: self.__unsafe_private_named.1, follower_count: self.__unsafe_private_named.2, following_count: self.__unsafe_private_named.3, inner: self.__unsafe_private_named.4.unwrap(), notebook_count: self.__unsafe_private_named.5, viewer: self.__unsafe_private_named.6, 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>, >, ) -> ProfileDataView<'a> { ProfileDataView { collaboration_count: self.__unsafe_private_named.0, entry_count: self.__unsafe_private_named.1, follower_count: self.__unsafe_private_named.2, following_count: self.__unsafe_private_named.3, inner: self.__unsafe_private_named.4.unwrap(), notebook_count: self.__unsafe_private_named.5, viewer: self.__unsafe_private_named.6, extra_data: Some(extra_data), } } } #[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 ProfileDataViewInner<'a> { #[serde(rename = "sh.weaver.actor.defs#profileView")] ProfileView(Box>), #[serde(rename = "app.bsky.actor.defs#profileViewDetailed")] ProfileViewDetailed(Box>), #[serde(rename = "sh.weaver.actor.defs#tangledProfileView")] TangledProfileView(Box>), } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ProfileDataView<'a> { fn nsid() -> &'static str { "sh.weaver.actor.defs" } fn def_name() -> &'static str { "profileDataView" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_sh_weaver_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 ProfileDataViewBasic<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub follower_count: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub following_count: std::option::Option, #[serde(borrow)] pub inner: ProfileDataViewBasicInner<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub viewer: std::option::Option>, } pub mod profile_data_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 Inner; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Inner = Unset; } ///State transition - sets the `inner` field to Set pub struct SetInner(PhantomData S>); impl sealed::Sealed for SetInner {} impl State for SetInner { type Inner = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `inner` field pub struct inner(()); } } /// Builder for constructing an instance of this type pub struct ProfileDataViewBasicBuilder<'a, S: profile_data_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>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> ProfileDataViewBasic<'a> { /// Create a new builder for this type pub fn new() -> ProfileDataViewBasicBuilder< 'a, profile_data_view_basic_state::Empty, > { ProfileDataViewBasicBuilder::new() } } impl<'a> ProfileDataViewBasicBuilder<'a, profile_data_view_basic_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { ProfileDataViewBasicBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S: profile_data_view_basic_state::State> ProfileDataViewBasicBuilder<'a, S> { /// Set the `followerCount` field (optional) pub fn follower_count(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.0 = value.into(); self } /// Set the `followerCount` field to an Option value (optional) pub fn maybe_follower_count(mut self, value: Option) -> Self { self.__unsafe_private_named.0 = value; self } } impl<'a, S: profile_data_view_basic_state::State> ProfileDataViewBasicBuilder<'a, S> { /// Set the `followingCount` field (optional) pub fn following_count(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.1 = value.into(); self } /// Set the `followingCount` field to an Option value (optional) pub fn maybe_following_count(mut self, value: Option) -> Self { self.__unsafe_private_named.1 = value; self } } impl<'a, S> ProfileDataViewBasicBuilder<'a, S> where S: profile_data_view_basic_state::State, S::Inner: profile_data_view_basic_state::IsUnset, { /// Set the `inner` field (required) pub fn inner( mut self, value: impl Into>, ) -> ProfileDataViewBasicBuilder<'a, profile_data_view_basic_state::SetInner> { self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); ProfileDataViewBasicBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: profile_data_view_basic_state::State> ProfileDataViewBasicBuilder<'a, S> { /// Set the `viewer` field (optional) pub fn viewer( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.3 = 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.3 = value; self } } impl<'a, S> ProfileDataViewBasicBuilder<'a, S> where S: profile_data_view_basic_state::State, S::Inner: profile_data_view_basic_state::IsSet, { /// Build the final struct pub fn build(self) -> ProfileDataViewBasic<'a> { ProfileDataViewBasic { follower_count: self.__unsafe_private_named.0, following_count: self.__unsafe_private_named.1, inner: self.__unsafe_private_named.2.unwrap(), viewer: self.__unsafe_private_named.3, 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>, >, ) -> ProfileDataViewBasic<'a> { ProfileDataViewBasic { follower_count: self.__unsafe_private_named.0, following_count: self.__unsafe_private_named.1, inner: self.__unsafe_private_named.2.unwrap(), viewer: self.__unsafe_private_named.3, extra_data: Some(extra_data), } } } #[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 ProfileDataViewBasicInner<'a> { #[serde(rename = "sh.weaver.actor.defs#profileViewBasic")] ProfileViewBasic(Box>), #[serde(rename = "app.bsky.actor.defs#profileViewBasic")] BskyProfileViewBasic(Box>), #[serde(rename = "sh.weaver.actor.defs#tangledProfileView")] TangledProfileView(Box>), } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ProfileDataViewBasic<'a> { fn nsid() -> &'static str { "sh.weaver.actor.defs" } fn def_name() -> &'static str { "profileDataViewBasic" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_sh_weaver_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 avatar: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub banner: std::option::Option>, /// Include link to this account on Bluesky. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub bluesky: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub created_at: 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 links: std::option::Option>>, /// Free-form location text. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub location: std::option::Option>, /// Notebooks or other records pinned for display. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub pinned: std::option::Option>, /// Pronouns to use in user-generated content. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub pronouns: std::option::Option>, /// Include link to this account on stream.place. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub streamplace: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub subscribed_count: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub subscriber_count: std::option::Option, /// Include link to this account on Tangled. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub tangled: 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 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 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>, ::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, None, None, None, None, ), _phantom: ::core::marker::PhantomData, } } } 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.0 = 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.0 = value; self } } impl<'a, S: profile_view_state::State> ProfileViewBuilder<'a, S> { /// Set the `banner` field (optional) pub fn banner( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.1 = 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.1 = value; self } } impl<'a, S: profile_view_state::State> ProfileViewBuilder<'a, S> { /// Set the `bluesky` field (optional) pub fn bluesky(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.2 = value.into(); self } /// Set the `bluesky` field to an Option value (optional) pub fn maybe_bluesky(mut self, value: Option) -> Self { self.__unsafe_private_named.2 = 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.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_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 `links` field (optional) pub fn links( mut self, value: impl Into>>>, ) -> Self { self.__unsafe_private_named.10 = value.into(); self } /// Set the `links` field to an Option value (optional) pub fn maybe_links( mut self, value: Option>>, ) -> Self { self.__unsafe_private_named.10 = value; self } } impl<'a, S: profile_view_state::State> ProfileViewBuilder<'a, S> { /// Set the `location` field (optional) pub fn location( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.11 = value.into(); self } /// Set the `location` field to an Option value (optional) pub fn maybe_location(mut self, value: Option>) -> Self { self.__unsafe_private_named.11 = value; self } } impl<'a, S: profile_view_state::State> ProfileViewBuilder<'a, S> { /// Set the `pinned` field (optional) pub fn pinned( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.12 = value.into(); self } /// Set the `pinned` field to an Option value (optional) pub fn maybe_pinned( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.12 = 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.13 = 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.13 = value; self } } impl<'a, S: profile_view_state::State> ProfileViewBuilder<'a, S> { /// Set the `streamplace` field (optional) pub fn streamplace(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.14 = value.into(); self } /// Set the `streamplace` field to an Option value (optional) pub fn maybe_streamplace(mut self, value: Option) -> Self { self.__unsafe_private_named.14 = value; self } } impl<'a, S: profile_view_state::State> ProfileViewBuilder<'a, S> { /// Set the `subscribedCount` field (optional) pub fn subscribed_count(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.15 = value.into(); self } /// Set the `subscribedCount` field to an Option value (optional) pub fn maybe_subscribed_count(mut self, value: Option) -> Self { self.__unsafe_private_named.15 = value; self } } impl<'a, S: profile_view_state::State> ProfileViewBuilder<'a, S> { /// Set the `subscriberCount` field (optional) pub fn subscriber_count(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.16 = value.into(); self } /// Set the `subscriberCount` field to an Option value (optional) pub fn maybe_subscriber_count(mut self, value: Option) -> Self { self.__unsafe_private_named.16 = value; self } } impl<'a, S: profile_view_state::State> ProfileViewBuilder<'a, S> { /// Set the `tangled` field (optional) pub fn tangled(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.17 = value.into(); self } /// Set the `tangled` field to an Option value (optional) pub fn maybe_tangled(mut self, value: Option) -> Self { self.__unsafe_private_named.17 = value; self } } impl<'a, S> ProfileViewBuilder<'a, S> where S: profile_view_state::State, S::Did: profile_view_state::IsSet, S::Handle: profile_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ProfileView<'a> { ProfileView { avatar: self.__unsafe_private_named.0, banner: self.__unsafe_private_named.1, bluesky: self.__unsafe_private_named.2, created_at: 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, links: self.__unsafe_private_named.10, location: self.__unsafe_private_named.11, pinned: self.__unsafe_private_named.12, pronouns: self.__unsafe_private_named.13, streamplace: self.__unsafe_private_named.14, subscribed_count: self.__unsafe_private_named.15, subscriber_count: self.__unsafe_private_named.16, tangled: self.__unsafe_private_named.17, 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 { avatar: self.__unsafe_private_named.0, banner: self.__unsafe_private_named.1, bluesky: self.__unsafe_private_named.2, created_at: 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, links: self.__unsafe_private_named.10, location: self.__unsafe_private_named.11, pinned: self.__unsafe_private_named.12, pronouns: self.__unsafe_private_named.13, streamplace: self.__unsafe_private_named.14, subscribed_count: self.__unsafe_private_named.15, subscriber_count: self.__unsafe_private_named.16, tangled: self.__unsafe_private_named.17, extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ProfileView<'a> { fn nsid() -> &'static str { "sh.weaver.actor.defs" } fn def_name() -> &'static str { "profileView" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_sh_weaver_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()) > 10240usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "description", ), max: 10240usize, 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 > 1024usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxGraphemes { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "description", ), max: 1024usize, 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, }); } } } if let Some(ref value) = self.links { #[allow(unused_comparisons)] if value.len() > 5usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "links", ), max: 5usize, actual: value.len(), }); } } if let Some(ref value) = self.links { #[allow(unused_comparisons)] if value.len() < 0usize { return Err(::jacquard_lexicon::validation::ConstraintError::MinLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "links", ), min: 0usize, actual: value.len(), }); } } if let Some(ref value) = self.location { #[allow(unused_comparisons)] if ::len(value.as_ref()) > 400usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "location", ), max: 400usize, actual: ::len(value.as_ref()), }); } } if let Some(ref value) = self.location { { let count = ::unicode_segmentation::UnicodeSegmentation::graphemes( value.as_ref(), true, ) .count(); if count > 40usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxGraphemes { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "location", ), max: 40usize, 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 avatar: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub created_at: 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>>, /// Pronouns to use in user-generated content. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub pronouns: 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 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 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>, ), _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), _phantom: ::core::marker::PhantomData, } } } 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.0 = 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.0 = 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.1 = 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.1 = 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.2 = ::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.3 = 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.3 = 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.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 `indexedAt` field (optional) pub fn indexed_at( mut self, value: impl Into>, ) -> Self { self.__unsafe_private_named.5 = 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.5 = value; self } } 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.6 = 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.6 = 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.7 = 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.7 = value; self } } impl<'a, S> ProfileViewBasicBuilder<'a, S> where S: profile_view_basic_state::State, S::Did: profile_view_basic_state::IsSet, S::Handle: profile_view_basic_state::IsSet, { /// Build the final struct pub fn build(self) -> ProfileViewBasic<'a> { ProfileViewBasic { avatar: self.__unsafe_private_named.0, created_at: self.__unsafe_private_named.1, did: self.__unsafe_private_named.2.unwrap(), display_name: self.__unsafe_private_named.3, handle: self.__unsafe_private_named.4.unwrap(), indexed_at: self.__unsafe_private_named.5, labels: self.__unsafe_private_named.6, pronouns: self.__unsafe_private_named.7, 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 { avatar: self.__unsafe_private_named.0, created_at: self.__unsafe_private_named.1, did: self.__unsafe_private_named.2.unwrap(), display_name: self.__unsafe_private_named.3, handle: self.__unsafe_private_named.4.unwrap(), indexed_at: self.__unsafe_private_named.5, labels: self.__unsafe_private_named.6, pronouns: self.__unsafe_private_named.7, extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ProfileViewBasic<'a> { fn nsid() -> &'static str { "sh.weaver.actor.defs" } fn def_name() -> &'static str { "profileViewBasic" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_sh_weaver_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(()) } } pub type PronounsList<'a> = Vec>; /// A notebook the viewer subscribes to without a global follow. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct SubscribedNotebook<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub path: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub title: std::option::Option>, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } pub mod subscribed_notebook_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Uri = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `uri` field pub struct uri(()); } } /// Builder for constructing an instance of this type pub struct SubscribedNotebookBuilder<'a, S: subscribed_notebook_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> SubscribedNotebook<'a> { /// Create a new builder for this type pub fn new() -> SubscribedNotebookBuilder<'a, subscribed_notebook_state::Empty> { SubscribedNotebookBuilder::new() } } impl<'a> SubscribedNotebookBuilder<'a, subscribed_notebook_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { SubscribedNotebookBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S: subscribed_notebook_state::State> SubscribedNotebookBuilder<'a, S> { /// Set the `path` field (optional) pub fn path( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.0 = value.into(); self } /// Set the `path` field to an Option value (optional) pub fn maybe_path(mut self, value: Option>) -> Self { self.__unsafe_private_named.0 = value; self } } impl<'a, S: subscribed_notebook_state::State> SubscribedNotebookBuilder<'a, S> { /// Set the `title` field (optional) pub fn title( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.1 = value.into(); self } /// Set the `title` field to an Option value (optional) pub fn maybe_title(mut self, value: Option>) -> Self { self.__unsafe_private_named.1 = value; self } } impl<'a, S> SubscribedNotebookBuilder<'a, S> where S: subscribed_notebook_state::State, S::Uri: subscribed_notebook_state::IsUnset, { /// Set the `uri` field (required) pub fn uri( mut self, value: impl Into>, ) -> SubscribedNotebookBuilder<'a, subscribed_notebook_state::SetUri> { self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); SubscribedNotebookBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> SubscribedNotebookBuilder<'a, S> where S: subscribed_notebook_state::State, S::Uri: subscribed_notebook_state::IsSet, { /// Build the final struct pub fn build(self) -> SubscribedNotebook<'a> { SubscribedNotebook { path: self.__unsafe_private_named.0, title: self.__unsafe_private_named.1, uri: 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>, >, ) -> SubscribedNotebook<'a> { SubscribedNotebook { path: self.__unsafe_private_named.0, title: self.__unsafe_private_named.1, uri: self.__unsafe_private_named.2.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for SubscribedNotebook<'a> { fn nsid() -> &'static str { "sh.weaver.actor.defs" } fn def_name() -> &'static str { "subscribedNotebook" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_sh_weaver_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 TangledProfileView<'a> { /// Include link to this account on Bluesky. pub bluesky: bool, /// Free-form profile description text. #[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(borrow)] pub handle: jacquard_common::types::string::Handle<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub links: std::option::Option>>, /// Free-form location text. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub location: std::option::Option>, /// Any ATURI, it is up to appviews to validate these fields. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub pinned_repositories: std::option::Option< Vec>, >, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub stats: std::option::Option>>, } pub mod tangled_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 Bluesky; type Did; type Handle; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Bluesky = Unset; type Did = Unset; type Handle = Unset; } ///State transition - sets the `bluesky` field to Set pub struct SetBluesky(PhantomData S>); impl sealed::Sealed for SetBluesky {} impl State for SetBluesky { type Bluesky = Set; type Did = S::Did; type Handle = S::Handle; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { type Bluesky = S::Bluesky; 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 Bluesky = S::Bluesky; type Did = S::Did; type Handle = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `bluesky` field pub struct bluesky(()); ///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 TangledProfileViewBuilder<'a, S: tangled_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>>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> TangledProfileView<'a> { /// Create a new builder for this type pub fn new() -> TangledProfileViewBuilder<'a, tangled_profile_view_state::Empty> { TangledProfileViewBuilder::new() } } impl<'a> TangledProfileViewBuilder<'a, tangled_profile_view_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { TangledProfileViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None, None, None, None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> TangledProfileViewBuilder<'a, S> where S: tangled_profile_view_state::State, S::Bluesky: tangled_profile_view_state::IsUnset, { /// Set the `bluesky` field (required) pub fn bluesky( mut self, value: impl Into, ) -> TangledProfileViewBuilder<'a, tangled_profile_view_state::SetBluesky> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); TangledProfileViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: tangled_profile_view_state::State> TangledProfileViewBuilder<'a, S> { /// Set the `description` field (optional) pub fn description( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.1 = 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.1 = value; self } } impl<'a, S> TangledProfileViewBuilder<'a, S> where S: tangled_profile_view_state::State, S::Did: tangled_profile_view_state::IsUnset, { /// Set the `did` field (required) pub fn did( mut self, value: impl Into>, ) -> TangledProfileViewBuilder<'a, tangled_profile_view_state::SetDid> { self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); TangledProfileViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> TangledProfileViewBuilder<'a, S> where S: tangled_profile_view_state::State, S::Handle: tangled_profile_view_state::IsUnset, { /// Set the `handle` field (required) pub fn handle( mut self, value: impl Into>, ) -> TangledProfileViewBuilder<'a, tangled_profile_view_state::SetHandle> { self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into()); TangledProfileViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: tangled_profile_view_state::State> TangledProfileViewBuilder<'a, S> { /// Set the `links` field (optional) pub fn links( mut self, value: impl Into>>>, ) -> Self { self.__unsafe_private_named.4 = value.into(); self } /// Set the `links` field to an Option value (optional) pub fn maybe_links( mut self, value: Option>>, ) -> Self { self.__unsafe_private_named.4 = value; self } } impl<'a, S: tangled_profile_view_state::State> TangledProfileViewBuilder<'a, S> { /// Set the `location` field (optional) pub fn location( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.5 = value.into(); self } /// Set the `location` field to an Option value (optional) pub fn maybe_location(mut self, value: Option>) -> Self { self.__unsafe_private_named.5 = value; self } } impl<'a, S: tangled_profile_view_state::State> TangledProfileViewBuilder<'a, S> { /// Set the `pinnedRepositories` field (optional) pub fn pinned_repositories( mut self, value: impl Into>>>, ) -> Self { self.__unsafe_private_named.6 = value.into(); self } /// Set the `pinnedRepositories` field to an Option value (optional) pub fn maybe_pinned_repositories( mut self, value: Option>>, ) -> Self { self.__unsafe_private_named.6 = value; self } } impl<'a, S: tangled_profile_view_state::State> TangledProfileViewBuilder<'a, S> { /// Set the `stats` field (optional) pub fn stats( mut self, value: impl Into>>>, ) -> Self { self.__unsafe_private_named.7 = value.into(); self } /// Set the `stats` field to an Option value (optional) pub fn maybe_stats( mut self, value: Option>>, ) -> Self { self.__unsafe_private_named.7 = value; self } } impl<'a, S> TangledProfileViewBuilder<'a, S> where S: tangled_profile_view_state::State, S::Bluesky: tangled_profile_view_state::IsSet, S::Did: tangled_profile_view_state::IsSet, S::Handle: tangled_profile_view_state::IsSet, { /// Build the final struct pub fn build(self) -> TangledProfileView<'a> { TangledProfileView { bluesky: self.__unsafe_private_named.0.unwrap(), description: self.__unsafe_private_named.1, did: self.__unsafe_private_named.2.unwrap(), handle: self.__unsafe_private_named.3.unwrap(), links: self.__unsafe_private_named.4, location: self.__unsafe_private_named.5, pinned_repositories: self.__unsafe_private_named.6, stats: self.__unsafe_private_named.7, 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>, >, ) -> TangledProfileView<'a> { TangledProfileView { bluesky: self.__unsafe_private_named.0.unwrap(), description: self.__unsafe_private_named.1, did: self.__unsafe_private_named.2.unwrap(), handle: self.__unsafe_private_named.3.unwrap(), links: self.__unsafe_private_named.4, location: self.__unsafe_private_named.5, pinned_repositories: self.__unsafe_private_named.6, stats: self.__unsafe_private_named.7, extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for TangledProfileView<'a> { fn nsid() -> &'static str { "sh.weaver.actor.defs" } fn def_name() -> &'static str { "tangledProfileView" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_sh_weaver_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.links { #[allow(unused_comparisons)] if value.len() > 5usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "links", ), max: 5usize, actual: value.len(), }); } } if let Some(ref value) = self.links { #[allow(unused_comparisons)] if value.len() < 0usize { return Err(::jacquard_lexicon::validation::ConstraintError::MinLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "links", ), min: 0usize, actual: value.len(), }); } } if let Some(ref value) = self.location { #[allow(unused_comparisons)] if ::len(value.as_ref()) > 400usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "location", ), max: 400usize, actual: ::len(value.as_ref()), }); } } if let Some(ref value) = self.location { { let count = ::unicode_segmentation::UnicodeSegmentation::graphemes( value.as_ref(), true, ) .count(); if count > 40usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxGraphemes { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "location", ), max: 40usize, actual: count, }); } } } if let Some(ref value) = self.pinned_repositories { #[allow(unused_comparisons)] if value.len() > 6usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "pinned_repositories", ), max: 6usize, actual: value.len(), }); } } if let Some(ref value) = self.pinned_repositories { #[allow(unused_comparisons)] if value.len() < 0usize { return Err(::jacquard_lexicon::validation::ConstraintError::MinLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "pinned_repositories", ), min: 0usize, actual: value.len(), }); } } if let Some(ref value) = self.stats { #[allow(unused_comparisons)] if value.len() > 2usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "stats", ), max: 2usize, actual: value.len(), }); } } if let Some(ref value) = self.stats { #[allow(unused_comparisons)] if value.len() < 0usize { return Err(::jacquard_lexicon::validation::ConstraintError::MinLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "stats", ), min: 0usize, actual: value.len(), }); } } Ok(()) } } /// Viewer's relationship state with an actor (detailed version). #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct ViewerState<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub blocked: std::option::Option>, #[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 follow_requested: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub follow_requested_by: std::option::Option< jacquard_common::types::string::AtUri<'a>, >, #[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>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub muted: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub subscribed_notebooks: std::option::Option< Vec>, >, } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ViewerState<'a> { fn nsid() -> &'static str { "sh.weaver.actor.defs" } fn def_name() -> &'static str { "viewerState" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_sh_weaver_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } /// Viewer's relationship state with an actor (basic version). #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct ViewerStateBasic<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub blocked: std::option::Option>, #[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 follow_requested: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub follow_requested_by: std::option::Option< jacquard_common::types::string::AtUri<'a>, >, #[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>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub muted: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub subscribed_notebook_count: std::option::Option, } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ViewerStateBasic<'a> { fn nsid() -> &'static str { "sh.weaver.actor.defs" } fn def_name() -> &'static str { "viewerStateBasic" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_sh_weaver_actor_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } }