Skip to main content

jacquard_api/chat_bsky/
group.rs

1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: chat.bsky.group.defs
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8//! Generated bindings for the `chat.bsky.group` Lexicon namespace/module.
9pub mod add_members;
10pub mod approve_join_request;
11pub mod create_group;
12pub mod create_join_link;
13pub mod disable_join_link;
14pub mod edit_group;
15pub mod edit_join_link;
16pub mod enable_join_link;
17pub mod get_join_link_previews;
18pub mod list_join_requests;
19pub mod list_mutual_groups;
20pub mod reject_join_request;
21pub mod remove_members;
22pub mod request_join;
23pub mod update_join_requests_read;
24pub mod withdraw_join_request;
25
26
27#[allow(unused_imports)]
28use alloc::collections::BTreeMap;
29
30#[allow(unused_imports)]
31use core::marker::PhantomData;
32use jacquard_common::{CowStr, BosStr, DefaultStr, FromStaticStr};
33
34#[allow(unused_imports)]
35use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation;
36use jacquard_common::deps::smol_str::SmolStr;
37use jacquard_common::types::string::Datetime;
38use jacquard_common::types::value::Data;
39use jacquard_derive::IntoStatic;
40use jacquard_lexicon::lexicon::LexiconDoc;
41use jacquard_lexicon::schema::LexiconSchema;
42
43#[allow(unused_imports)]
44use jacquard_lexicon::validation::{ConstraintError, ValidationPath};
45use serde::{Serialize, Deserialize};
46use crate::chat_bsky::actor::ProfileViewBasic;
47use crate::chat_bsky::convo::ConvoView;
48use crate::chat_bsky::group;
49/// Preview for a disabled join link. Carries only the code so clients can correlate with the input and render a disabled state.
50
51#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
52#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
53pub struct DisabledJoinLinkPreviewView<S: BosStr = DefaultStr> {
54    pub code: S,
55    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
56    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
57}
58
59/// Preview for a join link code that does not map to an existing link. Carries only the code so clients can correlate with the input and render an invalid state.
60
61#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
62#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
63pub struct InvalidJoinLinkPreviewView<S: BosStr = DefaultStr> {
64    pub code: S,
65    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
66    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
67}
68
69/// Preview that can be shown in feeds, including to unauthenticated viewers.
70
71#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
72#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
73pub struct JoinLinkPreviewView<S: BosStr = DefaultStr> {
74    pub code: S,
75    ///Present only if the request is authenticated and the user is a member of the group.
76    #[serde(skip_serializing_if = "Option::is_none")]
77    pub convo: Option<ConvoView<S>>,
78    pub convo_id: S,
79    pub join_rule: group::JoinRule<S>,
80    pub member_count: i64,
81    pub member_limit: i64,
82    pub name: S,
83    pub owner: ProfileViewBasic<S>,
84    pub require_approval: bool,
85    #[serde(skip_serializing_if = "Option::is_none")]
86    pub viewer: Option<group::JoinLinkViewerState<S>>,
87    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
88    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
89}
90
91/// Join link view to be used within a group view, so the convo is surrounding, not specified inside this view.
92
93#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
94#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
95pub struct JoinLinkView<S: BosStr = DefaultStr> {
96    pub code: S,
97    pub created_at: Datetime,
98    pub enabled_status: group::LinkEnabledStatus<S>,
99    pub join_rule: group::JoinRule<S>,
100    pub require_approval: bool,
101    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
102    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
103}
104
105
106#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
107#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
108pub struct JoinLinkViewerState<S: BosStr = DefaultStr> {
109    #[serde(skip_serializing_if = "Option::is_none")]
110    pub requested_at: Option<Datetime>,
111    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
112    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
113}
114
115/// A join request from the perspective of the requester, including enough group context to render the request in a list (e.g. group name, owner, member count).
116
117#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
118#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
119pub struct JoinRequestConvoView<S: BosStr = DefaultStr> {
120    pub convo_id: S,
121    pub member_count: i64,
122    pub member_limit: i64,
123    pub name: S,
124    pub owner: ProfileViewBasic<S>,
125    pub viewer: group::JoinLinkViewerState<S>,
126    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
127    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
128}
129
130/// A join request from the perspective of the group owner.
131
132#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
133#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
134pub struct JoinRequestView<S: BosStr = DefaultStr> {
135    pub convo_id: S,
136    pub requested_at: Datetime,
137    pub requested_by: ProfileViewBasic<S>,
138    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
139    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
140}
141
142
143#[derive(Debug, Clone, PartialEq, Eq, Hash)]
144pub enum JoinRule<S: BosStr = DefaultStr> {
145    Anyone,
146    FollowedByOwner,
147    Other(S),
148}
149
150impl<S: BosStr> JoinRule<S> {
151    pub fn as_str(&self) -> &str {
152        match self {
153            Self::Anyone => "anyone",
154            Self::FollowedByOwner => "followedByOwner",
155            Self::Other(s) => s.as_ref(),
156        }
157    }
158    /// Construct from a string-like value, matching known values.
159    pub fn from_value(s: S) -> Self {
160        match s.as_ref() {
161            "anyone" => Self::Anyone,
162            "followedByOwner" => Self::FollowedByOwner,
163            _ => Self::Other(s),
164        }
165    }
166}
167
168impl<S: BosStr> AsRef<str> for JoinRule<S> {
169    fn as_ref(&self) -> &str {
170        self.as_str()
171    }
172}
173
174impl<S: BosStr> core::fmt::Display for JoinRule<S> {
175    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
176        write!(f, "{}", self.as_str())
177    }
178}
179
180impl<S: BosStr> Serialize for JoinRule<S> {
181    fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
182    where
183        Ser: serde::Serializer,
184    {
185        serializer.serialize_str(self.as_str())
186    }
187}
188
189impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for JoinRule<S> {
190    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
191    where
192        D: serde::Deserializer<'de>,
193    {
194        let s = S::deserialize(deserializer)?;
195        Ok(Self::from_value(s))
196    }
197}
198
199impl<S: BosStr> jacquard_common::IntoStatic for JoinRule<S>
200where
201    S: BosStr + jacquard_common::IntoStatic,
202    S::Output: BosStr,
203{
204    type Output = JoinRule<S::Output>;
205    fn into_static(self) -> Self::Output {
206        match self {
207            JoinRule::Anyone => JoinRule::Anyone,
208            JoinRule::FollowedByOwner => JoinRule::FollowedByOwner,
209            JoinRule::Other(v) => JoinRule::Other(v.into_static()),
210        }
211    }
212}
213
214
215#[derive(Debug, Clone, PartialEq, Eq, Hash)]
216pub enum LinkEnabledStatus<S: BosStr = DefaultStr> {
217    Enabled,
218    Disabled,
219    Other(S),
220}
221
222impl<S: BosStr> LinkEnabledStatus<S> {
223    pub fn as_str(&self) -> &str {
224        match self {
225            Self::Enabled => "enabled",
226            Self::Disabled => "disabled",
227            Self::Other(s) => s.as_ref(),
228        }
229    }
230    /// Construct from a string-like value, matching known values.
231    pub fn from_value(s: S) -> Self {
232        match s.as_ref() {
233            "enabled" => Self::Enabled,
234            "disabled" => Self::Disabled,
235            _ => Self::Other(s),
236        }
237    }
238}
239
240impl<S: BosStr> AsRef<str> for LinkEnabledStatus<S> {
241    fn as_ref(&self) -> &str {
242        self.as_str()
243    }
244}
245
246impl<S: BosStr> core::fmt::Display for LinkEnabledStatus<S> {
247    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
248        write!(f, "{}", self.as_str())
249    }
250}
251
252impl<S: BosStr> Serialize for LinkEnabledStatus<S> {
253    fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
254    where
255        Ser: serde::Serializer,
256    {
257        serializer.serialize_str(self.as_str())
258    }
259}
260
261impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for LinkEnabledStatus<S> {
262    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
263    where
264        D: serde::Deserializer<'de>,
265    {
266        let s = S::deserialize(deserializer)?;
267        Ok(Self::from_value(s))
268    }
269}
270
271impl<S: BosStr> jacquard_common::IntoStatic for LinkEnabledStatus<S>
272where
273    S: BosStr + jacquard_common::IntoStatic,
274    S::Output: BosStr,
275{
276    type Output = LinkEnabledStatus<S::Output>;
277    fn into_static(self) -> Self::Output {
278        match self {
279            LinkEnabledStatus::Enabled => LinkEnabledStatus::Enabled,
280            LinkEnabledStatus::Disabled => LinkEnabledStatus::Disabled,
281            LinkEnabledStatus::Other(v) => LinkEnabledStatus::Other(v.into_static()),
282        }
283    }
284}
285
286impl<S: BosStr> LexiconSchema for DisabledJoinLinkPreviewView<S> {
287    fn nsid() -> &'static str {
288        "chat.bsky.group.defs"
289    }
290    fn def_name() -> &'static str {
291        "disabledJoinLinkPreviewView"
292    }
293    fn lexicon_doc() -> LexiconDoc<'static> {
294        lexicon_doc_chat_bsky_group_defs()
295    }
296    fn validate(&self) -> Result<(), ConstraintError> {
297        Ok(())
298    }
299}
300
301impl<S: BosStr> LexiconSchema for InvalidJoinLinkPreviewView<S> {
302    fn nsid() -> &'static str {
303        "chat.bsky.group.defs"
304    }
305    fn def_name() -> &'static str {
306        "invalidJoinLinkPreviewView"
307    }
308    fn lexicon_doc() -> LexiconDoc<'static> {
309        lexicon_doc_chat_bsky_group_defs()
310    }
311    fn validate(&self) -> Result<(), ConstraintError> {
312        Ok(())
313    }
314}
315
316impl<S: BosStr> LexiconSchema for JoinLinkPreviewView<S> {
317    fn nsid() -> &'static str {
318        "chat.bsky.group.defs"
319    }
320    fn def_name() -> &'static str {
321        "joinLinkPreviewView"
322    }
323    fn lexicon_doc() -> LexiconDoc<'static> {
324        lexicon_doc_chat_bsky_group_defs()
325    }
326    fn validate(&self) -> Result<(), ConstraintError> {
327        Ok(())
328    }
329}
330
331impl<S: BosStr> LexiconSchema for JoinLinkView<S> {
332    fn nsid() -> &'static str {
333        "chat.bsky.group.defs"
334    }
335    fn def_name() -> &'static str {
336        "joinLinkView"
337    }
338    fn lexicon_doc() -> LexiconDoc<'static> {
339        lexicon_doc_chat_bsky_group_defs()
340    }
341    fn validate(&self) -> Result<(), ConstraintError> {
342        Ok(())
343    }
344}
345
346impl<S: BosStr> LexiconSchema for JoinLinkViewerState<S> {
347    fn nsid() -> &'static str {
348        "chat.bsky.group.defs"
349    }
350    fn def_name() -> &'static str {
351        "joinLinkViewerState"
352    }
353    fn lexicon_doc() -> LexiconDoc<'static> {
354        lexicon_doc_chat_bsky_group_defs()
355    }
356    fn validate(&self) -> Result<(), ConstraintError> {
357        Ok(())
358    }
359}
360
361impl<S: BosStr> LexiconSchema for JoinRequestConvoView<S> {
362    fn nsid() -> &'static str {
363        "chat.bsky.group.defs"
364    }
365    fn def_name() -> &'static str {
366        "joinRequestConvoView"
367    }
368    fn lexicon_doc() -> LexiconDoc<'static> {
369        lexicon_doc_chat_bsky_group_defs()
370    }
371    fn validate(&self) -> Result<(), ConstraintError> {
372        Ok(())
373    }
374}
375
376impl<S: BosStr> LexiconSchema for JoinRequestView<S> {
377    fn nsid() -> &'static str {
378        "chat.bsky.group.defs"
379    }
380    fn def_name() -> &'static str {
381        "joinRequestView"
382    }
383    fn lexicon_doc() -> LexiconDoc<'static> {
384        lexicon_doc_chat_bsky_group_defs()
385    }
386    fn validate(&self) -> Result<(), ConstraintError> {
387        Ok(())
388    }
389}
390
391fn lexicon_doc_chat_bsky_group_defs() -> LexiconDoc<'static> {
392    #[allow(unused_imports)]
393    use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType};
394    use jacquard_lexicon::lexicon::*;
395    use alloc::collections::BTreeMap;
396    LexiconDoc {
397        lexicon: Lexicon::Lexicon1,
398        id: CowStr::new_static("chat.bsky.group.defs"),
399        defs: {
400            let mut map = BTreeMap::new();
401            map.insert(
402                SmolStr::new_static("disabledJoinLinkPreviewView"),
403                LexUserType::Object(LexObject {
404                    description: Some(
405                        CowStr::new_static(
406                            "Preview for a disabled join link. Carries only the code so clients can correlate with the input and render a disabled state.",
407                        ),
408                    ),
409                    required: Some(vec![SmolStr::new_static("code")]),
410                    properties: {
411                        #[allow(unused_mut)]
412                        let mut map = BTreeMap::new();
413                        map.insert(
414                            SmolStr::new_static("code"),
415                            LexObjectProperty::String(LexString { ..Default::default() }),
416                        );
417                        map
418                    },
419                    ..Default::default()
420                }),
421            );
422            map.insert(
423                SmolStr::new_static("invalidJoinLinkPreviewView"),
424                LexUserType::Object(LexObject {
425                    description: Some(
426                        CowStr::new_static(
427                            "Preview for a join link code that does not map to an existing link. Carries only the code so clients can correlate with the input and render an invalid state.",
428                        ),
429                    ),
430                    required: Some(vec![SmolStr::new_static("code")]),
431                    properties: {
432                        #[allow(unused_mut)]
433                        let mut map = BTreeMap::new();
434                        map.insert(
435                            SmolStr::new_static("code"),
436                            LexObjectProperty::String(LexString { ..Default::default() }),
437                        );
438                        map
439                    },
440                    ..Default::default()
441                }),
442            );
443            map.insert(
444                SmolStr::new_static("joinLinkPreviewView"),
445                LexUserType::Object(LexObject {
446                    description: Some(
447                        CowStr::new_static(
448                            "Preview that can be shown in feeds, including to unauthenticated viewers.",
449                        ),
450                    ),
451                    required: Some(
452                        vec![
453                            SmolStr::new_static("convoId"), SmolStr::new_static("code"),
454                            SmolStr::new_static("name"), SmolStr::new_static("owner"),
455                            SmolStr::new_static("memberCount"),
456                            SmolStr::new_static("memberLimit"),
457                            SmolStr::new_static("requireApproval"),
458                            SmolStr::new_static("joinRule")
459                        ],
460                    ),
461                    properties: {
462                        #[allow(unused_mut)]
463                        let mut map = BTreeMap::new();
464                        map.insert(
465                            SmolStr::new_static("code"),
466                            LexObjectProperty::String(LexString { ..Default::default() }),
467                        );
468                        map.insert(
469                            SmolStr::new_static("convo"),
470                            LexObjectProperty::Ref(LexRef {
471                                r#ref: CowStr::new_static("chat.bsky.convo.defs#convoView"),
472                                ..Default::default()
473                            }),
474                        );
475                        map.insert(
476                            SmolStr::new_static("convoId"),
477                            LexObjectProperty::String(LexString { ..Default::default() }),
478                        );
479                        map.insert(
480                            SmolStr::new_static("joinRule"),
481                            LexObjectProperty::Ref(LexRef {
482                                r#ref: CowStr::new_static("#joinRule"),
483                                ..Default::default()
484                            }),
485                        );
486                        map.insert(
487                            SmolStr::new_static("memberCount"),
488                            LexObjectProperty::Integer(LexInteger {
489                                ..Default::default()
490                            }),
491                        );
492                        map.insert(
493                            SmolStr::new_static("memberLimit"),
494                            LexObjectProperty::Integer(LexInteger {
495                                ..Default::default()
496                            }),
497                        );
498                        map.insert(
499                            SmolStr::new_static("name"),
500                            LexObjectProperty::String(LexString { ..Default::default() }),
501                        );
502                        map.insert(
503                            SmolStr::new_static("owner"),
504                            LexObjectProperty::Ref(LexRef {
505                                r#ref: CowStr::new_static(
506                                    "chat.bsky.actor.defs#profileViewBasic",
507                                ),
508                                ..Default::default()
509                            }),
510                        );
511                        map.insert(
512                            SmolStr::new_static("requireApproval"),
513                            LexObjectProperty::Boolean(LexBoolean {
514                                ..Default::default()
515                            }),
516                        );
517                        map.insert(
518                            SmolStr::new_static("viewer"),
519                            LexObjectProperty::Ref(LexRef {
520                                r#ref: CowStr::new_static("#joinLinkViewerState"),
521                                ..Default::default()
522                            }),
523                        );
524                        map
525                    },
526                    ..Default::default()
527                }),
528            );
529            map.insert(
530                SmolStr::new_static("joinLinkView"),
531                LexUserType::Object(LexObject {
532                    description: Some(
533                        CowStr::new_static(
534                            "Join link view to be used within a group view, so the convo is surrounding, not specified inside this view.",
535                        ),
536                    ),
537                    required: Some(
538                        vec![
539                            SmolStr::new_static("code"),
540                            SmolStr::new_static("enabledStatus"),
541                            SmolStr::new_static("requireApproval"),
542                            SmolStr::new_static("joinRule"),
543                            SmolStr::new_static("createdAt")
544                        ],
545                    ),
546                    properties: {
547                        #[allow(unused_mut)]
548                        let mut map = BTreeMap::new();
549                        map.insert(
550                            SmolStr::new_static("code"),
551                            LexObjectProperty::String(LexString { ..Default::default() }),
552                        );
553                        map.insert(
554                            SmolStr::new_static("createdAt"),
555                            LexObjectProperty::String(LexString {
556                                format: Some(LexStringFormat::Datetime),
557                                ..Default::default()
558                            }),
559                        );
560                        map.insert(
561                            SmolStr::new_static("enabledStatus"),
562                            LexObjectProperty::Ref(LexRef {
563                                r#ref: CowStr::new_static("#linkEnabledStatus"),
564                                ..Default::default()
565                            }),
566                        );
567                        map.insert(
568                            SmolStr::new_static("joinRule"),
569                            LexObjectProperty::Ref(LexRef {
570                                r#ref: CowStr::new_static("#joinRule"),
571                                ..Default::default()
572                            }),
573                        );
574                        map.insert(
575                            SmolStr::new_static("requireApproval"),
576                            LexObjectProperty::Boolean(LexBoolean {
577                                ..Default::default()
578                            }),
579                        );
580                        map
581                    },
582                    ..Default::default()
583                }),
584            );
585            map.insert(
586                SmolStr::new_static("joinLinkViewerState"),
587                LexUserType::Object(LexObject {
588                    properties: {
589                        #[allow(unused_mut)]
590                        let mut map = BTreeMap::new();
591                        map.insert(
592                            SmolStr::new_static("requestedAt"),
593                            LexObjectProperty::String(LexString {
594                                format: Some(LexStringFormat::Datetime),
595                                ..Default::default()
596                            }),
597                        );
598                        map
599                    },
600                    ..Default::default()
601                }),
602            );
603            map.insert(
604                SmolStr::new_static("joinRequestConvoView"),
605                LexUserType::Object(LexObject {
606                    description: Some(
607                        CowStr::new_static(
608                            "A join request from the perspective of the requester, including enough group context to render the request in a list (e.g. group name, owner, member count).",
609                        ),
610                    ),
611                    required: Some(
612                        vec![
613                            SmolStr::new_static("convoId"), SmolStr::new_static("name"),
614                            SmolStr::new_static("owner"),
615                            SmolStr::new_static("memberCount"),
616                            SmolStr::new_static("memberLimit"),
617                            SmolStr::new_static("viewer")
618                        ],
619                    ),
620                    properties: {
621                        #[allow(unused_mut)]
622                        let mut map = BTreeMap::new();
623                        map.insert(
624                            SmolStr::new_static("convoId"),
625                            LexObjectProperty::String(LexString { ..Default::default() }),
626                        );
627                        map.insert(
628                            SmolStr::new_static("memberCount"),
629                            LexObjectProperty::Integer(LexInteger {
630                                ..Default::default()
631                            }),
632                        );
633                        map.insert(
634                            SmolStr::new_static("memberLimit"),
635                            LexObjectProperty::Integer(LexInteger {
636                                ..Default::default()
637                            }),
638                        );
639                        map.insert(
640                            SmolStr::new_static("name"),
641                            LexObjectProperty::String(LexString { ..Default::default() }),
642                        );
643                        map.insert(
644                            SmolStr::new_static("owner"),
645                            LexObjectProperty::Ref(LexRef {
646                                r#ref: CowStr::new_static(
647                                    "chat.bsky.actor.defs#profileViewBasic",
648                                ),
649                                ..Default::default()
650                            }),
651                        );
652                        map.insert(
653                            SmolStr::new_static("viewer"),
654                            LexObjectProperty::Ref(LexRef {
655                                r#ref: CowStr::new_static("#joinLinkViewerState"),
656                                ..Default::default()
657                            }),
658                        );
659                        map
660                    },
661                    ..Default::default()
662                }),
663            );
664            map.insert(
665                SmolStr::new_static("joinRequestView"),
666                LexUserType::Object(LexObject {
667                    description: Some(
668                        CowStr::new_static(
669                            "A join request from the perspective of the group owner.",
670                        ),
671                    ),
672                    required: Some(
673                        vec![
674                            SmolStr::new_static("convoId"),
675                            SmolStr::new_static("requestedBy"),
676                            SmolStr::new_static("requestedAt")
677                        ],
678                    ),
679                    properties: {
680                        #[allow(unused_mut)]
681                        let mut map = BTreeMap::new();
682                        map.insert(
683                            SmolStr::new_static("convoId"),
684                            LexObjectProperty::String(LexString { ..Default::default() }),
685                        );
686                        map.insert(
687                            SmolStr::new_static("requestedAt"),
688                            LexObjectProperty::String(LexString {
689                                format: Some(LexStringFormat::Datetime),
690                                ..Default::default()
691                            }),
692                        );
693                        map.insert(
694                            SmolStr::new_static("requestedBy"),
695                            LexObjectProperty::Ref(LexRef {
696                                r#ref: CowStr::new_static(
697                                    "chat.bsky.actor.defs#profileViewBasic",
698                                ),
699                                ..Default::default()
700                            }),
701                        );
702                        map
703                    },
704                    ..Default::default()
705                }),
706            );
707            map.insert(
708                SmolStr::new_static("joinRule"),
709                LexUserType::String(LexString { ..Default::default() }),
710            );
711            map.insert(
712                SmolStr::new_static("linkEnabledStatus"),
713                LexUserType::String(LexString { ..Default::default() }),
714            );
715            map
716        },
717        ..Default::default()
718    }
719}
720
721pub mod join_link_preview_view_state {
722
723    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
724    #[allow(unused)]
725    use ::core::marker::PhantomData;
726    mod sealed {
727        pub trait Sealed {}
728    }
729    /// State trait tracking which required fields have been set
730    pub trait State: sealed::Sealed {
731        type Code;
732        type ConvoId;
733        type JoinRule;
734        type MemberCount;
735        type MemberLimit;
736        type Name;
737        type Owner;
738        type RequireApproval;
739    }
740    /// Empty state - all required fields are unset
741    pub struct Empty(());
742    impl sealed::Sealed for Empty {}
743    impl State for Empty {
744        type Code = Unset;
745        type ConvoId = Unset;
746        type JoinRule = Unset;
747        type MemberCount = Unset;
748        type MemberLimit = Unset;
749        type Name = Unset;
750        type Owner = Unset;
751        type RequireApproval = Unset;
752    }
753    ///State transition - sets the `code` field to Set
754    pub struct SetCode<St: State = Empty>(PhantomData<fn() -> St>);
755    impl<St: State> sealed::Sealed for SetCode<St> {}
756    impl<St: State> State for SetCode<St> {
757        type Code = Set<members::code>;
758        type ConvoId = St::ConvoId;
759        type JoinRule = St::JoinRule;
760        type MemberCount = St::MemberCount;
761        type MemberLimit = St::MemberLimit;
762        type Name = St::Name;
763        type Owner = St::Owner;
764        type RequireApproval = St::RequireApproval;
765    }
766    ///State transition - sets the `convo_id` field to Set
767    pub struct SetConvoId<St: State = Empty>(PhantomData<fn() -> St>);
768    impl<St: State> sealed::Sealed for SetConvoId<St> {}
769    impl<St: State> State for SetConvoId<St> {
770        type Code = St::Code;
771        type ConvoId = Set<members::convo_id>;
772        type JoinRule = St::JoinRule;
773        type MemberCount = St::MemberCount;
774        type MemberLimit = St::MemberLimit;
775        type Name = St::Name;
776        type Owner = St::Owner;
777        type RequireApproval = St::RequireApproval;
778    }
779    ///State transition - sets the `join_rule` field to Set
780    pub struct SetJoinRule<St: State = Empty>(PhantomData<fn() -> St>);
781    impl<St: State> sealed::Sealed for SetJoinRule<St> {}
782    impl<St: State> State for SetJoinRule<St> {
783        type Code = St::Code;
784        type ConvoId = St::ConvoId;
785        type JoinRule = Set<members::join_rule>;
786        type MemberCount = St::MemberCount;
787        type MemberLimit = St::MemberLimit;
788        type Name = St::Name;
789        type Owner = St::Owner;
790        type RequireApproval = St::RequireApproval;
791    }
792    ///State transition - sets the `member_count` field to Set
793    pub struct SetMemberCount<St: State = Empty>(PhantomData<fn() -> St>);
794    impl<St: State> sealed::Sealed for SetMemberCount<St> {}
795    impl<St: State> State for SetMemberCount<St> {
796        type Code = St::Code;
797        type ConvoId = St::ConvoId;
798        type JoinRule = St::JoinRule;
799        type MemberCount = Set<members::member_count>;
800        type MemberLimit = St::MemberLimit;
801        type Name = St::Name;
802        type Owner = St::Owner;
803        type RequireApproval = St::RequireApproval;
804    }
805    ///State transition - sets the `member_limit` field to Set
806    pub struct SetMemberLimit<St: State = Empty>(PhantomData<fn() -> St>);
807    impl<St: State> sealed::Sealed for SetMemberLimit<St> {}
808    impl<St: State> State for SetMemberLimit<St> {
809        type Code = St::Code;
810        type ConvoId = St::ConvoId;
811        type JoinRule = St::JoinRule;
812        type MemberCount = St::MemberCount;
813        type MemberLimit = Set<members::member_limit>;
814        type Name = St::Name;
815        type Owner = St::Owner;
816        type RequireApproval = St::RequireApproval;
817    }
818    ///State transition - sets the `name` field to Set
819    pub struct SetName<St: State = Empty>(PhantomData<fn() -> St>);
820    impl<St: State> sealed::Sealed for SetName<St> {}
821    impl<St: State> State for SetName<St> {
822        type Code = St::Code;
823        type ConvoId = St::ConvoId;
824        type JoinRule = St::JoinRule;
825        type MemberCount = St::MemberCount;
826        type MemberLimit = St::MemberLimit;
827        type Name = Set<members::name>;
828        type Owner = St::Owner;
829        type RequireApproval = St::RequireApproval;
830    }
831    ///State transition - sets the `owner` field to Set
832    pub struct SetOwner<St: State = Empty>(PhantomData<fn() -> St>);
833    impl<St: State> sealed::Sealed for SetOwner<St> {}
834    impl<St: State> State for SetOwner<St> {
835        type Code = St::Code;
836        type ConvoId = St::ConvoId;
837        type JoinRule = St::JoinRule;
838        type MemberCount = St::MemberCount;
839        type MemberLimit = St::MemberLimit;
840        type Name = St::Name;
841        type Owner = Set<members::owner>;
842        type RequireApproval = St::RequireApproval;
843    }
844    ///State transition - sets the `require_approval` field to Set
845    pub struct SetRequireApproval<St: State = Empty>(PhantomData<fn() -> St>);
846    impl<St: State> sealed::Sealed for SetRequireApproval<St> {}
847    impl<St: State> State for SetRequireApproval<St> {
848        type Code = St::Code;
849        type ConvoId = St::ConvoId;
850        type JoinRule = St::JoinRule;
851        type MemberCount = St::MemberCount;
852        type MemberLimit = St::MemberLimit;
853        type Name = St::Name;
854        type Owner = St::Owner;
855        type RequireApproval = Set<members::require_approval>;
856    }
857    /// Marker types for field names
858    #[allow(non_camel_case_types)]
859    pub mod members {
860        ///Marker type for the `code` field
861        pub struct code(());
862        ///Marker type for the `convo_id` field
863        pub struct convo_id(());
864        ///Marker type for the `join_rule` field
865        pub struct join_rule(());
866        ///Marker type for the `member_count` field
867        pub struct member_count(());
868        ///Marker type for the `member_limit` field
869        pub struct member_limit(());
870        ///Marker type for the `name` field
871        pub struct name(());
872        ///Marker type for the `owner` field
873        pub struct owner(());
874        ///Marker type for the `require_approval` field
875        pub struct require_approval(());
876    }
877}
878
879/// Builder for constructing an instance of this type.
880pub struct JoinLinkPreviewViewBuilder<
881    St: join_link_preview_view_state::State,
882    S: BosStr = DefaultStr,
883> {
884    _state: PhantomData<fn() -> St>,
885    _fields: (
886        Option<S>,
887        Option<ConvoView<S>>,
888        Option<S>,
889        Option<group::JoinRule<S>>,
890        Option<i64>,
891        Option<i64>,
892        Option<S>,
893        Option<ProfileViewBasic<S>>,
894        Option<bool>,
895        Option<group::JoinLinkViewerState<S>>,
896    ),
897    _type: PhantomData<fn() -> S>,
898}
899
900impl JoinLinkPreviewView<DefaultStr> {
901    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
902    pub fn new() -> JoinLinkPreviewViewBuilder<
903        join_link_preview_view_state::Empty,
904        DefaultStr,
905    > {
906        JoinLinkPreviewViewBuilder::new()
907    }
908}
909
910impl<S: BosStr> JoinLinkPreviewView<S> {
911    /// Create a new builder for this type
912    pub fn builder() -> JoinLinkPreviewViewBuilder<
913        join_link_preview_view_state::Empty,
914        S,
915    > {
916        JoinLinkPreviewViewBuilder::builder()
917    }
918}
919
920impl JoinLinkPreviewViewBuilder<join_link_preview_view_state::Empty, DefaultStr> {
921    /// Create a new builder with all fields unset, using the default string type, if needed
922    pub fn new() -> Self {
923        JoinLinkPreviewViewBuilder {
924            _state: PhantomData,
925            _fields: (None, None, None, None, None, None, None, None, None, None),
926            _type: PhantomData,
927        }
928    }
929}
930
931impl<S: BosStr> JoinLinkPreviewViewBuilder<join_link_preview_view_state::Empty, S> {
932    /// Create a new builder with all fields unset
933    pub fn builder() -> Self {
934        JoinLinkPreviewViewBuilder {
935            _state: PhantomData,
936            _fields: (None, None, None, None, None, None, None, None, None, None),
937            _type: PhantomData,
938        }
939    }
940}
941
942impl<St, S: BosStr> JoinLinkPreviewViewBuilder<St, S>
943where
944    St: join_link_preview_view_state::State,
945    St::Code: join_link_preview_view_state::IsUnset,
946{
947    /// Set the `code` field (required)
948    pub fn code(
949        mut self,
950        value: impl Into<S>,
951    ) -> JoinLinkPreviewViewBuilder<join_link_preview_view_state::SetCode<St>, S> {
952        self._fields.0 = Option::Some(value.into());
953        JoinLinkPreviewViewBuilder {
954            _state: PhantomData,
955            _fields: self._fields,
956            _type: PhantomData,
957        }
958    }
959}
960
961impl<
962    St: join_link_preview_view_state::State,
963    S: BosStr,
964> JoinLinkPreviewViewBuilder<St, S> {
965    /// Set the `convo` field (optional)
966    pub fn convo(mut self, value: impl Into<Option<ConvoView<S>>>) -> Self {
967        self._fields.1 = value.into();
968        self
969    }
970    /// Set the `convo` field to an Option value (optional)
971    pub fn maybe_convo(mut self, value: Option<ConvoView<S>>) -> Self {
972        self._fields.1 = value;
973        self
974    }
975}
976
977impl<St, S: BosStr> JoinLinkPreviewViewBuilder<St, S>
978where
979    St: join_link_preview_view_state::State,
980    St::ConvoId: join_link_preview_view_state::IsUnset,
981{
982    /// Set the `convoId` field (required)
983    pub fn convo_id(
984        mut self,
985        value: impl Into<S>,
986    ) -> JoinLinkPreviewViewBuilder<join_link_preview_view_state::SetConvoId<St>, S> {
987        self._fields.2 = Option::Some(value.into());
988        JoinLinkPreviewViewBuilder {
989            _state: PhantomData,
990            _fields: self._fields,
991            _type: PhantomData,
992        }
993    }
994}
995
996impl<St, S: BosStr> JoinLinkPreviewViewBuilder<St, S>
997where
998    St: join_link_preview_view_state::State,
999    St::JoinRule: join_link_preview_view_state::IsUnset,
1000{
1001    /// Set the `joinRule` field (required)
1002    pub fn join_rule(
1003        mut self,
1004        value: impl Into<group::JoinRule<S>>,
1005    ) -> JoinLinkPreviewViewBuilder<join_link_preview_view_state::SetJoinRule<St>, S> {
1006        self._fields.3 = Option::Some(value.into());
1007        JoinLinkPreviewViewBuilder {
1008            _state: PhantomData,
1009            _fields: self._fields,
1010            _type: PhantomData,
1011        }
1012    }
1013}
1014
1015impl<St, S: BosStr> JoinLinkPreviewViewBuilder<St, S>
1016where
1017    St: join_link_preview_view_state::State,
1018    St::MemberCount: join_link_preview_view_state::IsUnset,
1019{
1020    /// Set the `memberCount` field (required)
1021    pub fn member_count(
1022        mut self,
1023        value: impl Into<i64>,
1024    ) -> JoinLinkPreviewViewBuilder<
1025        join_link_preview_view_state::SetMemberCount<St>,
1026        S,
1027    > {
1028        self._fields.4 = Option::Some(value.into());
1029        JoinLinkPreviewViewBuilder {
1030            _state: PhantomData,
1031            _fields: self._fields,
1032            _type: PhantomData,
1033        }
1034    }
1035}
1036
1037impl<St, S: BosStr> JoinLinkPreviewViewBuilder<St, S>
1038where
1039    St: join_link_preview_view_state::State,
1040    St::MemberLimit: join_link_preview_view_state::IsUnset,
1041{
1042    /// Set the `memberLimit` field (required)
1043    pub fn member_limit(
1044        mut self,
1045        value: impl Into<i64>,
1046    ) -> JoinLinkPreviewViewBuilder<
1047        join_link_preview_view_state::SetMemberLimit<St>,
1048        S,
1049    > {
1050        self._fields.5 = Option::Some(value.into());
1051        JoinLinkPreviewViewBuilder {
1052            _state: PhantomData,
1053            _fields: self._fields,
1054            _type: PhantomData,
1055        }
1056    }
1057}
1058
1059impl<St, S: BosStr> JoinLinkPreviewViewBuilder<St, S>
1060where
1061    St: join_link_preview_view_state::State,
1062    St::Name: join_link_preview_view_state::IsUnset,
1063{
1064    /// Set the `name` field (required)
1065    pub fn name(
1066        mut self,
1067        value: impl Into<S>,
1068    ) -> JoinLinkPreviewViewBuilder<join_link_preview_view_state::SetName<St>, S> {
1069        self._fields.6 = Option::Some(value.into());
1070        JoinLinkPreviewViewBuilder {
1071            _state: PhantomData,
1072            _fields: self._fields,
1073            _type: PhantomData,
1074        }
1075    }
1076}
1077
1078impl<St, S: BosStr> JoinLinkPreviewViewBuilder<St, S>
1079where
1080    St: join_link_preview_view_state::State,
1081    St::Owner: join_link_preview_view_state::IsUnset,
1082{
1083    /// Set the `owner` field (required)
1084    pub fn owner(
1085        mut self,
1086        value: impl Into<ProfileViewBasic<S>>,
1087    ) -> JoinLinkPreviewViewBuilder<join_link_preview_view_state::SetOwner<St>, S> {
1088        self._fields.7 = Option::Some(value.into());
1089        JoinLinkPreviewViewBuilder {
1090            _state: PhantomData,
1091            _fields: self._fields,
1092            _type: PhantomData,
1093        }
1094    }
1095}
1096
1097impl<St, S: BosStr> JoinLinkPreviewViewBuilder<St, S>
1098where
1099    St: join_link_preview_view_state::State,
1100    St::RequireApproval: join_link_preview_view_state::IsUnset,
1101{
1102    /// Set the `requireApproval` field (required)
1103    pub fn require_approval(
1104        mut self,
1105        value: impl Into<bool>,
1106    ) -> JoinLinkPreviewViewBuilder<
1107        join_link_preview_view_state::SetRequireApproval<St>,
1108        S,
1109    > {
1110        self._fields.8 = Option::Some(value.into());
1111        JoinLinkPreviewViewBuilder {
1112            _state: PhantomData,
1113            _fields: self._fields,
1114            _type: PhantomData,
1115        }
1116    }
1117}
1118
1119impl<
1120    St: join_link_preview_view_state::State,
1121    S: BosStr,
1122> JoinLinkPreviewViewBuilder<St, S> {
1123    /// Set the `viewer` field (optional)
1124    pub fn viewer(
1125        mut self,
1126        value: impl Into<Option<group::JoinLinkViewerState<S>>>,
1127    ) -> Self {
1128        self._fields.9 = value.into();
1129        self
1130    }
1131    /// Set the `viewer` field to an Option value (optional)
1132    pub fn maybe_viewer(mut self, value: Option<group::JoinLinkViewerState<S>>) -> Self {
1133        self._fields.9 = value;
1134        self
1135    }
1136}
1137
1138impl<St, S: BosStr> JoinLinkPreviewViewBuilder<St, S>
1139where
1140    St: join_link_preview_view_state::State,
1141    St::Code: join_link_preview_view_state::IsSet,
1142    St::ConvoId: join_link_preview_view_state::IsSet,
1143    St::JoinRule: join_link_preview_view_state::IsSet,
1144    St::MemberCount: join_link_preview_view_state::IsSet,
1145    St::MemberLimit: join_link_preview_view_state::IsSet,
1146    St::Name: join_link_preview_view_state::IsSet,
1147    St::Owner: join_link_preview_view_state::IsSet,
1148    St::RequireApproval: join_link_preview_view_state::IsSet,
1149{
1150    /// Build the final struct.
1151    pub fn build(self) -> JoinLinkPreviewView<S> {
1152        JoinLinkPreviewView {
1153            code: self._fields.0.unwrap(),
1154            convo: self._fields.1,
1155            convo_id: self._fields.2.unwrap(),
1156            join_rule: self._fields.3.unwrap(),
1157            member_count: self._fields.4.unwrap(),
1158            member_limit: self._fields.5.unwrap(),
1159            name: self._fields.6.unwrap(),
1160            owner: self._fields.7.unwrap(),
1161            require_approval: self._fields.8.unwrap(),
1162            viewer: self._fields.9,
1163            extra_data: Default::default(),
1164        }
1165    }
1166    /// Build the final struct with custom extra_data.
1167    pub fn build_with_data(
1168        self,
1169        extra_data: BTreeMap<SmolStr, Data<S>>,
1170    ) -> JoinLinkPreviewView<S> {
1171        JoinLinkPreviewView {
1172            code: self._fields.0.unwrap(),
1173            convo: self._fields.1,
1174            convo_id: self._fields.2.unwrap(),
1175            join_rule: self._fields.3.unwrap(),
1176            member_count: self._fields.4.unwrap(),
1177            member_limit: self._fields.5.unwrap(),
1178            name: self._fields.6.unwrap(),
1179            owner: self._fields.7.unwrap(),
1180            require_approval: self._fields.8.unwrap(),
1181            viewer: self._fields.9,
1182            extra_data: Some(extra_data),
1183        }
1184    }
1185}
1186
1187pub mod join_link_view_state {
1188
1189    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
1190    #[allow(unused)]
1191    use ::core::marker::PhantomData;
1192    mod sealed {
1193        pub trait Sealed {}
1194    }
1195    /// State trait tracking which required fields have been set
1196    pub trait State: sealed::Sealed {
1197        type Code;
1198        type CreatedAt;
1199        type EnabledStatus;
1200        type JoinRule;
1201        type RequireApproval;
1202    }
1203    /// Empty state - all required fields are unset
1204    pub struct Empty(());
1205    impl sealed::Sealed for Empty {}
1206    impl State for Empty {
1207        type Code = Unset;
1208        type CreatedAt = Unset;
1209        type EnabledStatus = Unset;
1210        type JoinRule = Unset;
1211        type RequireApproval = Unset;
1212    }
1213    ///State transition - sets the `code` field to Set
1214    pub struct SetCode<St: State = Empty>(PhantomData<fn() -> St>);
1215    impl<St: State> sealed::Sealed for SetCode<St> {}
1216    impl<St: State> State for SetCode<St> {
1217        type Code = Set<members::code>;
1218        type CreatedAt = St::CreatedAt;
1219        type EnabledStatus = St::EnabledStatus;
1220        type JoinRule = St::JoinRule;
1221        type RequireApproval = St::RequireApproval;
1222    }
1223    ///State transition - sets the `created_at` field to Set
1224    pub struct SetCreatedAt<St: State = Empty>(PhantomData<fn() -> St>);
1225    impl<St: State> sealed::Sealed for SetCreatedAt<St> {}
1226    impl<St: State> State for SetCreatedAt<St> {
1227        type Code = St::Code;
1228        type CreatedAt = Set<members::created_at>;
1229        type EnabledStatus = St::EnabledStatus;
1230        type JoinRule = St::JoinRule;
1231        type RequireApproval = St::RequireApproval;
1232    }
1233    ///State transition - sets the `enabled_status` field to Set
1234    pub struct SetEnabledStatus<St: State = Empty>(PhantomData<fn() -> St>);
1235    impl<St: State> sealed::Sealed for SetEnabledStatus<St> {}
1236    impl<St: State> State for SetEnabledStatus<St> {
1237        type Code = St::Code;
1238        type CreatedAt = St::CreatedAt;
1239        type EnabledStatus = Set<members::enabled_status>;
1240        type JoinRule = St::JoinRule;
1241        type RequireApproval = St::RequireApproval;
1242    }
1243    ///State transition - sets the `join_rule` field to Set
1244    pub struct SetJoinRule<St: State = Empty>(PhantomData<fn() -> St>);
1245    impl<St: State> sealed::Sealed for SetJoinRule<St> {}
1246    impl<St: State> State for SetJoinRule<St> {
1247        type Code = St::Code;
1248        type CreatedAt = St::CreatedAt;
1249        type EnabledStatus = St::EnabledStatus;
1250        type JoinRule = Set<members::join_rule>;
1251        type RequireApproval = St::RequireApproval;
1252    }
1253    ///State transition - sets the `require_approval` field to Set
1254    pub struct SetRequireApproval<St: State = Empty>(PhantomData<fn() -> St>);
1255    impl<St: State> sealed::Sealed for SetRequireApproval<St> {}
1256    impl<St: State> State for SetRequireApproval<St> {
1257        type Code = St::Code;
1258        type CreatedAt = St::CreatedAt;
1259        type EnabledStatus = St::EnabledStatus;
1260        type JoinRule = St::JoinRule;
1261        type RequireApproval = Set<members::require_approval>;
1262    }
1263    /// Marker types for field names
1264    #[allow(non_camel_case_types)]
1265    pub mod members {
1266        ///Marker type for the `code` field
1267        pub struct code(());
1268        ///Marker type for the `created_at` field
1269        pub struct created_at(());
1270        ///Marker type for the `enabled_status` field
1271        pub struct enabled_status(());
1272        ///Marker type for the `join_rule` field
1273        pub struct join_rule(());
1274        ///Marker type for the `require_approval` field
1275        pub struct require_approval(());
1276    }
1277}
1278
1279/// Builder for constructing an instance of this type.
1280pub struct JoinLinkViewBuilder<St: join_link_view_state::State, S: BosStr = DefaultStr> {
1281    _state: PhantomData<fn() -> St>,
1282    _fields: (
1283        Option<S>,
1284        Option<Datetime>,
1285        Option<group::LinkEnabledStatus<S>>,
1286        Option<group::JoinRule<S>>,
1287        Option<bool>,
1288    ),
1289    _type: PhantomData<fn() -> S>,
1290}
1291
1292impl JoinLinkView<DefaultStr> {
1293    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
1294    pub fn new() -> JoinLinkViewBuilder<join_link_view_state::Empty, DefaultStr> {
1295        JoinLinkViewBuilder::new()
1296    }
1297}
1298
1299impl<S: BosStr> JoinLinkView<S> {
1300    /// Create a new builder for this type
1301    pub fn builder() -> JoinLinkViewBuilder<join_link_view_state::Empty, S> {
1302        JoinLinkViewBuilder::builder()
1303    }
1304}
1305
1306impl JoinLinkViewBuilder<join_link_view_state::Empty, DefaultStr> {
1307    /// Create a new builder with all fields unset, using the default string type, if needed
1308    pub fn new() -> Self {
1309        JoinLinkViewBuilder {
1310            _state: PhantomData,
1311            _fields: (None, None, None, None, None),
1312            _type: PhantomData,
1313        }
1314    }
1315}
1316
1317impl<S: BosStr> JoinLinkViewBuilder<join_link_view_state::Empty, S> {
1318    /// Create a new builder with all fields unset
1319    pub fn builder() -> Self {
1320        JoinLinkViewBuilder {
1321            _state: PhantomData,
1322            _fields: (None, None, None, None, None),
1323            _type: PhantomData,
1324        }
1325    }
1326}
1327
1328impl<St, S: BosStr> JoinLinkViewBuilder<St, S>
1329where
1330    St: join_link_view_state::State,
1331    St::Code: join_link_view_state::IsUnset,
1332{
1333    /// Set the `code` field (required)
1334    pub fn code(
1335        mut self,
1336        value: impl Into<S>,
1337    ) -> JoinLinkViewBuilder<join_link_view_state::SetCode<St>, S> {
1338        self._fields.0 = Option::Some(value.into());
1339        JoinLinkViewBuilder {
1340            _state: PhantomData,
1341            _fields: self._fields,
1342            _type: PhantomData,
1343        }
1344    }
1345}
1346
1347impl<St, S: BosStr> JoinLinkViewBuilder<St, S>
1348where
1349    St: join_link_view_state::State,
1350    St::CreatedAt: join_link_view_state::IsUnset,
1351{
1352    /// Set the `createdAt` field (required)
1353    pub fn created_at(
1354        mut self,
1355        value: impl Into<Datetime>,
1356    ) -> JoinLinkViewBuilder<join_link_view_state::SetCreatedAt<St>, S> {
1357        self._fields.1 = Option::Some(value.into());
1358        JoinLinkViewBuilder {
1359            _state: PhantomData,
1360            _fields: self._fields,
1361            _type: PhantomData,
1362        }
1363    }
1364}
1365
1366impl<St, S: BosStr> JoinLinkViewBuilder<St, S>
1367where
1368    St: join_link_view_state::State,
1369    St::EnabledStatus: join_link_view_state::IsUnset,
1370{
1371    /// Set the `enabledStatus` field (required)
1372    pub fn enabled_status(
1373        mut self,
1374        value: impl Into<group::LinkEnabledStatus<S>>,
1375    ) -> JoinLinkViewBuilder<join_link_view_state::SetEnabledStatus<St>, S> {
1376        self._fields.2 = Option::Some(value.into());
1377        JoinLinkViewBuilder {
1378            _state: PhantomData,
1379            _fields: self._fields,
1380            _type: PhantomData,
1381        }
1382    }
1383}
1384
1385impl<St, S: BosStr> JoinLinkViewBuilder<St, S>
1386where
1387    St: join_link_view_state::State,
1388    St::JoinRule: join_link_view_state::IsUnset,
1389{
1390    /// Set the `joinRule` field (required)
1391    pub fn join_rule(
1392        mut self,
1393        value: impl Into<group::JoinRule<S>>,
1394    ) -> JoinLinkViewBuilder<join_link_view_state::SetJoinRule<St>, S> {
1395        self._fields.3 = Option::Some(value.into());
1396        JoinLinkViewBuilder {
1397            _state: PhantomData,
1398            _fields: self._fields,
1399            _type: PhantomData,
1400        }
1401    }
1402}
1403
1404impl<St, S: BosStr> JoinLinkViewBuilder<St, S>
1405where
1406    St: join_link_view_state::State,
1407    St::RequireApproval: join_link_view_state::IsUnset,
1408{
1409    /// Set the `requireApproval` field (required)
1410    pub fn require_approval(
1411        mut self,
1412        value: impl Into<bool>,
1413    ) -> JoinLinkViewBuilder<join_link_view_state::SetRequireApproval<St>, S> {
1414        self._fields.4 = Option::Some(value.into());
1415        JoinLinkViewBuilder {
1416            _state: PhantomData,
1417            _fields: self._fields,
1418            _type: PhantomData,
1419        }
1420    }
1421}
1422
1423impl<St, S: BosStr> JoinLinkViewBuilder<St, S>
1424where
1425    St: join_link_view_state::State,
1426    St::Code: join_link_view_state::IsSet,
1427    St::CreatedAt: join_link_view_state::IsSet,
1428    St::EnabledStatus: join_link_view_state::IsSet,
1429    St::JoinRule: join_link_view_state::IsSet,
1430    St::RequireApproval: join_link_view_state::IsSet,
1431{
1432    /// Build the final struct.
1433    pub fn build(self) -> JoinLinkView<S> {
1434        JoinLinkView {
1435            code: self._fields.0.unwrap(),
1436            created_at: self._fields.1.unwrap(),
1437            enabled_status: self._fields.2.unwrap(),
1438            join_rule: self._fields.3.unwrap(),
1439            require_approval: self._fields.4.unwrap(),
1440            extra_data: Default::default(),
1441        }
1442    }
1443    /// Build the final struct with custom extra_data.
1444    pub fn build_with_data(
1445        self,
1446        extra_data: BTreeMap<SmolStr, Data<S>>,
1447    ) -> JoinLinkView<S> {
1448        JoinLinkView {
1449            code: self._fields.0.unwrap(),
1450            created_at: self._fields.1.unwrap(),
1451            enabled_status: self._fields.2.unwrap(),
1452            join_rule: self._fields.3.unwrap(),
1453            require_approval: self._fields.4.unwrap(),
1454            extra_data: Some(extra_data),
1455        }
1456    }
1457}
1458
1459pub mod join_request_convo_view_state {
1460
1461    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
1462    #[allow(unused)]
1463    use ::core::marker::PhantomData;
1464    mod sealed {
1465        pub trait Sealed {}
1466    }
1467    /// State trait tracking which required fields have been set
1468    pub trait State: sealed::Sealed {
1469        type ConvoId;
1470        type MemberCount;
1471        type MemberLimit;
1472        type Name;
1473        type Owner;
1474        type Viewer;
1475    }
1476    /// Empty state - all required fields are unset
1477    pub struct Empty(());
1478    impl sealed::Sealed for Empty {}
1479    impl State for Empty {
1480        type ConvoId = Unset;
1481        type MemberCount = Unset;
1482        type MemberLimit = Unset;
1483        type Name = Unset;
1484        type Owner = Unset;
1485        type Viewer = Unset;
1486    }
1487    ///State transition - sets the `convo_id` field to Set
1488    pub struct SetConvoId<St: State = Empty>(PhantomData<fn() -> St>);
1489    impl<St: State> sealed::Sealed for SetConvoId<St> {}
1490    impl<St: State> State for SetConvoId<St> {
1491        type ConvoId = Set<members::convo_id>;
1492        type MemberCount = St::MemberCount;
1493        type MemberLimit = St::MemberLimit;
1494        type Name = St::Name;
1495        type Owner = St::Owner;
1496        type Viewer = St::Viewer;
1497    }
1498    ///State transition - sets the `member_count` field to Set
1499    pub struct SetMemberCount<St: State = Empty>(PhantomData<fn() -> St>);
1500    impl<St: State> sealed::Sealed for SetMemberCount<St> {}
1501    impl<St: State> State for SetMemberCount<St> {
1502        type ConvoId = St::ConvoId;
1503        type MemberCount = Set<members::member_count>;
1504        type MemberLimit = St::MemberLimit;
1505        type Name = St::Name;
1506        type Owner = St::Owner;
1507        type Viewer = St::Viewer;
1508    }
1509    ///State transition - sets the `member_limit` field to Set
1510    pub struct SetMemberLimit<St: State = Empty>(PhantomData<fn() -> St>);
1511    impl<St: State> sealed::Sealed for SetMemberLimit<St> {}
1512    impl<St: State> State for SetMemberLimit<St> {
1513        type ConvoId = St::ConvoId;
1514        type MemberCount = St::MemberCount;
1515        type MemberLimit = Set<members::member_limit>;
1516        type Name = St::Name;
1517        type Owner = St::Owner;
1518        type Viewer = St::Viewer;
1519    }
1520    ///State transition - sets the `name` field to Set
1521    pub struct SetName<St: State = Empty>(PhantomData<fn() -> St>);
1522    impl<St: State> sealed::Sealed for SetName<St> {}
1523    impl<St: State> State for SetName<St> {
1524        type ConvoId = St::ConvoId;
1525        type MemberCount = St::MemberCount;
1526        type MemberLimit = St::MemberLimit;
1527        type Name = Set<members::name>;
1528        type Owner = St::Owner;
1529        type Viewer = St::Viewer;
1530    }
1531    ///State transition - sets the `owner` field to Set
1532    pub struct SetOwner<St: State = Empty>(PhantomData<fn() -> St>);
1533    impl<St: State> sealed::Sealed for SetOwner<St> {}
1534    impl<St: State> State for SetOwner<St> {
1535        type ConvoId = St::ConvoId;
1536        type MemberCount = St::MemberCount;
1537        type MemberLimit = St::MemberLimit;
1538        type Name = St::Name;
1539        type Owner = Set<members::owner>;
1540        type Viewer = St::Viewer;
1541    }
1542    ///State transition - sets the `viewer` field to Set
1543    pub struct SetViewer<St: State = Empty>(PhantomData<fn() -> St>);
1544    impl<St: State> sealed::Sealed for SetViewer<St> {}
1545    impl<St: State> State for SetViewer<St> {
1546        type ConvoId = St::ConvoId;
1547        type MemberCount = St::MemberCount;
1548        type MemberLimit = St::MemberLimit;
1549        type Name = St::Name;
1550        type Owner = St::Owner;
1551        type Viewer = Set<members::viewer>;
1552    }
1553    /// Marker types for field names
1554    #[allow(non_camel_case_types)]
1555    pub mod members {
1556        ///Marker type for the `convo_id` field
1557        pub struct convo_id(());
1558        ///Marker type for the `member_count` field
1559        pub struct member_count(());
1560        ///Marker type for the `member_limit` field
1561        pub struct member_limit(());
1562        ///Marker type for the `name` field
1563        pub struct name(());
1564        ///Marker type for the `owner` field
1565        pub struct owner(());
1566        ///Marker type for the `viewer` field
1567        pub struct viewer(());
1568    }
1569}
1570
1571/// Builder for constructing an instance of this type.
1572pub struct JoinRequestConvoViewBuilder<
1573    St: join_request_convo_view_state::State,
1574    S: BosStr = DefaultStr,
1575> {
1576    _state: PhantomData<fn() -> St>,
1577    _fields: (
1578        Option<S>,
1579        Option<i64>,
1580        Option<i64>,
1581        Option<S>,
1582        Option<ProfileViewBasic<S>>,
1583        Option<group::JoinLinkViewerState<S>>,
1584    ),
1585    _type: PhantomData<fn() -> S>,
1586}
1587
1588impl JoinRequestConvoView<DefaultStr> {
1589    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
1590    pub fn new() -> JoinRequestConvoViewBuilder<
1591        join_request_convo_view_state::Empty,
1592        DefaultStr,
1593    > {
1594        JoinRequestConvoViewBuilder::new()
1595    }
1596}
1597
1598impl<S: BosStr> JoinRequestConvoView<S> {
1599    /// Create a new builder for this type
1600    pub fn builder() -> JoinRequestConvoViewBuilder<
1601        join_request_convo_view_state::Empty,
1602        S,
1603    > {
1604        JoinRequestConvoViewBuilder::builder()
1605    }
1606}
1607
1608impl JoinRequestConvoViewBuilder<join_request_convo_view_state::Empty, DefaultStr> {
1609    /// Create a new builder with all fields unset, using the default string type, if needed
1610    pub fn new() -> Self {
1611        JoinRequestConvoViewBuilder {
1612            _state: PhantomData,
1613            _fields: (None, None, None, None, None, None),
1614            _type: PhantomData,
1615        }
1616    }
1617}
1618
1619impl<S: BosStr> JoinRequestConvoViewBuilder<join_request_convo_view_state::Empty, S> {
1620    /// Create a new builder with all fields unset
1621    pub fn builder() -> Self {
1622        JoinRequestConvoViewBuilder {
1623            _state: PhantomData,
1624            _fields: (None, None, None, None, None, None),
1625            _type: PhantomData,
1626        }
1627    }
1628}
1629
1630impl<St, S: BosStr> JoinRequestConvoViewBuilder<St, S>
1631where
1632    St: join_request_convo_view_state::State,
1633    St::ConvoId: join_request_convo_view_state::IsUnset,
1634{
1635    /// Set the `convoId` field (required)
1636    pub fn convo_id(
1637        mut self,
1638        value: impl Into<S>,
1639    ) -> JoinRequestConvoViewBuilder<join_request_convo_view_state::SetConvoId<St>, S> {
1640        self._fields.0 = Option::Some(value.into());
1641        JoinRequestConvoViewBuilder {
1642            _state: PhantomData,
1643            _fields: self._fields,
1644            _type: PhantomData,
1645        }
1646    }
1647}
1648
1649impl<St, S: BosStr> JoinRequestConvoViewBuilder<St, S>
1650where
1651    St: join_request_convo_view_state::State,
1652    St::MemberCount: join_request_convo_view_state::IsUnset,
1653{
1654    /// Set the `memberCount` field (required)
1655    pub fn member_count(
1656        mut self,
1657        value: impl Into<i64>,
1658    ) -> JoinRequestConvoViewBuilder<
1659        join_request_convo_view_state::SetMemberCount<St>,
1660        S,
1661    > {
1662        self._fields.1 = Option::Some(value.into());
1663        JoinRequestConvoViewBuilder {
1664            _state: PhantomData,
1665            _fields: self._fields,
1666            _type: PhantomData,
1667        }
1668    }
1669}
1670
1671impl<St, S: BosStr> JoinRequestConvoViewBuilder<St, S>
1672where
1673    St: join_request_convo_view_state::State,
1674    St::MemberLimit: join_request_convo_view_state::IsUnset,
1675{
1676    /// Set the `memberLimit` field (required)
1677    pub fn member_limit(
1678        mut self,
1679        value: impl Into<i64>,
1680    ) -> JoinRequestConvoViewBuilder<
1681        join_request_convo_view_state::SetMemberLimit<St>,
1682        S,
1683    > {
1684        self._fields.2 = Option::Some(value.into());
1685        JoinRequestConvoViewBuilder {
1686            _state: PhantomData,
1687            _fields: self._fields,
1688            _type: PhantomData,
1689        }
1690    }
1691}
1692
1693impl<St, S: BosStr> JoinRequestConvoViewBuilder<St, S>
1694where
1695    St: join_request_convo_view_state::State,
1696    St::Name: join_request_convo_view_state::IsUnset,
1697{
1698    /// Set the `name` field (required)
1699    pub fn name(
1700        mut self,
1701        value: impl Into<S>,
1702    ) -> JoinRequestConvoViewBuilder<join_request_convo_view_state::SetName<St>, S> {
1703        self._fields.3 = Option::Some(value.into());
1704        JoinRequestConvoViewBuilder {
1705            _state: PhantomData,
1706            _fields: self._fields,
1707            _type: PhantomData,
1708        }
1709    }
1710}
1711
1712impl<St, S: BosStr> JoinRequestConvoViewBuilder<St, S>
1713where
1714    St: join_request_convo_view_state::State,
1715    St::Owner: join_request_convo_view_state::IsUnset,
1716{
1717    /// Set the `owner` field (required)
1718    pub fn owner(
1719        mut self,
1720        value: impl Into<ProfileViewBasic<S>>,
1721    ) -> JoinRequestConvoViewBuilder<join_request_convo_view_state::SetOwner<St>, S> {
1722        self._fields.4 = Option::Some(value.into());
1723        JoinRequestConvoViewBuilder {
1724            _state: PhantomData,
1725            _fields: self._fields,
1726            _type: PhantomData,
1727        }
1728    }
1729}
1730
1731impl<St, S: BosStr> JoinRequestConvoViewBuilder<St, S>
1732where
1733    St: join_request_convo_view_state::State,
1734    St::Viewer: join_request_convo_view_state::IsUnset,
1735{
1736    /// Set the `viewer` field (required)
1737    pub fn viewer(
1738        mut self,
1739        value: impl Into<group::JoinLinkViewerState<S>>,
1740    ) -> JoinRequestConvoViewBuilder<join_request_convo_view_state::SetViewer<St>, S> {
1741        self._fields.5 = Option::Some(value.into());
1742        JoinRequestConvoViewBuilder {
1743            _state: PhantomData,
1744            _fields: self._fields,
1745            _type: PhantomData,
1746        }
1747    }
1748}
1749
1750impl<St, S: BosStr> JoinRequestConvoViewBuilder<St, S>
1751where
1752    St: join_request_convo_view_state::State,
1753    St::ConvoId: join_request_convo_view_state::IsSet,
1754    St::MemberCount: join_request_convo_view_state::IsSet,
1755    St::MemberLimit: join_request_convo_view_state::IsSet,
1756    St::Name: join_request_convo_view_state::IsSet,
1757    St::Owner: join_request_convo_view_state::IsSet,
1758    St::Viewer: join_request_convo_view_state::IsSet,
1759{
1760    /// Build the final struct.
1761    pub fn build(self) -> JoinRequestConvoView<S> {
1762        JoinRequestConvoView {
1763            convo_id: self._fields.0.unwrap(),
1764            member_count: self._fields.1.unwrap(),
1765            member_limit: self._fields.2.unwrap(),
1766            name: self._fields.3.unwrap(),
1767            owner: self._fields.4.unwrap(),
1768            viewer: self._fields.5.unwrap(),
1769            extra_data: Default::default(),
1770        }
1771    }
1772    /// Build the final struct with custom extra_data.
1773    pub fn build_with_data(
1774        self,
1775        extra_data: BTreeMap<SmolStr, Data<S>>,
1776    ) -> JoinRequestConvoView<S> {
1777        JoinRequestConvoView {
1778            convo_id: self._fields.0.unwrap(),
1779            member_count: self._fields.1.unwrap(),
1780            member_limit: self._fields.2.unwrap(),
1781            name: self._fields.3.unwrap(),
1782            owner: self._fields.4.unwrap(),
1783            viewer: self._fields.5.unwrap(),
1784            extra_data: Some(extra_data),
1785        }
1786    }
1787}
1788
1789pub mod join_request_view_state {
1790
1791    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
1792    #[allow(unused)]
1793    use ::core::marker::PhantomData;
1794    mod sealed {
1795        pub trait Sealed {}
1796    }
1797    /// State trait tracking which required fields have been set
1798    pub trait State: sealed::Sealed {
1799        type ConvoId;
1800        type RequestedAt;
1801        type RequestedBy;
1802    }
1803    /// Empty state - all required fields are unset
1804    pub struct Empty(());
1805    impl sealed::Sealed for Empty {}
1806    impl State for Empty {
1807        type ConvoId = Unset;
1808        type RequestedAt = Unset;
1809        type RequestedBy = Unset;
1810    }
1811    ///State transition - sets the `convo_id` field to Set
1812    pub struct SetConvoId<St: State = Empty>(PhantomData<fn() -> St>);
1813    impl<St: State> sealed::Sealed for SetConvoId<St> {}
1814    impl<St: State> State for SetConvoId<St> {
1815        type ConvoId = Set<members::convo_id>;
1816        type RequestedAt = St::RequestedAt;
1817        type RequestedBy = St::RequestedBy;
1818    }
1819    ///State transition - sets the `requested_at` field to Set
1820    pub struct SetRequestedAt<St: State = Empty>(PhantomData<fn() -> St>);
1821    impl<St: State> sealed::Sealed for SetRequestedAt<St> {}
1822    impl<St: State> State for SetRequestedAt<St> {
1823        type ConvoId = St::ConvoId;
1824        type RequestedAt = Set<members::requested_at>;
1825        type RequestedBy = St::RequestedBy;
1826    }
1827    ///State transition - sets the `requested_by` field to Set
1828    pub struct SetRequestedBy<St: State = Empty>(PhantomData<fn() -> St>);
1829    impl<St: State> sealed::Sealed for SetRequestedBy<St> {}
1830    impl<St: State> State for SetRequestedBy<St> {
1831        type ConvoId = St::ConvoId;
1832        type RequestedAt = St::RequestedAt;
1833        type RequestedBy = Set<members::requested_by>;
1834    }
1835    /// Marker types for field names
1836    #[allow(non_camel_case_types)]
1837    pub mod members {
1838        ///Marker type for the `convo_id` field
1839        pub struct convo_id(());
1840        ///Marker type for the `requested_at` field
1841        pub struct requested_at(());
1842        ///Marker type for the `requested_by` field
1843        pub struct requested_by(());
1844    }
1845}
1846
1847/// Builder for constructing an instance of this type.
1848pub struct JoinRequestViewBuilder<
1849    St: join_request_view_state::State,
1850    S: BosStr = DefaultStr,
1851> {
1852    _state: PhantomData<fn() -> St>,
1853    _fields: (Option<S>, Option<Datetime>, Option<ProfileViewBasic<S>>),
1854    _type: PhantomData<fn() -> S>,
1855}
1856
1857impl JoinRequestView<DefaultStr> {
1858    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
1859    pub fn new() -> JoinRequestViewBuilder<join_request_view_state::Empty, DefaultStr> {
1860        JoinRequestViewBuilder::new()
1861    }
1862}
1863
1864impl<S: BosStr> JoinRequestView<S> {
1865    /// Create a new builder for this type
1866    pub fn builder() -> JoinRequestViewBuilder<join_request_view_state::Empty, S> {
1867        JoinRequestViewBuilder::builder()
1868    }
1869}
1870
1871impl JoinRequestViewBuilder<join_request_view_state::Empty, DefaultStr> {
1872    /// Create a new builder with all fields unset, using the default string type, if needed
1873    pub fn new() -> Self {
1874        JoinRequestViewBuilder {
1875            _state: PhantomData,
1876            _fields: (None, None, None),
1877            _type: PhantomData,
1878        }
1879    }
1880}
1881
1882impl<S: BosStr> JoinRequestViewBuilder<join_request_view_state::Empty, S> {
1883    /// Create a new builder with all fields unset
1884    pub fn builder() -> Self {
1885        JoinRequestViewBuilder {
1886            _state: PhantomData,
1887            _fields: (None, None, None),
1888            _type: PhantomData,
1889        }
1890    }
1891}
1892
1893impl<St, S: BosStr> JoinRequestViewBuilder<St, S>
1894where
1895    St: join_request_view_state::State,
1896    St::ConvoId: join_request_view_state::IsUnset,
1897{
1898    /// Set the `convoId` field (required)
1899    pub fn convo_id(
1900        mut self,
1901        value: impl Into<S>,
1902    ) -> JoinRequestViewBuilder<join_request_view_state::SetConvoId<St>, S> {
1903        self._fields.0 = Option::Some(value.into());
1904        JoinRequestViewBuilder {
1905            _state: PhantomData,
1906            _fields: self._fields,
1907            _type: PhantomData,
1908        }
1909    }
1910}
1911
1912impl<St, S: BosStr> JoinRequestViewBuilder<St, S>
1913where
1914    St: join_request_view_state::State,
1915    St::RequestedAt: join_request_view_state::IsUnset,
1916{
1917    /// Set the `requestedAt` field (required)
1918    pub fn requested_at(
1919        mut self,
1920        value: impl Into<Datetime>,
1921    ) -> JoinRequestViewBuilder<join_request_view_state::SetRequestedAt<St>, S> {
1922        self._fields.1 = Option::Some(value.into());
1923        JoinRequestViewBuilder {
1924            _state: PhantomData,
1925            _fields: self._fields,
1926            _type: PhantomData,
1927        }
1928    }
1929}
1930
1931impl<St, S: BosStr> JoinRequestViewBuilder<St, S>
1932where
1933    St: join_request_view_state::State,
1934    St::RequestedBy: join_request_view_state::IsUnset,
1935{
1936    /// Set the `requestedBy` field (required)
1937    pub fn requested_by(
1938        mut self,
1939        value: impl Into<ProfileViewBasic<S>>,
1940    ) -> JoinRequestViewBuilder<join_request_view_state::SetRequestedBy<St>, S> {
1941        self._fields.2 = Option::Some(value.into());
1942        JoinRequestViewBuilder {
1943            _state: PhantomData,
1944            _fields: self._fields,
1945            _type: PhantomData,
1946        }
1947    }
1948}
1949
1950impl<St, S: BosStr> JoinRequestViewBuilder<St, S>
1951where
1952    St: join_request_view_state::State,
1953    St::ConvoId: join_request_view_state::IsSet,
1954    St::RequestedAt: join_request_view_state::IsSet,
1955    St::RequestedBy: join_request_view_state::IsSet,
1956{
1957    /// Build the final struct.
1958    pub fn build(self) -> JoinRequestView<S> {
1959        JoinRequestView {
1960            convo_id: self._fields.0.unwrap(),
1961            requested_at: self._fields.1.unwrap(),
1962            requested_by: self._fields.2.unwrap(),
1963            extra_data: Default::default(),
1964        }
1965    }
1966    /// Build the final struct with custom extra_data.
1967    pub fn build_with_data(
1968        self,
1969        extra_data: BTreeMap<SmolStr, Data<S>>,
1970    ) -> JoinRequestView<S> {
1971        JoinRequestView {
1972            convo_id: self._fields.0.unwrap(),
1973            requested_at: self._fields.1.unwrap(),
1974            requested_by: self._fields.2.unwrap(),
1975            extra_data: Some(extra_data),
1976        }
1977    }
1978}