Skip to main content

jacquard_api/app_bsky/
unspecced.rs

1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: app.bsky.unspecced.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 get_age_assurance_state;
9pub mod get_config;
10pub mod get_onboarding_suggested_starter_packs;
11pub mod get_onboarding_suggested_starter_packs_skeleton;
12pub mod get_onboarding_suggested_users_skeleton;
13pub mod get_popular_feed_generators;
14pub mod get_post_thread_other_v2;
15pub mod get_post_thread_v2;
16pub mod get_suggested_feeds;
17pub mod get_suggested_feeds_skeleton;
18pub mod get_suggested_onboarding_users;
19pub mod get_suggested_starter_packs;
20pub mod get_suggested_starter_packs_skeleton;
21pub mod get_suggested_users;
22pub mod get_suggested_users_skeleton;
23pub mod get_suggestions_skeleton;
24pub mod get_tagged_suggestions;
25pub mod get_trending_topics;
26pub mod get_trends;
27pub mod get_trends_skeleton;
28pub mod init_age_assurance;
29pub mod search_actors_skeleton;
30pub mod search_posts_skeleton;
31pub mod search_starter_packs_skeleton;
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, Datetime};
44use jacquard_derive::{IntoStatic, lexicon};
45use jacquard_lexicon::lexicon::LexiconDoc;
46use jacquard_lexicon::schema::LexiconSchema;
47
48#[allow(unused_imports)]
49use jacquard_lexicon::validation::{ConstraintError, ValidationPath};
50use serde::{Serialize, Deserialize};
51use crate::app_bsky::actor::ProfileViewBasic;
52use crate::app_bsky::feed::BlockedAuthor;
53use crate::app_bsky::feed::PostView;
54/// Object used to store age assurance data in stash.
55
56#[lexicon]
57#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
58#[serde(rename_all = "camelCase")]
59pub struct AgeAssuranceEvent<'a> {
60    ///The unique identifier for this instance of the age assurance flow, in UUID format.
61    #[serde(borrow)]
62    pub attempt_id: CowStr<'a>,
63    ///The IP address used when completing the AA flow.
64    #[serde(skip_serializing_if = "Option::is_none")]
65    #[serde(borrow)]
66    pub complete_ip: Option<CowStr<'a>>,
67    ///The user agent used when completing the AA flow.
68    #[serde(skip_serializing_if = "Option::is_none")]
69    #[serde(borrow)]
70    pub complete_ua: Option<CowStr<'a>>,
71    ///The date and time of this write operation.
72    pub created_at: Datetime,
73    ///The email used for AA.
74    #[serde(skip_serializing_if = "Option::is_none")]
75    #[serde(borrow)]
76    pub email: Option<CowStr<'a>>,
77    ///The IP address used when initiating the AA flow.
78    #[serde(skip_serializing_if = "Option::is_none")]
79    #[serde(borrow)]
80    pub init_ip: Option<CowStr<'a>>,
81    ///The user agent used when initiating the AA flow.
82    #[serde(skip_serializing_if = "Option::is_none")]
83    #[serde(borrow)]
84    pub init_ua: Option<CowStr<'a>>,
85    ///The status of the age assurance process.
86    #[serde(borrow)]
87    pub status: AgeAssuranceEventStatus<'a>,
88}
89
90/// The status of the age assurance process.
91
92#[derive(Debug, Clone, PartialEq, Eq, Hash)]
93pub enum AgeAssuranceEventStatus<'a> {
94    Unknown,
95    Pending,
96    Assured,
97    Other(CowStr<'a>),
98}
99
100impl<'a> AgeAssuranceEventStatus<'a> {
101    pub fn as_str(&self) -> &str {
102        match self {
103            Self::Unknown => "unknown",
104            Self::Pending => "pending",
105            Self::Assured => "assured",
106            Self::Other(s) => s.as_ref(),
107        }
108    }
109}
110
111impl<'a> From<&'a str> for AgeAssuranceEventStatus<'a> {
112    fn from(s: &'a str) -> Self {
113        match s {
114            "unknown" => Self::Unknown,
115            "pending" => Self::Pending,
116            "assured" => Self::Assured,
117            _ => Self::Other(CowStr::from(s)),
118        }
119    }
120}
121
122impl<'a> From<String> for AgeAssuranceEventStatus<'a> {
123    fn from(s: String) -> Self {
124        match s.as_str() {
125            "unknown" => Self::Unknown,
126            "pending" => Self::Pending,
127            "assured" => Self::Assured,
128            _ => Self::Other(CowStr::from(s)),
129        }
130    }
131}
132
133impl<'a> core::fmt::Display for AgeAssuranceEventStatus<'a> {
134    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
135        write!(f, "{}", self.as_str())
136    }
137}
138
139impl<'a> AsRef<str> for AgeAssuranceEventStatus<'a> {
140    fn as_ref(&self) -> &str {
141        self.as_str()
142    }
143}
144
145impl<'a> serde::Serialize for AgeAssuranceEventStatus<'a> {
146    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
147    where
148        S: serde::Serializer,
149    {
150        serializer.serialize_str(self.as_str())
151    }
152}
153
154impl<'de, 'a> serde::Deserialize<'de> for AgeAssuranceEventStatus<'a>
155where
156    'de: 'a,
157{
158    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
159    where
160        D: serde::Deserializer<'de>,
161    {
162        let s = <&'de str>::deserialize(deserializer)?;
163        Ok(Self::from(s))
164    }
165}
166
167impl<'a> Default for AgeAssuranceEventStatus<'a> {
168    fn default() -> Self {
169        Self::Other(Default::default())
170    }
171}
172
173impl jacquard_common::IntoStatic for AgeAssuranceEventStatus<'_> {
174    type Output = AgeAssuranceEventStatus<'static>;
175    fn into_static(self) -> Self::Output {
176        match self {
177            AgeAssuranceEventStatus::Unknown => AgeAssuranceEventStatus::Unknown,
178            AgeAssuranceEventStatus::Pending => AgeAssuranceEventStatus::Pending,
179            AgeAssuranceEventStatus::Assured => AgeAssuranceEventStatus::Assured,
180            AgeAssuranceEventStatus::Other(v) => {
181                AgeAssuranceEventStatus::Other(v.into_static())
182            }
183        }
184    }
185}
186
187/// The computed state of the age assurance process, returned to the user in question on certain authenticated requests.
188
189#[lexicon]
190#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
191#[serde(rename_all = "camelCase")]
192pub struct AgeAssuranceState<'a> {
193    ///The timestamp when this state was last updated.
194    #[serde(skip_serializing_if = "Option::is_none")]
195    pub last_initiated_at: Option<Datetime>,
196    ///The status of the age assurance process.
197    #[serde(borrow)]
198    pub status: AgeAssuranceStateStatus<'a>,
199}
200
201/// The status of the age assurance process.
202
203#[derive(Debug, Clone, PartialEq, Eq, Hash)]
204pub enum AgeAssuranceStateStatus<'a> {
205    Unknown,
206    Pending,
207    Assured,
208    Blocked,
209    Other(CowStr<'a>),
210}
211
212impl<'a> AgeAssuranceStateStatus<'a> {
213    pub fn as_str(&self) -> &str {
214        match self {
215            Self::Unknown => "unknown",
216            Self::Pending => "pending",
217            Self::Assured => "assured",
218            Self::Blocked => "blocked",
219            Self::Other(s) => s.as_ref(),
220        }
221    }
222}
223
224impl<'a> From<&'a str> for AgeAssuranceStateStatus<'a> {
225    fn from(s: &'a str) -> Self {
226        match s {
227            "unknown" => Self::Unknown,
228            "pending" => Self::Pending,
229            "assured" => Self::Assured,
230            "blocked" => Self::Blocked,
231            _ => Self::Other(CowStr::from(s)),
232        }
233    }
234}
235
236impl<'a> From<String> for AgeAssuranceStateStatus<'a> {
237    fn from(s: String) -> Self {
238        match s.as_str() {
239            "unknown" => Self::Unknown,
240            "pending" => Self::Pending,
241            "assured" => Self::Assured,
242            "blocked" => Self::Blocked,
243            _ => Self::Other(CowStr::from(s)),
244        }
245    }
246}
247
248impl<'a> core::fmt::Display for AgeAssuranceStateStatus<'a> {
249    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
250        write!(f, "{}", self.as_str())
251    }
252}
253
254impl<'a> AsRef<str> for AgeAssuranceStateStatus<'a> {
255    fn as_ref(&self) -> &str {
256        self.as_str()
257    }
258}
259
260impl<'a> serde::Serialize for AgeAssuranceStateStatus<'a> {
261    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
262    where
263        S: serde::Serializer,
264    {
265        serializer.serialize_str(self.as_str())
266    }
267}
268
269impl<'de, 'a> serde::Deserialize<'de> for AgeAssuranceStateStatus<'a>
270where
271    'de: 'a,
272{
273    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
274    where
275        D: serde::Deserializer<'de>,
276    {
277        let s = <&'de str>::deserialize(deserializer)?;
278        Ok(Self::from(s))
279    }
280}
281
282impl<'a> Default for AgeAssuranceStateStatus<'a> {
283    fn default() -> Self {
284        Self::Other(Default::default())
285    }
286}
287
288impl jacquard_common::IntoStatic for AgeAssuranceStateStatus<'_> {
289    type Output = AgeAssuranceStateStatus<'static>;
290    fn into_static(self) -> Self::Output {
291        match self {
292            AgeAssuranceStateStatus::Unknown => AgeAssuranceStateStatus::Unknown,
293            AgeAssuranceStateStatus::Pending => AgeAssuranceStateStatus::Pending,
294            AgeAssuranceStateStatus::Assured => AgeAssuranceStateStatus::Assured,
295            AgeAssuranceStateStatus::Blocked => AgeAssuranceStateStatus::Blocked,
296            AgeAssuranceStateStatus::Other(v) => {
297                AgeAssuranceStateStatus::Other(v.into_static())
298            }
299        }
300    }
301}
302
303
304#[lexicon]
305#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
306#[serde(rename_all = "camelCase")]
307pub struct SkeletonSearchActor<'a> {
308    #[serde(borrow)]
309    pub did: Did<'a>,
310}
311
312
313#[lexicon]
314#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
315#[serde(rename_all = "camelCase")]
316pub struct SkeletonSearchPost<'a> {
317    #[serde(borrow)]
318    pub uri: AtUri<'a>,
319}
320
321
322#[lexicon]
323#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
324#[serde(rename_all = "camelCase")]
325pub struct SkeletonSearchStarterPack<'a> {
326    #[serde(borrow)]
327    pub uri: AtUri<'a>,
328}
329
330
331#[lexicon]
332#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
333#[serde(rename_all = "camelCase")]
334pub struct SkeletonTrend<'a> {
335    #[serde(skip_serializing_if = "Option::is_none")]
336    #[serde(borrow)]
337    pub category: Option<CowStr<'a>>,
338    #[serde(borrow)]
339    pub dids: Vec<Did<'a>>,
340    #[serde(borrow)]
341    pub display_name: CowStr<'a>,
342    #[serde(borrow)]
343    pub link: CowStr<'a>,
344    pub post_count: i64,
345    pub started_at: Datetime,
346    #[serde(skip_serializing_if = "Option::is_none")]
347    #[serde(borrow)]
348    pub status: Option<SkeletonTrendStatus<'a>>,
349    #[serde(borrow)]
350    pub topic: CowStr<'a>,
351}
352
353
354#[derive(Debug, Clone, PartialEq, Eq, Hash)]
355pub enum SkeletonTrendStatus<'a> {
356    Hot,
357    Other(CowStr<'a>),
358}
359
360impl<'a> SkeletonTrendStatus<'a> {
361    pub fn as_str(&self) -> &str {
362        match self {
363            Self::Hot => "hot",
364            Self::Other(s) => s.as_ref(),
365        }
366    }
367}
368
369impl<'a> From<&'a str> for SkeletonTrendStatus<'a> {
370    fn from(s: &'a str) -> Self {
371        match s {
372            "hot" => Self::Hot,
373            _ => Self::Other(CowStr::from(s)),
374        }
375    }
376}
377
378impl<'a> From<String> for SkeletonTrendStatus<'a> {
379    fn from(s: String) -> Self {
380        match s.as_str() {
381            "hot" => Self::Hot,
382            _ => Self::Other(CowStr::from(s)),
383        }
384    }
385}
386
387impl<'a> core::fmt::Display for SkeletonTrendStatus<'a> {
388    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
389        write!(f, "{}", self.as_str())
390    }
391}
392
393impl<'a> AsRef<str> for SkeletonTrendStatus<'a> {
394    fn as_ref(&self) -> &str {
395        self.as_str()
396    }
397}
398
399impl<'a> serde::Serialize for SkeletonTrendStatus<'a> {
400    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
401    where
402        S: serde::Serializer,
403    {
404        serializer.serialize_str(self.as_str())
405    }
406}
407
408impl<'de, 'a> serde::Deserialize<'de> for SkeletonTrendStatus<'a>
409where
410    'de: 'a,
411{
412    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
413    where
414        D: serde::Deserializer<'de>,
415    {
416        let s = <&'de str>::deserialize(deserializer)?;
417        Ok(Self::from(s))
418    }
419}
420
421impl<'a> Default for SkeletonTrendStatus<'a> {
422    fn default() -> Self {
423        Self::Other(Default::default())
424    }
425}
426
427impl jacquard_common::IntoStatic for SkeletonTrendStatus<'_> {
428    type Output = SkeletonTrendStatus<'static>;
429    fn into_static(self) -> Self::Output {
430        match self {
431            SkeletonTrendStatus::Hot => SkeletonTrendStatus::Hot,
432            SkeletonTrendStatus::Other(v) => SkeletonTrendStatus::Other(v.into_static()),
433        }
434    }
435}
436
437
438#[lexicon]
439#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
440#[serde(rename_all = "camelCase")]
441pub struct ThreadItemBlocked<'a> {
442    #[serde(borrow)]
443    pub author: BlockedAuthor<'a>,
444}
445
446
447#[lexicon]
448#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
449#[serde(rename_all = "camelCase")]
450pub struct ThreadItemNoUnauthenticated<'a> {}
451
452#[lexicon]
453#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
454#[serde(rename_all = "camelCase")]
455pub struct ThreadItemNotFound<'a> {}
456
457#[lexicon]
458#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
459#[serde(rename_all = "camelCase")]
460pub struct ThreadItemPost<'a> {
461    ///The threadgate created by the author indicates this post as a reply to be hidden for everyone consuming the thread.
462    pub hidden_by_threadgate: bool,
463    ///This post has more parents that were not present in the response. This is just a boolean, without the number of parents.
464    pub more_parents: bool,
465    ///This post has more replies that were not present in the response. This is a numeric value, which is best-effort and might not be accurate.
466    pub more_replies: i64,
467    ///This is by an account muted by the viewer requesting it.
468    pub muted_by_viewer: bool,
469    ///This post is part of a contiguous thread by the OP from the thread root. Many different OP threads can happen in the same thread.
470    pub op_thread: bool,
471    #[serde(borrow)]
472    pub post: PostView<'a>,
473}
474
475
476#[lexicon]
477#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
478#[serde(rename_all = "camelCase")]
479pub struct TrendView<'a> {
480    #[serde(borrow)]
481    pub actors: Vec<ProfileViewBasic<'a>>,
482    #[serde(skip_serializing_if = "Option::is_none")]
483    #[serde(borrow)]
484    pub category: Option<CowStr<'a>>,
485    #[serde(borrow)]
486    pub display_name: CowStr<'a>,
487    #[serde(borrow)]
488    pub link: CowStr<'a>,
489    pub post_count: i64,
490    pub started_at: Datetime,
491    #[serde(skip_serializing_if = "Option::is_none")]
492    #[serde(borrow)]
493    pub status: Option<TrendViewStatus<'a>>,
494    #[serde(borrow)]
495    pub topic: CowStr<'a>,
496}
497
498
499#[derive(Debug, Clone, PartialEq, Eq, Hash)]
500pub enum TrendViewStatus<'a> {
501    Hot,
502    Other(CowStr<'a>),
503}
504
505impl<'a> TrendViewStatus<'a> {
506    pub fn as_str(&self) -> &str {
507        match self {
508            Self::Hot => "hot",
509            Self::Other(s) => s.as_ref(),
510        }
511    }
512}
513
514impl<'a> From<&'a str> for TrendViewStatus<'a> {
515    fn from(s: &'a str) -> Self {
516        match s {
517            "hot" => Self::Hot,
518            _ => Self::Other(CowStr::from(s)),
519        }
520    }
521}
522
523impl<'a> From<String> for TrendViewStatus<'a> {
524    fn from(s: String) -> Self {
525        match s.as_str() {
526            "hot" => Self::Hot,
527            _ => Self::Other(CowStr::from(s)),
528        }
529    }
530}
531
532impl<'a> core::fmt::Display for TrendViewStatus<'a> {
533    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
534        write!(f, "{}", self.as_str())
535    }
536}
537
538impl<'a> AsRef<str> for TrendViewStatus<'a> {
539    fn as_ref(&self) -> &str {
540        self.as_str()
541    }
542}
543
544impl<'a> serde::Serialize for TrendViewStatus<'a> {
545    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
546    where
547        S: serde::Serializer,
548    {
549        serializer.serialize_str(self.as_str())
550    }
551}
552
553impl<'de, 'a> serde::Deserialize<'de> for TrendViewStatus<'a>
554where
555    'de: 'a,
556{
557    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
558    where
559        D: serde::Deserializer<'de>,
560    {
561        let s = <&'de str>::deserialize(deserializer)?;
562        Ok(Self::from(s))
563    }
564}
565
566impl<'a> Default for TrendViewStatus<'a> {
567    fn default() -> Self {
568        Self::Other(Default::default())
569    }
570}
571
572impl jacquard_common::IntoStatic for TrendViewStatus<'_> {
573    type Output = TrendViewStatus<'static>;
574    fn into_static(self) -> Self::Output {
575        match self {
576            TrendViewStatus::Hot => TrendViewStatus::Hot,
577            TrendViewStatus::Other(v) => TrendViewStatus::Other(v.into_static()),
578        }
579    }
580}
581
582
583#[lexicon]
584#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
585#[serde(rename_all = "camelCase")]
586pub struct TrendingTopic<'a> {
587    #[serde(skip_serializing_if = "Option::is_none")]
588    #[serde(borrow)]
589    pub description: Option<CowStr<'a>>,
590    #[serde(skip_serializing_if = "Option::is_none")]
591    #[serde(borrow)]
592    pub display_name: Option<CowStr<'a>>,
593    #[serde(borrow)]
594    pub link: CowStr<'a>,
595    #[serde(borrow)]
596    pub topic: CowStr<'a>,
597}
598
599impl<'a> LexiconSchema for AgeAssuranceEvent<'a> {
600    fn nsid() -> &'static str {
601        "app.bsky.unspecced.defs"
602    }
603    fn def_name() -> &'static str {
604        "ageAssuranceEvent"
605    }
606    fn lexicon_doc() -> LexiconDoc<'static> {
607        lexicon_doc_app_bsky_unspecced_defs()
608    }
609    fn validate(&self) -> Result<(), ConstraintError> {
610        Ok(())
611    }
612}
613
614impl<'a> LexiconSchema for AgeAssuranceState<'a> {
615    fn nsid() -> &'static str {
616        "app.bsky.unspecced.defs"
617    }
618    fn def_name() -> &'static str {
619        "ageAssuranceState"
620    }
621    fn lexicon_doc() -> LexiconDoc<'static> {
622        lexicon_doc_app_bsky_unspecced_defs()
623    }
624    fn validate(&self) -> Result<(), ConstraintError> {
625        Ok(())
626    }
627}
628
629impl<'a> LexiconSchema for SkeletonSearchActor<'a> {
630    fn nsid() -> &'static str {
631        "app.bsky.unspecced.defs"
632    }
633    fn def_name() -> &'static str {
634        "skeletonSearchActor"
635    }
636    fn lexicon_doc() -> LexiconDoc<'static> {
637        lexicon_doc_app_bsky_unspecced_defs()
638    }
639    fn validate(&self) -> Result<(), ConstraintError> {
640        Ok(())
641    }
642}
643
644impl<'a> LexiconSchema for SkeletonSearchPost<'a> {
645    fn nsid() -> &'static str {
646        "app.bsky.unspecced.defs"
647    }
648    fn def_name() -> &'static str {
649        "skeletonSearchPost"
650    }
651    fn lexicon_doc() -> LexiconDoc<'static> {
652        lexicon_doc_app_bsky_unspecced_defs()
653    }
654    fn validate(&self) -> Result<(), ConstraintError> {
655        Ok(())
656    }
657}
658
659impl<'a> LexiconSchema for SkeletonSearchStarterPack<'a> {
660    fn nsid() -> &'static str {
661        "app.bsky.unspecced.defs"
662    }
663    fn def_name() -> &'static str {
664        "skeletonSearchStarterPack"
665    }
666    fn lexicon_doc() -> LexiconDoc<'static> {
667        lexicon_doc_app_bsky_unspecced_defs()
668    }
669    fn validate(&self) -> Result<(), ConstraintError> {
670        Ok(())
671    }
672}
673
674impl<'a> LexiconSchema for SkeletonTrend<'a> {
675    fn nsid() -> &'static str {
676        "app.bsky.unspecced.defs"
677    }
678    fn def_name() -> &'static str {
679        "skeletonTrend"
680    }
681    fn lexicon_doc() -> LexiconDoc<'static> {
682        lexicon_doc_app_bsky_unspecced_defs()
683    }
684    fn validate(&self) -> Result<(), ConstraintError> {
685        Ok(())
686    }
687}
688
689impl<'a> LexiconSchema for ThreadItemBlocked<'a> {
690    fn nsid() -> &'static str {
691        "app.bsky.unspecced.defs"
692    }
693    fn def_name() -> &'static str {
694        "threadItemBlocked"
695    }
696    fn lexicon_doc() -> LexiconDoc<'static> {
697        lexicon_doc_app_bsky_unspecced_defs()
698    }
699    fn validate(&self) -> Result<(), ConstraintError> {
700        Ok(())
701    }
702}
703
704impl<'a> LexiconSchema for ThreadItemNoUnauthenticated<'a> {
705    fn nsid() -> &'static str {
706        "app.bsky.unspecced.defs"
707    }
708    fn def_name() -> &'static str {
709        "threadItemNoUnauthenticated"
710    }
711    fn lexicon_doc() -> LexiconDoc<'static> {
712        lexicon_doc_app_bsky_unspecced_defs()
713    }
714    fn validate(&self) -> Result<(), ConstraintError> {
715        Ok(())
716    }
717}
718
719impl<'a> LexiconSchema for ThreadItemNotFound<'a> {
720    fn nsid() -> &'static str {
721        "app.bsky.unspecced.defs"
722    }
723    fn def_name() -> &'static str {
724        "threadItemNotFound"
725    }
726    fn lexicon_doc() -> LexiconDoc<'static> {
727        lexicon_doc_app_bsky_unspecced_defs()
728    }
729    fn validate(&self) -> Result<(), ConstraintError> {
730        Ok(())
731    }
732}
733
734impl<'a> LexiconSchema for ThreadItemPost<'a> {
735    fn nsid() -> &'static str {
736        "app.bsky.unspecced.defs"
737    }
738    fn def_name() -> &'static str {
739        "threadItemPost"
740    }
741    fn lexicon_doc() -> LexiconDoc<'static> {
742        lexicon_doc_app_bsky_unspecced_defs()
743    }
744    fn validate(&self) -> Result<(), ConstraintError> {
745        Ok(())
746    }
747}
748
749impl<'a> LexiconSchema for TrendView<'a> {
750    fn nsid() -> &'static str {
751        "app.bsky.unspecced.defs"
752    }
753    fn def_name() -> &'static str {
754        "trendView"
755    }
756    fn lexicon_doc() -> LexiconDoc<'static> {
757        lexicon_doc_app_bsky_unspecced_defs()
758    }
759    fn validate(&self) -> Result<(), ConstraintError> {
760        Ok(())
761    }
762}
763
764impl<'a> LexiconSchema for TrendingTopic<'a> {
765    fn nsid() -> &'static str {
766        "app.bsky.unspecced.defs"
767    }
768    fn def_name() -> &'static str {
769        "trendingTopic"
770    }
771    fn lexicon_doc() -> LexiconDoc<'static> {
772        lexicon_doc_app_bsky_unspecced_defs()
773    }
774    fn validate(&self) -> Result<(), ConstraintError> {
775        Ok(())
776    }
777}
778
779pub mod age_assurance_event_state {
780
781    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
782    #[allow(unused)]
783    use ::core::marker::PhantomData;
784    mod sealed {
785        pub trait Sealed {}
786    }
787    /// State trait tracking which required fields have been set
788    pub trait State: sealed::Sealed {
789        type CreatedAt;
790        type Status;
791        type AttemptId;
792    }
793    /// Empty state - all required fields are unset
794    pub struct Empty(());
795    impl sealed::Sealed for Empty {}
796    impl State for Empty {
797        type CreatedAt = Unset;
798        type Status = Unset;
799        type AttemptId = Unset;
800    }
801    ///State transition - sets the `created_at` field to Set
802    pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
803    impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
804    impl<S: State> State for SetCreatedAt<S> {
805        type CreatedAt = Set<members::created_at>;
806        type Status = S::Status;
807        type AttemptId = S::AttemptId;
808    }
809    ///State transition - sets the `status` field to Set
810    pub struct SetStatus<S: State = Empty>(PhantomData<fn() -> S>);
811    impl<S: State> sealed::Sealed for SetStatus<S> {}
812    impl<S: State> State for SetStatus<S> {
813        type CreatedAt = S::CreatedAt;
814        type Status = Set<members::status>;
815        type AttemptId = S::AttemptId;
816    }
817    ///State transition - sets the `attempt_id` field to Set
818    pub struct SetAttemptId<S: State = Empty>(PhantomData<fn() -> S>);
819    impl<S: State> sealed::Sealed for SetAttemptId<S> {}
820    impl<S: State> State for SetAttemptId<S> {
821        type CreatedAt = S::CreatedAt;
822        type Status = S::Status;
823        type AttemptId = Set<members::attempt_id>;
824    }
825    /// Marker types for field names
826    #[allow(non_camel_case_types)]
827    pub mod members {
828        ///Marker type for the `created_at` field
829        pub struct created_at(());
830        ///Marker type for the `status` field
831        pub struct status(());
832        ///Marker type for the `attempt_id` field
833        pub struct attempt_id(());
834    }
835}
836
837/// Builder for constructing an instance of this type
838pub struct AgeAssuranceEventBuilder<'a, S: age_assurance_event_state::State> {
839    _state: PhantomData<fn() -> S>,
840    _fields: (
841        Option<CowStr<'a>>,
842        Option<CowStr<'a>>,
843        Option<CowStr<'a>>,
844        Option<Datetime>,
845        Option<CowStr<'a>>,
846        Option<CowStr<'a>>,
847        Option<CowStr<'a>>,
848        Option<AgeAssuranceEventStatus<'a>>,
849    ),
850    _lifetime: PhantomData<&'a ()>,
851}
852
853impl<'a> AgeAssuranceEvent<'a> {
854    /// Create a new builder for this type
855    pub fn new() -> AgeAssuranceEventBuilder<'a, age_assurance_event_state::Empty> {
856        AgeAssuranceEventBuilder::new()
857    }
858}
859
860impl<'a> AgeAssuranceEventBuilder<'a, age_assurance_event_state::Empty> {
861    /// Create a new builder with all fields unset
862    pub fn new() -> Self {
863        AgeAssuranceEventBuilder {
864            _state: PhantomData,
865            _fields: (None, None, None, None, None, None, None, None),
866            _lifetime: PhantomData,
867        }
868    }
869}
870
871impl<'a, S> AgeAssuranceEventBuilder<'a, S>
872where
873    S: age_assurance_event_state::State,
874    S::AttemptId: age_assurance_event_state::IsUnset,
875{
876    /// Set the `attemptId` field (required)
877    pub fn attempt_id(
878        mut self,
879        value: impl Into<CowStr<'a>>,
880    ) -> AgeAssuranceEventBuilder<'a, age_assurance_event_state::SetAttemptId<S>> {
881        self._fields.0 = Option::Some(value.into());
882        AgeAssuranceEventBuilder {
883            _state: PhantomData,
884            _fields: self._fields,
885            _lifetime: PhantomData,
886        }
887    }
888}
889
890impl<'a, S: age_assurance_event_state::State> AgeAssuranceEventBuilder<'a, S> {
891    /// Set the `completeIp` field (optional)
892    pub fn complete_ip(mut self, value: impl Into<Option<CowStr<'a>>>) -> Self {
893        self._fields.1 = value.into();
894        self
895    }
896    /// Set the `completeIp` field to an Option value (optional)
897    pub fn maybe_complete_ip(mut self, value: Option<CowStr<'a>>) -> Self {
898        self._fields.1 = value;
899        self
900    }
901}
902
903impl<'a, S: age_assurance_event_state::State> AgeAssuranceEventBuilder<'a, S> {
904    /// Set the `completeUa` field (optional)
905    pub fn complete_ua(mut self, value: impl Into<Option<CowStr<'a>>>) -> Self {
906        self._fields.2 = value.into();
907        self
908    }
909    /// Set the `completeUa` field to an Option value (optional)
910    pub fn maybe_complete_ua(mut self, value: Option<CowStr<'a>>) -> Self {
911        self._fields.2 = value;
912        self
913    }
914}
915
916impl<'a, S> AgeAssuranceEventBuilder<'a, S>
917where
918    S: age_assurance_event_state::State,
919    S::CreatedAt: age_assurance_event_state::IsUnset,
920{
921    /// Set the `createdAt` field (required)
922    pub fn created_at(
923        mut self,
924        value: impl Into<Datetime>,
925    ) -> AgeAssuranceEventBuilder<'a, age_assurance_event_state::SetCreatedAt<S>> {
926        self._fields.3 = Option::Some(value.into());
927        AgeAssuranceEventBuilder {
928            _state: PhantomData,
929            _fields: self._fields,
930            _lifetime: PhantomData,
931        }
932    }
933}
934
935impl<'a, S: age_assurance_event_state::State> AgeAssuranceEventBuilder<'a, S> {
936    /// Set the `email` field (optional)
937    pub fn email(mut self, value: impl Into<Option<CowStr<'a>>>) -> Self {
938        self._fields.4 = value.into();
939        self
940    }
941    /// Set the `email` field to an Option value (optional)
942    pub fn maybe_email(mut self, value: Option<CowStr<'a>>) -> Self {
943        self._fields.4 = value;
944        self
945    }
946}
947
948impl<'a, S: age_assurance_event_state::State> AgeAssuranceEventBuilder<'a, S> {
949    /// Set the `initIp` field (optional)
950    pub fn init_ip(mut self, value: impl Into<Option<CowStr<'a>>>) -> Self {
951        self._fields.5 = value.into();
952        self
953    }
954    /// Set the `initIp` field to an Option value (optional)
955    pub fn maybe_init_ip(mut self, value: Option<CowStr<'a>>) -> Self {
956        self._fields.5 = value;
957        self
958    }
959}
960
961impl<'a, S: age_assurance_event_state::State> AgeAssuranceEventBuilder<'a, S> {
962    /// Set the `initUa` field (optional)
963    pub fn init_ua(mut self, value: impl Into<Option<CowStr<'a>>>) -> Self {
964        self._fields.6 = value.into();
965        self
966    }
967    /// Set the `initUa` field to an Option value (optional)
968    pub fn maybe_init_ua(mut self, value: Option<CowStr<'a>>) -> Self {
969        self._fields.6 = value;
970        self
971    }
972}
973
974impl<'a, S> AgeAssuranceEventBuilder<'a, S>
975where
976    S: age_assurance_event_state::State,
977    S::Status: age_assurance_event_state::IsUnset,
978{
979    /// Set the `status` field (required)
980    pub fn status(
981        mut self,
982        value: impl Into<AgeAssuranceEventStatus<'a>>,
983    ) -> AgeAssuranceEventBuilder<'a, age_assurance_event_state::SetStatus<S>> {
984        self._fields.7 = Option::Some(value.into());
985        AgeAssuranceEventBuilder {
986            _state: PhantomData,
987            _fields: self._fields,
988            _lifetime: PhantomData,
989        }
990    }
991}
992
993impl<'a, S> AgeAssuranceEventBuilder<'a, S>
994where
995    S: age_assurance_event_state::State,
996    S::CreatedAt: age_assurance_event_state::IsSet,
997    S::Status: age_assurance_event_state::IsSet,
998    S::AttemptId: age_assurance_event_state::IsSet,
999{
1000    /// Build the final struct
1001    pub fn build(self) -> AgeAssuranceEvent<'a> {
1002        AgeAssuranceEvent {
1003            attempt_id: self._fields.0.unwrap(),
1004            complete_ip: self._fields.1,
1005            complete_ua: self._fields.2,
1006            created_at: self._fields.3.unwrap(),
1007            email: self._fields.4,
1008            init_ip: self._fields.5,
1009            init_ua: self._fields.6,
1010            status: self._fields.7.unwrap(),
1011            extra_data: Default::default(),
1012        }
1013    }
1014    /// Build the final struct with custom extra_data
1015    pub fn build_with_data(
1016        self,
1017        extra_data: BTreeMap<
1018            jacquard_common::deps::smol_str::SmolStr,
1019            jacquard_common::types::value::Data<'a>,
1020        >,
1021    ) -> AgeAssuranceEvent<'a> {
1022        AgeAssuranceEvent {
1023            attempt_id: self._fields.0.unwrap(),
1024            complete_ip: self._fields.1,
1025            complete_ua: self._fields.2,
1026            created_at: self._fields.3.unwrap(),
1027            email: self._fields.4,
1028            init_ip: self._fields.5,
1029            init_ua: self._fields.6,
1030            status: self._fields.7.unwrap(),
1031            extra_data: Some(extra_data),
1032        }
1033    }
1034}
1035
1036fn lexicon_doc_app_bsky_unspecced_defs() -> LexiconDoc<'static> {
1037    #[allow(unused_imports)]
1038    use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType};
1039    use jacquard_lexicon::lexicon::*;
1040    use alloc::collections::BTreeMap;
1041    LexiconDoc {
1042        lexicon: Lexicon::Lexicon1,
1043        id: CowStr::new_static("app.bsky.unspecced.defs"),
1044        defs: {
1045            let mut map = BTreeMap::new();
1046            map.insert(
1047                SmolStr::new_static("ageAssuranceEvent"),
1048                LexUserType::Object(LexObject {
1049                    description: Some(
1050                        CowStr::new_static(
1051                            "Object used to store age assurance data in stash.",
1052                        ),
1053                    ),
1054                    required: Some(
1055                        vec![
1056                            SmolStr::new_static("createdAt"),
1057                            SmolStr::new_static("status"),
1058                            SmolStr::new_static("attemptId")
1059                        ],
1060                    ),
1061                    properties: {
1062                        #[allow(unused_mut)]
1063                        let mut map = BTreeMap::new();
1064                        map.insert(
1065                            SmolStr::new_static("attemptId"),
1066                            LexObjectProperty::String(LexString {
1067                                description: Some(
1068                                    CowStr::new_static(
1069                                        "The unique identifier for this instance of the age assurance flow, in UUID format.",
1070                                    ),
1071                                ),
1072                                ..Default::default()
1073                            }),
1074                        );
1075                        map.insert(
1076                            SmolStr::new_static("completeIp"),
1077                            LexObjectProperty::String(LexString {
1078                                description: Some(
1079                                    CowStr::new_static(
1080                                        "The IP address used when completing the AA flow.",
1081                                    ),
1082                                ),
1083                                ..Default::default()
1084                            }),
1085                        );
1086                        map.insert(
1087                            SmolStr::new_static("completeUa"),
1088                            LexObjectProperty::String(LexString {
1089                                description: Some(
1090                                    CowStr::new_static(
1091                                        "The user agent used when completing the AA flow.",
1092                                    ),
1093                                ),
1094                                ..Default::default()
1095                            }),
1096                        );
1097                        map.insert(
1098                            SmolStr::new_static("createdAt"),
1099                            LexObjectProperty::String(LexString {
1100                                description: Some(
1101                                    CowStr::new_static(
1102                                        "The date and time of this write operation.",
1103                                    ),
1104                                ),
1105                                format: Some(LexStringFormat::Datetime),
1106                                ..Default::default()
1107                            }),
1108                        );
1109                        map.insert(
1110                            SmolStr::new_static("email"),
1111                            LexObjectProperty::String(LexString {
1112                                description: Some(
1113                                    CowStr::new_static("The email used for AA."),
1114                                ),
1115                                ..Default::default()
1116                            }),
1117                        );
1118                        map.insert(
1119                            SmolStr::new_static("initIp"),
1120                            LexObjectProperty::String(LexString {
1121                                description: Some(
1122                                    CowStr::new_static(
1123                                        "The IP address used when initiating the AA flow.",
1124                                    ),
1125                                ),
1126                                ..Default::default()
1127                            }),
1128                        );
1129                        map.insert(
1130                            SmolStr::new_static("initUa"),
1131                            LexObjectProperty::String(LexString {
1132                                description: Some(
1133                                    CowStr::new_static(
1134                                        "The user agent used when initiating the AA flow.",
1135                                    ),
1136                                ),
1137                                ..Default::default()
1138                            }),
1139                        );
1140                        map.insert(
1141                            SmolStr::new_static("status"),
1142                            LexObjectProperty::String(LexString {
1143                                description: Some(
1144                                    CowStr::new_static(
1145                                        "The status of the age assurance process.",
1146                                    ),
1147                                ),
1148                                ..Default::default()
1149                            }),
1150                        );
1151                        map
1152                    },
1153                    ..Default::default()
1154                }),
1155            );
1156            map.insert(
1157                SmolStr::new_static("ageAssuranceState"),
1158                LexUserType::Object(LexObject {
1159                    description: Some(
1160                        CowStr::new_static(
1161                            "The computed state of the age assurance process, returned to the user in question on certain authenticated requests.",
1162                        ),
1163                    ),
1164                    required: Some(vec![SmolStr::new_static("status")]),
1165                    properties: {
1166                        #[allow(unused_mut)]
1167                        let mut map = BTreeMap::new();
1168                        map.insert(
1169                            SmolStr::new_static("lastInitiatedAt"),
1170                            LexObjectProperty::String(LexString {
1171                                description: Some(
1172                                    CowStr::new_static(
1173                                        "The timestamp when this state was last updated.",
1174                                    ),
1175                                ),
1176                                format: Some(LexStringFormat::Datetime),
1177                                ..Default::default()
1178                            }),
1179                        );
1180                        map.insert(
1181                            SmolStr::new_static("status"),
1182                            LexObjectProperty::String(LexString {
1183                                description: Some(
1184                                    CowStr::new_static(
1185                                        "The status of the age assurance process.",
1186                                    ),
1187                                ),
1188                                ..Default::default()
1189                            }),
1190                        );
1191                        map
1192                    },
1193                    ..Default::default()
1194                }),
1195            );
1196            map.insert(
1197                SmolStr::new_static("skeletonSearchActor"),
1198                LexUserType::Object(LexObject {
1199                    required: Some(vec![SmolStr::new_static("did")]),
1200                    properties: {
1201                        #[allow(unused_mut)]
1202                        let mut map = BTreeMap::new();
1203                        map.insert(
1204                            SmolStr::new_static("did"),
1205                            LexObjectProperty::String(LexString {
1206                                format: Some(LexStringFormat::Did),
1207                                ..Default::default()
1208                            }),
1209                        );
1210                        map
1211                    },
1212                    ..Default::default()
1213                }),
1214            );
1215            map.insert(
1216                SmolStr::new_static("skeletonSearchPost"),
1217                LexUserType::Object(LexObject {
1218                    required: Some(vec![SmolStr::new_static("uri")]),
1219                    properties: {
1220                        #[allow(unused_mut)]
1221                        let mut map = BTreeMap::new();
1222                        map.insert(
1223                            SmolStr::new_static("uri"),
1224                            LexObjectProperty::String(LexString {
1225                                format: Some(LexStringFormat::AtUri),
1226                                ..Default::default()
1227                            }),
1228                        );
1229                        map
1230                    },
1231                    ..Default::default()
1232                }),
1233            );
1234            map.insert(
1235                SmolStr::new_static("skeletonSearchStarterPack"),
1236                LexUserType::Object(LexObject {
1237                    required: Some(vec![SmolStr::new_static("uri")]),
1238                    properties: {
1239                        #[allow(unused_mut)]
1240                        let mut map = BTreeMap::new();
1241                        map.insert(
1242                            SmolStr::new_static("uri"),
1243                            LexObjectProperty::String(LexString {
1244                                format: Some(LexStringFormat::AtUri),
1245                                ..Default::default()
1246                            }),
1247                        );
1248                        map
1249                    },
1250                    ..Default::default()
1251                }),
1252            );
1253            map.insert(
1254                SmolStr::new_static("skeletonTrend"),
1255                LexUserType::Object(LexObject {
1256                    required: Some(
1257                        vec![
1258                            SmolStr::new_static("topic"),
1259                            SmolStr::new_static("displayName"),
1260                            SmolStr::new_static("link"),
1261                            SmolStr::new_static("startedAt"),
1262                            SmolStr::new_static("postCount"), SmolStr::new_static("dids")
1263                        ],
1264                    ),
1265                    properties: {
1266                        #[allow(unused_mut)]
1267                        let mut map = BTreeMap::new();
1268                        map.insert(
1269                            SmolStr::new_static("category"),
1270                            LexObjectProperty::String(LexString { ..Default::default() }),
1271                        );
1272                        map.insert(
1273                            SmolStr::new_static("dids"),
1274                            LexObjectProperty::Array(LexArray {
1275                                items: LexArrayItem::String(LexString {
1276                                    format: Some(LexStringFormat::Did),
1277                                    ..Default::default()
1278                                }),
1279                                ..Default::default()
1280                            }),
1281                        );
1282                        map.insert(
1283                            SmolStr::new_static("displayName"),
1284                            LexObjectProperty::String(LexString { ..Default::default() }),
1285                        );
1286                        map.insert(
1287                            SmolStr::new_static("link"),
1288                            LexObjectProperty::String(LexString { ..Default::default() }),
1289                        );
1290                        map.insert(
1291                            SmolStr::new_static("postCount"),
1292                            LexObjectProperty::Integer(LexInteger {
1293                                ..Default::default()
1294                            }),
1295                        );
1296                        map.insert(
1297                            SmolStr::new_static("startedAt"),
1298                            LexObjectProperty::String(LexString {
1299                                format: Some(LexStringFormat::Datetime),
1300                                ..Default::default()
1301                            }),
1302                        );
1303                        map.insert(
1304                            SmolStr::new_static("status"),
1305                            LexObjectProperty::String(LexString { ..Default::default() }),
1306                        );
1307                        map.insert(
1308                            SmolStr::new_static("topic"),
1309                            LexObjectProperty::String(LexString { ..Default::default() }),
1310                        );
1311                        map
1312                    },
1313                    ..Default::default()
1314                }),
1315            );
1316            map.insert(
1317                SmolStr::new_static("threadItemBlocked"),
1318                LexUserType::Object(LexObject {
1319                    required: Some(vec![SmolStr::new_static("author")]),
1320                    properties: {
1321                        #[allow(unused_mut)]
1322                        let mut map = BTreeMap::new();
1323                        map.insert(
1324                            SmolStr::new_static("author"),
1325                            LexObjectProperty::Ref(LexRef {
1326                                r#ref: CowStr::new_static(
1327                                    "app.bsky.feed.defs#blockedAuthor",
1328                                ),
1329                                ..Default::default()
1330                            }),
1331                        );
1332                        map
1333                    },
1334                    ..Default::default()
1335                }),
1336            );
1337            map.insert(
1338                SmolStr::new_static("threadItemNoUnauthenticated"),
1339                LexUserType::Object(LexObject {
1340                    properties: {
1341                        #[allow(unused_mut)]
1342                        let mut map = BTreeMap::new();
1343                        map
1344                    },
1345                    ..Default::default()
1346                }),
1347            );
1348            map.insert(
1349                SmolStr::new_static("threadItemNotFound"),
1350                LexUserType::Object(LexObject {
1351                    properties: {
1352                        #[allow(unused_mut)]
1353                        let mut map = BTreeMap::new();
1354                        map
1355                    },
1356                    ..Default::default()
1357                }),
1358            );
1359            map.insert(
1360                SmolStr::new_static("threadItemPost"),
1361                LexUserType::Object(LexObject {
1362                    required: Some(
1363                        vec![
1364                            SmolStr::new_static("post"),
1365                            SmolStr::new_static("moreParents"),
1366                            SmolStr::new_static("moreReplies"),
1367                            SmolStr::new_static("opThread"),
1368                            SmolStr::new_static("hiddenByThreadgate"),
1369                            SmolStr::new_static("mutedByViewer")
1370                        ],
1371                    ),
1372                    properties: {
1373                        #[allow(unused_mut)]
1374                        let mut map = BTreeMap::new();
1375                        map.insert(
1376                            SmolStr::new_static("hiddenByThreadgate"),
1377                            LexObjectProperty::Boolean(LexBoolean {
1378                                ..Default::default()
1379                            }),
1380                        );
1381                        map.insert(
1382                            SmolStr::new_static("moreParents"),
1383                            LexObjectProperty::Boolean(LexBoolean {
1384                                ..Default::default()
1385                            }),
1386                        );
1387                        map.insert(
1388                            SmolStr::new_static("moreReplies"),
1389                            LexObjectProperty::Integer(LexInteger {
1390                                ..Default::default()
1391                            }),
1392                        );
1393                        map.insert(
1394                            SmolStr::new_static("mutedByViewer"),
1395                            LexObjectProperty::Boolean(LexBoolean {
1396                                ..Default::default()
1397                            }),
1398                        );
1399                        map.insert(
1400                            SmolStr::new_static("opThread"),
1401                            LexObjectProperty::Boolean(LexBoolean {
1402                                ..Default::default()
1403                            }),
1404                        );
1405                        map.insert(
1406                            SmolStr::new_static("post"),
1407                            LexObjectProperty::Ref(LexRef {
1408                                r#ref: CowStr::new_static("app.bsky.feed.defs#postView"),
1409                                ..Default::default()
1410                            }),
1411                        );
1412                        map
1413                    },
1414                    ..Default::default()
1415                }),
1416            );
1417            map.insert(
1418                SmolStr::new_static("trendView"),
1419                LexUserType::Object(LexObject {
1420                    required: Some(
1421                        vec![
1422                            SmolStr::new_static("topic"),
1423                            SmolStr::new_static("displayName"),
1424                            SmolStr::new_static("link"),
1425                            SmolStr::new_static("startedAt"),
1426                            SmolStr::new_static("postCount"),
1427                            SmolStr::new_static("actors")
1428                        ],
1429                    ),
1430                    properties: {
1431                        #[allow(unused_mut)]
1432                        let mut map = BTreeMap::new();
1433                        map.insert(
1434                            SmolStr::new_static("actors"),
1435                            LexObjectProperty::Array(LexArray {
1436                                items: LexArrayItem::Ref(LexRef {
1437                                    r#ref: CowStr::new_static(
1438                                        "app.bsky.actor.defs#profileViewBasic",
1439                                    ),
1440                                    ..Default::default()
1441                                }),
1442                                ..Default::default()
1443                            }),
1444                        );
1445                        map.insert(
1446                            SmolStr::new_static("category"),
1447                            LexObjectProperty::String(LexString { ..Default::default() }),
1448                        );
1449                        map.insert(
1450                            SmolStr::new_static("displayName"),
1451                            LexObjectProperty::String(LexString { ..Default::default() }),
1452                        );
1453                        map.insert(
1454                            SmolStr::new_static("link"),
1455                            LexObjectProperty::String(LexString { ..Default::default() }),
1456                        );
1457                        map.insert(
1458                            SmolStr::new_static("postCount"),
1459                            LexObjectProperty::Integer(LexInteger {
1460                                ..Default::default()
1461                            }),
1462                        );
1463                        map.insert(
1464                            SmolStr::new_static("startedAt"),
1465                            LexObjectProperty::String(LexString {
1466                                format: Some(LexStringFormat::Datetime),
1467                                ..Default::default()
1468                            }),
1469                        );
1470                        map.insert(
1471                            SmolStr::new_static("status"),
1472                            LexObjectProperty::String(LexString { ..Default::default() }),
1473                        );
1474                        map.insert(
1475                            SmolStr::new_static("topic"),
1476                            LexObjectProperty::String(LexString { ..Default::default() }),
1477                        );
1478                        map
1479                    },
1480                    ..Default::default()
1481                }),
1482            );
1483            map.insert(
1484                SmolStr::new_static("trendingTopic"),
1485                LexUserType::Object(LexObject {
1486                    required: Some(
1487                        vec![SmolStr::new_static("topic"), SmolStr::new_static("link")],
1488                    ),
1489                    properties: {
1490                        #[allow(unused_mut)]
1491                        let mut map = BTreeMap::new();
1492                        map.insert(
1493                            SmolStr::new_static("description"),
1494                            LexObjectProperty::String(LexString { ..Default::default() }),
1495                        );
1496                        map.insert(
1497                            SmolStr::new_static("displayName"),
1498                            LexObjectProperty::String(LexString { ..Default::default() }),
1499                        );
1500                        map.insert(
1501                            SmolStr::new_static("link"),
1502                            LexObjectProperty::String(LexString { ..Default::default() }),
1503                        );
1504                        map.insert(
1505                            SmolStr::new_static("topic"),
1506                            LexObjectProperty::String(LexString { ..Default::default() }),
1507                        );
1508                        map
1509                    },
1510                    ..Default::default()
1511                }),
1512            );
1513            map
1514        },
1515        ..Default::default()
1516    }
1517}
1518
1519pub mod skeleton_search_actor_state {
1520
1521    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
1522    #[allow(unused)]
1523    use ::core::marker::PhantomData;
1524    mod sealed {
1525        pub trait Sealed {}
1526    }
1527    /// State trait tracking which required fields have been set
1528    pub trait State: sealed::Sealed {
1529        type Did;
1530    }
1531    /// Empty state - all required fields are unset
1532    pub struct Empty(());
1533    impl sealed::Sealed for Empty {}
1534    impl State for Empty {
1535        type Did = Unset;
1536    }
1537    ///State transition - sets the `did` field to Set
1538    pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
1539    impl<S: State> sealed::Sealed for SetDid<S> {}
1540    impl<S: State> State for SetDid<S> {
1541        type Did = Set<members::did>;
1542    }
1543    /// Marker types for field names
1544    #[allow(non_camel_case_types)]
1545    pub mod members {
1546        ///Marker type for the `did` field
1547        pub struct did(());
1548    }
1549}
1550
1551/// Builder for constructing an instance of this type
1552pub struct SkeletonSearchActorBuilder<'a, S: skeleton_search_actor_state::State> {
1553    _state: PhantomData<fn() -> S>,
1554    _fields: (Option<Did<'a>>,),
1555    _lifetime: PhantomData<&'a ()>,
1556}
1557
1558impl<'a> SkeletonSearchActor<'a> {
1559    /// Create a new builder for this type
1560    pub fn new() -> SkeletonSearchActorBuilder<'a, skeleton_search_actor_state::Empty> {
1561        SkeletonSearchActorBuilder::new()
1562    }
1563}
1564
1565impl<'a> SkeletonSearchActorBuilder<'a, skeleton_search_actor_state::Empty> {
1566    /// Create a new builder with all fields unset
1567    pub fn new() -> Self {
1568        SkeletonSearchActorBuilder {
1569            _state: PhantomData,
1570            _fields: (None,),
1571            _lifetime: PhantomData,
1572        }
1573    }
1574}
1575
1576impl<'a, S> SkeletonSearchActorBuilder<'a, S>
1577where
1578    S: skeleton_search_actor_state::State,
1579    S::Did: skeleton_search_actor_state::IsUnset,
1580{
1581    /// Set the `did` field (required)
1582    pub fn did(
1583        mut self,
1584        value: impl Into<Did<'a>>,
1585    ) -> SkeletonSearchActorBuilder<'a, skeleton_search_actor_state::SetDid<S>> {
1586        self._fields.0 = Option::Some(value.into());
1587        SkeletonSearchActorBuilder {
1588            _state: PhantomData,
1589            _fields: self._fields,
1590            _lifetime: PhantomData,
1591        }
1592    }
1593}
1594
1595impl<'a, S> SkeletonSearchActorBuilder<'a, S>
1596where
1597    S: skeleton_search_actor_state::State,
1598    S::Did: skeleton_search_actor_state::IsSet,
1599{
1600    /// Build the final struct
1601    pub fn build(self) -> SkeletonSearchActor<'a> {
1602        SkeletonSearchActor {
1603            did: self._fields.0.unwrap(),
1604            extra_data: Default::default(),
1605        }
1606    }
1607    /// Build the final struct with custom extra_data
1608    pub fn build_with_data(
1609        self,
1610        extra_data: BTreeMap<
1611            jacquard_common::deps::smol_str::SmolStr,
1612            jacquard_common::types::value::Data<'a>,
1613        >,
1614    ) -> SkeletonSearchActor<'a> {
1615        SkeletonSearchActor {
1616            did: self._fields.0.unwrap(),
1617            extra_data: Some(extra_data),
1618        }
1619    }
1620}
1621
1622pub mod skeleton_search_post_state {
1623
1624    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
1625    #[allow(unused)]
1626    use ::core::marker::PhantomData;
1627    mod sealed {
1628        pub trait Sealed {}
1629    }
1630    /// State trait tracking which required fields have been set
1631    pub trait State: sealed::Sealed {
1632        type Uri;
1633    }
1634    /// Empty state - all required fields are unset
1635    pub struct Empty(());
1636    impl sealed::Sealed for Empty {}
1637    impl State for Empty {
1638        type Uri = Unset;
1639    }
1640    ///State transition - sets the `uri` field to Set
1641    pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
1642    impl<S: State> sealed::Sealed for SetUri<S> {}
1643    impl<S: State> State for SetUri<S> {
1644        type Uri = Set<members::uri>;
1645    }
1646    /// Marker types for field names
1647    #[allow(non_camel_case_types)]
1648    pub mod members {
1649        ///Marker type for the `uri` field
1650        pub struct uri(());
1651    }
1652}
1653
1654/// Builder for constructing an instance of this type
1655pub struct SkeletonSearchPostBuilder<'a, S: skeleton_search_post_state::State> {
1656    _state: PhantomData<fn() -> S>,
1657    _fields: (Option<AtUri<'a>>,),
1658    _lifetime: PhantomData<&'a ()>,
1659}
1660
1661impl<'a> SkeletonSearchPost<'a> {
1662    /// Create a new builder for this type
1663    pub fn new() -> SkeletonSearchPostBuilder<'a, skeleton_search_post_state::Empty> {
1664        SkeletonSearchPostBuilder::new()
1665    }
1666}
1667
1668impl<'a> SkeletonSearchPostBuilder<'a, skeleton_search_post_state::Empty> {
1669    /// Create a new builder with all fields unset
1670    pub fn new() -> Self {
1671        SkeletonSearchPostBuilder {
1672            _state: PhantomData,
1673            _fields: (None,),
1674            _lifetime: PhantomData,
1675        }
1676    }
1677}
1678
1679impl<'a, S> SkeletonSearchPostBuilder<'a, S>
1680where
1681    S: skeleton_search_post_state::State,
1682    S::Uri: skeleton_search_post_state::IsUnset,
1683{
1684    /// Set the `uri` field (required)
1685    pub fn uri(
1686        mut self,
1687        value: impl Into<AtUri<'a>>,
1688    ) -> SkeletonSearchPostBuilder<'a, skeleton_search_post_state::SetUri<S>> {
1689        self._fields.0 = Option::Some(value.into());
1690        SkeletonSearchPostBuilder {
1691            _state: PhantomData,
1692            _fields: self._fields,
1693            _lifetime: PhantomData,
1694        }
1695    }
1696}
1697
1698impl<'a, S> SkeletonSearchPostBuilder<'a, S>
1699where
1700    S: skeleton_search_post_state::State,
1701    S::Uri: skeleton_search_post_state::IsSet,
1702{
1703    /// Build the final struct
1704    pub fn build(self) -> SkeletonSearchPost<'a> {
1705        SkeletonSearchPost {
1706            uri: self._fields.0.unwrap(),
1707            extra_data: Default::default(),
1708        }
1709    }
1710    /// Build the final struct with custom extra_data
1711    pub fn build_with_data(
1712        self,
1713        extra_data: BTreeMap<
1714            jacquard_common::deps::smol_str::SmolStr,
1715            jacquard_common::types::value::Data<'a>,
1716        >,
1717    ) -> SkeletonSearchPost<'a> {
1718        SkeletonSearchPost {
1719            uri: self._fields.0.unwrap(),
1720            extra_data: Some(extra_data),
1721        }
1722    }
1723}
1724
1725pub mod skeleton_search_starter_pack_state {
1726
1727    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
1728    #[allow(unused)]
1729    use ::core::marker::PhantomData;
1730    mod sealed {
1731        pub trait Sealed {}
1732    }
1733    /// State trait tracking which required fields have been set
1734    pub trait State: sealed::Sealed {
1735        type Uri;
1736    }
1737    /// Empty state - all required fields are unset
1738    pub struct Empty(());
1739    impl sealed::Sealed for Empty {}
1740    impl State for Empty {
1741        type Uri = Unset;
1742    }
1743    ///State transition - sets the `uri` field to Set
1744    pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
1745    impl<S: State> sealed::Sealed for SetUri<S> {}
1746    impl<S: State> State for SetUri<S> {
1747        type Uri = Set<members::uri>;
1748    }
1749    /// Marker types for field names
1750    #[allow(non_camel_case_types)]
1751    pub mod members {
1752        ///Marker type for the `uri` field
1753        pub struct uri(());
1754    }
1755}
1756
1757/// Builder for constructing an instance of this type
1758pub struct SkeletonSearchStarterPackBuilder<
1759    'a,
1760    S: skeleton_search_starter_pack_state::State,
1761> {
1762    _state: PhantomData<fn() -> S>,
1763    _fields: (Option<AtUri<'a>>,),
1764    _lifetime: PhantomData<&'a ()>,
1765}
1766
1767impl<'a> SkeletonSearchStarterPack<'a> {
1768    /// Create a new builder for this type
1769    pub fn new() -> SkeletonSearchStarterPackBuilder<
1770        'a,
1771        skeleton_search_starter_pack_state::Empty,
1772    > {
1773        SkeletonSearchStarterPackBuilder::new()
1774    }
1775}
1776
1777impl<
1778    'a,
1779> SkeletonSearchStarterPackBuilder<'a, skeleton_search_starter_pack_state::Empty> {
1780    /// Create a new builder with all fields unset
1781    pub fn new() -> Self {
1782        SkeletonSearchStarterPackBuilder {
1783            _state: PhantomData,
1784            _fields: (None,),
1785            _lifetime: PhantomData,
1786        }
1787    }
1788}
1789
1790impl<'a, S> SkeletonSearchStarterPackBuilder<'a, S>
1791where
1792    S: skeleton_search_starter_pack_state::State,
1793    S::Uri: skeleton_search_starter_pack_state::IsUnset,
1794{
1795    /// Set the `uri` field (required)
1796    pub fn uri(
1797        mut self,
1798        value: impl Into<AtUri<'a>>,
1799    ) -> SkeletonSearchStarterPackBuilder<
1800        'a,
1801        skeleton_search_starter_pack_state::SetUri<S>,
1802    > {
1803        self._fields.0 = Option::Some(value.into());
1804        SkeletonSearchStarterPackBuilder {
1805            _state: PhantomData,
1806            _fields: self._fields,
1807            _lifetime: PhantomData,
1808        }
1809    }
1810}
1811
1812impl<'a, S> SkeletonSearchStarterPackBuilder<'a, S>
1813where
1814    S: skeleton_search_starter_pack_state::State,
1815    S::Uri: skeleton_search_starter_pack_state::IsSet,
1816{
1817    /// Build the final struct
1818    pub fn build(self) -> SkeletonSearchStarterPack<'a> {
1819        SkeletonSearchStarterPack {
1820            uri: self._fields.0.unwrap(),
1821            extra_data: Default::default(),
1822        }
1823    }
1824    /// Build the final struct with custom extra_data
1825    pub fn build_with_data(
1826        self,
1827        extra_data: BTreeMap<
1828            jacquard_common::deps::smol_str::SmolStr,
1829            jacquard_common::types::value::Data<'a>,
1830        >,
1831    ) -> SkeletonSearchStarterPack<'a> {
1832        SkeletonSearchStarterPack {
1833            uri: self._fields.0.unwrap(),
1834            extra_data: Some(extra_data),
1835        }
1836    }
1837}
1838
1839pub mod skeleton_trend_state {
1840
1841    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
1842    #[allow(unused)]
1843    use ::core::marker::PhantomData;
1844    mod sealed {
1845        pub trait Sealed {}
1846    }
1847    /// State trait tracking which required fields have been set
1848    pub trait State: sealed::Sealed {
1849        type DisplayName;
1850        type PostCount;
1851        type Link;
1852        type StartedAt;
1853        type Dids;
1854        type Topic;
1855    }
1856    /// Empty state - all required fields are unset
1857    pub struct Empty(());
1858    impl sealed::Sealed for Empty {}
1859    impl State for Empty {
1860        type DisplayName = Unset;
1861        type PostCount = Unset;
1862        type Link = Unset;
1863        type StartedAt = Unset;
1864        type Dids = Unset;
1865        type Topic = Unset;
1866    }
1867    ///State transition - sets the `display_name` field to Set
1868    pub struct SetDisplayName<S: State = Empty>(PhantomData<fn() -> S>);
1869    impl<S: State> sealed::Sealed for SetDisplayName<S> {}
1870    impl<S: State> State for SetDisplayName<S> {
1871        type DisplayName = Set<members::display_name>;
1872        type PostCount = S::PostCount;
1873        type Link = S::Link;
1874        type StartedAt = S::StartedAt;
1875        type Dids = S::Dids;
1876        type Topic = S::Topic;
1877    }
1878    ///State transition - sets the `post_count` field to Set
1879    pub struct SetPostCount<S: State = Empty>(PhantomData<fn() -> S>);
1880    impl<S: State> sealed::Sealed for SetPostCount<S> {}
1881    impl<S: State> State for SetPostCount<S> {
1882        type DisplayName = S::DisplayName;
1883        type PostCount = Set<members::post_count>;
1884        type Link = S::Link;
1885        type StartedAt = S::StartedAt;
1886        type Dids = S::Dids;
1887        type Topic = S::Topic;
1888    }
1889    ///State transition - sets the `link` field to Set
1890    pub struct SetLink<S: State = Empty>(PhantomData<fn() -> S>);
1891    impl<S: State> sealed::Sealed for SetLink<S> {}
1892    impl<S: State> State for SetLink<S> {
1893        type DisplayName = S::DisplayName;
1894        type PostCount = S::PostCount;
1895        type Link = Set<members::link>;
1896        type StartedAt = S::StartedAt;
1897        type Dids = S::Dids;
1898        type Topic = S::Topic;
1899    }
1900    ///State transition - sets the `started_at` field to Set
1901    pub struct SetStartedAt<S: State = Empty>(PhantomData<fn() -> S>);
1902    impl<S: State> sealed::Sealed for SetStartedAt<S> {}
1903    impl<S: State> State for SetStartedAt<S> {
1904        type DisplayName = S::DisplayName;
1905        type PostCount = S::PostCount;
1906        type Link = S::Link;
1907        type StartedAt = Set<members::started_at>;
1908        type Dids = S::Dids;
1909        type Topic = S::Topic;
1910    }
1911    ///State transition - sets the `dids` field to Set
1912    pub struct SetDids<S: State = Empty>(PhantomData<fn() -> S>);
1913    impl<S: State> sealed::Sealed for SetDids<S> {}
1914    impl<S: State> State for SetDids<S> {
1915        type DisplayName = S::DisplayName;
1916        type PostCount = S::PostCount;
1917        type Link = S::Link;
1918        type StartedAt = S::StartedAt;
1919        type Dids = Set<members::dids>;
1920        type Topic = S::Topic;
1921    }
1922    ///State transition - sets the `topic` field to Set
1923    pub struct SetTopic<S: State = Empty>(PhantomData<fn() -> S>);
1924    impl<S: State> sealed::Sealed for SetTopic<S> {}
1925    impl<S: State> State for SetTopic<S> {
1926        type DisplayName = S::DisplayName;
1927        type PostCount = S::PostCount;
1928        type Link = S::Link;
1929        type StartedAt = S::StartedAt;
1930        type Dids = S::Dids;
1931        type Topic = Set<members::topic>;
1932    }
1933    /// Marker types for field names
1934    #[allow(non_camel_case_types)]
1935    pub mod members {
1936        ///Marker type for the `display_name` field
1937        pub struct display_name(());
1938        ///Marker type for the `post_count` field
1939        pub struct post_count(());
1940        ///Marker type for the `link` field
1941        pub struct link(());
1942        ///Marker type for the `started_at` field
1943        pub struct started_at(());
1944        ///Marker type for the `dids` field
1945        pub struct dids(());
1946        ///Marker type for the `topic` field
1947        pub struct topic(());
1948    }
1949}
1950
1951/// Builder for constructing an instance of this type
1952pub struct SkeletonTrendBuilder<'a, S: skeleton_trend_state::State> {
1953    _state: PhantomData<fn() -> S>,
1954    _fields: (
1955        Option<CowStr<'a>>,
1956        Option<Vec<Did<'a>>>,
1957        Option<CowStr<'a>>,
1958        Option<CowStr<'a>>,
1959        Option<i64>,
1960        Option<Datetime>,
1961        Option<SkeletonTrendStatus<'a>>,
1962        Option<CowStr<'a>>,
1963    ),
1964    _lifetime: PhantomData<&'a ()>,
1965}
1966
1967impl<'a> SkeletonTrend<'a> {
1968    /// Create a new builder for this type
1969    pub fn new() -> SkeletonTrendBuilder<'a, skeleton_trend_state::Empty> {
1970        SkeletonTrendBuilder::new()
1971    }
1972}
1973
1974impl<'a> SkeletonTrendBuilder<'a, skeleton_trend_state::Empty> {
1975    /// Create a new builder with all fields unset
1976    pub fn new() -> Self {
1977        SkeletonTrendBuilder {
1978            _state: PhantomData,
1979            _fields: (None, None, None, None, None, None, None, None),
1980            _lifetime: PhantomData,
1981        }
1982    }
1983}
1984
1985impl<'a, S: skeleton_trend_state::State> SkeletonTrendBuilder<'a, S> {
1986    /// Set the `category` field (optional)
1987    pub fn category(mut self, value: impl Into<Option<CowStr<'a>>>) -> Self {
1988        self._fields.0 = value.into();
1989        self
1990    }
1991    /// Set the `category` field to an Option value (optional)
1992    pub fn maybe_category(mut self, value: Option<CowStr<'a>>) -> Self {
1993        self._fields.0 = value;
1994        self
1995    }
1996}
1997
1998impl<'a, S> SkeletonTrendBuilder<'a, S>
1999where
2000    S: skeleton_trend_state::State,
2001    S::Dids: skeleton_trend_state::IsUnset,
2002{
2003    /// Set the `dids` field (required)
2004    pub fn dids(
2005        mut self,
2006        value: impl Into<Vec<Did<'a>>>,
2007    ) -> SkeletonTrendBuilder<'a, skeleton_trend_state::SetDids<S>> {
2008        self._fields.1 = Option::Some(value.into());
2009        SkeletonTrendBuilder {
2010            _state: PhantomData,
2011            _fields: self._fields,
2012            _lifetime: PhantomData,
2013        }
2014    }
2015}
2016
2017impl<'a, S> SkeletonTrendBuilder<'a, S>
2018where
2019    S: skeleton_trend_state::State,
2020    S::DisplayName: skeleton_trend_state::IsUnset,
2021{
2022    /// Set the `displayName` field (required)
2023    pub fn display_name(
2024        mut self,
2025        value: impl Into<CowStr<'a>>,
2026    ) -> SkeletonTrendBuilder<'a, skeleton_trend_state::SetDisplayName<S>> {
2027        self._fields.2 = Option::Some(value.into());
2028        SkeletonTrendBuilder {
2029            _state: PhantomData,
2030            _fields: self._fields,
2031            _lifetime: PhantomData,
2032        }
2033    }
2034}
2035
2036impl<'a, S> SkeletonTrendBuilder<'a, S>
2037where
2038    S: skeleton_trend_state::State,
2039    S::Link: skeleton_trend_state::IsUnset,
2040{
2041    /// Set the `link` field (required)
2042    pub fn link(
2043        mut self,
2044        value: impl Into<CowStr<'a>>,
2045    ) -> SkeletonTrendBuilder<'a, skeleton_trend_state::SetLink<S>> {
2046        self._fields.3 = Option::Some(value.into());
2047        SkeletonTrendBuilder {
2048            _state: PhantomData,
2049            _fields: self._fields,
2050            _lifetime: PhantomData,
2051        }
2052    }
2053}
2054
2055impl<'a, S> SkeletonTrendBuilder<'a, S>
2056where
2057    S: skeleton_trend_state::State,
2058    S::PostCount: skeleton_trend_state::IsUnset,
2059{
2060    /// Set the `postCount` field (required)
2061    pub fn post_count(
2062        mut self,
2063        value: impl Into<i64>,
2064    ) -> SkeletonTrendBuilder<'a, skeleton_trend_state::SetPostCount<S>> {
2065        self._fields.4 = Option::Some(value.into());
2066        SkeletonTrendBuilder {
2067            _state: PhantomData,
2068            _fields: self._fields,
2069            _lifetime: PhantomData,
2070        }
2071    }
2072}
2073
2074impl<'a, S> SkeletonTrendBuilder<'a, S>
2075where
2076    S: skeleton_trend_state::State,
2077    S::StartedAt: skeleton_trend_state::IsUnset,
2078{
2079    /// Set the `startedAt` field (required)
2080    pub fn started_at(
2081        mut self,
2082        value: impl Into<Datetime>,
2083    ) -> SkeletonTrendBuilder<'a, skeleton_trend_state::SetStartedAt<S>> {
2084        self._fields.5 = Option::Some(value.into());
2085        SkeletonTrendBuilder {
2086            _state: PhantomData,
2087            _fields: self._fields,
2088            _lifetime: PhantomData,
2089        }
2090    }
2091}
2092
2093impl<'a, S: skeleton_trend_state::State> SkeletonTrendBuilder<'a, S> {
2094    /// Set the `status` field (optional)
2095    pub fn status(mut self, value: impl Into<Option<SkeletonTrendStatus<'a>>>) -> Self {
2096        self._fields.6 = value.into();
2097        self
2098    }
2099    /// Set the `status` field to an Option value (optional)
2100    pub fn maybe_status(mut self, value: Option<SkeletonTrendStatus<'a>>) -> Self {
2101        self._fields.6 = value;
2102        self
2103    }
2104}
2105
2106impl<'a, S> SkeletonTrendBuilder<'a, S>
2107where
2108    S: skeleton_trend_state::State,
2109    S::Topic: skeleton_trend_state::IsUnset,
2110{
2111    /// Set the `topic` field (required)
2112    pub fn topic(
2113        mut self,
2114        value: impl Into<CowStr<'a>>,
2115    ) -> SkeletonTrendBuilder<'a, skeleton_trend_state::SetTopic<S>> {
2116        self._fields.7 = Option::Some(value.into());
2117        SkeletonTrendBuilder {
2118            _state: PhantomData,
2119            _fields: self._fields,
2120            _lifetime: PhantomData,
2121        }
2122    }
2123}
2124
2125impl<'a, S> SkeletonTrendBuilder<'a, S>
2126where
2127    S: skeleton_trend_state::State,
2128    S::DisplayName: skeleton_trend_state::IsSet,
2129    S::PostCount: skeleton_trend_state::IsSet,
2130    S::Link: skeleton_trend_state::IsSet,
2131    S::StartedAt: skeleton_trend_state::IsSet,
2132    S::Dids: skeleton_trend_state::IsSet,
2133    S::Topic: skeleton_trend_state::IsSet,
2134{
2135    /// Build the final struct
2136    pub fn build(self) -> SkeletonTrend<'a> {
2137        SkeletonTrend {
2138            category: self._fields.0,
2139            dids: self._fields.1.unwrap(),
2140            display_name: self._fields.2.unwrap(),
2141            link: self._fields.3.unwrap(),
2142            post_count: self._fields.4.unwrap(),
2143            started_at: self._fields.5.unwrap(),
2144            status: self._fields.6,
2145            topic: self._fields.7.unwrap(),
2146            extra_data: Default::default(),
2147        }
2148    }
2149    /// Build the final struct with custom extra_data
2150    pub fn build_with_data(
2151        self,
2152        extra_data: BTreeMap<
2153            jacquard_common::deps::smol_str::SmolStr,
2154            jacquard_common::types::value::Data<'a>,
2155        >,
2156    ) -> SkeletonTrend<'a> {
2157        SkeletonTrend {
2158            category: self._fields.0,
2159            dids: self._fields.1.unwrap(),
2160            display_name: self._fields.2.unwrap(),
2161            link: self._fields.3.unwrap(),
2162            post_count: self._fields.4.unwrap(),
2163            started_at: self._fields.5.unwrap(),
2164            status: self._fields.6,
2165            topic: self._fields.7.unwrap(),
2166            extra_data: Some(extra_data),
2167        }
2168    }
2169}
2170
2171pub mod thread_item_blocked_state {
2172
2173    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
2174    #[allow(unused)]
2175    use ::core::marker::PhantomData;
2176    mod sealed {
2177        pub trait Sealed {}
2178    }
2179    /// State trait tracking which required fields have been set
2180    pub trait State: sealed::Sealed {
2181        type Author;
2182    }
2183    /// Empty state - all required fields are unset
2184    pub struct Empty(());
2185    impl sealed::Sealed for Empty {}
2186    impl State for Empty {
2187        type Author = Unset;
2188    }
2189    ///State transition - sets the `author` field to Set
2190    pub struct SetAuthor<S: State = Empty>(PhantomData<fn() -> S>);
2191    impl<S: State> sealed::Sealed for SetAuthor<S> {}
2192    impl<S: State> State for SetAuthor<S> {
2193        type Author = Set<members::author>;
2194    }
2195    /// Marker types for field names
2196    #[allow(non_camel_case_types)]
2197    pub mod members {
2198        ///Marker type for the `author` field
2199        pub struct author(());
2200    }
2201}
2202
2203/// Builder for constructing an instance of this type
2204pub struct ThreadItemBlockedBuilder<'a, S: thread_item_blocked_state::State> {
2205    _state: PhantomData<fn() -> S>,
2206    _fields: (Option<BlockedAuthor<'a>>,),
2207    _lifetime: PhantomData<&'a ()>,
2208}
2209
2210impl<'a> ThreadItemBlocked<'a> {
2211    /// Create a new builder for this type
2212    pub fn new() -> ThreadItemBlockedBuilder<'a, thread_item_blocked_state::Empty> {
2213        ThreadItemBlockedBuilder::new()
2214    }
2215}
2216
2217impl<'a> ThreadItemBlockedBuilder<'a, thread_item_blocked_state::Empty> {
2218    /// Create a new builder with all fields unset
2219    pub fn new() -> Self {
2220        ThreadItemBlockedBuilder {
2221            _state: PhantomData,
2222            _fields: (None,),
2223            _lifetime: PhantomData,
2224        }
2225    }
2226}
2227
2228impl<'a, S> ThreadItemBlockedBuilder<'a, S>
2229where
2230    S: thread_item_blocked_state::State,
2231    S::Author: thread_item_blocked_state::IsUnset,
2232{
2233    /// Set the `author` field (required)
2234    pub fn author(
2235        mut self,
2236        value: impl Into<BlockedAuthor<'a>>,
2237    ) -> ThreadItemBlockedBuilder<'a, thread_item_blocked_state::SetAuthor<S>> {
2238        self._fields.0 = Option::Some(value.into());
2239        ThreadItemBlockedBuilder {
2240            _state: PhantomData,
2241            _fields: self._fields,
2242            _lifetime: PhantomData,
2243        }
2244    }
2245}
2246
2247impl<'a, S> ThreadItemBlockedBuilder<'a, S>
2248where
2249    S: thread_item_blocked_state::State,
2250    S::Author: thread_item_blocked_state::IsSet,
2251{
2252    /// Build the final struct
2253    pub fn build(self) -> ThreadItemBlocked<'a> {
2254        ThreadItemBlocked {
2255            author: self._fields.0.unwrap(),
2256            extra_data: Default::default(),
2257        }
2258    }
2259    /// Build the final struct with custom extra_data
2260    pub fn build_with_data(
2261        self,
2262        extra_data: BTreeMap<
2263            jacquard_common::deps::smol_str::SmolStr,
2264            jacquard_common::types::value::Data<'a>,
2265        >,
2266    ) -> ThreadItemBlocked<'a> {
2267        ThreadItemBlocked {
2268            author: self._fields.0.unwrap(),
2269            extra_data: Some(extra_data),
2270        }
2271    }
2272}
2273
2274pub mod thread_item_post_state {
2275
2276    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
2277    #[allow(unused)]
2278    use ::core::marker::PhantomData;
2279    mod sealed {
2280        pub trait Sealed {}
2281    }
2282    /// State trait tracking which required fields have been set
2283    pub trait State: sealed::Sealed {
2284        type HiddenByThreadgate;
2285        type MoreParents;
2286        type MutedByViewer;
2287        type Post;
2288        type MoreReplies;
2289        type OpThread;
2290    }
2291    /// Empty state - all required fields are unset
2292    pub struct Empty(());
2293    impl sealed::Sealed for Empty {}
2294    impl State for Empty {
2295        type HiddenByThreadgate = Unset;
2296        type MoreParents = Unset;
2297        type MutedByViewer = Unset;
2298        type Post = Unset;
2299        type MoreReplies = Unset;
2300        type OpThread = Unset;
2301    }
2302    ///State transition - sets the `hidden_by_threadgate` field to Set
2303    pub struct SetHiddenByThreadgate<S: State = Empty>(PhantomData<fn() -> S>);
2304    impl<S: State> sealed::Sealed for SetHiddenByThreadgate<S> {}
2305    impl<S: State> State for SetHiddenByThreadgate<S> {
2306        type HiddenByThreadgate = Set<members::hidden_by_threadgate>;
2307        type MoreParents = S::MoreParents;
2308        type MutedByViewer = S::MutedByViewer;
2309        type Post = S::Post;
2310        type MoreReplies = S::MoreReplies;
2311        type OpThread = S::OpThread;
2312    }
2313    ///State transition - sets the `more_parents` field to Set
2314    pub struct SetMoreParents<S: State = Empty>(PhantomData<fn() -> S>);
2315    impl<S: State> sealed::Sealed for SetMoreParents<S> {}
2316    impl<S: State> State for SetMoreParents<S> {
2317        type HiddenByThreadgate = S::HiddenByThreadgate;
2318        type MoreParents = Set<members::more_parents>;
2319        type MutedByViewer = S::MutedByViewer;
2320        type Post = S::Post;
2321        type MoreReplies = S::MoreReplies;
2322        type OpThread = S::OpThread;
2323    }
2324    ///State transition - sets the `muted_by_viewer` field to Set
2325    pub struct SetMutedByViewer<S: State = Empty>(PhantomData<fn() -> S>);
2326    impl<S: State> sealed::Sealed for SetMutedByViewer<S> {}
2327    impl<S: State> State for SetMutedByViewer<S> {
2328        type HiddenByThreadgate = S::HiddenByThreadgate;
2329        type MoreParents = S::MoreParents;
2330        type MutedByViewer = Set<members::muted_by_viewer>;
2331        type Post = S::Post;
2332        type MoreReplies = S::MoreReplies;
2333        type OpThread = S::OpThread;
2334    }
2335    ///State transition - sets the `post` field to Set
2336    pub struct SetPost<S: State = Empty>(PhantomData<fn() -> S>);
2337    impl<S: State> sealed::Sealed for SetPost<S> {}
2338    impl<S: State> State for SetPost<S> {
2339        type HiddenByThreadgate = S::HiddenByThreadgate;
2340        type MoreParents = S::MoreParents;
2341        type MutedByViewer = S::MutedByViewer;
2342        type Post = Set<members::post>;
2343        type MoreReplies = S::MoreReplies;
2344        type OpThread = S::OpThread;
2345    }
2346    ///State transition - sets the `more_replies` field to Set
2347    pub struct SetMoreReplies<S: State = Empty>(PhantomData<fn() -> S>);
2348    impl<S: State> sealed::Sealed for SetMoreReplies<S> {}
2349    impl<S: State> State for SetMoreReplies<S> {
2350        type HiddenByThreadgate = S::HiddenByThreadgate;
2351        type MoreParents = S::MoreParents;
2352        type MutedByViewer = S::MutedByViewer;
2353        type Post = S::Post;
2354        type MoreReplies = Set<members::more_replies>;
2355        type OpThread = S::OpThread;
2356    }
2357    ///State transition - sets the `op_thread` field to Set
2358    pub struct SetOpThread<S: State = Empty>(PhantomData<fn() -> S>);
2359    impl<S: State> sealed::Sealed for SetOpThread<S> {}
2360    impl<S: State> State for SetOpThread<S> {
2361        type HiddenByThreadgate = S::HiddenByThreadgate;
2362        type MoreParents = S::MoreParents;
2363        type MutedByViewer = S::MutedByViewer;
2364        type Post = S::Post;
2365        type MoreReplies = S::MoreReplies;
2366        type OpThread = Set<members::op_thread>;
2367    }
2368    /// Marker types for field names
2369    #[allow(non_camel_case_types)]
2370    pub mod members {
2371        ///Marker type for the `hidden_by_threadgate` field
2372        pub struct hidden_by_threadgate(());
2373        ///Marker type for the `more_parents` field
2374        pub struct more_parents(());
2375        ///Marker type for the `muted_by_viewer` field
2376        pub struct muted_by_viewer(());
2377        ///Marker type for the `post` field
2378        pub struct post(());
2379        ///Marker type for the `more_replies` field
2380        pub struct more_replies(());
2381        ///Marker type for the `op_thread` field
2382        pub struct op_thread(());
2383    }
2384}
2385
2386/// Builder for constructing an instance of this type
2387pub struct ThreadItemPostBuilder<'a, S: thread_item_post_state::State> {
2388    _state: PhantomData<fn() -> S>,
2389    _fields: (
2390        Option<bool>,
2391        Option<bool>,
2392        Option<i64>,
2393        Option<bool>,
2394        Option<bool>,
2395        Option<PostView<'a>>,
2396    ),
2397    _lifetime: PhantomData<&'a ()>,
2398}
2399
2400impl<'a> ThreadItemPost<'a> {
2401    /// Create a new builder for this type
2402    pub fn new() -> ThreadItemPostBuilder<'a, thread_item_post_state::Empty> {
2403        ThreadItemPostBuilder::new()
2404    }
2405}
2406
2407impl<'a> ThreadItemPostBuilder<'a, thread_item_post_state::Empty> {
2408    /// Create a new builder with all fields unset
2409    pub fn new() -> Self {
2410        ThreadItemPostBuilder {
2411            _state: PhantomData,
2412            _fields: (None, None, None, None, None, None),
2413            _lifetime: PhantomData,
2414        }
2415    }
2416}
2417
2418impl<'a, S> ThreadItemPostBuilder<'a, S>
2419where
2420    S: thread_item_post_state::State,
2421    S::HiddenByThreadgate: thread_item_post_state::IsUnset,
2422{
2423    /// Set the `hiddenByThreadgate` field (required)
2424    pub fn hidden_by_threadgate(
2425        mut self,
2426        value: impl Into<bool>,
2427    ) -> ThreadItemPostBuilder<'a, thread_item_post_state::SetHiddenByThreadgate<S>> {
2428        self._fields.0 = Option::Some(value.into());
2429        ThreadItemPostBuilder {
2430            _state: PhantomData,
2431            _fields: self._fields,
2432            _lifetime: PhantomData,
2433        }
2434    }
2435}
2436
2437impl<'a, S> ThreadItemPostBuilder<'a, S>
2438where
2439    S: thread_item_post_state::State,
2440    S::MoreParents: thread_item_post_state::IsUnset,
2441{
2442    /// Set the `moreParents` field (required)
2443    pub fn more_parents(
2444        mut self,
2445        value: impl Into<bool>,
2446    ) -> ThreadItemPostBuilder<'a, thread_item_post_state::SetMoreParents<S>> {
2447        self._fields.1 = Option::Some(value.into());
2448        ThreadItemPostBuilder {
2449            _state: PhantomData,
2450            _fields: self._fields,
2451            _lifetime: PhantomData,
2452        }
2453    }
2454}
2455
2456impl<'a, S> ThreadItemPostBuilder<'a, S>
2457where
2458    S: thread_item_post_state::State,
2459    S::MoreReplies: thread_item_post_state::IsUnset,
2460{
2461    /// Set the `moreReplies` field (required)
2462    pub fn more_replies(
2463        mut self,
2464        value: impl Into<i64>,
2465    ) -> ThreadItemPostBuilder<'a, thread_item_post_state::SetMoreReplies<S>> {
2466        self._fields.2 = Option::Some(value.into());
2467        ThreadItemPostBuilder {
2468            _state: PhantomData,
2469            _fields: self._fields,
2470            _lifetime: PhantomData,
2471        }
2472    }
2473}
2474
2475impl<'a, S> ThreadItemPostBuilder<'a, S>
2476where
2477    S: thread_item_post_state::State,
2478    S::MutedByViewer: thread_item_post_state::IsUnset,
2479{
2480    /// Set the `mutedByViewer` field (required)
2481    pub fn muted_by_viewer(
2482        mut self,
2483        value: impl Into<bool>,
2484    ) -> ThreadItemPostBuilder<'a, thread_item_post_state::SetMutedByViewer<S>> {
2485        self._fields.3 = Option::Some(value.into());
2486        ThreadItemPostBuilder {
2487            _state: PhantomData,
2488            _fields: self._fields,
2489            _lifetime: PhantomData,
2490        }
2491    }
2492}
2493
2494impl<'a, S> ThreadItemPostBuilder<'a, S>
2495where
2496    S: thread_item_post_state::State,
2497    S::OpThread: thread_item_post_state::IsUnset,
2498{
2499    /// Set the `opThread` field (required)
2500    pub fn op_thread(
2501        mut self,
2502        value: impl Into<bool>,
2503    ) -> ThreadItemPostBuilder<'a, thread_item_post_state::SetOpThread<S>> {
2504        self._fields.4 = Option::Some(value.into());
2505        ThreadItemPostBuilder {
2506            _state: PhantomData,
2507            _fields: self._fields,
2508            _lifetime: PhantomData,
2509        }
2510    }
2511}
2512
2513impl<'a, S> ThreadItemPostBuilder<'a, S>
2514where
2515    S: thread_item_post_state::State,
2516    S::Post: thread_item_post_state::IsUnset,
2517{
2518    /// Set the `post` field (required)
2519    pub fn post(
2520        mut self,
2521        value: impl Into<PostView<'a>>,
2522    ) -> ThreadItemPostBuilder<'a, thread_item_post_state::SetPost<S>> {
2523        self._fields.5 = Option::Some(value.into());
2524        ThreadItemPostBuilder {
2525            _state: PhantomData,
2526            _fields: self._fields,
2527            _lifetime: PhantomData,
2528        }
2529    }
2530}
2531
2532impl<'a, S> ThreadItemPostBuilder<'a, S>
2533where
2534    S: thread_item_post_state::State,
2535    S::HiddenByThreadgate: thread_item_post_state::IsSet,
2536    S::MoreParents: thread_item_post_state::IsSet,
2537    S::MutedByViewer: thread_item_post_state::IsSet,
2538    S::Post: thread_item_post_state::IsSet,
2539    S::MoreReplies: thread_item_post_state::IsSet,
2540    S::OpThread: thread_item_post_state::IsSet,
2541{
2542    /// Build the final struct
2543    pub fn build(self) -> ThreadItemPost<'a> {
2544        ThreadItemPost {
2545            hidden_by_threadgate: self._fields.0.unwrap(),
2546            more_parents: self._fields.1.unwrap(),
2547            more_replies: self._fields.2.unwrap(),
2548            muted_by_viewer: self._fields.3.unwrap(),
2549            op_thread: self._fields.4.unwrap(),
2550            post: self._fields.5.unwrap(),
2551            extra_data: Default::default(),
2552        }
2553    }
2554    /// Build the final struct with custom extra_data
2555    pub fn build_with_data(
2556        self,
2557        extra_data: BTreeMap<
2558            jacquard_common::deps::smol_str::SmolStr,
2559            jacquard_common::types::value::Data<'a>,
2560        >,
2561    ) -> ThreadItemPost<'a> {
2562        ThreadItemPost {
2563            hidden_by_threadgate: self._fields.0.unwrap(),
2564            more_parents: self._fields.1.unwrap(),
2565            more_replies: self._fields.2.unwrap(),
2566            muted_by_viewer: self._fields.3.unwrap(),
2567            op_thread: self._fields.4.unwrap(),
2568            post: self._fields.5.unwrap(),
2569            extra_data: Some(extra_data),
2570        }
2571    }
2572}
2573
2574pub mod trend_view_state {
2575
2576    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
2577    #[allow(unused)]
2578    use ::core::marker::PhantomData;
2579    mod sealed {
2580        pub trait Sealed {}
2581    }
2582    /// State trait tracking which required fields have been set
2583    pub trait State: sealed::Sealed {
2584        type Link;
2585        type Actors;
2586        type StartedAt;
2587        type Topic;
2588        type DisplayName;
2589        type PostCount;
2590    }
2591    /// Empty state - all required fields are unset
2592    pub struct Empty(());
2593    impl sealed::Sealed for Empty {}
2594    impl State for Empty {
2595        type Link = Unset;
2596        type Actors = Unset;
2597        type StartedAt = Unset;
2598        type Topic = Unset;
2599        type DisplayName = Unset;
2600        type PostCount = Unset;
2601    }
2602    ///State transition - sets the `link` field to Set
2603    pub struct SetLink<S: State = Empty>(PhantomData<fn() -> S>);
2604    impl<S: State> sealed::Sealed for SetLink<S> {}
2605    impl<S: State> State for SetLink<S> {
2606        type Link = Set<members::link>;
2607        type Actors = S::Actors;
2608        type StartedAt = S::StartedAt;
2609        type Topic = S::Topic;
2610        type DisplayName = S::DisplayName;
2611        type PostCount = S::PostCount;
2612    }
2613    ///State transition - sets the `actors` field to Set
2614    pub struct SetActors<S: State = Empty>(PhantomData<fn() -> S>);
2615    impl<S: State> sealed::Sealed for SetActors<S> {}
2616    impl<S: State> State for SetActors<S> {
2617        type Link = S::Link;
2618        type Actors = Set<members::actors>;
2619        type StartedAt = S::StartedAt;
2620        type Topic = S::Topic;
2621        type DisplayName = S::DisplayName;
2622        type PostCount = S::PostCount;
2623    }
2624    ///State transition - sets the `started_at` field to Set
2625    pub struct SetStartedAt<S: State = Empty>(PhantomData<fn() -> S>);
2626    impl<S: State> sealed::Sealed for SetStartedAt<S> {}
2627    impl<S: State> State for SetStartedAt<S> {
2628        type Link = S::Link;
2629        type Actors = S::Actors;
2630        type StartedAt = Set<members::started_at>;
2631        type Topic = S::Topic;
2632        type DisplayName = S::DisplayName;
2633        type PostCount = S::PostCount;
2634    }
2635    ///State transition - sets the `topic` field to Set
2636    pub struct SetTopic<S: State = Empty>(PhantomData<fn() -> S>);
2637    impl<S: State> sealed::Sealed for SetTopic<S> {}
2638    impl<S: State> State for SetTopic<S> {
2639        type Link = S::Link;
2640        type Actors = S::Actors;
2641        type StartedAt = S::StartedAt;
2642        type Topic = Set<members::topic>;
2643        type DisplayName = S::DisplayName;
2644        type PostCount = S::PostCount;
2645    }
2646    ///State transition - sets the `display_name` field to Set
2647    pub struct SetDisplayName<S: State = Empty>(PhantomData<fn() -> S>);
2648    impl<S: State> sealed::Sealed for SetDisplayName<S> {}
2649    impl<S: State> State for SetDisplayName<S> {
2650        type Link = S::Link;
2651        type Actors = S::Actors;
2652        type StartedAt = S::StartedAt;
2653        type Topic = S::Topic;
2654        type DisplayName = Set<members::display_name>;
2655        type PostCount = S::PostCount;
2656    }
2657    ///State transition - sets the `post_count` field to Set
2658    pub struct SetPostCount<S: State = Empty>(PhantomData<fn() -> S>);
2659    impl<S: State> sealed::Sealed for SetPostCount<S> {}
2660    impl<S: State> State for SetPostCount<S> {
2661        type Link = S::Link;
2662        type Actors = S::Actors;
2663        type StartedAt = S::StartedAt;
2664        type Topic = S::Topic;
2665        type DisplayName = S::DisplayName;
2666        type PostCount = Set<members::post_count>;
2667    }
2668    /// Marker types for field names
2669    #[allow(non_camel_case_types)]
2670    pub mod members {
2671        ///Marker type for the `link` field
2672        pub struct link(());
2673        ///Marker type for the `actors` field
2674        pub struct actors(());
2675        ///Marker type for the `started_at` field
2676        pub struct started_at(());
2677        ///Marker type for the `topic` field
2678        pub struct topic(());
2679        ///Marker type for the `display_name` field
2680        pub struct display_name(());
2681        ///Marker type for the `post_count` field
2682        pub struct post_count(());
2683    }
2684}
2685
2686/// Builder for constructing an instance of this type
2687pub struct TrendViewBuilder<'a, S: trend_view_state::State> {
2688    _state: PhantomData<fn() -> S>,
2689    _fields: (
2690        Option<Vec<ProfileViewBasic<'a>>>,
2691        Option<CowStr<'a>>,
2692        Option<CowStr<'a>>,
2693        Option<CowStr<'a>>,
2694        Option<i64>,
2695        Option<Datetime>,
2696        Option<TrendViewStatus<'a>>,
2697        Option<CowStr<'a>>,
2698    ),
2699    _lifetime: PhantomData<&'a ()>,
2700}
2701
2702impl<'a> TrendView<'a> {
2703    /// Create a new builder for this type
2704    pub fn new() -> TrendViewBuilder<'a, trend_view_state::Empty> {
2705        TrendViewBuilder::new()
2706    }
2707}
2708
2709impl<'a> TrendViewBuilder<'a, trend_view_state::Empty> {
2710    /// Create a new builder with all fields unset
2711    pub fn new() -> Self {
2712        TrendViewBuilder {
2713            _state: PhantomData,
2714            _fields: (None, None, None, None, None, None, None, None),
2715            _lifetime: PhantomData,
2716        }
2717    }
2718}
2719
2720impl<'a, S> TrendViewBuilder<'a, S>
2721where
2722    S: trend_view_state::State,
2723    S::Actors: trend_view_state::IsUnset,
2724{
2725    /// Set the `actors` field (required)
2726    pub fn actors(
2727        mut self,
2728        value: impl Into<Vec<ProfileViewBasic<'a>>>,
2729    ) -> TrendViewBuilder<'a, trend_view_state::SetActors<S>> {
2730        self._fields.0 = Option::Some(value.into());
2731        TrendViewBuilder {
2732            _state: PhantomData,
2733            _fields: self._fields,
2734            _lifetime: PhantomData,
2735        }
2736    }
2737}
2738
2739impl<'a, S: trend_view_state::State> TrendViewBuilder<'a, S> {
2740    /// Set the `category` field (optional)
2741    pub fn category(mut self, value: impl Into<Option<CowStr<'a>>>) -> Self {
2742        self._fields.1 = value.into();
2743        self
2744    }
2745    /// Set the `category` field to an Option value (optional)
2746    pub fn maybe_category(mut self, value: Option<CowStr<'a>>) -> Self {
2747        self._fields.1 = value;
2748        self
2749    }
2750}
2751
2752impl<'a, S> TrendViewBuilder<'a, S>
2753where
2754    S: trend_view_state::State,
2755    S::DisplayName: trend_view_state::IsUnset,
2756{
2757    /// Set the `displayName` field (required)
2758    pub fn display_name(
2759        mut self,
2760        value: impl Into<CowStr<'a>>,
2761    ) -> TrendViewBuilder<'a, trend_view_state::SetDisplayName<S>> {
2762        self._fields.2 = Option::Some(value.into());
2763        TrendViewBuilder {
2764            _state: PhantomData,
2765            _fields: self._fields,
2766            _lifetime: PhantomData,
2767        }
2768    }
2769}
2770
2771impl<'a, S> TrendViewBuilder<'a, S>
2772where
2773    S: trend_view_state::State,
2774    S::Link: trend_view_state::IsUnset,
2775{
2776    /// Set the `link` field (required)
2777    pub fn link(
2778        mut self,
2779        value: impl Into<CowStr<'a>>,
2780    ) -> TrendViewBuilder<'a, trend_view_state::SetLink<S>> {
2781        self._fields.3 = Option::Some(value.into());
2782        TrendViewBuilder {
2783            _state: PhantomData,
2784            _fields: self._fields,
2785            _lifetime: PhantomData,
2786        }
2787    }
2788}
2789
2790impl<'a, S> TrendViewBuilder<'a, S>
2791where
2792    S: trend_view_state::State,
2793    S::PostCount: trend_view_state::IsUnset,
2794{
2795    /// Set the `postCount` field (required)
2796    pub fn post_count(
2797        mut self,
2798        value: impl Into<i64>,
2799    ) -> TrendViewBuilder<'a, trend_view_state::SetPostCount<S>> {
2800        self._fields.4 = Option::Some(value.into());
2801        TrendViewBuilder {
2802            _state: PhantomData,
2803            _fields: self._fields,
2804            _lifetime: PhantomData,
2805        }
2806    }
2807}
2808
2809impl<'a, S> TrendViewBuilder<'a, S>
2810where
2811    S: trend_view_state::State,
2812    S::StartedAt: trend_view_state::IsUnset,
2813{
2814    /// Set the `startedAt` field (required)
2815    pub fn started_at(
2816        mut self,
2817        value: impl Into<Datetime>,
2818    ) -> TrendViewBuilder<'a, trend_view_state::SetStartedAt<S>> {
2819        self._fields.5 = Option::Some(value.into());
2820        TrendViewBuilder {
2821            _state: PhantomData,
2822            _fields: self._fields,
2823            _lifetime: PhantomData,
2824        }
2825    }
2826}
2827
2828impl<'a, S: trend_view_state::State> TrendViewBuilder<'a, S> {
2829    /// Set the `status` field (optional)
2830    pub fn status(mut self, value: impl Into<Option<TrendViewStatus<'a>>>) -> Self {
2831        self._fields.6 = value.into();
2832        self
2833    }
2834    /// Set the `status` field to an Option value (optional)
2835    pub fn maybe_status(mut self, value: Option<TrendViewStatus<'a>>) -> Self {
2836        self._fields.6 = value;
2837        self
2838    }
2839}
2840
2841impl<'a, S> TrendViewBuilder<'a, S>
2842where
2843    S: trend_view_state::State,
2844    S::Topic: trend_view_state::IsUnset,
2845{
2846    /// Set the `topic` field (required)
2847    pub fn topic(
2848        mut self,
2849        value: impl Into<CowStr<'a>>,
2850    ) -> TrendViewBuilder<'a, trend_view_state::SetTopic<S>> {
2851        self._fields.7 = Option::Some(value.into());
2852        TrendViewBuilder {
2853            _state: PhantomData,
2854            _fields: self._fields,
2855            _lifetime: PhantomData,
2856        }
2857    }
2858}
2859
2860impl<'a, S> TrendViewBuilder<'a, S>
2861where
2862    S: trend_view_state::State,
2863    S::Link: trend_view_state::IsSet,
2864    S::Actors: trend_view_state::IsSet,
2865    S::StartedAt: trend_view_state::IsSet,
2866    S::Topic: trend_view_state::IsSet,
2867    S::DisplayName: trend_view_state::IsSet,
2868    S::PostCount: trend_view_state::IsSet,
2869{
2870    /// Build the final struct
2871    pub fn build(self) -> TrendView<'a> {
2872        TrendView {
2873            actors: self._fields.0.unwrap(),
2874            category: self._fields.1,
2875            display_name: self._fields.2.unwrap(),
2876            link: self._fields.3.unwrap(),
2877            post_count: self._fields.4.unwrap(),
2878            started_at: self._fields.5.unwrap(),
2879            status: self._fields.6,
2880            topic: self._fields.7.unwrap(),
2881            extra_data: Default::default(),
2882        }
2883    }
2884    /// Build the final struct with custom extra_data
2885    pub fn build_with_data(
2886        self,
2887        extra_data: BTreeMap<
2888            jacquard_common::deps::smol_str::SmolStr,
2889            jacquard_common::types::value::Data<'a>,
2890        >,
2891    ) -> TrendView<'a> {
2892        TrendView {
2893            actors: self._fields.0.unwrap(),
2894            category: self._fields.1,
2895            display_name: self._fields.2.unwrap(),
2896            link: self._fields.3.unwrap(),
2897            post_count: self._fields.4.unwrap(),
2898            started_at: self._fields.5.unwrap(),
2899            status: self._fields.6,
2900            topic: self._fields.7.unwrap(),
2901            extra_data: Some(extra_data),
2902        }
2903    }
2904}