Skip to main content

jacquard_api/app_bsky/
feed.rs

1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: app.bsky.feed.defs
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8//! Generated bindings for the `app.bsky.feed` Lexicon namespace/module.
9pub mod describe_feed_generator;
10pub mod generator;
11pub mod get_actor_feeds;
12pub mod get_actor_likes;
13pub mod get_author_feed;
14pub mod get_feed;
15pub mod get_feed_generator;
16pub mod get_feed_generators;
17pub mod get_feed_skeleton;
18pub mod get_likes;
19pub mod get_list_feed;
20pub mod get_post_thread;
21pub mod get_posts;
22pub mod get_quotes;
23pub mod get_reposted_by;
24pub mod get_suggested_feeds;
25pub mod get_timeline;
26pub mod like;
27pub mod post;
28pub mod postgate;
29pub mod repost;
30pub mod search_posts;
31pub mod search_posts_v2;
32pub mod send_interactions;
33pub mod threadgate;
34
35#[allow(unused_imports)]
36use alloc::collections::BTreeMap;
37
38#[allow(unused_imports)]
39use core::marker::PhantomData;
40use jacquard_common::{BosStr, CowStr, DefaultStr, FromStaticStr};
41
42#[allow(unused_imports)]
43use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation;
44use jacquard_common::deps::smol_str::SmolStr;
45use jacquard_common::types::string::{AtUri, Cid, Datetime, Did, UriValue};
46use jacquard_common::types::value::Data;
47use jacquard_derive::{IntoStatic, open_union};
48use jacquard_lexicon::lexicon::LexiconDoc;
49use jacquard_lexicon::schema::LexiconSchema;
50
51use crate::app_bsky::actor;
52use crate::app_bsky::actor::ProfileView;
53use crate::app_bsky::actor::ProfileViewBasic;
54use crate::app_bsky::embed::external;
55use crate::app_bsky::embed::gallery;
56use crate::app_bsky::embed::images;
57use crate::app_bsky::embed::record;
58use crate::app_bsky::embed::record_with_media;
59use crate::app_bsky::embed::video;
60use crate::app_bsky::feed;
61use crate::app_bsky::graph::ListViewBasic;
62use crate::app_bsky::richtext::facet::Facet;
63use crate::com_atproto::label::Label;
64#[allow(unused_imports)]
65use jacquard_lexicon::validation::{ConstraintError, ValidationPath};
66use serde::{Deserialize, Serialize};
67
68#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
69#[serde(
70    rename_all = "camelCase",
71    bound(deserialize = "S: Deserialize<'de> + BosStr")
72)]
73pub struct BlockedAuthor<S: BosStr = DefaultStr> {
74    pub did: Did<S>,
75    #[serde(skip_serializing_if = "Option::is_none")]
76    pub viewer: Option<actor::ViewerState<S>>,
77    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
78    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
79}
80
81#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
82#[serde(
83    rename_all = "camelCase",
84    bound(deserialize = "S: Deserialize<'de> + BosStr")
85)]
86pub struct BlockedPost<S: BosStr = DefaultStr> {
87    pub author: feed::BlockedAuthor<S>,
88    pub blocked: bool,
89    pub uri: AtUri<S>,
90    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
91    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
92}
93
94/// User clicked through to the author of the feed item
95
96#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
97pub struct ClickthroughAuthor;
98impl core::fmt::Display for ClickthroughAuthor {
99    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
100        write!(f, "clickthroughAuthor")
101    }
102}
103
104/// User clicked through to the embedded content of the feed item
105
106#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
107pub struct ClickthroughEmbed;
108impl core::fmt::Display for ClickthroughEmbed {
109    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
110        write!(f, "clickthroughEmbed")
111    }
112}
113
114/// User clicked through to the feed item
115
116#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
117pub struct ClickthroughItem;
118impl core::fmt::Display for ClickthroughItem {
119    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
120        write!(f, "clickthroughItem")
121    }
122}
123
124/// User clicked through to the reposter of the feed item
125
126#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
127pub struct ClickthroughReposter;
128impl core::fmt::Display for ClickthroughReposter {
129    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
130        write!(f, "clickthroughReposter")
131    }
132}
133
134/// Declares the feed generator returns any types of posts.
135
136#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
137pub struct ContentModeUnspecified;
138impl core::fmt::Display for ContentModeUnspecified {
139    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
140        write!(f, "contentModeUnspecified")
141    }
142}
143
144/// Declares the feed generator returns posts containing app.bsky.embed.video embeds.
145
146#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
147pub struct ContentModeVideo;
148impl core::fmt::Display for ContentModeVideo {
149    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
150        write!(f, "contentModeVideo")
151    }
152}
153
154#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
155#[serde(
156    rename_all = "camelCase",
157    bound(deserialize = "S: Deserialize<'de> + BosStr")
158)]
159pub struct FeedViewPost<S: BosStr = DefaultStr> {
160    ///Context provided by feed generator that may be passed back alongside interactions.
161    #[serde(skip_serializing_if = "Option::is_none")]
162    pub feed_context: Option<S>,
163    pub post: feed::PostView<S>,
164    #[serde(skip_serializing_if = "Option::is_none")]
165    pub reason: Option<FeedViewPostReason<S>>,
166    #[serde(skip_serializing_if = "Option::is_none")]
167    pub reply: Option<feed::ReplyRef<S>>,
168    ///Unique identifier per request that may be passed back alongside interactions.
169    #[serde(skip_serializing_if = "Option::is_none")]
170    pub req_id: Option<S>,
171    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
172    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
173}
174
175#[open_union]
176#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
177#[serde(tag = "$type", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
178pub enum FeedViewPostReason<S: BosStr = DefaultStr> {
179    #[serde(rename = "app.bsky.feed.defs#reasonRepost")]
180    ReasonRepost(Box<feed::ReasonRepost<S>>),
181    #[serde(rename = "app.bsky.feed.defs#reasonPin")]
182    ReasonPin(Box<feed::ReasonPin<S>>),
183}
184
185#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
186#[serde(
187    rename_all = "camelCase",
188    bound(deserialize = "S: Deserialize<'de> + BosStr")
189)]
190pub struct GeneratorView<S: BosStr = DefaultStr> {
191    #[serde(skip_serializing_if = "Option::is_none")]
192    pub accepts_interactions: Option<bool>,
193    #[serde(skip_serializing_if = "Option::is_none")]
194    pub avatar: Option<UriValue<S>>,
195    pub cid: Cid<S>,
196    #[serde(skip_serializing_if = "Option::is_none")]
197    pub content_mode: Option<GeneratorViewContentMode<S>>,
198    pub creator: ProfileView<S>,
199    #[serde(skip_serializing_if = "Option::is_none")]
200    pub description: Option<S>,
201    #[serde(skip_serializing_if = "Option::is_none")]
202    pub description_facets: Option<Vec<Facet<S>>>,
203    pub did: Did<S>,
204    pub display_name: S,
205    pub indexed_at: Datetime,
206    #[serde(skip_serializing_if = "Option::is_none")]
207    pub labels: Option<Vec<Label<S>>>,
208    #[serde(skip_serializing_if = "Option::is_none")]
209    pub like_count: Option<i64>,
210    pub uri: AtUri<S>,
211    #[serde(skip_serializing_if = "Option::is_none")]
212    pub viewer: Option<feed::GeneratorViewerState<S>>,
213    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
214    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
215}
216
217#[derive(Debug, Clone, PartialEq, Eq, Hash)]
218pub enum GeneratorViewContentMode<S: BosStr = DefaultStr> {
219    ContentModeUnspecified,
220    ContentModeVideo,
221    Other(S),
222}
223
224impl<S: BosStr> GeneratorViewContentMode<S> {
225    pub fn as_str(&self) -> &str {
226        match self {
227            Self::ContentModeUnspecified => "app.bsky.feed.defs#contentModeUnspecified",
228            Self::ContentModeVideo => "app.bsky.feed.defs#contentModeVideo",
229            Self::Other(s) => s.as_ref(),
230        }
231    }
232    /// Construct from a string-like value, matching known values.
233    pub fn from_value(s: S) -> Self {
234        match s.as_ref() {
235            "app.bsky.feed.defs#contentModeUnspecified" => Self::ContentModeUnspecified,
236            "app.bsky.feed.defs#contentModeVideo" => Self::ContentModeVideo,
237            _ => Self::Other(s),
238        }
239    }
240}
241
242impl<S: BosStr> core::fmt::Display for GeneratorViewContentMode<S> {
243    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
244        write!(f, "{}", self.as_str())
245    }
246}
247
248impl<S: BosStr> AsRef<str> for GeneratorViewContentMode<S> {
249    fn as_ref(&self) -> &str {
250        self.as_str()
251    }
252}
253
254impl<S: BosStr> Serialize for GeneratorViewContentMode<S> {
255    fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
256    where
257        Ser: serde::Serializer,
258    {
259        serializer.serialize_str(self.as_str())
260    }
261}
262
263impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for GeneratorViewContentMode<S> {
264    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
265    where
266        D: serde::Deserializer<'de>,
267    {
268        let s = S::deserialize(deserializer)?;
269        Ok(Self::from_value(s))
270    }
271}
272
273impl<S: BosStr + Default> Default for GeneratorViewContentMode<S> {
274    fn default() -> Self {
275        Self::Other(Default::default())
276    }
277}
278
279impl<S: BosStr> jacquard_common::IntoStatic for GeneratorViewContentMode<S>
280where
281    S: BosStr + jacquard_common::IntoStatic,
282    S::Output: BosStr,
283{
284    type Output = GeneratorViewContentMode<S::Output>;
285    fn into_static(self) -> Self::Output {
286        match self {
287            GeneratorViewContentMode::ContentModeUnspecified => {
288                GeneratorViewContentMode::ContentModeUnspecified
289            }
290            GeneratorViewContentMode::ContentModeVideo => {
291                GeneratorViewContentMode::ContentModeVideo
292            }
293            GeneratorViewContentMode::Other(v) => GeneratorViewContentMode::Other(v.into_static()),
294        }
295    }
296}
297
298#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
299#[serde(
300    rename_all = "camelCase",
301    bound(deserialize = "S: Deserialize<'de> + BosStr")
302)]
303pub struct GeneratorViewerState<S: BosStr = DefaultStr> {
304    #[serde(skip_serializing_if = "Option::is_none")]
305    pub like: Option<AtUri<S>>,
306    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
307    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
308}
309
310#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
311#[serde(
312    rename_all = "camelCase",
313    bound(deserialize = "S: Deserialize<'de> + BosStr")
314)]
315pub struct Interaction<S: BosStr = DefaultStr> {
316    #[serde(skip_serializing_if = "Option::is_none")]
317    pub event: Option<InteractionEvent<S>>,
318    ///Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton.
319    #[serde(skip_serializing_if = "Option::is_none")]
320    pub feed_context: Option<S>,
321    #[serde(skip_serializing_if = "Option::is_none")]
322    pub item: Option<AtUri<S>>,
323    ///Unique identifier per request that may be passed back alongside interactions.
324    #[serde(skip_serializing_if = "Option::is_none")]
325    pub req_id: Option<S>,
326    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
327    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
328}
329
330#[derive(Debug, Clone, PartialEq, Eq, Hash)]
331pub enum InteractionEvent<S: BosStr = DefaultStr> {
332    RequestLess,
333    RequestMore,
334    ClickthroughItem,
335    ClickthroughAuthor,
336    ClickthroughReposter,
337    ClickthroughEmbed,
338    InteractionSeen,
339    InteractionLike,
340    InteractionRepost,
341    InteractionReply,
342    InteractionQuote,
343    InteractionShare,
344    Other(S),
345}
346
347impl<S: BosStr> InteractionEvent<S> {
348    pub fn as_str(&self) -> &str {
349        match self {
350            Self::RequestLess => "app.bsky.feed.defs#requestLess",
351            Self::RequestMore => "app.bsky.feed.defs#requestMore",
352            Self::ClickthroughItem => "app.bsky.feed.defs#clickthroughItem",
353            Self::ClickthroughAuthor => "app.bsky.feed.defs#clickthroughAuthor",
354            Self::ClickthroughReposter => "app.bsky.feed.defs#clickthroughReposter",
355            Self::ClickthroughEmbed => "app.bsky.feed.defs#clickthroughEmbed",
356            Self::InteractionSeen => "app.bsky.feed.defs#interactionSeen",
357            Self::InteractionLike => "app.bsky.feed.defs#interactionLike",
358            Self::InteractionRepost => "app.bsky.feed.defs#interactionRepost",
359            Self::InteractionReply => "app.bsky.feed.defs#interactionReply",
360            Self::InteractionQuote => "app.bsky.feed.defs#interactionQuote",
361            Self::InteractionShare => "app.bsky.feed.defs#interactionShare",
362            Self::Other(s) => s.as_ref(),
363        }
364    }
365    /// Construct from a string-like value, matching known values.
366    pub fn from_value(s: S) -> Self {
367        match s.as_ref() {
368            "app.bsky.feed.defs#requestLess" => Self::RequestLess,
369            "app.bsky.feed.defs#requestMore" => Self::RequestMore,
370            "app.bsky.feed.defs#clickthroughItem" => Self::ClickthroughItem,
371            "app.bsky.feed.defs#clickthroughAuthor" => Self::ClickthroughAuthor,
372            "app.bsky.feed.defs#clickthroughReposter" => Self::ClickthroughReposter,
373            "app.bsky.feed.defs#clickthroughEmbed" => Self::ClickthroughEmbed,
374            "app.bsky.feed.defs#interactionSeen" => Self::InteractionSeen,
375            "app.bsky.feed.defs#interactionLike" => Self::InteractionLike,
376            "app.bsky.feed.defs#interactionRepost" => Self::InteractionRepost,
377            "app.bsky.feed.defs#interactionReply" => Self::InteractionReply,
378            "app.bsky.feed.defs#interactionQuote" => Self::InteractionQuote,
379            "app.bsky.feed.defs#interactionShare" => Self::InteractionShare,
380            _ => Self::Other(s),
381        }
382    }
383}
384
385impl<S: BosStr> core::fmt::Display for InteractionEvent<S> {
386    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
387        write!(f, "{}", self.as_str())
388    }
389}
390
391impl<S: BosStr> AsRef<str> for InteractionEvent<S> {
392    fn as_ref(&self) -> &str {
393        self.as_str()
394    }
395}
396
397impl<S: BosStr> Serialize for InteractionEvent<S> {
398    fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
399    where
400        Ser: serde::Serializer,
401    {
402        serializer.serialize_str(self.as_str())
403    }
404}
405
406impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for InteractionEvent<S> {
407    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
408    where
409        D: serde::Deserializer<'de>,
410    {
411        let s = S::deserialize(deserializer)?;
412        Ok(Self::from_value(s))
413    }
414}
415
416impl<S: BosStr + Default> Default for InteractionEvent<S> {
417    fn default() -> Self {
418        Self::Other(Default::default())
419    }
420}
421
422impl<S: BosStr> jacquard_common::IntoStatic for InteractionEvent<S>
423where
424    S: BosStr + jacquard_common::IntoStatic,
425    S::Output: BosStr,
426{
427    type Output = InteractionEvent<S::Output>;
428    fn into_static(self) -> Self::Output {
429        match self {
430            InteractionEvent::RequestLess => InteractionEvent::RequestLess,
431            InteractionEvent::RequestMore => InteractionEvent::RequestMore,
432            InteractionEvent::ClickthroughItem => InteractionEvent::ClickthroughItem,
433            InteractionEvent::ClickthroughAuthor => InteractionEvent::ClickthroughAuthor,
434            InteractionEvent::ClickthroughReposter => InteractionEvent::ClickthroughReposter,
435            InteractionEvent::ClickthroughEmbed => InteractionEvent::ClickthroughEmbed,
436            InteractionEvent::InteractionSeen => InteractionEvent::InteractionSeen,
437            InteractionEvent::InteractionLike => InteractionEvent::InteractionLike,
438            InteractionEvent::InteractionRepost => InteractionEvent::InteractionRepost,
439            InteractionEvent::InteractionReply => InteractionEvent::InteractionReply,
440            InteractionEvent::InteractionQuote => InteractionEvent::InteractionQuote,
441            InteractionEvent::InteractionShare => InteractionEvent::InteractionShare,
442            InteractionEvent::Other(v) => InteractionEvent::Other(v.into_static()),
443        }
444    }
445}
446
447/// User liked the feed item
448
449#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
450pub struct InteractionLike;
451impl core::fmt::Display for InteractionLike {
452    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
453        write!(f, "interactionLike")
454    }
455}
456
457/// User quoted the feed item
458
459#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
460pub struct InteractionQuote;
461impl core::fmt::Display for InteractionQuote {
462    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
463        write!(f, "interactionQuote")
464    }
465}
466
467/// User replied to the feed item
468
469#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
470pub struct InteractionReply;
471impl core::fmt::Display for InteractionReply {
472    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
473        write!(f, "interactionReply")
474    }
475}
476
477/// User reposted the feed item
478
479#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
480pub struct InteractionRepost;
481impl core::fmt::Display for InteractionRepost {
482    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
483        write!(f, "interactionRepost")
484    }
485}
486
487/// Feed item was seen by user
488
489#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
490pub struct InteractionSeen;
491impl core::fmt::Display for InteractionSeen {
492    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
493        write!(f, "interactionSeen")
494    }
495}
496
497/// User shared the feed item
498
499#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
500pub struct InteractionShare;
501impl core::fmt::Display for InteractionShare {
502    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
503        write!(f, "interactionShare")
504    }
505}
506
507#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
508#[serde(
509    rename_all = "camelCase",
510    bound(deserialize = "S: Deserialize<'de> + BosStr")
511)]
512pub struct NotFoundPost<S: BosStr = DefaultStr> {
513    pub not_found: bool,
514    pub uri: AtUri<S>,
515    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
516    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
517}
518
519#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
520#[serde(
521    rename_all = "camelCase",
522    bound(deserialize = "S: Deserialize<'de> + BosStr")
523)]
524pub struct PostView<S: BosStr = DefaultStr> {
525    pub author: ProfileViewBasic<S>,
526    #[serde(skip_serializing_if = "Option::is_none")]
527    pub bookmark_count: Option<i64>,
528    pub cid: Cid<S>,
529    ///Debug information for internal development
530    #[serde(skip_serializing_if = "Option::is_none")]
531    pub debug: Option<Data<S>>,
532    #[serde(skip_serializing_if = "Option::is_none")]
533    pub embed: Option<PostViewEmbed<S>>,
534    pub indexed_at: Datetime,
535    #[serde(skip_serializing_if = "Option::is_none")]
536    pub labels: Option<Vec<Label<S>>>,
537    #[serde(skip_serializing_if = "Option::is_none")]
538    pub like_count: Option<i64>,
539    #[serde(skip_serializing_if = "Option::is_none")]
540    pub quote_count: Option<i64>,
541    pub record: Data<S>,
542    #[serde(skip_serializing_if = "Option::is_none")]
543    pub reply_count: Option<i64>,
544    #[serde(skip_serializing_if = "Option::is_none")]
545    pub repost_count: Option<i64>,
546    #[serde(skip_serializing_if = "Option::is_none")]
547    pub threadgate: Option<feed::ThreadgateView<S>>,
548    pub uri: AtUri<S>,
549    #[serde(skip_serializing_if = "Option::is_none")]
550    pub viewer: Option<feed::ViewerState<S>>,
551    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
552    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
553}
554
555#[open_union]
556#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
557#[serde(tag = "$type", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
558pub enum PostViewEmbed<S: BosStr = DefaultStr> {
559    #[serde(rename = "app.bsky.embed.images#view")]
560    ImagesView(Box<images::View<S>>),
561    #[serde(rename = "app.bsky.embed.video#view")]
562    VideoView(Box<video::View<S>>),
563    #[serde(rename = "app.bsky.embed.gallery#view")]
564    GalleryView(Box<gallery::View<S>>),
565    #[serde(rename = "app.bsky.embed.external#view")]
566    ExternalView(Box<external::View<S>>),
567    #[serde(rename = "app.bsky.embed.record#view")]
568    RecordView(Box<record::View<S>>),
569    #[serde(rename = "app.bsky.embed.recordWithMedia#view")]
570    RecordWithMediaView(Box<record_with_media::View<S>>),
571}
572
573#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
574#[serde(
575    rename_all = "camelCase",
576    bound(deserialize = "S: Deserialize<'de> + BosStr")
577)]
578pub struct ReasonPin<S: BosStr = DefaultStr> {
579    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
580    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
581}
582
583#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
584#[serde(
585    rename_all = "camelCase",
586    bound(deserialize = "S: Deserialize<'de> + BosStr")
587)]
588pub struct ReasonRepost<S: BosStr = DefaultStr> {
589    pub by: ProfileViewBasic<S>,
590    #[serde(skip_serializing_if = "Option::is_none")]
591    pub cid: Option<Cid<S>>,
592    pub indexed_at: Datetime,
593    #[serde(skip_serializing_if = "Option::is_none")]
594    pub uri: Option<AtUri<S>>,
595    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
596    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
597}
598
599#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
600#[serde(
601    rename_all = "camelCase",
602    bound(deserialize = "S: Deserialize<'de> + BosStr")
603)]
604pub struct ReplyRef<S: BosStr = DefaultStr> {
605    ///When parent is a reply to another post, this is the author of that post.
606    #[serde(skip_serializing_if = "Option::is_none")]
607    pub grandparent_author: Option<ProfileViewBasic<S>>,
608    pub parent: ReplyRefParent<S>,
609    pub root: ReplyRefRoot<S>,
610    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
611    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
612}
613
614#[open_union]
615#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
616#[serde(tag = "$type", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
617pub enum ReplyRefParent<S: BosStr = DefaultStr> {
618    #[serde(rename = "app.bsky.feed.defs#postView")]
619    PostView(Box<feed::PostView<S>>),
620    #[serde(rename = "app.bsky.feed.defs#notFoundPost")]
621    NotFoundPost(Box<feed::NotFoundPost<S>>),
622    #[serde(rename = "app.bsky.feed.defs#blockedPost")]
623    BlockedPost(Box<feed::BlockedPost<S>>),
624}
625
626#[open_union]
627#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
628#[serde(tag = "$type", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
629pub enum ReplyRefRoot<S: BosStr = DefaultStr> {
630    #[serde(rename = "app.bsky.feed.defs#postView")]
631    PostView(Box<feed::PostView<S>>),
632    #[serde(rename = "app.bsky.feed.defs#notFoundPost")]
633    NotFoundPost(Box<feed::NotFoundPost<S>>),
634    #[serde(rename = "app.bsky.feed.defs#blockedPost")]
635    BlockedPost(Box<feed::BlockedPost<S>>),
636}
637
638/// Request that less content like the given feed item be shown in the feed
639
640#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
641pub struct RequestLess;
642impl core::fmt::Display for RequestLess {
643    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
644        write!(f, "requestLess")
645    }
646}
647
648/// Request that more content like the given feed item be shown in the feed
649
650#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)]
651pub struct RequestMore;
652impl core::fmt::Display for RequestMore {
653    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
654        write!(f, "requestMore")
655    }
656}
657
658#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
659#[serde(
660    rename_all = "camelCase",
661    bound(deserialize = "S: Deserialize<'de> + BosStr")
662)]
663pub struct SkeletonFeedPost<S: BosStr = DefaultStr> {
664    ///Context that will be passed through to client and may be passed to feed generator back alongside interactions.
665    #[serde(skip_serializing_if = "Option::is_none")]
666    pub feed_context: Option<S>,
667    pub post: AtUri<S>,
668    #[serde(skip_serializing_if = "Option::is_none")]
669    pub reason: Option<SkeletonFeedPostReason<S>>,
670    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
671    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
672}
673
674#[open_union]
675#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
676#[serde(tag = "$type", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
677pub enum SkeletonFeedPostReason<S: BosStr = DefaultStr> {
678    #[serde(rename = "app.bsky.feed.defs#skeletonReasonRepost")]
679    SkeletonReasonRepost(Box<feed::SkeletonReasonRepost<S>>),
680    #[serde(rename = "app.bsky.feed.defs#skeletonReasonPin")]
681    SkeletonReasonPin(Box<feed::SkeletonReasonPin<S>>),
682}
683
684#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
685#[serde(
686    rename_all = "camelCase",
687    bound(deserialize = "S: Deserialize<'de> + BosStr")
688)]
689pub struct SkeletonReasonPin<S: BosStr = DefaultStr> {
690    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
691    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
692}
693
694#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
695#[serde(
696    rename_all = "camelCase",
697    bound(deserialize = "S: Deserialize<'de> + BosStr")
698)]
699pub struct SkeletonReasonRepost<S: BosStr = DefaultStr> {
700    pub repost: AtUri<S>,
701    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
702    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
703}
704
705/// Metadata about this post within the context of the thread it is in.
706
707#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
708#[serde(
709    rename_all = "camelCase",
710    bound(deserialize = "S: Deserialize<'de> + BosStr")
711)]
712pub struct ThreadContext<S: BosStr = DefaultStr> {
713    #[serde(skip_serializing_if = "Option::is_none")]
714    pub root_author_like: Option<AtUri<S>>,
715    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
716    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
717}
718
719#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
720#[serde(
721    rename_all = "camelCase",
722    bound(deserialize = "S: Deserialize<'de> + BosStr")
723)]
724pub struct ThreadViewPost<S: BosStr = DefaultStr> {
725    #[serde(skip_serializing_if = "Option::is_none")]
726    pub parent: Option<ThreadViewPostParent<S>>,
727    pub post: feed::PostView<S>,
728    #[serde(skip_serializing_if = "Option::is_none")]
729    pub replies: Option<Vec<ThreadViewPostRepliesItem<S>>>,
730    #[serde(skip_serializing_if = "Option::is_none")]
731    pub thread_context: Option<feed::ThreadContext<S>>,
732    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
733    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
734}
735
736#[open_union]
737#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
738#[serde(tag = "$type", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
739pub enum ThreadViewPostParent<S: BosStr = DefaultStr> {
740    #[serde(rename = "app.bsky.feed.defs#threadViewPost")]
741    ThreadViewPost(Box<feed::ThreadViewPost<S>>),
742    #[serde(rename = "app.bsky.feed.defs#notFoundPost")]
743    NotFoundPost(Box<feed::NotFoundPost<S>>),
744    #[serde(rename = "app.bsky.feed.defs#blockedPost")]
745    BlockedPost(Box<feed::BlockedPost<S>>),
746}
747
748#[open_union]
749#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
750#[serde(tag = "$type", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
751pub enum ThreadViewPostRepliesItem<S: BosStr = DefaultStr> {
752    #[serde(rename = "app.bsky.feed.defs#threadViewPost")]
753    ThreadViewPost(Box<feed::ThreadViewPost<S>>),
754    #[serde(rename = "app.bsky.feed.defs#notFoundPost")]
755    NotFoundPost(Box<feed::NotFoundPost<S>>),
756    #[serde(rename = "app.bsky.feed.defs#blockedPost")]
757    BlockedPost(Box<feed::BlockedPost<S>>),
758}
759
760#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
761#[serde(
762    rename_all = "camelCase",
763    bound(deserialize = "S: Deserialize<'de> + BosStr")
764)]
765pub struct ThreadgateView<S: BosStr = DefaultStr> {
766    #[serde(skip_serializing_if = "Option::is_none")]
767    pub cid: Option<Cid<S>>,
768    #[serde(skip_serializing_if = "Option::is_none")]
769    pub lists: Option<Vec<ListViewBasic<S>>>,
770    #[serde(skip_serializing_if = "Option::is_none")]
771    pub record: Option<Data<S>>,
772    #[serde(skip_serializing_if = "Option::is_none")]
773    pub uri: Option<AtUri<S>>,
774    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
775    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
776}
777
778/// Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests.
779
780#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
781#[serde(
782    rename_all = "camelCase",
783    bound(deserialize = "S: Deserialize<'de> + BosStr")
784)]
785pub struct ViewerState<S: BosStr = DefaultStr> {
786    #[serde(skip_serializing_if = "Option::is_none")]
787    pub bookmarked: Option<bool>,
788    #[serde(skip_serializing_if = "Option::is_none")]
789    pub embedding_disabled: Option<bool>,
790    #[serde(skip_serializing_if = "Option::is_none")]
791    pub like: Option<AtUri<S>>,
792    #[serde(skip_serializing_if = "Option::is_none")]
793    pub pinned: Option<bool>,
794    #[serde(skip_serializing_if = "Option::is_none")]
795    pub reply_disabled: Option<bool>,
796    #[serde(skip_serializing_if = "Option::is_none")]
797    pub repost: Option<AtUri<S>>,
798    #[serde(skip_serializing_if = "Option::is_none")]
799    pub thread_muted: Option<bool>,
800    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
801    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
802}
803
804impl<S: BosStr> LexiconSchema for BlockedAuthor<S> {
805    fn nsid() -> &'static str {
806        "app.bsky.feed.defs"
807    }
808    fn def_name() -> &'static str {
809        "blockedAuthor"
810    }
811    fn lexicon_doc() -> LexiconDoc<'static> {
812        lexicon_doc_app_bsky_feed_defs()
813    }
814    fn validate(&self) -> Result<(), ConstraintError> {
815        Ok(())
816    }
817}
818
819impl<S: BosStr> LexiconSchema for BlockedPost<S> {
820    fn nsid() -> &'static str {
821        "app.bsky.feed.defs"
822    }
823    fn def_name() -> &'static str {
824        "blockedPost"
825    }
826    fn lexicon_doc() -> LexiconDoc<'static> {
827        lexicon_doc_app_bsky_feed_defs()
828    }
829    fn validate(&self) -> Result<(), ConstraintError> {
830        Ok(())
831    }
832}
833
834impl<S: BosStr> LexiconSchema for FeedViewPost<S> {
835    fn nsid() -> &'static str {
836        "app.bsky.feed.defs"
837    }
838    fn def_name() -> &'static str {
839        "feedViewPost"
840    }
841    fn lexicon_doc() -> LexiconDoc<'static> {
842        lexicon_doc_app_bsky_feed_defs()
843    }
844    fn validate(&self) -> Result<(), ConstraintError> {
845        if let Some(ref value) = self.feed_context {
846            #[allow(unused_comparisons)]
847            if <str>::len(value.as_ref()) > 2000usize {
848                return Err(ConstraintError::MaxLength {
849                    path: ValidationPath::from_field("feed_context"),
850                    max: 2000usize,
851                    actual: <str>::len(value.as_ref()),
852                });
853            }
854        }
855        if let Some(ref value) = self.req_id {
856            #[allow(unused_comparisons)]
857            if <str>::len(value.as_ref()) > 100usize {
858                return Err(ConstraintError::MaxLength {
859                    path: ValidationPath::from_field("req_id"),
860                    max: 100usize,
861                    actual: <str>::len(value.as_ref()),
862                });
863            }
864        }
865        Ok(())
866    }
867}
868
869impl<S: BosStr> LexiconSchema for GeneratorView<S> {
870    fn nsid() -> &'static str {
871        "app.bsky.feed.defs"
872    }
873    fn def_name() -> &'static str {
874        "generatorView"
875    }
876    fn lexicon_doc() -> LexiconDoc<'static> {
877        lexicon_doc_app_bsky_feed_defs()
878    }
879    fn validate(&self) -> Result<(), ConstraintError> {
880        if let Some(ref value) = self.description {
881            #[allow(unused_comparisons)]
882            if <str>::len(value.as_ref()) > 3000usize {
883                return Err(ConstraintError::MaxLength {
884                    path: ValidationPath::from_field("description"),
885                    max: 3000usize,
886                    actual: <str>::len(value.as_ref()),
887                });
888            }
889        }
890        if let Some(ref value) = self.description {
891            {
892                let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count();
893                if count > 300usize {
894                    return Err(ConstraintError::MaxGraphemes {
895                        path: ValidationPath::from_field("description"),
896                        max: 300usize,
897                        actual: count,
898                    });
899                }
900            }
901        }
902        if let Some(ref value) = self.like_count {
903            if *value < 0i64 {
904                return Err(ConstraintError::Minimum {
905                    path: ValidationPath::from_field("like_count"),
906                    min: 0i64,
907                    actual: *value,
908                });
909            }
910        }
911        Ok(())
912    }
913}
914
915impl<S: BosStr> LexiconSchema for GeneratorViewerState<S> {
916    fn nsid() -> &'static str {
917        "app.bsky.feed.defs"
918    }
919    fn def_name() -> &'static str {
920        "generatorViewerState"
921    }
922    fn lexicon_doc() -> LexiconDoc<'static> {
923        lexicon_doc_app_bsky_feed_defs()
924    }
925    fn validate(&self) -> Result<(), ConstraintError> {
926        Ok(())
927    }
928}
929
930impl<S: BosStr> LexiconSchema for Interaction<S> {
931    fn nsid() -> &'static str {
932        "app.bsky.feed.defs"
933    }
934    fn def_name() -> &'static str {
935        "interaction"
936    }
937    fn lexicon_doc() -> LexiconDoc<'static> {
938        lexicon_doc_app_bsky_feed_defs()
939    }
940    fn validate(&self) -> Result<(), ConstraintError> {
941        if let Some(ref value) = self.feed_context {
942            #[allow(unused_comparisons)]
943            if <str>::len(value.as_ref()) > 2000usize {
944                return Err(ConstraintError::MaxLength {
945                    path: ValidationPath::from_field("feed_context"),
946                    max: 2000usize,
947                    actual: <str>::len(value.as_ref()),
948                });
949            }
950        }
951        if let Some(ref value) = self.req_id {
952            #[allow(unused_comparisons)]
953            if <str>::len(value.as_ref()) > 100usize {
954                return Err(ConstraintError::MaxLength {
955                    path: ValidationPath::from_field("req_id"),
956                    max: 100usize,
957                    actual: <str>::len(value.as_ref()),
958                });
959            }
960        }
961        Ok(())
962    }
963}
964
965impl<S: BosStr> LexiconSchema for NotFoundPost<S> {
966    fn nsid() -> &'static str {
967        "app.bsky.feed.defs"
968    }
969    fn def_name() -> &'static str {
970        "notFoundPost"
971    }
972    fn lexicon_doc() -> LexiconDoc<'static> {
973        lexicon_doc_app_bsky_feed_defs()
974    }
975    fn validate(&self) -> Result<(), ConstraintError> {
976        Ok(())
977    }
978}
979
980impl<S: BosStr> LexiconSchema for PostView<S> {
981    fn nsid() -> &'static str {
982        "app.bsky.feed.defs"
983    }
984    fn def_name() -> &'static str {
985        "postView"
986    }
987    fn lexicon_doc() -> LexiconDoc<'static> {
988        lexicon_doc_app_bsky_feed_defs()
989    }
990    fn validate(&self) -> Result<(), ConstraintError> {
991        Ok(())
992    }
993}
994
995impl<S: BosStr> LexiconSchema for ReasonPin<S> {
996    fn nsid() -> &'static str {
997        "app.bsky.feed.defs"
998    }
999    fn def_name() -> &'static str {
1000        "reasonPin"
1001    }
1002    fn lexicon_doc() -> LexiconDoc<'static> {
1003        lexicon_doc_app_bsky_feed_defs()
1004    }
1005    fn validate(&self) -> Result<(), ConstraintError> {
1006        Ok(())
1007    }
1008}
1009
1010impl<S: BosStr> LexiconSchema for ReasonRepost<S> {
1011    fn nsid() -> &'static str {
1012        "app.bsky.feed.defs"
1013    }
1014    fn def_name() -> &'static str {
1015        "reasonRepost"
1016    }
1017    fn lexicon_doc() -> LexiconDoc<'static> {
1018        lexicon_doc_app_bsky_feed_defs()
1019    }
1020    fn validate(&self) -> Result<(), ConstraintError> {
1021        Ok(())
1022    }
1023}
1024
1025impl<S: BosStr> LexiconSchema for ReplyRef<S> {
1026    fn nsid() -> &'static str {
1027        "app.bsky.feed.defs"
1028    }
1029    fn def_name() -> &'static str {
1030        "replyRef"
1031    }
1032    fn lexicon_doc() -> LexiconDoc<'static> {
1033        lexicon_doc_app_bsky_feed_defs()
1034    }
1035    fn validate(&self) -> Result<(), ConstraintError> {
1036        Ok(())
1037    }
1038}
1039
1040impl<S: BosStr> LexiconSchema for SkeletonFeedPost<S> {
1041    fn nsid() -> &'static str {
1042        "app.bsky.feed.defs"
1043    }
1044    fn def_name() -> &'static str {
1045        "skeletonFeedPost"
1046    }
1047    fn lexicon_doc() -> LexiconDoc<'static> {
1048        lexicon_doc_app_bsky_feed_defs()
1049    }
1050    fn validate(&self) -> Result<(), ConstraintError> {
1051        if let Some(ref value) = self.feed_context {
1052            #[allow(unused_comparisons)]
1053            if <str>::len(value.as_ref()) > 2000usize {
1054                return Err(ConstraintError::MaxLength {
1055                    path: ValidationPath::from_field("feed_context"),
1056                    max: 2000usize,
1057                    actual: <str>::len(value.as_ref()),
1058                });
1059            }
1060        }
1061        Ok(())
1062    }
1063}
1064
1065impl<S: BosStr> LexiconSchema for SkeletonReasonPin<S> {
1066    fn nsid() -> &'static str {
1067        "app.bsky.feed.defs"
1068    }
1069    fn def_name() -> &'static str {
1070        "skeletonReasonPin"
1071    }
1072    fn lexicon_doc() -> LexiconDoc<'static> {
1073        lexicon_doc_app_bsky_feed_defs()
1074    }
1075    fn validate(&self) -> Result<(), ConstraintError> {
1076        Ok(())
1077    }
1078}
1079
1080impl<S: BosStr> LexiconSchema for SkeletonReasonRepost<S> {
1081    fn nsid() -> &'static str {
1082        "app.bsky.feed.defs"
1083    }
1084    fn def_name() -> &'static str {
1085        "skeletonReasonRepost"
1086    }
1087    fn lexicon_doc() -> LexiconDoc<'static> {
1088        lexicon_doc_app_bsky_feed_defs()
1089    }
1090    fn validate(&self) -> Result<(), ConstraintError> {
1091        Ok(())
1092    }
1093}
1094
1095impl<S: BosStr> LexiconSchema for ThreadContext<S> {
1096    fn nsid() -> &'static str {
1097        "app.bsky.feed.defs"
1098    }
1099    fn def_name() -> &'static str {
1100        "threadContext"
1101    }
1102    fn lexicon_doc() -> LexiconDoc<'static> {
1103        lexicon_doc_app_bsky_feed_defs()
1104    }
1105    fn validate(&self) -> Result<(), ConstraintError> {
1106        Ok(())
1107    }
1108}
1109
1110impl<S: BosStr> LexiconSchema for ThreadViewPost<S> {
1111    fn nsid() -> &'static str {
1112        "app.bsky.feed.defs"
1113    }
1114    fn def_name() -> &'static str {
1115        "threadViewPost"
1116    }
1117    fn lexicon_doc() -> LexiconDoc<'static> {
1118        lexicon_doc_app_bsky_feed_defs()
1119    }
1120    fn validate(&self) -> Result<(), ConstraintError> {
1121        Ok(())
1122    }
1123}
1124
1125impl<S: BosStr> LexiconSchema for ThreadgateView<S> {
1126    fn nsid() -> &'static str {
1127        "app.bsky.feed.defs"
1128    }
1129    fn def_name() -> &'static str {
1130        "threadgateView"
1131    }
1132    fn lexicon_doc() -> LexiconDoc<'static> {
1133        lexicon_doc_app_bsky_feed_defs()
1134    }
1135    fn validate(&self) -> Result<(), ConstraintError> {
1136        Ok(())
1137    }
1138}
1139
1140impl<S: BosStr> LexiconSchema for ViewerState<S> {
1141    fn nsid() -> &'static str {
1142        "app.bsky.feed.defs"
1143    }
1144    fn def_name() -> &'static str {
1145        "viewerState"
1146    }
1147    fn lexicon_doc() -> LexiconDoc<'static> {
1148        lexicon_doc_app_bsky_feed_defs()
1149    }
1150    fn validate(&self) -> Result<(), ConstraintError> {
1151        Ok(())
1152    }
1153}
1154
1155pub mod blocked_author_state {
1156
1157    pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
1158    #[allow(unused)]
1159    use ::core::marker::PhantomData;
1160    mod sealed {
1161        pub trait Sealed {}
1162    }
1163    /// State trait tracking which required fields have been set
1164    pub trait State: sealed::Sealed {
1165        type Did;
1166    }
1167    /// Empty state - all required fields are unset
1168    pub struct Empty(());
1169    impl sealed::Sealed for Empty {}
1170    impl State for Empty {
1171        type Did = Unset;
1172    }
1173    ///State transition - sets the `did` field to Set
1174    pub struct SetDid<St: State = Empty>(PhantomData<fn() -> St>);
1175    impl<St: State> sealed::Sealed for SetDid<St> {}
1176    impl<St: State> State for SetDid<St> {
1177        type Did = Set<members::did>;
1178    }
1179    /// Marker types for field names
1180    #[allow(non_camel_case_types)]
1181    pub mod members {
1182        ///Marker type for the `did` field
1183        pub struct did(());
1184    }
1185}
1186
1187/// Builder for constructing an instance of this type.
1188pub struct BlockedAuthorBuilder<St: blocked_author_state::State, S: BosStr = DefaultStr> {
1189    _state: PhantomData<fn() -> St>,
1190    _fields: (Option<Did<S>>, Option<actor::ViewerState<S>>),
1191    _type: PhantomData<fn() -> S>,
1192}
1193
1194impl BlockedAuthor<DefaultStr> {
1195    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
1196    pub fn new() -> BlockedAuthorBuilder<blocked_author_state::Empty, DefaultStr> {
1197        BlockedAuthorBuilder::new()
1198    }
1199}
1200
1201impl<S: BosStr> BlockedAuthor<S> {
1202    /// Create a new builder for this type
1203    pub fn builder() -> BlockedAuthorBuilder<blocked_author_state::Empty, S> {
1204        BlockedAuthorBuilder::builder()
1205    }
1206}
1207
1208impl BlockedAuthorBuilder<blocked_author_state::Empty, DefaultStr> {
1209    /// Create a new builder with all fields unset, using the default string type, if needed
1210    pub fn new() -> Self {
1211        BlockedAuthorBuilder {
1212            _state: PhantomData,
1213            _fields: (None, None),
1214            _type: PhantomData,
1215        }
1216    }
1217}
1218
1219impl<S: BosStr> BlockedAuthorBuilder<blocked_author_state::Empty, S> {
1220    /// Create a new builder with all fields unset
1221    pub fn builder() -> Self {
1222        BlockedAuthorBuilder {
1223            _state: PhantomData,
1224            _fields: (None, None),
1225            _type: PhantomData,
1226        }
1227    }
1228}
1229
1230impl<St, S: BosStr> BlockedAuthorBuilder<St, S>
1231where
1232    St: blocked_author_state::State,
1233    St::Did: blocked_author_state::IsUnset,
1234{
1235    /// Set the `did` field (required)
1236    pub fn did(
1237        mut self,
1238        value: impl Into<Did<S>>,
1239    ) -> BlockedAuthorBuilder<blocked_author_state::SetDid<St>, S> {
1240        self._fields.0 = Option::Some(value.into());
1241        BlockedAuthorBuilder {
1242            _state: PhantomData,
1243            _fields: self._fields,
1244            _type: PhantomData,
1245        }
1246    }
1247}
1248
1249impl<St: blocked_author_state::State, S: BosStr> BlockedAuthorBuilder<St, S> {
1250    /// Set the `viewer` field (optional)
1251    pub fn viewer(mut self, value: impl Into<Option<actor::ViewerState<S>>>) -> Self {
1252        self._fields.1 = value.into();
1253        self
1254    }
1255    /// Set the `viewer` field to an Option value (optional)
1256    pub fn maybe_viewer(mut self, value: Option<actor::ViewerState<S>>) -> Self {
1257        self._fields.1 = value;
1258        self
1259    }
1260}
1261
1262impl<St, S: BosStr> BlockedAuthorBuilder<St, S>
1263where
1264    St: blocked_author_state::State,
1265    St::Did: blocked_author_state::IsSet,
1266{
1267    /// Build the final struct.
1268    pub fn build(self) -> BlockedAuthor<S> {
1269        BlockedAuthor {
1270            did: self._fields.0.unwrap(),
1271            viewer: self._fields.1,
1272            extra_data: Default::default(),
1273        }
1274    }
1275    /// Build the final struct with custom extra_data.
1276    pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> BlockedAuthor<S> {
1277        BlockedAuthor {
1278            did: self._fields.0.unwrap(),
1279            viewer: self._fields.1,
1280            extra_data: Some(extra_data),
1281        }
1282    }
1283}
1284
1285fn lexicon_doc_app_bsky_feed_defs() -> LexiconDoc<'static> {
1286    use alloc::collections::BTreeMap;
1287    #[allow(unused_imports)]
1288    use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType};
1289    use jacquard_lexicon::lexicon::*;
1290    LexiconDoc {
1291        lexicon: Lexicon::Lexicon1,
1292        id: CowStr::new_static("app.bsky.feed.defs"),
1293        defs: {
1294            let mut map = BTreeMap::new();
1295            map.insert(
1296                SmolStr::new_static("blockedAuthor"),
1297                LexUserType::Object(LexObject {
1298                    required: Some(vec![SmolStr::new_static("did")]),
1299                    properties: {
1300                        #[allow(unused_mut)]
1301                        let mut map = BTreeMap::new();
1302                        map.insert(
1303                            SmolStr::new_static("did"),
1304                            LexObjectProperty::String(LexString {
1305                                format: Some(LexStringFormat::Did),
1306                                ..Default::default()
1307                            }),
1308                        );
1309                        map.insert(
1310                            SmolStr::new_static("viewer"),
1311                            LexObjectProperty::Ref(LexRef {
1312                                r#ref: CowStr::new_static("app.bsky.actor.defs#viewerState"),
1313                                ..Default::default()
1314                            }),
1315                        );
1316                        map
1317                    },
1318                    ..Default::default()
1319                }),
1320            );
1321            map.insert(
1322                SmolStr::new_static("blockedPost"),
1323                LexUserType::Object(LexObject {
1324                    required: Some(vec![
1325                        SmolStr::new_static("uri"),
1326                        SmolStr::new_static("blocked"),
1327                        SmolStr::new_static("author"),
1328                    ]),
1329                    properties: {
1330                        #[allow(unused_mut)]
1331                        let mut map = BTreeMap::new();
1332                        map.insert(
1333                            SmolStr::new_static("author"),
1334                            LexObjectProperty::Ref(LexRef {
1335                                r#ref: CowStr::new_static("#blockedAuthor"),
1336                                ..Default::default()
1337                            }),
1338                        );
1339                        map.insert(
1340                            SmolStr::new_static("blocked"),
1341                            LexObjectProperty::Boolean(LexBoolean {
1342                                ..Default::default()
1343                            }),
1344                        );
1345                        map.insert(
1346                            SmolStr::new_static("uri"),
1347                            LexObjectProperty::String(LexString {
1348                                format: Some(LexStringFormat::AtUri),
1349                                ..Default::default()
1350                            }),
1351                        );
1352                        map
1353                    },
1354                    ..Default::default()
1355                }),
1356            );
1357            map.insert(
1358                SmolStr::new_static("clickthroughAuthor"),
1359                LexUserType::Token(LexToken {
1360                    ..Default::default()
1361                }),
1362            );
1363            map.insert(
1364                SmolStr::new_static("clickthroughEmbed"),
1365                LexUserType::Token(LexToken {
1366                    ..Default::default()
1367                }),
1368            );
1369            map.insert(
1370                SmolStr::new_static("clickthroughItem"),
1371                LexUserType::Token(LexToken {
1372                    ..Default::default()
1373                }),
1374            );
1375            map.insert(
1376                SmolStr::new_static("clickthroughReposter"),
1377                LexUserType::Token(LexToken {
1378                    ..Default::default()
1379                }),
1380            );
1381            map.insert(
1382                SmolStr::new_static("contentModeUnspecified"),
1383                LexUserType::Token(LexToken {
1384                    ..Default::default()
1385                }),
1386            );
1387            map.insert(
1388                SmolStr::new_static("contentModeVideo"),
1389                LexUserType::Token(LexToken {
1390                    ..Default::default()
1391                }),
1392            );
1393            map.insert(
1394                SmolStr::new_static("feedViewPost"),
1395                LexUserType::Object(LexObject {
1396                    required: Some(vec![SmolStr::new_static("post")]),
1397                    properties: {
1398                        #[allow(unused_mut)]
1399                        let mut map = BTreeMap::new();
1400                        map.insert(
1401                            SmolStr::new_static("feedContext"),
1402                            LexObjectProperty::String(LexString {
1403                                description: Some(
1404                                    CowStr::new_static(
1405                                        "Context provided by feed generator that may be passed back alongside interactions.",
1406                                    ),
1407                                ),
1408                                max_length: Some(2000usize),
1409                                ..Default::default()
1410                            }),
1411                        );
1412                        map.insert(
1413                            SmolStr::new_static("post"),
1414                            LexObjectProperty::Ref(LexRef {
1415                                r#ref: CowStr::new_static("#postView"),
1416                                ..Default::default()
1417                            }),
1418                        );
1419                        map.insert(
1420                            SmolStr::new_static("reason"),
1421                            LexObjectProperty::Union(LexRefUnion {
1422                                refs: vec![
1423                                    CowStr::new_static("#reasonRepost"),
1424                                    CowStr::new_static("#reasonPin")
1425                                ],
1426                                ..Default::default()
1427                            }),
1428                        );
1429                        map.insert(
1430                            SmolStr::new_static("reply"),
1431                            LexObjectProperty::Ref(LexRef {
1432                                r#ref: CowStr::new_static("#replyRef"),
1433                                ..Default::default()
1434                            }),
1435                        );
1436                        map.insert(
1437                            SmolStr::new_static("reqId"),
1438                            LexObjectProperty::String(LexString {
1439                                description: Some(
1440                                    CowStr::new_static(
1441                                        "Unique identifier per request that may be passed back alongside interactions.",
1442                                    ),
1443                                ),
1444                                max_length: Some(100usize),
1445                                ..Default::default()
1446                            }),
1447                        );
1448                        map
1449                    },
1450                    ..Default::default()
1451                }),
1452            );
1453            map.insert(
1454                SmolStr::new_static("generatorView"),
1455                LexUserType::Object(LexObject {
1456                    required: Some(vec![
1457                        SmolStr::new_static("uri"),
1458                        SmolStr::new_static("cid"),
1459                        SmolStr::new_static("did"),
1460                        SmolStr::new_static("creator"),
1461                        SmolStr::new_static("displayName"),
1462                        SmolStr::new_static("indexedAt"),
1463                    ]),
1464                    properties: {
1465                        #[allow(unused_mut)]
1466                        let mut map = BTreeMap::new();
1467                        map.insert(
1468                            SmolStr::new_static("acceptsInteractions"),
1469                            LexObjectProperty::Boolean(LexBoolean {
1470                                ..Default::default()
1471                            }),
1472                        );
1473                        map.insert(
1474                            SmolStr::new_static("avatar"),
1475                            LexObjectProperty::String(LexString {
1476                                format: Some(LexStringFormat::Uri),
1477                                ..Default::default()
1478                            }),
1479                        );
1480                        map.insert(
1481                            SmolStr::new_static("cid"),
1482                            LexObjectProperty::String(LexString {
1483                                format: Some(LexStringFormat::Cid),
1484                                ..Default::default()
1485                            }),
1486                        );
1487                        map.insert(
1488                            SmolStr::new_static("contentMode"),
1489                            LexObjectProperty::String(LexString {
1490                                ..Default::default()
1491                            }),
1492                        );
1493                        map.insert(
1494                            SmolStr::new_static("creator"),
1495                            LexObjectProperty::Ref(LexRef {
1496                                r#ref: CowStr::new_static("app.bsky.actor.defs#profileView"),
1497                                ..Default::default()
1498                            }),
1499                        );
1500                        map.insert(
1501                            SmolStr::new_static("description"),
1502                            LexObjectProperty::String(LexString {
1503                                max_length: Some(3000usize),
1504                                max_graphemes: Some(300usize),
1505                                ..Default::default()
1506                            }),
1507                        );
1508                        map.insert(
1509                            SmolStr::new_static("descriptionFacets"),
1510                            LexObjectProperty::Array(LexArray {
1511                                items: LexArrayItem::Ref(LexRef {
1512                                    r#ref: CowStr::new_static("app.bsky.richtext.facet"),
1513                                    ..Default::default()
1514                                }),
1515                                ..Default::default()
1516                            }),
1517                        );
1518                        map.insert(
1519                            SmolStr::new_static("did"),
1520                            LexObjectProperty::String(LexString {
1521                                format: Some(LexStringFormat::Did),
1522                                ..Default::default()
1523                            }),
1524                        );
1525                        map.insert(
1526                            SmolStr::new_static("displayName"),
1527                            LexObjectProperty::String(LexString {
1528                                ..Default::default()
1529                            }),
1530                        );
1531                        map.insert(
1532                            SmolStr::new_static("indexedAt"),
1533                            LexObjectProperty::String(LexString {
1534                                format: Some(LexStringFormat::Datetime),
1535                                ..Default::default()
1536                            }),
1537                        );
1538                        map.insert(
1539                            SmolStr::new_static("labels"),
1540                            LexObjectProperty::Array(LexArray {
1541                                items: LexArrayItem::Ref(LexRef {
1542                                    r#ref: CowStr::new_static("com.atproto.label.defs#label"),
1543                                    ..Default::default()
1544                                }),
1545                                ..Default::default()
1546                            }),
1547                        );
1548                        map.insert(
1549                            SmolStr::new_static("likeCount"),
1550                            LexObjectProperty::Integer(LexInteger {
1551                                minimum: Some(0i64),
1552                                ..Default::default()
1553                            }),
1554                        );
1555                        map.insert(
1556                            SmolStr::new_static("uri"),
1557                            LexObjectProperty::String(LexString {
1558                                format: Some(LexStringFormat::AtUri),
1559                                ..Default::default()
1560                            }),
1561                        );
1562                        map.insert(
1563                            SmolStr::new_static("viewer"),
1564                            LexObjectProperty::Ref(LexRef {
1565                                r#ref: CowStr::new_static("#generatorViewerState"),
1566                                ..Default::default()
1567                            }),
1568                        );
1569                        map
1570                    },
1571                    ..Default::default()
1572                }),
1573            );
1574            map.insert(
1575                SmolStr::new_static("generatorViewerState"),
1576                LexUserType::Object(LexObject {
1577                    properties: {
1578                        #[allow(unused_mut)]
1579                        let mut map = BTreeMap::new();
1580                        map.insert(
1581                            SmolStr::new_static("like"),
1582                            LexObjectProperty::String(LexString {
1583                                format: Some(LexStringFormat::AtUri),
1584                                ..Default::default()
1585                            }),
1586                        );
1587                        map
1588                    },
1589                    ..Default::default()
1590                }),
1591            );
1592            map.insert(
1593                SmolStr::new_static("interaction"),
1594                LexUserType::Object(LexObject {
1595                    properties: {
1596                        #[allow(unused_mut)]
1597                        let mut map = BTreeMap::new();
1598                        map.insert(
1599                            SmolStr::new_static("event"),
1600                            LexObjectProperty::String(LexString { ..Default::default() }),
1601                        );
1602                        map.insert(
1603                            SmolStr::new_static("feedContext"),
1604                            LexObjectProperty::String(LexString {
1605                                description: Some(
1606                                    CowStr::new_static(
1607                                        "Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton.",
1608                                    ),
1609                                ),
1610                                max_length: Some(2000usize),
1611                                ..Default::default()
1612                            }),
1613                        );
1614                        map.insert(
1615                            SmolStr::new_static("item"),
1616                            LexObjectProperty::String(LexString {
1617                                format: Some(LexStringFormat::AtUri),
1618                                ..Default::default()
1619                            }),
1620                        );
1621                        map.insert(
1622                            SmolStr::new_static("reqId"),
1623                            LexObjectProperty::String(LexString {
1624                                description: Some(
1625                                    CowStr::new_static(
1626                                        "Unique identifier per request that may be passed back alongside interactions.",
1627                                    ),
1628                                ),
1629                                max_length: Some(100usize),
1630                                ..Default::default()
1631                            }),
1632                        );
1633                        map
1634                    },
1635                    ..Default::default()
1636                }),
1637            );
1638            map.insert(
1639                SmolStr::new_static("interactionLike"),
1640                LexUserType::Token(LexToken {
1641                    ..Default::default()
1642                }),
1643            );
1644            map.insert(
1645                SmolStr::new_static("interactionQuote"),
1646                LexUserType::Token(LexToken {
1647                    ..Default::default()
1648                }),
1649            );
1650            map.insert(
1651                SmolStr::new_static("interactionReply"),
1652                LexUserType::Token(LexToken {
1653                    ..Default::default()
1654                }),
1655            );
1656            map.insert(
1657                SmolStr::new_static("interactionRepost"),
1658                LexUserType::Token(LexToken {
1659                    ..Default::default()
1660                }),
1661            );
1662            map.insert(
1663                SmolStr::new_static("interactionSeen"),
1664                LexUserType::Token(LexToken {
1665                    ..Default::default()
1666                }),
1667            );
1668            map.insert(
1669                SmolStr::new_static("interactionShare"),
1670                LexUserType::Token(LexToken {
1671                    ..Default::default()
1672                }),
1673            );
1674            map.insert(
1675                SmolStr::new_static("notFoundPost"),
1676                LexUserType::Object(LexObject {
1677                    required: Some(vec![
1678                        SmolStr::new_static("uri"),
1679                        SmolStr::new_static("notFound"),
1680                    ]),
1681                    properties: {
1682                        #[allow(unused_mut)]
1683                        let mut map = BTreeMap::new();
1684                        map.insert(
1685                            SmolStr::new_static("notFound"),
1686                            LexObjectProperty::Boolean(LexBoolean {
1687                                ..Default::default()
1688                            }),
1689                        );
1690                        map.insert(
1691                            SmolStr::new_static("uri"),
1692                            LexObjectProperty::String(LexString {
1693                                format: Some(LexStringFormat::AtUri),
1694                                ..Default::default()
1695                            }),
1696                        );
1697                        map
1698                    },
1699                    ..Default::default()
1700                }),
1701            );
1702            map.insert(
1703                SmolStr::new_static("postView"),
1704                LexUserType::Object(LexObject {
1705                    required: Some(vec![
1706                        SmolStr::new_static("uri"),
1707                        SmolStr::new_static("cid"),
1708                        SmolStr::new_static("author"),
1709                        SmolStr::new_static("record"),
1710                        SmolStr::new_static("indexedAt"),
1711                    ]),
1712                    properties: {
1713                        #[allow(unused_mut)]
1714                        let mut map = BTreeMap::new();
1715                        map.insert(
1716                            SmolStr::new_static("author"),
1717                            LexObjectProperty::Ref(LexRef {
1718                                r#ref: CowStr::new_static("app.bsky.actor.defs#profileViewBasic"),
1719                                ..Default::default()
1720                            }),
1721                        );
1722                        map.insert(
1723                            SmolStr::new_static("bookmarkCount"),
1724                            LexObjectProperty::Integer(LexInteger {
1725                                ..Default::default()
1726                            }),
1727                        );
1728                        map.insert(
1729                            SmolStr::new_static("cid"),
1730                            LexObjectProperty::String(LexString {
1731                                format: Some(LexStringFormat::Cid),
1732                                ..Default::default()
1733                            }),
1734                        );
1735                        map.insert(
1736                            SmolStr::new_static("debug"),
1737                            LexObjectProperty::Unknown(LexUnknown {
1738                                ..Default::default()
1739                            }),
1740                        );
1741                        map.insert(
1742                            SmolStr::new_static("embed"),
1743                            LexObjectProperty::Union(LexRefUnion {
1744                                refs: vec![
1745                                    CowStr::new_static("app.bsky.embed.images#view"),
1746                                    CowStr::new_static("app.bsky.embed.video#view"),
1747                                    CowStr::new_static("app.bsky.embed.gallery#view"),
1748                                    CowStr::new_static("app.bsky.embed.external#view"),
1749                                    CowStr::new_static("app.bsky.embed.record#view"),
1750                                    CowStr::new_static("app.bsky.embed.recordWithMedia#view"),
1751                                ],
1752                                ..Default::default()
1753                            }),
1754                        );
1755                        map.insert(
1756                            SmolStr::new_static("indexedAt"),
1757                            LexObjectProperty::String(LexString {
1758                                format: Some(LexStringFormat::Datetime),
1759                                ..Default::default()
1760                            }),
1761                        );
1762                        map.insert(
1763                            SmolStr::new_static("labels"),
1764                            LexObjectProperty::Array(LexArray {
1765                                items: LexArrayItem::Ref(LexRef {
1766                                    r#ref: CowStr::new_static("com.atproto.label.defs#label"),
1767                                    ..Default::default()
1768                                }),
1769                                ..Default::default()
1770                            }),
1771                        );
1772                        map.insert(
1773                            SmolStr::new_static("likeCount"),
1774                            LexObjectProperty::Integer(LexInteger {
1775                                ..Default::default()
1776                            }),
1777                        );
1778                        map.insert(
1779                            SmolStr::new_static("quoteCount"),
1780                            LexObjectProperty::Integer(LexInteger {
1781                                ..Default::default()
1782                            }),
1783                        );
1784                        map.insert(
1785                            SmolStr::new_static("record"),
1786                            LexObjectProperty::Unknown(LexUnknown {
1787                                ..Default::default()
1788                            }),
1789                        );
1790                        map.insert(
1791                            SmolStr::new_static("replyCount"),
1792                            LexObjectProperty::Integer(LexInteger {
1793                                ..Default::default()
1794                            }),
1795                        );
1796                        map.insert(
1797                            SmolStr::new_static("repostCount"),
1798                            LexObjectProperty::Integer(LexInteger {
1799                                ..Default::default()
1800                            }),
1801                        );
1802                        map.insert(
1803                            SmolStr::new_static("threadgate"),
1804                            LexObjectProperty::Ref(LexRef {
1805                                r#ref: CowStr::new_static("#threadgateView"),
1806                                ..Default::default()
1807                            }),
1808                        );
1809                        map.insert(
1810                            SmolStr::new_static("uri"),
1811                            LexObjectProperty::String(LexString {
1812                                format: Some(LexStringFormat::AtUri),
1813                                ..Default::default()
1814                            }),
1815                        );
1816                        map.insert(
1817                            SmolStr::new_static("viewer"),
1818                            LexObjectProperty::Ref(LexRef {
1819                                r#ref: CowStr::new_static("#viewerState"),
1820                                ..Default::default()
1821                            }),
1822                        );
1823                        map
1824                    },
1825                    ..Default::default()
1826                }),
1827            );
1828            map.insert(
1829                SmolStr::new_static("reasonPin"),
1830                LexUserType::Object(LexObject {
1831                    properties: {
1832                        #[allow(unused_mut)]
1833                        let mut map = BTreeMap::new();
1834                        map
1835                    },
1836                    ..Default::default()
1837                }),
1838            );
1839            map.insert(
1840                SmolStr::new_static("reasonRepost"),
1841                LexUserType::Object(LexObject {
1842                    required: Some(vec![
1843                        SmolStr::new_static("by"),
1844                        SmolStr::new_static("indexedAt"),
1845                    ]),
1846                    properties: {
1847                        #[allow(unused_mut)]
1848                        let mut map = BTreeMap::new();
1849                        map.insert(
1850                            SmolStr::new_static("by"),
1851                            LexObjectProperty::Ref(LexRef {
1852                                r#ref: CowStr::new_static("app.bsky.actor.defs#profileViewBasic"),
1853                                ..Default::default()
1854                            }),
1855                        );
1856                        map.insert(
1857                            SmolStr::new_static("cid"),
1858                            LexObjectProperty::String(LexString {
1859                                format: Some(LexStringFormat::Cid),
1860                                ..Default::default()
1861                            }),
1862                        );
1863                        map.insert(
1864                            SmolStr::new_static("indexedAt"),
1865                            LexObjectProperty::String(LexString {
1866                                format: Some(LexStringFormat::Datetime),
1867                                ..Default::default()
1868                            }),
1869                        );
1870                        map.insert(
1871                            SmolStr::new_static("uri"),
1872                            LexObjectProperty::String(LexString {
1873                                format: Some(LexStringFormat::AtUri),
1874                                ..Default::default()
1875                            }),
1876                        );
1877                        map
1878                    },
1879                    ..Default::default()
1880                }),
1881            );
1882            map.insert(
1883                SmolStr::new_static("replyRef"),
1884                LexUserType::Object(LexObject {
1885                    required: Some(vec![
1886                        SmolStr::new_static("root"),
1887                        SmolStr::new_static("parent"),
1888                    ]),
1889                    properties: {
1890                        #[allow(unused_mut)]
1891                        let mut map = BTreeMap::new();
1892                        map.insert(
1893                            SmolStr::new_static("grandparentAuthor"),
1894                            LexObjectProperty::Ref(LexRef {
1895                                r#ref: CowStr::new_static("app.bsky.actor.defs#profileViewBasic"),
1896                                ..Default::default()
1897                            }),
1898                        );
1899                        map.insert(
1900                            SmolStr::new_static("parent"),
1901                            LexObjectProperty::Union(LexRefUnion {
1902                                refs: vec![
1903                                    CowStr::new_static("#postView"),
1904                                    CowStr::new_static("#notFoundPost"),
1905                                    CowStr::new_static("#blockedPost"),
1906                                ],
1907                                ..Default::default()
1908                            }),
1909                        );
1910                        map.insert(
1911                            SmolStr::new_static("root"),
1912                            LexObjectProperty::Union(LexRefUnion {
1913                                refs: vec![
1914                                    CowStr::new_static("#postView"),
1915                                    CowStr::new_static("#notFoundPost"),
1916                                    CowStr::new_static("#blockedPost"),
1917                                ],
1918                                ..Default::default()
1919                            }),
1920                        );
1921                        map
1922                    },
1923                    ..Default::default()
1924                }),
1925            );
1926            map.insert(
1927                SmolStr::new_static("requestLess"),
1928                LexUserType::Token(LexToken {
1929                    ..Default::default()
1930                }),
1931            );
1932            map.insert(
1933                SmolStr::new_static("requestMore"),
1934                LexUserType::Token(LexToken {
1935                    ..Default::default()
1936                }),
1937            );
1938            map.insert(
1939                SmolStr::new_static("skeletonFeedPost"),
1940                LexUserType::Object(LexObject {
1941                    required: Some(vec![SmolStr::new_static("post")]),
1942                    properties: {
1943                        #[allow(unused_mut)]
1944                        let mut map = BTreeMap::new();
1945                        map.insert(
1946                            SmolStr::new_static("feedContext"),
1947                            LexObjectProperty::String(LexString {
1948                                description: Some(
1949                                    CowStr::new_static(
1950                                        "Context that will be passed through to client and may be passed to feed generator back alongside interactions.",
1951                                    ),
1952                                ),
1953                                max_length: Some(2000usize),
1954                                ..Default::default()
1955                            }),
1956                        );
1957                        map.insert(
1958                            SmolStr::new_static("post"),
1959                            LexObjectProperty::String(LexString {
1960                                format: Some(LexStringFormat::AtUri),
1961                                ..Default::default()
1962                            }),
1963                        );
1964                        map.insert(
1965                            SmolStr::new_static("reason"),
1966                            LexObjectProperty::Union(LexRefUnion {
1967                                refs: vec![
1968                                    CowStr::new_static("#skeletonReasonRepost"),
1969                                    CowStr::new_static("#skeletonReasonPin")
1970                                ],
1971                                ..Default::default()
1972                            }),
1973                        );
1974                        map
1975                    },
1976                    ..Default::default()
1977                }),
1978            );
1979            map.insert(
1980                SmolStr::new_static("skeletonReasonPin"),
1981                LexUserType::Object(LexObject {
1982                    properties: {
1983                        #[allow(unused_mut)]
1984                        let mut map = BTreeMap::new();
1985                        map
1986                    },
1987                    ..Default::default()
1988                }),
1989            );
1990            map.insert(
1991                SmolStr::new_static("skeletonReasonRepost"),
1992                LexUserType::Object(LexObject {
1993                    required: Some(vec![SmolStr::new_static("repost")]),
1994                    properties: {
1995                        #[allow(unused_mut)]
1996                        let mut map = BTreeMap::new();
1997                        map.insert(
1998                            SmolStr::new_static("repost"),
1999                            LexObjectProperty::String(LexString {
2000                                format: Some(LexStringFormat::AtUri),
2001                                ..Default::default()
2002                            }),
2003                        );
2004                        map
2005                    },
2006                    ..Default::default()
2007                }),
2008            );
2009            map.insert(
2010                SmolStr::new_static("threadContext"),
2011                LexUserType::Object(LexObject {
2012                    description: Some(CowStr::new_static(
2013                        "Metadata about this post within the context of the thread it is in.",
2014                    )),
2015                    properties: {
2016                        #[allow(unused_mut)]
2017                        let mut map = BTreeMap::new();
2018                        map.insert(
2019                            SmolStr::new_static("rootAuthorLike"),
2020                            LexObjectProperty::String(LexString {
2021                                format: Some(LexStringFormat::AtUri),
2022                                ..Default::default()
2023                            }),
2024                        );
2025                        map
2026                    },
2027                    ..Default::default()
2028                }),
2029            );
2030            map.insert(
2031                SmolStr::new_static("threadViewPost"),
2032                LexUserType::Object(LexObject {
2033                    required: Some(vec![SmolStr::new_static("post")]),
2034                    properties: {
2035                        #[allow(unused_mut)]
2036                        let mut map = BTreeMap::new();
2037                        map.insert(
2038                            SmolStr::new_static("parent"),
2039                            LexObjectProperty::Union(LexRefUnion {
2040                                refs: vec![
2041                                    CowStr::new_static("#threadViewPost"),
2042                                    CowStr::new_static("#notFoundPost"),
2043                                    CowStr::new_static("#blockedPost"),
2044                                ],
2045                                ..Default::default()
2046                            }),
2047                        );
2048                        map.insert(
2049                            SmolStr::new_static("post"),
2050                            LexObjectProperty::Ref(LexRef {
2051                                r#ref: CowStr::new_static("#postView"),
2052                                ..Default::default()
2053                            }),
2054                        );
2055                        map.insert(
2056                            SmolStr::new_static("replies"),
2057                            LexObjectProperty::Array(LexArray {
2058                                items: LexArrayItem::Union(LexRefUnion {
2059                                    refs: vec![
2060                                        CowStr::new_static("#threadViewPost"),
2061                                        CowStr::new_static("#notFoundPost"),
2062                                        CowStr::new_static("#blockedPost"),
2063                                    ],
2064                                    ..Default::default()
2065                                }),
2066                                ..Default::default()
2067                            }),
2068                        );
2069                        map.insert(
2070                            SmolStr::new_static("threadContext"),
2071                            LexObjectProperty::Ref(LexRef {
2072                                r#ref: CowStr::new_static("#threadContext"),
2073                                ..Default::default()
2074                            }),
2075                        );
2076                        map
2077                    },
2078                    ..Default::default()
2079                }),
2080            );
2081            map.insert(
2082                SmolStr::new_static("threadgateView"),
2083                LexUserType::Object(LexObject {
2084                    properties: {
2085                        #[allow(unused_mut)]
2086                        let mut map = BTreeMap::new();
2087                        map.insert(
2088                            SmolStr::new_static("cid"),
2089                            LexObjectProperty::String(LexString {
2090                                format: Some(LexStringFormat::Cid),
2091                                ..Default::default()
2092                            }),
2093                        );
2094                        map.insert(
2095                            SmolStr::new_static("lists"),
2096                            LexObjectProperty::Array(LexArray {
2097                                items: LexArrayItem::Ref(LexRef {
2098                                    r#ref: CowStr::new_static("app.bsky.graph.defs#listViewBasic"),
2099                                    ..Default::default()
2100                                }),
2101                                ..Default::default()
2102                            }),
2103                        );
2104                        map.insert(
2105                            SmolStr::new_static("record"),
2106                            LexObjectProperty::Unknown(LexUnknown {
2107                                ..Default::default()
2108                            }),
2109                        );
2110                        map.insert(
2111                            SmolStr::new_static("uri"),
2112                            LexObjectProperty::String(LexString {
2113                                format: Some(LexStringFormat::AtUri),
2114                                ..Default::default()
2115                            }),
2116                        );
2117                        map
2118                    },
2119                    ..Default::default()
2120                }),
2121            );
2122            map.insert(
2123                SmolStr::new_static("viewerState"),
2124                LexUserType::Object(LexObject {
2125                    description: Some(
2126                        CowStr::new_static(
2127                            "Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests.",
2128                        ),
2129                    ),
2130                    properties: {
2131                        #[allow(unused_mut)]
2132                        let mut map = BTreeMap::new();
2133                        map.insert(
2134                            SmolStr::new_static("bookmarked"),
2135                            LexObjectProperty::Boolean(LexBoolean {
2136                                ..Default::default()
2137                            }),
2138                        );
2139                        map.insert(
2140                            SmolStr::new_static("embeddingDisabled"),
2141                            LexObjectProperty::Boolean(LexBoolean {
2142                                ..Default::default()
2143                            }),
2144                        );
2145                        map.insert(
2146                            SmolStr::new_static("like"),
2147                            LexObjectProperty::String(LexString {
2148                                format: Some(LexStringFormat::AtUri),
2149                                ..Default::default()
2150                            }),
2151                        );
2152                        map.insert(
2153                            SmolStr::new_static("pinned"),
2154                            LexObjectProperty::Boolean(LexBoolean {
2155                                ..Default::default()
2156                            }),
2157                        );
2158                        map.insert(
2159                            SmolStr::new_static("replyDisabled"),
2160                            LexObjectProperty::Boolean(LexBoolean {
2161                                ..Default::default()
2162                            }),
2163                        );
2164                        map.insert(
2165                            SmolStr::new_static("repost"),
2166                            LexObjectProperty::String(LexString {
2167                                format: Some(LexStringFormat::AtUri),
2168                                ..Default::default()
2169                            }),
2170                        );
2171                        map.insert(
2172                            SmolStr::new_static("threadMuted"),
2173                            LexObjectProperty::Boolean(LexBoolean {
2174                                ..Default::default()
2175                            }),
2176                        );
2177                        map
2178                    },
2179                    ..Default::default()
2180                }),
2181            );
2182            map
2183        },
2184        ..Default::default()
2185    }
2186}
2187
2188pub mod blocked_post_state {
2189
2190    pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
2191    #[allow(unused)]
2192    use ::core::marker::PhantomData;
2193    mod sealed {
2194        pub trait Sealed {}
2195    }
2196    /// State trait tracking which required fields have been set
2197    pub trait State: sealed::Sealed {
2198        type Author;
2199        type Blocked;
2200        type Uri;
2201    }
2202    /// Empty state - all required fields are unset
2203    pub struct Empty(());
2204    impl sealed::Sealed for Empty {}
2205    impl State for Empty {
2206        type Author = Unset;
2207        type Blocked = Unset;
2208        type Uri = Unset;
2209    }
2210    ///State transition - sets the `author` field to Set
2211    pub struct SetAuthor<St: State = Empty>(PhantomData<fn() -> St>);
2212    impl<St: State> sealed::Sealed for SetAuthor<St> {}
2213    impl<St: State> State for SetAuthor<St> {
2214        type Author = Set<members::author>;
2215        type Blocked = St::Blocked;
2216        type Uri = St::Uri;
2217    }
2218    ///State transition - sets the `blocked` field to Set
2219    pub struct SetBlocked<St: State = Empty>(PhantomData<fn() -> St>);
2220    impl<St: State> sealed::Sealed for SetBlocked<St> {}
2221    impl<St: State> State for SetBlocked<St> {
2222        type Author = St::Author;
2223        type Blocked = Set<members::blocked>;
2224        type Uri = St::Uri;
2225    }
2226    ///State transition - sets the `uri` field to Set
2227    pub struct SetUri<St: State = Empty>(PhantomData<fn() -> St>);
2228    impl<St: State> sealed::Sealed for SetUri<St> {}
2229    impl<St: State> State for SetUri<St> {
2230        type Author = St::Author;
2231        type Blocked = St::Blocked;
2232        type Uri = Set<members::uri>;
2233    }
2234    /// Marker types for field names
2235    #[allow(non_camel_case_types)]
2236    pub mod members {
2237        ///Marker type for the `author` field
2238        pub struct author(());
2239        ///Marker type for the `blocked` field
2240        pub struct blocked(());
2241        ///Marker type for the `uri` field
2242        pub struct uri(());
2243    }
2244}
2245
2246/// Builder for constructing an instance of this type.
2247pub struct BlockedPostBuilder<St: blocked_post_state::State, S: BosStr = DefaultStr> {
2248    _state: PhantomData<fn() -> St>,
2249    _fields: (
2250        Option<feed::BlockedAuthor<S>>,
2251        Option<bool>,
2252        Option<AtUri<S>>,
2253    ),
2254    _type: PhantomData<fn() -> S>,
2255}
2256
2257impl BlockedPost<DefaultStr> {
2258    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
2259    pub fn new() -> BlockedPostBuilder<blocked_post_state::Empty, DefaultStr> {
2260        BlockedPostBuilder::new()
2261    }
2262}
2263
2264impl<S: BosStr> BlockedPost<S> {
2265    /// Create a new builder for this type
2266    pub fn builder() -> BlockedPostBuilder<blocked_post_state::Empty, S> {
2267        BlockedPostBuilder::builder()
2268    }
2269}
2270
2271impl BlockedPostBuilder<blocked_post_state::Empty, DefaultStr> {
2272    /// Create a new builder with all fields unset, using the default string type, if needed
2273    pub fn new() -> Self {
2274        BlockedPostBuilder {
2275            _state: PhantomData,
2276            _fields: (None, None, None),
2277            _type: PhantomData,
2278        }
2279    }
2280}
2281
2282impl<S: BosStr> BlockedPostBuilder<blocked_post_state::Empty, S> {
2283    /// Create a new builder with all fields unset
2284    pub fn builder() -> Self {
2285        BlockedPostBuilder {
2286            _state: PhantomData,
2287            _fields: (None, None, None),
2288            _type: PhantomData,
2289        }
2290    }
2291}
2292
2293impl<St, S: BosStr> BlockedPostBuilder<St, S>
2294where
2295    St: blocked_post_state::State,
2296    St::Author: blocked_post_state::IsUnset,
2297{
2298    /// Set the `author` field (required)
2299    pub fn author(
2300        mut self,
2301        value: impl Into<feed::BlockedAuthor<S>>,
2302    ) -> BlockedPostBuilder<blocked_post_state::SetAuthor<St>, S> {
2303        self._fields.0 = Option::Some(value.into());
2304        BlockedPostBuilder {
2305            _state: PhantomData,
2306            _fields: self._fields,
2307            _type: PhantomData,
2308        }
2309    }
2310}
2311
2312impl<St, S: BosStr> BlockedPostBuilder<St, S>
2313where
2314    St: blocked_post_state::State,
2315    St::Blocked: blocked_post_state::IsUnset,
2316{
2317    /// Set the `blocked` field (required)
2318    pub fn blocked(
2319        mut self,
2320        value: impl Into<bool>,
2321    ) -> BlockedPostBuilder<blocked_post_state::SetBlocked<St>, S> {
2322        self._fields.1 = Option::Some(value.into());
2323        BlockedPostBuilder {
2324            _state: PhantomData,
2325            _fields: self._fields,
2326            _type: PhantomData,
2327        }
2328    }
2329}
2330
2331impl<St, S: BosStr> BlockedPostBuilder<St, S>
2332where
2333    St: blocked_post_state::State,
2334    St::Uri: blocked_post_state::IsUnset,
2335{
2336    /// Set the `uri` field (required)
2337    pub fn uri(
2338        mut self,
2339        value: impl Into<AtUri<S>>,
2340    ) -> BlockedPostBuilder<blocked_post_state::SetUri<St>, S> {
2341        self._fields.2 = Option::Some(value.into());
2342        BlockedPostBuilder {
2343            _state: PhantomData,
2344            _fields: self._fields,
2345            _type: PhantomData,
2346        }
2347    }
2348}
2349
2350impl<St, S: BosStr> BlockedPostBuilder<St, S>
2351where
2352    St: blocked_post_state::State,
2353    St::Author: blocked_post_state::IsSet,
2354    St::Blocked: blocked_post_state::IsSet,
2355    St::Uri: blocked_post_state::IsSet,
2356{
2357    /// Build the final struct.
2358    pub fn build(self) -> BlockedPost<S> {
2359        BlockedPost {
2360            author: self._fields.0.unwrap(),
2361            blocked: self._fields.1.unwrap(),
2362            uri: self._fields.2.unwrap(),
2363            extra_data: Default::default(),
2364        }
2365    }
2366    /// Build the final struct with custom extra_data.
2367    pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> BlockedPost<S> {
2368        BlockedPost {
2369            author: self._fields.0.unwrap(),
2370            blocked: self._fields.1.unwrap(),
2371            uri: self._fields.2.unwrap(),
2372            extra_data: Some(extra_data),
2373        }
2374    }
2375}
2376
2377pub mod feed_view_post_state {
2378
2379    pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
2380    #[allow(unused)]
2381    use ::core::marker::PhantomData;
2382    mod sealed {
2383        pub trait Sealed {}
2384    }
2385    /// State trait tracking which required fields have been set
2386    pub trait State: sealed::Sealed {
2387        type Post;
2388    }
2389    /// Empty state - all required fields are unset
2390    pub struct Empty(());
2391    impl sealed::Sealed for Empty {}
2392    impl State for Empty {
2393        type Post = Unset;
2394    }
2395    ///State transition - sets the `post` field to Set
2396    pub struct SetPost<St: State = Empty>(PhantomData<fn() -> St>);
2397    impl<St: State> sealed::Sealed for SetPost<St> {}
2398    impl<St: State> State for SetPost<St> {
2399        type Post = Set<members::post>;
2400    }
2401    /// Marker types for field names
2402    #[allow(non_camel_case_types)]
2403    pub mod members {
2404        ///Marker type for the `post` field
2405        pub struct post(());
2406    }
2407}
2408
2409/// Builder for constructing an instance of this type.
2410pub struct FeedViewPostBuilder<St: feed_view_post_state::State, S: BosStr = DefaultStr> {
2411    _state: PhantomData<fn() -> St>,
2412    _fields: (
2413        Option<S>,
2414        Option<feed::PostView<S>>,
2415        Option<FeedViewPostReason<S>>,
2416        Option<feed::ReplyRef<S>>,
2417        Option<S>,
2418    ),
2419    _type: PhantomData<fn() -> S>,
2420}
2421
2422impl FeedViewPost<DefaultStr> {
2423    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
2424    pub fn new() -> FeedViewPostBuilder<feed_view_post_state::Empty, DefaultStr> {
2425        FeedViewPostBuilder::new()
2426    }
2427}
2428
2429impl<S: BosStr> FeedViewPost<S> {
2430    /// Create a new builder for this type
2431    pub fn builder() -> FeedViewPostBuilder<feed_view_post_state::Empty, S> {
2432        FeedViewPostBuilder::builder()
2433    }
2434}
2435
2436impl FeedViewPostBuilder<feed_view_post_state::Empty, DefaultStr> {
2437    /// Create a new builder with all fields unset, using the default string type, if needed
2438    pub fn new() -> Self {
2439        FeedViewPostBuilder {
2440            _state: PhantomData,
2441            _fields: (None, None, None, None, None),
2442            _type: PhantomData,
2443        }
2444    }
2445}
2446
2447impl<S: BosStr> FeedViewPostBuilder<feed_view_post_state::Empty, S> {
2448    /// Create a new builder with all fields unset
2449    pub fn builder() -> Self {
2450        FeedViewPostBuilder {
2451            _state: PhantomData,
2452            _fields: (None, None, None, None, None),
2453            _type: PhantomData,
2454        }
2455    }
2456}
2457
2458impl<St: feed_view_post_state::State, S: BosStr> FeedViewPostBuilder<St, S> {
2459    /// Set the `feedContext` field (optional)
2460    pub fn feed_context(mut self, value: impl Into<Option<S>>) -> Self {
2461        self._fields.0 = value.into();
2462        self
2463    }
2464    /// Set the `feedContext` field to an Option value (optional)
2465    pub fn maybe_feed_context(mut self, value: Option<S>) -> Self {
2466        self._fields.0 = value;
2467        self
2468    }
2469}
2470
2471impl<St, S: BosStr> FeedViewPostBuilder<St, S>
2472where
2473    St: feed_view_post_state::State,
2474    St::Post: feed_view_post_state::IsUnset,
2475{
2476    /// Set the `post` field (required)
2477    pub fn post(
2478        mut self,
2479        value: impl Into<feed::PostView<S>>,
2480    ) -> FeedViewPostBuilder<feed_view_post_state::SetPost<St>, S> {
2481        self._fields.1 = Option::Some(value.into());
2482        FeedViewPostBuilder {
2483            _state: PhantomData,
2484            _fields: self._fields,
2485            _type: PhantomData,
2486        }
2487    }
2488}
2489
2490impl<St: feed_view_post_state::State, S: BosStr> FeedViewPostBuilder<St, S> {
2491    /// Set the `reason` field (optional)
2492    pub fn reason(mut self, value: impl Into<Option<FeedViewPostReason<S>>>) -> Self {
2493        self._fields.2 = value.into();
2494        self
2495    }
2496    /// Set the `reason` field to an Option value (optional)
2497    pub fn maybe_reason(mut self, value: Option<FeedViewPostReason<S>>) -> Self {
2498        self._fields.2 = value;
2499        self
2500    }
2501}
2502
2503impl<St: feed_view_post_state::State, S: BosStr> FeedViewPostBuilder<St, S> {
2504    /// Set the `reply` field (optional)
2505    pub fn reply(mut self, value: impl Into<Option<feed::ReplyRef<S>>>) -> Self {
2506        self._fields.3 = value.into();
2507        self
2508    }
2509    /// Set the `reply` field to an Option value (optional)
2510    pub fn maybe_reply(mut self, value: Option<feed::ReplyRef<S>>) -> Self {
2511        self._fields.3 = value;
2512        self
2513    }
2514}
2515
2516impl<St: feed_view_post_state::State, S: BosStr> FeedViewPostBuilder<St, S> {
2517    /// Set the `reqId` field (optional)
2518    pub fn req_id(mut self, value: impl Into<Option<S>>) -> Self {
2519        self._fields.4 = value.into();
2520        self
2521    }
2522    /// Set the `reqId` field to an Option value (optional)
2523    pub fn maybe_req_id(mut self, value: Option<S>) -> Self {
2524        self._fields.4 = value;
2525        self
2526    }
2527}
2528
2529impl<St, S: BosStr> FeedViewPostBuilder<St, S>
2530where
2531    St: feed_view_post_state::State,
2532    St::Post: feed_view_post_state::IsSet,
2533{
2534    /// Build the final struct.
2535    pub fn build(self) -> FeedViewPost<S> {
2536        FeedViewPost {
2537            feed_context: self._fields.0,
2538            post: self._fields.1.unwrap(),
2539            reason: self._fields.2,
2540            reply: self._fields.3,
2541            req_id: self._fields.4,
2542            extra_data: Default::default(),
2543        }
2544    }
2545    /// Build the final struct with custom extra_data.
2546    pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> FeedViewPost<S> {
2547        FeedViewPost {
2548            feed_context: self._fields.0,
2549            post: self._fields.1.unwrap(),
2550            reason: self._fields.2,
2551            reply: self._fields.3,
2552            req_id: self._fields.4,
2553            extra_data: Some(extra_data),
2554        }
2555    }
2556}
2557
2558pub mod generator_view_state {
2559
2560    pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
2561    #[allow(unused)]
2562    use ::core::marker::PhantomData;
2563    mod sealed {
2564        pub trait Sealed {}
2565    }
2566    /// State trait tracking which required fields have been set
2567    pub trait State: sealed::Sealed {
2568        type Cid;
2569        type Creator;
2570        type Did;
2571        type DisplayName;
2572        type IndexedAt;
2573        type Uri;
2574    }
2575    /// Empty state - all required fields are unset
2576    pub struct Empty(());
2577    impl sealed::Sealed for Empty {}
2578    impl State for Empty {
2579        type Cid = Unset;
2580        type Creator = Unset;
2581        type Did = Unset;
2582        type DisplayName = Unset;
2583        type IndexedAt = Unset;
2584        type Uri = Unset;
2585    }
2586    ///State transition - sets the `cid` field to Set
2587    pub struct SetCid<St: State = Empty>(PhantomData<fn() -> St>);
2588    impl<St: State> sealed::Sealed for SetCid<St> {}
2589    impl<St: State> State for SetCid<St> {
2590        type Cid = Set<members::cid>;
2591        type Creator = St::Creator;
2592        type Did = St::Did;
2593        type DisplayName = St::DisplayName;
2594        type IndexedAt = St::IndexedAt;
2595        type Uri = St::Uri;
2596    }
2597    ///State transition - sets the `creator` field to Set
2598    pub struct SetCreator<St: State = Empty>(PhantomData<fn() -> St>);
2599    impl<St: State> sealed::Sealed for SetCreator<St> {}
2600    impl<St: State> State for SetCreator<St> {
2601        type Cid = St::Cid;
2602        type Creator = Set<members::creator>;
2603        type Did = St::Did;
2604        type DisplayName = St::DisplayName;
2605        type IndexedAt = St::IndexedAt;
2606        type Uri = St::Uri;
2607    }
2608    ///State transition - sets the `did` field to Set
2609    pub struct SetDid<St: State = Empty>(PhantomData<fn() -> St>);
2610    impl<St: State> sealed::Sealed for SetDid<St> {}
2611    impl<St: State> State for SetDid<St> {
2612        type Cid = St::Cid;
2613        type Creator = St::Creator;
2614        type Did = Set<members::did>;
2615        type DisplayName = St::DisplayName;
2616        type IndexedAt = St::IndexedAt;
2617        type Uri = St::Uri;
2618    }
2619    ///State transition - sets the `display_name` field to Set
2620    pub struct SetDisplayName<St: State = Empty>(PhantomData<fn() -> St>);
2621    impl<St: State> sealed::Sealed for SetDisplayName<St> {}
2622    impl<St: State> State for SetDisplayName<St> {
2623        type Cid = St::Cid;
2624        type Creator = St::Creator;
2625        type Did = St::Did;
2626        type DisplayName = Set<members::display_name>;
2627        type IndexedAt = St::IndexedAt;
2628        type Uri = St::Uri;
2629    }
2630    ///State transition - sets the `indexed_at` field to Set
2631    pub struct SetIndexedAt<St: State = Empty>(PhantomData<fn() -> St>);
2632    impl<St: State> sealed::Sealed for SetIndexedAt<St> {}
2633    impl<St: State> State for SetIndexedAt<St> {
2634        type Cid = St::Cid;
2635        type Creator = St::Creator;
2636        type Did = St::Did;
2637        type DisplayName = St::DisplayName;
2638        type IndexedAt = Set<members::indexed_at>;
2639        type Uri = St::Uri;
2640    }
2641    ///State transition - sets the `uri` field to Set
2642    pub struct SetUri<St: State = Empty>(PhantomData<fn() -> St>);
2643    impl<St: State> sealed::Sealed for SetUri<St> {}
2644    impl<St: State> State for SetUri<St> {
2645        type Cid = St::Cid;
2646        type Creator = St::Creator;
2647        type Did = St::Did;
2648        type DisplayName = St::DisplayName;
2649        type IndexedAt = St::IndexedAt;
2650        type Uri = Set<members::uri>;
2651    }
2652    /// Marker types for field names
2653    #[allow(non_camel_case_types)]
2654    pub mod members {
2655        ///Marker type for the `cid` field
2656        pub struct cid(());
2657        ///Marker type for the `creator` field
2658        pub struct creator(());
2659        ///Marker type for the `did` field
2660        pub struct did(());
2661        ///Marker type for the `display_name` field
2662        pub struct display_name(());
2663        ///Marker type for the `indexed_at` field
2664        pub struct indexed_at(());
2665        ///Marker type for the `uri` field
2666        pub struct uri(());
2667    }
2668}
2669
2670/// Builder for constructing an instance of this type.
2671pub struct GeneratorViewBuilder<St: generator_view_state::State, S: BosStr = DefaultStr> {
2672    _state: PhantomData<fn() -> St>,
2673    _fields: (
2674        Option<bool>,
2675        Option<UriValue<S>>,
2676        Option<Cid<S>>,
2677        Option<GeneratorViewContentMode<S>>,
2678        Option<ProfileView<S>>,
2679        Option<S>,
2680        Option<Vec<Facet<S>>>,
2681        Option<Did<S>>,
2682        Option<S>,
2683        Option<Datetime>,
2684        Option<Vec<Label<S>>>,
2685        Option<i64>,
2686        Option<AtUri<S>>,
2687        Option<feed::GeneratorViewerState<S>>,
2688    ),
2689    _type: PhantomData<fn() -> S>,
2690}
2691
2692impl GeneratorView<DefaultStr> {
2693    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
2694    pub fn new() -> GeneratorViewBuilder<generator_view_state::Empty, DefaultStr> {
2695        GeneratorViewBuilder::new()
2696    }
2697}
2698
2699impl<S: BosStr> GeneratorView<S> {
2700    /// Create a new builder for this type
2701    pub fn builder() -> GeneratorViewBuilder<generator_view_state::Empty, S> {
2702        GeneratorViewBuilder::builder()
2703    }
2704}
2705
2706impl GeneratorViewBuilder<generator_view_state::Empty, DefaultStr> {
2707    /// Create a new builder with all fields unset, using the default string type, if needed
2708    pub fn new() -> Self {
2709        GeneratorViewBuilder {
2710            _state: PhantomData,
2711            _fields: (
2712                None, None, None, None, None, None, None, None, None, None, None, None, None, None,
2713            ),
2714            _type: PhantomData,
2715        }
2716    }
2717}
2718
2719impl<S: BosStr> GeneratorViewBuilder<generator_view_state::Empty, S> {
2720    /// Create a new builder with all fields unset
2721    pub fn builder() -> Self {
2722        GeneratorViewBuilder {
2723            _state: PhantomData,
2724            _fields: (
2725                None, None, None, None, None, None, None, None, None, None, None, None, None, None,
2726            ),
2727            _type: PhantomData,
2728        }
2729    }
2730}
2731
2732impl<St: generator_view_state::State, S: BosStr> GeneratorViewBuilder<St, S> {
2733    /// Set the `acceptsInteractions` field (optional)
2734    pub fn accepts_interactions(mut self, value: impl Into<Option<bool>>) -> Self {
2735        self._fields.0 = value.into();
2736        self
2737    }
2738    /// Set the `acceptsInteractions` field to an Option value (optional)
2739    pub fn maybe_accepts_interactions(mut self, value: Option<bool>) -> Self {
2740        self._fields.0 = value;
2741        self
2742    }
2743}
2744
2745impl<St: generator_view_state::State, S: BosStr> GeneratorViewBuilder<St, S> {
2746    /// Set the `avatar` field (optional)
2747    pub fn avatar(mut self, value: impl Into<Option<UriValue<S>>>) -> Self {
2748        self._fields.1 = value.into();
2749        self
2750    }
2751    /// Set the `avatar` field to an Option value (optional)
2752    pub fn maybe_avatar(mut self, value: Option<UriValue<S>>) -> Self {
2753        self._fields.1 = value;
2754        self
2755    }
2756}
2757
2758impl<St, S: BosStr> GeneratorViewBuilder<St, S>
2759where
2760    St: generator_view_state::State,
2761    St::Cid: generator_view_state::IsUnset,
2762{
2763    /// Set the `cid` field (required)
2764    pub fn cid(
2765        mut self,
2766        value: impl Into<Cid<S>>,
2767    ) -> GeneratorViewBuilder<generator_view_state::SetCid<St>, S> {
2768        self._fields.2 = Option::Some(value.into());
2769        GeneratorViewBuilder {
2770            _state: PhantomData,
2771            _fields: self._fields,
2772            _type: PhantomData,
2773        }
2774    }
2775}
2776
2777impl<St: generator_view_state::State, S: BosStr> GeneratorViewBuilder<St, S> {
2778    /// Set the `contentMode` field (optional)
2779    pub fn content_mode(mut self, value: impl Into<Option<GeneratorViewContentMode<S>>>) -> Self {
2780        self._fields.3 = value.into();
2781        self
2782    }
2783    /// Set the `contentMode` field to an Option value (optional)
2784    pub fn maybe_content_mode(mut self, value: Option<GeneratorViewContentMode<S>>) -> Self {
2785        self._fields.3 = value;
2786        self
2787    }
2788}
2789
2790impl<St, S: BosStr> GeneratorViewBuilder<St, S>
2791where
2792    St: generator_view_state::State,
2793    St::Creator: generator_view_state::IsUnset,
2794{
2795    /// Set the `creator` field (required)
2796    pub fn creator(
2797        mut self,
2798        value: impl Into<ProfileView<S>>,
2799    ) -> GeneratorViewBuilder<generator_view_state::SetCreator<St>, S> {
2800        self._fields.4 = Option::Some(value.into());
2801        GeneratorViewBuilder {
2802            _state: PhantomData,
2803            _fields: self._fields,
2804            _type: PhantomData,
2805        }
2806    }
2807}
2808
2809impl<St: generator_view_state::State, S: BosStr> GeneratorViewBuilder<St, S> {
2810    /// Set the `description` field (optional)
2811    pub fn description(mut self, value: impl Into<Option<S>>) -> Self {
2812        self._fields.5 = value.into();
2813        self
2814    }
2815    /// Set the `description` field to an Option value (optional)
2816    pub fn maybe_description(mut self, value: Option<S>) -> Self {
2817        self._fields.5 = value;
2818        self
2819    }
2820}
2821
2822impl<St: generator_view_state::State, S: BosStr> GeneratorViewBuilder<St, S> {
2823    /// Set the `descriptionFacets` field (optional)
2824    pub fn description_facets(mut self, value: impl Into<Option<Vec<Facet<S>>>>) -> Self {
2825        self._fields.6 = value.into();
2826        self
2827    }
2828    /// Set the `descriptionFacets` field to an Option value (optional)
2829    pub fn maybe_description_facets(mut self, value: Option<Vec<Facet<S>>>) -> Self {
2830        self._fields.6 = value;
2831        self
2832    }
2833}
2834
2835impl<St, S: BosStr> GeneratorViewBuilder<St, S>
2836where
2837    St: generator_view_state::State,
2838    St::Did: generator_view_state::IsUnset,
2839{
2840    /// Set the `did` field (required)
2841    pub fn did(
2842        mut self,
2843        value: impl Into<Did<S>>,
2844    ) -> GeneratorViewBuilder<generator_view_state::SetDid<St>, S> {
2845        self._fields.7 = Option::Some(value.into());
2846        GeneratorViewBuilder {
2847            _state: PhantomData,
2848            _fields: self._fields,
2849            _type: PhantomData,
2850        }
2851    }
2852}
2853
2854impl<St, S: BosStr> GeneratorViewBuilder<St, S>
2855where
2856    St: generator_view_state::State,
2857    St::DisplayName: generator_view_state::IsUnset,
2858{
2859    /// Set the `displayName` field (required)
2860    pub fn display_name(
2861        mut self,
2862        value: impl Into<S>,
2863    ) -> GeneratorViewBuilder<generator_view_state::SetDisplayName<St>, S> {
2864        self._fields.8 = Option::Some(value.into());
2865        GeneratorViewBuilder {
2866            _state: PhantomData,
2867            _fields: self._fields,
2868            _type: PhantomData,
2869        }
2870    }
2871}
2872
2873impl<St, S: BosStr> GeneratorViewBuilder<St, S>
2874where
2875    St: generator_view_state::State,
2876    St::IndexedAt: generator_view_state::IsUnset,
2877{
2878    /// Set the `indexedAt` field (required)
2879    pub fn indexed_at(
2880        mut self,
2881        value: impl Into<Datetime>,
2882    ) -> GeneratorViewBuilder<generator_view_state::SetIndexedAt<St>, S> {
2883        self._fields.9 = Option::Some(value.into());
2884        GeneratorViewBuilder {
2885            _state: PhantomData,
2886            _fields: self._fields,
2887            _type: PhantomData,
2888        }
2889    }
2890}
2891
2892impl<St: generator_view_state::State, S: BosStr> GeneratorViewBuilder<St, S> {
2893    /// Set the `labels` field (optional)
2894    pub fn labels(mut self, value: impl Into<Option<Vec<Label<S>>>>) -> Self {
2895        self._fields.10 = value.into();
2896        self
2897    }
2898    /// Set the `labels` field to an Option value (optional)
2899    pub fn maybe_labels(mut self, value: Option<Vec<Label<S>>>) -> Self {
2900        self._fields.10 = value;
2901        self
2902    }
2903}
2904
2905impl<St: generator_view_state::State, S: BosStr> GeneratorViewBuilder<St, S> {
2906    /// Set the `likeCount` field (optional)
2907    pub fn like_count(mut self, value: impl Into<Option<i64>>) -> Self {
2908        self._fields.11 = value.into();
2909        self
2910    }
2911    /// Set the `likeCount` field to an Option value (optional)
2912    pub fn maybe_like_count(mut self, value: Option<i64>) -> Self {
2913        self._fields.11 = value;
2914        self
2915    }
2916}
2917
2918impl<St, S: BosStr> GeneratorViewBuilder<St, S>
2919where
2920    St: generator_view_state::State,
2921    St::Uri: generator_view_state::IsUnset,
2922{
2923    /// Set the `uri` field (required)
2924    pub fn uri(
2925        mut self,
2926        value: impl Into<AtUri<S>>,
2927    ) -> GeneratorViewBuilder<generator_view_state::SetUri<St>, S> {
2928        self._fields.12 = Option::Some(value.into());
2929        GeneratorViewBuilder {
2930            _state: PhantomData,
2931            _fields: self._fields,
2932            _type: PhantomData,
2933        }
2934    }
2935}
2936
2937impl<St: generator_view_state::State, S: BosStr> GeneratorViewBuilder<St, S> {
2938    /// Set the `viewer` field (optional)
2939    pub fn viewer(mut self, value: impl Into<Option<feed::GeneratorViewerState<S>>>) -> Self {
2940        self._fields.13 = value.into();
2941        self
2942    }
2943    /// Set the `viewer` field to an Option value (optional)
2944    pub fn maybe_viewer(mut self, value: Option<feed::GeneratorViewerState<S>>) -> Self {
2945        self._fields.13 = value;
2946        self
2947    }
2948}
2949
2950impl<St, S: BosStr> GeneratorViewBuilder<St, S>
2951where
2952    St: generator_view_state::State,
2953    St::Cid: generator_view_state::IsSet,
2954    St::Creator: generator_view_state::IsSet,
2955    St::Did: generator_view_state::IsSet,
2956    St::DisplayName: generator_view_state::IsSet,
2957    St::IndexedAt: generator_view_state::IsSet,
2958    St::Uri: generator_view_state::IsSet,
2959{
2960    /// Build the final struct.
2961    pub fn build(self) -> GeneratorView<S> {
2962        GeneratorView {
2963            accepts_interactions: self._fields.0,
2964            avatar: self._fields.1,
2965            cid: self._fields.2.unwrap(),
2966            content_mode: self._fields.3,
2967            creator: self._fields.4.unwrap(),
2968            description: self._fields.5,
2969            description_facets: self._fields.6,
2970            did: self._fields.7.unwrap(),
2971            display_name: self._fields.8.unwrap(),
2972            indexed_at: self._fields.9.unwrap(),
2973            labels: self._fields.10,
2974            like_count: self._fields.11,
2975            uri: self._fields.12.unwrap(),
2976            viewer: self._fields.13,
2977            extra_data: Default::default(),
2978        }
2979    }
2980    /// Build the final struct with custom extra_data.
2981    pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> GeneratorView<S> {
2982        GeneratorView {
2983            accepts_interactions: self._fields.0,
2984            avatar: self._fields.1,
2985            cid: self._fields.2.unwrap(),
2986            content_mode: self._fields.3,
2987            creator: self._fields.4.unwrap(),
2988            description: self._fields.5,
2989            description_facets: self._fields.6,
2990            did: self._fields.7.unwrap(),
2991            display_name: self._fields.8.unwrap(),
2992            indexed_at: self._fields.9.unwrap(),
2993            labels: self._fields.10,
2994            like_count: self._fields.11,
2995            uri: self._fields.12.unwrap(),
2996            viewer: self._fields.13,
2997            extra_data: Some(extra_data),
2998        }
2999    }
3000}
3001
3002pub mod not_found_post_state {
3003
3004    pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
3005    #[allow(unused)]
3006    use ::core::marker::PhantomData;
3007    mod sealed {
3008        pub trait Sealed {}
3009    }
3010    /// State trait tracking which required fields have been set
3011    pub trait State: sealed::Sealed {
3012        type NotFound;
3013        type Uri;
3014    }
3015    /// Empty state - all required fields are unset
3016    pub struct Empty(());
3017    impl sealed::Sealed for Empty {}
3018    impl State for Empty {
3019        type NotFound = Unset;
3020        type Uri = Unset;
3021    }
3022    ///State transition - sets the `not_found` field to Set
3023    pub struct SetNotFound<St: State = Empty>(PhantomData<fn() -> St>);
3024    impl<St: State> sealed::Sealed for SetNotFound<St> {}
3025    impl<St: State> State for SetNotFound<St> {
3026        type NotFound = Set<members::not_found>;
3027        type Uri = St::Uri;
3028    }
3029    ///State transition - sets the `uri` field to Set
3030    pub struct SetUri<St: State = Empty>(PhantomData<fn() -> St>);
3031    impl<St: State> sealed::Sealed for SetUri<St> {}
3032    impl<St: State> State for SetUri<St> {
3033        type NotFound = St::NotFound;
3034        type Uri = Set<members::uri>;
3035    }
3036    /// Marker types for field names
3037    #[allow(non_camel_case_types)]
3038    pub mod members {
3039        ///Marker type for the `not_found` field
3040        pub struct not_found(());
3041        ///Marker type for the `uri` field
3042        pub struct uri(());
3043    }
3044}
3045
3046/// Builder for constructing an instance of this type.
3047pub struct NotFoundPostBuilder<St: not_found_post_state::State, S: BosStr = DefaultStr> {
3048    _state: PhantomData<fn() -> St>,
3049    _fields: (Option<bool>, Option<AtUri<S>>),
3050    _type: PhantomData<fn() -> S>,
3051}
3052
3053impl NotFoundPost<DefaultStr> {
3054    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
3055    pub fn new() -> NotFoundPostBuilder<not_found_post_state::Empty, DefaultStr> {
3056        NotFoundPostBuilder::new()
3057    }
3058}
3059
3060impl<S: BosStr> NotFoundPost<S> {
3061    /// Create a new builder for this type
3062    pub fn builder() -> NotFoundPostBuilder<not_found_post_state::Empty, S> {
3063        NotFoundPostBuilder::builder()
3064    }
3065}
3066
3067impl NotFoundPostBuilder<not_found_post_state::Empty, DefaultStr> {
3068    /// Create a new builder with all fields unset, using the default string type, if needed
3069    pub fn new() -> Self {
3070        NotFoundPostBuilder {
3071            _state: PhantomData,
3072            _fields: (None, None),
3073            _type: PhantomData,
3074        }
3075    }
3076}
3077
3078impl<S: BosStr> NotFoundPostBuilder<not_found_post_state::Empty, S> {
3079    /// Create a new builder with all fields unset
3080    pub fn builder() -> Self {
3081        NotFoundPostBuilder {
3082            _state: PhantomData,
3083            _fields: (None, None),
3084            _type: PhantomData,
3085        }
3086    }
3087}
3088
3089impl<St, S: BosStr> NotFoundPostBuilder<St, S>
3090where
3091    St: not_found_post_state::State,
3092    St::NotFound: not_found_post_state::IsUnset,
3093{
3094    /// Set the `notFound` field (required)
3095    pub fn not_found(
3096        mut self,
3097        value: impl Into<bool>,
3098    ) -> NotFoundPostBuilder<not_found_post_state::SetNotFound<St>, S> {
3099        self._fields.0 = Option::Some(value.into());
3100        NotFoundPostBuilder {
3101            _state: PhantomData,
3102            _fields: self._fields,
3103            _type: PhantomData,
3104        }
3105    }
3106}
3107
3108impl<St, S: BosStr> NotFoundPostBuilder<St, S>
3109where
3110    St: not_found_post_state::State,
3111    St::Uri: not_found_post_state::IsUnset,
3112{
3113    /// Set the `uri` field (required)
3114    pub fn uri(
3115        mut self,
3116        value: impl Into<AtUri<S>>,
3117    ) -> NotFoundPostBuilder<not_found_post_state::SetUri<St>, S> {
3118        self._fields.1 = Option::Some(value.into());
3119        NotFoundPostBuilder {
3120            _state: PhantomData,
3121            _fields: self._fields,
3122            _type: PhantomData,
3123        }
3124    }
3125}
3126
3127impl<St, S: BosStr> NotFoundPostBuilder<St, S>
3128where
3129    St: not_found_post_state::State,
3130    St::NotFound: not_found_post_state::IsSet,
3131    St::Uri: not_found_post_state::IsSet,
3132{
3133    /// Build the final struct.
3134    pub fn build(self) -> NotFoundPost<S> {
3135        NotFoundPost {
3136            not_found: self._fields.0.unwrap(),
3137            uri: self._fields.1.unwrap(),
3138            extra_data: Default::default(),
3139        }
3140    }
3141    /// Build the final struct with custom extra_data.
3142    pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> NotFoundPost<S> {
3143        NotFoundPost {
3144            not_found: self._fields.0.unwrap(),
3145            uri: self._fields.1.unwrap(),
3146            extra_data: Some(extra_data),
3147        }
3148    }
3149}
3150
3151pub mod post_view_state {
3152
3153    pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
3154    #[allow(unused)]
3155    use ::core::marker::PhantomData;
3156    mod sealed {
3157        pub trait Sealed {}
3158    }
3159    /// State trait tracking which required fields have been set
3160    pub trait State: sealed::Sealed {
3161        type Author;
3162        type Cid;
3163        type IndexedAt;
3164        type Record;
3165        type Uri;
3166    }
3167    /// Empty state - all required fields are unset
3168    pub struct Empty(());
3169    impl sealed::Sealed for Empty {}
3170    impl State for Empty {
3171        type Author = Unset;
3172        type Cid = Unset;
3173        type IndexedAt = Unset;
3174        type Record = Unset;
3175        type Uri = Unset;
3176    }
3177    ///State transition - sets the `author` field to Set
3178    pub struct SetAuthor<St: State = Empty>(PhantomData<fn() -> St>);
3179    impl<St: State> sealed::Sealed for SetAuthor<St> {}
3180    impl<St: State> State for SetAuthor<St> {
3181        type Author = Set<members::author>;
3182        type Cid = St::Cid;
3183        type IndexedAt = St::IndexedAt;
3184        type Record = St::Record;
3185        type Uri = St::Uri;
3186    }
3187    ///State transition - sets the `cid` field to Set
3188    pub struct SetCid<St: State = Empty>(PhantomData<fn() -> St>);
3189    impl<St: State> sealed::Sealed for SetCid<St> {}
3190    impl<St: State> State for SetCid<St> {
3191        type Author = St::Author;
3192        type Cid = Set<members::cid>;
3193        type IndexedAt = St::IndexedAt;
3194        type Record = St::Record;
3195        type Uri = St::Uri;
3196    }
3197    ///State transition - sets the `indexed_at` field to Set
3198    pub struct SetIndexedAt<St: State = Empty>(PhantomData<fn() -> St>);
3199    impl<St: State> sealed::Sealed for SetIndexedAt<St> {}
3200    impl<St: State> State for SetIndexedAt<St> {
3201        type Author = St::Author;
3202        type Cid = St::Cid;
3203        type IndexedAt = Set<members::indexed_at>;
3204        type Record = St::Record;
3205        type Uri = St::Uri;
3206    }
3207    ///State transition - sets the `record` field to Set
3208    pub struct SetRecord<St: State = Empty>(PhantomData<fn() -> St>);
3209    impl<St: State> sealed::Sealed for SetRecord<St> {}
3210    impl<St: State> State for SetRecord<St> {
3211        type Author = St::Author;
3212        type Cid = St::Cid;
3213        type IndexedAt = St::IndexedAt;
3214        type Record = Set<members::record>;
3215        type Uri = St::Uri;
3216    }
3217    ///State transition - sets the `uri` field to Set
3218    pub struct SetUri<St: State = Empty>(PhantomData<fn() -> St>);
3219    impl<St: State> sealed::Sealed for SetUri<St> {}
3220    impl<St: State> State for SetUri<St> {
3221        type Author = St::Author;
3222        type Cid = St::Cid;
3223        type IndexedAt = St::IndexedAt;
3224        type Record = St::Record;
3225        type Uri = Set<members::uri>;
3226    }
3227    /// Marker types for field names
3228    #[allow(non_camel_case_types)]
3229    pub mod members {
3230        ///Marker type for the `author` field
3231        pub struct author(());
3232        ///Marker type for the `cid` field
3233        pub struct cid(());
3234        ///Marker type for the `indexed_at` field
3235        pub struct indexed_at(());
3236        ///Marker type for the `record` field
3237        pub struct record(());
3238        ///Marker type for the `uri` field
3239        pub struct uri(());
3240    }
3241}
3242
3243/// Builder for constructing an instance of this type.
3244pub struct PostViewBuilder<St: post_view_state::State, S: BosStr = DefaultStr> {
3245    _state: PhantomData<fn() -> St>,
3246    _fields: (
3247        Option<ProfileViewBasic<S>>,
3248        Option<i64>,
3249        Option<Cid<S>>,
3250        Option<Data<S>>,
3251        Option<PostViewEmbed<S>>,
3252        Option<Datetime>,
3253        Option<Vec<Label<S>>>,
3254        Option<i64>,
3255        Option<i64>,
3256        Option<Data<S>>,
3257        Option<i64>,
3258        Option<i64>,
3259        Option<feed::ThreadgateView<S>>,
3260        Option<AtUri<S>>,
3261        Option<feed::ViewerState<S>>,
3262    ),
3263    _type: PhantomData<fn() -> S>,
3264}
3265
3266impl PostView<DefaultStr> {
3267    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
3268    pub fn new() -> PostViewBuilder<post_view_state::Empty, DefaultStr> {
3269        PostViewBuilder::new()
3270    }
3271}
3272
3273impl<S: BosStr> PostView<S> {
3274    /// Create a new builder for this type
3275    pub fn builder() -> PostViewBuilder<post_view_state::Empty, S> {
3276        PostViewBuilder::builder()
3277    }
3278}
3279
3280impl PostViewBuilder<post_view_state::Empty, DefaultStr> {
3281    /// Create a new builder with all fields unset, using the default string type, if needed
3282    pub fn new() -> Self {
3283        PostViewBuilder {
3284            _state: PhantomData,
3285            _fields: (
3286                None, None, None, None, None, None, None, None, None, None, None, None, None, None,
3287                None,
3288            ),
3289            _type: PhantomData,
3290        }
3291    }
3292}
3293
3294impl<S: BosStr> PostViewBuilder<post_view_state::Empty, S> {
3295    /// Create a new builder with all fields unset
3296    pub fn builder() -> Self {
3297        PostViewBuilder {
3298            _state: PhantomData,
3299            _fields: (
3300                None, None, None, None, None, None, None, None, None, None, None, None, None, None,
3301                None,
3302            ),
3303            _type: PhantomData,
3304        }
3305    }
3306}
3307
3308impl<St, S: BosStr> PostViewBuilder<St, S>
3309where
3310    St: post_view_state::State,
3311    St::Author: post_view_state::IsUnset,
3312{
3313    /// Set the `author` field (required)
3314    pub fn author(
3315        mut self,
3316        value: impl Into<ProfileViewBasic<S>>,
3317    ) -> PostViewBuilder<post_view_state::SetAuthor<St>, S> {
3318        self._fields.0 = Option::Some(value.into());
3319        PostViewBuilder {
3320            _state: PhantomData,
3321            _fields: self._fields,
3322            _type: PhantomData,
3323        }
3324    }
3325}
3326
3327impl<St: post_view_state::State, S: BosStr> PostViewBuilder<St, S> {
3328    /// Set the `bookmarkCount` field (optional)
3329    pub fn bookmark_count(mut self, value: impl Into<Option<i64>>) -> Self {
3330        self._fields.1 = value.into();
3331        self
3332    }
3333    /// Set the `bookmarkCount` field to an Option value (optional)
3334    pub fn maybe_bookmark_count(mut self, value: Option<i64>) -> Self {
3335        self._fields.1 = value;
3336        self
3337    }
3338}
3339
3340impl<St, S: BosStr> PostViewBuilder<St, S>
3341where
3342    St: post_view_state::State,
3343    St::Cid: post_view_state::IsUnset,
3344{
3345    /// Set the `cid` field (required)
3346    pub fn cid(
3347        mut self,
3348        value: impl Into<Cid<S>>,
3349    ) -> PostViewBuilder<post_view_state::SetCid<St>, S> {
3350        self._fields.2 = Option::Some(value.into());
3351        PostViewBuilder {
3352            _state: PhantomData,
3353            _fields: self._fields,
3354            _type: PhantomData,
3355        }
3356    }
3357}
3358
3359impl<St: post_view_state::State, S: BosStr> PostViewBuilder<St, S> {
3360    /// Set the `debug` field (optional)
3361    pub fn debug(mut self, value: impl Into<Option<Data<S>>>) -> Self {
3362        self._fields.3 = value.into();
3363        self
3364    }
3365    /// Set the `debug` field to an Option value (optional)
3366    pub fn maybe_debug(mut self, value: Option<Data<S>>) -> Self {
3367        self._fields.3 = value;
3368        self
3369    }
3370}
3371
3372impl<St: post_view_state::State, S: BosStr> PostViewBuilder<St, S> {
3373    /// Set the `embed` field (optional)
3374    pub fn embed(mut self, value: impl Into<Option<PostViewEmbed<S>>>) -> Self {
3375        self._fields.4 = value.into();
3376        self
3377    }
3378    /// Set the `embed` field to an Option value (optional)
3379    pub fn maybe_embed(mut self, value: Option<PostViewEmbed<S>>) -> Self {
3380        self._fields.4 = value;
3381        self
3382    }
3383}
3384
3385impl<St, S: BosStr> PostViewBuilder<St, S>
3386where
3387    St: post_view_state::State,
3388    St::IndexedAt: post_view_state::IsUnset,
3389{
3390    /// Set the `indexedAt` field (required)
3391    pub fn indexed_at(
3392        mut self,
3393        value: impl Into<Datetime>,
3394    ) -> PostViewBuilder<post_view_state::SetIndexedAt<St>, S> {
3395        self._fields.5 = Option::Some(value.into());
3396        PostViewBuilder {
3397            _state: PhantomData,
3398            _fields: self._fields,
3399            _type: PhantomData,
3400        }
3401    }
3402}
3403
3404impl<St: post_view_state::State, S: BosStr> PostViewBuilder<St, S> {
3405    /// Set the `labels` field (optional)
3406    pub fn labels(mut self, value: impl Into<Option<Vec<Label<S>>>>) -> Self {
3407        self._fields.6 = value.into();
3408        self
3409    }
3410    /// Set the `labels` field to an Option value (optional)
3411    pub fn maybe_labels(mut self, value: Option<Vec<Label<S>>>) -> Self {
3412        self._fields.6 = value;
3413        self
3414    }
3415}
3416
3417impl<St: post_view_state::State, S: BosStr> PostViewBuilder<St, S> {
3418    /// Set the `likeCount` field (optional)
3419    pub fn like_count(mut self, value: impl Into<Option<i64>>) -> Self {
3420        self._fields.7 = value.into();
3421        self
3422    }
3423    /// Set the `likeCount` field to an Option value (optional)
3424    pub fn maybe_like_count(mut self, value: Option<i64>) -> Self {
3425        self._fields.7 = value;
3426        self
3427    }
3428}
3429
3430impl<St: post_view_state::State, S: BosStr> PostViewBuilder<St, S> {
3431    /// Set the `quoteCount` field (optional)
3432    pub fn quote_count(mut self, value: impl Into<Option<i64>>) -> Self {
3433        self._fields.8 = value.into();
3434        self
3435    }
3436    /// Set the `quoteCount` field to an Option value (optional)
3437    pub fn maybe_quote_count(mut self, value: Option<i64>) -> Self {
3438        self._fields.8 = value;
3439        self
3440    }
3441}
3442
3443impl<St, S: BosStr> PostViewBuilder<St, S>
3444where
3445    St: post_view_state::State,
3446    St::Record: post_view_state::IsUnset,
3447{
3448    /// Set the `record` field (required)
3449    pub fn record(
3450        mut self,
3451        value: impl Into<Data<S>>,
3452    ) -> PostViewBuilder<post_view_state::SetRecord<St>, S> {
3453        self._fields.9 = Option::Some(value.into());
3454        PostViewBuilder {
3455            _state: PhantomData,
3456            _fields: self._fields,
3457            _type: PhantomData,
3458        }
3459    }
3460}
3461
3462impl<St: post_view_state::State, S: BosStr> PostViewBuilder<St, S> {
3463    /// Set the `replyCount` field (optional)
3464    pub fn reply_count(mut self, value: impl Into<Option<i64>>) -> Self {
3465        self._fields.10 = value.into();
3466        self
3467    }
3468    /// Set the `replyCount` field to an Option value (optional)
3469    pub fn maybe_reply_count(mut self, value: Option<i64>) -> Self {
3470        self._fields.10 = value;
3471        self
3472    }
3473}
3474
3475impl<St: post_view_state::State, S: BosStr> PostViewBuilder<St, S> {
3476    /// Set the `repostCount` field (optional)
3477    pub fn repost_count(mut self, value: impl Into<Option<i64>>) -> Self {
3478        self._fields.11 = value.into();
3479        self
3480    }
3481    /// Set the `repostCount` field to an Option value (optional)
3482    pub fn maybe_repost_count(mut self, value: Option<i64>) -> Self {
3483        self._fields.11 = value;
3484        self
3485    }
3486}
3487
3488impl<St: post_view_state::State, S: BosStr> PostViewBuilder<St, S> {
3489    /// Set the `threadgate` field (optional)
3490    pub fn threadgate(mut self, value: impl Into<Option<feed::ThreadgateView<S>>>) -> Self {
3491        self._fields.12 = value.into();
3492        self
3493    }
3494    /// Set the `threadgate` field to an Option value (optional)
3495    pub fn maybe_threadgate(mut self, value: Option<feed::ThreadgateView<S>>) -> Self {
3496        self._fields.12 = value;
3497        self
3498    }
3499}
3500
3501impl<St, S: BosStr> PostViewBuilder<St, S>
3502where
3503    St: post_view_state::State,
3504    St::Uri: post_view_state::IsUnset,
3505{
3506    /// Set the `uri` field (required)
3507    pub fn uri(
3508        mut self,
3509        value: impl Into<AtUri<S>>,
3510    ) -> PostViewBuilder<post_view_state::SetUri<St>, S> {
3511        self._fields.13 = Option::Some(value.into());
3512        PostViewBuilder {
3513            _state: PhantomData,
3514            _fields: self._fields,
3515            _type: PhantomData,
3516        }
3517    }
3518}
3519
3520impl<St: post_view_state::State, S: BosStr> PostViewBuilder<St, S> {
3521    /// Set the `viewer` field (optional)
3522    pub fn viewer(mut self, value: impl Into<Option<feed::ViewerState<S>>>) -> Self {
3523        self._fields.14 = value.into();
3524        self
3525    }
3526    /// Set the `viewer` field to an Option value (optional)
3527    pub fn maybe_viewer(mut self, value: Option<feed::ViewerState<S>>) -> Self {
3528        self._fields.14 = value;
3529        self
3530    }
3531}
3532
3533impl<St, S: BosStr> PostViewBuilder<St, S>
3534where
3535    St: post_view_state::State,
3536    St::Author: post_view_state::IsSet,
3537    St::Cid: post_view_state::IsSet,
3538    St::IndexedAt: post_view_state::IsSet,
3539    St::Record: post_view_state::IsSet,
3540    St::Uri: post_view_state::IsSet,
3541{
3542    /// Build the final struct.
3543    pub fn build(self) -> PostView<S> {
3544        PostView {
3545            author: self._fields.0.unwrap(),
3546            bookmark_count: self._fields.1,
3547            cid: self._fields.2.unwrap(),
3548            debug: self._fields.3,
3549            embed: self._fields.4,
3550            indexed_at: self._fields.5.unwrap(),
3551            labels: self._fields.6,
3552            like_count: self._fields.7,
3553            quote_count: self._fields.8,
3554            record: self._fields.9.unwrap(),
3555            reply_count: self._fields.10,
3556            repost_count: self._fields.11,
3557            threadgate: self._fields.12,
3558            uri: self._fields.13.unwrap(),
3559            viewer: self._fields.14,
3560            extra_data: Default::default(),
3561        }
3562    }
3563    /// Build the final struct with custom extra_data.
3564    pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> PostView<S> {
3565        PostView {
3566            author: self._fields.0.unwrap(),
3567            bookmark_count: self._fields.1,
3568            cid: self._fields.2.unwrap(),
3569            debug: self._fields.3,
3570            embed: self._fields.4,
3571            indexed_at: self._fields.5.unwrap(),
3572            labels: self._fields.6,
3573            like_count: self._fields.7,
3574            quote_count: self._fields.8,
3575            record: self._fields.9.unwrap(),
3576            reply_count: self._fields.10,
3577            repost_count: self._fields.11,
3578            threadgate: self._fields.12,
3579            uri: self._fields.13.unwrap(),
3580            viewer: self._fields.14,
3581            extra_data: Some(extra_data),
3582        }
3583    }
3584}
3585
3586pub mod reason_repost_state {
3587
3588    pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
3589    #[allow(unused)]
3590    use ::core::marker::PhantomData;
3591    mod sealed {
3592        pub trait Sealed {}
3593    }
3594    /// State trait tracking which required fields have been set
3595    pub trait State: sealed::Sealed {
3596        type By;
3597        type IndexedAt;
3598    }
3599    /// Empty state - all required fields are unset
3600    pub struct Empty(());
3601    impl sealed::Sealed for Empty {}
3602    impl State for Empty {
3603        type By = Unset;
3604        type IndexedAt = Unset;
3605    }
3606    ///State transition - sets the `by` field to Set
3607    pub struct SetBy<St: State = Empty>(PhantomData<fn() -> St>);
3608    impl<St: State> sealed::Sealed for SetBy<St> {}
3609    impl<St: State> State for SetBy<St> {
3610        type By = Set<members::by>;
3611        type IndexedAt = St::IndexedAt;
3612    }
3613    ///State transition - sets the `indexed_at` field to Set
3614    pub struct SetIndexedAt<St: State = Empty>(PhantomData<fn() -> St>);
3615    impl<St: State> sealed::Sealed for SetIndexedAt<St> {}
3616    impl<St: State> State for SetIndexedAt<St> {
3617        type By = St::By;
3618        type IndexedAt = Set<members::indexed_at>;
3619    }
3620    /// Marker types for field names
3621    #[allow(non_camel_case_types)]
3622    pub mod members {
3623        ///Marker type for the `by` field
3624        pub struct by(());
3625        ///Marker type for the `indexed_at` field
3626        pub struct indexed_at(());
3627    }
3628}
3629
3630/// Builder for constructing an instance of this type.
3631pub struct ReasonRepostBuilder<St: reason_repost_state::State, S: BosStr = DefaultStr> {
3632    _state: PhantomData<fn() -> St>,
3633    _fields: (
3634        Option<ProfileViewBasic<S>>,
3635        Option<Cid<S>>,
3636        Option<Datetime>,
3637        Option<AtUri<S>>,
3638    ),
3639    _type: PhantomData<fn() -> S>,
3640}
3641
3642impl ReasonRepost<DefaultStr> {
3643    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
3644    pub fn new() -> ReasonRepostBuilder<reason_repost_state::Empty, DefaultStr> {
3645        ReasonRepostBuilder::new()
3646    }
3647}
3648
3649impl<S: BosStr> ReasonRepost<S> {
3650    /// Create a new builder for this type
3651    pub fn builder() -> ReasonRepostBuilder<reason_repost_state::Empty, S> {
3652        ReasonRepostBuilder::builder()
3653    }
3654}
3655
3656impl ReasonRepostBuilder<reason_repost_state::Empty, DefaultStr> {
3657    /// Create a new builder with all fields unset, using the default string type, if needed
3658    pub fn new() -> Self {
3659        ReasonRepostBuilder {
3660            _state: PhantomData,
3661            _fields: (None, None, None, None),
3662            _type: PhantomData,
3663        }
3664    }
3665}
3666
3667impl<S: BosStr> ReasonRepostBuilder<reason_repost_state::Empty, S> {
3668    /// Create a new builder with all fields unset
3669    pub fn builder() -> Self {
3670        ReasonRepostBuilder {
3671            _state: PhantomData,
3672            _fields: (None, None, None, None),
3673            _type: PhantomData,
3674        }
3675    }
3676}
3677
3678impl<St, S: BosStr> ReasonRepostBuilder<St, S>
3679where
3680    St: reason_repost_state::State,
3681    St::By: reason_repost_state::IsUnset,
3682{
3683    /// Set the `by` field (required)
3684    pub fn by(
3685        mut self,
3686        value: impl Into<ProfileViewBasic<S>>,
3687    ) -> ReasonRepostBuilder<reason_repost_state::SetBy<St>, S> {
3688        self._fields.0 = Option::Some(value.into());
3689        ReasonRepostBuilder {
3690            _state: PhantomData,
3691            _fields: self._fields,
3692            _type: PhantomData,
3693        }
3694    }
3695}
3696
3697impl<St: reason_repost_state::State, S: BosStr> ReasonRepostBuilder<St, S> {
3698    /// Set the `cid` field (optional)
3699    pub fn cid(mut self, value: impl Into<Option<Cid<S>>>) -> Self {
3700        self._fields.1 = value.into();
3701        self
3702    }
3703    /// Set the `cid` field to an Option value (optional)
3704    pub fn maybe_cid(mut self, value: Option<Cid<S>>) -> Self {
3705        self._fields.1 = value;
3706        self
3707    }
3708}
3709
3710impl<St, S: BosStr> ReasonRepostBuilder<St, S>
3711where
3712    St: reason_repost_state::State,
3713    St::IndexedAt: reason_repost_state::IsUnset,
3714{
3715    /// Set the `indexedAt` field (required)
3716    pub fn indexed_at(
3717        mut self,
3718        value: impl Into<Datetime>,
3719    ) -> ReasonRepostBuilder<reason_repost_state::SetIndexedAt<St>, S> {
3720        self._fields.2 = Option::Some(value.into());
3721        ReasonRepostBuilder {
3722            _state: PhantomData,
3723            _fields: self._fields,
3724            _type: PhantomData,
3725        }
3726    }
3727}
3728
3729impl<St: reason_repost_state::State, S: BosStr> ReasonRepostBuilder<St, S> {
3730    /// Set the `uri` field (optional)
3731    pub fn uri(mut self, value: impl Into<Option<AtUri<S>>>) -> Self {
3732        self._fields.3 = value.into();
3733        self
3734    }
3735    /// Set the `uri` field to an Option value (optional)
3736    pub fn maybe_uri(mut self, value: Option<AtUri<S>>) -> Self {
3737        self._fields.3 = value;
3738        self
3739    }
3740}
3741
3742impl<St, S: BosStr> ReasonRepostBuilder<St, S>
3743where
3744    St: reason_repost_state::State,
3745    St::By: reason_repost_state::IsSet,
3746    St::IndexedAt: reason_repost_state::IsSet,
3747{
3748    /// Build the final struct.
3749    pub fn build(self) -> ReasonRepost<S> {
3750        ReasonRepost {
3751            by: self._fields.0.unwrap(),
3752            cid: self._fields.1,
3753            indexed_at: self._fields.2.unwrap(),
3754            uri: self._fields.3,
3755            extra_data: Default::default(),
3756        }
3757    }
3758    /// Build the final struct with custom extra_data.
3759    pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> ReasonRepost<S> {
3760        ReasonRepost {
3761            by: self._fields.0.unwrap(),
3762            cid: self._fields.1,
3763            indexed_at: self._fields.2.unwrap(),
3764            uri: self._fields.3,
3765            extra_data: Some(extra_data),
3766        }
3767    }
3768}
3769
3770pub mod reply_ref_state {
3771
3772    pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
3773    #[allow(unused)]
3774    use ::core::marker::PhantomData;
3775    mod sealed {
3776        pub trait Sealed {}
3777    }
3778    /// State trait tracking which required fields have been set
3779    pub trait State: sealed::Sealed {
3780        type Parent;
3781        type Root;
3782    }
3783    /// Empty state - all required fields are unset
3784    pub struct Empty(());
3785    impl sealed::Sealed for Empty {}
3786    impl State for Empty {
3787        type Parent = Unset;
3788        type Root = Unset;
3789    }
3790    ///State transition - sets the `parent` field to Set
3791    pub struct SetParent<St: State = Empty>(PhantomData<fn() -> St>);
3792    impl<St: State> sealed::Sealed for SetParent<St> {}
3793    impl<St: State> State for SetParent<St> {
3794        type Parent = Set<members::parent>;
3795        type Root = St::Root;
3796    }
3797    ///State transition - sets the `root` field to Set
3798    pub struct SetRoot<St: State = Empty>(PhantomData<fn() -> St>);
3799    impl<St: State> sealed::Sealed for SetRoot<St> {}
3800    impl<St: State> State for SetRoot<St> {
3801        type Parent = St::Parent;
3802        type Root = Set<members::root>;
3803    }
3804    /// Marker types for field names
3805    #[allow(non_camel_case_types)]
3806    pub mod members {
3807        ///Marker type for the `parent` field
3808        pub struct parent(());
3809        ///Marker type for the `root` field
3810        pub struct root(());
3811    }
3812}
3813
3814/// Builder for constructing an instance of this type.
3815pub struct ReplyRefBuilder<St: reply_ref_state::State, S: BosStr = DefaultStr> {
3816    _state: PhantomData<fn() -> St>,
3817    _fields: (
3818        Option<ProfileViewBasic<S>>,
3819        Option<ReplyRefParent<S>>,
3820        Option<ReplyRefRoot<S>>,
3821    ),
3822    _type: PhantomData<fn() -> S>,
3823}
3824
3825impl ReplyRef<DefaultStr> {
3826    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
3827    pub fn new() -> ReplyRefBuilder<reply_ref_state::Empty, DefaultStr> {
3828        ReplyRefBuilder::new()
3829    }
3830}
3831
3832impl<S: BosStr> ReplyRef<S> {
3833    /// Create a new builder for this type
3834    pub fn builder() -> ReplyRefBuilder<reply_ref_state::Empty, S> {
3835        ReplyRefBuilder::builder()
3836    }
3837}
3838
3839impl ReplyRefBuilder<reply_ref_state::Empty, DefaultStr> {
3840    /// Create a new builder with all fields unset, using the default string type, if needed
3841    pub fn new() -> Self {
3842        ReplyRefBuilder {
3843            _state: PhantomData,
3844            _fields: (None, None, None),
3845            _type: PhantomData,
3846        }
3847    }
3848}
3849
3850impl<S: BosStr> ReplyRefBuilder<reply_ref_state::Empty, S> {
3851    /// Create a new builder with all fields unset
3852    pub fn builder() -> Self {
3853        ReplyRefBuilder {
3854            _state: PhantomData,
3855            _fields: (None, None, None),
3856            _type: PhantomData,
3857        }
3858    }
3859}
3860
3861impl<St: reply_ref_state::State, S: BosStr> ReplyRefBuilder<St, S> {
3862    /// Set the `grandparentAuthor` field (optional)
3863    pub fn grandparent_author(mut self, value: impl Into<Option<ProfileViewBasic<S>>>) -> Self {
3864        self._fields.0 = value.into();
3865        self
3866    }
3867    /// Set the `grandparentAuthor` field to an Option value (optional)
3868    pub fn maybe_grandparent_author(mut self, value: Option<ProfileViewBasic<S>>) -> Self {
3869        self._fields.0 = value;
3870        self
3871    }
3872}
3873
3874impl<St, S: BosStr> ReplyRefBuilder<St, S>
3875where
3876    St: reply_ref_state::State,
3877    St::Parent: reply_ref_state::IsUnset,
3878{
3879    /// Set the `parent` field (required)
3880    pub fn parent(
3881        mut self,
3882        value: impl Into<ReplyRefParent<S>>,
3883    ) -> ReplyRefBuilder<reply_ref_state::SetParent<St>, S> {
3884        self._fields.1 = Option::Some(value.into());
3885        ReplyRefBuilder {
3886            _state: PhantomData,
3887            _fields: self._fields,
3888            _type: PhantomData,
3889        }
3890    }
3891}
3892
3893impl<St, S: BosStr> ReplyRefBuilder<St, S>
3894where
3895    St: reply_ref_state::State,
3896    St::Root: reply_ref_state::IsUnset,
3897{
3898    /// Set the `root` field (required)
3899    pub fn root(
3900        mut self,
3901        value: impl Into<ReplyRefRoot<S>>,
3902    ) -> ReplyRefBuilder<reply_ref_state::SetRoot<St>, S> {
3903        self._fields.2 = Option::Some(value.into());
3904        ReplyRefBuilder {
3905            _state: PhantomData,
3906            _fields: self._fields,
3907            _type: PhantomData,
3908        }
3909    }
3910}
3911
3912impl<St, S: BosStr> ReplyRefBuilder<St, S>
3913where
3914    St: reply_ref_state::State,
3915    St::Parent: reply_ref_state::IsSet,
3916    St::Root: reply_ref_state::IsSet,
3917{
3918    /// Build the final struct.
3919    pub fn build(self) -> ReplyRef<S> {
3920        ReplyRef {
3921            grandparent_author: self._fields.0,
3922            parent: self._fields.1.unwrap(),
3923            root: self._fields.2.unwrap(),
3924            extra_data: Default::default(),
3925        }
3926    }
3927    /// Build the final struct with custom extra_data.
3928    pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> ReplyRef<S> {
3929        ReplyRef {
3930            grandparent_author: self._fields.0,
3931            parent: self._fields.1.unwrap(),
3932            root: self._fields.2.unwrap(),
3933            extra_data: Some(extra_data),
3934        }
3935    }
3936}
3937
3938pub mod skeleton_feed_post_state {
3939
3940    pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
3941    #[allow(unused)]
3942    use ::core::marker::PhantomData;
3943    mod sealed {
3944        pub trait Sealed {}
3945    }
3946    /// State trait tracking which required fields have been set
3947    pub trait State: sealed::Sealed {
3948        type Post;
3949    }
3950    /// Empty state - all required fields are unset
3951    pub struct Empty(());
3952    impl sealed::Sealed for Empty {}
3953    impl State for Empty {
3954        type Post = Unset;
3955    }
3956    ///State transition - sets the `post` field to Set
3957    pub struct SetPost<St: State = Empty>(PhantomData<fn() -> St>);
3958    impl<St: State> sealed::Sealed for SetPost<St> {}
3959    impl<St: State> State for SetPost<St> {
3960        type Post = Set<members::post>;
3961    }
3962    /// Marker types for field names
3963    #[allow(non_camel_case_types)]
3964    pub mod members {
3965        ///Marker type for the `post` field
3966        pub struct post(());
3967    }
3968}
3969
3970/// Builder for constructing an instance of this type.
3971pub struct SkeletonFeedPostBuilder<St: skeleton_feed_post_state::State, S: BosStr = DefaultStr> {
3972    _state: PhantomData<fn() -> St>,
3973    _fields: (
3974        Option<S>,
3975        Option<AtUri<S>>,
3976        Option<SkeletonFeedPostReason<S>>,
3977    ),
3978    _type: PhantomData<fn() -> S>,
3979}
3980
3981impl SkeletonFeedPost<DefaultStr> {
3982    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
3983    pub fn new() -> SkeletonFeedPostBuilder<skeleton_feed_post_state::Empty, DefaultStr> {
3984        SkeletonFeedPostBuilder::new()
3985    }
3986}
3987
3988impl<S: BosStr> SkeletonFeedPost<S> {
3989    /// Create a new builder for this type
3990    pub fn builder() -> SkeletonFeedPostBuilder<skeleton_feed_post_state::Empty, S> {
3991        SkeletonFeedPostBuilder::builder()
3992    }
3993}
3994
3995impl SkeletonFeedPostBuilder<skeleton_feed_post_state::Empty, DefaultStr> {
3996    /// Create a new builder with all fields unset, using the default string type, if needed
3997    pub fn new() -> Self {
3998        SkeletonFeedPostBuilder {
3999            _state: PhantomData,
4000            _fields: (None, None, None),
4001            _type: PhantomData,
4002        }
4003    }
4004}
4005
4006impl<S: BosStr> SkeletonFeedPostBuilder<skeleton_feed_post_state::Empty, S> {
4007    /// Create a new builder with all fields unset
4008    pub fn builder() -> Self {
4009        SkeletonFeedPostBuilder {
4010            _state: PhantomData,
4011            _fields: (None, None, None),
4012            _type: PhantomData,
4013        }
4014    }
4015}
4016
4017impl<St: skeleton_feed_post_state::State, S: BosStr> SkeletonFeedPostBuilder<St, S> {
4018    /// Set the `feedContext` field (optional)
4019    pub fn feed_context(mut self, value: impl Into<Option<S>>) -> Self {
4020        self._fields.0 = value.into();
4021        self
4022    }
4023    /// Set the `feedContext` field to an Option value (optional)
4024    pub fn maybe_feed_context(mut self, value: Option<S>) -> Self {
4025        self._fields.0 = value;
4026        self
4027    }
4028}
4029
4030impl<St, S: BosStr> SkeletonFeedPostBuilder<St, S>
4031where
4032    St: skeleton_feed_post_state::State,
4033    St::Post: skeleton_feed_post_state::IsUnset,
4034{
4035    /// Set the `post` field (required)
4036    pub fn post(
4037        mut self,
4038        value: impl Into<AtUri<S>>,
4039    ) -> SkeletonFeedPostBuilder<skeleton_feed_post_state::SetPost<St>, S> {
4040        self._fields.1 = Option::Some(value.into());
4041        SkeletonFeedPostBuilder {
4042            _state: PhantomData,
4043            _fields: self._fields,
4044            _type: PhantomData,
4045        }
4046    }
4047}
4048
4049impl<St: skeleton_feed_post_state::State, S: BosStr> SkeletonFeedPostBuilder<St, S> {
4050    /// Set the `reason` field (optional)
4051    pub fn reason(mut self, value: impl Into<Option<SkeletonFeedPostReason<S>>>) -> Self {
4052        self._fields.2 = value.into();
4053        self
4054    }
4055    /// Set the `reason` field to an Option value (optional)
4056    pub fn maybe_reason(mut self, value: Option<SkeletonFeedPostReason<S>>) -> Self {
4057        self._fields.2 = value;
4058        self
4059    }
4060}
4061
4062impl<St, S: BosStr> SkeletonFeedPostBuilder<St, S>
4063where
4064    St: skeleton_feed_post_state::State,
4065    St::Post: skeleton_feed_post_state::IsSet,
4066{
4067    /// Build the final struct.
4068    pub fn build(self) -> SkeletonFeedPost<S> {
4069        SkeletonFeedPost {
4070            feed_context: self._fields.0,
4071            post: self._fields.1.unwrap(),
4072            reason: self._fields.2,
4073            extra_data: Default::default(),
4074        }
4075    }
4076    /// Build the final struct with custom extra_data.
4077    pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> SkeletonFeedPost<S> {
4078        SkeletonFeedPost {
4079            feed_context: self._fields.0,
4080            post: self._fields.1.unwrap(),
4081            reason: self._fields.2,
4082            extra_data: Some(extra_data),
4083        }
4084    }
4085}
4086
4087pub mod skeleton_reason_repost_state {
4088
4089    pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
4090    #[allow(unused)]
4091    use ::core::marker::PhantomData;
4092    mod sealed {
4093        pub trait Sealed {}
4094    }
4095    /// State trait tracking which required fields have been set
4096    pub trait State: sealed::Sealed {
4097        type Repost;
4098    }
4099    /// Empty state - all required fields are unset
4100    pub struct Empty(());
4101    impl sealed::Sealed for Empty {}
4102    impl State for Empty {
4103        type Repost = Unset;
4104    }
4105    ///State transition - sets the `repost` field to Set
4106    pub struct SetRepost<St: State = Empty>(PhantomData<fn() -> St>);
4107    impl<St: State> sealed::Sealed for SetRepost<St> {}
4108    impl<St: State> State for SetRepost<St> {
4109        type Repost = Set<members::repost>;
4110    }
4111    /// Marker types for field names
4112    #[allow(non_camel_case_types)]
4113    pub mod members {
4114        ///Marker type for the `repost` field
4115        pub struct repost(());
4116    }
4117}
4118
4119/// Builder for constructing an instance of this type.
4120pub struct SkeletonReasonRepostBuilder<
4121    St: skeleton_reason_repost_state::State,
4122    S: BosStr = DefaultStr,
4123> {
4124    _state: PhantomData<fn() -> St>,
4125    _fields: (Option<AtUri<S>>,),
4126    _type: PhantomData<fn() -> S>,
4127}
4128
4129impl SkeletonReasonRepost<DefaultStr> {
4130    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
4131    pub fn new() -> SkeletonReasonRepostBuilder<skeleton_reason_repost_state::Empty, DefaultStr> {
4132        SkeletonReasonRepostBuilder::new()
4133    }
4134}
4135
4136impl<S: BosStr> SkeletonReasonRepost<S> {
4137    /// Create a new builder for this type
4138    pub fn builder() -> SkeletonReasonRepostBuilder<skeleton_reason_repost_state::Empty, S> {
4139        SkeletonReasonRepostBuilder::builder()
4140    }
4141}
4142
4143impl SkeletonReasonRepostBuilder<skeleton_reason_repost_state::Empty, DefaultStr> {
4144    /// Create a new builder with all fields unset, using the default string type, if needed
4145    pub fn new() -> Self {
4146        SkeletonReasonRepostBuilder {
4147            _state: PhantomData,
4148            _fields: (None,),
4149            _type: PhantomData,
4150        }
4151    }
4152}
4153
4154impl<S: BosStr> SkeletonReasonRepostBuilder<skeleton_reason_repost_state::Empty, S> {
4155    /// Create a new builder with all fields unset
4156    pub fn builder() -> Self {
4157        SkeletonReasonRepostBuilder {
4158            _state: PhantomData,
4159            _fields: (None,),
4160            _type: PhantomData,
4161        }
4162    }
4163}
4164
4165impl<St, S: BosStr> SkeletonReasonRepostBuilder<St, S>
4166where
4167    St: skeleton_reason_repost_state::State,
4168    St::Repost: skeleton_reason_repost_state::IsUnset,
4169{
4170    /// Set the `repost` field (required)
4171    pub fn repost(
4172        mut self,
4173        value: impl Into<AtUri<S>>,
4174    ) -> SkeletonReasonRepostBuilder<skeleton_reason_repost_state::SetRepost<St>, S> {
4175        self._fields.0 = Option::Some(value.into());
4176        SkeletonReasonRepostBuilder {
4177            _state: PhantomData,
4178            _fields: self._fields,
4179            _type: PhantomData,
4180        }
4181    }
4182}
4183
4184impl<St, S: BosStr> SkeletonReasonRepostBuilder<St, S>
4185where
4186    St: skeleton_reason_repost_state::State,
4187    St::Repost: skeleton_reason_repost_state::IsSet,
4188{
4189    /// Build the final struct.
4190    pub fn build(self) -> SkeletonReasonRepost<S> {
4191        SkeletonReasonRepost {
4192            repost: self._fields.0.unwrap(),
4193            extra_data: Default::default(),
4194        }
4195    }
4196    /// Build the final struct with custom extra_data.
4197    pub fn build_with_data(
4198        self,
4199        extra_data: BTreeMap<SmolStr, Data<S>>,
4200    ) -> SkeletonReasonRepost<S> {
4201        SkeletonReasonRepost {
4202            repost: self._fields.0.unwrap(),
4203            extra_data: Some(extra_data),
4204        }
4205    }
4206}
4207
4208pub mod thread_view_post_state {
4209
4210    pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
4211    #[allow(unused)]
4212    use ::core::marker::PhantomData;
4213    mod sealed {
4214        pub trait Sealed {}
4215    }
4216    /// State trait tracking which required fields have been set
4217    pub trait State: sealed::Sealed {
4218        type Post;
4219    }
4220    /// Empty state - all required fields are unset
4221    pub struct Empty(());
4222    impl sealed::Sealed for Empty {}
4223    impl State for Empty {
4224        type Post = Unset;
4225    }
4226    ///State transition - sets the `post` field to Set
4227    pub struct SetPost<St: State = Empty>(PhantomData<fn() -> St>);
4228    impl<St: State> sealed::Sealed for SetPost<St> {}
4229    impl<St: State> State for SetPost<St> {
4230        type Post = Set<members::post>;
4231    }
4232    /// Marker types for field names
4233    #[allow(non_camel_case_types)]
4234    pub mod members {
4235        ///Marker type for the `post` field
4236        pub struct post(());
4237    }
4238}
4239
4240/// Builder for constructing an instance of this type.
4241pub struct ThreadViewPostBuilder<St: thread_view_post_state::State, S: BosStr = DefaultStr> {
4242    _state: PhantomData<fn() -> St>,
4243    _fields: (
4244        Option<ThreadViewPostParent<S>>,
4245        Option<feed::PostView<S>>,
4246        Option<Vec<ThreadViewPostRepliesItem<S>>>,
4247        Option<feed::ThreadContext<S>>,
4248    ),
4249    _type: PhantomData<fn() -> S>,
4250}
4251
4252impl ThreadViewPost<DefaultStr> {
4253    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
4254    pub fn new() -> ThreadViewPostBuilder<thread_view_post_state::Empty, DefaultStr> {
4255        ThreadViewPostBuilder::new()
4256    }
4257}
4258
4259impl<S: BosStr> ThreadViewPost<S> {
4260    /// Create a new builder for this type
4261    pub fn builder() -> ThreadViewPostBuilder<thread_view_post_state::Empty, S> {
4262        ThreadViewPostBuilder::builder()
4263    }
4264}
4265
4266impl ThreadViewPostBuilder<thread_view_post_state::Empty, DefaultStr> {
4267    /// Create a new builder with all fields unset, using the default string type, if needed
4268    pub fn new() -> Self {
4269        ThreadViewPostBuilder {
4270            _state: PhantomData,
4271            _fields: (None, None, None, None),
4272            _type: PhantomData,
4273        }
4274    }
4275}
4276
4277impl<S: BosStr> ThreadViewPostBuilder<thread_view_post_state::Empty, S> {
4278    /// Create a new builder with all fields unset
4279    pub fn builder() -> Self {
4280        ThreadViewPostBuilder {
4281            _state: PhantomData,
4282            _fields: (None, None, None, None),
4283            _type: PhantomData,
4284        }
4285    }
4286}
4287
4288impl<St: thread_view_post_state::State, S: BosStr> ThreadViewPostBuilder<St, S> {
4289    /// Set the `parent` field (optional)
4290    pub fn parent(mut self, value: impl Into<Option<ThreadViewPostParent<S>>>) -> Self {
4291        self._fields.0 = value.into();
4292        self
4293    }
4294    /// Set the `parent` field to an Option value (optional)
4295    pub fn maybe_parent(mut self, value: Option<ThreadViewPostParent<S>>) -> Self {
4296        self._fields.0 = value;
4297        self
4298    }
4299}
4300
4301impl<St, S: BosStr> ThreadViewPostBuilder<St, S>
4302where
4303    St: thread_view_post_state::State,
4304    St::Post: thread_view_post_state::IsUnset,
4305{
4306    /// Set the `post` field (required)
4307    pub fn post(
4308        mut self,
4309        value: impl Into<feed::PostView<S>>,
4310    ) -> ThreadViewPostBuilder<thread_view_post_state::SetPost<St>, S> {
4311        self._fields.1 = Option::Some(value.into());
4312        ThreadViewPostBuilder {
4313            _state: PhantomData,
4314            _fields: self._fields,
4315            _type: PhantomData,
4316        }
4317    }
4318}
4319
4320impl<St: thread_view_post_state::State, S: BosStr> ThreadViewPostBuilder<St, S> {
4321    /// Set the `replies` field (optional)
4322    pub fn replies(mut self, value: impl Into<Option<Vec<ThreadViewPostRepliesItem<S>>>>) -> Self {
4323        self._fields.2 = value.into();
4324        self
4325    }
4326    /// Set the `replies` field to an Option value (optional)
4327    pub fn maybe_replies(mut self, value: Option<Vec<ThreadViewPostRepliesItem<S>>>) -> Self {
4328        self._fields.2 = value;
4329        self
4330    }
4331}
4332
4333impl<St: thread_view_post_state::State, S: BosStr> ThreadViewPostBuilder<St, S> {
4334    /// Set the `threadContext` field (optional)
4335    pub fn thread_context(mut self, value: impl Into<Option<feed::ThreadContext<S>>>) -> Self {
4336        self._fields.3 = value.into();
4337        self
4338    }
4339    /// Set the `threadContext` field to an Option value (optional)
4340    pub fn maybe_thread_context(mut self, value: Option<feed::ThreadContext<S>>) -> Self {
4341        self._fields.3 = value;
4342        self
4343    }
4344}
4345
4346impl<St, S: BosStr> ThreadViewPostBuilder<St, S>
4347where
4348    St: thread_view_post_state::State,
4349    St::Post: thread_view_post_state::IsSet,
4350{
4351    /// Build the final struct.
4352    pub fn build(self) -> ThreadViewPost<S> {
4353        ThreadViewPost {
4354            parent: self._fields.0,
4355            post: self._fields.1.unwrap(),
4356            replies: self._fields.2,
4357            thread_context: self._fields.3,
4358            extra_data: Default::default(),
4359        }
4360    }
4361    /// Build the final struct with custom extra_data.
4362    pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> ThreadViewPost<S> {
4363        ThreadViewPost {
4364            parent: self._fields.0,
4365            post: self._fields.1.unwrap(),
4366            replies: self._fields.2,
4367            thread_context: self._fields.3,
4368            extra_data: Some(extra_data),
4369        }
4370    }
4371}