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