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<crate::app_bsky::actor::ViewerState<'a>>,
}
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 {}
}
pub trait State: sealed::Sealed {
type Did;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Did = Unset;
}
pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetDid<S> {}
impl<S: State> State for SetDid<S> {
type Did = Set<members::did>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct did(());
}
}
pub struct BlockedAuthorBuilder<'a, S: blocked_author_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<jacquard_common::types::string::Did<'a>>,
::core::option::Option<crate::app_bsky::actor::ViewerState<'a>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> BlockedAuthor<'a> {
pub fn new() -> BlockedAuthorBuilder<'a, blocked_author_state::Empty> {
BlockedAuthorBuilder::new()
}
}
impl<'a> BlockedAuthorBuilder<'a, blocked_author_state::Empty> {
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,
{
pub fn did(
mut self,
value: impl Into<jacquard_common::types::string::Did<'a>>,
) -> BlockedAuthorBuilder<'a, blocked_author_state::SetDid<S>> {
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> {
pub fn viewer(
mut self,
value: impl Into<Option<crate::app_bsky::actor::ViewerState<'a>>>,
) -> Self {
self.__unsafe_private_named.1 = value.into();
self
}
pub fn maybe_viewer(
mut self,
value: Option<crate::app_bsky::actor::ViewerState<'a>>,
) -> 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,
{
pub fn build(self) -> BlockedAuthor<'a> {
BlockedAuthor {
did: self.__unsafe_private_named.0.unwrap(),
viewer: self.__unsafe_private_named.1,
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::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::deps::smol_str::SmolStr::new_static("blockedAuthor"),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("did")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::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::deps::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::deps::smol_str::SmolStr::new_static("blockedPost"),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("uri"),
::jacquard_common::deps::smol_str::SmolStr::new_static("blocked"),
::jacquard_common::deps::smol_str::SmolStr::new_static("author")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::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::deps::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::deps::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::deps::smol_str::SmolStr::new_static(
"clickthroughAuthor",
),
::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken {
description: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"clickthroughEmbed",
),
::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken {
description: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"clickthroughItem",
),
::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken {
description: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"clickthroughReposter",
),
::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken {
description: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"contentModeUnspecified",
),
::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken {
description: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"contentModeVideo",
),
::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken {
description: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("feedViewPost"),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("post")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::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::deps::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::deps::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::deps::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::deps::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::deps::smol_str::SmolStr::new_static("generatorView"),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("uri"),
::jacquard_common::deps::smol_str::SmolStr::new_static("cid"),
::jacquard_common::deps::smol_str::SmolStr::new_static("did"),
::jacquard_common::deps::smol_str::SmolStr::new_static("creator"),
::jacquard_common::deps::smol_str::SmolStr::new_static("displayName"),
::jacquard_common::deps::smol_str::SmolStr::new_static("indexedAt")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::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::deps::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::deps::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::deps::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::deps::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::deps::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::deps::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::deps::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::deps::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::deps::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::deps::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::deps::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::deps::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::deps::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::deps::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::deps::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::deps::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::deps::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::deps::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::deps::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::deps::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::deps::smol_str::SmolStr::new_static(
"interactionLike",
),
::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken {
description: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"interactionQuote",
),
::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken {
description: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"interactionReply",
),
::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken {
description: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"interactionRepost",
),
::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken {
description: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"interactionSeen",
),
::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken {
description: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"interactionShare",
),
::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken {
description: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("notFoundPost"),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("uri"),
::jacquard_common::deps::smol_str::SmolStr::new_static("notFound")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::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::deps::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::deps::smol_str::SmolStr::new_static("postView"),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("uri"),
::jacquard_common::deps::smol_str::SmolStr::new_static("cid"),
::jacquard_common::deps::smol_str::SmolStr::new_static("author"),
::jacquard_common::deps::smol_str::SmolStr::new_static("record"),
::jacquard_common::deps::smol_str::SmolStr::new_static("indexedAt")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::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::deps::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::deps::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::deps::smol_str::SmolStr::new_static(
"debug",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Unknown(::jacquard_lexicon::lexicon::LexUnknown {
description: None,
}),
);
map.insert(
::jacquard_common::deps::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::deps::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::deps::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::deps::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::deps::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::deps::smol_str::SmolStr::new_static(
"record",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Unknown(::jacquard_lexicon::lexicon::LexUnknown {
description: None,
}),
);
map.insert(
::jacquard_common::deps::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::deps::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::deps::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::deps::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::deps::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::deps::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::deps::smol_str::SmolStr::new_static("reasonRepost"),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("by"),
::jacquard_common::deps::smol_str::SmolStr::new_static("indexedAt")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::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::deps::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::deps::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::deps::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::deps::smol_str::SmolStr::new_static("replyRef"),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("root"),
::jacquard_common::deps::smol_str::SmolStr::new_static("parent")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::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::deps::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::deps::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::deps::smol_str::SmolStr::new_static("requestLess"),
::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken {
description: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("requestMore"),
::jacquard_lexicon::lexicon::LexUserType::Token(::jacquard_lexicon::lexicon::LexToken {
description: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"skeletonFeedPost",
),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("post")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::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::deps::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::deps::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::deps::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::deps::smol_str::SmolStr::new_static(
"skeletonReasonRepost",
),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("repost")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::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::deps::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::deps::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::deps::smol_str::SmolStr::new_static("threadViewPost"),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: Some(
vec![
::jacquard_common::deps::smol_str::SmolStr::new_static("post")
],
),
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::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::deps::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::deps::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::deps::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::deps::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::deps::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::deps::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::deps::smol_str::SmolStr::new_static(
"record",
),
::jacquard_lexicon::lexicon::LexObjectProperty::Unknown(::jacquard_lexicon::lexicon::LexUnknown {
description: None,
}),
);
map.insert(
::jacquard_common::deps::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::deps::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::deps::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::deps::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::deps::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::deps::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::deps::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::deps::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::deps::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 {}
}
pub trait State: sealed::Sealed {
type Uri;
type Blocked;
type Author;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Uri = Unset;
type Blocked = Unset;
type Author = Unset;
}
pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetUri<S> {}
impl<S: State> State for SetUri<S> {
type Uri = Set<members::uri>;
type Blocked = S::Blocked;
type Author = S::Author;
}
pub struct SetBlocked<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetBlocked<S> {}
impl<S: State> State for SetBlocked<S> {
type Uri = S::Uri;
type Blocked = Set<members::blocked>;
type Author = S::Author;
}
pub struct SetAuthor<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetAuthor<S> {}
impl<S: State> State for SetAuthor<S> {
type Uri = S::Uri;
type Blocked = S::Blocked;
type Author = Set<members::author>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct uri(());
pub struct blocked(());
pub struct author(());
}
}
pub struct BlockedPostBuilder<'a, S: blocked_post_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<crate::app_bsky::feed::BlockedAuthor<'a>>,
::core::option::Option<bool>,
::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> BlockedPost<'a> {
pub fn new() -> BlockedPostBuilder<'a, blocked_post_state::Empty> {
BlockedPostBuilder::new()
}
}
impl<'a> BlockedPostBuilder<'a, blocked_post_state::Empty> {
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,
{
pub fn author(
mut self,
value: impl Into<crate::app_bsky::feed::BlockedAuthor<'a>>,
) -> BlockedPostBuilder<'a, blocked_post_state::SetAuthor<S>> {
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,
{
pub fn blocked(
mut self,
value: impl Into<bool>,
) -> BlockedPostBuilder<'a, blocked_post_state::SetBlocked<S>> {
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,
{
pub fn uri(
mut self,
value: impl Into<jacquard_common::types::string::AtUri<'a>>,
) -> BlockedPostBuilder<'a, blocked_post_state::SetUri<S>> {
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,
{
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(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::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(())
}
}
#[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")
}
}
#[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")
}
}
#[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")
}
}
#[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")
}
}
#[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")
}
}
#[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> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub feed_context: std::option::Option<jacquard_common::CowStr<'a>>,
#[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<FeedViewPostReason<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub reply: std::option::Option<crate::app_bsky::feed::ReplyRef<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub req_id: std::option::Option<jacquard_common::CowStr<'a>>,
}
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 {}
}
pub trait State: sealed::Sealed {
type Post;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Post = Unset;
}
pub struct SetPost<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetPost<S> {}
impl<S: State> State for SetPost<S> {
type Post = Set<members::post>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct post(());
}
}
pub struct FeedViewPostBuilder<'a, S: feed_view_post_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<crate::app_bsky::feed::PostView<'a>>,
::core::option::Option<FeedViewPostReason<'a>>,
::core::option::Option<crate::app_bsky::feed::ReplyRef<'a>>,
::core::option::Option<jacquard_common::CowStr<'a>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> FeedViewPost<'a> {
pub fn new() -> FeedViewPostBuilder<'a, feed_view_post_state::Empty> {
FeedViewPostBuilder::new()
}
}
impl<'a> FeedViewPostBuilder<'a, feed_view_post_state::Empty> {
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> {
pub fn feed_context(
mut self,
value: impl Into<Option<jacquard_common::CowStr<'a>>>,
) -> Self {
self.__unsafe_private_named.0 = value.into();
self
}
pub fn maybe_feed_context(
mut self,
value: Option<jacquard_common::CowStr<'a>>,
) -> 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,
{
pub fn post(
mut self,
value: impl Into<crate::app_bsky::feed::PostView<'a>>,
) -> FeedViewPostBuilder<'a, feed_view_post_state::SetPost<S>> {
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> {
pub fn reason(mut self, value: impl Into<Option<FeedViewPostReason<'a>>>) -> Self {
self.__unsafe_private_named.2 = value.into();
self
}
pub fn maybe_reason(mut self, value: Option<FeedViewPostReason<'a>>) -> Self {
self.__unsafe_private_named.2 = value;
self
}
}
impl<'a, S: feed_view_post_state::State> FeedViewPostBuilder<'a, S> {
pub fn reply(
mut self,
value: impl Into<Option<crate::app_bsky::feed::ReplyRef<'a>>>,
) -> Self {
self.__unsafe_private_named.3 = value.into();
self
}
pub fn maybe_reply(
mut self,
value: Option<crate::app_bsky::feed::ReplyRef<'a>>,
) -> Self {
self.__unsafe_private_named.3 = value;
self
}
}
impl<'a, S: feed_view_post_state::State> FeedViewPostBuilder<'a, S> {
pub fn req_id(
mut self,
value: impl Into<Option<jacquard_common::CowStr<'a>>>,
) -> Self {
self.__unsafe_private_named.4 = value.into();
self
}
pub fn maybe_req_id(mut self, value: Option<jacquard_common::CowStr<'a>>) -> 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,
{
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(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::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<crate::app_bsky::feed::ReasonRepost<'a>>),
#[serde(rename = "app.bsky.feed.defs#reasonPin")]
ReasonPin(Box<crate::app_bsky::feed::ReasonPin<'a>>),
}
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 <str>::len(value.as_ref()) > 2000usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"feed_context",
),
max: 2000usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.req_id {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 100usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"req_id",
),
max: 100usize,
actual: <str>::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<bool>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub avatar: std::option::Option<jacquard_common::types::string::UriValue<'a>>,
#[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<GeneratorViewContentMode<'a>>,
#[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<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub description_facets: std::option::Option<
Vec<crate::app_bsky::richtext::facet::Facet<'a>>,
>,
#[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<Vec<crate::com_atproto::label::Label<'a>>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub like_count: std::option::Option<i64>,
#[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<crate::app_bsky::feed::GeneratorViewerState<'a>>,
}
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 {}
}
pub trait State: sealed::Sealed {
type IndexedAt;
type DisplayName;
type Creator;
type Uri;
type Cid;
type Did;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type IndexedAt = Unset;
type DisplayName = Unset;
type Creator = Unset;
type Uri = Unset;
type Cid = Unset;
type Did = Unset;
}
pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
impl<S: State> State for SetIndexedAt<S> {
type IndexedAt = Set<members::indexed_at>;
type DisplayName = S::DisplayName;
type Creator = S::Creator;
type Uri = S::Uri;
type Cid = S::Cid;
type Did = S::Did;
}
pub struct SetDisplayName<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetDisplayName<S> {}
impl<S: State> State for SetDisplayName<S> {
type IndexedAt = S::IndexedAt;
type DisplayName = Set<members::display_name>;
type Creator = S::Creator;
type Uri = S::Uri;
type Cid = S::Cid;
type Did = S::Did;
}
pub struct SetCreator<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetCreator<S> {}
impl<S: State> State for SetCreator<S> {
type IndexedAt = S::IndexedAt;
type DisplayName = S::DisplayName;
type Creator = Set<members::creator>;
type Uri = S::Uri;
type Cid = S::Cid;
type Did = S::Did;
}
pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetUri<S> {}
impl<S: State> State for SetUri<S> {
type IndexedAt = S::IndexedAt;
type DisplayName = S::DisplayName;
type Creator = S::Creator;
type Uri = Set<members::uri>;
type Cid = S::Cid;
type Did = S::Did;
}
pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetCid<S> {}
impl<S: State> State for SetCid<S> {
type IndexedAt = S::IndexedAt;
type DisplayName = S::DisplayName;
type Creator = S::Creator;
type Uri = S::Uri;
type Cid = Set<members::cid>;
type Did = S::Did;
}
pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetDid<S> {}
impl<S: State> State for SetDid<S> {
type IndexedAt = S::IndexedAt;
type DisplayName = S::DisplayName;
type Creator = S::Creator;
type Uri = S::Uri;
type Cid = S::Cid;
type Did = Set<members::did>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct indexed_at(());
pub struct display_name(());
pub struct creator(());
pub struct uri(());
pub struct cid(());
pub struct did(());
}
}
pub struct GeneratorViewBuilder<'a, S: generator_view_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<bool>,
::core::option::Option<jacquard_common::types::string::UriValue<'a>>,
::core::option::Option<jacquard_common::types::string::Cid<'a>>,
::core::option::Option<GeneratorViewContentMode<'a>>,
::core::option::Option<crate::app_bsky::actor::ProfileView<'a>>,
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<Vec<crate::app_bsky::richtext::facet::Facet<'a>>>,
::core::option::Option<jacquard_common::types::string::Did<'a>>,
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<jacquard_common::types::string::Datetime>,
::core::option::Option<Vec<crate::com_atproto::label::Label<'a>>>,
::core::option::Option<i64>,
::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
::core::option::Option<crate::app_bsky::feed::GeneratorViewerState<'a>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> GeneratorView<'a> {
pub fn new() -> GeneratorViewBuilder<'a, generator_view_state::Empty> {
GeneratorViewBuilder::new()
}
}
impl<'a> GeneratorViewBuilder<'a, generator_view_state::Empty> {
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> {
pub fn accepts_interactions(mut self, value: impl Into<Option<bool>>) -> Self {
self.__unsafe_private_named.0 = value.into();
self
}
pub fn maybe_accepts_interactions(mut self, value: Option<bool>) -> Self {
self.__unsafe_private_named.0 = value;
self
}
}
impl<'a, S: generator_view_state::State> GeneratorViewBuilder<'a, S> {
pub fn avatar(
mut self,
value: impl Into<Option<jacquard_common::types::string::UriValue<'a>>>,
) -> Self {
self.__unsafe_private_named.1 = value.into();
self
}
pub fn maybe_avatar(
mut self,
value: Option<jacquard_common::types::string::UriValue<'a>>,
) -> 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,
{
pub fn cid(
mut self,
value: impl Into<jacquard_common::types::string::Cid<'a>>,
) -> GeneratorViewBuilder<'a, generator_view_state::SetCid<S>> {
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> {
pub fn content_mode(
mut self,
value: impl Into<Option<GeneratorViewContentMode<'a>>>,
) -> Self {
self.__unsafe_private_named.3 = value.into();
self
}
pub fn maybe_content_mode(
mut self,
value: Option<GeneratorViewContentMode<'a>>,
) -> 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,
{
pub fn creator(
mut self,
value: impl Into<crate::app_bsky::actor::ProfileView<'a>>,
) -> GeneratorViewBuilder<'a, generator_view_state::SetCreator<S>> {
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> {
pub fn description(
mut self,
value: impl Into<Option<jacquard_common::CowStr<'a>>>,
) -> Self {
self.__unsafe_private_named.5 = value.into();
self
}
pub fn maybe_description(
mut self,
value: Option<jacquard_common::CowStr<'a>>,
) -> Self {
self.__unsafe_private_named.5 = value;
self
}
}
impl<'a, S: generator_view_state::State> GeneratorViewBuilder<'a, S> {
pub fn description_facets(
mut self,
value: impl Into<Option<Vec<crate::app_bsky::richtext::facet::Facet<'a>>>>,
) -> Self {
self.__unsafe_private_named.6 = value.into();
self
}
pub fn maybe_description_facets(
mut self,
value: Option<Vec<crate::app_bsky::richtext::facet::Facet<'a>>>,
) -> 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,
{
pub fn did(
mut self,
value: impl Into<jacquard_common::types::string::Did<'a>>,
) -> GeneratorViewBuilder<'a, generator_view_state::SetDid<S>> {
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,
{
pub fn display_name(
mut self,
value: impl Into<jacquard_common::CowStr<'a>>,
) -> GeneratorViewBuilder<'a, generator_view_state::SetDisplayName<S>> {
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,
{
pub fn indexed_at(
mut self,
value: impl Into<jacquard_common::types::string::Datetime>,
) -> GeneratorViewBuilder<'a, generator_view_state::SetIndexedAt<S>> {
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> {
pub fn labels(
mut self,
value: impl Into<Option<Vec<crate::com_atproto::label::Label<'a>>>>,
) -> Self {
self.__unsafe_private_named.10 = value.into();
self
}
pub fn maybe_labels(
mut self,
value: Option<Vec<crate::com_atproto::label::Label<'a>>>,
) -> Self {
self.__unsafe_private_named.10 = value;
self
}
}
impl<'a, S: generator_view_state::State> GeneratorViewBuilder<'a, S> {
pub fn like_count(mut self, value: impl Into<Option<i64>>) -> Self {
self.__unsafe_private_named.11 = value.into();
self
}
pub fn maybe_like_count(mut self, value: Option<i64>) -> 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,
{
pub fn uri(
mut self,
value: impl Into<jacquard_common::types::string::AtUri<'a>>,
) -> GeneratorViewBuilder<'a, generator_view_state::SetUri<S>> {
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> {
pub fn viewer(
mut self,
value: impl Into<Option<crate::app_bsky::feed::GeneratorViewerState<'a>>>,
) -> Self {
self.__unsafe_private_named.13 = value.into();
self
}
pub fn maybe_viewer(
mut self,
value: Option<crate::app_bsky::feed::GeneratorViewerState<'a>>,
) -> Self {
self.__unsafe_private_named.13 = value;
self
}
}
impl<'a, S> GeneratorViewBuilder<'a, S>
where
S: generator_view_state::State,
S::IndexedAt: generator_view_state::IsSet,
S::DisplayName: generator_view_state::IsSet,
S::Creator: generator_view_state::IsSet,
S::Uri: generator_view_state::IsSet,
S::Cid: generator_view_state::IsSet,
S::Did: generator_view_state::IsSet,
{
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(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::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<String> 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<str> for GeneratorViewContentMode<'a> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<'a> serde::Serialize for GeneratorViewContentMode<'a> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, 'a> serde::Deserialize<'de> for GeneratorViewContentMode<'a>
where
'de: 'a,
{
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
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 <str>::len(value.as_ref()) > 3000usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"description",
),
max: 3000usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.description {
{
let count = jacquard_common::deps::codegen::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<jacquard_common::types::string::AtUri<'a>>,
}
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<InteractionEvent<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub feed_context: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub item: std::option::Option<jacquard_common::types::string::AtUri<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub req_id: std::option::Option<jacquard_common::CowStr<'a>>,
}
#[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<String> 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<str> for InteractionEvent<'a> {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl<'a> serde::Serialize for InteractionEvent<'a> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
serializer.serialize_str(self.as_str())
}
}
impl<'de, 'a> serde::Deserialize<'de> for InteractionEvent<'a>
where
'de: 'a,
{
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
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 <str>::len(value.as_ref()) > 2000usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"feed_context",
),
max: 2000usize,
actual: <str>::len(value.as_ref()),
});
}
}
if let Some(ref value) = self.req_id {
#[allow(unused_comparisons)]
if <str>::len(value.as_ref()) > 100usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"req_id",
),
max: 100usize,
actual: <str>::len(value.as_ref()),
});
}
}
Ok(())
}
}
#[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")
}
}
#[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")
}
}
#[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")
}
}
#[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")
}
}
#[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")
}
}
#[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 {}
}
pub trait State: sealed::Sealed {
type NotFound;
type Uri;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type NotFound = Unset;
type Uri = Unset;
}
pub struct SetNotFound<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetNotFound<S> {}
impl<S: State> State for SetNotFound<S> {
type NotFound = Set<members::not_found>;
type Uri = S::Uri;
}
pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetUri<S> {}
impl<S: State> State for SetUri<S> {
type NotFound = S::NotFound;
type Uri = Set<members::uri>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct not_found(());
pub struct uri(());
}
}
pub struct NotFoundPostBuilder<'a, S: not_found_post_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<bool>,
::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> NotFoundPost<'a> {
pub fn new() -> NotFoundPostBuilder<'a, not_found_post_state::Empty> {
NotFoundPostBuilder::new()
}
}
impl<'a> NotFoundPostBuilder<'a, not_found_post_state::Empty> {
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,
{
pub fn not_found(
mut self,
value: impl Into<bool>,
) -> NotFoundPostBuilder<'a, not_found_post_state::SetNotFound<S>> {
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,
{
pub fn uri(
mut self,
value: impl Into<jacquard_common::types::string::AtUri<'a>>,
) -> NotFoundPostBuilder<'a, not_found_post_state::SetUri<S>> {
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,
{
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(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::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<i64>,
#[serde(borrow)]
pub cid: jacquard_common::types::string::Cid<'a>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub debug: std::option::Option<jacquard_common::types::value::Data<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub embed: std::option::Option<PostViewEmbed<'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<Vec<crate::com_atproto::label::Label<'a>>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub like_count: std::option::Option<i64>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub quote_count: std::option::Option<i64>,
#[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<i64>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub repost_count: std::option::Option<i64>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub threadgate: std::option::Option<crate::app_bsky::feed::ThreadgateView<'a>>,
#[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<crate::app_bsky::feed::ViewerState<'a>>,
}
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 {}
}
pub trait State: sealed::Sealed {
type IndexedAt;
type Uri;
type Cid;
type Author;
type Record;
}
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;
}
pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
impl<S: State> State for SetIndexedAt<S> {
type IndexedAt = Set<members::indexed_at>;
type Uri = S::Uri;
type Cid = S::Cid;
type Author = S::Author;
type Record = S::Record;
}
pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetUri<S> {}
impl<S: State> State for SetUri<S> {
type IndexedAt = S::IndexedAt;
type Uri = Set<members::uri>;
type Cid = S::Cid;
type Author = S::Author;
type Record = S::Record;
}
pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetCid<S> {}
impl<S: State> State for SetCid<S> {
type IndexedAt = S::IndexedAt;
type Uri = S::Uri;
type Cid = Set<members::cid>;
type Author = S::Author;
type Record = S::Record;
}
pub struct SetAuthor<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetAuthor<S> {}
impl<S: State> State for SetAuthor<S> {
type IndexedAt = S::IndexedAt;
type Uri = S::Uri;
type Cid = S::Cid;
type Author = Set<members::author>;
type Record = S::Record;
}
pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetRecord<S> {}
impl<S: State> State for SetRecord<S> {
type IndexedAt = S::IndexedAt;
type Uri = S::Uri;
type Cid = S::Cid;
type Author = S::Author;
type Record = Set<members::record>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct indexed_at(());
pub struct uri(());
pub struct cid(());
pub struct author(());
pub struct record(());
}
}
pub struct PostViewBuilder<'a, S: post_view_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<crate::app_bsky::actor::ProfileViewBasic<'a>>,
::core::option::Option<i64>,
::core::option::Option<jacquard_common::types::string::Cid<'a>>,
::core::option::Option<jacquard_common::types::value::Data<'a>>,
::core::option::Option<PostViewEmbed<'a>>,
::core::option::Option<jacquard_common::types::string::Datetime>,
::core::option::Option<Vec<crate::com_atproto::label::Label<'a>>>,
::core::option::Option<i64>,
::core::option::Option<i64>,
::core::option::Option<jacquard_common::types::value::Data<'a>>,
::core::option::Option<i64>,
::core::option::Option<i64>,
::core::option::Option<crate::app_bsky::feed::ThreadgateView<'a>>,
::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
::core::option::Option<crate::app_bsky::feed::ViewerState<'a>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> PostView<'a> {
pub fn new() -> PostViewBuilder<'a, post_view_state::Empty> {
PostViewBuilder::new()
}
}
impl<'a> PostViewBuilder<'a, post_view_state::Empty> {
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,
{
pub fn author(
mut self,
value: impl Into<crate::app_bsky::actor::ProfileViewBasic<'a>>,
) -> PostViewBuilder<'a, post_view_state::SetAuthor<S>> {
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> {
pub fn bookmark_count(mut self, value: impl Into<Option<i64>>) -> Self {
self.__unsafe_private_named.1 = value.into();
self
}
pub fn maybe_bookmark_count(mut self, value: Option<i64>) -> 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,
{
pub fn cid(
mut self,
value: impl Into<jacquard_common::types::string::Cid<'a>>,
) -> PostViewBuilder<'a, post_view_state::SetCid<S>> {
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> {
pub fn debug(
mut self,
value: impl Into<Option<jacquard_common::types::value::Data<'a>>>,
) -> Self {
self.__unsafe_private_named.3 = value.into();
self
}
pub fn maybe_debug(
mut self,
value: Option<jacquard_common::types::value::Data<'a>>,
) -> Self {
self.__unsafe_private_named.3 = value;
self
}
}
impl<'a, S: post_view_state::State> PostViewBuilder<'a, S> {
pub fn embed(mut self, value: impl Into<Option<PostViewEmbed<'a>>>) -> Self {
self.__unsafe_private_named.4 = value.into();
self
}
pub fn maybe_embed(mut self, value: Option<PostViewEmbed<'a>>) -> 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,
{
pub fn indexed_at(
mut self,
value: impl Into<jacquard_common::types::string::Datetime>,
) -> PostViewBuilder<'a, post_view_state::SetIndexedAt<S>> {
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> {
pub fn labels(
mut self,
value: impl Into<Option<Vec<crate::com_atproto::label::Label<'a>>>>,
) -> Self {
self.__unsafe_private_named.6 = value.into();
self
}
pub fn maybe_labels(
mut self,
value: Option<Vec<crate::com_atproto::label::Label<'a>>>,
) -> Self {
self.__unsafe_private_named.6 = value;
self
}
}
impl<'a, S: post_view_state::State> PostViewBuilder<'a, S> {
pub fn like_count(mut self, value: impl Into<Option<i64>>) -> Self {
self.__unsafe_private_named.7 = value.into();
self
}
pub fn maybe_like_count(mut self, value: Option<i64>) -> Self {
self.__unsafe_private_named.7 = value;
self
}
}
impl<'a, S: post_view_state::State> PostViewBuilder<'a, S> {
pub fn quote_count(mut self, value: impl Into<Option<i64>>) -> Self {
self.__unsafe_private_named.8 = value.into();
self
}
pub fn maybe_quote_count(mut self, value: Option<i64>) -> 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,
{
pub fn record(
mut self,
value: impl Into<jacquard_common::types::value::Data<'a>>,
) -> PostViewBuilder<'a, post_view_state::SetRecord<S>> {
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> {
pub fn reply_count(mut self, value: impl Into<Option<i64>>) -> Self {
self.__unsafe_private_named.10 = value.into();
self
}
pub fn maybe_reply_count(mut self, value: Option<i64>) -> Self {
self.__unsafe_private_named.10 = value;
self
}
}
impl<'a, S: post_view_state::State> PostViewBuilder<'a, S> {
pub fn repost_count(mut self, value: impl Into<Option<i64>>) -> Self {
self.__unsafe_private_named.11 = value.into();
self
}
pub fn maybe_repost_count(mut self, value: Option<i64>) -> Self {
self.__unsafe_private_named.11 = value;
self
}
}
impl<'a, S: post_view_state::State> PostViewBuilder<'a, S> {
pub fn threadgate(
mut self,
value: impl Into<Option<crate::app_bsky::feed::ThreadgateView<'a>>>,
) -> Self {
self.__unsafe_private_named.12 = value.into();
self
}
pub fn maybe_threadgate(
mut self,
value: Option<crate::app_bsky::feed::ThreadgateView<'a>>,
) -> 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,
{
pub fn uri(
mut self,
value: impl Into<jacquard_common::types::string::AtUri<'a>>,
) -> PostViewBuilder<'a, post_view_state::SetUri<S>> {
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> {
pub fn viewer(
mut self,
value: impl Into<Option<crate::app_bsky::feed::ViewerState<'a>>>,
) -> Self {
self.__unsafe_private_named.14 = value.into();
self
}
pub fn maybe_viewer(
mut self,
value: Option<crate::app_bsky::feed::ViewerState<'a>>,
) -> 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,
{
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(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::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<crate::app_bsky::embed::images::View<'a>>),
#[serde(rename = "app.bsky.embed.video#view")]
VideoView(Box<crate::app_bsky::embed::video::View<'a>>),
#[serde(rename = "app.bsky.embed.external#view")]
ExternalView(Box<crate::app_bsky::embed::external::View<'a>>),
#[serde(rename = "app.bsky.embed.record#view")]
RecordView(Box<crate::app_bsky::embed::record::View<'a>>),
#[serde(rename = "app.bsky.embed.recordWithMedia#view")]
RecordWithMediaView(Box<crate::app_bsky::embed::record_with_media::View<'a>>),
}
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<jacquard_common::types::string::Cid<'a>>,
pub indexed_at: jacquard_common::types::string::Datetime,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub uri: std::option::Option<jacquard_common::types::string::AtUri<'a>>,
}
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 {}
}
pub trait State: sealed::Sealed {
type By;
type IndexedAt;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type By = Unset;
type IndexedAt = Unset;
}
pub struct SetBy<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetBy<S> {}
impl<S: State> State for SetBy<S> {
type By = Set<members::by>;
type IndexedAt = S::IndexedAt;
}
pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
impl<S: State> State for SetIndexedAt<S> {
type By = S::By;
type IndexedAt = Set<members::indexed_at>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct by(());
pub struct indexed_at(());
}
}
pub struct ReasonRepostBuilder<'a, S: reason_repost_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<crate::app_bsky::actor::ProfileViewBasic<'a>>,
::core::option::Option<jacquard_common::types::string::Cid<'a>>,
::core::option::Option<jacquard_common::types::string::Datetime>,
::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> ReasonRepost<'a> {
pub fn new() -> ReasonRepostBuilder<'a, reason_repost_state::Empty> {
ReasonRepostBuilder::new()
}
}
impl<'a> ReasonRepostBuilder<'a, reason_repost_state::Empty> {
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,
{
pub fn by(
mut self,
value: impl Into<crate::app_bsky::actor::ProfileViewBasic<'a>>,
) -> ReasonRepostBuilder<'a, reason_repost_state::SetBy<S>> {
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> {
pub fn cid(
mut self,
value: impl Into<Option<jacquard_common::types::string::Cid<'a>>>,
) -> Self {
self.__unsafe_private_named.1 = value.into();
self
}
pub fn maybe_cid(
mut self,
value: Option<jacquard_common::types::string::Cid<'a>>,
) -> 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,
{
pub fn indexed_at(
mut self,
value: impl Into<jacquard_common::types::string::Datetime>,
) -> ReasonRepostBuilder<'a, reason_repost_state::SetIndexedAt<S>> {
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> {
pub fn uri(
mut self,
value: impl Into<Option<jacquard_common::types::string::AtUri<'a>>>,
) -> Self {
self.__unsafe_private_named.3 = value.into();
self
}
pub fn maybe_uri(
mut self,
value: Option<jacquard_common::types::string::AtUri<'a>>,
) -> 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,
{
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(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::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> {
#[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 {}
}
pub trait State: sealed::Sealed {
type Root;
type Parent;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Root = Unset;
type Parent = Unset;
}
pub struct SetRoot<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetRoot<S> {}
impl<S: State> State for SetRoot<S> {
type Root = Set<members::root>;
type Parent = S::Parent;
}
pub struct SetParent<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetParent<S> {}
impl<S: State> State for SetParent<S> {
type Root = S::Root;
type Parent = Set<members::parent>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct root(());
pub struct parent(());
}
}
pub struct ReplyRefBuilder<'a, S: reply_ref_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<crate::app_bsky::actor::ProfileViewBasic<'a>>,
::core::option::Option<ReplyRefParent<'a>>,
::core::option::Option<ReplyRefRoot<'a>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> ReplyRef<'a> {
pub fn new() -> ReplyRefBuilder<'a, reply_ref_state::Empty> {
ReplyRefBuilder::new()
}
}
impl<'a> ReplyRefBuilder<'a, reply_ref_state::Empty> {
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> {
pub fn grandparent_author(
mut self,
value: impl Into<Option<crate::app_bsky::actor::ProfileViewBasic<'a>>>,
) -> Self {
self.__unsafe_private_named.0 = value.into();
self
}
pub fn maybe_grandparent_author(
mut self,
value: Option<crate::app_bsky::actor::ProfileViewBasic<'a>>,
) -> 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,
{
pub fn parent(
mut self,
value: impl Into<ReplyRefParent<'a>>,
) -> ReplyRefBuilder<'a, reply_ref_state::SetParent<S>> {
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,
{
pub fn root(
mut self,
value: impl Into<ReplyRefRoot<'a>>,
) -> ReplyRefBuilder<'a, reply_ref_state::SetRoot<S>> {
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,
{
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(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::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<crate::app_bsky::feed::PostView<'a>>),
#[serde(rename = "app.bsky.feed.defs#notFoundPost")]
NotFoundPost(Box<crate::app_bsky::feed::NotFoundPost<'a>>),
#[serde(rename = "app.bsky.feed.defs#blockedPost")]
BlockedPost(Box<crate::app_bsky::feed::BlockedPost<'a>>),
}
#[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<crate::app_bsky::feed::PostView<'a>>),
#[serde(rename = "app.bsky.feed.defs#notFoundPost")]
NotFoundPost(Box<crate::app_bsky::feed::NotFoundPost<'a>>),
#[serde(rename = "app.bsky.feed.defs#blockedPost")]
BlockedPost(Box<crate::app_bsky::feed::BlockedPost<'a>>),
}
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(())
}
}
#[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")
}
}
#[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> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub feed_context: std::option::Option<jacquard_common::CowStr<'a>>,
#[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<SkeletonFeedPostReason<'a>>,
}
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 {}
}
pub trait State: sealed::Sealed {
type Post;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Post = Unset;
}
pub struct SetPost<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetPost<S> {}
impl<S: State> State for SetPost<S> {
type Post = Set<members::post>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct post(());
}
}
pub struct SkeletonFeedPostBuilder<'a, S: skeleton_feed_post_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<jacquard_common::CowStr<'a>>,
::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
::core::option::Option<SkeletonFeedPostReason<'a>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> SkeletonFeedPost<'a> {
pub fn new() -> SkeletonFeedPostBuilder<'a, skeleton_feed_post_state::Empty> {
SkeletonFeedPostBuilder::new()
}
}
impl<'a> SkeletonFeedPostBuilder<'a, skeleton_feed_post_state::Empty> {
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> {
pub fn feed_context(
mut self,
value: impl Into<Option<jacquard_common::CowStr<'a>>>,
) -> Self {
self.__unsafe_private_named.0 = value.into();
self
}
pub fn maybe_feed_context(
mut self,
value: Option<jacquard_common::CowStr<'a>>,
) -> 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,
{
pub fn post(
mut self,
value: impl Into<jacquard_common::types::string::AtUri<'a>>,
) -> SkeletonFeedPostBuilder<'a, skeleton_feed_post_state::SetPost<S>> {
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> {
pub fn reason(
mut self,
value: impl Into<Option<SkeletonFeedPostReason<'a>>>,
) -> Self {
self.__unsafe_private_named.2 = value.into();
self
}
pub fn maybe_reason(mut self, value: Option<SkeletonFeedPostReason<'a>>) -> 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,
{
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(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::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<crate::app_bsky::feed::SkeletonReasonRepost<'a>>),
#[serde(rename = "app.bsky.feed.defs#skeletonReasonPin")]
SkeletonReasonPin(Box<crate::app_bsky::feed::SkeletonReasonPin<'a>>),
}
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 <str>::len(value.as_ref()) > 2000usize {
return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength {
path: ::jacquard_lexicon::validation::ValidationPath::from_field(
"feed_context",
),
max: 2000usize,
actual: <str>::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 {}
}
pub trait State: sealed::Sealed {
type Repost;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Repost = Unset;
}
pub struct SetRepost<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetRepost<S> {}
impl<S: State> State for SetRepost<S> {
type Repost = Set<members::repost>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct repost(());
}
}
pub struct SkeletonReasonRepostBuilder<'a, S: skeleton_reason_repost_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<jacquard_common::types::string::AtUri<'a>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> SkeletonReasonRepost<'a> {
pub fn new() -> SkeletonReasonRepostBuilder<
'a,
skeleton_reason_repost_state::Empty,
> {
SkeletonReasonRepostBuilder::new()
}
}
impl<'a> SkeletonReasonRepostBuilder<'a, skeleton_reason_repost_state::Empty> {
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,
{
pub fn repost(
mut self,
value: impl Into<jacquard_common::types::string::AtUri<'a>>,
) -> SkeletonReasonRepostBuilder<'a, skeleton_reason_repost_state::SetRepost<S>> {
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,
{
pub fn build(self) -> SkeletonReasonRepost<'a> {
SkeletonReasonRepost {
repost: self.__unsafe_private_named.0.unwrap(),
extra_data: Default::default(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::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(())
}
}
#[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<jacquard_common::types::string::AtUri<'a>>,
}
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<ThreadViewPostParent<'a>>,
#[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<Vec<ThreadViewPostRepliesItem<'a>>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub thread_context: std::option::Option<crate::app_bsky::feed::ThreadContext<'a>>,
}
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 {}
}
pub trait State: sealed::Sealed {
type Post;
}
pub struct Empty(());
impl sealed::Sealed for Empty {}
impl State for Empty {
type Post = Unset;
}
pub struct SetPost<S: State = Empty>(PhantomData<fn() -> S>);
impl<S: State> sealed::Sealed for SetPost<S> {}
impl<S: State> State for SetPost<S> {
type Post = Set<members::post>;
}
#[allow(non_camel_case_types)]
pub mod members {
pub struct post(());
}
}
pub struct ThreadViewPostBuilder<'a, S: thread_view_post_state::State> {
_phantom_state: ::core::marker::PhantomData<fn() -> S>,
__unsafe_private_named: (
::core::option::Option<ThreadViewPostParent<'a>>,
::core::option::Option<crate::app_bsky::feed::PostView<'a>>,
::core::option::Option<Vec<ThreadViewPostRepliesItem<'a>>>,
::core::option::Option<crate::app_bsky::feed::ThreadContext<'a>>,
),
_phantom: ::core::marker::PhantomData<&'a ()>,
}
impl<'a> ThreadViewPost<'a> {
pub fn new() -> ThreadViewPostBuilder<'a, thread_view_post_state::Empty> {
ThreadViewPostBuilder::new()
}
}
impl<'a> ThreadViewPostBuilder<'a, thread_view_post_state::Empty> {
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> {
pub fn parent(mut self, value: impl Into<Option<ThreadViewPostParent<'a>>>) -> Self {
self.__unsafe_private_named.0 = value.into();
self
}
pub fn maybe_parent(mut self, value: Option<ThreadViewPostParent<'a>>) -> 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,
{
pub fn post(
mut self,
value: impl Into<crate::app_bsky::feed::PostView<'a>>,
) -> ThreadViewPostBuilder<'a, thread_view_post_state::SetPost<S>> {
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> {
pub fn replies(
mut self,
value: impl Into<Option<Vec<ThreadViewPostRepliesItem<'a>>>>,
) -> Self {
self.__unsafe_private_named.2 = value.into();
self
}
pub fn maybe_replies(
mut self,
value: Option<Vec<ThreadViewPostRepliesItem<'a>>>,
) -> Self {
self.__unsafe_private_named.2 = value;
self
}
}
impl<'a, S: thread_view_post_state::State> ThreadViewPostBuilder<'a, S> {
pub fn thread_context(
mut self,
value: impl Into<Option<crate::app_bsky::feed::ThreadContext<'a>>>,
) -> Self {
self.__unsafe_private_named.3 = value.into();
self
}
pub fn maybe_thread_context(
mut self,
value: Option<crate::app_bsky::feed::ThreadContext<'a>>,
) -> 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,
{
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(),
}
}
pub fn build_with_data(
self,
extra_data: std::collections::BTreeMap<
jacquard_common::deps::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<crate::app_bsky::feed::ThreadViewPost<'a>>),
#[serde(rename = "app.bsky.feed.defs#notFoundPost")]
NotFoundPost(Box<crate::app_bsky::feed::NotFoundPost<'a>>),
#[serde(rename = "app.bsky.feed.defs#blockedPost")]
BlockedPost(Box<crate::app_bsky::feed::BlockedPost<'a>>),
}
#[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<crate::app_bsky::feed::ThreadViewPost<'a>>),
#[serde(rename = "app.bsky.feed.defs#notFoundPost")]
NotFoundPost(Box<crate::app_bsky::feed::NotFoundPost<'a>>),
#[serde(rename = "app.bsky.feed.defs#blockedPost")]
BlockedPost(Box<crate::app_bsky::feed::BlockedPost<'a>>),
}
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<jacquard_common::types::string::Cid<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub lists: std::option::Option<Vec<crate::app_bsky::graph::ListViewBasic<'a>>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub record: std::option::Option<jacquard_common::types::value::Data<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub uri: std::option::Option<jacquard_common::types::string::AtUri<'a>>,
}
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(())
}
}
#[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<bool>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub embedding_disabled: std::option::Option<bool>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub like: std::option::Option<jacquard_common::types::string::AtUri<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub pinned: std::option::Option<bool>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub reply_disabled: std::option::Option<bool>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub repost: std::option::Option<jacquard_common::types::string::AtUri<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub thread_muted: std::option::Option<bool>,
}
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(())
}
}