// @generated by jacquard-lexicon. DO NOT EDIT. // // Lexicon: app.bsky.feed.defs // // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. pub mod describe_feed_generator; pub mod generator; pub mod get_actor_feeds; pub mod get_actor_likes; pub mod get_author_feed; pub mod get_feed; pub mod get_feed_generator; pub mod get_feed_generators; pub mod get_feed_skeleton; pub mod get_likes; pub mod get_list_feed; pub mod get_post_thread; pub mod get_posts; pub mod get_quotes; pub mod get_reposted_by; pub mod get_suggested_feeds; pub mod get_timeline; pub mod like; pub mod post; pub mod postgate; pub mod repost; pub mod search_posts; pub mod send_interactions; pub mod threadgate; #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct BlockedAuthor<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub viewer: std::option::Option>, } pub mod blocked_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 BlockedAuthorBuilder<'a, S: blocked_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> BlockedAuthor<'a> { /// Create a new builder for this type pub fn new() -> BlockedAuthorBuilder<'a, blocked_author_state::Empty> { BlockedAuthorBuilder::new() } } impl<'a> BlockedAuthorBuilder<'a, blocked_author_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { BlockedAuthorBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> BlockedAuthorBuilder<'a, S> where S: blocked_author_state::State, S::Did: blocked_author_state::IsUnset, { /// Set the `did` field (required) pub fn did( mut self, value: impl Into>, ) -> BlockedAuthorBuilder<'a, blocked_author_state::SetDid> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); BlockedAuthorBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: blocked_author_state::State> BlockedAuthorBuilder<'a, S> { /// Set the `viewer` field (optional) pub fn viewer( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.1 = 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.1 = value; self } } impl<'a, S> BlockedAuthorBuilder<'a, S> where S: blocked_author_state::State, S::Did: blocked_author_state::IsSet, { /// Build the final struct pub fn build(self) -> BlockedAuthor<'a> { BlockedAuthor { did: self.__unsafe_private_named.0.unwrap(), viewer: 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>, >, ) -> BlockedAuthor<'a> { BlockedAuthor { did: self.__unsafe_private_named.0.unwrap(), viewer: self.__unsafe_private_named.1, extra_data: Some(extra_data), } } } fn lexicon_doc_app_bsky_feed_defs() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { ::jacquard_lexicon::lexicon::LexiconDoc { lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1, id: ::jacquard_common::CowStr::new_static("app.bsky.feed.defs"), revision: None, description: None, defs: { let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("blockedAuthor"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![::jacquard_common::smol_str::SmolStr::new_static("did")], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("did"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Did, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.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( "app.bsky.actor.defs#viewerState", ), }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("blockedPost"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("uri"), ::jacquard_common::smol_str::SmolStr::new_static("blocked"), ::jacquard_common::smol_str::SmolStr::new_static("author") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("author"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "#blockedAuthor", ), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("blocked"), ::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("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("clickthroughAuthor"), ::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken { description: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("clickthroughEmbed"), ::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken { description: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("clickthroughItem"), ::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken { description: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("clickthroughReposter"), ::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken { description: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "contentModeUnspecified", ), ::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken { description: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("contentModeVideo"), ::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken { description: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("feedViewPost"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![::jacquard_common::smol_str::SmolStr::new_static("post")], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "feedContext", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "Context provided by feed generator that may be passed back alongside interactions.", ), ), format: None, default: None, min_length: None, max_length: Some(2000usize), min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("post"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static("#postView"), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("reason"), ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion { description: None, refs: vec![ ::jacquard_common::CowStr::new_static("#reasonRepost"), ::jacquard_common::CowStr::new_static("#reasonPin") ], closed: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("reply"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static("#replyRef"), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("reqId"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "Unique identifier per request that may be passed back alongside interactions.", ), ), format: None, default: None, min_length: None, max_length: Some(100usize), min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("generatorView"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("uri"), ::jacquard_common::smol_str::SmolStr::new_static("cid"), ::jacquard_common::smol_str::SmolStr::new_static("did"), ::jacquard_common::smol_str::SmolStr::new_static("creator"), ::jacquard_common::smol_str::SmolStr::new_static("displayName"), ::jacquard_common::smol_str::SmolStr::new_static("indexedAt") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "acceptsInteractions", ), ::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("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("cid"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Cid, ), 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( "contentMode", ), ::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("creator"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "app.bsky.actor.defs#profileView", ), }), ); 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(3000usize), min_graphemes: None, max_graphemes: Some(300usize), r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "descriptionFacets", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: None, items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "app.bsky.richtext.facet", ), }), min_length: None, max_length: 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: 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( "likeCount", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger { description: None, default: None, minimum: Some(0i64), maximum: None, r#enum: None, r#const: 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.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( "#generatorViewerState", ), }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("generatorViewerState"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: None, nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("like"), ::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("interaction"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: None, nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("event"), ::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( "feedContext", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton.", ), ), format: None, default: None, min_length: None, max_length: Some(2000usize), min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("item"), ::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("reqId"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "Unique identifier per request that may be passed back alongside interactions.", ), ), format: None, default: None, min_length: None, max_length: Some(100usize), min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("interactionLike"), ::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken { description: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("interactionQuote"), ::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken { description: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("interactionReply"), ::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken { description: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("interactionRepost"), ::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken { description: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("interactionSeen"), ::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken { description: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("interactionShare"), ::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken { description: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("notFoundPost"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("uri"), ::jacquard_common::smol_str::SmolStr::new_static("notFound") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("notFound"), ::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("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("postView"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("uri"), ::jacquard_common::smol_str::SmolStr::new_static("cid"), ::jacquard_common::smol_str::SmolStr::new_static("author"), ::jacquard_common::smol_str::SmolStr::new_static("record"), ::jacquard_common::smol_str::SmolStr::new_static("indexedAt") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("author"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "app.bsky.actor.defs#profileViewBasic", ), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "bookmarkCount", ), ::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("cid"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Cid, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("debug"), ::jacquard_lexicon::lexicon::LexObjectProperty::Unknown(::jacquard_lexicon::lexicon::LexUnknown { description: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("embed"), ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion { description: None, refs: vec![ ::jacquard_common::CowStr::new_static("app.bsky.embed.images#view"), ::jacquard_common::CowStr::new_static("app.bsky.embed.video#view"), ::jacquard_common::CowStr::new_static("app.bsky.embed.external#view"), ::jacquard_common::CowStr::new_static("app.bsky.embed.record#view"), ::jacquard_common::CowStr::new_static("app.bsky.embed.recordWithMedia#view") ], closed: 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( "likeCount", ), ::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( "quoteCount", ), ::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("record"), ::jacquard_lexicon::lexicon::LexObjectProperty::Unknown(::jacquard_lexicon::lexicon::LexUnknown { description: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "replyCount", ), ::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( "repostCount", ), ::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( "threadgate", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "#threadgateView", ), }), ); 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.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("reasonPin"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: None, nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("reasonRepost"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("by"), ::jacquard_common::smol_str::SmolStr::new_static("indexedAt") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("by"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "app.bsky.actor.defs#profileViewBasic", ), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("cid"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Cid, ), 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("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("replyRef"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("root"), ::jacquard_common::smol_str::SmolStr::new_static("parent") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "grandparentAuthor", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "app.bsky.actor.defs#profileViewBasic", ), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("parent"), ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion { description: None, refs: vec![ ::jacquard_common::CowStr::new_static("#postView"), ::jacquard_common::CowStr::new_static("#notFoundPost"), ::jacquard_common::CowStr::new_static("#blockedPost") ], closed: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("root"), ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion { description: None, refs: vec![ ::jacquard_common::CowStr::new_static("#postView"), ::jacquard_common::CowStr::new_static("#notFoundPost"), ::jacquard_common::CowStr::new_static("#blockedPost") ], closed: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("requestLess"), ::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken { description: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("requestMore"), ::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken { description: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("skeletonFeedPost"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![::jacquard_common::smol_str::SmolStr::new_static("post")], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "feedContext", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: Some( ::jacquard_common::CowStr::new_static( "Context that will be passed through to client and may be passed to feed generator back alongside interactions.", ), ), format: None, default: None, min_length: None, max_length: Some(2000usize), min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("post"), ::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("reason"), ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion { description: None, refs: vec![ ::jacquard_common::CowStr::new_static("#skeletonReasonRepost"), ::jacquard_common::CowStr::new_static("#skeletonReasonPin") ], closed: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("skeletonReasonPin"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: None, nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("skeletonReasonRepost"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![::jacquard_common::smol_str::SmolStr::new_static("repost")], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("repost"), ::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("threadContext"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: Some( ::jacquard_common::CowStr::new_static( "Metadata about this post within the context of the thread it is in.", ), ), required: None, nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "rootAuthorLike", ), ::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("threadViewPost"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![::jacquard_common::smol_str::SmolStr::new_static("post")], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("parent"), ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion { description: None, refs: vec![ ::jacquard_common::CowStr::new_static("#threadViewPost"), ::jacquard_common::CowStr::new_static("#notFoundPost"), ::jacquard_common::CowStr::new_static("#blockedPost") ], closed: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("post"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static("#postView"), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("replies"), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: None, items: ::jacquard_lexicon::lexicon::LexArrayItem::Union(::jacquard_lexicon::lexicon::LexRefUnion { description: None, refs: vec![ ::jacquard_common::CowStr::new_static("#threadViewPost"), ::jacquard_common::CowStr::new_static("#notFoundPost"), ::jacquard_common::CowStr::new_static("#blockedPost") ], closed: None, }), min_length: None, max_length: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "threadContext", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "#threadContext", ), }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("threadgateView"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: None, nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("cid"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Cid, ), 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("lists"), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: None, items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "app.bsky.graph.defs#listViewBasic", ), }), min_length: None, max_length: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("record"), ::jacquard_lexicon::lexicon::LexObjectProperty::Unknown(::jacquard_lexicon::lexicon::LexUnknown { description: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("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("viewerState"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: Some( ::jacquard_common::CowStr::new_static( "Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests.", ), ), required: None, nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "bookmarked", ), ::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( "embeddingDisabled", ), ::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("like"), ::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("pinned"), ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { description: None, default: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "replyDisabled", ), ::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("repost"), ::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( "threadMuted", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { description: None, default: None, r#const: None, }), ); map }, }), ); map }, } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for BlockedAuthor<'a> { fn nsid() -> &'static str { "app.bsky.feed.defs" } fn def_name() -> &'static str { "blockedAuthor" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_feed_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 BlockedPost<'a> { #[serde(borrow)] pub author: crate::app_bsky::feed::BlockedAuthor<'a>, pub blocked: bool, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } pub mod blocked_post_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Uri; type Blocked; type Author; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Uri = Unset; type Blocked = Unset; type Author = 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; type Blocked = S::Blocked; type Author = S::Author; } ///State transition - sets the `blocked` field to Set pub struct SetBlocked(PhantomData S>); impl sealed::Sealed for SetBlocked {} impl State for SetBlocked { type Uri = S::Uri; type Blocked = Set; type Author = S::Author; } ///State transition - sets the `author` field to Set pub struct SetAuthor(PhantomData S>); impl sealed::Sealed for SetAuthor {} impl State for SetAuthor { type Uri = S::Uri; type Blocked = S::Blocked; type Author = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `uri` field pub struct uri(()); ///Marker type for the `blocked` field pub struct blocked(()); ///Marker type for the `author` field pub struct author(()); } } /// Builder for constructing an instance of this type pub struct BlockedPostBuilder<'a, S: blocked_post_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> BlockedPost<'a> { /// Create a new builder for this type pub fn new() -> BlockedPostBuilder<'a, blocked_post_state::Empty> { BlockedPostBuilder::new() } } impl<'a> BlockedPostBuilder<'a, blocked_post_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { BlockedPostBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> BlockedPostBuilder<'a, S> where S: blocked_post_state::State, S::Author: blocked_post_state::IsUnset, { /// Set the `author` field (required) pub fn author( mut self, value: impl Into>, ) -> BlockedPostBuilder<'a, blocked_post_state::SetAuthor> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); BlockedPostBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> BlockedPostBuilder<'a, S> where S: blocked_post_state::State, S::Blocked: blocked_post_state::IsUnset, { /// Set the `blocked` field (required) pub fn blocked( mut self, value: impl Into, ) -> BlockedPostBuilder<'a, blocked_post_state::SetBlocked> { self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); BlockedPostBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> BlockedPostBuilder<'a, S> where S: blocked_post_state::State, S::Uri: blocked_post_state::IsUnset, { /// Set the `uri` field (required) pub fn uri( mut self, value: impl Into>, ) -> BlockedPostBuilder<'a, blocked_post_state::SetUri> { self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); BlockedPostBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> BlockedPostBuilder<'a, S> where S: blocked_post_state::State, S::Uri: blocked_post_state::IsSet, S::Blocked: blocked_post_state::IsSet, S::Author: blocked_post_state::IsSet, { /// Build the final struct pub fn build(self) -> BlockedPost<'a> { BlockedPost { author: self.__unsafe_private_named.0.unwrap(), blocked: self.__unsafe_private_named.1.unwrap(), 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>, >, ) -> BlockedPost<'a> { BlockedPost { author: self.__unsafe_private_named.0.unwrap(), blocked: self.__unsafe_private_named.1.unwrap(), uri: self.__unsafe_private_named.2.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for BlockedPost<'a> { fn nsid() -> &'static str { "app.bsky.feed.defs" } fn def_name() -> &'static str { "blockedPost" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_feed_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } /// User clicked through to the author of the feed item #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Hash, jacquard_derive::IntoStatic )] pub struct ClickthroughAuthor; impl std::fmt::Display for ClickthroughAuthor { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "clickthroughAuthor") } } /// User clicked through to the embedded content of the feed item #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Hash, jacquard_derive::IntoStatic )] pub struct ClickthroughEmbed; impl std::fmt::Display for ClickthroughEmbed { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "clickthroughEmbed") } } /// User clicked through to the feed item #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Hash, jacquard_derive::IntoStatic )] pub struct ClickthroughItem; impl std::fmt::Display for ClickthroughItem { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "clickthroughItem") } } /// User clicked through to the reposter of the feed item #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Hash, jacquard_derive::IntoStatic )] pub struct ClickthroughReposter; impl std::fmt::Display for ClickthroughReposter { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "clickthroughReposter") } } /// Declares the feed generator returns any types of posts. #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Hash, jacquard_derive::IntoStatic )] pub struct ContentModeUnspecified; impl std::fmt::Display for ContentModeUnspecified { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "contentModeUnspecified") } } /// Declares the feed generator returns posts containing app.bsky.embed.video embeds. #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Hash, jacquard_derive::IntoStatic )] pub struct ContentModeVideo; impl std::fmt::Display for ContentModeVideo { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "contentModeVideo") } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct FeedViewPost<'a> { /// Context provided by feed generator that may be passed back alongside interactions. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub feed_context: std::option::Option>, #[serde(borrow)] pub post: crate::app_bsky::feed::PostView<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub reason: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub reply: std::option::Option>, /// Unique identifier per request that may be passed back alongside interactions. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub req_id: std::option::Option>, } pub mod feed_view_post_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Post; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Post = Unset; } ///State transition - sets the `post` field to Set pub struct SetPost(PhantomData S>); impl sealed::Sealed for SetPost {} impl State for SetPost { type Post = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `post` field pub struct post(()); } } /// Builder for constructing an instance of this type pub struct FeedViewPostBuilder<'a, S: feed_view_post_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> FeedViewPost<'a> { /// Create a new builder for this type pub fn new() -> FeedViewPostBuilder<'a, feed_view_post_state::Empty> { FeedViewPostBuilder::new() } } impl<'a> FeedViewPostBuilder<'a, feed_view_post_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { FeedViewPostBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S: feed_view_post_state::State> FeedViewPostBuilder<'a, S> { /// Set the `feedContext` field (optional) pub fn feed_context( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.0 = value.into(); self } /// Set the `feedContext` field to an Option value (optional) pub fn maybe_feed_context( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.0 = value; self } } impl<'a, S> FeedViewPostBuilder<'a, S> where S: feed_view_post_state::State, S::Post: feed_view_post_state::IsUnset, { /// Set the `post` field (required) pub fn post( mut self, value: impl Into>, ) -> FeedViewPostBuilder<'a, feed_view_post_state::SetPost> { self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); FeedViewPostBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: feed_view_post_state::State> FeedViewPostBuilder<'a, S> { /// Set the `reason` field (optional) pub fn reason(mut self, value: impl Into>>) -> Self { self.__unsafe_private_named.2 = value.into(); self } /// Set the `reason` field to an Option value (optional) pub fn maybe_reason(mut self, value: Option>) -> Self { self.__unsafe_private_named.2 = value; self } } impl<'a, S: feed_view_post_state::State> FeedViewPostBuilder<'a, S> { /// Set the `reply` field (optional) pub fn reply( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.3 = value.into(); self } /// Set the `reply` field to an Option value (optional) pub fn maybe_reply( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.3 = value; self } } impl<'a, S: feed_view_post_state::State> FeedViewPostBuilder<'a, S> { /// Set the `reqId` field (optional) pub fn req_id( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.4 = value.into(); self } /// Set the `reqId` field to an Option value (optional) pub fn maybe_req_id(mut self, value: Option>) -> Self { self.__unsafe_private_named.4 = value; self } } impl<'a, S> FeedViewPostBuilder<'a, S> where S: feed_view_post_state::State, S::Post: feed_view_post_state::IsSet, { /// Build the final struct pub fn build(self) -> FeedViewPost<'a> { FeedViewPost { feed_context: self.__unsafe_private_named.0, post: self.__unsafe_private_named.1.unwrap(), reason: self.__unsafe_private_named.2, reply: self.__unsafe_private_named.3, req_id: self.__unsafe_private_named.4, 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>, >, ) -> FeedViewPost<'a> { FeedViewPost { feed_context: self.__unsafe_private_named.0, post: self.__unsafe_private_named.1.unwrap(), reason: self.__unsafe_private_named.2, reply: self.__unsafe_private_named.3, req_id: self.__unsafe_private_named.4, 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 FeedViewPostReason<'a> { #[serde(rename = "app.bsky.feed.defs#reasonRepost")] ReasonRepost(Box>), #[serde(rename = "app.bsky.feed.defs#reasonPin")] ReasonPin(Box>), } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for FeedViewPost<'a> { fn nsid() -> &'static str { "app.bsky.feed.defs" } fn def_name() -> &'static str { "feedViewPost" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_feed_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { if let Some(ref value) = self.feed_context { #[allow(unused_comparisons)] if ::len(value.as_ref()) > 2000usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "feed_context", ), max: 2000usize, actual: ::len(value.as_ref()), }); } } if let Some(ref value) = self.req_id { #[allow(unused_comparisons)] if ::len(value.as_ref()) > 100usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "req_id", ), max: 100usize, actual: ::len(value.as_ref()), }); } } Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct GeneratorView<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub accepts_interactions: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub avatar: std::option::Option>, #[serde(borrow)] pub cid: jacquard_common::types::string::Cid<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub content_mode: std::option::Option>, #[serde(borrow)] pub creator: crate::app_bsky::actor::ProfileView<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub description: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub description_facets: std::option::Option< Vec>, >, #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, #[serde(borrow)] pub display_name: jacquard_common::CowStr<'a>, pub indexed_at: jacquard_common::types::string::Datetime, #[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")] pub like_count: std::option::Option, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub viewer: std::option::Option>, } pub mod generator_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 DisplayName; type IndexedAt; type Did; type Creator; type Cid; type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type DisplayName = Unset; type IndexedAt = Unset; type Did = Unset; type Creator = Unset; type Cid = Unset; type Uri = Unset; } ///State transition - sets the `display_name` field to Set pub struct SetDisplayName(PhantomData S>); impl sealed::Sealed for SetDisplayName {} impl State for SetDisplayName { type DisplayName = Set; type IndexedAt = S::IndexedAt; type Did = S::Did; type Creator = S::Creator; type Cid = S::Cid; type Uri = S::Uri; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { type DisplayName = S::DisplayName; type IndexedAt = Set; type Did = S::Did; type Creator = S::Creator; type Cid = S::Cid; type Uri = S::Uri; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { type DisplayName = S::DisplayName; type IndexedAt = S::IndexedAt; type Did = Set; type Creator = S::Creator; type Cid = S::Cid; type Uri = S::Uri; } ///State transition - sets the `creator` field to Set pub struct SetCreator(PhantomData S>); impl sealed::Sealed for SetCreator {} impl State for SetCreator { type DisplayName = S::DisplayName; type IndexedAt = S::IndexedAt; type Did = S::Did; type Creator = Set; type Cid = S::Cid; type Uri = S::Uri; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { type DisplayName = S::DisplayName; type IndexedAt = S::IndexedAt; type Did = S::Did; type Creator = S::Creator; type Cid = Set; type Uri = S::Uri; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { type DisplayName = S::DisplayName; type IndexedAt = S::IndexedAt; type Did = S::Did; type Creator = S::Creator; type Cid = S::Cid; type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `display_name` field pub struct display_name(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); ///Marker type for the `did` field pub struct did(()); ///Marker type for the `creator` field pub struct creator(()); ///Marker type for the `cid` field pub struct cid(()); ///Marker type for the `uri` field pub struct uri(()); } } /// Builder for constructing an instance of this type pub struct GeneratorViewBuilder<'a, S: generator_view_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option, ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option>>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option, ::core::option::Option>>, ::core::option::Option, ::core::option::Option>, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> GeneratorView<'a> { /// Create a new builder for this type pub fn new() -> GeneratorViewBuilder<'a, generator_view_state::Empty> { GeneratorViewBuilder::new() } } impl<'a> GeneratorViewBuilder<'a, generator_view_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { GeneratorViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: ( None, None, None, None, None, None, None, None, None, None, None, None, None, None, ), _phantom: ::core::marker::PhantomData, } } } impl<'a, S: generator_view_state::State> GeneratorViewBuilder<'a, S> { /// Set the `acceptsInteractions` field (optional) pub fn accepts_interactions(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.0 = value.into(); self } /// Set the `acceptsInteractions` field to an Option value (optional) pub fn maybe_accepts_interactions(mut self, value: Option) -> Self { self.__unsafe_private_named.0 = value; self } } impl<'a, S: generator_view_state::State> GeneratorViewBuilder<'a, S> { /// Set the `avatar` field (optional) pub fn avatar( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.1 = value.into(); self } /// Set the `avatar` field to an Option value (optional) pub fn maybe_avatar( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.1 = value; self } } impl<'a, S> GeneratorViewBuilder<'a, S> where S: generator_view_state::State, S::Cid: generator_view_state::IsUnset, { /// Set the `cid` field (required) pub fn cid( mut self, value: impl Into>, ) -> GeneratorViewBuilder<'a, generator_view_state::SetCid> { self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); GeneratorViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: generator_view_state::State> GeneratorViewBuilder<'a, S> { /// Set the `contentMode` field (optional) pub fn content_mode( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.3 = value.into(); self } /// Set the `contentMode` field to an Option value (optional) pub fn maybe_content_mode( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.3 = value; self } } impl<'a, S> GeneratorViewBuilder<'a, S> where S: generator_view_state::State, S::Creator: generator_view_state::IsUnset, { /// Set the `creator` field (required) pub fn creator( mut self, value: impl Into>, ) -> GeneratorViewBuilder<'a, generator_view_state::SetCreator> { self.__unsafe_private_named.4 = ::core::option::Option::Some(value.into()); GeneratorViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: generator_view_state::State> GeneratorViewBuilder<'a, S> { /// Set the `description` field (optional) pub fn description( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.5 = value.into(); self } /// Set the `description` field to an Option value (optional) pub fn maybe_description( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.5 = value; self } } impl<'a, S: generator_view_state::State> GeneratorViewBuilder<'a, S> { /// Set the `descriptionFacets` field (optional) pub fn description_facets( mut self, value: impl Into>>>, ) -> Self { self.__unsafe_private_named.6 = value.into(); self } /// Set the `descriptionFacets` field to an Option value (optional) pub fn maybe_description_facets( mut self, value: Option>>, ) -> Self { self.__unsafe_private_named.6 = value; self } } impl<'a, S> GeneratorViewBuilder<'a, S> where S: generator_view_state::State, S::Did: generator_view_state::IsUnset, { /// Set the `did` field (required) pub fn did( mut self, value: impl Into>, ) -> GeneratorViewBuilder<'a, generator_view_state::SetDid> { self.__unsafe_private_named.7 = ::core::option::Option::Some(value.into()); GeneratorViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> GeneratorViewBuilder<'a, S> where S: generator_view_state::State, S::DisplayName: generator_view_state::IsUnset, { /// Set the `displayName` field (required) pub fn display_name( mut self, value: impl Into>, ) -> GeneratorViewBuilder<'a, generator_view_state::SetDisplayName> { self.__unsafe_private_named.8 = ::core::option::Option::Some(value.into()); GeneratorViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> GeneratorViewBuilder<'a, S> where S: generator_view_state::State, S::IndexedAt: generator_view_state::IsUnset, { /// Set the `indexedAt` field (required) pub fn indexed_at( mut self, value: impl Into, ) -> GeneratorViewBuilder<'a, generator_view_state::SetIndexedAt> { self.__unsafe_private_named.9 = ::core::option::Option::Some(value.into()); GeneratorViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: generator_view_state::State> GeneratorViewBuilder<'a, S> { /// Set the `labels` field (optional) pub fn labels( mut self, value: impl Into>>>, ) -> Self { self.__unsafe_private_named.10 = 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.10 = value; self } } impl<'a, S: generator_view_state::State> GeneratorViewBuilder<'a, S> { /// Set the `likeCount` field (optional) pub fn like_count(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.11 = value.into(); self } /// Set the `likeCount` field to an Option value (optional) pub fn maybe_like_count(mut self, value: Option) -> Self { self.__unsafe_private_named.11 = value; self } } impl<'a, S> GeneratorViewBuilder<'a, S> where S: generator_view_state::State, S::Uri: generator_view_state::IsUnset, { /// Set the `uri` field (required) pub fn uri( mut self, value: impl Into>, ) -> GeneratorViewBuilder<'a, generator_view_state::SetUri> { self.__unsafe_private_named.12 = ::core::option::Option::Some(value.into()); GeneratorViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: generator_view_state::State> GeneratorViewBuilder<'a, S> { /// Set the `viewer` field (optional) pub fn viewer( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.13 = value.into(); self } /// Set the `viewer` field to an Option value (optional) pub fn maybe_viewer( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.13 = value; self } } impl<'a, S> GeneratorViewBuilder<'a, S> where S: generator_view_state::State, S::DisplayName: generator_view_state::IsSet, S::IndexedAt: generator_view_state::IsSet, S::Did: generator_view_state::IsSet, S::Creator: generator_view_state::IsSet, S::Cid: generator_view_state::IsSet, S::Uri: generator_view_state::IsSet, { /// Build the final struct pub fn build(self) -> GeneratorView<'a> { GeneratorView { accepts_interactions: self.__unsafe_private_named.0, avatar: self.__unsafe_private_named.1, cid: self.__unsafe_private_named.2.unwrap(), content_mode: self.__unsafe_private_named.3, creator: self.__unsafe_private_named.4.unwrap(), description: self.__unsafe_private_named.5, description_facets: self.__unsafe_private_named.6, did: self.__unsafe_private_named.7.unwrap(), display_name: self.__unsafe_private_named.8.unwrap(), indexed_at: self.__unsafe_private_named.9.unwrap(), labels: self.__unsafe_private_named.10, like_count: self.__unsafe_private_named.11, uri: self.__unsafe_private_named.12.unwrap(), viewer: self.__unsafe_private_named.13, extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> GeneratorView<'a> { GeneratorView { accepts_interactions: self.__unsafe_private_named.0, avatar: self.__unsafe_private_named.1, cid: self.__unsafe_private_named.2.unwrap(), content_mode: self.__unsafe_private_named.3, creator: self.__unsafe_private_named.4.unwrap(), description: self.__unsafe_private_named.5, description_facets: self.__unsafe_private_named.6, did: self.__unsafe_private_named.7.unwrap(), display_name: self.__unsafe_private_named.8.unwrap(), indexed_at: self.__unsafe_private_named.9.unwrap(), labels: self.__unsafe_private_named.10, like_count: self.__unsafe_private_named.11, uri: self.__unsafe_private_named.12.unwrap(), viewer: self.__unsafe_private_named.13, extra_data: Some(extra_data), } } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum GeneratorViewContentMode<'a> { ContentModeUnspecified, ContentModeVideo, Other(jacquard_common::CowStr<'a>), } impl<'a> GeneratorViewContentMode<'a> { pub fn as_str(&self) -> &str { match self { Self::ContentModeUnspecified => "app.bsky.feed.defs#contentModeUnspecified", Self::ContentModeVideo => "app.bsky.feed.defs#contentModeVideo", Self::Other(s) => s.as_ref(), } } } impl<'a> From<&'a str> for GeneratorViewContentMode<'a> { fn from(s: &'a str) -> Self { match s { "app.bsky.feed.defs#contentModeUnspecified" => Self::ContentModeUnspecified, "app.bsky.feed.defs#contentModeVideo" => Self::ContentModeVideo, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> From for GeneratorViewContentMode<'a> { fn from(s: String) -> Self { match s.as_str() { "app.bsky.feed.defs#contentModeUnspecified" => Self::ContentModeUnspecified, "app.bsky.feed.defs#contentModeVideo" => Self::ContentModeVideo, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> core::fmt::Display for GeneratorViewContentMode<'a> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{}", self.as_str()) } } impl<'a> AsRef for GeneratorViewContentMode<'a> { fn as_ref(&self) -> &str { self.as_str() } } impl<'a> serde::Serialize for GeneratorViewContentMode<'a> { fn serialize(&self, serializer: S) -> Result where S: serde::Serializer, { serializer.serialize_str(self.as_str()) } } impl<'de, 'a> serde::Deserialize<'de> for GeneratorViewContentMode<'a> where 'de: 'a, { fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'de>, { let s = <&'de str>::deserialize(deserializer)?; Ok(Self::from(s)) } } impl<'a> Default for GeneratorViewContentMode<'a> { fn default() -> Self { Self::Other(Default::default()) } } impl jacquard_common::IntoStatic for GeneratorViewContentMode<'_> { type Output = GeneratorViewContentMode<'static>; fn into_static(self) -> Self::Output { match self { GeneratorViewContentMode::ContentModeUnspecified => { GeneratorViewContentMode::ContentModeUnspecified } GeneratorViewContentMode::ContentModeVideo => { GeneratorViewContentMode::ContentModeVideo } GeneratorViewContentMode::Other(v) => { GeneratorViewContentMode::Other(v.into_static()) } } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for GeneratorView<'a> { fn nsid() -> &'static str { "app.bsky.feed.defs" } fn def_name() -> &'static str { "generatorView" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_feed_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()) > 3000usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "description", ), max: 3000usize, 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 > 300usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxGraphemes { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "description", ), max: 300usize, actual: count, }); } } } if let Some(ref value) = self.like_count { if *value < 0i64 { return Err(::jacquard_lexicon::validation::ConstraintError::Minimum { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "like_count", ), min: 0i64, actual: *value, }); } } Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct GeneratorViewerState<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub like: std::option::Option>, } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for GeneratorViewerState<'a> { fn nsid() -> &'static str { "app.bsky.feed.defs" } fn def_name() -> &'static str { "generatorViewerState" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_feed_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct Interaction<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub event: std::option::Option>, /// Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub feed_context: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub item: std::option::Option>, /// Unique identifier per request that may be passed back alongside interactions. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub req_id: std::option::Option>, } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum InteractionEvent<'a> { RequestLess, RequestMore, ClickthroughItem, ClickthroughAuthor, ClickthroughReposter, ClickthroughEmbed, InteractionSeen, InteractionLike, InteractionRepost, InteractionReply, InteractionQuote, InteractionShare, Other(jacquard_common::CowStr<'a>), } impl<'a> InteractionEvent<'a> { pub fn as_str(&self) -> &str { match self { Self::RequestLess => "app.bsky.feed.defs#requestLess", Self::RequestMore => "app.bsky.feed.defs#requestMore", Self::ClickthroughItem => "app.bsky.feed.defs#clickthroughItem", Self::ClickthroughAuthor => "app.bsky.feed.defs#clickthroughAuthor", Self::ClickthroughReposter => "app.bsky.feed.defs#clickthroughReposter", Self::ClickthroughEmbed => "app.bsky.feed.defs#clickthroughEmbed", Self::InteractionSeen => "app.bsky.feed.defs#interactionSeen", Self::InteractionLike => "app.bsky.feed.defs#interactionLike", Self::InteractionRepost => "app.bsky.feed.defs#interactionRepost", Self::InteractionReply => "app.bsky.feed.defs#interactionReply", Self::InteractionQuote => "app.bsky.feed.defs#interactionQuote", Self::InteractionShare => "app.bsky.feed.defs#interactionShare", Self::Other(s) => s.as_ref(), } } } impl<'a> From<&'a str> for InteractionEvent<'a> { fn from(s: &'a str) -> Self { match s { "app.bsky.feed.defs#requestLess" => Self::RequestLess, "app.bsky.feed.defs#requestMore" => Self::RequestMore, "app.bsky.feed.defs#clickthroughItem" => Self::ClickthroughItem, "app.bsky.feed.defs#clickthroughAuthor" => Self::ClickthroughAuthor, "app.bsky.feed.defs#clickthroughReposter" => Self::ClickthroughReposter, "app.bsky.feed.defs#clickthroughEmbed" => Self::ClickthroughEmbed, "app.bsky.feed.defs#interactionSeen" => Self::InteractionSeen, "app.bsky.feed.defs#interactionLike" => Self::InteractionLike, "app.bsky.feed.defs#interactionRepost" => Self::InteractionRepost, "app.bsky.feed.defs#interactionReply" => Self::InteractionReply, "app.bsky.feed.defs#interactionQuote" => Self::InteractionQuote, "app.bsky.feed.defs#interactionShare" => Self::InteractionShare, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> From for InteractionEvent<'a> { fn from(s: String) -> Self { match s.as_str() { "app.bsky.feed.defs#requestLess" => Self::RequestLess, "app.bsky.feed.defs#requestMore" => Self::RequestMore, "app.bsky.feed.defs#clickthroughItem" => Self::ClickthroughItem, "app.bsky.feed.defs#clickthroughAuthor" => Self::ClickthroughAuthor, "app.bsky.feed.defs#clickthroughReposter" => Self::ClickthroughReposter, "app.bsky.feed.defs#clickthroughEmbed" => Self::ClickthroughEmbed, "app.bsky.feed.defs#interactionSeen" => Self::InteractionSeen, "app.bsky.feed.defs#interactionLike" => Self::InteractionLike, "app.bsky.feed.defs#interactionRepost" => Self::InteractionRepost, "app.bsky.feed.defs#interactionReply" => Self::InteractionReply, "app.bsky.feed.defs#interactionQuote" => Self::InteractionQuote, "app.bsky.feed.defs#interactionShare" => Self::InteractionShare, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> core::fmt::Display for InteractionEvent<'a> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{}", self.as_str()) } } impl<'a> AsRef for InteractionEvent<'a> { fn as_ref(&self) -> &str { self.as_str() } } impl<'a> serde::Serialize for InteractionEvent<'a> { fn serialize(&self, serializer: S) -> Result where S: serde::Serializer, { serializer.serialize_str(self.as_str()) } } impl<'de, 'a> serde::Deserialize<'de> for InteractionEvent<'a> where 'de: 'a, { fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'de>, { let s = <&'de str>::deserialize(deserializer)?; Ok(Self::from(s)) } } impl<'a> Default for InteractionEvent<'a> { fn default() -> Self { Self::Other(Default::default()) } } impl jacquard_common::IntoStatic for InteractionEvent<'_> { type Output = InteractionEvent<'static>; fn into_static(self) -> Self::Output { match self { InteractionEvent::RequestLess => InteractionEvent::RequestLess, InteractionEvent::RequestMore => InteractionEvent::RequestMore, InteractionEvent::ClickthroughItem => InteractionEvent::ClickthroughItem, InteractionEvent::ClickthroughAuthor => InteractionEvent::ClickthroughAuthor, InteractionEvent::ClickthroughReposter => { InteractionEvent::ClickthroughReposter } InteractionEvent::ClickthroughEmbed => InteractionEvent::ClickthroughEmbed, InteractionEvent::InteractionSeen => InteractionEvent::InteractionSeen, InteractionEvent::InteractionLike => InteractionEvent::InteractionLike, InteractionEvent::InteractionRepost => InteractionEvent::InteractionRepost, InteractionEvent::InteractionReply => InteractionEvent::InteractionReply, InteractionEvent::InteractionQuote => InteractionEvent::InteractionQuote, InteractionEvent::InteractionShare => InteractionEvent::InteractionShare, InteractionEvent::Other(v) => InteractionEvent::Other(v.into_static()), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Interaction<'a> { fn nsid() -> &'static str { "app.bsky.feed.defs" } fn def_name() -> &'static str { "interaction" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_feed_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { if let Some(ref value) = self.feed_context { #[allow(unused_comparisons)] if ::len(value.as_ref()) > 2000usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "feed_context", ), max: 2000usize, actual: ::len(value.as_ref()), }); } } if let Some(ref value) = self.req_id { #[allow(unused_comparisons)] if ::len(value.as_ref()) > 100usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "req_id", ), max: 100usize, actual: ::len(value.as_ref()), }); } } Ok(()) } } /// User liked the feed item #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Hash, jacquard_derive::IntoStatic )] pub struct InteractionLike; impl std::fmt::Display for InteractionLike { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "interactionLike") } } /// User quoted the feed item #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Hash, jacquard_derive::IntoStatic )] pub struct InteractionQuote; impl std::fmt::Display for InteractionQuote { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "interactionQuote") } } /// User replied to the feed item #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Hash, jacquard_derive::IntoStatic )] pub struct InteractionReply; impl std::fmt::Display for InteractionReply { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "interactionReply") } } /// User reposted the feed item #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Hash, jacquard_derive::IntoStatic )] pub struct InteractionRepost; impl std::fmt::Display for InteractionRepost { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "interactionRepost") } } /// Feed item was seen by user #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Hash, jacquard_derive::IntoStatic )] pub struct InteractionSeen; impl std::fmt::Display for InteractionSeen { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "interactionSeen") } } /// User shared the feed item #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Hash, jacquard_derive::IntoStatic )] pub struct InteractionShare; impl std::fmt::Display for InteractionShare { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "interactionShare") } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct NotFoundPost<'a> { pub not_found: bool, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, } pub mod not_found_post_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type NotFound; type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type NotFound = Unset; type Uri = Unset; } ///State transition - sets the `not_found` field to Set pub struct SetNotFound(PhantomData S>); impl sealed::Sealed for SetNotFound {} impl State for SetNotFound { type NotFound = Set; type Uri = S::Uri; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { type NotFound = S::NotFound; type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `not_found` field pub struct not_found(()); ///Marker type for the `uri` field pub struct uri(()); } } /// Builder for constructing an instance of this type pub struct NotFoundPostBuilder<'a, S: not_found_post_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> NotFoundPost<'a> { /// Create a new builder for this type pub fn new() -> NotFoundPostBuilder<'a, not_found_post_state::Empty> { NotFoundPostBuilder::new() } } impl<'a> NotFoundPostBuilder<'a, not_found_post_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { NotFoundPostBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> NotFoundPostBuilder<'a, S> where S: not_found_post_state::State, S::NotFound: not_found_post_state::IsUnset, { /// Set the `notFound` field (required) pub fn not_found( mut self, value: impl Into, ) -> NotFoundPostBuilder<'a, not_found_post_state::SetNotFound> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); NotFoundPostBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> NotFoundPostBuilder<'a, S> where S: not_found_post_state::State, S::Uri: not_found_post_state::IsUnset, { /// Set the `uri` field (required) pub fn uri( mut self, value: impl Into>, ) -> NotFoundPostBuilder<'a, not_found_post_state::SetUri> { self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); NotFoundPostBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> NotFoundPostBuilder<'a, S> where S: not_found_post_state::State, S::NotFound: not_found_post_state::IsSet, S::Uri: not_found_post_state::IsSet, { /// Build the final struct pub fn build(self) -> NotFoundPost<'a> { NotFoundPost { not_found: self.__unsafe_private_named.0.unwrap(), uri: self.__unsafe_private_named.1.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> NotFoundPost<'a> { NotFoundPost { not_found: self.__unsafe_private_named.0.unwrap(), uri: self.__unsafe_private_named.1.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for NotFoundPost<'a> { fn nsid() -> &'static str { "app.bsky.feed.defs" } fn def_name() -> &'static str { "notFoundPost" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_feed_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 PostView<'a> { #[serde(borrow)] pub author: crate::app_bsky::actor::ProfileViewBasic<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub bookmark_count: std::option::Option, #[serde(borrow)] pub cid: jacquard_common::types::string::Cid<'a>, /// Debug information for internal development #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub debug: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub embed: std::option::Option>, pub indexed_at: jacquard_common::types::string::Datetime, #[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")] pub like_count: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub quote_count: std::option::Option, #[serde(borrow)] pub record: jacquard_common::types::value::Data<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub reply_count: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub repost_count: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub threadgate: std::option::Option>, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub viewer: std::option::Option>, } pub mod post_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 IndexedAt; type Uri; type Cid; type Author; type Record; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type IndexedAt = Unset; type Uri = Unset; type Cid = Unset; type Author = Unset; type Record = Unset; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { type IndexedAt = Set; type Uri = S::Uri; type Cid = S::Cid; type Author = S::Author; type Record = S::Record; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { type IndexedAt = S::IndexedAt; type Uri = Set; type Cid = S::Cid; type Author = S::Author; type Record = S::Record; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { type IndexedAt = S::IndexedAt; type Uri = S::Uri; type Cid = Set; type Author = S::Author; type Record = S::Record; } ///State transition - sets the `author` field to Set pub struct SetAuthor(PhantomData S>); impl sealed::Sealed for SetAuthor {} impl State for SetAuthor { type IndexedAt = S::IndexedAt; type Uri = S::Uri; type Cid = S::Cid; type Author = Set; type Record = S::Record; } ///State transition - sets the `record` field to Set pub struct SetRecord(PhantomData S>); impl sealed::Sealed for SetRecord {} impl State for SetRecord { type IndexedAt = S::IndexedAt; type Uri = S::Uri; type Cid = S::Cid; type Author = S::Author; type Record = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `indexed_at` field pub struct indexed_at(()); ///Marker type for the `uri` field pub struct uri(()); ///Marker type for the `cid` field pub struct cid(()); ///Marker type for the `author` field pub struct author(()); ///Marker type for the `record` field pub struct record(()); } } /// Builder for constructing an instance of this type pub struct PostViewBuilder<'a, S: post_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>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> PostView<'a> { /// Create a new builder for this type pub fn new() -> PostViewBuilder<'a, post_view_state::Empty> { PostViewBuilder::new() } } impl<'a> PostViewBuilder<'a, post_view_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { PostViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: ( None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, ), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> PostViewBuilder<'a, S> where S: post_view_state::State, S::Author: post_view_state::IsUnset, { /// Set the `author` field (required) pub fn author( mut self, value: impl Into>, ) -> PostViewBuilder<'a, post_view_state::SetAuthor> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); PostViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: post_view_state::State> PostViewBuilder<'a, S> { /// Set the `bookmarkCount` field (optional) pub fn bookmark_count(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.1 = value.into(); self } /// Set the `bookmarkCount` field to an Option value (optional) pub fn maybe_bookmark_count(mut self, value: Option) -> Self { self.__unsafe_private_named.1 = value; self } } impl<'a, S> PostViewBuilder<'a, S> where S: post_view_state::State, S::Cid: post_view_state::IsUnset, { /// Set the `cid` field (required) pub fn cid( mut self, value: impl Into>, ) -> PostViewBuilder<'a, post_view_state::SetCid> { self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); PostViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: post_view_state::State> PostViewBuilder<'a, S> { /// Set the `debug` field (optional) pub fn debug( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.3 = value.into(); self } /// Set the `debug` field to an Option value (optional) pub fn maybe_debug( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.3 = value; self } } impl<'a, S: post_view_state::State> PostViewBuilder<'a, S> { /// Set the `embed` field (optional) pub fn embed(mut self, value: impl Into>>) -> Self { self.__unsafe_private_named.4 = value.into(); self } /// Set the `embed` field to an Option value (optional) pub fn maybe_embed(mut self, value: Option>) -> Self { self.__unsafe_private_named.4 = value; self } } impl<'a, S> PostViewBuilder<'a, S> where S: post_view_state::State, S::IndexedAt: post_view_state::IsUnset, { /// Set the `indexedAt` field (required) pub fn indexed_at( mut self, value: impl Into, ) -> PostViewBuilder<'a, post_view_state::SetIndexedAt> { self.__unsafe_private_named.5 = ::core::option::Option::Some(value.into()); PostViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: post_view_state::State> PostViewBuilder<'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: post_view_state::State> PostViewBuilder<'a, S> { /// Set the `likeCount` field (optional) pub fn like_count(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.7 = value.into(); self } /// Set the `likeCount` field to an Option value (optional) pub fn maybe_like_count(mut self, value: Option) -> Self { self.__unsafe_private_named.7 = value; self } } impl<'a, S: post_view_state::State> PostViewBuilder<'a, S> { /// Set the `quoteCount` field (optional) pub fn quote_count(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.8 = value.into(); self } /// Set the `quoteCount` field to an Option value (optional) pub fn maybe_quote_count(mut self, value: Option) -> Self { self.__unsafe_private_named.8 = value; self } } impl<'a, S> PostViewBuilder<'a, S> where S: post_view_state::State, S::Record: post_view_state::IsUnset, { /// Set the `record` field (required) pub fn record( mut self, value: impl Into>, ) -> PostViewBuilder<'a, post_view_state::SetRecord> { self.__unsafe_private_named.9 = ::core::option::Option::Some(value.into()); PostViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: post_view_state::State> PostViewBuilder<'a, S> { /// Set the `replyCount` field (optional) pub fn reply_count(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.10 = value.into(); self } /// Set the `replyCount` field to an Option value (optional) pub fn maybe_reply_count(mut self, value: Option) -> Self { self.__unsafe_private_named.10 = value; self } } impl<'a, S: post_view_state::State> PostViewBuilder<'a, S> { /// Set the `repostCount` field (optional) pub fn repost_count(mut self, value: impl Into>) -> Self { self.__unsafe_private_named.11 = value.into(); self } /// Set the `repostCount` field to an Option value (optional) pub fn maybe_repost_count(mut self, value: Option) -> Self { self.__unsafe_private_named.11 = value; self } } impl<'a, S: post_view_state::State> PostViewBuilder<'a, S> { /// Set the `threadgate` field (optional) pub fn threadgate( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.12 = value.into(); self } /// Set the `threadgate` field to an Option value (optional) pub fn maybe_threadgate( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.12 = value; self } } impl<'a, S> PostViewBuilder<'a, S> where S: post_view_state::State, S::Uri: post_view_state::IsUnset, { /// Set the `uri` field (required) pub fn uri( mut self, value: impl Into>, ) -> PostViewBuilder<'a, post_view_state::SetUri> { self.__unsafe_private_named.13 = ::core::option::Option::Some(value.into()); PostViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: post_view_state::State> PostViewBuilder<'a, S> { /// Set the `viewer` field (optional) pub fn viewer( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.14 = 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.14 = value; self } } impl<'a, S> PostViewBuilder<'a, S> where S: post_view_state::State, S::IndexedAt: post_view_state::IsSet, S::Uri: post_view_state::IsSet, S::Cid: post_view_state::IsSet, S::Author: post_view_state::IsSet, S::Record: post_view_state::IsSet, { /// Build the final struct pub fn build(self) -> PostView<'a> { PostView { author: self.__unsafe_private_named.0.unwrap(), bookmark_count: self.__unsafe_private_named.1, cid: self.__unsafe_private_named.2.unwrap(), debug: self.__unsafe_private_named.3, embed: self.__unsafe_private_named.4, indexed_at: self.__unsafe_private_named.5.unwrap(), labels: self.__unsafe_private_named.6, like_count: self.__unsafe_private_named.7, quote_count: self.__unsafe_private_named.8, record: self.__unsafe_private_named.9.unwrap(), reply_count: self.__unsafe_private_named.10, repost_count: self.__unsafe_private_named.11, threadgate: self.__unsafe_private_named.12, uri: self.__unsafe_private_named.13.unwrap(), viewer: self.__unsafe_private_named.14, 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>, >, ) -> PostView<'a> { PostView { author: self.__unsafe_private_named.0.unwrap(), bookmark_count: self.__unsafe_private_named.1, cid: self.__unsafe_private_named.2.unwrap(), debug: self.__unsafe_private_named.3, embed: self.__unsafe_private_named.4, indexed_at: self.__unsafe_private_named.5.unwrap(), labels: self.__unsafe_private_named.6, like_count: self.__unsafe_private_named.7, quote_count: self.__unsafe_private_named.8, record: self.__unsafe_private_named.9.unwrap(), reply_count: self.__unsafe_private_named.10, repost_count: self.__unsafe_private_named.11, threadgate: self.__unsafe_private_named.12, uri: self.__unsafe_private_named.13.unwrap(), viewer: self.__unsafe_private_named.14, 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 PostViewEmbed<'a> { #[serde(rename = "app.bsky.embed.images#view")] ImagesView(Box>), #[serde(rename = "app.bsky.embed.video#view")] VideoView(Box>), #[serde(rename = "app.bsky.embed.external#view")] ExternalView(Box>), #[serde(rename = "app.bsky.embed.record#view")] RecordView(Box>), #[serde(rename = "app.bsky.embed.recordWithMedia#view")] RecordWithMediaView(Box>), } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for PostView<'a> { fn nsid() -> &'static str { "app.bsky.feed.defs" } fn def_name() -> &'static str { "postView" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_feed_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct ReasonPin<'a> {} impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ReasonPin<'a> { fn nsid() -> &'static str { "app.bsky.feed.defs" } fn def_name() -> &'static str { "reasonPin" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_feed_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 ReasonRepost<'a> { #[serde(borrow)] pub by: crate::app_bsky::actor::ProfileViewBasic<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cid: std::option::Option>, pub indexed_at: jacquard_common::types::string::Datetime, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub uri: std::option::Option>, } pub mod reason_repost_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 By; type IndexedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type By = Unset; type IndexedAt = Unset; } ///State transition - sets the `by` field to Set pub struct SetBy(PhantomData S>); impl sealed::Sealed for SetBy {} impl State for SetBy { type By = Set; type IndexedAt = S::IndexedAt; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { type By = S::By; type IndexedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `by` field pub struct by(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); } } /// Builder for constructing an instance of this type pub struct ReasonRepostBuilder<'a, S: reason_repost_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> ReasonRepost<'a> { /// Create a new builder for this type pub fn new() -> ReasonRepostBuilder<'a, reason_repost_state::Empty> { ReasonRepostBuilder::new() } } impl<'a> ReasonRepostBuilder<'a, reason_repost_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { ReasonRepostBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ReasonRepostBuilder<'a, S> where S: reason_repost_state::State, S::By: reason_repost_state::IsUnset, { /// Set the `by` field (required) pub fn by( mut self, value: impl Into>, ) -> ReasonRepostBuilder<'a, reason_repost_state::SetBy> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); ReasonRepostBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: reason_repost_state::State> ReasonRepostBuilder<'a, S> { /// Set the `cid` field (optional) pub fn cid( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.1 = value.into(); self } /// Set the `cid` field to an Option value (optional) pub fn maybe_cid( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.1 = value; self } } impl<'a, S> ReasonRepostBuilder<'a, S> where S: reason_repost_state::State, S::IndexedAt: reason_repost_state::IsUnset, { /// Set the `indexedAt` field (required) pub fn indexed_at( mut self, value: impl Into, ) -> ReasonRepostBuilder<'a, reason_repost_state::SetIndexedAt> { self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); ReasonRepostBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: reason_repost_state::State> ReasonRepostBuilder<'a, S> { /// Set the `uri` field (optional) pub fn uri( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.3 = value.into(); self } /// Set the `uri` field to an Option value (optional) pub fn maybe_uri( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.3 = value; self } } impl<'a, S> ReasonRepostBuilder<'a, S> where S: reason_repost_state::State, S::By: reason_repost_state::IsSet, S::IndexedAt: reason_repost_state::IsSet, { /// Build the final struct pub fn build(self) -> ReasonRepost<'a> { ReasonRepost { by: self.__unsafe_private_named.0.unwrap(), cid: self.__unsafe_private_named.1, indexed_at: self.__unsafe_private_named.2.unwrap(), uri: 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>, >, ) -> ReasonRepost<'a> { ReasonRepost { by: self.__unsafe_private_named.0.unwrap(), cid: self.__unsafe_private_named.1, indexed_at: self.__unsafe_private_named.2.unwrap(), uri: self.__unsafe_private_named.3, extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ReasonRepost<'a> { fn nsid() -> &'static str { "app.bsky.feed.defs" } fn def_name() -> &'static str { "reasonRepost" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_feed_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 ReplyRef<'a> { /// When parent is a reply to another post, this is the author of that post. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub grandparent_author: std::option::Option< crate::app_bsky::actor::ProfileViewBasic<'a>, >, #[serde(borrow)] pub parent: ReplyRefParent<'a>, #[serde(borrow)] pub root: ReplyRefRoot<'a>, } pub mod reply_ref_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 Root; type Parent; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Root = Unset; type Parent = Unset; } ///State transition - sets the `root` field to Set pub struct SetRoot(PhantomData S>); impl sealed::Sealed for SetRoot {} impl State for SetRoot { type Root = Set; type Parent = S::Parent; } ///State transition - sets the `parent` field to Set pub struct SetParent(PhantomData S>); impl sealed::Sealed for SetParent {} impl State for SetParent { type Root = S::Root; type Parent = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `root` field pub struct root(()); ///Marker type for the `parent` field pub struct parent(()); } } /// Builder for constructing an instance of this type pub struct ReplyRefBuilder<'a, S: reply_ref_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> ReplyRef<'a> { /// Create a new builder for this type pub fn new() -> ReplyRefBuilder<'a, reply_ref_state::Empty> { ReplyRefBuilder::new() } } impl<'a> ReplyRefBuilder<'a, reply_ref_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { ReplyRefBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S: reply_ref_state::State> ReplyRefBuilder<'a, S> { /// Set the `grandparentAuthor` field (optional) pub fn grandparent_author( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.0 = value.into(); self } /// Set the `grandparentAuthor` field to an Option value (optional) pub fn maybe_grandparent_author( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.0 = value; self } } impl<'a, S> ReplyRefBuilder<'a, S> where S: reply_ref_state::State, S::Parent: reply_ref_state::IsUnset, { /// Set the `parent` field (required) pub fn parent( mut self, value: impl Into>, ) -> ReplyRefBuilder<'a, reply_ref_state::SetParent> { self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); ReplyRefBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ReplyRefBuilder<'a, S> where S: reply_ref_state::State, S::Root: reply_ref_state::IsUnset, { /// Set the `root` field (required) pub fn root( mut self, value: impl Into>, ) -> ReplyRefBuilder<'a, reply_ref_state::SetRoot> { self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); ReplyRefBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ReplyRefBuilder<'a, S> where S: reply_ref_state::State, S::Root: reply_ref_state::IsSet, S::Parent: reply_ref_state::IsSet, { /// Build the final struct pub fn build(self) -> ReplyRef<'a> { ReplyRef { grandparent_author: self.__unsafe_private_named.0, parent: self.__unsafe_private_named.1.unwrap(), root: 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>, >, ) -> ReplyRef<'a> { ReplyRef { grandparent_author: self.__unsafe_private_named.0, parent: self.__unsafe_private_named.1.unwrap(), root: self.__unsafe_private_named.2.unwrap(), 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 ReplyRefParent<'a> { #[serde(rename = "app.bsky.feed.defs#postView")] PostView(Box>), #[serde(rename = "app.bsky.feed.defs#notFoundPost")] NotFoundPost(Box>), #[serde(rename = "app.bsky.feed.defs#blockedPost")] BlockedPost(Box>), } #[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 ReplyRefRoot<'a> { #[serde(rename = "app.bsky.feed.defs#postView")] PostView(Box>), #[serde(rename = "app.bsky.feed.defs#notFoundPost")] NotFoundPost(Box>), #[serde(rename = "app.bsky.feed.defs#blockedPost")] BlockedPost(Box>), } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ReplyRef<'a> { fn nsid() -> &'static str { "app.bsky.feed.defs" } fn def_name() -> &'static str { "replyRef" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_feed_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } /// Request that less content like the given feed item be shown in the feed #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Hash, jacquard_derive::IntoStatic )] pub struct RequestLess; impl std::fmt::Display for RequestLess { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "requestLess") } } /// Request that more content like the given feed item be shown in the feed #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Hash, jacquard_derive::IntoStatic )] pub struct RequestMore; impl std::fmt::Display for RequestMore { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "requestMore") } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct SkeletonFeedPost<'a> { /// Context that will be passed through to client and may be passed to feed generator back alongside interactions. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub feed_context: std::option::Option>, #[serde(borrow)] pub post: jacquard_common::types::string::AtUri<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub reason: std::option::Option>, } pub mod skeleton_feed_post_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Post; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Post = Unset; } ///State transition - sets the `post` field to Set pub struct SetPost(PhantomData S>); impl sealed::Sealed for SetPost {} impl State for SetPost { type Post = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `post` field pub struct post(()); } } /// Builder for constructing an instance of this type pub struct SkeletonFeedPostBuilder<'a, S: skeleton_feed_post_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> SkeletonFeedPost<'a> { /// Create a new builder for this type pub fn new() -> SkeletonFeedPostBuilder<'a, skeleton_feed_post_state::Empty> { SkeletonFeedPostBuilder::new() } } impl<'a> SkeletonFeedPostBuilder<'a, skeleton_feed_post_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { SkeletonFeedPostBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S: skeleton_feed_post_state::State> SkeletonFeedPostBuilder<'a, S> { /// Set the `feedContext` field (optional) pub fn feed_context( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.0 = value.into(); self } /// Set the `feedContext` field to an Option value (optional) pub fn maybe_feed_context( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.0 = value; self } } impl<'a, S> SkeletonFeedPostBuilder<'a, S> where S: skeleton_feed_post_state::State, S::Post: skeleton_feed_post_state::IsUnset, { /// Set the `post` field (required) pub fn post( mut self, value: impl Into>, ) -> SkeletonFeedPostBuilder<'a, skeleton_feed_post_state::SetPost> { self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); SkeletonFeedPostBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: skeleton_feed_post_state::State> SkeletonFeedPostBuilder<'a, S> { /// Set the `reason` field (optional) pub fn reason( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.2 = value.into(); self } /// Set the `reason` field to an Option value (optional) pub fn maybe_reason(mut self, value: Option>) -> Self { self.__unsafe_private_named.2 = value; self } } impl<'a, S> SkeletonFeedPostBuilder<'a, S> where S: skeleton_feed_post_state::State, S::Post: skeleton_feed_post_state::IsSet, { /// Build the final struct pub fn build(self) -> SkeletonFeedPost<'a> { SkeletonFeedPost { feed_context: self.__unsafe_private_named.0, post: self.__unsafe_private_named.1.unwrap(), reason: self.__unsafe_private_named.2, extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> SkeletonFeedPost<'a> { SkeletonFeedPost { feed_context: self.__unsafe_private_named.0, post: self.__unsafe_private_named.1.unwrap(), reason: self.__unsafe_private_named.2, 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 SkeletonFeedPostReason<'a> { #[serde(rename = "app.bsky.feed.defs#skeletonReasonRepost")] SkeletonReasonRepost(Box>), #[serde(rename = "app.bsky.feed.defs#skeletonReasonPin")] SkeletonReasonPin(Box>), } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for SkeletonFeedPost<'a> { fn nsid() -> &'static str { "app.bsky.feed.defs" } fn def_name() -> &'static str { "skeletonFeedPost" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_feed_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { if let Some(ref value) = self.feed_context { #[allow(unused_comparisons)] if ::len(value.as_ref()) > 2000usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "feed_context", ), max: 2000usize, actual: ::len(value.as_ref()), }); } } Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct SkeletonReasonPin<'a> {} impl<'a> ::jacquard_lexicon::schema::LexiconSchema for SkeletonReasonPin<'a> { fn nsid() -> &'static str { "app.bsky.feed.defs" } fn def_name() -> &'static str { "skeletonReasonPin" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_feed_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 SkeletonReasonRepost<'a> { #[serde(borrow)] pub repost: jacquard_common::types::string::AtUri<'a>, } pub mod skeleton_reason_repost_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 Repost; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Repost = Unset; } ///State transition - sets the `repost` field to Set pub struct SetRepost(PhantomData S>); impl sealed::Sealed for SetRepost {} impl State for SetRepost { type Repost = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `repost` field pub struct repost(()); } } /// Builder for constructing an instance of this type pub struct SkeletonReasonRepostBuilder<'a, S: skeleton_reason_repost_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> SkeletonReasonRepost<'a> { /// Create a new builder for this type pub fn new() -> SkeletonReasonRepostBuilder< 'a, skeleton_reason_repost_state::Empty, > { SkeletonReasonRepostBuilder::new() } } impl<'a> SkeletonReasonRepostBuilder<'a, skeleton_reason_repost_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { SkeletonReasonRepostBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None,), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> SkeletonReasonRepostBuilder<'a, S> where S: skeleton_reason_repost_state::State, S::Repost: skeleton_reason_repost_state::IsUnset, { /// Set the `repost` field (required) pub fn repost( mut self, value: impl Into>, ) -> SkeletonReasonRepostBuilder<'a, skeleton_reason_repost_state::SetRepost> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); SkeletonReasonRepostBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> SkeletonReasonRepostBuilder<'a, S> where S: skeleton_reason_repost_state::State, S::Repost: skeleton_reason_repost_state::IsSet, { /// Build the final struct pub fn build(self) -> SkeletonReasonRepost<'a> { SkeletonReasonRepost { repost: self.__unsafe_private_named.0.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> SkeletonReasonRepost<'a> { SkeletonReasonRepost { repost: self.__unsafe_private_named.0.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for SkeletonReasonRepost<'a> { fn nsid() -> &'static str { "app.bsky.feed.defs" } fn def_name() -> &'static str { "skeletonReasonRepost" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_feed_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } /// Metadata about this post within the context of the thread it is in. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct ThreadContext<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub root_author_like: std::option::Option>, } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ThreadContext<'a> { fn nsid() -> &'static str { "app.bsky.feed.defs" } fn def_name() -> &'static str { "threadContext" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_feed_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 ThreadViewPost<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub parent: std::option::Option>, #[serde(borrow)] pub post: crate::app_bsky::feed::PostView<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub replies: std::option::Option>>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub thread_context: std::option::Option>, } pub mod thread_view_post_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Post; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Post = Unset; } ///State transition - sets the `post` field to Set pub struct SetPost(PhantomData S>); impl sealed::Sealed for SetPost {} impl State for SetPost { type Post = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `post` field pub struct post(()); } } /// Builder for constructing an instance of this type pub struct ThreadViewPostBuilder<'a, S: thread_view_post_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> ThreadViewPost<'a> { /// Create a new builder for this type pub fn new() -> ThreadViewPostBuilder<'a, thread_view_post_state::Empty> { ThreadViewPostBuilder::new() } } impl<'a> ThreadViewPostBuilder<'a, thread_view_post_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { ThreadViewPostBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S: thread_view_post_state::State> ThreadViewPostBuilder<'a, S> { /// Set the `parent` field (optional) pub fn parent(mut self, value: impl Into>>) -> Self { self.__unsafe_private_named.0 = value.into(); self } /// Set the `parent` field to an Option value (optional) pub fn maybe_parent(mut self, value: Option>) -> Self { self.__unsafe_private_named.0 = value; self } } impl<'a, S> ThreadViewPostBuilder<'a, S> where S: thread_view_post_state::State, S::Post: thread_view_post_state::IsUnset, { /// Set the `post` field (required) pub fn post( mut self, value: impl Into>, ) -> ThreadViewPostBuilder<'a, thread_view_post_state::SetPost> { self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); ThreadViewPostBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: thread_view_post_state::State> ThreadViewPostBuilder<'a, S> { /// Set the `replies` field (optional) pub fn replies( mut self, value: impl Into>>>, ) -> Self { self.__unsafe_private_named.2 = value.into(); self } /// Set the `replies` field to an Option value (optional) pub fn maybe_replies( mut self, value: Option>>, ) -> Self { self.__unsafe_private_named.2 = value; self } } impl<'a, S: thread_view_post_state::State> ThreadViewPostBuilder<'a, S> { /// Set the `threadContext` field (optional) pub fn thread_context( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.3 = value.into(); self } /// Set the `threadContext` field to an Option value (optional) pub fn maybe_thread_context( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.3 = value; self } } impl<'a, S> ThreadViewPostBuilder<'a, S> where S: thread_view_post_state::State, S::Post: thread_view_post_state::IsSet, { /// Build the final struct pub fn build(self) -> ThreadViewPost<'a> { ThreadViewPost { parent: self.__unsafe_private_named.0, post: self.__unsafe_private_named.1.unwrap(), replies: self.__unsafe_private_named.2, thread_context: 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>, >, ) -> ThreadViewPost<'a> { ThreadViewPost { parent: self.__unsafe_private_named.0, post: self.__unsafe_private_named.1.unwrap(), replies: self.__unsafe_private_named.2, thread_context: 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 ThreadViewPostParent<'a> { #[serde(rename = "app.bsky.feed.defs#threadViewPost")] ThreadViewPost(Box>), #[serde(rename = "app.bsky.feed.defs#notFoundPost")] NotFoundPost(Box>), #[serde(rename = "app.bsky.feed.defs#blockedPost")] BlockedPost(Box>), } #[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 ThreadViewPostRepliesItem<'a> { #[serde(rename = "app.bsky.feed.defs#threadViewPost")] ThreadViewPost(Box>), #[serde(rename = "app.bsky.feed.defs#notFoundPost")] NotFoundPost(Box>), #[serde(rename = "app.bsky.feed.defs#blockedPost")] BlockedPost(Box>), } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ThreadViewPost<'a> { fn nsid() -> &'static str { "app.bsky.feed.defs" } fn def_name() -> &'static str { "threadViewPost" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_feed_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct ThreadgateView<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cid: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub lists: std::option::Option>>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub record: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub uri: std::option::Option>, } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ThreadgateView<'a> { fn nsid() -> &'static str { "app.bsky.feed.defs" } fn def_name() -> &'static str { "threadgateView" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_feed_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } /// Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct ViewerState<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub bookmarked: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub embedding_disabled: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub like: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub pinned: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub reply_disabled: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub repost: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub thread_muted: std::option::Option, } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ViewerState<'a> { fn nsid() -> &'static str { "app.bsky.feed.defs" } fn def_name() -> &'static str { "viewerState" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_app_bsky_feed_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } }