Skip to main content

jacquard_api/chat_bsky/
convo.rs

1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: chat.bsky.convo.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.convo` Lexicon namespace/module.
9pub mod accept_convo;
10pub mod add_reaction;
11pub mod delete_message_for_self;
12pub mod get_convo;
13pub mod get_convo_availability;
14pub mod get_convo_for_members;
15pub mod get_convo_members;
16pub mod get_log;
17pub mod get_messages;
18pub mod get_unread_counts;
19pub mod leave_convo;
20pub mod list_convo_requests;
21pub mod list_convos;
22pub mod lock_convo;
23pub mod mute_convo;
24pub mod remove_reaction;
25pub mod send_message;
26pub mod send_message_batch;
27pub mod unlock_convo;
28pub mod unmute_convo;
29pub mod update_all_read;
30pub mod update_read;
31
32
33#[allow(unused_imports)]
34use alloc::collections::BTreeMap;
35
36#[allow(unused_imports)]
37use core::marker::PhantomData;
38use jacquard_common::{CowStr, BosStr, DefaultStr, FromStaticStr};
39
40#[allow(unused_imports)]
41use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation;
42use jacquard_common::deps::smol_str::SmolStr;
43use jacquard_common::types::string::{Did, Datetime};
44use jacquard_common::types::value::Data;
45use jacquard_derive::{IntoStatic, open_union};
46use jacquard_lexicon::lexicon::LexiconDoc;
47use jacquard_lexicon::schema::LexiconSchema;
48
49#[allow(unused_imports)]
50use jacquard_lexicon::validation::{ConstraintError, ValidationPath};
51use serde::{Serialize, Deserialize};
52use crate::app_bsky::embed::record::Record;
53use crate::app_bsky::richtext::facet::Facet;
54use crate::chat_bsky::actor::MemberRole;
55use crate::chat_bsky::actor::ProfileViewBasic;
56use crate::chat_bsky::embed::join_link::JoinLink;
57use crate::chat_bsky::group::JoinLinkView;
58use crate::app_bsky::embed::record;
59use crate::chat_bsky::convo;
60use crate::chat_bsky::embed::join_link;
61
62#[derive(Debug, Clone, PartialEq, Eq, Hash)]
63pub enum ConvoKind<S: BosStr = DefaultStr> {
64    Direct,
65    Group,
66    Other(S),
67}
68
69impl<S: BosStr> ConvoKind<S> {
70    pub fn as_str(&self) -> &str {
71        match self {
72            Self::Direct => "direct",
73            Self::Group => "group",
74            Self::Other(s) => s.as_ref(),
75        }
76    }
77    /// Construct from a string-like value, matching known values.
78    pub fn from_value(s: S) -> Self {
79        match s.as_ref() {
80            "direct" => Self::Direct,
81            "group" => Self::Group,
82            _ => Self::Other(s),
83        }
84    }
85}
86
87impl<S: BosStr> AsRef<str> for ConvoKind<S> {
88    fn as_ref(&self) -> &str {
89        self.as_str()
90    }
91}
92
93impl<S: BosStr> core::fmt::Display for ConvoKind<S> {
94    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
95        write!(f, "{}", self.as_str())
96    }
97}
98
99impl<S: BosStr> Serialize for ConvoKind<S> {
100    fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
101    where
102        Ser: serde::Serializer,
103    {
104        serializer.serialize_str(self.as_str())
105    }
106}
107
108impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for ConvoKind<S> {
109    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
110    where
111        D: serde::Deserializer<'de>,
112    {
113        let s = S::deserialize(deserializer)?;
114        Ok(Self::from_value(s))
115    }
116}
117
118impl<S: BosStr> jacquard_common::IntoStatic for ConvoKind<S>
119where
120    S: BosStr + jacquard_common::IntoStatic,
121    S::Output: BosStr,
122{
123    type Output = ConvoKind<S::Output>;
124    fn into_static(self) -> Self::Output {
125        match self {
126            ConvoKind::Direct => ConvoKind::Direct,
127            ConvoKind::Group => ConvoKind::Group,
128            ConvoKind::Other(v) => ConvoKind::Other(v.into_static()),
129        }
130    }
131}
132
133
134#[derive(Debug, Clone, PartialEq, Eq, Hash)]
135pub enum ConvoLockStatus<S: BosStr = DefaultStr> {
136    Unlocked,
137    Locked,
138    LockedPermanently,
139    Other(S),
140}
141
142impl<S: BosStr> ConvoLockStatus<S> {
143    pub fn as_str(&self) -> &str {
144        match self {
145            Self::Unlocked => "unlocked",
146            Self::Locked => "locked",
147            Self::LockedPermanently => "locked-permanently",
148            Self::Other(s) => s.as_ref(),
149        }
150    }
151    /// Construct from a string-like value, matching known values.
152    pub fn from_value(s: S) -> Self {
153        match s.as_ref() {
154            "unlocked" => Self::Unlocked,
155            "locked" => Self::Locked,
156            "locked-permanently" => Self::LockedPermanently,
157            _ => Self::Other(s),
158        }
159    }
160}
161
162impl<S: BosStr> AsRef<str> for ConvoLockStatus<S> {
163    fn as_ref(&self) -> &str {
164        self.as_str()
165    }
166}
167
168impl<S: BosStr> core::fmt::Display for ConvoLockStatus<S> {
169    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
170        write!(f, "{}", self.as_str())
171    }
172}
173
174impl<S: BosStr> Serialize for ConvoLockStatus<S> {
175    fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
176    where
177        Ser: serde::Serializer,
178    {
179        serializer.serialize_str(self.as_str())
180    }
181}
182
183impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for ConvoLockStatus<S> {
184    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
185    where
186        D: serde::Deserializer<'de>,
187    {
188        let s = S::deserialize(deserializer)?;
189        Ok(Self::from_value(s))
190    }
191}
192
193impl<S: BosStr> jacquard_common::IntoStatic for ConvoLockStatus<S>
194where
195    S: BosStr + jacquard_common::IntoStatic,
196    S::Output: BosStr,
197{
198    type Output = ConvoLockStatus<S::Output>;
199    fn into_static(self) -> Self::Output {
200        match self {
201            ConvoLockStatus::Unlocked => ConvoLockStatus::Unlocked,
202            ConvoLockStatus::Locked => ConvoLockStatus::Locked,
203            ConvoLockStatus::LockedPermanently => ConvoLockStatus::LockedPermanently,
204            ConvoLockStatus::Other(v) => ConvoLockStatus::Other(v.into_static()),
205        }
206    }
207}
208
209
210#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
211#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
212pub struct ConvoRef<S: BosStr = DefaultStr> {
213    pub convo_id: S,
214    pub did: Did<S>,
215    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
216    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
217}
218
219
220#[derive(Debug, Clone, PartialEq, Eq, Hash)]
221pub enum ConvoStatus<S: BosStr = DefaultStr> {
222    Request,
223    Accepted,
224    Other(S),
225}
226
227impl<S: BosStr> ConvoStatus<S> {
228    pub fn as_str(&self) -> &str {
229        match self {
230            Self::Request => "request",
231            Self::Accepted => "accepted",
232            Self::Other(s) => s.as_ref(),
233        }
234    }
235    /// Construct from a string-like value, matching known values.
236    pub fn from_value(s: S) -> Self {
237        match s.as_ref() {
238            "request" => Self::Request,
239            "accepted" => Self::Accepted,
240            _ => Self::Other(s),
241        }
242    }
243}
244
245impl<S: BosStr> AsRef<str> for ConvoStatus<S> {
246    fn as_ref(&self) -> &str {
247        self.as_str()
248    }
249}
250
251impl<S: BosStr> core::fmt::Display for ConvoStatus<S> {
252    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
253        write!(f, "{}", self.as_str())
254    }
255}
256
257impl<S: BosStr> Serialize for ConvoStatus<S> {
258    fn serialize<Ser>(&self, serializer: Ser) -> Result<Ser::Ok, Ser::Error>
259    where
260        Ser: serde::Serializer,
261    {
262        serializer.serialize_str(self.as_str())
263    }
264}
265
266impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for ConvoStatus<S> {
267    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
268    where
269        D: serde::Deserializer<'de>,
270    {
271        let s = S::deserialize(deserializer)?;
272        Ok(Self::from_value(s))
273    }
274}
275
276impl<S: BosStr> jacquard_common::IntoStatic for ConvoStatus<S>
277where
278    S: BosStr + jacquard_common::IntoStatic,
279    S::Output: BosStr,
280{
281    type Output = ConvoStatus<S::Output>;
282    fn into_static(self) -> Self::Output {
283        match self {
284            ConvoStatus::Request => ConvoStatus::Request,
285            ConvoStatus::Accepted => ConvoStatus::Accepted,
286            ConvoStatus::Other(v) => ConvoStatus::Other(v.into_static()),
287        }
288    }
289}
290
291
292#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
293#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
294pub struct ConvoView<S: BosStr = DefaultStr> {
295    pub id: S,
296    ///Union field that has data specific to different kinds of convos.
297    #[serde(skip_serializing_if = "Option::is_none")]
298    pub kind: Option<ConvoViewKind<S>>,
299    #[serde(skip_serializing_if = "Option::is_none")]
300    pub last_message: Option<ConvoViewLastMessage<S>>,
301    #[serde(skip_serializing_if = "Option::is_none")]
302    pub last_reaction: Option<convo::MessageAndReactionView<S>>,
303    ///Members of this conversation. For direct convos, it will be an immutable list of the 2 members. For group convos, it will a list of important members (the first few members, the viewer, the member who added the viewer, the member who sent the last message, the member who sent the last reaction), but will not contain the full list of members. Use chat.bsky.convo.getConvoMembers to list all members.
304    pub members: Vec<ProfileViewBasic<S>>,
305    pub muted: bool,
306    pub rev: S,
307    ///Convo status for the viewer member (not the convo itself).
308    #[serde(skip_serializing_if = "Option::is_none")]
309    pub status: Option<convo::ConvoStatus<S>>,
310    pub unread_count: i64,
311    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
312    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
313}
314
315
316#[open_union]
317#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
318#[serde(tag = "$type", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
319pub enum ConvoViewKind<S: BosStr = DefaultStr> {
320    #[serde(rename = "chat.bsky.convo.defs#directConvo")]
321    DirectConvo(Box<convo::DirectConvo<S>>),
322    #[serde(rename = "chat.bsky.convo.defs#groupConvo")]
323    GroupConvo(Box<convo::GroupConvo<S>>),
324}
325
326
327#[open_union]
328#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
329#[serde(tag = "$type", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
330pub enum ConvoViewLastMessage<S: BosStr = DefaultStr> {
331    #[serde(rename = "chat.bsky.convo.defs#messageView")]
332    MessageView(Box<convo::MessageView<S>>),
333    #[serde(rename = "chat.bsky.convo.defs#deletedMessageView")]
334    DeletedMessageView(Box<convo::DeletedMessageView<S>>),
335    #[serde(rename = "chat.bsky.convo.defs#systemMessageView")]
336    SystemMessageView(Box<convo::SystemMessageView<S>>),
337}
338
339
340#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
341#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
342pub struct DeletedMessageView<S: BosStr = DefaultStr> {
343    pub id: S,
344    pub rev: S,
345    pub sender: convo::MessageViewSender<S>,
346    pub sent_at: Datetime,
347    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
348    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
349}
350
351/// [NOTE: This is under active development and should be considered unstable while this note is here].
352
353#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
354#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
355pub struct DirectConvo<S: BosStr = DefaultStr> {
356    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
357    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
358}
359
360/// [NOTE: This is under active development and should be considered unstable while this note is here].
361
362#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
363#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
364pub struct GroupConvo<S: BosStr = DefaultStr> {
365    pub created_at: Datetime,
366    #[serde(skip_serializing_if = "Option::is_none")]
367    pub join_link: Option<JoinLinkView<S>>,
368    ///The total number of pending join requests for the group conversation. Only present for the owner. Capped at 21.
369    #[serde(skip_serializing_if = "Option::is_none")]
370    pub join_request_count: Option<i64>,
371    ///The lock status of the conversation.
372    pub lock_status: convo::ConvoLockStatus<S>,
373    ///Whether the lock status is being forced by a moderation override (account inactivation or convo takedown) rather than the owner's own setting.
374    pub lock_status_moderation_override: bool,
375    ///The total number of members in the group conversation.
376    pub member_count: i64,
377    ///The maximum number of members allowed in the group conversation.
378    pub member_limit: i64,
379    ///The display name of the group conversation.
380    pub name: S,
381    ///The number of unread join requests for the group conversation. Only present for the owner.
382    #[serde(skip_serializing_if = "Option::is_none")]
383    pub unread_join_request_count: Option<i64>,
384    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
385    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
386}
387
388/// Event indicating the viewer accepted a convo, and it can be moved out of the request inbox. Can be direct or group.
389
390#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
391#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
392pub struct LogAcceptConvo<S: BosStr = DefaultStr> {
393    pub convo_id: S,
394    pub rev: S,
395    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
396    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
397}
398
399/// [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member was added to a group convo. The member who was added gets a logBeginConvo (to create the convo) but also a logAddMember (to show the system message as the first message the user sees).
400
401#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
402#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
403pub struct LogAddMember<S: BosStr = DefaultStr> {
404    pub convo_id: S,
405    ///A system message with data of type #systemMessageDataAddMember
406    pub message: convo::SystemMessageView<S>,
407    ///Profiles referred in the system message.
408    pub related_profiles: Vec<ProfileViewBasic<S>>,
409    pub rev: S,
410    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
411    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
412}
413
414/// Event indicating a reaction was added to a message.
415
416#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
417#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
418pub struct LogAddReaction<S: BosStr = DefaultStr> {
419    pub convo_id: S,
420    pub message: LogAddReactionMessage<S>,
421    pub reaction: convo::ReactionView<S>,
422    ///Profiles referred in the message and reaction views. This isn't required for compatibility, because it was added later, but should generally be present.
423    #[serde(skip_serializing_if = "Option::is_none")]
424    pub related_profiles: Option<Vec<ProfileViewBasic<S>>>,
425    pub rev: S,
426    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
427    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
428}
429
430
431#[open_union]
432#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
433#[serde(tag = "$type", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
434pub enum LogAddReactionMessage<S: BosStr = DefaultStr> {
435    #[serde(rename = "chat.bsky.convo.defs#messageView")]
436    MessageView(Box<convo::MessageView<S>>),
437    #[serde(rename = "chat.bsky.convo.defs#deletedMessageView")]
438    DeletedMessageView(Box<convo::DeletedMessageView<S>>),
439}
440
441/// [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join request was approved by the viewer. Only the owner gets this. The approved member gets a logBeginConvo.
442
443#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
444#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
445pub struct LogApproveJoinRequest<S: BosStr = DefaultStr> {
446    pub convo_id: S,
447    ///Prospective member who requested to join.
448    pub member: ProfileViewBasic<S>,
449    pub rev: S,
450    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
451    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
452}
453
454/// Event indicating a convo containing the viewer was started. Can be direct or group. When a member is added to a group convo, they also get this event.
455
456#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
457#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
458pub struct LogBeginConvo<S: BosStr = DefaultStr> {
459    pub convo_id: S,
460    pub rev: S,
461    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
462    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
463}
464
465/// [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join link was created for a group convo.
466
467#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
468#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
469pub struct LogCreateJoinLink<S: BosStr = DefaultStr> {
470    pub convo_id: S,
471    ///A system message with data of type #systemMessageDataCreateJoinLink
472    pub message: convo::SystemMessageView<S>,
473    pub rev: S,
474    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
475    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
476}
477
478/// Event indicating a user-originated message was created. Is not emitted for system messages.
479
480#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
481#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
482pub struct LogCreateMessage<S: BosStr = DefaultStr> {
483    pub convo_id: S,
484    pub message: LogCreateMessageMessage<S>,
485    ///Profiles referred to in the message view. This isn't required for compatibility, because it was added later, but should generally be present.
486    #[serde(skip_serializing_if = "Option::is_none")]
487    pub related_profiles: Option<Vec<ProfileViewBasic<S>>>,
488    pub rev: S,
489    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
490    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
491}
492
493
494#[open_union]
495#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
496#[serde(tag = "$type", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
497pub enum LogCreateMessageMessage<S: BosStr = DefaultStr> {
498    #[serde(rename = "chat.bsky.convo.defs#messageView")]
499    MessageView(Box<convo::MessageView<S>>),
500    #[serde(rename = "chat.bsky.convo.defs#deletedMessageView")]
501    DeletedMessageView(Box<convo::DeletedMessageView<S>>),
502}
503
504/// Event indicating a user-originated message was deleted. Is not emitted for system messages.
505
506#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
507#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
508pub struct LogDeleteMessage<S: BosStr = DefaultStr> {
509    pub convo_id: S,
510    pub message: LogDeleteMessageMessage<S>,
511    pub rev: S,
512    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
513    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
514}
515
516
517#[open_union]
518#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
519#[serde(tag = "$type", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
520pub enum LogDeleteMessageMessage<S: BosStr = DefaultStr> {
521    #[serde(rename = "chat.bsky.convo.defs#messageView")]
522    MessageView(Box<convo::MessageView<S>>),
523    #[serde(rename = "chat.bsky.convo.defs#deletedMessageView")]
524    DeletedMessageView(Box<convo::DeletedMessageView<S>>),
525}
526
527/// [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join link was disabled for a group convo.
528
529#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
530#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
531pub struct LogDisableJoinLink<S: BosStr = DefaultStr> {
532    pub convo_id: S,
533    ///A system message with data of type #systemMessageDataDisableJoinLink
534    pub message: convo::SystemMessageView<S>,
535    pub rev: S,
536    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
537    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
538}
539
540/// [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating info about group convo was edited.
541
542#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
543#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
544pub struct LogEditGroup<S: BosStr = DefaultStr> {
545    pub convo_id: S,
546    ///A system message with data of type #systemMessageDataEditGroup
547    pub message: convo::SystemMessageView<S>,
548    pub rev: S,
549    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
550    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
551}
552
553/// [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a settings about a join link for a group convo were edited.
554
555#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
556#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
557pub struct LogEditJoinLink<S: BosStr = DefaultStr> {
558    pub convo_id: S,
559    ///A system message with data of type #systemMessageDataEditJoinLink
560    pub message: convo::SystemMessageView<S>,
561    pub rev: S,
562    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
563    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
564}
565
566/// [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join link was enabled for a group convo.
567
568#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
569#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
570pub struct LogEnableJoinLink<S: BosStr = DefaultStr> {
571    pub convo_id: S,
572    ///A system message with data of type #systemMessageDataEnableJoinLink
573    pub message: convo::SystemMessageView<S>,
574    pub rev: S,
575    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
576    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
577}
578
579/// [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join request was made to a group the viewer owns. Only the owner gets this.
580
581#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
582#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
583pub struct LogIncomingJoinRequest<S: BosStr = DefaultStr> {
584    pub convo_id: S,
585    ///Prospective member who requested to join.
586    pub member: ProfileViewBasic<S>,
587    pub rev: S,
588    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
589    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
590}
591
592/// Event indicating the viewer left a convo. Can be direct or group.
593
594#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
595#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
596pub struct LogLeaveConvo<S: BosStr = DefaultStr> {
597    pub convo_id: S,
598    pub rev: S,
599    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
600    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
601}
602
603/// [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a group convo was locked.
604
605#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
606#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
607pub struct LogLockConvo<S: BosStr = DefaultStr> {
608    pub convo_id: S,
609    ///A system message with data of type #systemMessageDataLockConvo
610    pub message: convo::SystemMessageView<S>,
611    ///Profiles referred in the system message.
612    pub related_profiles: Vec<ProfileViewBasic<S>>,
613    pub rev: S,
614    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
615    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
616}
617
618/// [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a group convo was locked permanently.
619
620#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
621#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
622pub struct LogLockConvoPermanently<S: BosStr = DefaultStr> {
623    pub convo_id: S,
624    ///A system message with data of type #systemMessageDataLockConvoPermanently
625    pub message: convo::SystemMessageView<S>,
626    ///Profiles referred in the system message.
627    pub related_profiles: Vec<ProfileViewBasic<S>>,
628    pub rev: S,
629    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
630    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
631}
632
633/// [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member joined a group convo via join link. The member who was added gets a logBeginConvo (to create the convo) but also a logMemberJoin (to show the system message as the first message the user sees).
634
635#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
636#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
637pub struct LogMemberJoin<S: BosStr = DefaultStr> {
638    pub convo_id: S,
639    ///A system message with data of type #systemMessageDataMemberJoin
640    pub message: convo::SystemMessageView<S>,
641    ///Profiles referred in the system message.
642    pub related_profiles: Vec<ProfileViewBasic<S>>,
643    pub rev: S,
644    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
645    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
646}
647
648/// [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member voluntarily left a group convo. The member who was removed gets a logLeaveConvo (to leave the convo) but not a logMemberLeave (because they already left, so can't see the system message).
649
650#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
651#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
652pub struct LogMemberLeave<S: BosStr = DefaultStr> {
653    pub convo_id: S,
654    ///A system message with data of type #systemMessageDataMemberLeave
655    pub message: convo::SystemMessageView<S>,
656    ///Profiles referred in the system message.
657    pub related_profiles: Vec<ProfileViewBasic<S>>,
658    pub rev: S,
659    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
660    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
661}
662
663/// Event indicating the viewer muted a convo. Can be direct or group.
664
665#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
666#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
667pub struct LogMuteConvo<S: BosStr = DefaultStr> {
668    pub convo_id: S,
669    pub rev: S,
670    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
671    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
672}
673
674/// [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join request was made by the requester. Only requester actor gets this.
675
676#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
677#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
678pub struct LogOutgoingJoinRequest<S: BosStr = DefaultStr> {
679    pub convo_id: S,
680    pub rev: S,
681    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
682    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
683}
684
685/// [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a convo was read up to a certain message.
686
687#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
688#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
689pub struct LogReadConvo<S: BosStr = DefaultStr> {
690    pub convo_id: S,
691    pub message: LogReadConvoMessage<S>,
692    pub rev: S,
693    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
694    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
695}
696
697
698#[open_union]
699#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
700#[serde(tag = "$type", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
701pub enum LogReadConvoMessage<S: BosStr = DefaultStr> {
702    #[serde(rename = "chat.bsky.convo.defs#messageView")]
703    MessageView(Box<convo::MessageView<S>>),
704    #[serde(rename = "chat.bsky.convo.defs#deletedMessageView")]
705    DeletedMessageView(Box<convo::DeletedMessageView<S>>),
706    #[serde(rename = "chat.bsky.convo.defs#systemMessageView")]
707    SystemMessageView(Box<convo::SystemMessageView<S>>),
708}
709
710/// [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating the group owner marked join requests as read. Only the owner gets this.
711
712#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
713#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
714pub struct LogReadJoinRequests<S: BosStr = DefaultStr> {
715    pub convo_id: S,
716    pub rev: S,
717    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
718    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
719}
720
721/// DEPRECATED: use logReadConvo instead. Event indicating a convo was read up to a certain message.
722
723#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
724#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
725pub struct LogReadMessage<S: BosStr = DefaultStr> {
726    pub convo_id: S,
727    pub message: LogReadMessageMessage<S>,
728    pub rev: S,
729    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
730    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
731}
732
733
734#[open_union]
735#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
736#[serde(tag = "$type", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
737pub enum LogReadMessageMessage<S: BosStr = DefaultStr> {
738    #[serde(rename = "chat.bsky.convo.defs#messageView")]
739    MessageView(Box<convo::MessageView<S>>),
740    #[serde(rename = "chat.bsky.convo.defs#deletedMessageView")]
741    DeletedMessageView(Box<convo::DeletedMessageView<S>>),
742    #[serde(rename = "chat.bsky.convo.defs#systemMessageView")]
743    SystemMessageView(Box<convo::SystemMessageView<S>>),
744}
745
746/// [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join request was rejected by the viewer. Only the owner gets this.
747
748#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
749#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
750pub struct LogRejectJoinRequest<S: BosStr = DefaultStr> {
751    pub convo_id: S,
752    ///Prospective member who requested to join.
753    pub member: ProfileViewBasic<S>,
754    pub rev: S,
755    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
756    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
757}
758
759/// [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member was removed from a group convo. The member who was removed gets a logLeaveConvo (to leave the convo) but not a logRemoveMember (because they already left, so can't see the system message).
760
761#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
762#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
763pub struct LogRemoveMember<S: BosStr = DefaultStr> {
764    pub convo_id: S,
765    ///A system message with data of type #systemMessageDataRemoveMember
766    pub message: convo::SystemMessageView<S>,
767    ///Profiles referred in the system message.
768    pub related_profiles: Vec<ProfileViewBasic<S>>,
769    pub rev: S,
770    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
771    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
772}
773
774/// Event indicating a reaction was removed from a message.
775
776#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
777#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
778pub struct LogRemoveReaction<S: BosStr = DefaultStr> {
779    pub convo_id: S,
780    pub message: LogRemoveReactionMessage<S>,
781    pub reaction: convo::ReactionView<S>,
782    ///Profiles referred in the message and reaction views. This isn't required for compatibility, because it was added later, but should generally be present.
783    #[serde(skip_serializing_if = "Option::is_none")]
784    pub related_profiles: Option<Vec<ProfileViewBasic<S>>>,
785    pub rev: S,
786    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
787    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
788}
789
790
791#[open_union]
792#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
793#[serde(tag = "$type", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
794pub enum LogRemoveReactionMessage<S: BosStr = DefaultStr> {
795    #[serde(rename = "chat.bsky.convo.defs#messageView")]
796    MessageView(Box<convo::MessageView<S>>),
797    #[serde(rename = "chat.bsky.convo.defs#deletedMessageView")]
798    DeletedMessageView(Box<convo::DeletedMessageView<S>>),
799}
800
801/// [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a group convo was unlocked.
802
803#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
804#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
805pub struct LogUnlockConvo<S: BosStr = DefaultStr> {
806    pub convo_id: S,
807    ///A system message with data of type #systemMessageDataUnlockConvo
808    pub message: convo::SystemMessageView<S>,
809    ///Profiles referred in the system message.
810    pub related_profiles: Vec<ProfileViewBasic<S>>,
811    pub rev: S,
812    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
813    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
814}
815
816/// Event indicating the viewer unmuted a convo. Can be direct or group.
817
818#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
819#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
820pub struct LogUnmuteConvo<S: BosStr = DefaultStr> {
821    pub convo_id: S,
822    pub rev: S,
823    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
824    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
825}
826
827/// [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a prospective member withdrew their join request. Only the owner gets this.
828
829#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
830#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
831pub struct LogWithdrawIncomingJoinRequest<S: BosStr = DefaultStr> {
832    pub convo_id: S,
833    ///Prospective member who withdrew their join request.
834    pub member: ProfileViewBasic<S>,
835    pub rev: S,
836    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
837    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
838}
839
840/// [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating the viewer withdrew their own join request. Only requester actor gets this.
841
842#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
843#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
844pub struct LogWithdrawOutgoingJoinRequest<S: BosStr = DefaultStr> {
845    pub convo_id: S,
846    pub rev: S,
847    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
848    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
849}
850
851
852#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
853#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
854pub struct MessageAndReactionView<S: BosStr = DefaultStr> {
855    pub message: convo::MessageView<S>,
856    pub reaction: convo::ReactionView<S>,
857    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
858    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
859}
860
861
862#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
863#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
864pub struct MessageInput<S: BosStr = DefaultStr> {
865    #[serde(skip_serializing_if = "Option::is_none")]
866    pub embed: Option<MessageInputEmbed<S>>,
867    ///Annotations of text (mentions, URLs, hashtags, etc)
868    #[serde(skip_serializing_if = "Option::is_none")]
869    pub facets: Option<Vec<Facet<S>>>,
870    ///If set, the message this message is replying to. The referenced message must be in the same convo.
871    #[serde(skip_serializing_if = "Option::is_none")]
872    pub reply_to: Option<convo::ReplyRef<S>>,
873    pub text: S,
874    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
875    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
876}
877
878
879#[open_union]
880#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
881#[serde(tag = "$type", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
882pub enum MessageInputEmbed<S: BosStr = DefaultStr> {
883    #[serde(rename = "app.bsky.embed.record")]
884    Record(Box<Record<S>>),
885    #[serde(rename = "chat.bsky.embed.joinLink")]
886    JoinLink(Box<JoinLink<S>>),
887}
888
889
890#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
891#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
892pub struct MessageRef<S: BosStr = DefaultStr> {
893    pub convo_id: S,
894    pub did: Did<S>,
895    pub message_id: S,
896    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
897    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
898}
899
900
901#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
902#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
903pub struct MessageView<S: BosStr = DefaultStr> {
904    #[serde(skip_serializing_if = "Option::is_none")]
905    pub embed: Option<MessageViewEmbed<S>>,
906    ///Annotations of text (mentions, URLs, hashtags, etc)
907    #[serde(skip_serializing_if = "Option::is_none")]
908    pub facets: Option<Vec<Facet<S>>>,
909    pub id: S,
910    ///Reactions to this message, in ascending order of creation time.
911    #[serde(skip_serializing_if = "Option::is_none")]
912    pub reactions: Option<Vec<convo::ReactionView<S>>>,
913    ///If set, the message this message is replying to. The full view of the referenced message is embedded so the client can render it inline. Only a single level is embedded: the embedded message will not itself have a populated 'replyTo' field even if it was also a reply.
914    #[serde(skip_serializing_if = "Option::is_none")]
915    pub reply_to: Option<MessageViewReplyTo<S>>,
916    pub rev: S,
917    pub sender: convo::MessageViewSender<S>,
918    pub sent_at: Datetime,
919    pub text: S,
920    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
921    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
922}
923
924
925#[open_union]
926#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
927#[serde(tag = "$type", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
928pub enum MessageViewEmbed<S: BosStr = DefaultStr> {
929    #[serde(rename = "app.bsky.embed.record#view")]
930    RecordView(Box<record::View<S>>),
931    #[serde(rename = "chat.bsky.embed.joinLink#view")]
932    JoinLinkView(Box<join_link::View<S>>),
933}
934
935
936#[open_union]
937#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
938#[serde(tag = "$type", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
939pub enum MessageViewReplyTo<S: BosStr = DefaultStr> {
940    #[serde(rename = "chat.bsky.convo.defs#messageView")]
941    MessageView(Box<convo::MessageView<S>>),
942    #[serde(rename = "chat.bsky.convo.defs#deletedMessageView")]
943    DeletedMessageView(Box<convo::DeletedMessageView<S>>),
944}
945
946
947#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
948#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
949pub struct MessageViewSender<S: BosStr = DefaultStr> {
950    pub did: Did<S>,
951    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
952    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
953}
954
955
956#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
957#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
958pub struct ReactionView<S: BosStr = DefaultStr> {
959    pub created_at: Datetime,
960    pub sender: convo::ReactionViewSender<S>,
961    pub value: S,
962    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
963    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
964}
965
966
967#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
968#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
969pub struct ReactionViewSender<S: BosStr = DefaultStr> {
970    pub did: Did<S>,
971    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
972    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
973}
974
975/// A reference to another message within the same convo, used to indicate that a message is a reply to it.
976
977#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
978#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
979pub struct ReplyRef<S: BosStr = DefaultStr> {
980    pub message_id: S,
981    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
982    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
983}
984
985/// [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating a user was added to the group convo.
986
987#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
988#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
989pub struct SystemMessageDataAddMember<S: BosStr = DefaultStr> {
990    pub added_by: convo::SystemMessageReferredUser<S>,
991    ///Current view of the member who was added.
992    pub member: convo::SystemMessageReferredUser<S>,
993    ///Role the user was added to the group with. The role from 'member' will reflect the current data, not historical.
994    pub role: MemberRole<S>,
995    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
996    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
997}
998
999/// [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group join link was created.
1000
1001#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
1002#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
1003pub struct SystemMessageDataCreateJoinLink<S: BosStr = DefaultStr> {
1004    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
1005    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
1006}
1007
1008/// [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group join link was disabled.
1009
1010#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
1011#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
1012pub struct SystemMessageDataDisableJoinLink<S: BosStr = DefaultStr> {
1013    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
1014    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
1015}
1016
1017/// [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group info was edited.
1018
1019#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
1020#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
1021pub struct SystemMessageDataEditGroup<S: BosStr = DefaultStr> {
1022    ///Group name that replaced the old.
1023    #[serde(skip_serializing_if = "Option::is_none")]
1024    pub new_name: Option<S>,
1025    ///Group name that was replaced.
1026    #[serde(skip_serializing_if = "Option::is_none")]
1027    pub old_name: Option<S>,
1028    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
1029    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
1030}
1031
1032/// [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group join link was edited.
1033
1034#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
1035#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
1036pub struct SystemMessageDataEditJoinLink<S: BosStr = DefaultStr> {
1037    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
1038    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
1039}
1040
1041/// [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group join link was enabled.
1042
1043#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)]
1044#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
1045pub struct SystemMessageDataEnableJoinLink<S: BosStr = DefaultStr> {
1046    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
1047    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
1048}
1049
1050/// [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group convo was locked.
1051
1052#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
1053#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
1054pub struct SystemMessageDataLockConvo<S: BosStr = DefaultStr> {
1055    ///Current view of the member who locked the group.
1056    pub locked_by: convo::SystemMessageReferredUser<S>,
1057    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
1058    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
1059}
1060
1061/// [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group convo was locked permanently.
1062
1063#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
1064#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
1065pub struct SystemMessageDataLockConvoPermanently<S: BosStr = DefaultStr> {
1066    ///Current view of the member who locked the group.
1067    pub locked_by: convo::SystemMessageReferredUser<S>,
1068    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
1069    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
1070}
1071
1072/// [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating a user joined the group convo via join link.
1073
1074#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
1075#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
1076pub struct SystemMessageDataMemberJoin<S: BosStr = DefaultStr> {
1077    ///If join link was configured to require approval, this will be set to who approved the request. Undefined if approval was not required.
1078    #[serde(skip_serializing_if = "Option::is_none")]
1079    pub approved_by: Option<convo::SystemMessageReferredUser<S>>,
1080    ///Current view of the member who joined.
1081    pub member: convo::SystemMessageReferredUser<S>,
1082    ///Role the user was added to the group with. The role from 'member' will reflect the current data, not historical.
1083    pub role: MemberRole<S>,
1084    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
1085    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
1086}
1087
1088/// [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating a user voluntarily left the group convo.
1089
1090#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
1091#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
1092pub struct SystemMessageDataMemberLeave<S: BosStr = DefaultStr> {
1093    ///Current view of the member who left the group.
1094    pub member: convo::SystemMessageReferredUser<S>,
1095    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
1096    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
1097}
1098
1099/// [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating a user was removed from the group convo.
1100
1101#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
1102#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
1103pub struct SystemMessageDataRemoveMember<S: BosStr = DefaultStr> {
1104    ///Current view of the member who was removed.
1105    pub member: convo::SystemMessageReferredUser<S>,
1106    pub removed_by: convo::SystemMessageReferredUser<S>,
1107    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
1108    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
1109}
1110
1111/// [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group convo was unlocked.
1112
1113#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
1114#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
1115pub struct SystemMessageDataUnlockConvo<S: BosStr = DefaultStr> {
1116    ///Current view of the member who unlocked the group.
1117    pub unlocked_by: convo::SystemMessageReferredUser<S>,
1118    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
1119    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
1120}
1121
1122
1123#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
1124#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
1125pub struct SystemMessageReferredUser<S: BosStr = DefaultStr> {
1126    pub did: Did<S>,
1127    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
1128    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
1129}
1130
1131/// [NOTE: This is under active development and should be considered unstable while this note is here].
1132
1133#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
1134#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
1135pub struct SystemMessageView<S: BosStr = DefaultStr> {
1136    pub data: SystemMessageViewData<S>,
1137    pub id: S,
1138    pub rev: S,
1139    pub sent_at: Datetime,
1140    #[serde(flatten, default, skip_serializing_if = "Option::is_none")]
1141    pub extra_data: Option<BTreeMap<SmolStr, Data<S>>>,
1142}
1143
1144
1145#[open_union]
1146#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)]
1147#[serde(tag = "$type", bound(deserialize = "S: Deserialize<'de> + BosStr"))]
1148pub enum SystemMessageViewData<S: BosStr = DefaultStr> {
1149    #[serde(rename = "chat.bsky.convo.defs#systemMessageDataAddMember")]
1150    SystemMessageDataAddMember(Box<convo::SystemMessageDataAddMember<S>>),
1151    #[serde(rename = "chat.bsky.convo.defs#systemMessageDataRemoveMember")]
1152    SystemMessageDataRemoveMember(Box<convo::SystemMessageDataRemoveMember<S>>),
1153    #[serde(rename = "chat.bsky.convo.defs#systemMessageDataMemberJoin")]
1154    SystemMessageDataMemberJoin(Box<convo::SystemMessageDataMemberJoin<S>>),
1155    #[serde(rename = "chat.bsky.convo.defs#systemMessageDataMemberLeave")]
1156    SystemMessageDataMemberLeave(Box<convo::SystemMessageDataMemberLeave<S>>),
1157    #[serde(rename = "chat.bsky.convo.defs#systemMessageDataLockConvo")]
1158    SystemMessageDataLockConvo(Box<convo::SystemMessageDataLockConvo<S>>),
1159    #[serde(rename = "chat.bsky.convo.defs#systemMessageDataUnlockConvo")]
1160    SystemMessageDataUnlockConvo(Box<convo::SystemMessageDataUnlockConvo<S>>),
1161    #[serde(rename = "chat.bsky.convo.defs#systemMessageDataLockConvoPermanently")]
1162    SystemMessageDataLockConvoPermanently(
1163        Box<convo::SystemMessageDataLockConvoPermanently<S>>,
1164    ),
1165    #[serde(rename = "chat.bsky.convo.defs#systemMessageDataEditGroup")]
1166    SystemMessageDataEditGroup(Box<convo::SystemMessageDataEditGroup<S>>),
1167    #[serde(rename = "chat.bsky.convo.defs#systemMessageDataCreateJoinLink")]
1168    SystemMessageDataCreateJoinLink(Box<convo::SystemMessageDataCreateJoinLink<S>>),
1169    #[serde(rename = "chat.bsky.convo.defs#systemMessageDataEditJoinLink")]
1170    SystemMessageDataEditJoinLink(Box<convo::SystemMessageDataEditJoinLink<S>>),
1171    #[serde(rename = "chat.bsky.convo.defs#systemMessageDataEnableJoinLink")]
1172    SystemMessageDataEnableJoinLink(Box<convo::SystemMessageDataEnableJoinLink<S>>),
1173    #[serde(rename = "chat.bsky.convo.defs#systemMessageDataDisableJoinLink")]
1174    SystemMessageDataDisableJoinLink(Box<convo::SystemMessageDataDisableJoinLink<S>>),
1175}
1176
1177impl<S: BosStr> LexiconSchema for ConvoRef<S> {
1178    fn nsid() -> &'static str {
1179        "chat.bsky.convo.defs"
1180    }
1181    fn def_name() -> &'static str {
1182        "convoRef"
1183    }
1184    fn lexicon_doc() -> LexiconDoc<'static> {
1185        lexicon_doc_chat_bsky_convo_defs()
1186    }
1187    fn validate(&self) -> Result<(), ConstraintError> {
1188        Ok(())
1189    }
1190}
1191
1192impl<S: BosStr> LexiconSchema for ConvoView<S> {
1193    fn nsid() -> &'static str {
1194        "chat.bsky.convo.defs"
1195    }
1196    fn def_name() -> &'static str {
1197        "convoView"
1198    }
1199    fn lexicon_doc() -> LexiconDoc<'static> {
1200        lexicon_doc_chat_bsky_convo_defs()
1201    }
1202    fn validate(&self) -> Result<(), ConstraintError> {
1203        Ok(())
1204    }
1205}
1206
1207impl<S: BosStr> LexiconSchema for DeletedMessageView<S> {
1208    fn nsid() -> &'static str {
1209        "chat.bsky.convo.defs"
1210    }
1211    fn def_name() -> &'static str {
1212        "deletedMessageView"
1213    }
1214    fn lexicon_doc() -> LexiconDoc<'static> {
1215        lexicon_doc_chat_bsky_convo_defs()
1216    }
1217    fn validate(&self) -> Result<(), ConstraintError> {
1218        Ok(())
1219    }
1220}
1221
1222impl<S: BosStr> LexiconSchema for DirectConvo<S> {
1223    fn nsid() -> &'static str {
1224        "chat.bsky.convo.defs"
1225    }
1226    fn def_name() -> &'static str {
1227        "directConvo"
1228    }
1229    fn lexicon_doc() -> LexiconDoc<'static> {
1230        lexicon_doc_chat_bsky_convo_defs()
1231    }
1232    fn validate(&self) -> Result<(), ConstraintError> {
1233        Ok(())
1234    }
1235}
1236
1237impl<S: BosStr> LexiconSchema for GroupConvo<S> {
1238    fn nsid() -> &'static str {
1239        "chat.bsky.convo.defs"
1240    }
1241    fn def_name() -> &'static str {
1242        "groupConvo"
1243    }
1244    fn lexicon_doc() -> LexiconDoc<'static> {
1245        lexicon_doc_chat_bsky_convo_defs()
1246    }
1247    fn validate(&self) -> Result<(), ConstraintError> {
1248        {
1249            let value = &self.name;
1250            #[allow(unused_comparisons)]
1251            if <str>::len(value.as_ref()) > 1280usize {
1252                return Err(ConstraintError::MaxLength {
1253                    path: ValidationPath::from_field("name"),
1254                    max: 1280usize,
1255                    actual: <str>::len(value.as_ref()),
1256                });
1257            }
1258        }
1259        {
1260            let value = &self.name;
1261            {
1262                let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count();
1263                if count > 128usize {
1264                    return Err(ConstraintError::MaxGraphemes {
1265                        path: ValidationPath::from_field("name"),
1266                        max: 128usize,
1267                        actual: count,
1268                    });
1269                }
1270            }
1271        }
1272        Ok(())
1273    }
1274}
1275
1276impl<S: BosStr> LexiconSchema for LogAcceptConvo<S> {
1277    fn nsid() -> &'static str {
1278        "chat.bsky.convo.defs"
1279    }
1280    fn def_name() -> &'static str {
1281        "logAcceptConvo"
1282    }
1283    fn lexicon_doc() -> LexiconDoc<'static> {
1284        lexicon_doc_chat_bsky_convo_defs()
1285    }
1286    fn validate(&self) -> Result<(), ConstraintError> {
1287        Ok(())
1288    }
1289}
1290
1291impl<S: BosStr> LexiconSchema for LogAddMember<S> {
1292    fn nsid() -> &'static str {
1293        "chat.bsky.convo.defs"
1294    }
1295    fn def_name() -> &'static str {
1296        "logAddMember"
1297    }
1298    fn lexicon_doc() -> LexiconDoc<'static> {
1299        lexicon_doc_chat_bsky_convo_defs()
1300    }
1301    fn validate(&self) -> Result<(), ConstraintError> {
1302        Ok(())
1303    }
1304}
1305
1306impl<S: BosStr> LexiconSchema for LogAddReaction<S> {
1307    fn nsid() -> &'static str {
1308        "chat.bsky.convo.defs"
1309    }
1310    fn def_name() -> &'static str {
1311        "logAddReaction"
1312    }
1313    fn lexicon_doc() -> LexiconDoc<'static> {
1314        lexicon_doc_chat_bsky_convo_defs()
1315    }
1316    fn validate(&self) -> Result<(), ConstraintError> {
1317        Ok(())
1318    }
1319}
1320
1321impl<S: BosStr> LexiconSchema for LogApproveJoinRequest<S> {
1322    fn nsid() -> &'static str {
1323        "chat.bsky.convo.defs"
1324    }
1325    fn def_name() -> &'static str {
1326        "logApproveJoinRequest"
1327    }
1328    fn lexicon_doc() -> LexiconDoc<'static> {
1329        lexicon_doc_chat_bsky_convo_defs()
1330    }
1331    fn validate(&self) -> Result<(), ConstraintError> {
1332        Ok(())
1333    }
1334}
1335
1336impl<S: BosStr> LexiconSchema for LogBeginConvo<S> {
1337    fn nsid() -> &'static str {
1338        "chat.bsky.convo.defs"
1339    }
1340    fn def_name() -> &'static str {
1341        "logBeginConvo"
1342    }
1343    fn lexicon_doc() -> LexiconDoc<'static> {
1344        lexicon_doc_chat_bsky_convo_defs()
1345    }
1346    fn validate(&self) -> Result<(), ConstraintError> {
1347        Ok(())
1348    }
1349}
1350
1351impl<S: BosStr> LexiconSchema for LogCreateJoinLink<S> {
1352    fn nsid() -> &'static str {
1353        "chat.bsky.convo.defs"
1354    }
1355    fn def_name() -> &'static str {
1356        "logCreateJoinLink"
1357    }
1358    fn lexicon_doc() -> LexiconDoc<'static> {
1359        lexicon_doc_chat_bsky_convo_defs()
1360    }
1361    fn validate(&self) -> Result<(), ConstraintError> {
1362        Ok(())
1363    }
1364}
1365
1366impl<S: BosStr> LexiconSchema for LogCreateMessage<S> {
1367    fn nsid() -> &'static str {
1368        "chat.bsky.convo.defs"
1369    }
1370    fn def_name() -> &'static str {
1371        "logCreateMessage"
1372    }
1373    fn lexicon_doc() -> LexiconDoc<'static> {
1374        lexicon_doc_chat_bsky_convo_defs()
1375    }
1376    fn validate(&self) -> Result<(), ConstraintError> {
1377        Ok(())
1378    }
1379}
1380
1381impl<S: BosStr> LexiconSchema for LogDeleteMessage<S> {
1382    fn nsid() -> &'static str {
1383        "chat.bsky.convo.defs"
1384    }
1385    fn def_name() -> &'static str {
1386        "logDeleteMessage"
1387    }
1388    fn lexicon_doc() -> LexiconDoc<'static> {
1389        lexicon_doc_chat_bsky_convo_defs()
1390    }
1391    fn validate(&self) -> Result<(), ConstraintError> {
1392        Ok(())
1393    }
1394}
1395
1396impl<S: BosStr> LexiconSchema for LogDisableJoinLink<S> {
1397    fn nsid() -> &'static str {
1398        "chat.bsky.convo.defs"
1399    }
1400    fn def_name() -> &'static str {
1401        "logDisableJoinLink"
1402    }
1403    fn lexicon_doc() -> LexiconDoc<'static> {
1404        lexicon_doc_chat_bsky_convo_defs()
1405    }
1406    fn validate(&self) -> Result<(), ConstraintError> {
1407        Ok(())
1408    }
1409}
1410
1411impl<S: BosStr> LexiconSchema for LogEditGroup<S> {
1412    fn nsid() -> &'static str {
1413        "chat.bsky.convo.defs"
1414    }
1415    fn def_name() -> &'static str {
1416        "logEditGroup"
1417    }
1418    fn lexicon_doc() -> LexiconDoc<'static> {
1419        lexicon_doc_chat_bsky_convo_defs()
1420    }
1421    fn validate(&self) -> Result<(), ConstraintError> {
1422        Ok(())
1423    }
1424}
1425
1426impl<S: BosStr> LexiconSchema for LogEditJoinLink<S> {
1427    fn nsid() -> &'static str {
1428        "chat.bsky.convo.defs"
1429    }
1430    fn def_name() -> &'static str {
1431        "logEditJoinLink"
1432    }
1433    fn lexicon_doc() -> LexiconDoc<'static> {
1434        lexicon_doc_chat_bsky_convo_defs()
1435    }
1436    fn validate(&self) -> Result<(), ConstraintError> {
1437        Ok(())
1438    }
1439}
1440
1441impl<S: BosStr> LexiconSchema for LogEnableJoinLink<S> {
1442    fn nsid() -> &'static str {
1443        "chat.bsky.convo.defs"
1444    }
1445    fn def_name() -> &'static str {
1446        "logEnableJoinLink"
1447    }
1448    fn lexicon_doc() -> LexiconDoc<'static> {
1449        lexicon_doc_chat_bsky_convo_defs()
1450    }
1451    fn validate(&self) -> Result<(), ConstraintError> {
1452        Ok(())
1453    }
1454}
1455
1456impl<S: BosStr> LexiconSchema for LogIncomingJoinRequest<S> {
1457    fn nsid() -> &'static str {
1458        "chat.bsky.convo.defs"
1459    }
1460    fn def_name() -> &'static str {
1461        "logIncomingJoinRequest"
1462    }
1463    fn lexicon_doc() -> LexiconDoc<'static> {
1464        lexicon_doc_chat_bsky_convo_defs()
1465    }
1466    fn validate(&self) -> Result<(), ConstraintError> {
1467        Ok(())
1468    }
1469}
1470
1471impl<S: BosStr> LexiconSchema for LogLeaveConvo<S> {
1472    fn nsid() -> &'static str {
1473        "chat.bsky.convo.defs"
1474    }
1475    fn def_name() -> &'static str {
1476        "logLeaveConvo"
1477    }
1478    fn lexicon_doc() -> LexiconDoc<'static> {
1479        lexicon_doc_chat_bsky_convo_defs()
1480    }
1481    fn validate(&self) -> Result<(), ConstraintError> {
1482        Ok(())
1483    }
1484}
1485
1486impl<S: BosStr> LexiconSchema for LogLockConvo<S> {
1487    fn nsid() -> &'static str {
1488        "chat.bsky.convo.defs"
1489    }
1490    fn def_name() -> &'static str {
1491        "logLockConvo"
1492    }
1493    fn lexicon_doc() -> LexiconDoc<'static> {
1494        lexicon_doc_chat_bsky_convo_defs()
1495    }
1496    fn validate(&self) -> Result<(), ConstraintError> {
1497        Ok(())
1498    }
1499}
1500
1501impl<S: BosStr> LexiconSchema for LogLockConvoPermanently<S> {
1502    fn nsid() -> &'static str {
1503        "chat.bsky.convo.defs"
1504    }
1505    fn def_name() -> &'static str {
1506        "logLockConvoPermanently"
1507    }
1508    fn lexicon_doc() -> LexiconDoc<'static> {
1509        lexicon_doc_chat_bsky_convo_defs()
1510    }
1511    fn validate(&self) -> Result<(), ConstraintError> {
1512        Ok(())
1513    }
1514}
1515
1516impl<S: BosStr> LexiconSchema for LogMemberJoin<S> {
1517    fn nsid() -> &'static str {
1518        "chat.bsky.convo.defs"
1519    }
1520    fn def_name() -> &'static str {
1521        "logMemberJoin"
1522    }
1523    fn lexicon_doc() -> LexiconDoc<'static> {
1524        lexicon_doc_chat_bsky_convo_defs()
1525    }
1526    fn validate(&self) -> Result<(), ConstraintError> {
1527        Ok(())
1528    }
1529}
1530
1531impl<S: BosStr> LexiconSchema for LogMemberLeave<S> {
1532    fn nsid() -> &'static str {
1533        "chat.bsky.convo.defs"
1534    }
1535    fn def_name() -> &'static str {
1536        "logMemberLeave"
1537    }
1538    fn lexicon_doc() -> LexiconDoc<'static> {
1539        lexicon_doc_chat_bsky_convo_defs()
1540    }
1541    fn validate(&self) -> Result<(), ConstraintError> {
1542        Ok(())
1543    }
1544}
1545
1546impl<S: BosStr> LexiconSchema for LogMuteConvo<S> {
1547    fn nsid() -> &'static str {
1548        "chat.bsky.convo.defs"
1549    }
1550    fn def_name() -> &'static str {
1551        "logMuteConvo"
1552    }
1553    fn lexicon_doc() -> LexiconDoc<'static> {
1554        lexicon_doc_chat_bsky_convo_defs()
1555    }
1556    fn validate(&self) -> Result<(), ConstraintError> {
1557        Ok(())
1558    }
1559}
1560
1561impl<S: BosStr> LexiconSchema for LogOutgoingJoinRequest<S> {
1562    fn nsid() -> &'static str {
1563        "chat.bsky.convo.defs"
1564    }
1565    fn def_name() -> &'static str {
1566        "logOutgoingJoinRequest"
1567    }
1568    fn lexicon_doc() -> LexiconDoc<'static> {
1569        lexicon_doc_chat_bsky_convo_defs()
1570    }
1571    fn validate(&self) -> Result<(), ConstraintError> {
1572        Ok(())
1573    }
1574}
1575
1576impl<S: BosStr> LexiconSchema for LogReadConvo<S> {
1577    fn nsid() -> &'static str {
1578        "chat.bsky.convo.defs"
1579    }
1580    fn def_name() -> &'static str {
1581        "logReadConvo"
1582    }
1583    fn lexicon_doc() -> LexiconDoc<'static> {
1584        lexicon_doc_chat_bsky_convo_defs()
1585    }
1586    fn validate(&self) -> Result<(), ConstraintError> {
1587        Ok(())
1588    }
1589}
1590
1591impl<S: BosStr> LexiconSchema for LogReadJoinRequests<S> {
1592    fn nsid() -> &'static str {
1593        "chat.bsky.convo.defs"
1594    }
1595    fn def_name() -> &'static str {
1596        "logReadJoinRequests"
1597    }
1598    fn lexicon_doc() -> LexiconDoc<'static> {
1599        lexicon_doc_chat_bsky_convo_defs()
1600    }
1601    fn validate(&self) -> Result<(), ConstraintError> {
1602        Ok(())
1603    }
1604}
1605
1606impl<S: BosStr> LexiconSchema for LogReadMessage<S> {
1607    fn nsid() -> &'static str {
1608        "chat.bsky.convo.defs"
1609    }
1610    fn def_name() -> &'static str {
1611        "logReadMessage"
1612    }
1613    fn lexicon_doc() -> LexiconDoc<'static> {
1614        lexicon_doc_chat_bsky_convo_defs()
1615    }
1616    fn validate(&self) -> Result<(), ConstraintError> {
1617        Ok(())
1618    }
1619}
1620
1621impl<S: BosStr> LexiconSchema for LogRejectJoinRequest<S> {
1622    fn nsid() -> &'static str {
1623        "chat.bsky.convo.defs"
1624    }
1625    fn def_name() -> &'static str {
1626        "logRejectJoinRequest"
1627    }
1628    fn lexicon_doc() -> LexiconDoc<'static> {
1629        lexicon_doc_chat_bsky_convo_defs()
1630    }
1631    fn validate(&self) -> Result<(), ConstraintError> {
1632        Ok(())
1633    }
1634}
1635
1636impl<S: BosStr> LexiconSchema for LogRemoveMember<S> {
1637    fn nsid() -> &'static str {
1638        "chat.bsky.convo.defs"
1639    }
1640    fn def_name() -> &'static str {
1641        "logRemoveMember"
1642    }
1643    fn lexicon_doc() -> LexiconDoc<'static> {
1644        lexicon_doc_chat_bsky_convo_defs()
1645    }
1646    fn validate(&self) -> Result<(), ConstraintError> {
1647        Ok(())
1648    }
1649}
1650
1651impl<S: BosStr> LexiconSchema for LogRemoveReaction<S> {
1652    fn nsid() -> &'static str {
1653        "chat.bsky.convo.defs"
1654    }
1655    fn def_name() -> &'static str {
1656        "logRemoveReaction"
1657    }
1658    fn lexicon_doc() -> LexiconDoc<'static> {
1659        lexicon_doc_chat_bsky_convo_defs()
1660    }
1661    fn validate(&self) -> Result<(), ConstraintError> {
1662        Ok(())
1663    }
1664}
1665
1666impl<S: BosStr> LexiconSchema for LogUnlockConvo<S> {
1667    fn nsid() -> &'static str {
1668        "chat.bsky.convo.defs"
1669    }
1670    fn def_name() -> &'static str {
1671        "logUnlockConvo"
1672    }
1673    fn lexicon_doc() -> LexiconDoc<'static> {
1674        lexicon_doc_chat_bsky_convo_defs()
1675    }
1676    fn validate(&self) -> Result<(), ConstraintError> {
1677        Ok(())
1678    }
1679}
1680
1681impl<S: BosStr> LexiconSchema for LogUnmuteConvo<S> {
1682    fn nsid() -> &'static str {
1683        "chat.bsky.convo.defs"
1684    }
1685    fn def_name() -> &'static str {
1686        "logUnmuteConvo"
1687    }
1688    fn lexicon_doc() -> LexiconDoc<'static> {
1689        lexicon_doc_chat_bsky_convo_defs()
1690    }
1691    fn validate(&self) -> Result<(), ConstraintError> {
1692        Ok(())
1693    }
1694}
1695
1696impl<S: BosStr> LexiconSchema for LogWithdrawIncomingJoinRequest<S> {
1697    fn nsid() -> &'static str {
1698        "chat.bsky.convo.defs"
1699    }
1700    fn def_name() -> &'static str {
1701        "logWithdrawIncomingJoinRequest"
1702    }
1703    fn lexicon_doc() -> LexiconDoc<'static> {
1704        lexicon_doc_chat_bsky_convo_defs()
1705    }
1706    fn validate(&self) -> Result<(), ConstraintError> {
1707        Ok(())
1708    }
1709}
1710
1711impl<S: BosStr> LexiconSchema for LogWithdrawOutgoingJoinRequest<S> {
1712    fn nsid() -> &'static str {
1713        "chat.bsky.convo.defs"
1714    }
1715    fn def_name() -> &'static str {
1716        "logWithdrawOutgoingJoinRequest"
1717    }
1718    fn lexicon_doc() -> LexiconDoc<'static> {
1719        lexicon_doc_chat_bsky_convo_defs()
1720    }
1721    fn validate(&self) -> Result<(), ConstraintError> {
1722        Ok(())
1723    }
1724}
1725
1726impl<S: BosStr> LexiconSchema for MessageAndReactionView<S> {
1727    fn nsid() -> &'static str {
1728        "chat.bsky.convo.defs"
1729    }
1730    fn def_name() -> &'static str {
1731        "messageAndReactionView"
1732    }
1733    fn lexicon_doc() -> LexiconDoc<'static> {
1734        lexicon_doc_chat_bsky_convo_defs()
1735    }
1736    fn validate(&self) -> Result<(), ConstraintError> {
1737        Ok(())
1738    }
1739}
1740
1741impl<S: BosStr> LexiconSchema for MessageInput<S> {
1742    fn nsid() -> &'static str {
1743        "chat.bsky.convo.defs"
1744    }
1745    fn def_name() -> &'static str {
1746        "messageInput"
1747    }
1748    fn lexicon_doc() -> LexiconDoc<'static> {
1749        lexicon_doc_chat_bsky_convo_defs()
1750    }
1751    fn validate(&self) -> Result<(), ConstraintError> {
1752        {
1753            let value = &self.text;
1754            #[allow(unused_comparisons)]
1755            if <str>::len(value.as_ref()) > 10000usize {
1756                return Err(ConstraintError::MaxLength {
1757                    path: ValidationPath::from_field("text"),
1758                    max: 10000usize,
1759                    actual: <str>::len(value.as_ref()),
1760                });
1761            }
1762        }
1763        {
1764            let value = &self.text;
1765            {
1766                let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count();
1767                if count > 1000usize {
1768                    return Err(ConstraintError::MaxGraphemes {
1769                        path: ValidationPath::from_field("text"),
1770                        max: 1000usize,
1771                        actual: count,
1772                    });
1773                }
1774            }
1775        }
1776        Ok(())
1777    }
1778}
1779
1780impl<S: BosStr> LexiconSchema for MessageRef<S> {
1781    fn nsid() -> &'static str {
1782        "chat.bsky.convo.defs"
1783    }
1784    fn def_name() -> &'static str {
1785        "messageRef"
1786    }
1787    fn lexicon_doc() -> LexiconDoc<'static> {
1788        lexicon_doc_chat_bsky_convo_defs()
1789    }
1790    fn validate(&self) -> Result<(), ConstraintError> {
1791        Ok(())
1792    }
1793}
1794
1795impl<S: BosStr> LexiconSchema for MessageView<S> {
1796    fn nsid() -> &'static str {
1797        "chat.bsky.convo.defs"
1798    }
1799    fn def_name() -> &'static str {
1800        "messageView"
1801    }
1802    fn lexicon_doc() -> LexiconDoc<'static> {
1803        lexicon_doc_chat_bsky_convo_defs()
1804    }
1805    fn validate(&self) -> Result<(), ConstraintError> {
1806        {
1807            let value = &self.text;
1808            #[allow(unused_comparisons)]
1809            if <str>::len(value.as_ref()) > 10000usize {
1810                return Err(ConstraintError::MaxLength {
1811                    path: ValidationPath::from_field("text"),
1812                    max: 10000usize,
1813                    actual: <str>::len(value.as_ref()),
1814                });
1815            }
1816        }
1817        {
1818            let value = &self.text;
1819            {
1820                let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count();
1821                if count > 1000usize {
1822                    return Err(ConstraintError::MaxGraphemes {
1823                        path: ValidationPath::from_field("text"),
1824                        max: 1000usize,
1825                        actual: count,
1826                    });
1827                }
1828            }
1829        }
1830        Ok(())
1831    }
1832}
1833
1834impl<S: BosStr> LexiconSchema for MessageViewSender<S> {
1835    fn nsid() -> &'static str {
1836        "chat.bsky.convo.defs"
1837    }
1838    fn def_name() -> &'static str {
1839        "messageViewSender"
1840    }
1841    fn lexicon_doc() -> LexiconDoc<'static> {
1842        lexicon_doc_chat_bsky_convo_defs()
1843    }
1844    fn validate(&self) -> Result<(), ConstraintError> {
1845        Ok(())
1846    }
1847}
1848
1849impl<S: BosStr> LexiconSchema for ReactionView<S> {
1850    fn nsid() -> &'static str {
1851        "chat.bsky.convo.defs"
1852    }
1853    fn def_name() -> &'static str {
1854        "reactionView"
1855    }
1856    fn lexicon_doc() -> LexiconDoc<'static> {
1857        lexicon_doc_chat_bsky_convo_defs()
1858    }
1859    fn validate(&self) -> Result<(), ConstraintError> {
1860        Ok(())
1861    }
1862}
1863
1864impl<S: BosStr> LexiconSchema for ReactionViewSender<S> {
1865    fn nsid() -> &'static str {
1866        "chat.bsky.convo.defs"
1867    }
1868    fn def_name() -> &'static str {
1869        "reactionViewSender"
1870    }
1871    fn lexicon_doc() -> LexiconDoc<'static> {
1872        lexicon_doc_chat_bsky_convo_defs()
1873    }
1874    fn validate(&self) -> Result<(), ConstraintError> {
1875        Ok(())
1876    }
1877}
1878
1879impl<S: BosStr> LexiconSchema for ReplyRef<S> {
1880    fn nsid() -> &'static str {
1881        "chat.bsky.convo.defs"
1882    }
1883    fn def_name() -> &'static str {
1884        "replyRef"
1885    }
1886    fn lexicon_doc() -> LexiconDoc<'static> {
1887        lexicon_doc_chat_bsky_convo_defs()
1888    }
1889    fn validate(&self) -> Result<(), ConstraintError> {
1890        Ok(())
1891    }
1892}
1893
1894impl<S: BosStr> LexiconSchema for SystemMessageDataAddMember<S> {
1895    fn nsid() -> &'static str {
1896        "chat.bsky.convo.defs"
1897    }
1898    fn def_name() -> &'static str {
1899        "systemMessageDataAddMember"
1900    }
1901    fn lexicon_doc() -> LexiconDoc<'static> {
1902        lexicon_doc_chat_bsky_convo_defs()
1903    }
1904    fn validate(&self) -> Result<(), ConstraintError> {
1905        Ok(())
1906    }
1907}
1908
1909impl<S: BosStr> LexiconSchema for SystemMessageDataCreateJoinLink<S> {
1910    fn nsid() -> &'static str {
1911        "chat.bsky.convo.defs"
1912    }
1913    fn def_name() -> &'static str {
1914        "systemMessageDataCreateJoinLink"
1915    }
1916    fn lexicon_doc() -> LexiconDoc<'static> {
1917        lexicon_doc_chat_bsky_convo_defs()
1918    }
1919    fn validate(&self) -> Result<(), ConstraintError> {
1920        Ok(())
1921    }
1922}
1923
1924impl<S: BosStr> LexiconSchema for SystemMessageDataDisableJoinLink<S> {
1925    fn nsid() -> &'static str {
1926        "chat.bsky.convo.defs"
1927    }
1928    fn def_name() -> &'static str {
1929        "systemMessageDataDisableJoinLink"
1930    }
1931    fn lexicon_doc() -> LexiconDoc<'static> {
1932        lexicon_doc_chat_bsky_convo_defs()
1933    }
1934    fn validate(&self) -> Result<(), ConstraintError> {
1935        Ok(())
1936    }
1937}
1938
1939impl<S: BosStr> LexiconSchema for SystemMessageDataEditGroup<S> {
1940    fn nsid() -> &'static str {
1941        "chat.bsky.convo.defs"
1942    }
1943    fn def_name() -> &'static str {
1944        "systemMessageDataEditGroup"
1945    }
1946    fn lexicon_doc() -> LexiconDoc<'static> {
1947        lexicon_doc_chat_bsky_convo_defs()
1948    }
1949    fn validate(&self) -> Result<(), ConstraintError> {
1950        Ok(())
1951    }
1952}
1953
1954impl<S: BosStr> LexiconSchema for SystemMessageDataEditJoinLink<S> {
1955    fn nsid() -> &'static str {
1956        "chat.bsky.convo.defs"
1957    }
1958    fn def_name() -> &'static str {
1959        "systemMessageDataEditJoinLink"
1960    }
1961    fn lexicon_doc() -> LexiconDoc<'static> {
1962        lexicon_doc_chat_bsky_convo_defs()
1963    }
1964    fn validate(&self) -> Result<(), ConstraintError> {
1965        Ok(())
1966    }
1967}
1968
1969impl<S: BosStr> LexiconSchema for SystemMessageDataEnableJoinLink<S> {
1970    fn nsid() -> &'static str {
1971        "chat.bsky.convo.defs"
1972    }
1973    fn def_name() -> &'static str {
1974        "systemMessageDataEnableJoinLink"
1975    }
1976    fn lexicon_doc() -> LexiconDoc<'static> {
1977        lexicon_doc_chat_bsky_convo_defs()
1978    }
1979    fn validate(&self) -> Result<(), ConstraintError> {
1980        Ok(())
1981    }
1982}
1983
1984impl<S: BosStr> LexiconSchema for SystemMessageDataLockConvo<S> {
1985    fn nsid() -> &'static str {
1986        "chat.bsky.convo.defs"
1987    }
1988    fn def_name() -> &'static str {
1989        "systemMessageDataLockConvo"
1990    }
1991    fn lexicon_doc() -> LexiconDoc<'static> {
1992        lexicon_doc_chat_bsky_convo_defs()
1993    }
1994    fn validate(&self) -> Result<(), ConstraintError> {
1995        Ok(())
1996    }
1997}
1998
1999impl<S: BosStr> LexiconSchema for SystemMessageDataLockConvoPermanently<S> {
2000    fn nsid() -> &'static str {
2001        "chat.bsky.convo.defs"
2002    }
2003    fn def_name() -> &'static str {
2004        "systemMessageDataLockConvoPermanently"
2005    }
2006    fn lexicon_doc() -> LexiconDoc<'static> {
2007        lexicon_doc_chat_bsky_convo_defs()
2008    }
2009    fn validate(&self) -> Result<(), ConstraintError> {
2010        Ok(())
2011    }
2012}
2013
2014impl<S: BosStr> LexiconSchema for SystemMessageDataMemberJoin<S> {
2015    fn nsid() -> &'static str {
2016        "chat.bsky.convo.defs"
2017    }
2018    fn def_name() -> &'static str {
2019        "systemMessageDataMemberJoin"
2020    }
2021    fn lexicon_doc() -> LexiconDoc<'static> {
2022        lexicon_doc_chat_bsky_convo_defs()
2023    }
2024    fn validate(&self) -> Result<(), ConstraintError> {
2025        Ok(())
2026    }
2027}
2028
2029impl<S: BosStr> LexiconSchema for SystemMessageDataMemberLeave<S> {
2030    fn nsid() -> &'static str {
2031        "chat.bsky.convo.defs"
2032    }
2033    fn def_name() -> &'static str {
2034        "systemMessageDataMemberLeave"
2035    }
2036    fn lexicon_doc() -> LexiconDoc<'static> {
2037        lexicon_doc_chat_bsky_convo_defs()
2038    }
2039    fn validate(&self) -> Result<(), ConstraintError> {
2040        Ok(())
2041    }
2042}
2043
2044impl<S: BosStr> LexiconSchema for SystemMessageDataRemoveMember<S> {
2045    fn nsid() -> &'static str {
2046        "chat.bsky.convo.defs"
2047    }
2048    fn def_name() -> &'static str {
2049        "systemMessageDataRemoveMember"
2050    }
2051    fn lexicon_doc() -> LexiconDoc<'static> {
2052        lexicon_doc_chat_bsky_convo_defs()
2053    }
2054    fn validate(&self) -> Result<(), ConstraintError> {
2055        Ok(())
2056    }
2057}
2058
2059impl<S: BosStr> LexiconSchema for SystemMessageDataUnlockConvo<S> {
2060    fn nsid() -> &'static str {
2061        "chat.bsky.convo.defs"
2062    }
2063    fn def_name() -> &'static str {
2064        "systemMessageDataUnlockConvo"
2065    }
2066    fn lexicon_doc() -> LexiconDoc<'static> {
2067        lexicon_doc_chat_bsky_convo_defs()
2068    }
2069    fn validate(&self) -> Result<(), ConstraintError> {
2070        Ok(())
2071    }
2072}
2073
2074impl<S: BosStr> LexiconSchema for SystemMessageReferredUser<S> {
2075    fn nsid() -> &'static str {
2076        "chat.bsky.convo.defs"
2077    }
2078    fn def_name() -> &'static str {
2079        "systemMessageReferredUser"
2080    }
2081    fn lexicon_doc() -> LexiconDoc<'static> {
2082        lexicon_doc_chat_bsky_convo_defs()
2083    }
2084    fn validate(&self) -> Result<(), ConstraintError> {
2085        Ok(())
2086    }
2087}
2088
2089impl<S: BosStr> LexiconSchema for SystemMessageView<S> {
2090    fn nsid() -> &'static str {
2091        "chat.bsky.convo.defs"
2092    }
2093    fn def_name() -> &'static str {
2094        "systemMessageView"
2095    }
2096    fn lexicon_doc() -> LexiconDoc<'static> {
2097        lexicon_doc_chat_bsky_convo_defs()
2098    }
2099    fn validate(&self) -> Result<(), ConstraintError> {
2100        Ok(())
2101    }
2102}
2103
2104pub mod convo_ref_state {
2105
2106    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
2107    #[allow(unused)]
2108    use ::core::marker::PhantomData;
2109    mod sealed {
2110        pub trait Sealed {}
2111    }
2112    /// State trait tracking which required fields have been set
2113    pub trait State: sealed::Sealed {
2114        type ConvoId;
2115        type Did;
2116    }
2117    /// Empty state - all required fields are unset
2118    pub struct Empty(());
2119    impl sealed::Sealed for Empty {}
2120    impl State for Empty {
2121        type ConvoId = Unset;
2122        type Did = Unset;
2123    }
2124    ///State transition - sets the `convo_id` field to Set
2125    pub struct SetConvoId<St: State = Empty>(PhantomData<fn() -> St>);
2126    impl<St: State> sealed::Sealed for SetConvoId<St> {}
2127    impl<St: State> State for SetConvoId<St> {
2128        type ConvoId = Set<members::convo_id>;
2129        type Did = St::Did;
2130    }
2131    ///State transition - sets the `did` field to Set
2132    pub struct SetDid<St: State = Empty>(PhantomData<fn() -> St>);
2133    impl<St: State> sealed::Sealed for SetDid<St> {}
2134    impl<St: State> State for SetDid<St> {
2135        type ConvoId = St::ConvoId;
2136        type Did = Set<members::did>;
2137    }
2138    /// Marker types for field names
2139    #[allow(non_camel_case_types)]
2140    pub mod members {
2141        ///Marker type for the `convo_id` field
2142        pub struct convo_id(());
2143        ///Marker type for the `did` field
2144        pub struct did(());
2145    }
2146}
2147
2148/// Builder for constructing an instance of this type.
2149pub struct ConvoRefBuilder<St: convo_ref_state::State, S: BosStr = DefaultStr> {
2150    _state: PhantomData<fn() -> St>,
2151    _fields: (Option<S>, Option<Did<S>>),
2152    _type: PhantomData<fn() -> S>,
2153}
2154
2155impl ConvoRef<DefaultStr> {
2156    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
2157    pub fn new() -> ConvoRefBuilder<convo_ref_state::Empty, DefaultStr> {
2158        ConvoRefBuilder::new()
2159    }
2160}
2161
2162impl<S: BosStr> ConvoRef<S> {
2163    /// Create a new builder for this type
2164    pub fn builder() -> ConvoRefBuilder<convo_ref_state::Empty, S> {
2165        ConvoRefBuilder::builder()
2166    }
2167}
2168
2169impl ConvoRefBuilder<convo_ref_state::Empty, DefaultStr> {
2170    /// Create a new builder with all fields unset, using the default string type, if needed
2171    pub fn new() -> Self {
2172        ConvoRefBuilder {
2173            _state: PhantomData,
2174            _fields: (None, None),
2175            _type: PhantomData,
2176        }
2177    }
2178}
2179
2180impl<S: BosStr> ConvoRefBuilder<convo_ref_state::Empty, S> {
2181    /// Create a new builder with all fields unset
2182    pub fn builder() -> Self {
2183        ConvoRefBuilder {
2184            _state: PhantomData,
2185            _fields: (None, None),
2186            _type: PhantomData,
2187        }
2188    }
2189}
2190
2191impl<St, S: BosStr> ConvoRefBuilder<St, S>
2192where
2193    St: convo_ref_state::State,
2194    St::ConvoId: convo_ref_state::IsUnset,
2195{
2196    /// Set the `convoId` field (required)
2197    pub fn convo_id(
2198        mut self,
2199        value: impl Into<S>,
2200    ) -> ConvoRefBuilder<convo_ref_state::SetConvoId<St>, S> {
2201        self._fields.0 = Option::Some(value.into());
2202        ConvoRefBuilder {
2203            _state: PhantomData,
2204            _fields: self._fields,
2205            _type: PhantomData,
2206        }
2207    }
2208}
2209
2210impl<St, S: BosStr> ConvoRefBuilder<St, S>
2211where
2212    St: convo_ref_state::State,
2213    St::Did: convo_ref_state::IsUnset,
2214{
2215    /// Set the `did` field (required)
2216    pub fn did(
2217        mut self,
2218        value: impl Into<Did<S>>,
2219    ) -> ConvoRefBuilder<convo_ref_state::SetDid<St>, S> {
2220        self._fields.1 = Option::Some(value.into());
2221        ConvoRefBuilder {
2222            _state: PhantomData,
2223            _fields: self._fields,
2224            _type: PhantomData,
2225        }
2226    }
2227}
2228
2229impl<St, S: BosStr> ConvoRefBuilder<St, S>
2230where
2231    St: convo_ref_state::State,
2232    St::ConvoId: convo_ref_state::IsSet,
2233    St::Did: convo_ref_state::IsSet,
2234{
2235    /// Build the final struct.
2236    pub fn build(self) -> ConvoRef<S> {
2237        ConvoRef {
2238            convo_id: self._fields.0.unwrap(),
2239            did: self._fields.1.unwrap(),
2240            extra_data: Default::default(),
2241        }
2242    }
2243    /// Build the final struct with custom extra_data.
2244    pub fn build_with_data(self, extra_data: BTreeMap<SmolStr, Data<S>>) -> ConvoRef<S> {
2245        ConvoRef {
2246            convo_id: self._fields.0.unwrap(),
2247            did: self._fields.1.unwrap(),
2248            extra_data: Some(extra_data),
2249        }
2250    }
2251}
2252
2253fn lexicon_doc_chat_bsky_convo_defs() -> LexiconDoc<'static> {
2254    #[allow(unused_imports)]
2255    use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType};
2256    use jacquard_lexicon::lexicon::*;
2257    use alloc::collections::BTreeMap;
2258    LexiconDoc {
2259        lexicon: Lexicon::Lexicon1,
2260        id: CowStr::new_static("chat.bsky.convo.defs"),
2261        defs: {
2262            let mut map = BTreeMap::new();
2263            map.insert(
2264                SmolStr::new_static("convoKind"),
2265                LexUserType::String(LexString { ..Default::default() }),
2266            );
2267            map.insert(
2268                SmolStr::new_static("convoLockStatus"),
2269                LexUserType::String(LexString { ..Default::default() }),
2270            );
2271            map.insert(
2272                SmolStr::new_static("convoRef"),
2273                LexUserType::Object(LexObject {
2274                    required: Some(
2275                        vec![SmolStr::new_static("did"), SmolStr::new_static("convoId")],
2276                    ),
2277                    properties: {
2278                        #[allow(unused_mut)]
2279                        let mut map = BTreeMap::new();
2280                        map.insert(
2281                            SmolStr::new_static("convoId"),
2282                            LexObjectProperty::String(LexString { ..Default::default() }),
2283                        );
2284                        map.insert(
2285                            SmolStr::new_static("did"),
2286                            LexObjectProperty::String(LexString {
2287                                format: Some(LexStringFormat::Did),
2288                                ..Default::default()
2289                            }),
2290                        );
2291                        map
2292                    },
2293                    ..Default::default()
2294                }),
2295            );
2296            map.insert(
2297                SmolStr::new_static("convoStatus"),
2298                LexUserType::String(LexString { ..Default::default() }),
2299            );
2300            map.insert(
2301                SmolStr::new_static("convoView"),
2302                LexUserType::Object(LexObject {
2303                    required: Some(
2304                        vec![
2305                            SmolStr::new_static("id"), SmolStr::new_static("rev"),
2306                            SmolStr::new_static("members"), SmolStr::new_static("muted"),
2307                            SmolStr::new_static("unreadCount")
2308                        ],
2309                    ),
2310                    properties: {
2311                        #[allow(unused_mut)]
2312                        let mut map = BTreeMap::new();
2313                        map.insert(
2314                            SmolStr::new_static("id"),
2315                            LexObjectProperty::String(LexString { ..Default::default() }),
2316                        );
2317                        map.insert(
2318                            SmolStr::new_static("kind"),
2319                            LexObjectProperty::Union(LexRefUnion {
2320                                description: Some(
2321                                    CowStr::new_static(
2322                                        "Union field that has data specific to different kinds of convos.",
2323                                    ),
2324                                ),
2325                                refs: vec![
2326                                    CowStr::new_static("#directConvo"),
2327                                    CowStr::new_static("#groupConvo")
2328                                ],
2329                                ..Default::default()
2330                            }),
2331                        );
2332                        map.insert(
2333                            SmolStr::new_static("lastMessage"),
2334                            LexObjectProperty::Union(LexRefUnion {
2335                                refs: vec![
2336                                    CowStr::new_static("#messageView"),
2337                                    CowStr::new_static("#deletedMessageView"),
2338                                    CowStr::new_static("#systemMessageView")
2339                                ],
2340                                ..Default::default()
2341                            }),
2342                        );
2343                        map.insert(
2344                            SmolStr::new_static("lastReaction"),
2345                            LexObjectProperty::Union(LexRefUnion {
2346                                refs: vec![CowStr::new_static("#messageAndReactionView")],
2347                                ..Default::default()
2348                            }),
2349                        );
2350                        map.insert(
2351                            SmolStr::new_static("members"),
2352                            LexObjectProperty::Array(LexArray {
2353                                description: Some(
2354                                    CowStr::new_static(
2355                                        "Members of this conversation. For direct convos, it will be an immutable list of the 2 members. For group convos, it will a list of important members (the first few members, the viewer, the member who added the viewer, the member who sent the last message, the member who sent the last reaction), but will not contain the full list of members. Use chat.bsky.convo.getConvoMembers to list all members.",
2356                                    ),
2357                                ),
2358                                items: LexArrayItem::Ref(LexRef {
2359                                    r#ref: CowStr::new_static(
2360                                        "chat.bsky.actor.defs#profileViewBasic",
2361                                    ),
2362                                    ..Default::default()
2363                                }),
2364                                ..Default::default()
2365                            }),
2366                        );
2367                        map.insert(
2368                            SmolStr::new_static("muted"),
2369                            LexObjectProperty::Boolean(LexBoolean {
2370                                ..Default::default()
2371                            }),
2372                        );
2373                        map.insert(
2374                            SmolStr::new_static("rev"),
2375                            LexObjectProperty::String(LexString { ..Default::default() }),
2376                        );
2377                        map.insert(
2378                            SmolStr::new_static("status"),
2379                            LexObjectProperty::Ref(LexRef {
2380                                r#ref: CowStr::new_static("#convoStatus"),
2381                                ..Default::default()
2382                            }),
2383                        );
2384                        map.insert(
2385                            SmolStr::new_static("unreadCount"),
2386                            LexObjectProperty::Integer(LexInteger {
2387                                ..Default::default()
2388                            }),
2389                        );
2390                        map
2391                    },
2392                    ..Default::default()
2393                }),
2394            );
2395            map.insert(
2396                SmolStr::new_static("deletedMessageView"),
2397                LexUserType::Object(LexObject {
2398                    required: Some(
2399                        vec![
2400                            SmolStr::new_static("id"), SmolStr::new_static("rev"),
2401                            SmolStr::new_static("sender"), SmolStr::new_static("sentAt")
2402                        ],
2403                    ),
2404                    properties: {
2405                        #[allow(unused_mut)]
2406                        let mut map = BTreeMap::new();
2407                        map.insert(
2408                            SmolStr::new_static("id"),
2409                            LexObjectProperty::String(LexString { ..Default::default() }),
2410                        );
2411                        map.insert(
2412                            SmolStr::new_static("rev"),
2413                            LexObjectProperty::String(LexString { ..Default::default() }),
2414                        );
2415                        map.insert(
2416                            SmolStr::new_static("sender"),
2417                            LexObjectProperty::Ref(LexRef {
2418                                r#ref: CowStr::new_static("#messageViewSender"),
2419                                ..Default::default()
2420                            }),
2421                        );
2422                        map.insert(
2423                            SmolStr::new_static("sentAt"),
2424                            LexObjectProperty::String(LexString {
2425                                format: Some(LexStringFormat::Datetime),
2426                                ..Default::default()
2427                            }),
2428                        );
2429                        map
2430                    },
2431                    ..Default::default()
2432                }),
2433            );
2434            map.insert(
2435                SmolStr::new_static("directConvo"),
2436                LexUserType::Object(LexObject {
2437                    description: Some(
2438                        CowStr::new_static(
2439                            "[NOTE: This is under active development and should be considered unstable while this note is here].",
2440                        ),
2441                    ),
2442                    properties: {
2443                        #[allow(unused_mut)]
2444                        let mut map = BTreeMap::new();
2445                        map
2446                    },
2447                    ..Default::default()
2448                }),
2449            );
2450            map.insert(
2451                SmolStr::new_static("groupConvo"),
2452                LexUserType::Object(LexObject {
2453                    description: Some(
2454                        CowStr::new_static(
2455                            "[NOTE: This is under active development and should be considered unstable while this note is here].",
2456                        ),
2457                    ),
2458                    required: Some(
2459                        vec![
2460                            SmolStr::new_static("createdAt"),
2461                            SmolStr::new_static("lockStatus"),
2462                            SmolStr::new_static("lockStatusModerationOverride"),
2463                            SmolStr::new_static("memberCount"),
2464                            SmolStr::new_static("memberLimit"),
2465                            SmolStr::new_static("name")
2466                        ],
2467                    ),
2468                    properties: {
2469                        #[allow(unused_mut)]
2470                        let mut map = BTreeMap::new();
2471                        map.insert(
2472                            SmolStr::new_static("createdAt"),
2473                            LexObjectProperty::String(LexString {
2474                                format: Some(LexStringFormat::Datetime),
2475                                ..Default::default()
2476                            }),
2477                        );
2478                        map.insert(
2479                            SmolStr::new_static("joinLink"),
2480                            LexObjectProperty::Ref(LexRef {
2481                                r#ref: CowStr::new_static(
2482                                    "chat.bsky.group.defs#joinLinkView",
2483                                ),
2484                                ..Default::default()
2485                            }),
2486                        );
2487                        map.insert(
2488                            SmolStr::new_static("joinRequestCount"),
2489                            LexObjectProperty::Integer(LexInteger {
2490                                ..Default::default()
2491                            }),
2492                        );
2493                        map.insert(
2494                            SmolStr::new_static("lockStatus"),
2495                            LexObjectProperty::Ref(LexRef {
2496                                r#ref: CowStr::new_static("#convoLockStatus"),
2497                                ..Default::default()
2498                            }),
2499                        );
2500                        map.insert(
2501                            SmolStr::new_static("lockStatusModerationOverride"),
2502                            LexObjectProperty::Boolean(LexBoolean {
2503                                ..Default::default()
2504                            }),
2505                        );
2506                        map.insert(
2507                            SmolStr::new_static("memberCount"),
2508                            LexObjectProperty::Integer(LexInteger {
2509                                ..Default::default()
2510                            }),
2511                        );
2512                        map.insert(
2513                            SmolStr::new_static("memberLimit"),
2514                            LexObjectProperty::Integer(LexInteger {
2515                                ..Default::default()
2516                            }),
2517                        );
2518                        map.insert(
2519                            SmolStr::new_static("name"),
2520                            LexObjectProperty::String(LexString {
2521                                description: Some(
2522                                    CowStr::new_static(
2523                                        "The display name of the group conversation.",
2524                                    ),
2525                                ),
2526                                max_length: Some(1280usize),
2527                                max_graphemes: Some(128usize),
2528                                ..Default::default()
2529                            }),
2530                        );
2531                        map.insert(
2532                            SmolStr::new_static("unreadJoinRequestCount"),
2533                            LexObjectProperty::Integer(LexInteger {
2534                                ..Default::default()
2535                            }),
2536                        );
2537                        map
2538                    },
2539                    ..Default::default()
2540                }),
2541            );
2542            map.insert(
2543                SmolStr::new_static("logAcceptConvo"),
2544                LexUserType::Object(LexObject {
2545                    description: Some(
2546                        CowStr::new_static(
2547                            "Event indicating the viewer accepted a convo, and it can be moved out of the request inbox. Can be direct or group.",
2548                        ),
2549                    ),
2550                    required: Some(
2551                        vec![SmolStr::new_static("rev"), SmolStr::new_static("convoId")],
2552                    ),
2553                    properties: {
2554                        #[allow(unused_mut)]
2555                        let mut map = BTreeMap::new();
2556                        map.insert(
2557                            SmolStr::new_static("convoId"),
2558                            LexObjectProperty::String(LexString { ..Default::default() }),
2559                        );
2560                        map.insert(
2561                            SmolStr::new_static("rev"),
2562                            LexObjectProperty::String(LexString { ..Default::default() }),
2563                        );
2564                        map
2565                    },
2566                    ..Default::default()
2567                }),
2568            );
2569            map.insert(
2570                SmolStr::new_static("logAddMember"),
2571                LexUserType::Object(LexObject {
2572                    description: Some(
2573                        CowStr::new_static(
2574                            "[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member was added to a group convo. The member who was added gets a logBeginConvo (to create the convo) but also a logAddMember (to show the system message as the first message the user sees).",
2575                        ),
2576                    ),
2577                    required: Some(
2578                        vec![
2579                            SmolStr::new_static("rev"), SmolStr::new_static("convoId"),
2580                            SmolStr::new_static("message"),
2581                            SmolStr::new_static("relatedProfiles")
2582                        ],
2583                    ),
2584                    properties: {
2585                        #[allow(unused_mut)]
2586                        let mut map = BTreeMap::new();
2587                        map.insert(
2588                            SmolStr::new_static("convoId"),
2589                            LexObjectProperty::String(LexString { ..Default::default() }),
2590                        );
2591                        map.insert(
2592                            SmolStr::new_static("message"),
2593                            LexObjectProperty::Ref(LexRef {
2594                                r#ref: CowStr::new_static("#systemMessageView"),
2595                                ..Default::default()
2596                            }),
2597                        );
2598                        map.insert(
2599                            SmolStr::new_static("relatedProfiles"),
2600                            LexObjectProperty::Array(LexArray {
2601                                description: Some(
2602                                    CowStr::new_static(
2603                                        "Profiles referred in the system message.",
2604                                    ),
2605                                ),
2606                                items: LexArrayItem::Ref(LexRef {
2607                                    r#ref: CowStr::new_static(
2608                                        "chat.bsky.actor.defs#profileViewBasic",
2609                                    ),
2610                                    ..Default::default()
2611                                }),
2612                                ..Default::default()
2613                            }),
2614                        );
2615                        map.insert(
2616                            SmolStr::new_static("rev"),
2617                            LexObjectProperty::String(LexString { ..Default::default() }),
2618                        );
2619                        map
2620                    },
2621                    ..Default::default()
2622                }),
2623            );
2624            map.insert(
2625                SmolStr::new_static("logAddReaction"),
2626                LexUserType::Object(LexObject {
2627                    description: Some(
2628                        CowStr::new_static(
2629                            "Event indicating a reaction was added to a message.",
2630                        ),
2631                    ),
2632                    required: Some(
2633                        vec![
2634                            SmolStr::new_static("rev"), SmolStr::new_static("convoId"),
2635                            SmolStr::new_static("message"),
2636                            SmolStr::new_static("reaction")
2637                        ],
2638                    ),
2639                    properties: {
2640                        #[allow(unused_mut)]
2641                        let mut map = BTreeMap::new();
2642                        map.insert(
2643                            SmolStr::new_static("convoId"),
2644                            LexObjectProperty::String(LexString { ..Default::default() }),
2645                        );
2646                        map.insert(
2647                            SmolStr::new_static("message"),
2648                            LexObjectProperty::Union(LexRefUnion {
2649                                refs: vec![
2650                                    CowStr::new_static("#messageView"),
2651                                    CowStr::new_static("#deletedMessageView")
2652                                ],
2653                                ..Default::default()
2654                            }),
2655                        );
2656                        map.insert(
2657                            SmolStr::new_static("reaction"),
2658                            LexObjectProperty::Ref(LexRef {
2659                                r#ref: CowStr::new_static("#reactionView"),
2660                                ..Default::default()
2661                            }),
2662                        );
2663                        map.insert(
2664                            SmolStr::new_static("relatedProfiles"),
2665                            LexObjectProperty::Array(LexArray {
2666                                description: Some(
2667                                    CowStr::new_static(
2668                                        "Profiles referred in the message and reaction views. This isn't required for compatibility, because it was added later, but should generally be present.",
2669                                    ),
2670                                ),
2671                                items: LexArrayItem::Ref(LexRef {
2672                                    r#ref: CowStr::new_static(
2673                                        "chat.bsky.actor.defs#profileViewBasic",
2674                                    ),
2675                                    ..Default::default()
2676                                }),
2677                                ..Default::default()
2678                            }),
2679                        );
2680                        map.insert(
2681                            SmolStr::new_static("rev"),
2682                            LexObjectProperty::String(LexString { ..Default::default() }),
2683                        );
2684                        map
2685                    },
2686                    ..Default::default()
2687                }),
2688            );
2689            map.insert(
2690                SmolStr::new_static("logApproveJoinRequest"),
2691                LexUserType::Object(LexObject {
2692                    description: Some(
2693                        CowStr::new_static(
2694                            "[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join request was approved by the viewer. Only the owner gets this. The approved member gets a logBeginConvo.",
2695                        ),
2696                    ),
2697                    required: Some(
2698                        vec![
2699                            SmolStr::new_static("rev"), SmolStr::new_static("convoId"),
2700                            SmolStr::new_static("member")
2701                        ],
2702                    ),
2703                    properties: {
2704                        #[allow(unused_mut)]
2705                        let mut map = BTreeMap::new();
2706                        map.insert(
2707                            SmolStr::new_static("convoId"),
2708                            LexObjectProperty::String(LexString { ..Default::default() }),
2709                        );
2710                        map.insert(
2711                            SmolStr::new_static("member"),
2712                            LexObjectProperty::Ref(LexRef {
2713                                r#ref: CowStr::new_static(
2714                                    "chat.bsky.actor.defs#profileViewBasic",
2715                                ),
2716                                ..Default::default()
2717                            }),
2718                        );
2719                        map.insert(
2720                            SmolStr::new_static("rev"),
2721                            LexObjectProperty::String(LexString { ..Default::default() }),
2722                        );
2723                        map
2724                    },
2725                    ..Default::default()
2726                }),
2727            );
2728            map.insert(
2729                SmolStr::new_static("logBeginConvo"),
2730                LexUserType::Object(LexObject {
2731                    description: Some(
2732                        CowStr::new_static(
2733                            "Event indicating a convo containing the viewer was started. Can be direct or group. When a member is added to a group convo, they also get this event.",
2734                        ),
2735                    ),
2736                    required: Some(
2737                        vec![SmolStr::new_static("rev"), SmolStr::new_static("convoId")],
2738                    ),
2739                    properties: {
2740                        #[allow(unused_mut)]
2741                        let mut map = BTreeMap::new();
2742                        map.insert(
2743                            SmolStr::new_static("convoId"),
2744                            LexObjectProperty::String(LexString { ..Default::default() }),
2745                        );
2746                        map.insert(
2747                            SmolStr::new_static("rev"),
2748                            LexObjectProperty::String(LexString { ..Default::default() }),
2749                        );
2750                        map
2751                    },
2752                    ..Default::default()
2753                }),
2754            );
2755            map.insert(
2756                SmolStr::new_static("logCreateJoinLink"),
2757                LexUserType::Object(LexObject {
2758                    description: Some(
2759                        CowStr::new_static(
2760                            "[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join link was created for a group convo.",
2761                        ),
2762                    ),
2763                    required: Some(
2764                        vec![
2765                            SmolStr::new_static("rev"), SmolStr::new_static("convoId"),
2766                            SmolStr::new_static("message")
2767                        ],
2768                    ),
2769                    properties: {
2770                        #[allow(unused_mut)]
2771                        let mut map = BTreeMap::new();
2772                        map.insert(
2773                            SmolStr::new_static("convoId"),
2774                            LexObjectProperty::String(LexString { ..Default::default() }),
2775                        );
2776                        map.insert(
2777                            SmolStr::new_static("message"),
2778                            LexObjectProperty::Ref(LexRef {
2779                                r#ref: CowStr::new_static("#systemMessageView"),
2780                                ..Default::default()
2781                            }),
2782                        );
2783                        map.insert(
2784                            SmolStr::new_static("rev"),
2785                            LexObjectProperty::String(LexString { ..Default::default() }),
2786                        );
2787                        map
2788                    },
2789                    ..Default::default()
2790                }),
2791            );
2792            map.insert(
2793                SmolStr::new_static("logCreateMessage"),
2794                LexUserType::Object(LexObject {
2795                    description: Some(
2796                        CowStr::new_static(
2797                            "Event indicating a user-originated message was created. Is not emitted for system messages.",
2798                        ),
2799                    ),
2800                    required: Some(
2801                        vec![
2802                            SmolStr::new_static("rev"), SmolStr::new_static("convoId"),
2803                            SmolStr::new_static("message")
2804                        ],
2805                    ),
2806                    properties: {
2807                        #[allow(unused_mut)]
2808                        let mut map = BTreeMap::new();
2809                        map.insert(
2810                            SmolStr::new_static("convoId"),
2811                            LexObjectProperty::String(LexString { ..Default::default() }),
2812                        );
2813                        map.insert(
2814                            SmolStr::new_static("message"),
2815                            LexObjectProperty::Union(LexRefUnion {
2816                                refs: vec![
2817                                    CowStr::new_static("#messageView"),
2818                                    CowStr::new_static("#deletedMessageView")
2819                                ],
2820                                ..Default::default()
2821                            }),
2822                        );
2823                        map.insert(
2824                            SmolStr::new_static("relatedProfiles"),
2825                            LexObjectProperty::Array(LexArray {
2826                                description: Some(
2827                                    CowStr::new_static(
2828                                        "Profiles referred to in the message view. This isn't required for compatibility, because it was added later, but should generally be present.",
2829                                    ),
2830                                ),
2831                                items: LexArrayItem::Ref(LexRef {
2832                                    r#ref: CowStr::new_static(
2833                                        "chat.bsky.actor.defs#profileViewBasic",
2834                                    ),
2835                                    ..Default::default()
2836                                }),
2837                                ..Default::default()
2838                            }),
2839                        );
2840                        map.insert(
2841                            SmolStr::new_static("rev"),
2842                            LexObjectProperty::String(LexString { ..Default::default() }),
2843                        );
2844                        map
2845                    },
2846                    ..Default::default()
2847                }),
2848            );
2849            map.insert(
2850                SmolStr::new_static("logDeleteMessage"),
2851                LexUserType::Object(LexObject {
2852                    description: Some(
2853                        CowStr::new_static(
2854                            "Event indicating a user-originated message was deleted. Is not emitted for system messages.",
2855                        ),
2856                    ),
2857                    required: Some(
2858                        vec![
2859                            SmolStr::new_static("rev"), SmolStr::new_static("convoId"),
2860                            SmolStr::new_static("message")
2861                        ],
2862                    ),
2863                    properties: {
2864                        #[allow(unused_mut)]
2865                        let mut map = BTreeMap::new();
2866                        map.insert(
2867                            SmolStr::new_static("convoId"),
2868                            LexObjectProperty::String(LexString { ..Default::default() }),
2869                        );
2870                        map.insert(
2871                            SmolStr::new_static("message"),
2872                            LexObjectProperty::Union(LexRefUnion {
2873                                refs: vec![
2874                                    CowStr::new_static("#messageView"),
2875                                    CowStr::new_static("#deletedMessageView")
2876                                ],
2877                                ..Default::default()
2878                            }),
2879                        );
2880                        map.insert(
2881                            SmolStr::new_static("rev"),
2882                            LexObjectProperty::String(LexString { ..Default::default() }),
2883                        );
2884                        map
2885                    },
2886                    ..Default::default()
2887                }),
2888            );
2889            map.insert(
2890                SmolStr::new_static("logDisableJoinLink"),
2891                LexUserType::Object(LexObject {
2892                    description: Some(
2893                        CowStr::new_static(
2894                            "[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join link was disabled for a group convo.",
2895                        ),
2896                    ),
2897                    required: Some(
2898                        vec![
2899                            SmolStr::new_static("rev"), SmolStr::new_static("convoId"),
2900                            SmolStr::new_static("message")
2901                        ],
2902                    ),
2903                    properties: {
2904                        #[allow(unused_mut)]
2905                        let mut map = BTreeMap::new();
2906                        map.insert(
2907                            SmolStr::new_static("convoId"),
2908                            LexObjectProperty::String(LexString { ..Default::default() }),
2909                        );
2910                        map.insert(
2911                            SmolStr::new_static("message"),
2912                            LexObjectProperty::Ref(LexRef {
2913                                r#ref: CowStr::new_static("#systemMessageView"),
2914                                ..Default::default()
2915                            }),
2916                        );
2917                        map.insert(
2918                            SmolStr::new_static("rev"),
2919                            LexObjectProperty::String(LexString { ..Default::default() }),
2920                        );
2921                        map
2922                    },
2923                    ..Default::default()
2924                }),
2925            );
2926            map.insert(
2927                SmolStr::new_static("logEditGroup"),
2928                LexUserType::Object(LexObject {
2929                    description: Some(
2930                        CowStr::new_static(
2931                            "[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating info about group convo was edited.",
2932                        ),
2933                    ),
2934                    required: Some(
2935                        vec![
2936                            SmolStr::new_static("rev"), SmolStr::new_static("convoId"),
2937                            SmolStr::new_static("message")
2938                        ],
2939                    ),
2940                    properties: {
2941                        #[allow(unused_mut)]
2942                        let mut map = BTreeMap::new();
2943                        map.insert(
2944                            SmolStr::new_static("convoId"),
2945                            LexObjectProperty::String(LexString { ..Default::default() }),
2946                        );
2947                        map.insert(
2948                            SmolStr::new_static("message"),
2949                            LexObjectProperty::Ref(LexRef {
2950                                r#ref: CowStr::new_static("#systemMessageView"),
2951                                ..Default::default()
2952                            }),
2953                        );
2954                        map.insert(
2955                            SmolStr::new_static("rev"),
2956                            LexObjectProperty::String(LexString { ..Default::default() }),
2957                        );
2958                        map
2959                    },
2960                    ..Default::default()
2961                }),
2962            );
2963            map.insert(
2964                SmolStr::new_static("logEditJoinLink"),
2965                LexUserType::Object(LexObject {
2966                    description: Some(
2967                        CowStr::new_static(
2968                            "[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a settings about a join link for a group convo were edited.",
2969                        ),
2970                    ),
2971                    required: Some(
2972                        vec![
2973                            SmolStr::new_static("rev"), SmolStr::new_static("convoId"),
2974                            SmolStr::new_static("message")
2975                        ],
2976                    ),
2977                    properties: {
2978                        #[allow(unused_mut)]
2979                        let mut map = BTreeMap::new();
2980                        map.insert(
2981                            SmolStr::new_static("convoId"),
2982                            LexObjectProperty::String(LexString { ..Default::default() }),
2983                        );
2984                        map.insert(
2985                            SmolStr::new_static("message"),
2986                            LexObjectProperty::Ref(LexRef {
2987                                r#ref: CowStr::new_static("#systemMessageView"),
2988                                ..Default::default()
2989                            }),
2990                        );
2991                        map.insert(
2992                            SmolStr::new_static("rev"),
2993                            LexObjectProperty::String(LexString { ..Default::default() }),
2994                        );
2995                        map
2996                    },
2997                    ..Default::default()
2998                }),
2999            );
3000            map.insert(
3001                SmolStr::new_static("logEnableJoinLink"),
3002                LexUserType::Object(LexObject {
3003                    description: Some(
3004                        CowStr::new_static(
3005                            "[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join link was enabled for a group convo.",
3006                        ),
3007                    ),
3008                    required: Some(
3009                        vec![
3010                            SmolStr::new_static("rev"), SmolStr::new_static("convoId"),
3011                            SmolStr::new_static("message")
3012                        ],
3013                    ),
3014                    properties: {
3015                        #[allow(unused_mut)]
3016                        let mut map = BTreeMap::new();
3017                        map.insert(
3018                            SmolStr::new_static("convoId"),
3019                            LexObjectProperty::String(LexString { ..Default::default() }),
3020                        );
3021                        map.insert(
3022                            SmolStr::new_static("message"),
3023                            LexObjectProperty::Ref(LexRef {
3024                                r#ref: CowStr::new_static("#systemMessageView"),
3025                                ..Default::default()
3026                            }),
3027                        );
3028                        map.insert(
3029                            SmolStr::new_static("rev"),
3030                            LexObjectProperty::String(LexString { ..Default::default() }),
3031                        );
3032                        map
3033                    },
3034                    ..Default::default()
3035                }),
3036            );
3037            map.insert(
3038                SmolStr::new_static("logIncomingJoinRequest"),
3039                LexUserType::Object(LexObject {
3040                    description: Some(
3041                        CowStr::new_static(
3042                            "[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join request was made to a group the viewer owns. Only the owner gets this.",
3043                        ),
3044                    ),
3045                    required: Some(
3046                        vec![
3047                            SmolStr::new_static("rev"), SmolStr::new_static("convoId"),
3048                            SmolStr::new_static("member")
3049                        ],
3050                    ),
3051                    properties: {
3052                        #[allow(unused_mut)]
3053                        let mut map = BTreeMap::new();
3054                        map.insert(
3055                            SmolStr::new_static("convoId"),
3056                            LexObjectProperty::String(LexString { ..Default::default() }),
3057                        );
3058                        map.insert(
3059                            SmolStr::new_static("member"),
3060                            LexObjectProperty::Ref(LexRef {
3061                                r#ref: CowStr::new_static(
3062                                    "chat.bsky.actor.defs#profileViewBasic",
3063                                ),
3064                                ..Default::default()
3065                            }),
3066                        );
3067                        map.insert(
3068                            SmolStr::new_static("rev"),
3069                            LexObjectProperty::String(LexString { ..Default::default() }),
3070                        );
3071                        map
3072                    },
3073                    ..Default::default()
3074                }),
3075            );
3076            map.insert(
3077                SmolStr::new_static("logLeaveConvo"),
3078                LexUserType::Object(LexObject {
3079                    description: Some(
3080                        CowStr::new_static(
3081                            "Event indicating the viewer left a convo. Can be direct or group.",
3082                        ),
3083                    ),
3084                    required: Some(
3085                        vec![SmolStr::new_static("rev"), SmolStr::new_static("convoId")],
3086                    ),
3087                    properties: {
3088                        #[allow(unused_mut)]
3089                        let mut map = BTreeMap::new();
3090                        map.insert(
3091                            SmolStr::new_static("convoId"),
3092                            LexObjectProperty::String(LexString { ..Default::default() }),
3093                        );
3094                        map.insert(
3095                            SmolStr::new_static("rev"),
3096                            LexObjectProperty::String(LexString { ..Default::default() }),
3097                        );
3098                        map
3099                    },
3100                    ..Default::default()
3101                }),
3102            );
3103            map.insert(
3104                SmolStr::new_static("logLockConvo"),
3105                LexUserType::Object(LexObject {
3106                    description: Some(
3107                        CowStr::new_static(
3108                            "[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a group convo was locked.",
3109                        ),
3110                    ),
3111                    required: Some(
3112                        vec![
3113                            SmolStr::new_static("rev"), SmolStr::new_static("convoId"),
3114                            SmolStr::new_static("message"),
3115                            SmolStr::new_static("relatedProfiles")
3116                        ],
3117                    ),
3118                    properties: {
3119                        #[allow(unused_mut)]
3120                        let mut map = BTreeMap::new();
3121                        map.insert(
3122                            SmolStr::new_static("convoId"),
3123                            LexObjectProperty::String(LexString { ..Default::default() }),
3124                        );
3125                        map.insert(
3126                            SmolStr::new_static("message"),
3127                            LexObjectProperty::Ref(LexRef {
3128                                r#ref: CowStr::new_static("#systemMessageView"),
3129                                ..Default::default()
3130                            }),
3131                        );
3132                        map.insert(
3133                            SmolStr::new_static("relatedProfiles"),
3134                            LexObjectProperty::Array(LexArray {
3135                                description: Some(
3136                                    CowStr::new_static(
3137                                        "Profiles referred in the system message.",
3138                                    ),
3139                                ),
3140                                items: LexArrayItem::Ref(LexRef {
3141                                    r#ref: CowStr::new_static(
3142                                        "chat.bsky.actor.defs#profileViewBasic",
3143                                    ),
3144                                    ..Default::default()
3145                                }),
3146                                ..Default::default()
3147                            }),
3148                        );
3149                        map.insert(
3150                            SmolStr::new_static("rev"),
3151                            LexObjectProperty::String(LexString { ..Default::default() }),
3152                        );
3153                        map
3154                    },
3155                    ..Default::default()
3156                }),
3157            );
3158            map.insert(
3159                SmolStr::new_static("logLockConvoPermanently"),
3160                LexUserType::Object(LexObject {
3161                    description: Some(
3162                        CowStr::new_static(
3163                            "[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a group convo was locked permanently.",
3164                        ),
3165                    ),
3166                    required: Some(
3167                        vec![
3168                            SmolStr::new_static("rev"), SmolStr::new_static("convoId"),
3169                            SmolStr::new_static("message"),
3170                            SmolStr::new_static("relatedProfiles")
3171                        ],
3172                    ),
3173                    properties: {
3174                        #[allow(unused_mut)]
3175                        let mut map = BTreeMap::new();
3176                        map.insert(
3177                            SmolStr::new_static("convoId"),
3178                            LexObjectProperty::String(LexString { ..Default::default() }),
3179                        );
3180                        map.insert(
3181                            SmolStr::new_static("message"),
3182                            LexObjectProperty::Ref(LexRef {
3183                                r#ref: CowStr::new_static("#systemMessageView"),
3184                                ..Default::default()
3185                            }),
3186                        );
3187                        map.insert(
3188                            SmolStr::new_static("relatedProfiles"),
3189                            LexObjectProperty::Array(LexArray {
3190                                description: Some(
3191                                    CowStr::new_static(
3192                                        "Profiles referred in the system message.",
3193                                    ),
3194                                ),
3195                                items: LexArrayItem::Ref(LexRef {
3196                                    r#ref: CowStr::new_static(
3197                                        "chat.bsky.actor.defs#profileViewBasic",
3198                                    ),
3199                                    ..Default::default()
3200                                }),
3201                                ..Default::default()
3202                            }),
3203                        );
3204                        map.insert(
3205                            SmolStr::new_static("rev"),
3206                            LexObjectProperty::String(LexString { ..Default::default() }),
3207                        );
3208                        map
3209                    },
3210                    ..Default::default()
3211                }),
3212            );
3213            map.insert(
3214                SmolStr::new_static("logMemberJoin"),
3215                LexUserType::Object(LexObject {
3216                    description: Some(
3217                        CowStr::new_static(
3218                            "[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member joined a group convo via join link. The member who was added gets a logBeginConvo (to create the convo) but also a logMemberJoin (to show the system message as the first message the user sees).",
3219                        ),
3220                    ),
3221                    required: Some(
3222                        vec![
3223                            SmolStr::new_static("rev"), SmolStr::new_static("convoId"),
3224                            SmolStr::new_static("message"),
3225                            SmolStr::new_static("relatedProfiles")
3226                        ],
3227                    ),
3228                    properties: {
3229                        #[allow(unused_mut)]
3230                        let mut map = BTreeMap::new();
3231                        map.insert(
3232                            SmolStr::new_static("convoId"),
3233                            LexObjectProperty::String(LexString { ..Default::default() }),
3234                        );
3235                        map.insert(
3236                            SmolStr::new_static("message"),
3237                            LexObjectProperty::Ref(LexRef {
3238                                r#ref: CowStr::new_static("#systemMessageView"),
3239                                ..Default::default()
3240                            }),
3241                        );
3242                        map.insert(
3243                            SmolStr::new_static("relatedProfiles"),
3244                            LexObjectProperty::Array(LexArray {
3245                                description: Some(
3246                                    CowStr::new_static(
3247                                        "Profiles referred in the system message.",
3248                                    ),
3249                                ),
3250                                items: LexArrayItem::Ref(LexRef {
3251                                    r#ref: CowStr::new_static(
3252                                        "chat.bsky.actor.defs#profileViewBasic",
3253                                    ),
3254                                    ..Default::default()
3255                                }),
3256                                ..Default::default()
3257                            }),
3258                        );
3259                        map.insert(
3260                            SmolStr::new_static("rev"),
3261                            LexObjectProperty::String(LexString { ..Default::default() }),
3262                        );
3263                        map
3264                    },
3265                    ..Default::default()
3266                }),
3267            );
3268            map.insert(
3269                SmolStr::new_static("logMemberLeave"),
3270                LexUserType::Object(LexObject {
3271                    description: Some(
3272                        CowStr::new_static(
3273                            "[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member voluntarily left a group convo. The member who was removed gets a logLeaveConvo (to leave the convo) but not a logMemberLeave (because they already left, so can't see the system message).",
3274                        ),
3275                    ),
3276                    required: Some(
3277                        vec![
3278                            SmolStr::new_static("rev"), SmolStr::new_static("convoId"),
3279                            SmolStr::new_static("message"),
3280                            SmolStr::new_static("relatedProfiles")
3281                        ],
3282                    ),
3283                    properties: {
3284                        #[allow(unused_mut)]
3285                        let mut map = BTreeMap::new();
3286                        map.insert(
3287                            SmolStr::new_static("convoId"),
3288                            LexObjectProperty::String(LexString { ..Default::default() }),
3289                        );
3290                        map.insert(
3291                            SmolStr::new_static("message"),
3292                            LexObjectProperty::Ref(LexRef {
3293                                r#ref: CowStr::new_static("#systemMessageView"),
3294                                ..Default::default()
3295                            }),
3296                        );
3297                        map.insert(
3298                            SmolStr::new_static("relatedProfiles"),
3299                            LexObjectProperty::Array(LexArray {
3300                                description: Some(
3301                                    CowStr::new_static(
3302                                        "Profiles referred in the system message.",
3303                                    ),
3304                                ),
3305                                items: LexArrayItem::Ref(LexRef {
3306                                    r#ref: CowStr::new_static(
3307                                        "chat.bsky.actor.defs#profileViewBasic",
3308                                    ),
3309                                    ..Default::default()
3310                                }),
3311                                ..Default::default()
3312                            }),
3313                        );
3314                        map.insert(
3315                            SmolStr::new_static("rev"),
3316                            LexObjectProperty::String(LexString { ..Default::default() }),
3317                        );
3318                        map
3319                    },
3320                    ..Default::default()
3321                }),
3322            );
3323            map.insert(
3324                SmolStr::new_static("logMuteConvo"),
3325                LexUserType::Object(LexObject {
3326                    description: Some(
3327                        CowStr::new_static(
3328                            "Event indicating the viewer muted a convo. Can be direct or group.",
3329                        ),
3330                    ),
3331                    required: Some(
3332                        vec![SmolStr::new_static("rev"), SmolStr::new_static("convoId")],
3333                    ),
3334                    properties: {
3335                        #[allow(unused_mut)]
3336                        let mut map = BTreeMap::new();
3337                        map.insert(
3338                            SmolStr::new_static("convoId"),
3339                            LexObjectProperty::String(LexString { ..Default::default() }),
3340                        );
3341                        map.insert(
3342                            SmolStr::new_static("rev"),
3343                            LexObjectProperty::String(LexString { ..Default::default() }),
3344                        );
3345                        map
3346                    },
3347                    ..Default::default()
3348                }),
3349            );
3350            map.insert(
3351                SmolStr::new_static("logOutgoingJoinRequest"),
3352                LexUserType::Object(LexObject {
3353                    description: Some(
3354                        CowStr::new_static(
3355                            "[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join request was made by the requester. Only requester actor gets this.",
3356                        ),
3357                    ),
3358                    required: Some(
3359                        vec![SmolStr::new_static("rev"), SmolStr::new_static("convoId")],
3360                    ),
3361                    properties: {
3362                        #[allow(unused_mut)]
3363                        let mut map = BTreeMap::new();
3364                        map.insert(
3365                            SmolStr::new_static("convoId"),
3366                            LexObjectProperty::String(LexString { ..Default::default() }),
3367                        );
3368                        map.insert(
3369                            SmolStr::new_static("rev"),
3370                            LexObjectProperty::String(LexString { ..Default::default() }),
3371                        );
3372                        map
3373                    },
3374                    ..Default::default()
3375                }),
3376            );
3377            map.insert(
3378                SmolStr::new_static("logReadConvo"),
3379                LexUserType::Object(LexObject {
3380                    description: Some(
3381                        CowStr::new_static(
3382                            "[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a convo was read up to a certain message.",
3383                        ),
3384                    ),
3385                    required: Some(
3386                        vec![
3387                            SmolStr::new_static("rev"), SmolStr::new_static("convoId"),
3388                            SmolStr::new_static("message")
3389                        ],
3390                    ),
3391                    properties: {
3392                        #[allow(unused_mut)]
3393                        let mut map = BTreeMap::new();
3394                        map.insert(
3395                            SmolStr::new_static("convoId"),
3396                            LexObjectProperty::String(LexString { ..Default::default() }),
3397                        );
3398                        map.insert(
3399                            SmolStr::new_static("message"),
3400                            LexObjectProperty::Union(LexRefUnion {
3401                                refs: vec![
3402                                    CowStr::new_static("#messageView"),
3403                                    CowStr::new_static("#deletedMessageView"),
3404                                    CowStr::new_static("#systemMessageView")
3405                                ],
3406                                ..Default::default()
3407                            }),
3408                        );
3409                        map.insert(
3410                            SmolStr::new_static("rev"),
3411                            LexObjectProperty::String(LexString { ..Default::default() }),
3412                        );
3413                        map
3414                    },
3415                    ..Default::default()
3416                }),
3417            );
3418            map.insert(
3419                SmolStr::new_static("logReadJoinRequests"),
3420                LexUserType::Object(LexObject {
3421                    description: Some(
3422                        CowStr::new_static(
3423                            "[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating the group owner marked join requests as read. Only the owner gets this.",
3424                        ),
3425                    ),
3426                    required: Some(
3427                        vec![SmolStr::new_static("rev"), SmolStr::new_static("convoId")],
3428                    ),
3429                    properties: {
3430                        #[allow(unused_mut)]
3431                        let mut map = BTreeMap::new();
3432                        map.insert(
3433                            SmolStr::new_static("convoId"),
3434                            LexObjectProperty::String(LexString { ..Default::default() }),
3435                        );
3436                        map.insert(
3437                            SmolStr::new_static("rev"),
3438                            LexObjectProperty::String(LexString { ..Default::default() }),
3439                        );
3440                        map
3441                    },
3442                    ..Default::default()
3443                }),
3444            );
3445            map.insert(
3446                SmolStr::new_static("logReadMessage"),
3447                LexUserType::Object(LexObject {
3448                    description: Some(
3449                        CowStr::new_static(
3450                            "DEPRECATED: use logReadConvo instead. Event indicating a convo was read up to a certain message.",
3451                        ),
3452                    ),
3453                    required: Some(
3454                        vec![
3455                            SmolStr::new_static("rev"), SmolStr::new_static("convoId"),
3456                            SmolStr::new_static("message")
3457                        ],
3458                    ),
3459                    properties: {
3460                        #[allow(unused_mut)]
3461                        let mut map = BTreeMap::new();
3462                        map.insert(
3463                            SmolStr::new_static("convoId"),
3464                            LexObjectProperty::String(LexString { ..Default::default() }),
3465                        );
3466                        map.insert(
3467                            SmolStr::new_static("message"),
3468                            LexObjectProperty::Union(LexRefUnion {
3469                                refs: vec![
3470                                    CowStr::new_static("#messageView"),
3471                                    CowStr::new_static("#deletedMessageView"),
3472                                    CowStr::new_static("#systemMessageView")
3473                                ],
3474                                ..Default::default()
3475                            }),
3476                        );
3477                        map.insert(
3478                            SmolStr::new_static("rev"),
3479                            LexObjectProperty::String(LexString { ..Default::default() }),
3480                        );
3481                        map
3482                    },
3483                    ..Default::default()
3484                }),
3485            );
3486            map.insert(
3487                SmolStr::new_static("logRejectJoinRequest"),
3488                LexUserType::Object(LexObject {
3489                    description: Some(
3490                        CowStr::new_static(
3491                            "[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join request was rejected by the viewer. Only the owner gets this.",
3492                        ),
3493                    ),
3494                    required: Some(
3495                        vec![
3496                            SmolStr::new_static("rev"), SmolStr::new_static("convoId"),
3497                            SmolStr::new_static("member")
3498                        ],
3499                    ),
3500                    properties: {
3501                        #[allow(unused_mut)]
3502                        let mut map = BTreeMap::new();
3503                        map.insert(
3504                            SmolStr::new_static("convoId"),
3505                            LexObjectProperty::String(LexString { ..Default::default() }),
3506                        );
3507                        map.insert(
3508                            SmolStr::new_static("member"),
3509                            LexObjectProperty::Ref(LexRef {
3510                                r#ref: CowStr::new_static(
3511                                    "chat.bsky.actor.defs#profileViewBasic",
3512                                ),
3513                                ..Default::default()
3514                            }),
3515                        );
3516                        map.insert(
3517                            SmolStr::new_static("rev"),
3518                            LexObjectProperty::String(LexString { ..Default::default() }),
3519                        );
3520                        map
3521                    },
3522                    ..Default::default()
3523                }),
3524            );
3525            map.insert(
3526                SmolStr::new_static("logRemoveMember"),
3527                LexUserType::Object(LexObject {
3528                    description: Some(
3529                        CowStr::new_static(
3530                            "[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member was removed from a group convo. The member who was removed gets a logLeaveConvo (to leave the convo) but not a logRemoveMember (because they already left, so can't see the system message).",
3531                        ),
3532                    ),
3533                    required: Some(
3534                        vec![
3535                            SmolStr::new_static("rev"), SmolStr::new_static("convoId"),
3536                            SmolStr::new_static("message"),
3537                            SmolStr::new_static("relatedProfiles")
3538                        ],
3539                    ),
3540                    properties: {
3541                        #[allow(unused_mut)]
3542                        let mut map = BTreeMap::new();
3543                        map.insert(
3544                            SmolStr::new_static("convoId"),
3545                            LexObjectProperty::String(LexString { ..Default::default() }),
3546                        );
3547                        map.insert(
3548                            SmolStr::new_static("message"),
3549                            LexObjectProperty::Ref(LexRef {
3550                                r#ref: CowStr::new_static("#systemMessageView"),
3551                                ..Default::default()
3552                            }),
3553                        );
3554                        map.insert(
3555                            SmolStr::new_static("relatedProfiles"),
3556                            LexObjectProperty::Array(LexArray {
3557                                description: Some(
3558                                    CowStr::new_static(
3559                                        "Profiles referred in the system message.",
3560                                    ),
3561                                ),
3562                                items: LexArrayItem::Ref(LexRef {
3563                                    r#ref: CowStr::new_static(
3564                                        "chat.bsky.actor.defs#profileViewBasic",
3565                                    ),
3566                                    ..Default::default()
3567                                }),
3568                                ..Default::default()
3569                            }),
3570                        );
3571                        map.insert(
3572                            SmolStr::new_static("rev"),
3573                            LexObjectProperty::String(LexString { ..Default::default() }),
3574                        );
3575                        map
3576                    },
3577                    ..Default::default()
3578                }),
3579            );
3580            map.insert(
3581                SmolStr::new_static("logRemoveReaction"),
3582                LexUserType::Object(LexObject {
3583                    description: Some(
3584                        CowStr::new_static(
3585                            "Event indicating a reaction was removed from a message.",
3586                        ),
3587                    ),
3588                    required: Some(
3589                        vec![
3590                            SmolStr::new_static("rev"), SmolStr::new_static("convoId"),
3591                            SmolStr::new_static("message"),
3592                            SmolStr::new_static("reaction")
3593                        ],
3594                    ),
3595                    properties: {
3596                        #[allow(unused_mut)]
3597                        let mut map = BTreeMap::new();
3598                        map.insert(
3599                            SmolStr::new_static("convoId"),
3600                            LexObjectProperty::String(LexString { ..Default::default() }),
3601                        );
3602                        map.insert(
3603                            SmolStr::new_static("message"),
3604                            LexObjectProperty::Union(LexRefUnion {
3605                                refs: vec![
3606                                    CowStr::new_static("#messageView"),
3607                                    CowStr::new_static("#deletedMessageView")
3608                                ],
3609                                ..Default::default()
3610                            }),
3611                        );
3612                        map.insert(
3613                            SmolStr::new_static("reaction"),
3614                            LexObjectProperty::Ref(LexRef {
3615                                r#ref: CowStr::new_static("#reactionView"),
3616                                ..Default::default()
3617                            }),
3618                        );
3619                        map.insert(
3620                            SmolStr::new_static("relatedProfiles"),
3621                            LexObjectProperty::Array(LexArray {
3622                                description: Some(
3623                                    CowStr::new_static(
3624                                        "Profiles referred in the message and reaction views. This isn't required for compatibility, because it was added later, but should generally be present.",
3625                                    ),
3626                                ),
3627                                items: LexArrayItem::Ref(LexRef {
3628                                    r#ref: CowStr::new_static(
3629                                        "chat.bsky.actor.defs#profileViewBasic",
3630                                    ),
3631                                    ..Default::default()
3632                                }),
3633                                ..Default::default()
3634                            }),
3635                        );
3636                        map.insert(
3637                            SmolStr::new_static("rev"),
3638                            LexObjectProperty::String(LexString { ..Default::default() }),
3639                        );
3640                        map
3641                    },
3642                    ..Default::default()
3643                }),
3644            );
3645            map.insert(
3646                SmolStr::new_static("logUnlockConvo"),
3647                LexUserType::Object(LexObject {
3648                    description: Some(
3649                        CowStr::new_static(
3650                            "[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a group convo was unlocked.",
3651                        ),
3652                    ),
3653                    required: Some(
3654                        vec![
3655                            SmolStr::new_static("rev"), SmolStr::new_static("convoId"),
3656                            SmolStr::new_static("message"),
3657                            SmolStr::new_static("relatedProfiles")
3658                        ],
3659                    ),
3660                    properties: {
3661                        #[allow(unused_mut)]
3662                        let mut map = BTreeMap::new();
3663                        map.insert(
3664                            SmolStr::new_static("convoId"),
3665                            LexObjectProperty::String(LexString { ..Default::default() }),
3666                        );
3667                        map.insert(
3668                            SmolStr::new_static("message"),
3669                            LexObjectProperty::Ref(LexRef {
3670                                r#ref: CowStr::new_static("#systemMessageView"),
3671                                ..Default::default()
3672                            }),
3673                        );
3674                        map.insert(
3675                            SmolStr::new_static("relatedProfiles"),
3676                            LexObjectProperty::Array(LexArray {
3677                                description: Some(
3678                                    CowStr::new_static(
3679                                        "Profiles referred in the system message.",
3680                                    ),
3681                                ),
3682                                items: LexArrayItem::Ref(LexRef {
3683                                    r#ref: CowStr::new_static(
3684                                        "chat.bsky.actor.defs#profileViewBasic",
3685                                    ),
3686                                    ..Default::default()
3687                                }),
3688                                ..Default::default()
3689                            }),
3690                        );
3691                        map.insert(
3692                            SmolStr::new_static("rev"),
3693                            LexObjectProperty::String(LexString { ..Default::default() }),
3694                        );
3695                        map
3696                    },
3697                    ..Default::default()
3698                }),
3699            );
3700            map.insert(
3701                SmolStr::new_static("logUnmuteConvo"),
3702                LexUserType::Object(LexObject {
3703                    description: Some(
3704                        CowStr::new_static(
3705                            "Event indicating the viewer unmuted a convo. Can be direct or group.",
3706                        ),
3707                    ),
3708                    required: Some(
3709                        vec![SmolStr::new_static("rev"), SmolStr::new_static("convoId")],
3710                    ),
3711                    properties: {
3712                        #[allow(unused_mut)]
3713                        let mut map = BTreeMap::new();
3714                        map.insert(
3715                            SmolStr::new_static("convoId"),
3716                            LexObjectProperty::String(LexString { ..Default::default() }),
3717                        );
3718                        map.insert(
3719                            SmolStr::new_static("rev"),
3720                            LexObjectProperty::String(LexString { ..Default::default() }),
3721                        );
3722                        map
3723                    },
3724                    ..Default::default()
3725                }),
3726            );
3727            map.insert(
3728                SmolStr::new_static("logWithdrawIncomingJoinRequest"),
3729                LexUserType::Object(LexObject {
3730                    description: Some(
3731                        CowStr::new_static(
3732                            "[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a prospective member withdrew their join request. Only the owner gets this.",
3733                        ),
3734                    ),
3735                    required: Some(
3736                        vec![
3737                            SmolStr::new_static("rev"), SmolStr::new_static("convoId"),
3738                            SmolStr::new_static("member")
3739                        ],
3740                    ),
3741                    properties: {
3742                        #[allow(unused_mut)]
3743                        let mut map = BTreeMap::new();
3744                        map.insert(
3745                            SmolStr::new_static("convoId"),
3746                            LexObjectProperty::String(LexString { ..Default::default() }),
3747                        );
3748                        map.insert(
3749                            SmolStr::new_static("member"),
3750                            LexObjectProperty::Ref(LexRef {
3751                                r#ref: CowStr::new_static(
3752                                    "chat.bsky.actor.defs#profileViewBasic",
3753                                ),
3754                                ..Default::default()
3755                            }),
3756                        );
3757                        map.insert(
3758                            SmolStr::new_static("rev"),
3759                            LexObjectProperty::String(LexString { ..Default::default() }),
3760                        );
3761                        map
3762                    },
3763                    ..Default::default()
3764                }),
3765            );
3766            map.insert(
3767                SmolStr::new_static("logWithdrawOutgoingJoinRequest"),
3768                LexUserType::Object(LexObject {
3769                    description: Some(
3770                        CowStr::new_static(
3771                            "[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating the viewer withdrew their own join request. Only requester actor gets this.",
3772                        ),
3773                    ),
3774                    required: Some(
3775                        vec![SmolStr::new_static("rev"), SmolStr::new_static("convoId")],
3776                    ),
3777                    properties: {
3778                        #[allow(unused_mut)]
3779                        let mut map = BTreeMap::new();
3780                        map.insert(
3781                            SmolStr::new_static("convoId"),
3782                            LexObjectProperty::String(LexString { ..Default::default() }),
3783                        );
3784                        map.insert(
3785                            SmolStr::new_static("rev"),
3786                            LexObjectProperty::String(LexString { ..Default::default() }),
3787                        );
3788                        map
3789                    },
3790                    ..Default::default()
3791                }),
3792            );
3793            map.insert(
3794                SmolStr::new_static("messageAndReactionView"),
3795                LexUserType::Object(LexObject {
3796                    required: Some(
3797                        vec![
3798                            SmolStr::new_static("message"),
3799                            SmolStr::new_static("reaction")
3800                        ],
3801                    ),
3802                    properties: {
3803                        #[allow(unused_mut)]
3804                        let mut map = BTreeMap::new();
3805                        map.insert(
3806                            SmolStr::new_static("message"),
3807                            LexObjectProperty::Ref(LexRef {
3808                                r#ref: CowStr::new_static("#messageView"),
3809                                ..Default::default()
3810                            }),
3811                        );
3812                        map.insert(
3813                            SmolStr::new_static("reaction"),
3814                            LexObjectProperty::Ref(LexRef {
3815                                r#ref: CowStr::new_static("#reactionView"),
3816                                ..Default::default()
3817                            }),
3818                        );
3819                        map
3820                    },
3821                    ..Default::default()
3822                }),
3823            );
3824            map.insert(
3825                SmolStr::new_static("messageInput"),
3826                LexUserType::Object(LexObject {
3827                    required: Some(vec![SmolStr::new_static("text")]),
3828                    properties: {
3829                        #[allow(unused_mut)]
3830                        let mut map = BTreeMap::new();
3831                        map.insert(
3832                            SmolStr::new_static("embed"),
3833                            LexObjectProperty::Union(LexRefUnion {
3834                                refs: vec![
3835                                    CowStr::new_static("app.bsky.embed.record"),
3836                                    CowStr::new_static("chat.bsky.embed.joinLink")
3837                                ],
3838                                ..Default::default()
3839                            }),
3840                        );
3841                        map.insert(
3842                            SmolStr::new_static("facets"),
3843                            LexObjectProperty::Array(LexArray {
3844                                description: Some(
3845                                    CowStr::new_static(
3846                                        "Annotations of text (mentions, URLs, hashtags, etc)",
3847                                    ),
3848                                ),
3849                                items: LexArrayItem::Ref(LexRef {
3850                                    r#ref: CowStr::new_static("app.bsky.richtext.facet"),
3851                                    ..Default::default()
3852                                }),
3853                                ..Default::default()
3854                            }),
3855                        );
3856                        map.insert(
3857                            SmolStr::new_static("replyTo"),
3858                            LexObjectProperty::Ref(LexRef {
3859                                r#ref: CowStr::new_static("#replyRef"),
3860                                ..Default::default()
3861                            }),
3862                        );
3863                        map.insert(
3864                            SmolStr::new_static("text"),
3865                            LexObjectProperty::String(LexString {
3866                                max_length: Some(10000usize),
3867                                max_graphemes: Some(1000usize),
3868                                ..Default::default()
3869                            }),
3870                        );
3871                        map
3872                    },
3873                    ..Default::default()
3874                }),
3875            );
3876            map.insert(
3877                SmolStr::new_static("messageRef"),
3878                LexUserType::Object(LexObject {
3879                    required: Some(
3880                        vec![
3881                            SmolStr::new_static("did"), SmolStr::new_static("messageId"),
3882                            SmolStr::new_static("convoId")
3883                        ],
3884                    ),
3885                    properties: {
3886                        #[allow(unused_mut)]
3887                        let mut map = BTreeMap::new();
3888                        map.insert(
3889                            SmolStr::new_static("convoId"),
3890                            LexObjectProperty::String(LexString { ..Default::default() }),
3891                        );
3892                        map.insert(
3893                            SmolStr::new_static("did"),
3894                            LexObjectProperty::String(LexString {
3895                                format: Some(LexStringFormat::Did),
3896                                ..Default::default()
3897                            }),
3898                        );
3899                        map.insert(
3900                            SmolStr::new_static("messageId"),
3901                            LexObjectProperty::String(LexString { ..Default::default() }),
3902                        );
3903                        map
3904                    },
3905                    ..Default::default()
3906                }),
3907            );
3908            map.insert(
3909                SmolStr::new_static("messageView"),
3910                LexUserType::Object(LexObject {
3911                    required: Some(
3912                        vec![
3913                            SmolStr::new_static("id"), SmolStr::new_static("rev"),
3914                            SmolStr::new_static("text"), SmolStr::new_static("sender"),
3915                            SmolStr::new_static("sentAt")
3916                        ],
3917                    ),
3918                    properties: {
3919                        #[allow(unused_mut)]
3920                        let mut map = BTreeMap::new();
3921                        map.insert(
3922                            SmolStr::new_static("embed"),
3923                            LexObjectProperty::Union(LexRefUnion {
3924                                refs: vec![
3925                                    CowStr::new_static("app.bsky.embed.record#view"),
3926                                    CowStr::new_static("chat.bsky.embed.joinLink#view")
3927                                ],
3928                                ..Default::default()
3929                            }),
3930                        );
3931                        map.insert(
3932                            SmolStr::new_static("facets"),
3933                            LexObjectProperty::Array(LexArray {
3934                                description: Some(
3935                                    CowStr::new_static(
3936                                        "Annotations of text (mentions, URLs, hashtags, etc)",
3937                                    ),
3938                                ),
3939                                items: LexArrayItem::Ref(LexRef {
3940                                    r#ref: CowStr::new_static("app.bsky.richtext.facet"),
3941                                    ..Default::default()
3942                                }),
3943                                ..Default::default()
3944                            }),
3945                        );
3946                        map.insert(
3947                            SmolStr::new_static("id"),
3948                            LexObjectProperty::String(LexString { ..Default::default() }),
3949                        );
3950                        map.insert(
3951                            SmolStr::new_static("reactions"),
3952                            LexObjectProperty::Array(LexArray {
3953                                description: Some(
3954                                    CowStr::new_static(
3955                                        "Reactions to this message, in ascending order of creation time.",
3956                                    ),
3957                                ),
3958                                items: LexArrayItem::Ref(LexRef {
3959                                    r#ref: CowStr::new_static("#reactionView"),
3960                                    ..Default::default()
3961                                }),
3962                                ..Default::default()
3963                            }),
3964                        );
3965                        map.insert(
3966                            SmolStr::new_static("replyTo"),
3967                            LexObjectProperty::Union(LexRefUnion {
3968                                description: Some(
3969                                    CowStr::new_static(
3970                                        "If set, the message this message is replying to. The full view of the referenced message is embedded so the client can render it inline. Only a single level is embedded: the embedded message will not itself have a populated 'replyTo' field even if it was also a reply.",
3971                                    ),
3972                                ),
3973                                refs: vec![
3974                                    CowStr::new_static("#messageView"),
3975                                    CowStr::new_static("#deletedMessageView")
3976                                ],
3977                                ..Default::default()
3978                            }),
3979                        );
3980                        map.insert(
3981                            SmolStr::new_static("rev"),
3982                            LexObjectProperty::String(LexString { ..Default::default() }),
3983                        );
3984                        map.insert(
3985                            SmolStr::new_static("sender"),
3986                            LexObjectProperty::Ref(LexRef {
3987                                r#ref: CowStr::new_static("#messageViewSender"),
3988                                ..Default::default()
3989                            }),
3990                        );
3991                        map.insert(
3992                            SmolStr::new_static("sentAt"),
3993                            LexObjectProperty::String(LexString {
3994                                format: Some(LexStringFormat::Datetime),
3995                                ..Default::default()
3996                            }),
3997                        );
3998                        map.insert(
3999                            SmolStr::new_static("text"),
4000                            LexObjectProperty::String(LexString {
4001                                max_length: Some(10000usize),
4002                                max_graphemes: Some(1000usize),
4003                                ..Default::default()
4004                            }),
4005                        );
4006                        map
4007                    },
4008                    ..Default::default()
4009                }),
4010            );
4011            map.insert(
4012                SmolStr::new_static("messageViewSender"),
4013                LexUserType::Object(LexObject {
4014                    required: Some(vec![SmolStr::new_static("did")]),
4015                    properties: {
4016                        #[allow(unused_mut)]
4017                        let mut map = BTreeMap::new();
4018                        map.insert(
4019                            SmolStr::new_static("did"),
4020                            LexObjectProperty::String(LexString {
4021                                format: Some(LexStringFormat::Did),
4022                                ..Default::default()
4023                            }),
4024                        );
4025                        map
4026                    },
4027                    ..Default::default()
4028                }),
4029            );
4030            map.insert(
4031                SmolStr::new_static("reactionView"),
4032                LexUserType::Object(LexObject {
4033                    required: Some(
4034                        vec![
4035                            SmolStr::new_static("value"), SmolStr::new_static("sender"),
4036                            SmolStr::new_static("createdAt")
4037                        ],
4038                    ),
4039                    properties: {
4040                        #[allow(unused_mut)]
4041                        let mut map = BTreeMap::new();
4042                        map.insert(
4043                            SmolStr::new_static("createdAt"),
4044                            LexObjectProperty::String(LexString {
4045                                format: Some(LexStringFormat::Datetime),
4046                                ..Default::default()
4047                            }),
4048                        );
4049                        map.insert(
4050                            SmolStr::new_static("sender"),
4051                            LexObjectProperty::Ref(LexRef {
4052                                r#ref: CowStr::new_static("#reactionViewSender"),
4053                                ..Default::default()
4054                            }),
4055                        );
4056                        map.insert(
4057                            SmolStr::new_static("value"),
4058                            LexObjectProperty::String(LexString { ..Default::default() }),
4059                        );
4060                        map
4061                    },
4062                    ..Default::default()
4063                }),
4064            );
4065            map.insert(
4066                SmolStr::new_static("reactionViewSender"),
4067                LexUserType::Object(LexObject {
4068                    required: Some(vec![SmolStr::new_static("did")]),
4069                    properties: {
4070                        #[allow(unused_mut)]
4071                        let mut map = BTreeMap::new();
4072                        map.insert(
4073                            SmolStr::new_static("did"),
4074                            LexObjectProperty::String(LexString {
4075                                format: Some(LexStringFormat::Did),
4076                                ..Default::default()
4077                            }),
4078                        );
4079                        map
4080                    },
4081                    ..Default::default()
4082                }),
4083            );
4084            map.insert(
4085                SmolStr::new_static("replyRef"),
4086                LexUserType::Object(LexObject {
4087                    description: Some(
4088                        CowStr::new_static(
4089                            "A reference to another message within the same convo, used to indicate that a message is a reply to it.",
4090                        ),
4091                    ),
4092                    required: Some(vec![SmolStr::new_static("messageId")]),
4093                    properties: {
4094                        #[allow(unused_mut)]
4095                        let mut map = BTreeMap::new();
4096                        map.insert(
4097                            SmolStr::new_static("messageId"),
4098                            LexObjectProperty::String(LexString { ..Default::default() }),
4099                        );
4100                        map
4101                    },
4102                    ..Default::default()
4103                }),
4104            );
4105            map.insert(
4106                SmolStr::new_static("systemMessageDataAddMember"),
4107                LexUserType::Object(LexObject {
4108                    description: Some(
4109                        CowStr::new_static(
4110                            "[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating a user was added to the group convo.",
4111                        ),
4112                    ),
4113                    required: Some(
4114                        vec![
4115                            SmolStr::new_static("member"), SmolStr::new_static("role"),
4116                            SmolStr::new_static("addedBy")
4117                        ],
4118                    ),
4119                    properties: {
4120                        #[allow(unused_mut)]
4121                        let mut map = BTreeMap::new();
4122                        map.insert(
4123                            SmolStr::new_static("addedBy"),
4124                            LexObjectProperty::Ref(LexRef {
4125                                r#ref: CowStr::new_static("#systemMessageReferredUser"),
4126                                ..Default::default()
4127                            }),
4128                        );
4129                        map.insert(
4130                            SmolStr::new_static("member"),
4131                            LexObjectProperty::Ref(LexRef {
4132                                r#ref: CowStr::new_static("#systemMessageReferredUser"),
4133                                ..Default::default()
4134                            }),
4135                        );
4136                        map.insert(
4137                            SmolStr::new_static("role"),
4138                            LexObjectProperty::Ref(LexRef {
4139                                r#ref: CowStr::new_static(
4140                                    "chat.bsky.actor.defs#memberRole",
4141                                ),
4142                                ..Default::default()
4143                            }),
4144                        );
4145                        map
4146                    },
4147                    ..Default::default()
4148                }),
4149            );
4150            map.insert(
4151                SmolStr::new_static("systemMessageDataCreateJoinLink"),
4152                LexUserType::Object(LexObject {
4153                    description: Some(
4154                        CowStr::new_static(
4155                            "[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group join link was created.",
4156                        ),
4157                    ),
4158                    properties: {
4159                        #[allow(unused_mut)]
4160                        let mut map = BTreeMap::new();
4161                        map
4162                    },
4163                    ..Default::default()
4164                }),
4165            );
4166            map.insert(
4167                SmolStr::new_static("systemMessageDataDisableJoinLink"),
4168                LexUserType::Object(LexObject {
4169                    description: Some(
4170                        CowStr::new_static(
4171                            "[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group join link was disabled.",
4172                        ),
4173                    ),
4174                    properties: {
4175                        #[allow(unused_mut)]
4176                        let mut map = BTreeMap::new();
4177                        map
4178                    },
4179                    ..Default::default()
4180                }),
4181            );
4182            map.insert(
4183                SmolStr::new_static("systemMessageDataEditGroup"),
4184                LexUserType::Object(LexObject {
4185                    description: Some(
4186                        CowStr::new_static(
4187                            "[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group info was edited.",
4188                        ),
4189                    ),
4190                    properties: {
4191                        #[allow(unused_mut)]
4192                        let mut map = BTreeMap::new();
4193                        map.insert(
4194                            SmolStr::new_static("newName"),
4195                            LexObjectProperty::String(LexString {
4196                                description: Some(
4197                                    CowStr::new_static("Group name that replaced the old."),
4198                                ),
4199                                ..Default::default()
4200                            }),
4201                        );
4202                        map.insert(
4203                            SmolStr::new_static("oldName"),
4204                            LexObjectProperty::String(LexString {
4205                                description: Some(
4206                                    CowStr::new_static("Group name that was replaced."),
4207                                ),
4208                                ..Default::default()
4209                            }),
4210                        );
4211                        map
4212                    },
4213                    ..Default::default()
4214                }),
4215            );
4216            map.insert(
4217                SmolStr::new_static("systemMessageDataEditJoinLink"),
4218                LexUserType::Object(LexObject {
4219                    description: Some(
4220                        CowStr::new_static(
4221                            "[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group join link was edited.",
4222                        ),
4223                    ),
4224                    properties: {
4225                        #[allow(unused_mut)]
4226                        let mut map = BTreeMap::new();
4227                        map
4228                    },
4229                    ..Default::default()
4230                }),
4231            );
4232            map.insert(
4233                SmolStr::new_static("systemMessageDataEnableJoinLink"),
4234                LexUserType::Object(LexObject {
4235                    description: Some(
4236                        CowStr::new_static(
4237                            "[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group join link was enabled.",
4238                        ),
4239                    ),
4240                    properties: {
4241                        #[allow(unused_mut)]
4242                        let mut map = BTreeMap::new();
4243                        map
4244                    },
4245                    ..Default::default()
4246                }),
4247            );
4248            map.insert(
4249                SmolStr::new_static("systemMessageDataLockConvo"),
4250                LexUserType::Object(LexObject {
4251                    description: Some(
4252                        CowStr::new_static(
4253                            "[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group convo was locked.",
4254                        ),
4255                    ),
4256                    required: Some(vec![SmolStr::new_static("lockedBy")]),
4257                    properties: {
4258                        #[allow(unused_mut)]
4259                        let mut map = BTreeMap::new();
4260                        map.insert(
4261                            SmolStr::new_static("lockedBy"),
4262                            LexObjectProperty::Ref(LexRef {
4263                                r#ref: CowStr::new_static("#systemMessageReferredUser"),
4264                                ..Default::default()
4265                            }),
4266                        );
4267                        map
4268                    },
4269                    ..Default::default()
4270                }),
4271            );
4272            map.insert(
4273                SmolStr::new_static("systemMessageDataLockConvoPermanently"),
4274                LexUserType::Object(LexObject {
4275                    description: Some(
4276                        CowStr::new_static(
4277                            "[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group convo was locked permanently.",
4278                        ),
4279                    ),
4280                    required: Some(vec![SmolStr::new_static("lockedBy")]),
4281                    properties: {
4282                        #[allow(unused_mut)]
4283                        let mut map = BTreeMap::new();
4284                        map.insert(
4285                            SmolStr::new_static("lockedBy"),
4286                            LexObjectProperty::Ref(LexRef {
4287                                r#ref: CowStr::new_static("#systemMessageReferredUser"),
4288                                ..Default::default()
4289                            }),
4290                        );
4291                        map
4292                    },
4293                    ..Default::default()
4294                }),
4295            );
4296            map.insert(
4297                SmolStr::new_static("systemMessageDataMemberJoin"),
4298                LexUserType::Object(LexObject {
4299                    description: Some(
4300                        CowStr::new_static(
4301                            "[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating a user joined the group convo via join link.",
4302                        ),
4303                    ),
4304                    required: Some(
4305                        vec![SmolStr::new_static("member"), SmolStr::new_static("role")],
4306                    ),
4307                    properties: {
4308                        #[allow(unused_mut)]
4309                        let mut map = BTreeMap::new();
4310                        map.insert(
4311                            SmolStr::new_static("approvedBy"),
4312                            LexObjectProperty::Ref(LexRef {
4313                                r#ref: CowStr::new_static("#systemMessageReferredUser"),
4314                                ..Default::default()
4315                            }),
4316                        );
4317                        map.insert(
4318                            SmolStr::new_static("member"),
4319                            LexObjectProperty::Ref(LexRef {
4320                                r#ref: CowStr::new_static("#systemMessageReferredUser"),
4321                                ..Default::default()
4322                            }),
4323                        );
4324                        map.insert(
4325                            SmolStr::new_static("role"),
4326                            LexObjectProperty::Ref(LexRef {
4327                                r#ref: CowStr::new_static(
4328                                    "chat.bsky.actor.defs#memberRole",
4329                                ),
4330                                ..Default::default()
4331                            }),
4332                        );
4333                        map
4334                    },
4335                    ..Default::default()
4336                }),
4337            );
4338            map.insert(
4339                SmolStr::new_static("systemMessageDataMemberLeave"),
4340                LexUserType::Object(LexObject {
4341                    description: Some(
4342                        CowStr::new_static(
4343                            "[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating a user voluntarily left the group convo.",
4344                        ),
4345                    ),
4346                    required: Some(vec![SmolStr::new_static("member")]),
4347                    properties: {
4348                        #[allow(unused_mut)]
4349                        let mut map = BTreeMap::new();
4350                        map.insert(
4351                            SmolStr::new_static("member"),
4352                            LexObjectProperty::Ref(LexRef {
4353                                r#ref: CowStr::new_static("#systemMessageReferredUser"),
4354                                ..Default::default()
4355                            }),
4356                        );
4357                        map
4358                    },
4359                    ..Default::default()
4360                }),
4361            );
4362            map.insert(
4363                SmolStr::new_static("systemMessageDataRemoveMember"),
4364                LexUserType::Object(LexObject {
4365                    description: Some(
4366                        CowStr::new_static(
4367                            "[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating a user was removed from the group convo.",
4368                        ),
4369                    ),
4370                    required: Some(
4371                        vec![
4372                            SmolStr::new_static("member"),
4373                            SmolStr::new_static("removedBy")
4374                        ],
4375                    ),
4376                    properties: {
4377                        #[allow(unused_mut)]
4378                        let mut map = BTreeMap::new();
4379                        map.insert(
4380                            SmolStr::new_static("member"),
4381                            LexObjectProperty::Ref(LexRef {
4382                                r#ref: CowStr::new_static("#systemMessageReferredUser"),
4383                                ..Default::default()
4384                            }),
4385                        );
4386                        map.insert(
4387                            SmolStr::new_static("removedBy"),
4388                            LexObjectProperty::Ref(LexRef {
4389                                r#ref: CowStr::new_static("#systemMessageReferredUser"),
4390                                ..Default::default()
4391                            }),
4392                        );
4393                        map
4394                    },
4395                    ..Default::default()
4396                }),
4397            );
4398            map.insert(
4399                SmolStr::new_static("systemMessageDataUnlockConvo"),
4400                LexUserType::Object(LexObject {
4401                    description: Some(
4402                        CowStr::new_static(
4403                            "[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group convo was unlocked.",
4404                        ),
4405                    ),
4406                    required: Some(vec![SmolStr::new_static("unlockedBy")]),
4407                    properties: {
4408                        #[allow(unused_mut)]
4409                        let mut map = BTreeMap::new();
4410                        map.insert(
4411                            SmolStr::new_static("unlockedBy"),
4412                            LexObjectProperty::Ref(LexRef {
4413                                r#ref: CowStr::new_static("#systemMessageReferredUser"),
4414                                ..Default::default()
4415                            }),
4416                        );
4417                        map
4418                    },
4419                    ..Default::default()
4420                }),
4421            );
4422            map.insert(
4423                SmolStr::new_static("systemMessageReferredUser"),
4424                LexUserType::Object(LexObject {
4425                    required: Some(vec![SmolStr::new_static("did")]),
4426                    properties: {
4427                        #[allow(unused_mut)]
4428                        let mut map = BTreeMap::new();
4429                        map.insert(
4430                            SmolStr::new_static("did"),
4431                            LexObjectProperty::String(LexString {
4432                                format: Some(LexStringFormat::Did),
4433                                ..Default::default()
4434                            }),
4435                        );
4436                        map
4437                    },
4438                    ..Default::default()
4439                }),
4440            );
4441            map.insert(
4442                SmolStr::new_static("systemMessageView"),
4443                LexUserType::Object(LexObject {
4444                    description: Some(
4445                        CowStr::new_static(
4446                            "[NOTE: This is under active development and should be considered unstable while this note is here].",
4447                        ),
4448                    ),
4449                    required: Some(
4450                        vec![
4451                            SmolStr::new_static("id"), SmolStr::new_static("rev"),
4452                            SmolStr::new_static("sentAt"), SmolStr::new_static("data")
4453                        ],
4454                    ),
4455                    properties: {
4456                        #[allow(unused_mut)]
4457                        let mut map = BTreeMap::new();
4458                        map.insert(
4459                            SmolStr::new_static("data"),
4460                            LexObjectProperty::Union(LexRefUnion {
4461                                refs: vec![
4462                                    CowStr::new_static("#systemMessageDataAddMember"),
4463                                    CowStr::new_static("#systemMessageDataRemoveMember"),
4464                                    CowStr::new_static("#systemMessageDataMemberJoin"),
4465                                    CowStr::new_static("#systemMessageDataMemberLeave"),
4466                                    CowStr::new_static("#systemMessageDataLockConvo"),
4467                                    CowStr::new_static("#systemMessageDataUnlockConvo"),
4468                                    CowStr::new_static("#systemMessageDataLockConvoPermanently"),
4469                                    CowStr::new_static("#systemMessageDataEditGroup"),
4470                                    CowStr::new_static("#systemMessageDataCreateJoinLink"),
4471                                    CowStr::new_static("#systemMessageDataEditJoinLink"),
4472                                    CowStr::new_static("#systemMessageDataEnableJoinLink"),
4473                                    CowStr::new_static("#systemMessageDataDisableJoinLink")
4474                                ],
4475                                ..Default::default()
4476                            }),
4477                        );
4478                        map.insert(
4479                            SmolStr::new_static("id"),
4480                            LexObjectProperty::String(LexString { ..Default::default() }),
4481                        );
4482                        map.insert(
4483                            SmolStr::new_static("rev"),
4484                            LexObjectProperty::String(LexString { ..Default::default() }),
4485                        );
4486                        map.insert(
4487                            SmolStr::new_static("sentAt"),
4488                            LexObjectProperty::String(LexString {
4489                                format: Some(LexStringFormat::Datetime),
4490                                ..Default::default()
4491                            }),
4492                        );
4493                        map
4494                    },
4495                    ..Default::default()
4496                }),
4497            );
4498            map
4499        },
4500        ..Default::default()
4501    }
4502}
4503
4504pub mod convo_view_state {
4505
4506    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
4507    #[allow(unused)]
4508    use ::core::marker::PhantomData;
4509    mod sealed {
4510        pub trait Sealed {}
4511    }
4512    /// State trait tracking which required fields have been set
4513    pub trait State: sealed::Sealed {
4514        type Id;
4515        type Members;
4516        type Muted;
4517        type Rev;
4518        type UnreadCount;
4519    }
4520    /// Empty state - all required fields are unset
4521    pub struct Empty(());
4522    impl sealed::Sealed for Empty {}
4523    impl State for Empty {
4524        type Id = Unset;
4525        type Members = Unset;
4526        type Muted = Unset;
4527        type Rev = Unset;
4528        type UnreadCount = Unset;
4529    }
4530    ///State transition - sets the `id` field to Set
4531    pub struct SetId<St: State = Empty>(PhantomData<fn() -> St>);
4532    impl<St: State> sealed::Sealed for SetId<St> {}
4533    impl<St: State> State for SetId<St> {
4534        type Id = Set<members::id>;
4535        type Members = St::Members;
4536        type Muted = St::Muted;
4537        type Rev = St::Rev;
4538        type UnreadCount = St::UnreadCount;
4539    }
4540    ///State transition - sets the `members` field to Set
4541    pub struct SetMembers<St: State = Empty>(PhantomData<fn() -> St>);
4542    impl<St: State> sealed::Sealed for SetMembers<St> {}
4543    impl<St: State> State for SetMembers<St> {
4544        type Id = St::Id;
4545        type Members = Set<members::members>;
4546        type Muted = St::Muted;
4547        type Rev = St::Rev;
4548        type UnreadCount = St::UnreadCount;
4549    }
4550    ///State transition - sets the `muted` field to Set
4551    pub struct SetMuted<St: State = Empty>(PhantomData<fn() -> St>);
4552    impl<St: State> sealed::Sealed for SetMuted<St> {}
4553    impl<St: State> State for SetMuted<St> {
4554        type Id = St::Id;
4555        type Members = St::Members;
4556        type Muted = Set<members::muted>;
4557        type Rev = St::Rev;
4558        type UnreadCount = St::UnreadCount;
4559    }
4560    ///State transition - sets the `rev` field to Set
4561    pub struct SetRev<St: State = Empty>(PhantomData<fn() -> St>);
4562    impl<St: State> sealed::Sealed for SetRev<St> {}
4563    impl<St: State> State for SetRev<St> {
4564        type Id = St::Id;
4565        type Members = St::Members;
4566        type Muted = St::Muted;
4567        type Rev = Set<members::rev>;
4568        type UnreadCount = St::UnreadCount;
4569    }
4570    ///State transition - sets the `unread_count` field to Set
4571    pub struct SetUnreadCount<St: State = Empty>(PhantomData<fn() -> St>);
4572    impl<St: State> sealed::Sealed for SetUnreadCount<St> {}
4573    impl<St: State> State for SetUnreadCount<St> {
4574        type Id = St::Id;
4575        type Members = St::Members;
4576        type Muted = St::Muted;
4577        type Rev = St::Rev;
4578        type UnreadCount = Set<members::unread_count>;
4579    }
4580    /// Marker types for field names
4581    #[allow(non_camel_case_types)]
4582    pub mod members {
4583        ///Marker type for the `id` field
4584        pub struct id(());
4585        ///Marker type for the `members` field
4586        pub struct members(());
4587        ///Marker type for the `muted` field
4588        pub struct muted(());
4589        ///Marker type for the `rev` field
4590        pub struct rev(());
4591        ///Marker type for the `unread_count` field
4592        pub struct unread_count(());
4593    }
4594}
4595
4596/// Builder for constructing an instance of this type.
4597pub struct ConvoViewBuilder<St: convo_view_state::State, S: BosStr = DefaultStr> {
4598    _state: PhantomData<fn() -> St>,
4599    _fields: (
4600        Option<S>,
4601        Option<ConvoViewKind<S>>,
4602        Option<ConvoViewLastMessage<S>>,
4603        Option<convo::MessageAndReactionView<S>>,
4604        Option<Vec<ProfileViewBasic<S>>>,
4605        Option<bool>,
4606        Option<S>,
4607        Option<convo::ConvoStatus<S>>,
4608        Option<i64>,
4609    ),
4610    _type: PhantomData<fn() -> S>,
4611}
4612
4613impl ConvoView<DefaultStr> {
4614    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
4615    pub fn new() -> ConvoViewBuilder<convo_view_state::Empty, DefaultStr> {
4616        ConvoViewBuilder::new()
4617    }
4618}
4619
4620impl<S: BosStr> ConvoView<S> {
4621    /// Create a new builder for this type
4622    pub fn builder() -> ConvoViewBuilder<convo_view_state::Empty, S> {
4623        ConvoViewBuilder::builder()
4624    }
4625}
4626
4627impl ConvoViewBuilder<convo_view_state::Empty, DefaultStr> {
4628    /// Create a new builder with all fields unset, using the default string type, if needed
4629    pub fn new() -> Self {
4630        ConvoViewBuilder {
4631            _state: PhantomData,
4632            _fields: (None, None, None, None, None, None, None, None, None),
4633            _type: PhantomData,
4634        }
4635    }
4636}
4637
4638impl<S: BosStr> ConvoViewBuilder<convo_view_state::Empty, S> {
4639    /// Create a new builder with all fields unset
4640    pub fn builder() -> Self {
4641        ConvoViewBuilder {
4642            _state: PhantomData,
4643            _fields: (None, None, None, None, None, None, None, None, None),
4644            _type: PhantomData,
4645        }
4646    }
4647}
4648
4649impl<St, S: BosStr> ConvoViewBuilder<St, S>
4650where
4651    St: convo_view_state::State,
4652    St::Id: convo_view_state::IsUnset,
4653{
4654    /// Set the `id` field (required)
4655    pub fn id(
4656        mut self,
4657        value: impl Into<S>,
4658    ) -> ConvoViewBuilder<convo_view_state::SetId<St>, S> {
4659        self._fields.0 = Option::Some(value.into());
4660        ConvoViewBuilder {
4661            _state: PhantomData,
4662            _fields: self._fields,
4663            _type: PhantomData,
4664        }
4665    }
4666}
4667
4668impl<St: convo_view_state::State, S: BosStr> ConvoViewBuilder<St, S> {
4669    /// Set the `kind` field (optional)
4670    pub fn kind(mut self, value: impl Into<Option<ConvoViewKind<S>>>) -> Self {
4671        self._fields.1 = value.into();
4672        self
4673    }
4674    /// Set the `kind` field to an Option value (optional)
4675    pub fn maybe_kind(mut self, value: Option<ConvoViewKind<S>>) -> Self {
4676        self._fields.1 = value;
4677        self
4678    }
4679}
4680
4681impl<St: convo_view_state::State, S: BosStr> ConvoViewBuilder<St, S> {
4682    /// Set the `lastMessage` field (optional)
4683    pub fn last_message(
4684        mut self,
4685        value: impl Into<Option<ConvoViewLastMessage<S>>>,
4686    ) -> Self {
4687        self._fields.2 = value.into();
4688        self
4689    }
4690    /// Set the `lastMessage` field to an Option value (optional)
4691    pub fn maybe_last_message(mut self, value: Option<ConvoViewLastMessage<S>>) -> Self {
4692        self._fields.2 = value;
4693        self
4694    }
4695}
4696
4697impl<St: convo_view_state::State, S: BosStr> ConvoViewBuilder<St, S> {
4698    /// Set the `lastReaction` field (optional)
4699    pub fn last_reaction(
4700        mut self,
4701        value: impl Into<Option<convo::MessageAndReactionView<S>>>,
4702    ) -> Self {
4703        self._fields.3 = value.into();
4704        self
4705    }
4706    /// Set the `lastReaction` field to an Option value (optional)
4707    pub fn maybe_last_reaction(
4708        mut self,
4709        value: Option<convo::MessageAndReactionView<S>>,
4710    ) -> Self {
4711        self._fields.3 = value;
4712        self
4713    }
4714}
4715
4716impl<St, S: BosStr> ConvoViewBuilder<St, S>
4717where
4718    St: convo_view_state::State,
4719    St::Members: convo_view_state::IsUnset,
4720{
4721    /// Set the `members` field (required)
4722    pub fn members(
4723        mut self,
4724        value: impl Into<Vec<ProfileViewBasic<S>>>,
4725    ) -> ConvoViewBuilder<convo_view_state::SetMembers<St>, S> {
4726        self._fields.4 = Option::Some(value.into());
4727        ConvoViewBuilder {
4728            _state: PhantomData,
4729            _fields: self._fields,
4730            _type: PhantomData,
4731        }
4732    }
4733}
4734
4735impl<St, S: BosStr> ConvoViewBuilder<St, S>
4736where
4737    St: convo_view_state::State,
4738    St::Muted: convo_view_state::IsUnset,
4739{
4740    /// Set the `muted` field (required)
4741    pub fn muted(
4742        mut self,
4743        value: impl Into<bool>,
4744    ) -> ConvoViewBuilder<convo_view_state::SetMuted<St>, S> {
4745        self._fields.5 = Option::Some(value.into());
4746        ConvoViewBuilder {
4747            _state: PhantomData,
4748            _fields: self._fields,
4749            _type: PhantomData,
4750        }
4751    }
4752}
4753
4754impl<St, S: BosStr> ConvoViewBuilder<St, S>
4755where
4756    St: convo_view_state::State,
4757    St::Rev: convo_view_state::IsUnset,
4758{
4759    /// Set the `rev` field (required)
4760    pub fn rev(
4761        mut self,
4762        value: impl Into<S>,
4763    ) -> ConvoViewBuilder<convo_view_state::SetRev<St>, S> {
4764        self._fields.6 = Option::Some(value.into());
4765        ConvoViewBuilder {
4766            _state: PhantomData,
4767            _fields: self._fields,
4768            _type: PhantomData,
4769        }
4770    }
4771}
4772
4773impl<St: convo_view_state::State, S: BosStr> ConvoViewBuilder<St, S> {
4774    /// Set the `status` field (optional)
4775    pub fn status(mut self, value: impl Into<Option<convo::ConvoStatus<S>>>) -> Self {
4776        self._fields.7 = value.into();
4777        self
4778    }
4779    /// Set the `status` field to an Option value (optional)
4780    pub fn maybe_status(mut self, value: Option<convo::ConvoStatus<S>>) -> Self {
4781        self._fields.7 = value;
4782        self
4783    }
4784}
4785
4786impl<St, S: BosStr> ConvoViewBuilder<St, S>
4787where
4788    St: convo_view_state::State,
4789    St::UnreadCount: convo_view_state::IsUnset,
4790{
4791    /// Set the `unreadCount` field (required)
4792    pub fn unread_count(
4793        mut self,
4794        value: impl Into<i64>,
4795    ) -> ConvoViewBuilder<convo_view_state::SetUnreadCount<St>, S> {
4796        self._fields.8 = Option::Some(value.into());
4797        ConvoViewBuilder {
4798            _state: PhantomData,
4799            _fields: self._fields,
4800            _type: PhantomData,
4801        }
4802    }
4803}
4804
4805impl<St, S: BosStr> ConvoViewBuilder<St, S>
4806where
4807    St: convo_view_state::State,
4808    St::Id: convo_view_state::IsSet,
4809    St::Members: convo_view_state::IsSet,
4810    St::Muted: convo_view_state::IsSet,
4811    St::Rev: convo_view_state::IsSet,
4812    St::UnreadCount: convo_view_state::IsSet,
4813{
4814    /// Build the final struct.
4815    pub fn build(self) -> ConvoView<S> {
4816        ConvoView {
4817            id: self._fields.0.unwrap(),
4818            kind: self._fields.1,
4819            last_message: self._fields.2,
4820            last_reaction: self._fields.3,
4821            members: self._fields.4.unwrap(),
4822            muted: self._fields.5.unwrap(),
4823            rev: self._fields.6.unwrap(),
4824            status: self._fields.7,
4825            unread_count: self._fields.8.unwrap(),
4826            extra_data: Default::default(),
4827        }
4828    }
4829    /// Build the final struct with custom extra_data.
4830    pub fn build_with_data(
4831        self,
4832        extra_data: BTreeMap<SmolStr, Data<S>>,
4833    ) -> ConvoView<S> {
4834        ConvoView {
4835            id: self._fields.0.unwrap(),
4836            kind: self._fields.1,
4837            last_message: self._fields.2,
4838            last_reaction: self._fields.3,
4839            members: self._fields.4.unwrap(),
4840            muted: self._fields.5.unwrap(),
4841            rev: self._fields.6.unwrap(),
4842            status: self._fields.7,
4843            unread_count: self._fields.8.unwrap(),
4844            extra_data: Some(extra_data),
4845        }
4846    }
4847}
4848
4849pub mod deleted_message_view_state {
4850
4851    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
4852    #[allow(unused)]
4853    use ::core::marker::PhantomData;
4854    mod sealed {
4855        pub trait Sealed {}
4856    }
4857    /// State trait tracking which required fields have been set
4858    pub trait State: sealed::Sealed {
4859        type Id;
4860        type Rev;
4861        type Sender;
4862        type SentAt;
4863    }
4864    /// Empty state - all required fields are unset
4865    pub struct Empty(());
4866    impl sealed::Sealed for Empty {}
4867    impl State for Empty {
4868        type Id = Unset;
4869        type Rev = Unset;
4870        type Sender = Unset;
4871        type SentAt = Unset;
4872    }
4873    ///State transition - sets the `id` field to Set
4874    pub struct SetId<St: State = Empty>(PhantomData<fn() -> St>);
4875    impl<St: State> sealed::Sealed for SetId<St> {}
4876    impl<St: State> State for SetId<St> {
4877        type Id = Set<members::id>;
4878        type Rev = St::Rev;
4879        type Sender = St::Sender;
4880        type SentAt = St::SentAt;
4881    }
4882    ///State transition - sets the `rev` field to Set
4883    pub struct SetRev<St: State = Empty>(PhantomData<fn() -> St>);
4884    impl<St: State> sealed::Sealed for SetRev<St> {}
4885    impl<St: State> State for SetRev<St> {
4886        type Id = St::Id;
4887        type Rev = Set<members::rev>;
4888        type Sender = St::Sender;
4889        type SentAt = St::SentAt;
4890    }
4891    ///State transition - sets the `sender` field to Set
4892    pub struct SetSender<St: State = Empty>(PhantomData<fn() -> St>);
4893    impl<St: State> sealed::Sealed for SetSender<St> {}
4894    impl<St: State> State for SetSender<St> {
4895        type Id = St::Id;
4896        type Rev = St::Rev;
4897        type Sender = Set<members::sender>;
4898        type SentAt = St::SentAt;
4899    }
4900    ///State transition - sets the `sent_at` field to Set
4901    pub struct SetSentAt<St: State = Empty>(PhantomData<fn() -> St>);
4902    impl<St: State> sealed::Sealed for SetSentAt<St> {}
4903    impl<St: State> State for SetSentAt<St> {
4904        type Id = St::Id;
4905        type Rev = St::Rev;
4906        type Sender = St::Sender;
4907        type SentAt = Set<members::sent_at>;
4908    }
4909    /// Marker types for field names
4910    #[allow(non_camel_case_types)]
4911    pub mod members {
4912        ///Marker type for the `id` field
4913        pub struct id(());
4914        ///Marker type for the `rev` field
4915        pub struct rev(());
4916        ///Marker type for the `sender` field
4917        pub struct sender(());
4918        ///Marker type for the `sent_at` field
4919        pub struct sent_at(());
4920    }
4921}
4922
4923/// Builder for constructing an instance of this type.
4924pub struct DeletedMessageViewBuilder<
4925    St: deleted_message_view_state::State,
4926    S: BosStr = DefaultStr,
4927> {
4928    _state: PhantomData<fn() -> St>,
4929    _fields: (
4930        Option<S>,
4931        Option<S>,
4932        Option<convo::MessageViewSender<S>>,
4933        Option<Datetime>,
4934    ),
4935    _type: PhantomData<fn() -> S>,
4936}
4937
4938impl DeletedMessageView<DefaultStr> {
4939    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
4940    pub fn new() -> DeletedMessageViewBuilder<
4941        deleted_message_view_state::Empty,
4942        DefaultStr,
4943    > {
4944        DeletedMessageViewBuilder::new()
4945    }
4946}
4947
4948impl<S: BosStr> DeletedMessageView<S> {
4949    /// Create a new builder for this type
4950    pub fn builder() -> DeletedMessageViewBuilder<deleted_message_view_state::Empty, S> {
4951        DeletedMessageViewBuilder::builder()
4952    }
4953}
4954
4955impl DeletedMessageViewBuilder<deleted_message_view_state::Empty, DefaultStr> {
4956    /// Create a new builder with all fields unset, using the default string type, if needed
4957    pub fn new() -> Self {
4958        DeletedMessageViewBuilder {
4959            _state: PhantomData,
4960            _fields: (None, None, None, None),
4961            _type: PhantomData,
4962        }
4963    }
4964}
4965
4966impl<S: BosStr> DeletedMessageViewBuilder<deleted_message_view_state::Empty, S> {
4967    /// Create a new builder with all fields unset
4968    pub fn builder() -> Self {
4969        DeletedMessageViewBuilder {
4970            _state: PhantomData,
4971            _fields: (None, None, None, None),
4972            _type: PhantomData,
4973        }
4974    }
4975}
4976
4977impl<St, S: BosStr> DeletedMessageViewBuilder<St, S>
4978where
4979    St: deleted_message_view_state::State,
4980    St::Id: deleted_message_view_state::IsUnset,
4981{
4982    /// Set the `id` field (required)
4983    pub fn id(
4984        mut self,
4985        value: impl Into<S>,
4986    ) -> DeletedMessageViewBuilder<deleted_message_view_state::SetId<St>, S> {
4987        self._fields.0 = Option::Some(value.into());
4988        DeletedMessageViewBuilder {
4989            _state: PhantomData,
4990            _fields: self._fields,
4991            _type: PhantomData,
4992        }
4993    }
4994}
4995
4996impl<St, S: BosStr> DeletedMessageViewBuilder<St, S>
4997where
4998    St: deleted_message_view_state::State,
4999    St::Rev: deleted_message_view_state::IsUnset,
5000{
5001    /// Set the `rev` field (required)
5002    pub fn rev(
5003        mut self,
5004        value: impl Into<S>,
5005    ) -> DeletedMessageViewBuilder<deleted_message_view_state::SetRev<St>, S> {
5006        self._fields.1 = Option::Some(value.into());
5007        DeletedMessageViewBuilder {
5008            _state: PhantomData,
5009            _fields: self._fields,
5010            _type: PhantomData,
5011        }
5012    }
5013}
5014
5015impl<St, S: BosStr> DeletedMessageViewBuilder<St, S>
5016where
5017    St: deleted_message_view_state::State,
5018    St::Sender: deleted_message_view_state::IsUnset,
5019{
5020    /// Set the `sender` field (required)
5021    pub fn sender(
5022        mut self,
5023        value: impl Into<convo::MessageViewSender<S>>,
5024    ) -> DeletedMessageViewBuilder<deleted_message_view_state::SetSender<St>, S> {
5025        self._fields.2 = Option::Some(value.into());
5026        DeletedMessageViewBuilder {
5027            _state: PhantomData,
5028            _fields: self._fields,
5029            _type: PhantomData,
5030        }
5031    }
5032}
5033
5034impl<St, S: BosStr> DeletedMessageViewBuilder<St, S>
5035where
5036    St: deleted_message_view_state::State,
5037    St::SentAt: deleted_message_view_state::IsUnset,
5038{
5039    /// Set the `sentAt` field (required)
5040    pub fn sent_at(
5041        mut self,
5042        value: impl Into<Datetime>,
5043    ) -> DeletedMessageViewBuilder<deleted_message_view_state::SetSentAt<St>, S> {
5044        self._fields.3 = Option::Some(value.into());
5045        DeletedMessageViewBuilder {
5046            _state: PhantomData,
5047            _fields: self._fields,
5048            _type: PhantomData,
5049        }
5050    }
5051}
5052
5053impl<St, S: BosStr> DeletedMessageViewBuilder<St, S>
5054where
5055    St: deleted_message_view_state::State,
5056    St::Id: deleted_message_view_state::IsSet,
5057    St::Rev: deleted_message_view_state::IsSet,
5058    St::Sender: deleted_message_view_state::IsSet,
5059    St::SentAt: deleted_message_view_state::IsSet,
5060{
5061    /// Build the final struct.
5062    pub fn build(self) -> DeletedMessageView<S> {
5063        DeletedMessageView {
5064            id: self._fields.0.unwrap(),
5065            rev: self._fields.1.unwrap(),
5066            sender: self._fields.2.unwrap(),
5067            sent_at: self._fields.3.unwrap(),
5068            extra_data: Default::default(),
5069        }
5070    }
5071    /// Build the final struct with custom extra_data.
5072    pub fn build_with_data(
5073        self,
5074        extra_data: BTreeMap<SmolStr, Data<S>>,
5075    ) -> DeletedMessageView<S> {
5076        DeletedMessageView {
5077            id: self._fields.0.unwrap(),
5078            rev: self._fields.1.unwrap(),
5079            sender: self._fields.2.unwrap(),
5080            sent_at: self._fields.3.unwrap(),
5081            extra_data: Some(extra_data),
5082        }
5083    }
5084}
5085
5086pub mod group_convo_state {
5087
5088    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
5089    #[allow(unused)]
5090    use ::core::marker::PhantomData;
5091    mod sealed {
5092        pub trait Sealed {}
5093    }
5094    /// State trait tracking which required fields have been set
5095    pub trait State: sealed::Sealed {
5096        type CreatedAt;
5097        type LockStatus;
5098        type LockStatusModerationOverride;
5099        type MemberCount;
5100        type MemberLimit;
5101        type Name;
5102    }
5103    /// Empty state - all required fields are unset
5104    pub struct Empty(());
5105    impl sealed::Sealed for Empty {}
5106    impl State for Empty {
5107        type CreatedAt = Unset;
5108        type LockStatus = Unset;
5109        type LockStatusModerationOverride = Unset;
5110        type MemberCount = Unset;
5111        type MemberLimit = Unset;
5112        type Name = Unset;
5113    }
5114    ///State transition - sets the `created_at` field to Set
5115    pub struct SetCreatedAt<St: State = Empty>(PhantomData<fn() -> St>);
5116    impl<St: State> sealed::Sealed for SetCreatedAt<St> {}
5117    impl<St: State> State for SetCreatedAt<St> {
5118        type CreatedAt = Set<members::created_at>;
5119        type LockStatus = St::LockStatus;
5120        type LockStatusModerationOverride = St::LockStatusModerationOverride;
5121        type MemberCount = St::MemberCount;
5122        type MemberLimit = St::MemberLimit;
5123        type Name = St::Name;
5124    }
5125    ///State transition - sets the `lock_status` field to Set
5126    pub struct SetLockStatus<St: State = Empty>(PhantomData<fn() -> St>);
5127    impl<St: State> sealed::Sealed for SetLockStatus<St> {}
5128    impl<St: State> State for SetLockStatus<St> {
5129        type CreatedAt = St::CreatedAt;
5130        type LockStatus = Set<members::lock_status>;
5131        type LockStatusModerationOverride = St::LockStatusModerationOverride;
5132        type MemberCount = St::MemberCount;
5133        type MemberLimit = St::MemberLimit;
5134        type Name = St::Name;
5135    }
5136    ///State transition - sets the `lock_status_moderation_override` field to Set
5137    pub struct SetLockStatusModerationOverride<St: State = Empty>(
5138        PhantomData<fn() -> St>,
5139    );
5140    impl<St: State> sealed::Sealed for SetLockStatusModerationOverride<St> {}
5141    impl<St: State> State for SetLockStatusModerationOverride<St> {
5142        type CreatedAt = St::CreatedAt;
5143        type LockStatus = St::LockStatus;
5144        type LockStatusModerationOverride = Set<
5145            members::lock_status_moderation_override,
5146        >;
5147        type MemberCount = St::MemberCount;
5148        type MemberLimit = St::MemberLimit;
5149        type Name = St::Name;
5150    }
5151    ///State transition - sets the `member_count` field to Set
5152    pub struct SetMemberCount<St: State = Empty>(PhantomData<fn() -> St>);
5153    impl<St: State> sealed::Sealed for SetMemberCount<St> {}
5154    impl<St: State> State for SetMemberCount<St> {
5155        type CreatedAt = St::CreatedAt;
5156        type LockStatus = St::LockStatus;
5157        type LockStatusModerationOverride = St::LockStatusModerationOverride;
5158        type MemberCount = Set<members::member_count>;
5159        type MemberLimit = St::MemberLimit;
5160        type Name = St::Name;
5161    }
5162    ///State transition - sets the `member_limit` field to Set
5163    pub struct SetMemberLimit<St: State = Empty>(PhantomData<fn() -> St>);
5164    impl<St: State> sealed::Sealed for SetMemberLimit<St> {}
5165    impl<St: State> State for SetMemberLimit<St> {
5166        type CreatedAt = St::CreatedAt;
5167        type LockStatus = St::LockStatus;
5168        type LockStatusModerationOverride = St::LockStatusModerationOverride;
5169        type MemberCount = St::MemberCount;
5170        type MemberLimit = Set<members::member_limit>;
5171        type Name = St::Name;
5172    }
5173    ///State transition - sets the `name` field to Set
5174    pub struct SetName<St: State = Empty>(PhantomData<fn() -> St>);
5175    impl<St: State> sealed::Sealed for SetName<St> {}
5176    impl<St: State> State for SetName<St> {
5177        type CreatedAt = St::CreatedAt;
5178        type LockStatus = St::LockStatus;
5179        type LockStatusModerationOverride = St::LockStatusModerationOverride;
5180        type MemberCount = St::MemberCount;
5181        type MemberLimit = St::MemberLimit;
5182        type Name = Set<members::name>;
5183    }
5184    /// Marker types for field names
5185    #[allow(non_camel_case_types)]
5186    pub mod members {
5187        ///Marker type for the `created_at` field
5188        pub struct created_at(());
5189        ///Marker type for the `lock_status` field
5190        pub struct lock_status(());
5191        ///Marker type for the `lock_status_moderation_override` field
5192        pub struct lock_status_moderation_override(());
5193        ///Marker type for the `member_count` field
5194        pub struct member_count(());
5195        ///Marker type for the `member_limit` field
5196        pub struct member_limit(());
5197        ///Marker type for the `name` field
5198        pub struct name(());
5199    }
5200}
5201
5202/// Builder for constructing an instance of this type.
5203pub struct GroupConvoBuilder<St: group_convo_state::State, S: BosStr = DefaultStr> {
5204    _state: PhantomData<fn() -> St>,
5205    _fields: (
5206        Option<Datetime>,
5207        Option<JoinLinkView<S>>,
5208        Option<i64>,
5209        Option<convo::ConvoLockStatus<S>>,
5210        Option<bool>,
5211        Option<i64>,
5212        Option<i64>,
5213        Option<S>,
5214        Option<i64>,
5215    ),
5216    _type: PhantomData<fn() -> S>,
5217}
5218
5219impl GroupConvo<DefaultStr> {
5220    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
5221    pub fn new() -> GroupConvoBuilder<group_convo_state::Empty, DefaultStr> {
5222        GroupConvoBuilder::new()
5223    }
5224}
5225
5226impl<S: BosStr> GroupConvo<S> {
5227    /// Create a new builder for this type
5228    pub fn builder() -> GroupConvoBuilder<group_convo_state::Empty, S> {
5229        GroupConvoBuilder::builder()
5230    }
5231}
5232
5233impl GroupConvoBuilder<group_convo_state::Empty, DefaultStr> {
5234    /// Create a new builder with all fields unset, using the default string type, if needed
5235    pub fn new() -> Self {
5236        GroupConvoBuilder {
5237            _state: PhantomData,
5238            _fields: (None, None, None, None, None, None, None, None, None),
5239            _type: PhantomData,
5240        }
5241    }
5242}
5243
5244impl<S: BosStr> GroupConvoBuilder<group_convo_state::Empty, S> {
5245    /// Create a new builder with all fields unset
5246    pub fn builder() -> Self {
5247        GroupConvoBuilder {
5248            _state: PhantomData,
5249            _fields: (None, None, None, None, None, None, None, None, None),
5250            _type: PhantomData,
5251        }
5252    }
5253}
5254
5255impl<St, S: BosStr> GroupConvoBuilder<St, S>
5256where
5257    St: group_convo_state::State,
5258    St::CreatedAt: group_convo_state::IsUnset,
5259{
5260    /// Set the `createdAt` field (required)
5261    pub fn created_at(
5262        mut self,
5263        value: impl Into<Datetime>,
5264    ) -> GroupConvoBuilder<group_convo_state::SetCreatedAt<St>, S> {
5265        self._fields.0 = Option::Some(value.into());
5266        GroupConvoBuilder {
5267            _state: PhantomData,
5268            _fields: self._fields,
5269            _type: PhantomData,
5270        }
5271    }
5272}
5273
5274impl<St: group_convo_state::State, S: BosStr> GroupConvoBuilder<St, S> {
5275    /// Set the `joinLink` field (optional)
5276    pub fn join_link(mut self, value: impl Into<Option<JoinLinkView<S>>>) -> Self {
5277        self._fields.1 = value.into();
5278        self
5279    }
5280    /// Set the `joinLink` field to an Option value (optional)
5281    pub fn maybe_join_link(mut self, value: Option<JoinLinkView<S>>) -> Self {
5282        self._fields.1 = value;
5283        self
5284    }
5285}
5286
5287impl<St: group_convo_state::State, S: BosStr> GroupConvoBuilder<St, S> {
5288    /// Set the `joinRequestCount` field (optional)
5289    pub fn join_request_count(mut self, value: impl Into<Option<i64>>) -> Self {
5290        self._fields.2 = value.into();
5291        self
5292    }
5293    /// Set the `joinRequestCount` field to an Option value (optional)
5294    pub fn maybe_join_request_count(mut self, value: Option<i64>) -> Self {
5295        self._fields.2 = value;
5296        self
5297    }
5298}
5299
5300impl<St, S: BosStr> GroupConvoBuilder<St, S>
5301where
5302    St: group_convo_state::State,
5303    St::LockStatus: group_convo_state::IsUnset,
5304{
5305    /// Set the `lockStatus` field (required)
5306    pub fn lock_status(
5307        mut self,
5308        value: impl Into<convo::ConvoLockStatus<S>>,
5309    ) -> GroupConvoBuilder<group_convo_state::SetLockStatus<St>, S> {
5310        self._fields.3 = Option::Some(value.into());
5311        GroupConvoBuilder {
5312            _state: PhantomData,
5313            _fields: self._fields,
5314            _type: PhantomData,
5315        }
5316    }
5317}
5318
5319impl<St, S: BosStr> GroupConvoBuilder<St, S>
5320where
5321    St: group_convo_state::State,
5322    St::LockStatusModerationOverride: group_convo_state::IsUnset,
5323{
5324    /// Set the `lockStatusModerationOverride` field (required)
5325    pub fn lock_status_moderation_override(
5326        mut self,
5327        value: impl Into<bool>,
5328    ) -> GroupConvoBuilder<group_convo_state::SetLockStatusModerationOverride<St>, S> {
5329        self._fields.4 = Option::Some(value.into());
5330        GroupConvoBuilder {
5331            _state: PhantomData,
5332            _fields: self._fields,
5333            _type: PhantomData,
5334        }
5335    }
5336}
5337
5338impl<St, S: BosStr> GroupConvoBuilder<St, S>
5339where
5340    St: group_convo_state::State,
5341    St::MemberCount: group_convo_state::IsUnset,
5342{
5343    /// Set the `memberCount` field (required)
5344    pub fn member_count(
5345        mut self,
5346        value: impl Into<i64>,
5347    ) -> GroupConvoBuilder<group_convo_state::SetMemberCount<St>, S> {
5348        self._fields.5 = Option::Some(value.into());
5349        GroupConvoBuilder {
5350            _state: PhantomData,
5351            _fields: self._fields,
5352            _type: PhantomData,
5353        }
5354    }
5355}
5356
5357impl<St, S: BosStr> GroupConvoBuilder<St, S>
5358where
5359    St: group_convo_state::State,
5360    St::MemberLimit: group_convo_state::IsUnset,
5361{
5362    /// Set the `memberLimit` field (required)
5363    pub fn member_limit(
5364        mut self,
5365        value: impl Into<i64>,
5366    ) -> GroupConvoBuilder<group_convo_state::SetMemberLimit<St>, S> {
5367        self._fields.6 = Option::Some(value.into());
5368        GroupConvoBuilder {
5369            _state: PhantomData,
5370            _fields: self._fields,
5371            _type: PhantomData,
5372        }
5373    }
5374}
5375
5376impl<St, S: BosStr> GroupConvoBuilder<St, S>
5377where
5378    St: group_convo_state::State,
5379    St::Name: group_convo_state::IsUnset,
5380{
5381    /// Set the `name` field (required)
5382    pub fn name(
5383        mut self,
5384        value: impl Into<S>,
5385    ) -> GroupConvoBuilder<group_convo_state::SetName<St>, S> {
5386        self._fields.7 = Option::Some(value.into());
5387        GroupConvoBuilder {
5388            _state: PhantomData,
5389            _fields: self._fields,
5390            _type: PhantomData,
5391        }
5392    }
5393}
5394
5395impl<St: group_convo_state::State, S: BosStr> GroupConvoBuilder<St, S> {
5396    /// Set the `unreadJoinRequestCount` field (optional)
5397    pub fn unread_join_request_count(mut self, value: impl Into<Option<i64>>) -> Self {
5398        self._fields.8 = value.into();
5399        self
5400    }
5401    /// Set the `unreadJoinRequestCount` field to an Option value (optional)
5402    pub fn maybe_unread_join_request_count(mut self, value: Option<i64>) -> Self {
5403        self._fields.8 = value;
5404        self
5405    }
5406}
5407
5408impl<St, S: BosStr> GroupConvoBuilder<St, S>
5409where
5410    St: group_convo_state::State,
5411    St::CreatedAt: group_convo_state::IsSet,
5412    St::LockStatus: group_convo_state::IsSet,
5413    St::LockStatusModerationOverride: group_convo_state::IsSet,
5414    St::MemberCount: group_convo_state::IsSet,
5415    St::MemberLimit: group_convo_state::IsSet,
5416    St::Name: group_convo_state::IsSet,
5417{
5418    /// Build the final struct.
5419    pub fn build(self) -> GroupConvo<S> {
5420        GroupConvo {
5421            created_at: self._fields.0.unwrap(),
5422            join_link: self._fields.1,
5423            join_request_count: self._fields.2,
5424            lock_status: self._fields.3.unwrap(),
5425            lock_status_moderation_override: self._fields.4.unwrap(),
5426            member_count: self._fields.5.unwrap(),
5427            member_limit: self._fields.6.unwrap(),
5428            name: self._fields.7.unwrap(),
5429            unread_join_request_count: self._fields.8,
5430            extra_data: Default::default(),
5431        }
5432    }
5433    /// Build the final struct with custom extra_data.
5434    pub fn build_with_data(
5435        self,
5436        extra_data: BTreeMap<SmolStr, Data<S>>,
5437    ) -> GroupConvo<S> {
5438        GroupConvo {
5439            created_at: self._fields.0.unwrap(),
5440            join_link: self._fields.1,
5441            join_request_count: self._fields.2,
5442            lock_status: self._fields.3.unwrap(),
5443            lock_status_moderation_override: self._fields.4.unwrap(),
5444            member_count: self._fields.5.unwrap(),
5445            member_limit: self._fields.6.unwrap(),
5446            name: self._fields.7.unwrap(),
5447            unread_join_request_count: self._fields.8,
5448            extra_data: Some(extra_data),
5449        }
5450    }
5451}
5452
5453pub mod log_add_member_state {
5454
5455    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
5456    #[allow(unused)]
5457    use ::core::marker::PhantomData;
5458    mod sealed {
5459        pub trait Sealed {}
5460    }
5461    /// State trait tracking which required fields have been set
5462    pub trait State: sealed::Sealed {
5463        type ConvoId;
5464        type Message;
5465        type RelatedProfiles;
5466        type Rev;
5467    }
5468    /// Empty state - all required fields are unset
5469    pub struct Empty(());
5470    impl sealed::Sealed for Empty {}
5471    impl State for Empty {
5472        type ConvoId = Unset;
5473        type Message = Unset;
5474        type RelatedProfiles = Unset;
5475        type Rev = Unset;
5476    }
5477    ///State transition - sets the `convo_id` field to Set
5478    pub struct SetConvoId<St: State = Empty>(PhantomData<fn() -> St>);
5479    impl<St: State> sealed::Sealed for SetConvoId<St> {}
5480    impl<St: State> State for SetConvoId<St> {
5481        type ConvoId = Set<members::convo_id>;
5482        type Message = St::Message;
5483        type RelatedProfiles = St::RelatedProfiles;
5484        type Rev = St::Rev;
5485    }
5486    ///State transition - sets the `message` field to Set
5487    pub struct SetMessage<St: State = Empty>(PhantomData<fn() -> St>);
5488    impl<St: State> sealed::Sealed for SetMessage<St> {}
5489    impl<St: State> State for SetMessage<St> {
5490        type ConvoId = St::ConvoId;
5491        type Message = Set<members::message>;
5492        type RelatedProfiles = St::RelatedProfiles;
5493        type Rev = St::Rev;
5494    }
5495    ///State transition - sets the `related_profiles` field to Set
5496    pub struct SetRelatedProfiles<St: State = Empty>(PhantomData<fn() -> St>);
5497    impl<St: State> sealed::Sealed for SetRelatedProfiles<St> {}
5498    impl<St: State> State for SetRelatedProfiles<St> {
5499        type ConvoId = St::ConvoId;
5500        type Message = St::Message;
5501        type RelatedProfiles = Set<members::related_profiles>;
5502        type Rev = St::Rev;
5503    }
5504    ///State transition - sets the `rev` field to Set
5505    pub struct SetRev<St: State = Empty>(PhantomData<fn() -> St>);
5506    impl<St: State> sealed::Sealed for SetRev<St> {}
5507    impl<St: State> State for SetRev<St> {
5508        type ConvoId = St::ConvoId;
5509        type Message = St::Message;
5510        type RelatedProfiles = St::RelatedProfiles;
5511        type Rev = Set<members::rev>;
5512    }
5513    /// Marker types for field names
5514    #[allow(non_camel_case_types)]
5515    pub mod members {
5516        ///Marker type for the `convo_id` field
5517        pub struct convo_id(());
5518        ///Marker type for the `message` field
5519        pub struct message(());
5520        ///Marker type for the `related_profiles` field
5521        pub struct related_profiles(());
5522        ///Marker type for the `rev` field
5523        pub struct rev(());
5524    }
5525}
5526
5527/// Builder for constructing an instance of this type.
5528pub struct LogAddMemberBuilder<St: log_add_member_state::State, S: BosStr = DefaultStr> {
5529    _state: PhantomData<fn() -> St>,
5530    _fields: (
5531        Option<S>,
5532        Option<convo::SystemMessageView<S>>,
5533        Option<Vec<ProfileViewBasic<S>>>,
5534        Option<S>,
5535    ),
5536    _type: PhantomData<fn() -> S>,
5537}
5538
5539impl LogAddMember<DefaultStr> {
5540    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
5541    pub fn new() -> LogAddMemberBuilder<log_add_member_state::Empty, DefaultStr> {
5542        LogAddMemberBuilder::new()
5543    }
5544}
5545
5546impl<S: BosStr> LogAddMember<S> {
5547    /// Create a new builder for this type
5548    pub fn builder() -> LogAddMemberBuilder<log_add_member_state::Empty, S> {
5549        LogAddMemberBuilder::builder()
5550    }
5551}
5552
5553impl LogAddMemberBuilder<log_add_member_state::Empty, DefaultStr> {
5554    /// Create a new builder with all fields unset, using the default string type, if needed
5555    pub fn new() -> Self {
5556        LogAddMemberBuilder {
5557            _state: PhantomData,
5558            _fields: (None, None, None, None),
5559            _type: PhantomData,
5560        }
5561    }
5562}
5563
5564impl<S: BosStr> LogAddMemberBuilder<log_add_member_state::Empty, S> {
5565    /// Create a new builder with all fields unset
5566    pub fn builder() -> Self {
5567        LogAddMemberBuilder {
5568            _state: PhantomData,
5569            _fields: (None, None, None, None),
5570            _type: PhantomData,
5571        }
5572    }
5573}
5574
5575impl<St, S: BosStr> LogAddMemberBuilder<St, S>
5576where
5577    St: log_add_member_state::State,
5578    St::ConvoId: log_add_member_state::IsUnset,
5579{
5580    /// Set the `convoId` field (required)
5581    pub fn convo_id(
5582        mut self,
5583        value: impl Into<S>,
5584    ) -> LogAddMemberBuilder<log_add_member_state::SetConvoId<St>, S> {
5585        self._fields.0 = Option::Some(value.into());
5586        LogAddMemberBuilder {
5587            _state: PhantomData,
5588            _fields: self._fields,
5589            _type: PhantomData,
5590        }
5591    }
5592}
5593
5594impl<St, S: BosStr> LogAddMemberBuilder<St, S>
5595where
5596    St: log_add_member_state::State,
5597    St::Message: log_add_member_state::IsUnset,
5598{
5599    /// Set the `message` field (required)
5600    pub fn message(
5601        mut self,
5602        value: impl Into<convo::SystemMessageView<S>>,
5603    ) -> LogAddMemberBuilder<log_add_member_state::SetMessage<St>, S> {
5604        self._fields.1 = Option::Some(value.into());
5605        LogAddMemberBuilder {
5606            _state: PhantomData,
5607            _fields: self._fields,
5608            _type: PhantomData,
5609        }
5610    }
5611}
5612
5613impl<St, S: BosStr> LogAddMemberBuilder<St, S>
5614where
5615    St: log_add_member_state::State,
5616    St::RelatedProfiles: log_add_member_state::IsUnset,
5617{
5618    /// Set the `relatedProfiles` field (required)
5619    pub fn related_profiles(
5620        mut self,
5621        value: impl Into<Vec<ProfileViewBasic<S>>>,
5622    ) -> LogAddMemberBuilder<log_add_member_state::SetRelatedProfiles<St>, S> {
5623        self._fields.2 = Option::Some(value.into());
5624        LogAddMemberBuilder {
5625            _state: PhantomData,
5626            _fields: self._fields,
5627            _type: PhantomData,
5628        }
5629    }
5630}
5631
5632impl<St, S: BosStr> LogAddMemberBuilder<St, S>
5633where
5634    St: log_add_member_state::State,
5635    St::Rev: log_add_member_state::IsUnset,
5636{
5637    /// Set the `rev` field (required)
5638    pub fn rev(
5639        mut self,
5640        value: impl Into<S>,
5641    ) -> LogAddMemberBuilder<log_add_member_state::SetRev<St>, S> {
5642        self._fields.3 = Option::Some(value.into());
5643        LogAddMemberBuilder {
5644            _state: PhantomData,
5645            _fields: self._fields,
5646            _type: PhantomData,
5647        }
5648    }
5649}
5650
5651impl<St, S: BosStr> LogAddMemberBuilder<St, S>
5652where
5653    St: log_add_member_state::State,
5654    St::ConvoId: log_add_member_state::IsSet,
5655    St::Message: log_add_member_state::IsSet,
5656    St::RelatedProfiles: log_add_member_state::IsSet,
5657    St::Rev: log_add_member_state::IsSet,
5658{
5659    /// Build the final struct.
5660    pub fn build(self) -> LogAddMember<S> {
5661        LogAddMember {
5662            convo_id: self._fields.0.unwrap(),
5663            message: self._fields.1.unwrap(),
5664            related_profiles: self._fields.2.unwrap(),
5665            rev: self._fields.3.unwrap(),
5666            extra_data: Default::default(),
5667        }
5668    }
5669    /// Build the final struct with custom extra_data.
5670    pub fn build_with_data(
5671        self,
5672        extra_data: BTreeMap<SmolStr, Data<S>>,
5673    ) -> LogAddMember<S> {
5674        LogAddMember {
5675            convo_id: self._fields.0.unwrap(),
5676            message: self._fields.1.unwrap(),
5677            related_profiles: self._fields.2.unwrap(),
5678            rev: self._fields.3.unwrap(),
5679            extra_data: Some(extra_data),
5680        }
5681    }
5682}
5683
5684pub mod log_add_reaction_state {
5685
5686    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
5687    #[allow(unused)]
5688    use ::core::marker::PhantomData;
5689    mod sealed {
5690        pub trait Sealed {}
5691    }
5692    /// State trait tracking which required fields have been set
5693    pub trait State: sealed::Sealed {
5694        type ConvoId;
5695        type Message;
5696        type Reaction;
5697        type Rev;
5698    }
5699    /// Empty state - all required fields are unset
5700    pub struct Empty(());
5701    impl sealed::Sealed for Empty {}
5702    impl State for Empty {
5703        type ConvoId = Unset;
5704        type Message = Unset;
5705        type Reaction = Unset;
5706        type Rev = Unset;
5707    }
5708    ///State transition - sets the `convo_id` field to Set
5709    pub struct SetConvoId<St: State = Empty>(PhantomData<fn() -> St>);
5710    impl<St: State> sealed::Sealed for SetConvoId<St> {}
5711    impl<St: State> State for SetConvoId<St> {
5712        type ConvoId = Set<members::convo_id>;
5713        type Message = St::Message;
5714        type Reaction = St::Reaction;
5715        type Rev = St::Rev;
5716    }
5717    ///State transition - sets the `message` field to Set
5718    pub struct SetMessage<St: State = Empty>(PhantomData<fn() -> St>);
5719    impl<St: State> sealed::Sealed for SetMessage<St> {}
5720    impl<St: State> State for SetMessage<St> {
5721        type ConvoId = St::ConvoId;
5722        type Message = Set<members::message>;
5723        type Reaction = St::Reaction;
5724        type Rev = St::Rev;
5725    }
5726    ///State transition - sets the `reaction` field to Set
5727    pub struct SetReaction<St: State = Empty>(PhantomData<fn() -> St>);
5728    impl<St: State> sealed::Sealed for SetReaction<St> {}
5729    impl<St: State> State for SetReaction<St> {
5730        type ConvoId = St::ConvoId;
5731        type Message = St::Message;
5732        type Reaction = Set<members::reaction>;
5733        type Rev = St::Rev;
5734    }
5735    ///State transition - sets the `rev` field to Set
5736    pub struct SetRev<St: State = Empty>(PhantomData<fn() -> St>);
5737    impl<St: State> sealed::Sealed for SetRev<St> {}
5738    impl<St: State> State for SetRev<St> {
5739        type ConvoId = St::ConvoId;
5740        type Message = St::Message;
5741        type Reaction = St::Reaction;
5742        type Rev = Set<members::rev>;
5743    }
5744    /// Marker types for field names
5745    #[allow(non_camel_case_types)]
5746    pub mod members {
5747        ///Marker type for the `convo_id` field
5748        pub struct convo_id(());
5749        ///Marker type for the `message` field
5750        pub struct message(());
5751        ///Marker type for the `reaction` field
5752        pub struct reaction(());
5753        ///Marker type for the `rev` field
5754        pub struct rev(());
5755    }
5756}
5757
5758/// Builder for constructing an instance of this type.
5759pub struct LogAddReactionBuilder<
5760    St: log_add_reaction_state::State,
5761    S: BosStr = DefaultStr,
5762> {
5763    _state: PhantomData<fn() -> St>,
5764    _fields: (
5765        Option<S>,
5766        Option<LogAddReactionMessage<S>>,
5767        Option<convo::ReactionView<S>>,
5768        Option<Vec<ProfileViewBasic<S>>>,
5769        Option<S>,
5770    ),
5771    _type: PhantomData<fn() -> S>,
5772}
5773
5774impl LogAddReaction<DefaultStr> {
5775    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
5776    pub fn new() -> LogAddReactionBuilder<log_add_reaction_state::Empty, DefaultStr> {
5777        LogAddReactionBuilder::new()
5778    }
5779}
5780
5781impl<S: BosStr> LogAddReaction<S> {
5782    /// Create a new builder for this type
5783    pub fn builder() -> LogAddReactionBuilder<log_add_reaction_state::Empty, S> {
5784        LogAddReactionBuilder::builder()
5785    }
5786}
5787
5788impl LogAddReactionBuilder<log_add_reaction_state::Empty, DefaultStr> {
5789    /// Create a new builder with all fields unset, using the default string type, if needed
5790    pub fn new() -> Self {
5791        LogAddReactionBuilder {
5792            _state: PhantomData,
5793            _fields: (None, None, None, None, None),
5794            _type: PhantomData,
5795        }
5796    }
5797}
5798
5799impl<S: BosStr> LogAddReactionBuilder<log_add_reaction_state::Empty, S> {
5800    /// Create a new builder with all fields unset
5801    pub fn builder() -> Self {
5802        LogAddReactionBuilder {
5803            _state: PhantomData,
5804            _fields: (None, None, None, None, None),
5805            _type: PhantomData,
5806        }
5807    }
5808}
5809
5810impl<St, S: BosStr> LogAddReactionBuilder<St, S>
5811where
5812    St: log_add_reaction_state::State,
5813    St::ConvoId: log_add_reaction_state::IsUnset,
5814{
5815    /// Set the `convoId` field (required)
5816    pub fn convo_id(
5817        mut self,
5818        value: impl Into<S>,
5819    ) -> LogAddReactionBuilder<log_add_reaction_state::SetConvoId<St>, S> {
5820        self._fields.0 = Option::Some(value.into());
5821        LogAddReactionBuilder {
5822            _state: PhantomData,
5823            _fields: self._fields,
5824            _type: PhantomData,
5825        }
5826    }
5827}
5828
5829impl<St, S: BosStr> LogAddReactionBuilder<St, S>
5830where
5831    St: log_add_reaction_state::State,
5832    St::Message: log_add_reaction_state::IsUnset,
5833{
5834    /// Set the `message` field (required)
5835    pub fn message(
5836        mut self,
5837        value: impl Into<LogAddReactionMessage<S>>,
5838    ) -> LogAddReactionBuilder<log_add_reaction_state::SetMessage<St>, S> {
5839        self._fields.1 = Option::Some(value.into());
5840        LogAddReactionBuilder {
5841            _state: PhantomData,
5842            _fields: self._fields,
5843            _type: PhantomData,
5844        }
5845    }
5846}
5847
5848impl<St, S: BosStr> LogAddReactionBuilder<St, S>
5849where
5850    St: log_add_reaction_state::State,
5851    St::Reaction: log_add_reaction_state::IsUnset,
5852{
5853    /// Set the `reaction` field (required)
5854    pub fn reaction(
5855        mut self,
5856        value: impl Into<convo::ReactionView<S>>,
5857    ) -> LogAddReactionBuilder<log_add_reaction_state::SetReaction<St>, S> {
5858        self._fields.2 = Option::Some(value.into());
5859        LogAddReactionBuilder {
5860            _state: PhantomData,
5861            _fields: self._fields,
5862            _type: PhantomData,
5863        }
5864    }
5865}
5866
5867impl<St: log_add_reaction_state::State, S: BosStr> LogAddReactionBuilder<St, S> {
5868    /// Set the `relatedProfiles` field (optional)
5869    pub fn related_profiles(
5870        mut self,
5871        value: impl Into<Option<Vec<ProfileViewBasic<S>>>>,
5872    ) -> Self {
5873        self._fields.3 = value.into();
5874        self
5875    }
5876    /// Set the `relatedProfiles` field to an Option value (optional)
5877    pub fn maybe_related_profiles(
5878        mut self,
5879        value: Option<Vec<ProfileViewBasic<S>>>,
5880    ) -> Self {
5881        self._fields.3 = value;
5882        self
5883    }
5884}
5885
5886impl<St, S: BosStr> LogAddReactionBuilder<St, S>
5887where
5888    St: log_add_reaction_state::State,
5889    St::Rev: log_add_reaction_state::IsUnset,
5890{
5891    /// Set the `rev` field (required)
5892    pub fn rev(
5893        mut self,
5894        value: impl Into<S>,
5895    ) -> LogAddReactionBuilder<log_add_reaction_state::SetRev<St>, S> {
5896        self._fields.4 = Option::Some(value.into());
5897        LogAddReactionBuilder {
5898            _state: PhantomData,
5899            _fields: self._fields,
5900            _type: PhantomData,
5901        }
5902    }
5903}
5904
5905impl<St, S: BosStr> LogAddReactionBuilder<St, S>
5906where
5907    St: log_add_reaction_state::State,
5908    St::ConvoId: log_add_reaction_state::IsSet,
5909    St::Message: log_add_reaction_state::IsSet,
5910    St::Reaction: log_add_reaction_state::IsSet,
5911    St::Rev: log_add_reaction_state::IsSet,
5912{
5913    /// Build the final struct.
5914    pub fn build(self) -> LogAddReaction<S> {
5915        LogAddReaction {
5916            convo_id: self._fields.0.unwrap(),
5917            message: self._fields.1.unwrap(),
5918            reaction: self._fields.2.unwrap(),
5919            related_profiles: self._fields.3,
5920            rev: self._fields.4.unwrap(),
5921            extra_data: Default::default(),
5922        }
5923    }
5924    /// Build the final struct with custom extra_data.
5925    pub fn build_with_data(
5926        self,
5927        extra_data: BTreeMap<SmolStr, Data<S>>,
5928    ) -> LogAddReaction<S> {
5929        LogAddReaction {
5930            convo_id: self._fields.0.unwrap(),
5931            message: self._fields.1.unwrap(),
5932            reaction: self._fields.2.unwrap(),
5933            related_profiles: self._fields.3,
5934            rev: self._fields.4.unwrap(),
5935            extra_data: Some(extra_data),
5936        }
5937    }
5938}
5939
5940pub mod log_approve_join_request_state {
5941
5942    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
5943    #[allow(unused)]
5944    use ::core::marker::PhantomData;
5945    mod sealed {
5946        pub trait Sealed {}
5947    }
5948    /// State trait tracking which required fields have been set
5949    pub trait State: sealed::Sealed {
5950        type ConvoId;
5951        type Member;
5952        type Rev;
5953    }
5954    /// Empty state - all required fields are unset
5955    pub struct Empty(());
5956    impl sealed::Sealed for Empty {}
5957    impl State for Empty {
5958        type ConvoId = Unset;
5959        type Member = Unset;
5960        type Rev = Unset;
5961    }
5962    ///State transition - sets the `convo_id` field to Set
5963    pub struct SetConvoId<St: State = Empty>(PhantomData<fn() -> St>);
5964    impl<St: State> sealed::Sealed for SetConvoId<St> {}
5965    impl<St: State> State for SetConvoId<St> {
5966        type ConvoId = Set<members::convo_id>;
5967        type Member = St::Member;
5968        type Rev = St::Rev;
5969    }
5970    ///State transition - sets the `member` field to Set
5971    pub struct SetMember<St: State = Empty>(PhantomData<fn() -> St>);
5972    impl<St: State> sealed::Sealed for SetMember<St> {}
5973    impl<St: State> State for SetMember<St> {
5974        type ConvoId = St::ConvoId;
5975        type Member = Set<members::member>;
5976        type Rev = St::Rev;
5977    }
5978    ///State transition - sets the `rev` field to Set
5979    pub struct SetRev<St: State = Empty>(PhantomData<fn() -> St>);
5980    impl<St: State> sealed::Sealed for SetRev<St> {}
5981    impl<St: State> State for SetRev<St> {
5982        type ConvoId = St::ConvoId;
5983        type Member = St::Member;
5984        type Rev = Set<members::rev>;
5985    }
5986    /// Marker types for field names
5987    #[allow(non_camel_case_types)]
5988    pub mod members {
5989        ///Marker type for the `convo_id` field
5990        pub struct convo_id(());
5991        ///Marker type for the `member` field
5992        pub struct member(());
5993        ///Marker type for the `rev` field
5994        pub struct rev(());
5995    }
5996}
5997
5998/// Builder for constructing an instance of this type.
5999pub struct LogApproveJoinRequestBuilder<
6000    St: log_approve_join_request_state::State,
6001    S: BosStr = DefaultStr,
6002> {
6003    _state: PhantomData<fn() -> St>,
6004    _fields: (Option<S>, Option<ProfileViewBasic<S>>, Option<S>),
6005    _type: PhantomData<fn() -> S>,
6006}
6007
6008impl LogApproveJoinRequest<DefaultStr> {
6009    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
6010    pub fn new() -> LogApproveJoinRequestBuilder<
6011        log_approve_join_request_state::Empty,
6012        DefaultStr,
6013    > {
6014        LogApproveJoinRequestBuilder::new()
6015    }
6016}
6017
6018impl<S: BosStr> LogApproveJoinRequest<S> {
6019    /// Create a new builder for this type
6020    pub fn builder() -> LogApproveJoinRequestBuilder<
6021        log_approve_join_request_state::Empty,
6022        S,
6023    > {
6024        LogApproveJoinRequestBuilder::builder()
6025    }
6026}
6027
6028impl LogApproveJoinRequestBuilder<log_approve_join_request_state::Empty, DefaultStr> {
6029    /// Create a new builder with all fields unset, using the default string type, if needed
6030    pub fn new() -> Self {
6031        LogApproveJoinRequestBuilder {
6032            _state: PhantomData,
6033            _fields: (None, None, None),
6034            _type: PhantomData,
6035        }
6036    }
6037}
6038
6039impl<S: BosStr> LogApproveJoinRequestBuilder<log_approve_join_request_state::Empty, S> {
6040    /// Create a new builder with all fields unset
6041    pub fn builder() -> Self {
6042        LogApproveJoinRequestBuilder {
6043            _state: PhantomData,
6044            _fields: (None, None, None),
6045            _type: PhantomData,
6046        }
6047    }
6048}
6049
6050impl<St, S: BosStr> LogApproveJoinRequestBuilder<St, S>
6051where
6052    St: log_approve_join_request_state::State,
6053    St::ConvoId: log_approve_join_request_state::IsUnset,
6054{
6055    /// Set the `convoId` field (required)
6056    pub fn convo_id(
6057        mut self,
6058        value: impl Into<S>,
6059    ) -> LogApproveJoinRequestBuilder<
6060        log_approve_join_request_state::SetConvoId<St>,
6061        S,
6062    > {
6063        self._fields.0 = Option::Some(value.into());
6064        LogApproveJoinRequestBuilder {
6065            _state: PhantomData,
6066            _fields: self._fields,
6067            _type: PhantomData,
6068        }
6069    }
6070}
6071
6072impl<St, S: BosStr> LogApproveJoinRequestBuilder<St, S>
6073where
6074    St: log_approve_join_request_state::State,
6075    St::Member: log_approve_join_request_state::IsUnset,
6076{
6077    /// Set the `member` field (required)
6078    pub fn member(
6079        mut self,
6080        value: impl Into<ProfileViewBasic<S>>,
6081    ) -> LogApproveJoinRequestBuilder<log_approve_join_request_state::SetMember<St>, S> {
6082        self._fields.1 = Option::Some(value.into());
6083        LogApproveJoinRequestBuilder {
6084            _state: PhantomData,
6085            _fields: self._fields,
6086            _type: PhantomData,
6087        }
6088    }
6089}
6090
6091impl<St, S: BosStr> LogApproveJoinRequestBuilder<St, S>
6092where
6093    St: log_approve_join_request_state::State,
6094    St::Rev: log_approve_join_request_state::IsUnset,
6095{
6096    /// Set the `rev` field (required)
6097    pub fn rev(
6098        mut self,
6099        value: impl Into<S>,
6100    ) -> LogApproveJoinRequestBuilder<log_approve_join_request_state::SetRev<St>, S> {
6101        self._fields.2 = Option::Some(value.into());
6102        LogApproveJoinRequestBuilder {
6103            _state: PhantomData,
6104            _fields: self._fields,
6105            _type: PhantomData,
6106        }
6107    }
6108}
6109
6110impl<St, S: BosStr> LogApproveJoinRequestBuilder<St, S>
6111where
6112    St: log_approve_join_request_state::State,
6113    St::ConvoId: log_approve_join_request_state::IsSet,
6114    St::Member: log_approve_join_request_state::IsSet,
6115    St::Rev: log_approve_join_request_state::IsSet,
6116{
6117    /// Build the final struct.
6118    pub fn build(self) -> LogApproveJoinRequest<S> {
6119        LogApproveJoinRequest {
6120            convo_id: self._fields.0.unwrap(),
6121            member: self._fields.1.unwrap(),
6122            rev: self._fields.2.unwrap(),
6123            extra_data: Default::default(),
6124        }
6125    }
6126    /// Build the final struct with custom extra_data.
6127    pub fn build_with_data(
6128        self,
6129        extra_data: BTreeMap<SmolStr, Data<S>>,
6130    ) -> LogApproveJoinRequest<S> {
6131        LogApproveJoinRequest {
6132            convo_id: self._fields.0.unwrap(),
6133            member: self._fields.1.unwrap(),
6134            rev: self._fields.2.unwrap(),
6135            extra_data: Some(extra_data),
6136        }
6137    }
6138}
6139
6140pub mod log_create_join_link_state {
6141
6142    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
6143    #[allow(unused)]
6144    use ::core::marker::PhantomData;
6145    mod sealed {
6146        pub trait Sealed {}
6147    }
6148    /// State trait tracking which required fields have been set
6149    pub trait State: sealed::Sealed {
6150        type ConvoId;
6151        type Message;
6152        type Rev;
6153    }
6154    /// Empty state - all required fields are unset
6155    pub struct Empty(());
6156    impl sealed::Sealed for Empty {}
6157    impl State for Empty {
6158        type ConvoId = Unset;
6159        type Message = Unset;
6160        type Rev = Unset;
6161    }
6162    ///State transition - sets the `convo_id` field to Set
6163    pub struct SetConvoId<St: State = Empty>(PhantomData<fn() -> St>);
6164    impl<St: State> sealed::Sealed for SetConvoId<St> {}
6165    impl<St: State> State for SetConvoId<St> {
6166        type ConvoId = Set<members::convo_id>;
6167        type Message = St::Message;
6168        type Rev = St::Rev;
6169    }
6170    ///State transition - sets the `message` field to Set
6171    pub struct SetMessage<St: State = Empty>(PhantomData<fn() -> St>);
6172    impl<St: State> sealed::Sealed for SetMessage<St> {}
6173    impl<St: State> State for SetMessage<St> {
6174        type ConvoId = St::ConvoId;
6175        type Message = Set<members::message>;
6176        type Rev = St::Rev;
6177    }
6178    ///State transition - sets the `rev` field to Set
6179    pub struct SetRev<St: State = Empty>(PhantomData<fn() -> St>);
6180    impl<St: State> sealed::Sealed for SetRev<St> {}
6181    impl<St: State> State for SetRev<St> {
6182        type ConvoId = St::ConvoId;
6183        type Message = St::Message;
6184        type Rev = Set<members::rev>;
6185    }
6186    /// Marker types for field names
6187    #[allow(non_camel_case_types)]
6188    pub mod members {
6189        ///Marker type for the `convo_id` field
6190        pub struct convo_id(());
6191        ///Marker type for the `message` field
6192        pub struct message(());
6193        ///Marker type for the `rev` field
6194        pub struct rev(());
6195    }
6196}
6197
6198/// Builder for constructing an instance of this type.
6199pub struct LogCreateJoinLinkBuilder<
6200    St: log_create_join_link_state::State,
6201    S: BosStr = DefaultStr,
6202> {
6203    _state: PhantomData<fn() -> St>,
6204    _fields: (Option<S>, Option<convo::SystemMessageView<S>>, Option<S>),
6205    _type: PhantomData<fn() -> S>,
6206}
6207
6208impl LogCreateJoinLink<DefaultStr> {
6209    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
6210    pub fn new() -> LogCreateJoinLinkBuilder<
6211        log_create_join_link_state::Empty,
6212        DefaultStr,
6213    > {
6214        LogCreateJoinLinkBuilder::new()
6215    }
6216}
6217
6218impl<S: BosStr> LogCreateJoinLink<S> {
6219    /// Create a new builder for this type
6220    pub fn builder() -> LogCreateJoinLinkBuilder<log_create_join_link_state::Empty, S> {
6221        LogCreateJoinLinkBuilder::builder()
6222    }
6223}
6224
6225impl LogCreateJoinLinkBuilder<log_create_join_link_state::Empty, DefaultStr> {
6226    /// Create a new builder with all fields unset, using the default string type, if needed
6227    pub fn new() -> Self {
6228        LogCreateJoinLinkBuilder {
6229            _state: PhantomData,
6230            _fields: (None, None, None),
6231            _type: PhantomData,
6232        }
6233    }
6234}
6235
6236impl<S: BosStr> LogCreateJoinLinkBuilder<log_create_join_link_state::Empty, S> {
6237    /// Create a new builder with all fields unset
6238    pub fn builder() -> Self {
6239        LogCreateJoinLinkBuilder {
6240            _state: PhantomData,
6241            _fields: (None, None, None),
6242            _type: PhantomData,
6243        }
6244    }
6245}
6246
6247impl<St, S: BosStr> LogCreateJoinLinkBuilder<St, S>
6248where
6249    St: log_create_join_link_state::State,
6250    St::ConvoId: log_create_join_link_state::IsUnset,
6251{
6252    /// Set the `convoId` field (required)
6253    pub fn convo_id(
6254        mut self,
6255        value: impl Into<S>,
6256    ) -> LogCreateJoinLinkBuilder<log_create_join_link_state::SetConvoId<St>, S> {
6257        self._fields.0 = Option::Some(value.into());
6258        LogCreateJoinLinkBuilder {
6259            _state: PhantomData,
6260            _fields: self._fields,
6261            _type: PhantomData,
6262        }
6263    }
6264}
6265
6266impl<St, S: BosStr> LogCreateJoinLinkBuilder<St, S>
6267where
6268    St: log_create_join_link_state::State,
6269    St::Message: log_create_join_link_state::IsUnset,
6270{
6271    /// Set the `message` field (required)
6272    pub fn message(
6273        mut self,
6274        value: impl Into<convo::SystemMessageView<S>>,
6275    ) -> LogCreateJoinLinkBuilder<log_create_join_link_state::SetMessage<St>, S> {
6276        self._fields.1 = Option::Some(value.into());
6277        LogCreateJoinLinkBuilder {
6278            _state: PhantomData,
6279            _fields: self._fields,
6280            _type: PhantomData,
6281        }
6282    }
6283}
6284
6285impl<St, S: BosStr> LogCreateJoinLinkBuilder<St, S>
6286where
6287    St: log_create_join_link_state::State,
6288    St::Rev: log_create_join_link_state::IsUnset,
6289{
6290    /// Set the `rev` field (required)
6291    pub fn rev(
6292        mut self,
6293        value: impl Into<S>,
6294    ) -> LogCreateJoinLinkBuilder<log_create_join_link_state::SetRev<St>, S> {
6295        self._fields.2 = Option::Some(value.into());
6296        LogCreateJoinLinkBuilder {
6297            _state: PhantomData,
6298            _fields: self._fields,
6299            _type: PhantomData,
6300        }
6301    }
6302}
6303
6304impl<St, S: BosStr> LogCreateJoinLinkBuilder<St, S>
6305where
6306    St: log_create_join_link_state::State,
6307    St::ConvoId: log_create_join_link_state::IsSet,
6308    St::Message: log_create_join_link_state::IsSet,
6309    St::Rev: log_create_join_link_state::IsSet,
6310{
6311    /// Build the final struct.
6312    pub fn build(self) -> LogCreateJoinLink<S> {
6313        LogCreateJoinLink {
6314            convo_id: self._fields.0.unwrap(),
6315            message: self._fields.1.unwrap(),
6316            rev: self._fields.2.unwrap(),
6317            extra_data: Default::default(),
6318        }
6319    }
6320    /// Build the final struct with custom extra_data.
6321    pub fn build_with_data(
6322        self,
6323        extra_data: BTreeMap<SmolStr, Data<S>>,
6324    ) -> LogCreateJoinLink<S> {
6325        LogCreateJoinLink {
6326            convo_id: self._fields.0.unwrap(),
6327            message: self._fields.1.unwrap(),
6328            rev: self._fields.2.unwrap(),
6329            extra_data: Some(extra_data),
6330        }
6331    }
6332}
6333
6334pub mod log_create_message_state {
6335
6336    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
6337    #[allow(unused)]
6338    use ::core::marker::PhantomData;
6339    mod sealed {
6340        pub trait Sealed {}
6341    }
6342    /// State trait tracking which required fields have been set
6343    pub trait State: sealed::Sealed {
6344        type ConvoId;
6345        type Message;
6346        type Rev;
6347    }
6348    /// Empty state - all required fields are unset
6349    pub struct Empty(());
6350    impl sealed::Sealed for Empty {}
6351    impl State for Empty {
6352        type ConvoId = Unset;
6353        type Message = Unset;
6354        type Rev = Unset;
6355    }
6356    ///State transition - sets the `convo_id` field to Set
6357    pub struct SetConvoId<St: State = Empty>(PhantomData<fn() -> St>);
6358    impl<St: State> sealed::Sealed for SetConvoId<St> {}
6359    impl<St: State> State for SetConvoId<St> {
6360        type ConvoId = Set<members::convo_id>;
6361        type Message = St::Message;
6362        type Rev = St::Rev;
6363    }
6364    ///State transition - sets the `message` field to Set
6365    pub struct SetMessage<St: State = Empty>(PhantomData<fn() -> St>);
6366    impl<St: State> sealed::Sealed for SetMessage<St> {}
6367    impl<St: State> State for SetMessage<St> {
6368        type ConvoId = St::ConvoId;
6369        type Message = Set<members::message>;
6370        type Rev = St::Rev;
6371    }
6372    ///State transition - sets the `rev` field to Set
6373    pub struct SetRev<St: State = Empty>(PhantomData<fn() -> St>);
6374    impl<St: State> sealed::Sealed for SetRev<St> {}
6375    impl<St: State> State for SetRev<St> {
6376        type ConvoId = St::ConvoId;
6377        type Message = St::Message;
6378        type Rev = Set<members::rev>;
6379    }
6380    /// Marker types for field names
6381    #[allow(non_camel_case_types)]
6382    pub mod members {
6383        ///Marker type for the `convo_id` field
6384        pub struct convo_id(());
6385        ///Marker type for the `message` field
6386        pub struct message(());
6387        ///Marker type for the `rev` field
6388        pub struct rev(());
6389    }
6390}
6391
6392/// Builder for constructing an instance of this type.
6393pub struct LogCreateMessageBuilder<
6394    St: log_create_message_state::State,
6395    S: BosStr = DefaultStr,
6396> {
6397    _state: PhantomData<fn() -> St>,
6398    _fields: (
6399        Option<S>,
6400        Option<LogCreateMessageMessage<S>>,
6401        Option<Vec<ProfileViewBasic<S>>>,
6402        Option<S>,
6403    ),
6404    _type: PhantomData<fn() -> S>,
6405}
6406
6407impl LogCreateMessage<DefaultStr> {
6408    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
6409    pub fn new() -> LogCreateMessageBuilder<
6410        log_create_message_state::Empty,
6411        DefaultStr,
6412    > {
6413        LogCreateMessageBuilder::new()
6414    }
6415}
6416
6417impl<S: BosStr> LogCreateMessage<S> {
6418    /// Create a new builder for this type
6419    pub fn builder() -> LogCreateMessageBuilder<log_create_message_state::Empty, S> {
6420        LogCreateMessageBuilder::builder()
6421    }
6422}
6423
6424impl LogCreateMessageBuilder<log_create_message_state::Empty, DefaultStr> {
6425    /// Create a new builder with all fields unset, using the default string type, if needed
6426    pub fn new() -> Self {
6427        LogCreateMessageBuilder {
6428            _state: PhantomData,
6429            _fields: (None, None, None, None),
6430            _type: PhantomData,
6431        }
6432    }
6433}
6434
6435impl<S: BosStr> LogCreateMessageBuilder<log_create_message_state::Empty, S> {
6436    /// Create a new builder with all fields unset
6437    pub fn builder() -> Self {
6438        LogCreateMessageBuilder {
6439            _state: PhantomData,
6440            _fields: (None, None, None, None),
6441            _type: PhantomData,
6442        }
6443    }
6444}
6445
6446impl<St, S: BosStr> LogCreateMessageBuilder<St, S>
6447where
6448    St: log_create_message_state::State,
6449    St::ConvoId: log_create_message_state::IsUnset,
6450{
6451    /// Set the `convoId` field (required)
6452    pub fn convo_id(
6453        mut self,
6454        value: impl Into<S>,
6455    ) -> LogCreateMessageBuilder<log_create_message_state::SetConvoId<St>, S> {
6456        self._fields.0 = Option::Some(value.into());
6457        LogCreateMessageBuilder {
6458            _state: PhantomData,
6459            _fields: self._fields,
6460            _type: PhantomData,
6461        }
6462    }
6463}
6464
6465impl<St, S: BosStr> LogCreateMessageBuilder<St, S>
6466where
6467    St: log_create_message_state::State,
6468    St::Message: log_create_message_state::IsUnset,
6469{
6470    /// Set the `message` field (required)
6471    pub fn message(
6472        mut self,
6473        value: impl Into<LogCreateMessageMessage<S>>,
6474    ) -> LogCreateMessageBuilder<log_create_message_state::SetMessage<St>, S> {
6475        self._fields.1 = Option::Some(value.into());
6476        LogCreateMessageBuilder {
6477            _state: PhantomData,
6478            _fields: self._fields,
6479            _type: PhantomData,
6480        }
6481    }
6482}
6483
6484impl<St: log_create_message_state::State, S: BosStr> LogCreateMessageBuilder<St, S> {
6485    /// Set the `relatedProfiles` field (optional)
6486    pub fn related_profiles(
6487        mut self,
6488        value: impl Into<Option<Vec<ProfileViewBasic<S>>>>,
6489    ) -> Self {
6490        self._fields.2 = value.into();
6491        self
6492    }
6493    /// Set the `relatedProfiles` field to an Option value (optional)
6494    pub fn maybe_related_profiles(
6495        mut self,
6496        value: Option<Vec<ProfileViewBasic<S>>>,
6497    ) -> Self {
6498        self._fields.2 = value;
6499        self
6500    }
6501}
6502
6503impl<St, S: BosStr> LogCreateMessageBuilder<St, S>
6504where
6505    St: log_create_message_state::State,
6506    St::Rev: log_create_message_state::IsUnset,
6507{
6508    /// Set the `rev` field (required)
6509    pub fn rev(
6510        mut self,
6511        value: impl Into<S>,
6512    ) -> LogCreateMessageBuilder<log_create_message_state::SetRev<St>, S> {
6513        self._fields.3 = Option::Some(value.into());
6514        LogCreateMessageBuilder {
6515            _state: PhantomData,
6516            _fields: self._fields,
6517            _type: PhantomData,
6518        }
6519    }
6520}
6521
6522impl<St, S: BosStr> LogCreateMessageBuilder<St, S>
6523where
6524    St: log_create_message_state::State,
6525    St::ConvoId: log_create_message_state::IsSet,
6526    St::Message: log_create_message_state::IsSet,
6527    St::Rev: log_create_message_state::IsSet,
6528{
6529    /// Build the final struct.
6530    pub fn build(self) -> LogCreateMessage<S> {
6531        LogCreateMessage {
6532            convo_id: self._fields.0.unwrap(),
6533            message: self._fields.1.unwrap(),
6534            related_profiles: self._fields.2,
6535            rev: self._fields.3.unwrap(),
6536            extra_data: Default::default(),
6537        }
6538    }
6539    /// Build the final struct with custom extra_data.
6540    pub fn build_with_data(
6541        self,
6542        extra_data: BTreeMap<SmolStr, Data<S>>,
6543    ) -> LogCreateMessage<S> {
6544        LogCreateMessage {
6545            convo_id: self._fields.0.unwrap(),
6546            message: self._fields.1.unwrap(),
6547            related_profiles: self._fields.2,
6548            rev: self._fields.3.unwrap(),
6549            extra_data: Some(extra_data),
6550        }
6551    }
6552}
6553
6554pub mod log_delete_message_state {
6555
6556    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
6557    #[allow(unused)]
6558    use ::core::marker::PhantomData;
6559    mod sealed {
6560        pub trait Sealed {}
6561    }
6562    /// State trait tracking which required fields have been set
6563    pub trait State: sealed::Sealed {
6564        type ConvoId;
6565        type Message;
6566        type Rev;
6567    }
6568    /// Empty state - all required fields are unset
6569    pub struct Empty(());
6570    impl sealed::Sealed for Empty {}
6571    impl State for Empty {
6572        type ConvoId = Unset;
6573        type Message = Unset;
6574        type Rev = Unset;
6575    }
6576    ///State transition - sets the `convo_id` field to Set
6577    pub struct SetConvoId<St: State = Empty>(PhantomData<fn() -> St>);
6578    impl<St: State> sealed::Sealed for SetConvoId<St> {}
6579    impl<St: State> State for SetConvoId<St> {
6580        type ConvoId = Set<members::convo_id>;
6581        type Message = St::Message;
6582        type Rev = St::Rev;
6583    }
6584    ///State transition - sets the `message` field to Set
6585    pub struct SetMessage<St: State = Empty>(PhantomData<fn() -> St>);
6586    impl<St: State> sealed::Sealed for SetMessage<St> {}
6587    impl<St: State> State for SetMessage<St> {
6588        type ConvoId = St::ConvoId;
6589        type Message = Set<members::message>;
6590        type Rev = St::Rev;
6591    }
6592    ///State transition - sets the `rev` field to Set
6593    pub struct SetRev<St: State = Empty>(PhantomData<fn() -> St>);
6594    impl<St: State> sealed::Sealed for SetRev<St> {}
6595    impl<St: State> State for SetRev<St> {
6596        type ConvoId = St::ConvoId;
6597        type Message = St::Message;
6598        type Rev = Set<members::rev>;
6599    }
6600    /// Marker types for field names
6601    #[allow(non_camel_case_types)]
6602    pub mod members {
6603        ///Marker type for the `convo_id` field
6604        pub struct convo_id(());
6605        ///Marker type for the `message` field
6606        pub struct message(());
6607        ///Marker type for the `rev` field
6608        pub struct rev(());
6609    }
6610}
6611
6612/// Builder for constructing an instance of this type.
6613pub struct LogDeleteMessageBuilder<
6614    St: log_delete_message_state::State,
6615    S: BosStr = DefaultStr,
6616> {
6617    _state: PhantomData<fn() -> St>,
6618    _fields: (Option<S>, Option<LogDeleteMessageMessage<S>>, Option<S>),
6619    _type: PhantomData<fn() -> S>,
6620}
6621
6622impl LogDeleteMessage<DefaultStr> {
6623    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
6624    pub fn new() -> LogDeleteMessageBuilder<
6625        log_delete_message_state::Empty,
6626        DefaultStr,
6627    > {
6628        LogDeleteMessageBuilder::new()
6629    }
6630}
6631
6632impl<S: BosStr> LogDeleteMessage<S> {
6633    /// Create a new builder for this type
6634    pub fn builder() -> LogDeleteMessageBuilder<log_delete_message_state::Empty, S> {
6635        LogDeleteMessageBuilder::builder()
6636    }
6637}
6638
6639impl LogDeleteMessageBuilder<log_delete_message_state::Empty, DefaultStr> {
6640    /// Create a new builder with all fields unset, using the default string type, if needed
6641    pub fn new() -> Self {
6642        LogDeleteMessageBuilder {
6643            _state: PhantomData,
6644            _fields: (None, None, None),
6645            _type: PhantomData,
6646        }
6647    }
6648}
6649
6650impl<S: BosStr> LogDeleteMessageBuilder<log_delete_message_state::Empty, S> {
6651    /// Create a new builder with all fields unset
6652    pub fn builder() -> Self {
6653        LogDeleteMessageBuilder {
6654            _state: PhantomData,
6655            _fields: (None, None, None),
6656            _type: PhantomData,
6657        }
6658    }
6659}
6660
6661impl<St, S: BosStr> LogDeleteMessageBuilder<St, S>
6662where
6663    St: log_delete_message_state::State,
6664    St::ConvoId: log_delete_message_state::IsUnset,
6665{
6666    /// Set the `convoId` field (required)
6667    pub fn convo_id(
6668        mut self,
6669        value: impl Into<S>,
6670    ) -> LogDeleteMessageBuilder<log_delete_message_state::SetConvoId<St>, S> {
6671        self._fields.0 = Option::Some(value.into());
6672        LogDeleteMessageBuilder {
6673            _state: PhantomData,
6674            _fields: self._fields,
6675            _type: PhantomData,
6676        }
6677    }
6678}
6679
6680impl<St, S: BosStr> LogDeleteMessageBuilder<St, S>
6681where
6682    St: log_delete_message_state::State,
6683    St::Message: log_delete_message_state::IsUnset,
6684{
6685    /// Set the `message` field (required)
6686    pub fn message(
6687        mut self,
6688        value: impl Into<LogDeleteMessageMessage<S>>,
6689    ) -> LogDeleteMessageBuilder<log_delete_message_state::SetMessage<St>, S> {
6690        self._fields.1 = Option::Some(value.into());
6691        LogDeleteMessageBuilder {
6692            _state: PhantomData,
6693            _fields: self._fields,
6694            _type: PhantomData,
6695        }
6696    }
6697}
6698
6699impl<St, S: BosStr> LogDeleteMessageBuilder<St, S>
6700where
6701    St: log_delete_message_state::State,
6702    St::Rev: log_delete_message_state::IsUnset,
6703{
6704    /// Set the `rev` field (required)
6705    pub fn rev(
6706        mut self,
6707        value: impl Into<S>,
6708    ) -> LogDeleteMessageBuilder<log_delete_message_state::SetRev<St>, S> {
6709        self._fields.2 = Option::Some(value.into());
6710        LogDeleteMessageBuilder {
6711            _state: PhantomData,
6712            _fields: self._fields,
6713            _type: PhantomData,
6714        }
6715    }
6716}
6717
6718impl<St, S: BosStr> LogDeleteMessageBuilder<St, S>
6719where
6720    St: log_delete_message_state::State,
6721    St::ConvoId: log_delete_message_state::IsSet,
6722    St::Message: log_delete_message_state::IsSet,
6723    St::Rev: log_delete_message_state::IsSet,
6724{
6725    /// Build the final struct.
6726    pub fn build(self) -> LogDeleteMessage<S> {
6727        LogDeleteMessage {
6728            convo_id: self._fields.0.unwrap(),
6729            message: self._fields.1.unwrap(),
6730            rev: self._fields.2.unwrap(),
6731            extra_data: Default::default(),
6732        }
6733    }
6734    /// Build the final struct with custom extra_data.
6735    pub fn build_with_data(
6736        self,
6737        extra_data: BTreeMap<SmolStr, Data<S>>,
6738    ) -> LogDeleteMessage<S> {
6739        LogDeleteMessage {
6740            convo_id: self._fields.0.unwrap(),
6741            message: self._fields.1.unwrap(),
6742            rev: self._fields.2.unwrap(),
6743            extra_data: Some(extra_data),
6744        }
6745    }
6746}
6747
6748pub mod log_disable_join_link_state {
6749
6750    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
6751    #[allow(unused)]
6752    use ::core::marker::PhantomData;
6753    mod sealed {
6754        pub trait Sealed {}
6755    }
6756    /// State trait tracking which required fields have been set
6757    pub trait State: sealed::Sealed {
6758        type ConvoId;
6759        type Message;
6760        type Rev;
6761    }
6762    /// Empty state - all required fields are unset
6763    pub struct Empty(());
6764    impl sealed::Sealed for Empty {}
6765    impl State for Empty {
6766        type ConvoId = Unset;
6767        type Message = Unset;
6768        type Rev = Unset;
6769    }
6770    ///State transition - sets the `convo_id` field to Set
6771    pub struct SetConvoId<St: State = Empty>(PhantomData<fn() -> St>);
6772    impl<St: State> sealed::Sealed for SetConvoId<St> {}
6773    impl<St: State> State for SetConvoId<St> {
6774        type ConvoId = Set<members::convo_id>;
6775        type Message = St::Message;
6776        type Rev = St::Rev;
6777    }
6778    ///State transition - sets the `message` field to Set
6779    pub struct SetMessage<St: State = Empty>(PhantomData<fn() -> St>);
6780    impl<St: State> sealed::Sealed for SetMessage<St> {}
6781    impl<St: State> State for SetMessage<St> {
6782        type ConvoId = St::ConvoId;
6783        type Message = Set<members::message>;
6784        type Rev = St::Rev;
6785    }
6786    ///State transition - sets the `rev` field to Set
6787    pub struct SetRev<St: State = Empty>(PhantomData<fn() -> St>);
6788    impl<St: State> sealed::Sealed for SetRev<St> {}
6789    impl<St: State> State for SetRev<St> {
6790        type ConvoId = St::ConvoId;
6791        type Message = St::Message;
6792        type Rev = Set<members::rev>;
6793    }
6794    /// Marker types for field names
6795    #[allow(non_camel_case_types)]
6796    pub mod members {
6797        ///Marker type for the `convo_id` field
6798        pub struct convo_id(());
6799        ///Marker type for the `message` field
6800        pub struct message(());
6801        ///Marker type for the `rev` field
6802        pub struct rev(());
6803    }
6804}
6805
6806/// Builder for constructing an instance of this type.
6807pub struct LogDisableJoinLinkBuilder<
6808    St: log_disable_join_link_state::State,
6809    S: BosStr = DefaultStr,
6810> {
6811    _state: PhantomData<fn() -> St>,
6812    _fields: (Option<S>, Option<convo::SystemMessageView<S>>, Option<S>),
6813    _type: PhantomData<fn() -> S>,
6814}
6815
6816impl LogDisableJoinLink<DefaultStr> {
6817    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
6818    pub fn new() -> LogDisableJoinLinkBuilder<
6819        log_disable_join_link_state::Empty,
6820        DefaultStr,
6821    > {
6822        LogDisableJoinLinkBuilder::new()
6823    }
6824}
6825
6826impl<S: BosStr> LogDisableJoinLink<S> {
6827    /// Create a new builder for this type
6828    pub fn builder() -> LogDisableJoinLinkBuilder<
6829        log_disable_join_link_state::Empty,
6830        S,
6831    > {
6832        LogDisableJoinLinkBuilder::builder()
6833    }
6834}
6835
6836impl LogDisableJoinLinkBuilder<log_disable_join_link_state::Empty, DefaultStr> {
6837    /// Create a new builder with all fields unset, using the default string type, if needed
6838    pub fn new() -> Self {
6839        LogDisableJoinLinkBuilder {
6840            _state: PhantomData,
6841            _fields: (None, None, None),
6842            _type: PhantomData,
6843        }
6844    }
6845}
6846
6847impl<S: BosStr> LogDisableJoinLinkBuilder<log_disable_join_link_state::Empty, S> {
6848    /// Create a new builder with all fields unset
6849    pub fn builder() -> Self {
6850        LogDisableJoinLinkBuilder {
6851            _state: PhantomData,
6852            _fields: (None, None, None),
6853            _type: PhantomData,
6854        }
6855    }
6856}
6857
6858impl<St, S: BosStr> LogDisableJoinLinkBuilder<St, S>
6859where
6860    St: log_disable_join_link_state::State,
6861    St::ConvoId: log_disable_join_link_state::IsUnset,
6862{
6863    /// Set the `convoId` field (required)
6864    pub fn convo_id(
6865        mut self,
6866        value: impl Into<S>,
6867    ) -> LogDisableJoinLinkBuilder<log_disable_join_link_state::SetConvoId<St>, S> {
6868        self._fields.0 = Option::Some(value.into());
6869        LogDisableJoinLinkBuilder {
6870            _state: PhantomData,
6871            _fields: self._fields,
6872            _type: PhantomData,
6873        }
6874    }
6875}
6876
6877impl<St, S: BosStr> LogDisableJoinLinkBuilder<St, S>
6878where
6879    St: log_disable_join_link_state::State,
6880    St::Message: log_disable_join_link_state::IsUnset,
6881{
6882    /// Set the `message` field (required)
6883    pub fn message(
6884        mut self,
6885        value: impl Into<convo::SystemMessageView<S>>,
6886    ) -> LogDisableJoinLinkBuilder<log_disable_join_link_state::SetMessage<St>, S> {
6887        self._fields.1 = Option::Some(value.into());
6888        LogDisableJoinLinkBuilder {
6889            _state: PhantomData,
6890            _fields: self._fields,
6891            _type: PhantomData,
6892        }
6893    }
6894}
6895
6896impl<St, S: BosStr> LogDisableJoinLinkBuilder<St, S>
6897where
6898    St: log_disable_join_link_state::State,
6899    St::Rev: log_disable_join_link_state::IsUnset,
6900{
6901    /// Set the `rev` field (required)
6902    pub fn rev(
6903        mut self,
6904        value: impl Into<S>,
6905    ) -> LogDisableJoinLinkBuilder<log_disable_join_link_state::SetRev<St>, S> {
6906        self._fields.2 = Option::Some(value.into());
6907        LogDisableJoinLinkBuilder {
6908            _state: PhantomData,
6909            _fields: self._fields,
6910            _type: PhantomData,
6911        }
6912    }
6913}
6914
6915impl<St, S: BosStr> LogDisableJoinLinkBuilder<St, S>
6916where
6917    St: log_disable_join_link_state::State,
6918    St::ConvoId: log_disable_join_link_state::IsSet,
6919    St::Message: log_disable_join_link_state::IsSet,
6920    St::Rev: log_disable_join_link_state::IsSet,
6921{
6922    /// Build the final struct.
6923    pub fn build(self) -> LogDisableJoinLink<S> {
6924        LogDisableJoinLink {
6925            convo_id: self._fields.0.unwrap(),
6926            message: self._fields.1.unwrap(),
6927            rev: self._fields.2.unwrap(),
6928            extra_data: Default::default(),
6929        }
6930    }
6931    /// Build the final struct with custom extra_data.
6932    pub fn build_with_data(
6933        self,
6934        extra_data: BTreeMap<SmolStr, Data<S>>,
6935    ) -> LogDisableJoinLink<S> {
6936        LogDisableJoinLink {
6937            convo_id: self._fields.0.unwrap(),
6938            message: self._fields.1.unwrap(),
6939            rev: self._fields.2.unwrap(),
6940            extra_data: Some(extra_data),
6941        }
6942    }
6943}
6944
6945pub mod log_edit_group_state {
6946
6947    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
6948    #[allow(unused)]
6949    use ::core::marker::PhantomData;
6950    mod sealed {
6951        pub trait Sealed {}
6952    }
6953    /// State trait tracking which required fields have been set
6954    pub trait State: sealed::Sealed {
6955        type ConvoId;
6956        type Message;
6957        type Rev;
6958    }
6959    /// Empty state - all required fields are unset
6960    pub struct Empty(());
6961    impl sealed::Sealed for Empty {}
6962    impl State for Empty {
6963        type ConvoId = Unset;
6964        type Message = Unset;
6965        type Rev = Unset;
6966    }
6967    ///State transition - sets the `convo_id` field to Set
6968    pub struct SetConvoId<St: State = Empty>(PhantomData<fn() -> St>);
6969    impl<St: State> sealed::Sealed for SetConvoId<St> {}
6970    impl<St: State> State for SetConvoId<St> {
6971        type ConvoId = Set<members::convo_id>;
6972        type Message = St::Message;
6973        type Rev = St::Rev;
6974    }
6975    ///State transition - sets the `message` field to Set
6976    pub struct SetMessage<St: State = Empty>(PhantomData<fn() -> St>);
6977    impl<St: State> sealed::Sealed for SetMessage<St> {}
6978    impl<St: State> State for SetMessage<St> {
6979        type ConvoId = St::ConvoId;
6980        type Message = Set<members::message>;
6981        type Rev = St::Rev;
6982    }
6983    ///State transition - sets the `rev` field to Set
6984    pub struct SetRev<St: State = Empty>(PhantomData<fn() -> St>);
6985    impl<St: State> sealed::Sealed for SetRev<St> {}
6986    impl<St: State> State for SetRev<St> {
6987        type ConvoId = St::ConvoId;
6988        type Message = St::Message;
6989        type Rev = Set<members::rev>;
6990    }
6991    /// Marker types for field names
6992    #[allow(non_camel_case_types)]
6993    pub mod members {
6994        ///Marker type for the `convo_id` field
6995        pub struct convo_id(());
6996        ///Marker type for the `message` field
6997        pub struct message(());
6998        ///Marker type for the `rev` field
6999        pub struct rev(());
7000    }
7001}
7002
7003/// Builder for constructing an instance of this type.
7004pub struct LogEditGroupBuilder<St: log_edit_group_state::State, S: BosStr = DefaultStr> {
7005    _state: PhantomData<fn() -> St>,
7006    _fields: (Option<S>, Option<convo::SystemMessageView<S>>, Option<S>),
7007    _type: PhantomData<fn() -> S>,
7008}
7009
7010impl LogEditGroup<DefaultStr> {
7011    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
7012    pub fn new() -> LogEditGroupBuilder<log_edit_group_state::Empty, DefaultStr> {
7013        LogEditGroupBuilder::new()
7014    }
7015}
7016
7017impl<S: BosStr> LogEditGroup<S> {
7018    /// Create a new builder for this type
7019    pub fn builder() -> LogEditGroupBuilder<log_edit_group_state::Empty, S> {
7020        LogEditGroupBuilder::builder()
7021    }
7022}
7023
7024impl LogEditGroupBuilder<log_edit_group_state::Empty, DefaultStr> {
7025    /// Create a new builder with all fields unset, using the default string type, if needed
7026    pub fn new() -> Self {
7027        LogEditGroupBuilder {
7028            _state: PhantomData,
7029            _fields: (None, None, None),
7030            _type: PhantomData,
7031        }
7032    }
7033}
7034
7035impl<S: BosStr> LogEditGroupBuilder<log_edit_group_state::Empty, S> {
7036    /// Create a new builder with all fields unset
7037    pub fn builder() -> Self {
7038        LogEditGroupBuilder {
7039            _state: PhantomData,
7040            _fields: (None, None, None),
7041            _type: PhantomData,
7042        }
7043    }
7044}
7045
7046impl<St, S: BosStr> LogEditGroupBuilder<St, S>
7047where
7048    St: log_edit_group_state::State,
7049    St::ConvoId: log_edit_group_state::IsUnset,
7050{
7051    /// Set the `convoId` field (required)
7052    pub fn convo_id(
7053        mut self,
7054        value: impl Into<S>,
7055    ) -> LogEditGroupBuilder<log_edit_group_state::SetConvoId<St>, S> {
7056        self._fields.0 = Option::Some(value.into());
7057        LogEditGroupBuilder {
7058            _state: PhantomData,
7059            _fields: self._fields,
7060            _type: PhantomData,
7061        }
7062    }
7063}
7064
7065impl<St, S: BosStr> LogEditGroupBuilder<St, S>
7066where
7067    St: log_edit_group_state::State,
7068    St::Message: log_edit_group_state::IsUnset,
7069{
7070    /// Set the `message` field (required)
7071    pub fn message(
7072        mut self,
7073        value: impl Into<convo::SystemMessageView<S>>,
7074    ) -> LogEditGroupBuilder<log_edit_group_state::SetMessage<St>, S> {
7075        self._fields.1 = Option::Some(value.into());
7076        LogEditGroupBuilder {
7077            _state: PhantomData,
7078            _fields: self._fields,
7079            _type: PhantomData,
7080        }
7081    }
7082}
7083
7084impl<St, S: BosStr> LogEditGroupBuilder<St, S>
7085where
7086    St: log_edit_group_state::State,
7087    St::Rev: log_edit_group_state::IsUnset,
7088{
7089    /// Set the `rev` field (required)
7090    pub fn rev(
7091        mut self,
7092        value: impl Into<S>,
7093    ) -> LogEditGroupBuilder<log_edit_group_state::SetRev<St>, S> {
7094        self._fields.2 = Option::Some(value.into());
7095        LogEditGroupBuilder {
7096            _state: PhantomData,
7097            _fields: self._fields,
7098            _type: PhantomData,
7099        }
7100    }
7101}
7102
7103impl<St, S: BosStr> LogEditGroupBuilder<St, S>
7104where
7105    St: log_edit_group_state::State,
7106    St::ConvoId: log_edit_group_state::IsSet,
7107    St::Message: log_edit_group_state::IsSet,
7108    St::Rev: log_edit_group_state::IsSet,
7109{
7110    /// Build the final struct.
7111    pub fn build(self) -> LogEditGroup<S> {
7112        LogEditGroup {
7113            convo_id: self._fields.0.unwrap(),
7114            message: self._fields.1.unwrap(),
7115            rev: self._fields.2.unwrap(),
7116            extra_data: Default::default(),
7117        }
7118    }
7119    /// Build the final struct with custom extra_data.
7120    pub fn build_with_data(
7121        self,
7122        extra_data: BTreeMap<SmolStr, Data<S>>,
7123    ) -> LogEditGroup<S> {
7124        LogEditGroup {
7125            convo_id: self._fields.0.unwrap(),
7126            message: self._fields.1.unwrap(),
7127            rev: self._fields.2.unwrap(),
7128            extra_data: Some(extra_data),
7129        }
7130    }
7131}
7132
7133pub mod log_edit_join_link_state {
7134
7135    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
7136    #[allow(unused)]
7137    use ::core::marker::PhantomData;
7138    mod sealed {
7139        pub trait Sealed {}
7140    }
7141    /// State trait tracking which required fields have been set
7142    pub trait State: sealed::Sealed {
7143        type ConvoId;
7144        type Message;
7145        type Rev;
7146    }
7147    /// Empty state - all required fields are unset
7148    pub struct Empty(());
7149    impl sealed::Sealed for Empty {}
7150    impl State for Empty {
7151        type ConvoId = Unset;
7152        type Message = Unset;
7153        type Rev = Unset;
7154    }
7155    ///State transition - sets the `convo_id` field to Set
7156    pub struct SetConvoId<St: State = Empty>(PhantomData<fn() -> St>);
7157    impl<St: State> sealed::Sealed for SetConvoId<St> {}
7158    impl<St: State> State for SetConvoId<St> {
7159        type ConvoId = Set<members::convo_id>;
7160        type Message = St::Message;
7161        type Rev = St::Rev;
7162    }
7163    ///State transition - sets the `message` field to Set
7164    pub struct SetMessage<St: State = Empty>(PhantomData<fn() -> St>);
7165    impl<St: State> sealed::Sealed for SetMessage<St> {}
7166    impl<St: State> State for SetMessage<St> {
7167        type ConvoId = St::ConvoId;
7168        type Message = Set<members::message>;
7169        type Rev = St::Rev;
7170    }
7171    ///State transition - sets the `rev` field to Set
7172    pub struct SetRev<St: State = Empty>(PhantomData<fn() -> St>);
7173    impl<St: State> sealed::Sealed for SetRev<St> {}
7174    impl<St: State> State for SetRev<St> {
7175        type ConvoId = St::ConvoId;
7176        type Message = St::Message;
7177        type Rev = Set<members::rev>;
7178    }
7179    /// Marker types for field names
7180    #[allow(non_camel_case_types)]
7181    pub mod members {
7182        ///Marker type for the `convo_id` field
7183        pub struct convo_id(());
7184        ///Marker type for the `message` field
7185        pub struct message(());
7186        ///Marker type for the `rev` field
7187        pub struct rev(());
7188    }
7189}
7190
7191/// Builder for constructing an instance of this type.
7192pub struct LogEditJoinLinkBuilder<
7193    St: log_edit_join_link_state::State,
7194    S: BosStr = DefaultStr,
7195> {
7196    _state: PhantomData<fn() -> St>,
7197    _fields: (Option<S>, Option<convo::SystemMessageView<S>>, Option<S>),
7198    _type: PhantomData<fn() -> S>,
7199}
7200
7201impl LogEditJoinLink<DefaultStr> {
7202    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
7203    pub fn new() -> LogEditJoinLinkBuilder<log_edit_join_link_state::Empty, DefaultStr> {
7204        LogEditJoinLinkBuilder::new()
7205    }
7206}
7207
7208impl<S: BosStr> LogEditJoinLink<S> {
7209    /// Create a new builder for this type
7210    pub fn builder() -> LogEditJoinLinkBuilder<log_edit_join_link_state::Empty, S> {
7211        LogEditJoinLinkBuilder::builder()
7212    }
7213}
7214
7215impl LogEditJoinLinkBuilder<log_edit_join_link_state::Empty, DefaultStr> {
7216    /// Create a new builder with all fields unset, using the default string type, if needed
7217    pub fn new() -> Self {
7218        LogEditJoinLinkBuilder {
7219            _state: PhantomData,
7220            _fields: (None, None, None),
7221            _type: PhantomData,
7222        }
7223    }
7224}
7225
7226impl<S: BosStr> LogEditJoinLinkBuilder<log_edit_join_link_state::Empty, S> {
7227    /// Create a new builder with all fields unset
7228    pub fn builder() -> Self {
7229        LogEditJoinLinkBuilder {
7230            _state: PhantomData,
7231            _fields: (None, None, None),
7232            _type: PhantomData,
7233        }
7234    }
7235}
7236
7237impl<St, S: BosStr> LogEditJoinLinkBuilder<St, S>
7238where
7239    St: log_edit_join_link_state::State,
7240    St::ConvoId: log_edit_join_link_state::IsUnset,
7241{
7242    /// Set the `convoId` field (required)
7243    pub fn convo_id(
7244        mut self,
7245        value: impl Into<S>,
7246    ) -> LogEditJoinLinkBuilder<log_edit_join_link_state::SetConvoId<St>, S> {
7247        self._fields.0 = Option::Some(value.into());
7248        LogEditJoinLinkBuilder {
7249            _state: PhantomData,
7250            _fields: self._fields,
7251            _type: PhantomData,
7252        }
7253    }
7254}
7255
7256impl<St, S: BosStr> LogEditJoinLinkBuilder<St, S>
7257where
7258    St: log_edit_join_link_state::State,
7259    St::Message: log_edit_join_link_state::IsUnset,
7260{
7261    /// Set the `message` field (required)
7262    pub fn message(
7263        mut self,
7264        value: impl Into<convo::SystemMessageView<S>>,
7265    ) -> LogEditJoinLinkBuilder<log_edit_join_link_state::SetMessage<St>, S> {
7266        self._fields.1 = Option::Some(value.into());
7267        LogEditJoinLinkBuilder {
7268            _state: PhantomData,
7269            _fields: self._fields,
7270            _type: PhantomData,
7271        }
7272    }
7273}
7274
7275impl<St, S: BosStr> LogEditJoinLinkBuilder<St, S>
7276where
7277    St: log_edit_join_link_state::State,
7278    St::Rev: log_edit_join_link_state::IsUnset,
7279{
7280    /// Set the `rev` field (required)
7281    pub fn rev(
7282        mut self,
7283        value: impl Into<S>,
7284    ) -> LogEditJoinLinkBuilder<log_edit_join_link_state::SetRev<St>, S> {
7285        self._fields.2 = Option::Some(value.into());
7286        LogEditJoinLinkBuilder {
7287            _state: PhantomData,
7288            _fields: self._fields,
7289            _type: PhantomData,
7290        }
7291    }
7292}
7293
7294impl<St, S: BosStr> LogEditJoinLinkBuilder<St, S>
7295where
7296    St: log_edit_join_link_state::State,
7297    St::ConvoId: log_edit_join_link_state::IsSet,
7298    St::Message: log_edit_join_link_state::IsSet,
7299    St::Rev: log_edit_join_link_state::IsSet,
7300{
7301    /// Build the final struct.
7302    pub fn build(self) -> LogEditJoinLink<S> {
7303        LogEditJoinLink {
7304            convo_id: self._fields.0.unwrap(),
7305            message: self._fields.1.unwrap(),
7306            rev: self._fields.2.unwrap(),
7307            extra_data: Default::default(),
7308        }
7309    }
7310    /// Build the final struct with custom extra_data.
7311    pub fn build_with_data(
7312        self,
7313        extra_data: BTreeMap<SmolStr, Data<S>>,
7314    ) -> LogEditJoinLink<S> {
7315        LogEditJoinLink {
7316            convo_id: self._fields.0.unwrap(),
7317            message: self._fields.1.unwrap(),
7318            rev: self._fields.2.unwrap(),
7319            extra_data: Some(extra_data),
7320        }
7321    }
7322}
7323
7324pub mod log_enable_join_link_state {
7325
7326    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
7327    #[allow(unused)]
7328    use ::core::marker::PhantomData;
7329    mod sealed {
7330        pub trait Sealed {}
7331    }
7332    /// State trait tracking which required fields have been set
7333    pub trait State: sealed::Sealed {
7334        type ConvoId;
7335        type Message;
7336        type Rev;
7337    }
7338    /// Empty state - all required fields are unset
7339    pub struct Empty(());
7340    impl sealed::Sealed for Empty {}
7341    impl State for Empty {
7342        type ConvoId = Unset;
7343        type Message = Unset;
7344        type Rev = Unset;
7345    }
7346    ///State transition - sets the `convo_id` field to Set
7347    pub struct SetConvoId<St: State = Empty>(PhantomData<fn() -> St>);
7348    impl<St: State> sealed::Sealed for SetConvoId<St> {}
7349    impl<St: State> State for SetConvoId<St> {
7350        type ConvoId = Set<members::convo_id>;
7351        type Message = St::Message;
7352        type Rev = St::Rev;
7353    }
7354    ///State transition - sets the `message` field to Set
7355    pub struct SetMessage<St: State = Empty>(PhantomData<fn() -> St>);
7356    impl<St: State> sealed::Sealed for SetMessage<St> {}
7357    impl<St: State> State for SetMessage<St> {
7358        type ConvoId = St::ConvoId;
7359        type Message = Set<members::message>;
7360        type Rev = St::Rev;
7361    }
7362    ///State transition - sets the `rev` field to Set
7363    pub struct SetRev<St: State = Empty>(PhantomData<fn() -> St>);
7364    impl<St: State> sealed::Sealed for SetRev<St> {}
7365    impl<St: State> State for SetRev<St> {
7366        type ConvoId = St::ConvoId;
7367        type Message = St::Message;
7368        type Rev = Set<members::rev>;
7369    }
7370    /// Marker types for field names
7371    #[allow(non_camel_case_types)]
7372    pub mod members {
7373        ///Marker type for the `convo_id` field
7374        pub struct convo_id(());
7375        ///Marker type for the `message` field
7376        pub struct message(());
7377        ///Marker type for the `rev` field
7378        pub struct rev(());
7379    }
7380}
7381
7382/// Builder for constructing an instance of this type.
7383pub struct LogEnableJoinLinkBuilder<
7384    St: log_enable_join_link_state::State,
7385    S: BosStr = DefaultStr,
7386> {
7387    _state: PhantomData<fn() -> St>,
7388    _fields: (Option<S>, Option<convo::SystemMessageView<S>>, Option<S>),
7389    _type: PhantomData<fn() -> S>,
7390}
7391
7392impl LogEnableJoinLink<DefaultStr> {
7393    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
7394    pub fn new() -> LogEnableJoinLinkBuilder<
7395        log_enable_join_link_state::Empty,
7396        DefaultStr,
7397    > {
7398        LogEnableJoinLinkBuilder::new()
7399    }
7400}
7401
7402impl<S: BosStr> LogEnableJoinLink<S> {
7403    /// Create a new builder for this type
7404    pub fn builder() -> LogEnableJoinLinkBuilder<log_enable_join_link_state::Empty, S> {
7405        LogEnableJoinLinkBuilder::builder()
7406    }
7407}
7408
7409impl LogEnableJoinLinkBuilder<log_enable_join_link_state::Empty, DefaultStr> {
7410    /// Create a new builder with all fields unset, using the default string type, if needed
7411    pub fn new() -> Self {
7412        LogEnableJoinLinkBuilder {
7413            _state: PhantomData,
7414            _fields: (None, None, None),
7415            _type: PhantomData,
7416        }
7417    }
7418}
7419
7420impl<S: BosStr> LogEnableJoinLinkBuilder<log_enable_join_link_state::Empty, S> {
7421    /// Create a new builder with all fields unset
7422    pub fn builder() -> Self {
7423        LogEnableJoinLinkBuilder {
7424            _state: PhantomData,
7425            _fields: (None, None, None),
7426            _type: PhantomData,
7427        }
7428    }
7429}
7430
7431impl<St, S: BosStr> LogEnableJoinLinkBuilder<St, S>
7432where
7433    St: log_enable_join_link_state::State,
7434    St::ConvoId: log_enable_join_link_state::IsUnset,
7435{
7436    /// Set the `convoId` field (required)
7437    pub fn convo_id(
7438        mut self,
7439        value: impl Into<S>,
7440    ) -> LogEnableJoinLinkBuilder<log_enable_join_link_state::SetConvoId<St>, S> {
7441        self._fields.0 = Option::Some(value.into());
7442        LogEnableJoinLinkBuilder {
7443            _state: PhantomData,
7444            _fields: self._fields,
7445            _type: PhantomData,
7446        }
7447    }
7448}
7449
7450impl<St, S: BosStr> LogEnableJoinLinkBuilder<St, S>
7451where
7452    St: log_enable_join_link_state::State,
7453    St::Message: log_enable_join_link_state::IsUnset,
7454{
7455    /// Set the `message` field (required)
7456    pub fn message(
7457        mut self,
7458        value: impl Into<convo::SystemMessageView<S>>,
7459    ) -> LogEnableJoinLinkBuilder<log_enable_join_link_state::SetMessage<St>, S> {
7460        self._fields.1 = Option::Some(value.into());
7461        LogEnableJoinLinkBuilder {
7462            _state: PhantomData,
7463            _fields: self._fields,
7464            _type: PhantomData,
7465        }
7466    }
7467}
7468
7469impl<St, S: BosStr> LogEnableJoinLinkBuilder<St, S>
7470where
7471    St: log_enable_join_link_state::State,
7472    St::Rev: log_enable_join_link_state::IsUnset,
7473{
7474    /// Set the `rev` field (required)
7475    pub fn rev(
7476        mut self,
7477        value: impl Into<S>,
7478    ) -> LogEnableJoinLinkBuilder<log_enable_join_link_state::SetRev<St>, S> {
7479        self._fields.2 = Option::Some(value.into());
7480        LogEnableJoinLinkBuilder {
7481            _state: PhantomData,
7482            _fields: self._fields,
7483            _type: PhantomData,
7484        }
7485    }
7486}
7487
7488impl<St, S: BosStr> LogEnableJoinLinkBuilder<St, S>
7489where
7490    St: log_enable_join_link_state::State,
7491    St::ConvoId: log_enable_join_link_state::IsSet,
7492    St::Message: log_enable_join_link_state::IsSet,
7493    St::Rev: log_enable_join_link_state::IsSet,
7494{
7495    /// Build the final struct.
7496    pub fn build(self) -> LogEnableJoinLink<S> {
7497        LogEnableJoinLink {
7498            convo_id: self._fields.0.unwrap(),
7499            message: self._fields.1.unwrap(),
7500            rev: self._fields.2.unwrap(),
7501            extra_data: Default::default(),
7502        }
7503    }
7504    /// Build the final struct with custom extra_data.
7505    pub fn build_with_data(
7506        self,
7507        extra_data: BTreeMap<SmolStr, Data<S>>,
7508    ) -> LogEnableJoinLink<S> {
7509        LogEnableJoinLink {
7510            convo_id: self._fields.0.unwrap(),
7511            message: self._fields.1.unwrap(),
7512            rev: self._fields.2.unwrap(),
7513            extra_data: Some(extra_data),
7514        }
7515    }
7516}
7517
7518pub mod log_incoming_join_request_state {
7519
7520    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
7521    #[allow(unused)]
7522    use ::core::marker::PhantomData;
7523    mod sealed {
7524        pub trait Sealed {}
7525    }
7526    /// State trait tracking which required fields have been set
7527    pub trait State: sealed::Sealed {
7528        type ConvoId;
7529        type Member;
7530        type Rev;
7531    }
7532    /// Empty state - all required fields are unset
7533    pub struct Empty(());
7534    impl sealed::Sealed for Empty {}
7535    impl State for Empty {
7536        type ConvoId = Unset;
7537        type Member = Unset;
7538        type Rev = Unset;
7539    }
7540    ///State transition - sets the `convo_id` field to Set
7541    pub struct SetConvoId<St: State = Empty>(PhantomData<fn() -> St>);
7542    impl<St: State> sealed::Sealed for SetConvoId<St> {}
7543    impl<St: State> State for SetConvoId<St> {
7544        type ConvoId = Set<members::convo_id>;
7545        type Member = St::Member;
7546        type Rev = St::Rev;
7547    }
7548    ///State transition - sets the `member` field to Set
7549    pub struct SetMember<St: State = Empty>(PhantomData<fn() -> St>);
7550    impl<St: State> sealed::Sealed for SetMember<St> {}
7551    impl<St: State> State for SetMember<St> {
7552        type ConvoId = St::ConvoId;
7553        type Member = Set<members::member>;
7554        type Rev = St::Rev;
7555    }
7556    ///State transition - sets the `rev` field to Set
7557    pub struct SetRev<St: State = Empty>(PhantomData<fn() -> St>);
7558    impl<St: State> sealed::Sealed for SetRev<St> {}
7559    impl<St: State> State for SetRev<St> {
7560        type ConvoId = St::ConvoId;
7561        type Member = St::Member;
7562        type Rev = Set<members::rev>;
7563    }
7564    /// Marker types for field names
7565    #[allow(non_camel_case_types)]
7566    pub mod members {
7567        ///Marker type for the `convo_id` field
7568        pub struct convo_id(());
7569        ///Marker type for the `member` field
7570        pub struct member(());
7571        ///Marker type for the `rev` field
7572        pub struct rev(());
7573    }
7574}
7575
7576/// Builder for constructing an instance of this type.
7577pub struct LogIncomingJoinRequestBuilder<
7578    St: log_incoming_join_request_state::State,
7579    S: BosStr = DefaultStr,
7580> {
7581    _state: PhantomData<fn() -> St>,
7582    _fields: (Option<S>, Option<ProfileViewBasic<S>>, Option<S>),
7583    _type: PhantomData<fn() -> S>,
7584}
7585
7586impl LogIncomingJoinRequest<DefaultStr> {
7587    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
7588    pub fn new() -> LogIncomingJoinRequestBuilder<
7589        log_incoming_join_request_state::Empty,
7590        DefaultStr,
7591    > {
7592        LogIncomingJoinRequestBuilder::new()
7593    }
7594}
7595
7596impl<S: BosStr> LogIncomingJoinRequest<S> {
7597    /// Create a new builder for this type
7598    pub fn builder() -> LogIncomingJoinRequestBuilder<
7599        log_incoming_join_request_state::Empty,
7600        S,
7601    > {
7602        LogIncomingJoinRequestBuilder::builder()
7603    }
7604}
7605
7606impl LogIncomingJoinRequestBuilder<log_incoming_join_request_state::Empty, DefaultStr> {
7607    /// Create a new builder with all fields unset, using the default string type, if needed
7608    pub fn new() -> Self {
7609        LogIncomingJoinRequestBuilder {
7610            _state: PhantomData,
7611            _fields: (None, None, None),
7612            _type: PhantomData,
7613        }
7614    }
7615}
7616
7617impl<
7618    S: BosStr,
7619> LogIncomingJoinRequestBuilder<log_incoming_join_request_state::Empty, S> {
7620    /// Create a new builder with all fields unset
7621    pub fn builder() -> Self {
7622        LogIncomingJoinRequestBuilder {
7623            _state: PhantomData,
7624            _fields: (None, None, None),
7625            _type: PhantomData,
7626        }
7627    }
7628}
7629
7630impl<St, S: BosStr> LogIncomingJoinRequestBuilder<St, S>
7631where
7632    St: log_incoming_join_request_state::State,
7633    St::ConvoId: log_incoming_join_request_state::IsUnset,
7634{
7635    /// Set the `convoId` field (required)
7636    pub fn convo_id(
7637        mut self,
7638        value: impl Into<S>,
7639    ) -> LogIncomingJoinRequestBuilder<
7640        log_incoming_join_request_state::SetConvoId<St>,
7641        S,
7642    > {
7643        self._fields.0 = Option::Some(value.into());
7644        LogIncomingJoinRequestBuilder {
7645            _state: PhantomData,
7646            _fields: self._fields,
7647            _type: PhantomData,
7648        }
7649    }
7650}
7651
7652impl<St, S: BosStr> LogIncomingJoinRequestBuilder<St, S>
7653where
7654    St: log_incoming_join_request_state::State,
7655    St::Member: log_incoming_join_request_state::IsUnset,
7656{
7657    /// Set the `member` field (required)
7658    pub fn member(
7659        mut self,
7660        value: impl Into<ProfileViewBasic<S>>,
7661    ) -> LogIncomingJoinRequestBuilder<
7662        log_incoming_join_request_state::SetMember<St>,
7663        S,
7664    > {
7665        self._fields.1 = Option::Some(value.into());
7666        LogIncomingJoinRequestBuilder {
7667            _state: PhantomData,
7668            _fields: self._fields,
7669            _type: PhantomData,
7670        }
7671    }
7672}
7673
7674impl<St, S: BosStr> LogIncomingJoinRequestBuilder<St, S>
7675where
7676    St: log_incoming_join_request_state::State,
7677    St::Rev: log_incoming_join_request_state::IsUnset,
7678{
7679    /// Set the `rev` field (required)
7680    pub fn rev(
7681        mut self,
7682        value: impl Into<S>,
7683    ) -> LogIncomingJoinRequestBuilder<log_incoming_join_request_state::SetRev<St>, S> {
7684        self._fields.2 = Option::Some(value.into());
7685        LogIncomingJoinRequestBuilder {
7686            _state: PhantomData,
7687            _fields: self._fields,
7688            _type: PhantomData,
7689        }
7690    }
7691}
7692
7693impl<St, S: BosStr> LogIncomingJoinRequestBuilder<St, S>
7694where
7695    St: log_incoming_join_request_state::State,
7696    St::ConvoId: log_incoming_join_request_state::IsSet,
7697    St::Member: log_incoming_join_request_state::IsSet,
7698    St::Rev: log_incoming_join_request_state::IsSet,
7699{
7700    /// Build the final struct.
7701    pub fn build(self) -> LogIncomingJoinRequest<S> {
7702        LogIncomingJoinRequest {
7703            convo_id: self._fields.0.unwrap(),
7704            member: self._fields.1.unwrap(),
7705            rev: self._fields.2.unwrap(),
7706            extra_data: Default::default(),
7707        }
7708    }
7709    /// Build the final struct with custom extra_data.
7710    pub fn build_with_data(
7711        self,
7712        extra_data: BTreeMap<SmolStr, Data<S>>,
7713    ) -> LogIncomingJoinRequest<S> {
7714        LogIncomingJoinRequest {
7715            convo_id: self._fields.0.unwrap(),
7716            member: self._fields.1.unwrap(),
7717            rev: self._fields.2.unwrap(),
7718            extra_data: Some(extra_data),
7719        }
7720    }
7721}
7722
7723pub mod log_lock_convo_state {
7724
7725    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
7726    #[allow(unused)]
7727    use ::core::marker::PhantomData;
7728    mod sealed {
7729        pub trait Sealed {}
7730    }
7731    /// State trait tracking which required fields have been set
7732    pub trait State: sealed::Sealed {
7733        type ConvoId;
7734        type Message;
7735        type RelatedProfiles;
7736        type Rev;
7737    }
7738    /// Empty state - all required fields are unset
7739    pub struct Empty(());
7740    impl sealed::Sealed for Empty {}
7741    impl State for Empty {
7742        type ConvoId = Unset;
7743        type Message = Unset;
7744        type RelatedProfiles = Unset;
7745        type Rev = Unset;
7746    }
7747    ///State transition - sets the `convo_id` field to Set
7748    pub struct SetConvoId<St: State = Empty>(PhantomData<fn() -> St>);
7749    impl<St: State> sealed::Sealed for SetConvoId<St> {}
7750    impl<St: State> State for SetConvoId<St> {
7751        type ConvoId = Set<members::convo_id>;
7752        type Message = St::Message;
7753        type RelatedProfiles = St::RelatedProfiles;
7754        type Rev = St::Rev;
7755    }
7756    ///State transition - sets the `message` field to Set
7757    pub struct SetMessage<St: State = Empty>(PhantomData<fn() -> St>);
7758    impl<St: State> sealed::Sealed for SetMessage<St> {}
7759    impl<St: State> State for SetMessage<St> {
7760        type ConvoId = St::ConvoId;
7761        type Message = Set<members::message>;
7762        type RelatedProfiles = St::RelatedProfiles;
7763        type Rev = St::Rev;
7764    }
7765    ///State transition - sets the `related_profiles` field to Set
7766    pub struct SetRelatedProfiles<St: State = Empty>(PhantomData<fn() -> St>);
7767    impl<St: State> sealed::Sealed for SetRelatedProfiles<St> {}
7768    impl<St: State> State for SetRelatedProfiles<St> {
7769        type ConvoId = St::ConvoId;
7770        type Message = St::Message;
7771        type RelatedProfiles = Set<members::related_profiles>;
7772        type Rev = St::Rev;
7773    }
7774    ///State transition - sets the `rev` field to Set
7775    pub struct SetRev<St: State = Empty>(PhantomData<fn() -> St>);
7776    impl<St: State> sealed::Sealed for SetRev<St> {}
7777    impl<St: State> State for SetRev<St> {
7778        type ConvoId = St::ConvoId;
7779        type Message = St::Message;
7780        type RelatedProfiles = St::RelatedProfiles;
7781        type Rev = Set<members::rev>;
7782    }
7783    /// Marker types for field names
7784    #[allow(non_camel_case_types)]
7785    pub mod members {
7786        ///Marker type for the `convo_id` field
7787        pub struct convo_id(());
7788        ///Marker type for the `message` field
7789        pub struct message(());
7790        ///Marker type for the `related_profiles` field
7791        pub struct related_profiles(());
7792        ///Marker type for the `rev` field
7793        pub struct rev(());
7794    }
7795}
7796
7797/// Builder for constructing an instance of this type.
7798pub struct LogLockConvoBuilder<St: log_lock_convo_state::State, S: BosStr = DefaultStr> {
7799    _state: PhantomData<fn() -> St>,
7800    _fields: (
7801        Option<S>,
7802        Option<convo::SystemMessageView<S>>,
7803        Option<Vec<ProfileViewBasic<S>>>,
7804        Option<S>,
7805    ),
7806    _type: PhantomData<fn() -> S>,
7807}
7808
7809impl LogLockConvo<DefaultStr> {
7810    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
7811    pub fn new() -> LogLockConvoBuilder<log_lock_convo_state::Empty, DefaultStr> {
7812        LogLockConvoBuilder::new()
7813    }
7814}
7815
7816impl<S: BosStr> LogLockConvo<S> {
7817    /// Create a new builder for this type
7818    pub fn builder() -> LogLockConvoBuilder<log_lock_convo_state::Empty, S> {
7819        LogLockConvoBuilder::builder()
7820    }
7821}
7822
7823impl LogLockConvoBuilder<log_lock_convo_state::Empty, DefaultStr> {
7824    /// Create a new builder with all fields unset, using the default string type, if needed
7825    pub fn new() -> Self {
7826        LogLockConvoBuilder {
7827            _state: PhantomData,
7828            _fields: (None, None, None, None),
7829            _type: PhantomData,
7830        }
7831    }
7832}
7833
7834impl<S: BosStr> LogLockConvoBuilder<log_lock_convo_state::Empty, S> {
7835    /// Create a new builder with all fields unset
7836    pub fn builder() -> Self {
7837        LogLockConvoBuilder {
7838            _state: PhantomData,
7839            _fields: (None, None, None, None),
7840            _type: PhantomData,
7841        }
7842    }
7843}
7844
7845impl<St, S: BosStr> LogLockConvoBuilder<St, S>
7846where
7847    St: log_lock_convo_state::State,
7848    St::ConvoId: log_lock_convo_state::IsUnset,
7849{
7850    /// Set the `convoId` field (required)
7851    pub fn convo_id(
7852        mut self,
7853        value: impl Into<S>,
7854    ) -> LogLockConvoBuilder<log_lock_convo_state::SetConvoId<St>, S> {
7855        self._fields.0 = Option::Some(value.into());
7856        LogLockConvoBuilder {
7857            _state: PhantomData,
7858            _fields: self._fields,
7859            _type: PhantomData,
7860        }
7861    }
7862}
7863
7864impl<St, S: BosStr> LogLockConvoBuilder<St, S>
7865where
7866    St: log_lock_convo_state::State,
7867    St::Message: log_lock_convo_state::IsUnset,
7868{
7869    /// Set the `message` field (required)
7870    pub fn message(
7871        mut self,
7872        value: impl Into<convo::SystemMessageView<S>>,
7873    ) -> LogLockConvoBuilder<log_lock_convo_state::SetMessage<St>, S> {
7874        self._fields.1 = Option::Some(value.into());
7875        LogLockConvoBuilder {
7876            _state: PhantomData,
7877            _fields: self._fields,
7878            _type: PhantomData,
7879        }
7880    }
7881}
7882
7883impl<St, S: BosStr> LogLockConvoBuilder<St, S>
7884where
7885    St: log_lock_convo_state::State,
7886    St::RelatedProfiles: log_lock_convo_state::IsUnset,
7887{
7888    /// Set the `relatedProfiles` field (required)
7889    pub fn related_profiles(
7890        mut self,
7891        value: impl Into<Vec<ProfileViewBasic<S>>>,
7892    ) -> LogLockConvoBuilder<log_lock_convo_state::SetRelatedProfiles<St>, S> {
7893        self._fields.2 = Option::Some(value.into());
7894        LogLockConvoBuilder {
7895            _state: PhantomData,
7896            _fields: self._fields,
7897            _type: PhantomData,
7898        }
7899    }
7900}
7901
7902impl<St, S: BosStr> LogLockConvoBuilder<St, S>
7903where
7904    St: log_lock_convo_state::State,
7905    St::Rev: log_lock_convo_state::IsUnset,
7906{
7907    /// Set the `rev` field (required)
7908    pub fn rev(
7909        mut self,
7910        value: impl Into<S>,
7911    ) -> LogLockConvoBuilder<log_lock_convo_state::SetRev<St>, S> {
7912        self._fields.3 = Option::Some(value.into());
7913        LogLockConvoBuilder {
7914            _state: PhantomData,
7915            _fields: self._fields,
7916            _type: PhantomData,
7917        }
7918    }
7919}
7920
7921impl<St, S: BosStr> LogLockConvoBuilder<St, S>
7922where
7923    St: log_lock_convo_state::State,
7924    St::ConvoId: log_lock_convo_state::IsSet,
7925    St::Message: log_lock_convo_state::IsSet,
7926    St::RelatedProfiles: log_lock_convo_state::IsSet,
7927    St::Rev: log_lock_convo_state::IsSet,
7928{
7929    /// Build the final struct.
7930    pub fn build(self) -> LogLockConvo<S> {
7931        LogLockConvo {
7932            convo_id: self._fields.0.unwrap(),
7933            message: self._fields.1.unwrap(),
7934            related_profiles: self._fields.2.unwrap(),
7935            rev: self._fields.3.unwrap(),
7936            extra_data: Default::default(),
7937        }
7938    }
7939    /// Build the final struct with custom extra_data.
7940    pub fn build_with_data(
7941        self,
7942        extra_data: BTreeMap<SmolStr, Data<S>>,
7943    ) -> LogLockConvo<S> {
7944        LogLockConvo {
7945            convo_id: self._fields.0.unwrap(),
7946            message: self._fields.1.unwrap(),
7947            related_profiles: self._fields.2.unwrap(),
7948            rev: self._fields.3.unwrap(),
7949            extra_data: Some(extra_data),
7950        }
7951    }
7952}
7953
7954pub mod log_lock_convo_permanently_state {
7955
7956    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
7957    #[allow(unused)]
7958    use ::core::marker::PhantomData;
7959    mod sealed {
7960        pub trait Sealed {}
7961    }
7962    /// State trait tracking which required fields have been set
7963    pub trait State: sealed::Sealed {
7964        type ConvoId;
7965        type Message;
7966        type RelatedProfiles;
7967        type Rev;
7968    }
7969    /// Empty state - all required fields are unset
7970    pub struct Empty(());
7971    impl sealed::Sealed for Empty {}
7972    impl State for Empty {
7973        type ConvoId = Unset;
7974        type Message = Unset;
7975        type RelatedProfiles = Unset;
7976        type Rev = Unset;
7977    }
7978    ///State transition - sets the `convo_id` field to Set
7979    pub struct SetConvoId<St: State = Empty>(PhantomData<fn() -> St>);
7980    impl<St: State> sealed::Sealed for SetConvoId<St> {}
7981    impl<St: State> State for SetConvoId<St> {
7982        type ConvoId = Set<members::convo_id>;
7983        type Message = St::Message;
7984        type RelatedProfiles = St::RelatedProfiles;
7985        type Rev = St::Rev;
7986    }
7987    ///State transition - sets the `message` field to Set
7988    pub struct SetMessage<St: State = Empty>(PhantomData<fn() -> St>);
7989    impl<St: State> sealed::Sealed for SetMessage<St> {}
7990    impl<St: State> State for SetMessage<St> {
7991        type ConvoId = St::ConvoId;
7992        type Message = Set<members::message>;
7993        type RelatedProfiles = St::RelatedProfiles;
7994        type Rev = St::Rev;
7995    }
7996    ///State transition - sets the `related_profiles` field to Set
7997    pub struct SetRelatedProfiles<St: State = Empty>(PhantomData<fn() -> St>);
7998    impl<St: State> sealed::Sealed for SetRelatedProfiles<St> {}
7999    impl<St: State> State for SetRelatedProfiles<St> {
8000        type ConvoId = St::ConvoId;
8001        type Message = St::Message;
8002        type RelatedProfiles = Set<members::related_profiles>;
8003        type Rev = St::Rev;
8004    }
8005    ///State transition - sets the `rev` field to Set
8006    pub struct SetRev<St: State = Empty>(PhantomData<fn() -> St>);
8007    impl<St: State> sealed::Sealed for SetRev<St> {}
8008    impl<St: State> State for SetRev<St> {
8009        type ConvoId = St::ConvoId;
8010        type Message = St::Message;
8011        type RelatedProfiles = St::RelatedProfiles;
8012        type Rev = Set<members::rev>;
8013    }
8014    /// Marker types for field names
8015    #[allow(non_camel_case_types)]
8016    pub mod members {
8017        ///Marker type for the `convo_id` field
8018        pub struct convo_id(());
8019        ///Marker type for the `message` field
8020        pub struct message(());
8021        ///Marker type for the `related_profiles` field
8022        pub struct related_profiles(());
8023        ///Marker type for the `rev` field
8024        pub struct rev(());
8025    }
8026}
8027
8028/// Builder for constructing an instance of this type.
8029pub struct LogLockConvoPermanentlyBuilder<
8030    St: log_lock_convo_permanently_state::State,
8031    S: BosStr = DefaultStr,
8032> {
8033    _state: PhantomData<fn() -> St>,
8034    _fields: (
8035        Option<S>,
8036        Option<convo::SystemMessageView<S>>,
8037        Option<Vec<ProfileViewBasic<S>>>,
8038        Option<S>,
8039    ),
8040    _type: PhantomData<fn() -> S>,
8041}
8042
8043impl LogLockConvoPermanently<DefaultStr> {
8044    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
8045    pub fn new() -> LogLockConvoPermanentlyBuilder<
8046        log_lock_convo_permanently_state::Empty,
8047        DefaultStr,
8048    > {
8049        LogLockConvoPermanentlyBuilder::new()
8050    }
8051}
8052
8053impl<S: BosStr> LogLockConvoPermanently<S> {
8054    /// Create a new builder for this type
8055    pub fn builder() -> LogLockConvoPermanentlyBuilder<
8056        log_lock_convo_permanently_state::Empty,
8057        S,
8058    > {
8059        LogLockConvoPermanentlyBuilder::builder()
8060    }
8061}
8062
8063impl LogLockConvoPermanentlyBuilder<
8064    log_lock_convo_permanently_state::Empty,
8065    DefaultStr,
8066> {
8067    /// Create a new builder with all fields unset, using the default string type, if needed
8068    pub fn new() -> Self {
8069        LogLockConvoPermanentlyBuilder {
8070            _state: PhantomData,
8071            _fields: (None, None, None, None),
8072            _type: PhantomData,
8073        }
8074    }
8075}
8076
8077impl<
8078    S: BosStr,
8079> LogLockConvoPermanentlyBuilder<log_lock_convo_permanently_state::Empty, S> {
8080    /// Create a new builder with all fields unset
8081    pub fn builder() -> Self {
8082        LogLockConvoPermanentlyBuilder {
8083            _state: PhantomData,
8084            _fields: (None, None, None, None),
8085            _type: PhantomData,
8086        }
8087    }
8088}
8089
8090impl<St, S: BosStr> LogLockConvoPermanentlyBuilder<St, S>
8091where
8092    St: log_lock_convo_permanently_state::State,
8093    St::ConvoId: log_lock_convo_permanently_state::IsUnset,
8094{
8095    /// Set the `convoId` field (required)
8096    pub fn convo_id(
8097        mut self,
8098        value: impl Into<S>,
8099    ) -> LogLockConvoPermanentlyBuilder<
8100        log_lock_convo_permanently_state::SetConvoId<St>,
8101        S,
8102    > {
8103        self._fields.0 = Option::Some(value.into());
8104        LogLockConvoPermanentlyBuilder {
8105            _state: PhantomData,
8106            _fields: self._fields,
8107            _type: PhantomData,
8108        }
8109    }
8110}
8111
8112impl<St, S: BosStr> LogLockConvoPermanentlyBuilder<St, S>
8113where
8114    St: log_lock_convo_permanently_state::State,
8115    St::Message: log_lock_convo_permanently_state::IsUnset,
8116{
8117    /// Set the `message` field (required)
8118    pub fn message(
8119        mut self,
8120        value: impl Into<convo::SystemMessageView<S>>,
8121    ) -> LogLockConvoPermanentlyBuilder<
8122        log_lock_convo_permanently_state::SetMessage<St>,
8123        S,
8124    > {
8125        self._fields.1 = Option::Some(value.into());
8126        LogLockConvoPermanentlyBuilder {
8127            _state: PhantomData,
8128            _fields: self._fields,
8129            _type: PhantomData,
8130        }
8131    }
8132}
8133
8134impl<St, S: BosStr> LogLockConvoPermanentlyBuilder<St, S>
8135where
8136    St: log_lock_convo_permanently_state::State,
8137    St::RelatedProfiles: log_lock_convo_permanently_state::IsUnset,
8138{
8139    /// Set the `relatedProfiles` field (required)
8140    pub fn related_profiles(
8141        mut self,
8142        value: impl Into<Vec<ProfileViewBasic<S>>>,
8143    ) -> LogLockConvoPermanentlyBuilder<
8144        log_lock_convo_permanently_state::SetRelatedProfiles<St>,
8145        S,
8146    > {
8147        self._fields.2 = Option::Some(value.into());
8148        LogLockConvoPermanentlyBuilder {
8149            _state: PhantomData,
8150            _fields: self._fields,
8151            _type: PhantomData,
8152        }
8153    }
8154}
8155
8156impl<St, S: BosStr> LogLockConvoPermanentlyBuilder<St, S>
8157where
8158    St: log_lock_convo_permanently_state::State,
8159    St::Rev: log_lock_convo_permanently_state::IsUnset,
8160{
8161    /// Set the `rev` field (required)
8162    pub fn rev(
8163        mut self,
8164        value: impl Into<S>,
8165    ) -> LogLockConvoPermanentlyBuilder<
8166        log_lock_convo_permanently_state::SetRev<St>,
8167        S,
8168    > {
8169        self._fields.3 = Option::Some(value.into());
8170        LogLockConvoPermanentlyBuilder {
8171            _state: PhantomData,
8172            _fields: self._fields,
8173            _type: PhantomData,
8174        }
8175    }
8176}
8177
8178impl<St, S: BosStr> LogLockConvoPermanentlyBuilder<St, S>
8179where
8180    St: log_lock_convo_permanently_state::State,
8181    St::ConvoId: log_lock_convo_permanently_state::IsSet,
8182    St::Message: log_lock_convo_permanently_state::IsSet,
8183    St::RelatedProfiles: log_lock_convo_permanently_state::IsSet,
8184    St::Rev: log_lock_convo_permanently_state::IsSet,
8185{
8186    /// Build the final struct.
8187    pub fn build(self) -> LogLockConvoPermanently<S> {
8188        LogLockConvoPermanently {
8189            convo_id: self._fields.0.unwrap(),
8190            message: self._fields.1.unwrap(),
8191            related_profiles: self._fields.2.unwrap(),
8192            rev: self._fields.3.unwrap(),
8193            extra_data: Default::default(),
8194        }
8195    }
8196    /// Build the final struct with custom extra_data.
8197    pub fn build_with_data(
8198        self,
8199        extra_data: BTreeMap<SmolStr, Data<S>>,
8200    ) -> LogLockConvoPermanently<S> {
8201        LogLockConvoPermanently {
8202            convo_id: self._fields.0.unwrap(),
8203            message: self._fields.1.unwrap(),
8204            related_profiles: self._fields.2.unwrap(),
8205            rev: self._fields.3.unwrap(),
8206            extra_data: Some(extra_data),
8207        }
8208    }
8209}
8210
8211pub mod log_member_join_state {
8212
8213    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
8214    #[allow(unused)]
8215    use ::core::marker::PhantomData;
8216    mod sealed {
8217        pub trait Sealed {}
8218    }
8219    /// State trait tracking which required fields have been set
8220    pub trait State: sealed::Sealed {
8221        type ConvoId;
8222        type Message;
8223        type RelatedProfiles;
8224        type Rev;
8225    }
8226    /// Empty state - all required fields are unset
8227    pub struct Empty(());
8228    impl sealed::Sealed for Empty {}
8229    impl State for Empty {
8230        type ConvoId = Unset;
8231        type Message = Unset;
8232        type RelatedProfiles = Unset;
8233        type Rev = Unset;
8234    }
8235    ///State transition - sets the `convo_id` field to Set
8236    pub struct SetConvoId<St: State = Empty>(PhantomData<fn() -> St>);
8237    impl<St: State> sealed::Sealed for SetConvoId<St> {}
8238    impl<St: State> State for SetConvoId<St> {
8239        type ConvoId = Set<members::convo_id>;
8240        type Message = St::Message;
8241        type RelatedProfiles = St::RelatedProfiles;
8242        type Rev = St::Rev;
8243    }
8244    ///State transition - sets the `message` field to Set
8245    pub struct SetMessage<St: State = Empty>(PhantomData<fn() -> St>);
8246    impl<St: State> sealed::Sealed for SetMessage<St> {}
8247    impl<St: State> State for SetMessage<St> {
8248        type ConvoId = St::ConvoId;
8249        type Message = Set<members::message>;
8250        type RelatedProfiles = St::RelatedProfiles;
8251        type Rev = St::Rev;
8252    }
8253    ///State transition - sets the `related_profiles` field to Set
8254    pub struct SetRelatedProfiles<St: State = Empty>(PhantomData<fn() -> St>);
8255    impl<St: State> sealed::Sealed for SetRelatedProfiles<St> {}
8256    impl<St: State> State for SetRelatedProfiles<St> {
8257        type ConvoId = St::ConvoId;
8258        type Message = St::Message;
8259        type RelatedProfiles = Set<members::related_profiles>;
8260        type Rev = St::Rev;
8261    }
8262    ///State transition - sets the `rev` field to Set
8263    pub struct SetRev<St: State = Empty>(PhantomData<fn() -> St>);
8264    impl<St: State> sealed::Sealed for SetRev<St> {}
8265    impl<St: State> State for SetRev<St> {
8266        type ConvoId = St::ConvoId;
8267        type Message = St::Message;
8268        type RelatedProfiles = St::RelatedProfiles;
8269        type Rev = Set<members::rev>;
8270    }
8271    /// Marker types for field names
8272    #[allow(non_camel_case_types)]
8273    pub mod members {
8274        ///Marker type for the `convo_id` field
8275        pub struct convo_id(());
8276        ///Marker type for the `message` field
8277        pub struct message(());
8278        ///Marker type for the `related_profiles` field
8279        pub struct related_profiles(());
8280        ///Marker type for the `rev` field
8281        pub struct rev(());
8282    }
8283}
8284
8285/// Builder for constructing an instance of this type.
8286pub struct LogMemberJoinBuilder<
8287    St: log_member_join_state::State,
8288    S: BosStr = DefaultStr,
8289> {
8290    _state: PhantomData<fn() -> St>,
8291    _fields: (
8292        Option<S>,
8293        Option<convo::SystemMessageView<S>>,
8294        Option<Vec<ProfileViewBasic<S>>>,
8295        Option<S>,
8296    ),
8297    _type: PhantomData<fn() -> S>,
8298}
8299
8300impl LogMemberJoin<DefaultStr> {
8301    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
8302    pub fn new() -> LogMemberJoinBuilder<log_member_join_state::Empty, DefaultStr> {
8303        LogMemberJoinBuilder::new()
8304    }
8305}
8306
8307impl<S: BosStr> LogMemberJoin<S> {
8308    /// Create a new builder for this type
8309    pub fn builder() -> LogMemberJoinBuilder<log_member_join_state::Empty, S> {
8310        LogMemberJoinBuilder::builder()
8311    }
8312}
8313
8314impl LogMemberJoinBuilder<log_member_join_state::Empty, DefaultStr> {
8315    /// Create a new builder with all fields unset, using the default string type, if needed
8316    pub fn new() -> Self {
8317        LogMemberJoinBuilder {
8318            _state: PhantomData,
8319            _fields: (None, None, None, None),
8320            _type: PhantomData,
8321        }
8322    }
8323}
8324
8325impl<S: BosStr> LogMemberJoinBuilder<log_member_join_state::Empty, S> {
8326    /// Create a new builder with all fields unset
8327    pub fn builder() -> Self {
8328        LogMemberJoinBuilder {
8329            _state: PhantomData,
8330            _fields: (None, None, None, None),
8331            _type: PhantomData,
8332        }
8333    }
8334}
8335
8336impl<St, S: BosStr> LogMemberJoinBuilder<St, S>
8337where
8338    St: log_member_join_state::State,
8339    St::ConvoId: log_member_join_state::IsUnset,
8340{
8341    /// Set the `convoId` field (required)
8342    pub fn convo_id(
8343        mut self,
8344        value: impl Into<S>,
8345    ) -> LogMemberJoinBuilder<log_member_join_state::SetConvoId<St>, S> {
8346        self._fields.0 = Option::Some(value.into());
8347        LogMemberJoinBuilder {
8348            _state: PhantomData,
8349            _fields: self._fields,
8350            _type: PhantomData,
8351        }
8352    }
8353}
8354
8355impl<St, S: BosStr> LogMemberJoinBuilder<St, S>
8356where
8357    St: log_member_join_state::State,
8358    St::Message: log_member_join_state::IsUnset,
8359{
8360    /// Set the `message` field (required)
8361    pub fn message(
8362        mut self,
8363        value: impl Into<convo::SystemMessageView<S>>,
8364    ) -> LogMemberJoinBuilder<log_member_join_state::SetMessage<St>, S> {
8365        self._fields.1 = Option::Some(value.into());
8366        LogMemberJoinBuilder {
8367            _state: PhantomData,
8368            _fields: self._fields,
8369            _type: PhantomData,
8370        }
8371    }
8372}
8373
8374impl<St, S: BosStr> LogMemberJoinBuilder<St, S>
8375where
8376    St: log_member_join_state::State,
8377    St::RelatedProfiles: log_member_join_state::IsUnset,
8378{
8379    /// Set the `relatedProfiles` field (required)
8380    pub fn related_profiles(
8381        mut self,
8382        value: impl Into<Vec<ProfileViewBasic<S>>>,
8383    ) -> LogMemberJoinBuilder<log_member_join_state::SetRelatedProfiles<St>, S> {
8384        self._fields.2 = Option::Some(value.into());
8385        LogMemberJoinBuilder {
8386            _state: PhantomData,
8387            _fields: self._fields,
8388            _type: PhantomData,
8389        }
8390    }
8391}
8392
8393impl<St, S: BosStr> LogMemberJoinBuilder<St, S>
8394where
8395    St: log_member_join_state::State,
8396    St::Rev: log_member_join_state::IsUnset,
8397{
8398    /// Set the `rev` field (required)
8399    pub fn rev(
8400        mut self,
8401        value: impl Into<S>,
8402    ) -> LogMemberJoinBuilder<log_member_join_state::SetRev<St>, S> {
8403        self._fields.3 = Option::Some(value.into());
8404        LogMemberJoinBuilder {
8405            _state: PhantomData,
8406            _fields: self._fields,
8407            _type: PhantomData,
8408        }
8409    }
8410}
8411
8412impl<St, S: BosStr> LogMemberJoinBuilder<St, S>
8413where
8414    St: log_member_join_state::State,
8415    St::ConvoId: log_member_join_state::IsSet,
8416    St::Message: log_member_join_state::IsSet,
8417    St::RelatedProfiles: log_member_join_state::IsSet,
8418    St::Rev: log_member_join_state::IsSet,
8419{
8420    /// Build the final struct.
8421    pub fn build(self) -> LogMemberJoin<S> {
8422        LogMemberJoin {
8423            convo_id: self._fields.0.unwrap(),
8424            message: self._fields.1.unwrap(),
8425            related_profiles: self._fields.2.unwrap(),
8426            rev: self._fields.3.unwrap(),
8427            extra_data: Default::default(),
8428        }
8429    }
8430    /// Build the final struct with custom extra_data.
8431    pub fn build_with_data(
8432        self,
8433        extra_data: BTreeMap<SmolStr, Data<S>>,
8434    ) -> LogMemberJoin<S> {
8435        LogMemberJoin {
8436            convo_id: self._fields.0.unwrap(),
8437            message: self._fields.1.unwrap(),
8438            related_profiles: self._fields.2.unwrap(),
8439            rev: self._fields.3.unwrap(),
8440            extra_data: Some(extra_data),
8441        }
8442    }
8443}
8444
8445pub mod log_member_leave_state {
8446
8447    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
8448    #[allow(unused)]
8449    use ::core::marker::PhantomData;
8450    mod sealed {
8451        pub trait Sealed {}
8452    }
8453    /// State trait tracking which required fields have been set
8454    pub trait State: sealed::Sealed {
8455        type ConvoId;
8456        type Message;
8457        type RelatedProfiles;
8458        type Rev;
8459    }
8460    /// Empty state - all required fields are unset
8461    pub struct Empty(());
8462    impl sealed::Sealed for Empty {}
8463    impl State for Empty {
8464        type ConvoId = Unset;
8465        type Message = Unset;
8466        type RelatedProfiles = Unset;
8467        type Rev = Unset;
8468    }
8469    ///State transition - sets the `convo_id` field to Set
8470    pub struct SetConvoId<St: State = Empty>(PhantomData<fn() -> St>);
8471    impl<St: State> sealed::Sealed for SetConvoId<St> {}
8472    impl<St: State> State for SetConvoId<St> {
8473        type ConvoId = Set<members::convo_id>;
8474        type Message = St::Message;
8475        type RelatedProfiles = St::RelatedProfiles;
8476        type Rev = St::Rev;
8477    }
8478    ///State transition - sets the `message` field to Set
8479    pub struct SetMessage<St: State = Empty>(PhantomData<fn() -> St>);
8480    impl<St: State> sealed::Sealed for SetMessage<St> {}
8481    impl<St: State> State for SetMessage<St> {
8482        type ConvoId = St::ConvoId;
8483        type Message = Set<members::message>;
8484        type RelatedProfiles = St::RelatedProfiles;
8485        type Rev = St::Rev;
8486    }
8487    ///State transition - sets the `related_profiles` field to Set
8488    pub struct SetRelatedProfiles<St: State = Empty>(PhantomData<fn() -> St>);
8489    impl<St: State> sealed::Sealed for SetRelatedProfiles<St> {}
8490    impl<St: State> State for SetRelatedProfiles<St> {
8491        type ConvoId = St::ConvoId;
8492        type Message = St::Message;
8493        type RelatedProfiles = Set<members::related_profiles>;
8494        type Rev = St::Rev;
8495    }
8496    ///State transition - sets the `rev` field to Set
8497    pub struct SetRev<St: State = Empty>(PhantomData<fn() -> St>);
8498    impl<St: State> sealed::Sealed for SetRev<St> {}
8499    impl<St: State> State for SetRev<St> {
8500        type ConvoId = St::ConvoId;
8501        type Message = St::Message;
8502        type RelatedProfiles = St::RelatedProfiles;
8503        type Rev = Set<members::rev>;
8504    }
8505    /// Marker types for field names
8506    #[allow(non_camel_case_types)]
8507    pub mod members {
8508        ///Marker type for the `convo_id` field
8509        pub struct convo_id(());
8510        ///Marker type for the `message` field
8511        pub struct message(());
8512        ///Marker type for the `related_profiles` field
8513        pub struct related_profiles(());
8514        ///Marker type for the `rev` field
8515        pub struct rev(());
8516    }
8517}
8518
8519/// Builder for constructing an instance of this type.
8520pub struct LogMemberLeaveBuilder<
8521    St: log_member_leave_state::State,
8522    S: BosStr = DefaultStr,
8523> {
8524    _state: PhantomData<fn() -> St>,
8525    _fields: (
8526        Option<S>,
8527        Option<convo::SystemMessageView<S>>,
8528        Option<Vec<ProfileViewBasic<S>>>,
8529        Option<S>,
8530    ),
8531    _type: PhantomData<fn() -> S>,
8532}
8533
8534impl LogMemberLeave<DefaultStr> {
8535    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
8536    pub fn new() -> LogMemberLeaveBuilder<log_member_leave_state::Empty, DefaultStr> {
8537        LogMemberLeaveBuilder::new()
8538    }
8539}
8540
8541impl<S: BosStr> LogMemberLeave<S> {
8542    /// Create a new builder for this type
8543    pub fn builder() -> LogMemberLeaveBuilder<log_member_leave_state::Empty, S> {
8544        LogMemberLeaveBuilder::builder()
8545    }
8546}
8547
8548impl LogMemberLeaveBuilder<log_member_leave_state::Empty, DefaultStr> {
8549    /// Create a new builder with all fields unset, using the default string type, if needed
8550    pub fn new() -> Self {
8551        LogMemberLeaveBuilder {
8552            _state: PhantomData,
8553            _fields: (None, None, None, None),
8554            _type: PhantomData,
8555        }
8556    }
8557}
8558
8559impl<S: BosStr> LogMemberLeaveBuilder<log_member_leave_state::Empty, S> {
8560    /// Create a new builder with all fields unset
8561    pub fn builder() -> Self {
8562        LogMemberLeaveBuilder {
8563            _state: PhantomData,
8564            _fields: (None, None, None, None),
8565            _type: PhantomData,
8566        }
8567    }
8568}
8569
8570impl<St, S: BosStr> LogMemberLeaveBuilder<St, S>
8571where
8572    St: log_member_leave_state::State,
8573    St::ConvoId: log_member_leave_state::IsUnset,
8574{
8575    /// Set the `convoId` field (required)
8576    pub fn convo_id(
8577        mut self,
8578        value: impl Into<S>,
8579    ) -> LogMemberLeaveBuilder<log_member_leave_state::SetConvoId<St>, S> {
8580        self._fields.0 = Option::Some(value.into());
8581        LogMemberLeaveBuilder {
8582            _state: PhantomData,
8583            _fields: self._fields,
8584            _type: PhantomData,
8585        }
8586    }
8587}
8588
8589impl<St, S: BosStr> LogMemberLeaveBuilder<St, S>
8590where
8591    St: log_member_leave_state::State,
8592    St::Message: log_member_leave_state::IsUnset,
8593{
8594    /// Set the `message` field (required)
8595    pub fn message(
8596        mut self,
8597        value: impl Into<convo::SystemMessageView<S>>,
8598    ) -> LogMemberLeaveBuilder<log_member_leave_state::SetMessage<St>, S> {
8599        self._fields.1 = Option::Some(value.into());
8600        LogMemberLeaveBuilder {
8601            _state: PhantomData,
8602            _fields: self._fields,
8603            _type: PhantomData,
8604        }
8605    }
8606}
8607
8608impl<St, S: BosStr> LogMemberLeaveBuilder<St, S>
8609where
8610    St: log_member_leave_state::State,
8611    St::RelatedProfiles: log_member_leave_state::IsUnset,
8612{
8613    /// Set the `relatedProfiles` field (required)
8614    pub fn related_profiles(
8615        mut self,
8616        value: impl Into<Vec<ProfileViewBasic<S>>>,
8617    ) -> LogMemberLeaveBuilder<log_member_leave_state::SetRelatedProfiles<St>, S> {
8618        self._fields.2 = Option::Some(value.into());
8619        LogMemberLeaveBuilder {
8620            _state: PhantomData,
8621            _fields: self._fields,
8622            _type: PhantomData,
8623        }
8624    }
8625}
8626
8627impl<St, S: BosStr> LogMemberLeaveBuilder<St, S>
8628where
8629    St: log_member_leave_state::State,
8630    St::Rev: log_member_leave_state::IsUnset,
8631{
8632    /// Set the `rev` field (required)
8633    pub fn rev(
8634        mut self,
8635        value: impl Into<S>,
8636    ) -> LogMemberLeaveBuilder<log_member_leave_state::SetRev<St>, S> {
8637        self._fields.3 = Option::Some(value.into());
8638        LogMemberLeaveBuilder {
8639            _state: PhantomData,
8640            _fields: self._fields,
8641            _type: PhantomData,
8642        }
8643    }
8644}
8645
8646impl<St, S: BosStr> LogMemberLeaveBuilder<St, S>
8647where
8648    St: log_member_leave_state::State,
8649    St::ConvoId: log_member_leave_state::IsSet,
8650    St::Message: log_member_leave_state::IsSet,
8651    St::RelatedProfiles: log_member_leave_state::IsSet,
8652    St::Rev: log_member_leave_state::IsSet,
8653{
8654    /// Build the final struct.
8655    pub fn build(self) -> LogMemberLeave<S> {
8656        LogMemberLeave {
8657            convo_id: self._fields.0.unwrap(),
8658            message: self._fields.1.unwrap(),
8659            related_profiles: self._fields.2.unwrap(),
8660            rev: self._fields.3.unwrap(),
8661            extra_data: Default::default(),
8662        }
8663    }
8664    /// Build the final struct with custom extra_data.
8665    pub fn build_with_data(
8666        self,
8667        extra_data: BTreeMap<SmolStr, Data<S>>,
8668    ) -> LogMemberLeave<S> {
8669        LogMemberLeave {
8670            convo_id: self._fields.0.unwrap(),
8671            message: self._fields.1.unwrap(),
8672            related_profiles: self._fields.2.unwrap(),
8673            rev: self._fields.3.unwrap(),
8674            extra_data: Some(extra_data),
8675        }
8676    }
8677}
8678
8679pub mod log_read_convo_state {
8680
8681    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
8682    #[allow(unused)]
8683    use ::core::marker::PhantomData;
8684    mod sealed {
8685        pub trait Sealed {}
8686    }
8687    /// State trait tracking which required fields have been set
8688    pub trait State: sealed::Sealed {
8689        type ConvoId;
8690        type Message;
8691        type Rev;
8692    }
8693    /// Empty state - all required fields are unset
8694    pub struct Empty(());
8695    impl sealed::Sealed for Empty {}
8696    impl State for Empty {
8697        type ConvoId = Unset;
8698        type Message = Unset;
8699        type Rev = Unset;
8700    }
8701    ///State transition - sets the `convo_id` field to Set
8702    pub struct SetConvoId<St: State = Empty>(PhantomData<fn() -> St>);
8703    impl<St: State> sealed::Sealed for SetConvoId<St> {}
8704    impl<St: State> State for SetConvoId<St> {
8705        type ConvoId = Set<members::convo_id>;
8706        type Message = St::Message;
8707        type Rev = St::Rev;
8708    }
8709    ///State transition - sets the `message` field to Set
8710    pub struct SetMessage<St: State = Empty>(PhantomData<fn() -> St>);
8711    impl<St: State> sealed::Sealed for SetMessage<St> {}
8712    impl<St: State> State for SetMessage<St> {
8713        type ConvoId = St::ConvoId;
8714        type Message = Set<members::message>;
8715        type Rev = St::Rev;
8716    }
8717    ///State transition - sets the `rev` field to Set
8718    pub struct SetRev<St: State = Empty>(PhantomData<fn() -> St>);
8719    impl<St: State> sealed::Sealed for SetRev<St> {}
8720    impl<St: State> State for SetRev<St> {
8721        type ConvoId = St::ConvoId;
8722        type Message = St::Message;
8723        type Rev = Set<members::rev>;
8724    }
8725    /// Marker types for field names
8726    #[allow(non_camel_case_types)]
8727    pub mod members {
8728        ///Marker type for the `convo_id` field
8729        pub struct convo_id(());
8730        ///Marker type for the `message` field
8731        pub struct message(());
8732        ///Marker type for the `rev` field
8733        pub struct rev(());
8734    }
8735}
8736
8737/// Builder for constructing an instance of this type.
8738pub struct LogReadConvoBuilder<St: log_read_convo_state::State, S: BosStr = DefaultStr> {
8739    _state: PhantomData<fn() -> St>,
8740    _fields: (Option<S>, Option<LogReadConvoMessage<S>>, Option<S>),
8741    _type: PhantomData<fn() -> S>,
8742}
8743
8744impl LogReadConvo<DefaultStr> {
8745    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
8746    pub fn new() -> LogReadConvoBuilder<log_read_convo_state::Empty, DefaultStr> {
8747        LogReadConvoBuilder::new()
8748    }
8749}
8750
8751impl<S: BosStr> LogReadConvo<S> {
8752    /// Create a new builder for this type
8753    pub fn builder() -> LogReadConvoBuilder<log_read_convo_state::Empty, S> {
8754        LogReadConvoBuilder::builder()
8755    }
8756}
8757
8758impl LogReadConvoBuilder<log_read_convo_state::Empty, DefaultStr> {
8759    /// Create a new builder with all fields unset, using the default string type, if needed
8760    pub fn new() -> Self {
8761        LogReadConvoBuilder {
8762            _state: PhantomData,
8763            _fields: (None, None, None),
8764            _type: PhantomData,
8765        }
8766    }
8767}
8768
8769impl<S: BosStr> LogReadConvoBuilder<log_read_convo_state::Empty, S> {
8770    /// Create a new builder with all fields unset
8771    pub fn builder() -> Self {
8772        LogReadConvoBuilder {
8773            _state: PhantomData,
8774            _fields: (None, None, None),
8775            _type: PhantomData,
8776        }
8777    }
8778}
8779
8780impl<St, S: BosStr> LogReadConvoBuilder<St, S>
8781where
8782    St: log_read_convo_state::State,
8783    St::ConvoId: log_read_convo_state::IsUnset,
8784{
8785    /// Set the `convoId` field (required)
8786    pub fn convo_id(
8787        mut self,
8788        value: impl Into<S>,
8789    ) -> LogReadConvoBuilder<log_read_convo_state::SetConvoId<St>, S> {
8790        self._fields.0 = Option::Some(value.into());
8791        LogReadConvoBuilder {
8792            _state: PhantomData,
8793            _fields: self._fields,
8794            _type: PhantomData,
8795        }
8796    }
8797}
8798
8799impl<St, S: BosStr> LogReadConvoBuilder<St, S>
8800where
8801    St: log_read_convo_state::State,
8802    St::Message: log_read_convo_state::IsUnset,
8803{
8804    /// Set the `message` field (required)
8805    pub fn message(
8806        mut self,
8807        value: impl Into<LogReadConvoMessage<S>>,
8808    ) -> LogReadConvoBuilder<log_read_convo_state::SetMessage<St>, S> {
8809        self._fields.1 = Option::Some(value.into());
8810        LogReadConvoBuilder {
8811            _state: PhantomData,
8812            _fields: self._fields,
8813            _type: PhantomData,
8814        }
8815    }
8816}
8817
8818impl<St, S: BosStr> LogReadConvoBuilder<St, S>
8819where
8820    St: log_read_convo_state::State,
8821    St::Rev: log_read_convo_state::IsUnset,
8822{
8823    /// Set the `rev` field (required)
8824    pub fn rev(
8825        mut self,
8826        value: impl Into<S>,
8827    ) -> LogReadConvoBuilder<log_read_convo_state::SetRev<St>, S> {
8828        self._fields.2 = Option::Some(value.into());
8829        LogReadConvoBuilder {
8830            _state: PhantomData,
8831            _fields: self._fields,
8832            _type: PhantomData,
8833        }
8834    }
8835}
8836
8837impl<St, S: BosStr> LogReadConvoBuilder<St, S>
8838where
8839    St: log_read_convo_state::State,
8840    St::ConvoId: log_read_convo_state::IsSet,
8841    St::Message: log_read_convo_state::IsSet,
8842    St::Rev: log_read_convo_state::IsSet,
8843{
8844    /// Build the final struct.
8845    pub fn build(self) -> LogReadConvo<S> {
8846        LogReadConvo {
8847            convo_id: self._fields.0.unwrap(),
8848            message: self._fields.1.unwrap(),
8849            rev: self._fields.2.unwrap(),
8850            extra_data: Default::default(),
8851        }
8852    }
8853    /// Build the final struct with custom extra_data.
8854    pub fn build_with_data(
8855        self,
8856        extra_data: BTreeMap<SmolStr, Data<S>>,
8857    ) -> LogReadConvo<S> {
8858        LogReadConvo {
8859            convo_id: self._fields.0.unwrap(),
8860            message: self._fields.1.unwrap(),
8861            rev: self._fields.2.unwrap(),
8862            extra_data: Some(extra_data),
8863        }
8864    }
8865}
8866
8867pub mod log_read_message_state {
8868
8869    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
8870    #[allow(unused)]
8871    use ::core::marker::PhantomData;
8872    mod sealed {
8873        pub trait Sealed {}
8874    }
8875    /// State trait tracking which required fields have been set
8876    pub trait State: sealed::Sealed {
8877        type ConvoId;
8878        type Message;
8879        type Rev;
8880    }
8881    /// Empty state - all required fields are unset
8882    pub struct Empty(());
8883    impl sealed::Sealed for Empty {}
8884    impl State for Empty {
8885        type ConvoId = Unset;
8886        type Message = Unset;
8887        type Rev = Unset;
8888    }
8889    ///State transition - sets the `convo_id` field to Set
8890    pub struct SetConvoId<St: State = Empty>(PhantomData<fn() -> St>);
8891    impl<St: State> sealed::Sealed for SetConvoId<St> {}
8892    impl<St: State> State for SetConvoId<St> {
8893        type ConvoId = Set<members::convo_id>;
8894        type Message = St::Message;
8895        type Rev = St::Rev;
8896    }
8897    ///State transition - sets the `message` field to Set
8898    pub struct SetMessage<St: State = Empty>(PhantomData<fn() -> St>);
8899    impl<St: State> sealed::Sealed for SetMessage<St> {}
8900    impl<St: State> State for SetMessage<St> {
8901        type ConvoId = St::ConvoId;
8902        type Message = Set<members::message>;
8903        type Rev = St::Rev;
8904    }
8905    ///State transition - sets the `rev` field to Set
8906    pub struct SetRev<St: State = Empty>(PhantomData<fn() -> St>);
8907    impl<St: State> sealed::Sealed for SetRev<St> {}
8908    impl<St: State> State for SetRev<St> {
8909        type ConvoId = St::ConvoId;
8910        type Message = St::Message;
8911        type Rev = Set<members::rev>;
8912    }
8913    /// Marker types for field names
8914    #[allow(non_camel_case_types)]
8915    pub mod members {
8916        ///Marker type for the `convo_id` field
8917        pub struct convo_id(());
8918        ///Marker type for the `message` field
8919        pub struct message(());
8920        ///Marker type for the `rev` field
8921        pub struct rev(());
8922    }
8923}
8924
8925/// Builder for constructing an instance of this type.
8926pub struct LogReadMessageBuilder<
8927    St: log_read_message_state::State,
8928    S: BosStr = DefaultStr,
8929> {
8930    _state: PhantomData<fn() -> St>,
8931    _fields: (Option<S>, Option<LogReadMessageMessage<S>>, Option<S>),
8932    _type: PhantomData<fn() -> S>,
8933}
8934
8935impl LogReadMessage<DefaultStr> {
8936    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
8937    pub fn new() -> LogReadMessageBuilder<log_read_message_state::Empty, DefaultStr> {
8938        LogReadMessageBuilder::new()
8939    }
8940}
8941
8942impl<S: BosStr> LogReadMessage<S> {
8943    /// Create a new builder for this type
8944    pub fn builder() -> LogReadMessageBuilder<log_read_message_state::Empty, S> {
8945        LogReadMessageBuilder::builder()
8946    }
8947}
8948
8949impl LogReadMessageBuilder<log_read_message_state::Empty, DefaultStr> {
8950    /// Create a new builder with all fields unset, using the default string type, if needed
8951    pub fn new() -> Self {
8952        LogReadMessageBuilder {
8953            _state: PhantomData,
8954            _fields: (None, None, None),
8955            _type: PhantomData,
8956        }
8957    }
8958}
8959
8960impl<S: BosStr> LogReadMessageBuilder<log_read_message_state::Empty, S> {
8961    /// Create a new builder with all fields unset
8962    pub fn builder() -> Self {
8963        LogReadMessageBuilder {
8964            _state: PhantomData,
8965            _fields: (None, None, None),
8966            _type: PhantomData,
8967        }
8968    }
8969}
8970
8971impl<St, S: BosStr> LogReadMessageBuilder<St, S>
8972where
8973    St: log_read_message_state::State,
8974    St::ConvoId: log_read_message_state::IsUnset,
8975{
8976    /// Set the `convoId` field (required)
8977    pub fn convo_id(
8978        mut self,
8979        value: impl Into<S>,
8980    ) -> LogReadMessageBuilder<log_read_message_state::SetConvoId<St>, S> {
8981        self._fields.0 = Option::Some(value.into());
8982        LogReadMessageBuilder {
8983            _state: PhantomData,
8984            _fields: self._fields,
8985            _type: PhantomData,
8986        }
8987    }
8988}
8989
8990impl<St, S: BosStr> LogReadMessageBuilder<St, S>
8991where
8992    St: log_read_message_state::State,
8993    St::Message: log_read_message_state::IsUnset,
8994{
8995    /// Set the `message` field (required)
8996    pub fn message(
8997        mut self,
8998        value: impl Into<LogReadMessageMessage<S>>,
8999    ) -> LogReadMessageBuilder<log_read_message_state::SetMessage<St>, S> {
9000        self._fields.1 = Option::Some(value.into());
9001        LogReadMessageBuilder {
9002            _state: PhantomData,
9003            _fields: self._fields,
9004            _type: PhantomData,
9005        }
9006    }
9007}
9008
9009impl<St, S: BosStr> LogReadMessageBuilder<St, S>
9010where
9011    St: log_read_message_state::State,
9012    St::Rev: log_read_message_state::IsUnset,
9013{
9014    /// Set the `rev` field (required)
9015    pub fn rev(
9016        mut self,
9017        value: impl Into<S>,
9018    ) -> LogReadMessageBuilder<log_read_message_state::SetRev<St>, S> {
9019        self._fields.2 = Option::Some(value.into());
9020        LogReadMessageBuilder {
9021            _state: PhantomData,
9022            _fields: self._fields,
9023            _type: PhantomData,
9024        }
9025    }
9026}
9027
9028impl<St, S: BosStr> LogReadMessageBuilder<St, S>
9029where
9030    St: log_read_message_state::State,
9031    St::ConvoId: log_read_message_state::IsSet,
9032    St::Message: log_read_message_state::IsSet,
9033    St::Rev: log_read_message_state::IsSet,
9034{
9035    /// Build the final struct.
9036    pub fn build(self) -> LogReadMessage<S> {
9037        LogReadMessage {
9038            convo_id: self._fields.0.unwrap(),
9039            message: self._fields.1.unwrap(),
9040            rev: self._fields.2.unwrap(),
9041            extra_data: Default::default(),
9042        }
9043    }
9044    /// Build the final struct with custom extra_data.
9045    pub fn build_with_data(
9046        self,
9047        extra_data: BTreeMap<SmolStr, Data<S>>,
9048    ) -> LogReadMessage<S> {
9049        LogReadMessage {
9050            convo_id: self._fields.0.unwrap(),
9051            message: self._fields.1.unwrap(),
9052            rev: self._fields.2.unwrap(),
9053            extra_data: Some(extra_data),
9054        }
9055    }
9056}
9057
9058pub mod log_reject_join_request_state {
9059
9060    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
9061    #[allow(unused)]
9062    use ::core::marker::PhantomData;
9063    mod sealed {
9064        pub trait Sealed {}
9065    }
9066    /// State trait tracking which required fields have been set
9067    pub trait State: sealed::Sealed {
9068        type ConvoId;
9069        type Member;
9070        type Rev;
9071    }
9072    /// Empty state - all required fields are unset
9073    pub struct Empty(());
9074    impl sealed::Sealed for Empty {}
9075    impl State for Empty {
9076        type ConvoId = Unset;
9077        type Member = Unset;
9078        type Rev = Unset;
9079    }
9080    ///State transition - sets the `convo_id` field to Set
9081    pub struct SetConvoId<St: State = Empty>(PhantomData<fn() -> St>);
9082    impl<St: State> sealed::Sealed for SetConvoId<St> {}
9083    impl<St: State> State for SetConvoId<St> {
9084        type ConvoId = Set<members::convo_id>;
9085        type Member = St::Member;
9086        type Rev = St::Rev;
9087    }
9088    ///State transition - sets the `member` field to Set
9089    pub struct SetMember<St: State = Empty>(PhantomData<fn() -> St>);
9090    impl<St: State> sealed::Sealed for SetMember<St> {}
9091    impl<St: State> State for SetMember<St> {
9092        type ConvoId = St::ConvoId;
9093        type Member = Set<members::member>;
9094        type Rev = St::Rev;
9095    }
9096    ///State transition - sets the `rev` field to Set
9097    pub struct SetRev<St: State = Empty>(PhantomData<fn() -> St>);
9098    impl<St: State> sealed::Sealed for SetRev<St> {}
9099    impl<St: State> State for SetRev<St> {
9100        type ConvoId = St::ConvoId;
9101        type Member = St::Member;
9102        type Rev = Set<members::rev>;
9103    }
9104    /// Marker types for field names
9105    #[allow(non_camel_case_types)]
9106    pub mod members {
9107        ///Marker type for the `convo_id` field
9108        pub struct convo_id(());
9109        ///Marker type for the `member` field
9110        pub struct member(());
9111        ///Marker type for the `rev` field
9112        pub struct rev(());
9113    }
9114}
9115
9116/// Builder for constructing an instance of this type.
9117pub struct LogRejectJoinRequestBuilder<
9118    St: log_reject_join_request_state::State,
9119    S: BosStr = DefaultStr,
9120> {
9121    _state: PhantomData<fn() -> St>,
9122    _fields: (Option<S>, Option<ProfileViewBasic<S>>, Option<S>),
9123    _type: PhantomData<fn() -> S>,
9124}
9125
9126impl LogRejectJoinRequest<DefaultStr> {
9127    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
9128    pub fn new() -> LogRejectJoinRequestBuilder<
9129        log_reject_join_request_state::Empty,
9130        DefaultStr,
9131    > {
9132        LogRejectJoinRequestBuilder::new()
9133    }
9134}
9135
9136impl<S: BosStr> LogRejectJoinRequest<S> {
9137    /// Create a new builder for this type
9138    pub fn builder() -> LogRejectJoinRequestBuilder<
9139        log_reject_join_request_state::Empty,
9140        S,
9141    > {
9142        LogRejectJoinRequestBuilder::builder()
9143    }
9144}
9145
9146impl LogRejectJoinRequestBuilder<log_reject_join_request_state::Empty, DefaultStr> {
9147    /// Create a new builder with all fields unset, using the default string type, if needed
9148    pub fn new() -> Self {
9149        LogRejectJoinRequestBuilder {
9150            _state: PhantomData,
9151            _fields: (None, None, None),
9152            _type: PhantomData,
9153        }
9154    }
9155}
9156
9157impl<S: BosStr> LogRejectJoinRequestBuilder<log_reject_join_request_state::Empty, S> {
9158    /// Create a new builder with all fields unset
9159    pub fn builder() -> Self {
9160        LogRejectJoinRequestBuilder {
9161            _state: PhantomData,
9162            _fields: (None, None, None),
9163            _type: PhantomData,
9164        }
9165    }
9166}
9167
9168impl<St, S: BosStr> LogRejectJoinRequestBuilder<St, S>
9169where
9170    St: log_reject_join_request_state::State,
9171    St::ConvoId: log_reject_join_request_state::IsUnset,
9172{
9173    /// Set the `convoId` field (required)
9174    pub fn convo_id(
9175        mut self,
9176        value: impl Into<S>,
9177    ) -> LogRejectJoinRequestBuilder<log_reject_join_request_state::SetConvoId<St>, S> {
9178        self._fields.0 = Option::Some(value.into());
9179        LogRejectJoinRequestBuilder {
9180            _state: PhantomData,
9181            _fields: self._fields,
9182            _type: PhantomData,
9183        }
9184    }
9185}
9186
9187impl<St, S: BosStr> LogRejectJoinRequestBuilder<St, S>
9188where
9189    St: log_reject_join_request_state::State,
9190    St::Member: log_reject_join_request_state::IsUnset,
9191{
9192    /// Set the `member` field (required)
9193    pub fn member(
9194        mut self,
9195        value: impl Into<ProfileViewBasic<S>>,
9196    ) -> LogRejectJoinRequestBuilder<log_reject_join_request_state::SetMember<St>, S> {
9197        self._fields.1 = Option::Some(value.into());
9198        LogRejectJoinRequestBuilder {
9199            _state: PhantomData,
9200            _fields: self._fields,
9201            _type: PhantomData,
9202        }
9203    }
9204}
9205
9206impl<St, S: BosStr> LogRejectJoinRequestBuilder<St, S>
9207where
9208    St: log_reject_join_request_state::State,
9209    St::Rev: log_reject_join_request_state::IsUnset,
9210{
9211    /// Set the `rev` field (required)
9212    pub fn rev(
9213        mut self,
9214        value: impl Into<S>,
9215    ) -> LogRejectJoinRequestBuilder<log_reject_join_request_state::SetRev<St>, S> {
9216        self._fields.2 = Option::Some(value.into());
9217        LogRejectJoinRequestBuilder {
9218            _state: PhantomData,
9219            _fields: self._fields,
9220            _type: PhantomData,
9221        }
9222    }
9223}
9224
9225impl<St, S: BosStr> LogRejectJoinRequestBuilder<St, S>
9226where
9227    St: log_reject_join_request_state::State,
9228    St::ConvoId: log_reject_join_request_state::IsSet,
9229    St::Member: log_reject_join_request_state::IsSet,
9230    St::Rev: log_reject_join_request_state::IsSet,
9231{
9232    /// Build the final struct.
9233    pub fn build(self) -> LogRejectJoinRequest<S> {
9234        LogRejectJoinRequest {
9235            convo_id: self._fields.0.unwrap(),
9236            member: self._fields.1.unwrap(),
9237            rev: self._fields.2.unwrap(),
9238            extra_data: Default::default(),
9239        }
9240    }
9241    /// Build the final struct with custom extra_data.
9242    pub fn build_with_data(
9243        self,
9244        extra_data: BTreeMap<SmolStr, Data<S>>,
9245    ) -> LogRejectJoinRequest<S> {
9246        LogRejectJoinRequest {
9247            convo_id: self._fields.0.unwrap(),
9248            member: self._fields.1.unwrap(),
9249            rev: self._fields.2.unwrap(),
9250            extra_data: Some(extra_data),
9251        }
9252    }
9253}
9254
9255pub mod log_remove_member_state {
9256
9257    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
9258    #[allow(unused)]
9259    use ::core::marker::PhantomData;
9260    mod sealed {
9261        pub trait Sealed {}
9262    }
9263    /// State trait tracking which required fields have been set
9264    pub trait State: sealed::Sealed {
9265        type ConvoId;
9266        type Message;
9267        type RelatedProfiles;
9268        type Rev;
9269    }
9270    /// Empty state - all required fields are unset
9271    pub struct Empty(());
9272    impl sealed::Sealed for Empty {}
9273    impl State for Empty {
9274        type ConvoId = Unset;
9275        type Message = Unset;
9276        type RelatedProfiles = Unset;
9277        type Rev = Unset;
9278    }
9279    ///State transition - sets the `convo_id` field to Set
9280    pub struct SetConvoId<St: State = Empty>(PhantomData<fn() -> St>);
9281    impl<St: State> sealed::Sealed for SetConvoId<St> {}
9282    impl<St: State> State for SetConvoId<St> {
9283        type ConvoId = Set<members::convo_id>;
9284        type Message = St::Message;
9285        type RelatedProfiles = St::RelatedProfiles;
9286        type Rev = St::Rev;
9287    }
9288    ///State transition - sets the `message` field to Set
9289    pub struct SetMessage<St: State = Empty>(PhantomData<fn() -> St>);
9290    impl<St: State> sealed::Sealed for SetMessage<St> {}
9291    impl<St: State> State for SetMessage<St> {
9292        type ConvoId = St::ConvoId;
9293        type Message = Set<members::message>;
9294        type RelatedProfiles = St::RelatedProfiles;
9295        type Rev = St::Rev;
9296    }
9297    ///State transition - sets the `related_profiles` field to Set
9298    pub struct SetRelatedProfiles<St: State = Empty>(PhantomData<fn() -> St>);
9299    impl<St: State> sealed::Sealed for SetRelatedProfiles<St> {}
9300    impl<St: State> State for SetRelatedProfiles<St> {
9301        type ConvoId = St::ConvoId;
9302        type Message = St::Message;
9303        type RelatedProfiles = Set<members::related_profiles>;
9304        type Rev = St::Rev;
9305    }
9306    ///State transition - sets the `rev` field to Set
9307    pub struct SetRev<St: State = Empty>(PhantomData<fn() -> St>);
9308    impl<St: State> sealed::Sealed for SetRev<St> {}
9309    impl<St: State> State for SetRev<St> {
9310        type ConvoId = St::ConvoId;
9311        type Message = St::Message;
9312        type RelatedProfiles = St::RelatedProfiles;
9313        type Rev = Set<members::rev>;
9314    }
9315    /// Marker types for field names
9316    #[allow(non_camel_case_types)]
9317    pub mod members {
9318        ///Marker type for the `convo_id` field
9319        pub struct convo_id(());
9320        ///Marker type for the `message` field
9321        pub struct message(());
9322        ///Marker type for the `related_profiles` field
9323        pub struct related_profiles(());
9324        ///Marker type for the `rev` field
9325        pub struct rev(());
9326    }
9327}
9328
9329/// Builder for constructing an instance of this type.
9330pub struct LogRemoveMemberBuilder<
9331    St: log_remove_member_state::State,
9332    S: BosStr = DefaultStr,
9333> {
9334    _state: PhantomData<fn() -> St>,
9335    _fields: (
9336        Option<S>,
9337        Option<convo::SystemMessageView<S>>,
9338        Option<Vec<ProfileViewBasic<S>>>,
9339        Option<S>,
9340    ),
9341    _type: PhantomData<fn() -> S>,
9342}
9343
9344impl LogRemoveMember<DefaultStr> {
9345    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
9346    pub fn new() -> LogRemoveMemberBuilder<log_remove_member_state::Empty, DefaultStr> {
9347        LogRemoveMemberBuilder::new()
9348    }
9349}
9350
9351impl<S: BosStr> LogRemoveMember<S> {
9352    /// Create a new builder for this type
9353    pub fn builder() -> LogRemoveMemberBuilder<log_remove_member_state::Empty, S> {
9354        LogRemoveMemberBuilder::builder()
9355    }
9356}
9357
9358impl LogRemoveMemberBuilder<log_remove_member_state::Empty, DefaultStr> {
9359    /// Create a new builder with all fields unset, using the default string type, if needed
9360    pub fn new() -> Self {
9361        LogRemoveMemberBuilder {
9362            _state: PhantomData,
9363            _fields: (None, None, None, None),
9364            _type: PhantomData,
9365        }
9366    }
9367}
9368
9369impl<S: BosStr> LogRemoveMemberBuilder<log_remove_member_state::Empty, S> {
9370    /// Create a new builder with all fields unset
9371    pub fn builder() -> Self {
9372        LogRemoveMemberBuilder {
9373            _state: PhantomData,
9374            _fields: (None, None, None, None),
9375            _type: PhantomData,
9376        }
9377    }
9378}
9379
9380impl<St, S: BosStr> LogRemoveMemberBuilder<St, S>
9381where
9382    St: log_remove_member_state::State,
9383    St::ConvoId: log_remove_member_state::IsUnset,
9384{
9385    /// Set the `convoId` field (required)
9386    pub fn convo_id(
9387        mut self,
9388        value: impl Into<S>,
9389    ) -> LogRemoveMemberBuilder<log_remove_member_state::SetConvoId<St>, S> {
9390        self._fields.0 = Option::Some(value.into());
9391        LogRemoveMemberBuilder {
9392            _state: PhantomData,
9393            _fields: self._fields,
9394            _type: PhantomData,
9395        }
9396    }
9397}
9398
9399impl<St, S: BosStr> LogRemoveMemberBuilder<St, S>
9400where
9401    St: log_remove_member_state::State,
9402    St::Message: log_remove_member_state::IsUnset,
9403{
9404    /// Set the `message` field (required)
9405    pub fn message(
9406        mut self,
9407        value: impl Into<convo::SystemMessageView<S>>,
9408    ) -> LogRemoveMemberBuilder<log_remove_member_state::SetMessage<St>, S> {
9409        self._fields.1 = Option::Some(value.into());
9410        LogRemoveMemberBuilder {
9411            _state: PhantomData,
9412            _fields: self._fields,
9413            _type: PhantomData,
9414        }
9415    }
9416}
9417
9418impl<St, S: BosStr> LogRemoveMemberBuilder<St, S>
9419where
9420    St: log_remove_member_state::State,
9421    St::RelatedProfiles: log_remove_member_state::IsUnset,
9422{
9423    /// Set the `relatedProfiles` field (required)
9424    pub fn related_profiles(
9425        mut self,
9426        value: impl Into<Vec<ProfileViewBasic<S>>>,
9427    ) -> LogRemoveMemberBuilder<log_remove_member_state::SetRelatedProfiles<St>, S> {
9428        self._fields.2 = Option::Some(value.into());
9429        LogRemoveMemberBuilder {
9430            _state: PhantomData,
9431            _fields: self._fields,
9432            _type: PhantomData,
9433        }
9434    }
9435}
9436
9437impl<St, S: BosStr> LogRemoveMemberBuilder<St, S>
9438where
9439    St: log_remove_member_state::State,
9440    St::Rev: log_remove_member_state::IsUnset,
9441{
9442    /// Set the `rev` field (required)
9443    pub fn rev(
9444        mut self,
9445        value: impl Into<S>,
9446    ) -> LogRemoveMemberBuilder<log_remove_member_state::SetRev<St>, S> {
9447        self._fields.3 = Option::Some(value.into());
9448        LogRemoveMemberBuilder {
9449            _state: PhantomData,
9450            _fields: self._fields,
9451            _type: PhantomData,
9452        }
9453    }
9454}
9455
9456impl<St, S: BosStr> LogRemoveMemberBuilder<St, S>
9457where
9458    St: log_remove_member_state::State,
9459    St::ConvoId: log_remove_member_state::IsSet,
9460    St::Message: log_remove_member_state::IsSet,
9461    St::RelatedProfiles: log_remove_member_state::IsSet,
9462    St::Rev: log_remove_member_state::IsSet,
9463{
9464    /// Build the final struct.
9465    pub fn build(self) -> LogRemoveMember<S> {
9466        LogRemoveMember {
9467            convo_id: self._fields.0.unwrap(),
9468            message: self._fields.1.unwrap(),
9469            related_profiles: self._fields.2.unwrap(),
9470            rev: self._fields.3.unwrap(),
9471            extra_data: Default::default(),
9472        }
9473    }
9474    /// Build the final struct with custom extra_data.
9475    pub fn build_with_data(
9476        self,
9477        extra_data: BTreeMap<SmolStr, Data<S>>,
9478    ) -> LogRemoveMember<S> {
9479        LogRemoveMember {
9480            convo_id: self._fields.0.unwrap(),
9481            message: self._fields.1.unwrap(),
9482            related_profiles: self._fields.2.unwrap(),
9483            rev: self._fields.3.unwrap(),
9484            extra_data: Some(extra_data),
9485        }
9486    }
9487}
9488
9489pub mod log_remove_reaction_state {
9490
9491    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
9492    #[allow(unused)]
9493    use ::core::marker::PhantomData;
9494    mod sealed {
9495        pub trait Sealed {}
9496    }
9497    /// State trait tracking which required fields have been set
9498    pub trait State: sealed::Sealed {
9499        type ConvoId;
9500        type Message;
9501        type Reaction;
9502        type Rev;
9503    }
9504    /// Empty state - all required fields are unset
9505    pub struct Empty(());
9506    impl sealed::Sealed for Empty {}
9507    impl State for Empty {
9508        type ConvoId = Unset;
9509        type Message = Unset;
9510        type Reaction = Unset;
9511        type Rev = Unset;
9512    }
9513    ///State transition - sets the `convo_id` field to Set
9514    pub struct SetConvoId<St: State = Empty>(PhantomData<fn() -> St>);
9515    impl<St: State> sealed::Sealed for SetConvoId<St> {}
9516    impl<St: State> State for SetConvoId<St> {
9517        type ConvoId = Set<members::convo_id>;
9518        type Message = St::Message;
9519        type Reaction = St::Reaction;
9520        type Rev = St::Rev;
9521    }
9522    ///State transition - sets the `message` field to Set
9523    pub struct SetMessage<St: State = Empty>(PhantomData<fn() -> St>);
9524    impl<St: State> sealed::Sealed for SetMessage<St> {}
9525    impl<St: State> State for SetMessage<St> {
9526        type ConvoId = St::ConvoId;
9527        type Message = Set<members::message>;
9528        type Reaction = St::Reaction;
9529        type Rev = St::Rev;
9530    }
9531    ///State transition - sets the `reaction` field to Set
9532    pub struct SetReaction<St: State = Empty>(PhantomData<fn() -> St>);
9533    impl<St: State> sealed::Sealed for SetReaction<St> {}
9534    impl<St: State> State for SetReaction<St> {
9535        type ConvoId = St::ConvoId;
9536        type Message = St::Message;
9537        type Reaction = Set<members::reaction>;
9538        type Rev = St::Rev;
9539    }
9540    ///State transition - sets the `rev` field to Set
9541    pub struct SetRev<St: State = Empty>(PhantomData<fn() -> St>);
9542    impl<St: State> sealed::Sealed for SetRev<St> {}
9543    impl<St: State> State for SetRev<St> {
9544        type ConvoId = St::ConvoId;
9545        type Message = St::Message;
9546        type Reaction = St::Reaction;
9547        type Rev = Set<members::rev>;
9548    }
9549    /// Marker types for field names
9550    #[allow(non_camel_case_types)]
9551    pub mod members {
9552        ///Marker type for the `convo_id` field
9553        pub struct convo_id(());
9554        ///Marker type for the `message` field
9555        pub struct message(());
9556        ///Marker type for the `reaction` field
9557        pub struct reaction(());
9558        ///Marker type for the `rev` field
9559        pub struct rev(());
9560    }
9561}
9562
9563/// Builder for constructing an instance of this type.
9564pub struct LogRemoveReactionBuilder<
9565    St: log_remove_reaction_state::State,
9566    S: BosStr = DefaultStr,
9567> {
9568    _state: PhantomData<fn() -> St>,
9569    _fields: (
9570        Option<S>,
9571        Option<LogRemoveReactionMessage<S>>,
9572        Option<convo::ReactionView<S>>,
9573        Option<Vec<ProfileViewBasic<S>>>,
9574        Option<S>,
9575    ),
9576    _type: PhantomData<fn() -> S>,
9577}
9578
9579impl LogRemoveReaction<DefaultStr> {
9580    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
9581    pub fn new() -> LogRemoveReactionBuilder<
9582        log_remove_reaction_state::Empty,
9583        DefaultStr,
9584    > {
9585        LogRemoveReactionBuilder::new()
9586    }
9587}
9588
9589impl<S: BosStr> LogRemoveReaction<S> {
9590    /// Create a new builder for this type
9591    pub fn builder() -> LogRemoveReactionBuilder<log_remove_reaction_state::Empty, S> {
9592        LogRemoveReactionBuilder::builder()
9593    }
9594}
9595
9596impl LogRemoveReactionBuilder<log_remove_reaction_state::Empty, DefaultStr> {
9597    /// Create a new builder with all fields unset, using the default string type, if needed
9598    pub fn new() -> Self {
9599        LogRemoveReactionBuilder {
9600            _state: PhantomData,
9601            _fields: (None, None, None, None, None),
9602            _type: PhantomData,
9603        }
9604    }
9605}
9606
9607impl<S: BosStr> LogRemoveReactionBuilder<log_remove_reaction_state::Empty, S> {
9608    /// Create a new builder with all fields unset
9609    pub fn builder() -> Self {
9610        LogRemoveReactionBuilder {
9611            _state: PhantomData,
9612            _fields: (None, None, None, None, None),
9613            _type: PhantomData,
9614        }
9615    }
9616}
9617
9618impl<St, S: BosStr> LogRemoveReactionBuilder<St, S>
9619where
9620    St: log_remove_reaction_state::State,
9621    St::ConvoId: log_remove_reaction_state::IsUnset,
9622{
9623    /// Set the `convoId` field (required)
9624    pub fn convo_id(
9625        mut self,
9626        value: impl Into<S>,
9627    ) -> LogRemoveReactionBuilder<log_remove_reaction_state::SetConvoId<St>, S> {
9628        self._fields.0 = Option::Some(value.into());
9629        LogRemoveReactionBuilder {
9630            _state: PhantomData,
9631            _fields: self._fields,
9632            _type: PhantomData,
9633        }
9634    }
9635}
9636
9637impl<St, S: BosStr> LogRemoveReactionBuilder<St, S>
9638where
9639    St: log_remove_reaction_state::State,
9640    St::Message: log_remove_reaction_state::IsUnset,
9641{
9642    /// Set the `message` field (required)
9643    pub fn message(
9644        mut self,
9645        value: impl Into<LogRemoveReactionMessage<S>>,
9646    ) -> LogRemoveReactionBuilder<log_remove_reaction_state::SetMessage<St>, S> {
9647        self._fields.1 = Option::Some(value.into());
9648        LogRemoveReactionBuilder {
9649            _state: PhantomData,
9650            _fields: self._fields,
9651            _type: PhantomData,
9652        }
9653    }
9654}
9655
9656impl<St, S: BosStr> LogRemoveReactionBuilder<St, S>
9657where
9658    St: log_remove_reaction_state::State,
9659    St::Reaction: log_remove_reaction_state::IsUnset,
9660{
9661    /// Set the `reaction` field (required)
9662    pub fn reaction(
9663        mut self,
9664        value: impl Into<convo::ReactionView<S>>,
9665    ) -> LogRemoveReactionBuilder<log_remove_reaction_state::SetReaction<St>, S> {
9666        self._fields.2 = Option::Some(value.into());
9667        LogRemoveReactionBuilder {
9668            _state: PhantomData,
9669            _fields: self._fields,
9670            _type: PhantomData,
9671        }
9672    }
9673}
9674
9675impl<St: log_remove_reaction_state::State, S: BosStr> LogRemoveReactionBuilder<St, S> {
9676    /// Set the `relatedProfiles` field (optional)
9677    pub fn related_profiles(
9678        mut self,
9679        value: impl Into<Option<Vec<ProfileViewBasic<S>>>>,
9680    ) -> Self {
9681        self._fields.3 = value.into();
9682        self
9683    }
9684    /// Set the `relatedProfiles` field to an Option value (optional)
9685    pub fn maybe_related_profiles(
9686        mut self,
9687        value: Option<Vec<ProfileViewBasic<S>>>,
9688    ) -> Self {
9689        self._fields.3 = value;
9690        self
9691    }
9692}
9693
9694impl<St, S: BosStr> LogRemoveReactionBuilder<St, S>
9695where
9696    St: log_remove_reaction_state::State,
9697    St::Rev: log_remove_reaction_state::IsUnset,
9698{
9699    /// Set the `rev` field (required)
9700    pub fn rev(
9701        mut self,
9702        value: impl Into<S>,
9703    ) -> LogRemoveReactionBuilder<log_remove_reaction_state::SetRev<St>, S> {
9704        self._fields.4 = Option::Some(value.into());
9705        LogRemoveReactionBuilder {
9706            _state: PhantomData,
9707            _fields: self._fields,
9708            _type: PhantomData,
9709        }
9710    }
9711}
9712
9713impl<St, S: BosStr> LogRemoveReactionBuilder<St, S>
9714where
9715    St: log_remove_reaction_state::State,
9716    St::ConvoId: log_remove_reaction_state::IsSet,
9717    St::Message: log_remove_reaction_state::IsSet,
9718    St::Reaction: log_remove_reaction_state::IsSet,
9719    St::Rev: log_remove_reaction_state::IsSet,
9720{
9721    /// Build the final struct.
9722    pub fn build(self) -> LogRemoveReaction<S> {
9723        LogRemoveReaction {
9724            convo_id: self._fields.0.unwrap(),
9725            message: self._fields.1.unwrap(),
9726            reaction: self._fields.2.unwrap(),
9727            related_profiles: self._fields.3,
9728            rev: self._fields.4.unwrap(),
9729            extra_data: Default::default(),
9730        }
9731    }
9732    /// Build the final struct with custom extra_data.
9733    pub fn build_with_data(
9734        self,
9735        extra_data: BTreeMap<SmolStr, Data<S>>,
9736    ) -> LogRemoveReaction<S> {
9737        LogRemoveReaction {
9738            convo_id: self._fields.0.unwrap(),
9739            message: self._fields.1.unwrap(),
9740            reaction: self._fields.2.unwrap(),
9741            related_profiles: self._fields.3,
9742            rev: self._fields.4.unwrap(),
9743            extra_data: Some(extra_data),
9744        }
9745    }
9746}
9747
9748pub mod log_unlock_convo_state {
9749
9750    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
9751    #[allow(unused)]
9752    use ::core::marker::PhantomData;
9753    mod sealed {
9754        pub trait Sealed {}
9755    }
9756    /// State trait tracking which required fields have been set
9757    pub trait State: sealed::Sealed {
9758        type ConvoId;
9759        type Message;
9760        type RelatedProfiles;
9761        type Rev;
9762    }
9763    /// Empty state - all required fields are unset
9764    pub struct Empty(());
9765    impl sealed::Sealed for Empty {}
9766    impl State for Empty {
9767        type ConvoId = Unset;
9768        type Message = Unset;
9769        type RelatedProfiles = Unset;
9770        type Rev = Unset;
9771    }
9772    ///State transition - sets the `convo_id` field to Set
9773    pub struct SetConvoId<St: State = Empty>(PhantomData<fn() -> St>);
9774    impl<St: State> sealed::Sealed for SetConvoId<St> {}
9775    impl<St: State> State for SetConvoId<St> {
9776        type ConvoId = Set<members::convo_id>;
9777        type Message = St::Message;
9778        type RelatedProfiles = St::RelatedProfiles;
9779        type Rev = St::Rev;
9780    }
9781    ///State transition - sets the `message` field to Set
9782    pub struct SetMessage<St: State = Empty>(PhantomData<fn() -> St>);
9783    impl<St: State> sealed::Sealed for SetMessage<St> {}
9784    impl<St: State> State for SetMessage<St> {
9785        type ConvoId = St::ConvoId;
9786        type Message = Set<members::message>;
9787        type RelatedProfiles = St::RelatedProfiles;
9788        type Rev = St::Rev;
9789    }
9790    ///State transition - sets the `related_profiles` field to Set
9791    pub struct SetRelatedProfiles<St: State = Empty>(PhantomData<fn() -> St>);
9792    impl<St: State> sealed::Sealed for SetRelatedProfiles<St> {}
9793    impl<St: State> State for SetRelatedProfiles<St> {
9794        type ConvoId = St::ConvoId;
9795        type Message = St::Message;
9796        type RelatedProfiles = Set<members::related_profiles>;
9797        type Rev = St::Rev;
9798    }
9799    ///State transition - sets the `rev` field to Set
9800    pub struct SetRev<St: State = Empty>(PhantomData<fn() -> St>);
9801    impl<St: State> sealed::Sealed for SetRev<St> {}
9802    impl<St: State> State for SetRev<St> {
9803        type ConvoId = St::ConvoId;
9804        type Message = St::Message;
9805        type RelatedProfiles = St::RelatedProfiles;
9806        type Rev = Set<members::rev>;
9807    }
9808    /// Marker types for field names
9809    #[allow(non_camel_case_types)]
9810    pub mod members {
9811        ///Marker type for the `convo_id` field
9812        pub struct convo_id(());
9813        ///Marker type for the `message` field
9814        pub struct message(());
9815        ///Marker type for the `related_profiles` field
9816        pub struct related_profiles(());
9817        ///Marker type for the `rev` field
9818        pub struct rev(());
9819    }
9820}
9821
9822/// Builder for constructing an instance of this type.
9823pub struct LogUnlockConvoBuilder<
9824    St: log_unlock_convo_state::State,
9825    S: BosStr = DefaultStr,
9826> {
9827    _state: PhantomData<fn() -> St>,
9828    _fields: (
9829        Option<S>,
9830        Option<convo::SystemMessageView<S>>,
9831        Option<Vec<ProfileViewBasic<S>>>,
9832        Option<S>,
9833    ),
9834    _type: PhantomData<fn() -> S>,
9835}
9836
9837impl LogUnlockConvo<DefaultStr> {
9838    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
9839    pub fn new() -> LogUnlockConvoBuilder<log_unlock_convo_state::Empty, DefaultStr> {
9840        LogUnlockConvoBuilder::new()
9841    }
9842}
9843
9844impl<S: BosStr> LogUnlockConvo<S> {
9845    /// Create a new builder for this type
9846    pub fn builder() -> LogUnlockConvoBuilder<log_unlock_convo_state::Empty, S> {
9847        LogUnlockConvoBuilder::builder()
9848    }
9849}
9850
9851impl LogUnlockConvoBuilder<log_unlock_convo_state::Empty, DefaultStr> {
9852    /// Create a new builder with all fields unset, using the default string type, if needed
9853    pub fn new() -> Self {
9854        LogUnlockConvoBuilder {
9855            _state: PhantomData,
9856            _fields: (None, None, None, None),
9857            _type: PhantomData,
9858        }
9859    }
9860}
9861
9862impl<S: BosStr> LogUnlockConvoBuilder<log_unlock_convo_state::Empty, S> {
9863    /// Create a new builder with all fields unset
9864    pub fn builder() -> Self {
9865        LogUnlockConvoBuilder {
9866            _state: PhantomData,
9867            _fields: (None, None, None, None),
9868            _type: PhantomData,
9869        }
9870    }
9871}
9872
9873impl<St, S: BosStr> LogUnlockConvoBuilder<St, S>
9874where
9875    St: log_unlock_convo_state::State,
9876    St::ConvoId: log_unlock_convo_state::IsUnset,
9877{
9878    /// Set the `convoId` field (required)
9879    pub fn convo_id(
9880        mut self,
9881        value: impl Into<S>,
9882    ) -> LogUnlockConvoBuilder<log_unlock_convo_state::SetConvoId<St>, S> {
9883        self._fields.0 = Option::Some(value.into());
9884        LogUnlockConvoBuilder {
9885            _state: PhantomData,
9886            _fields: self._fields,
9887            _type: PhantomData,
9888        }
9889    }
9890}
9891
9892impl<St, S: BosStr> LogUnlockConvoBuilder<St, S>
9893where
9894    St: log_unlock_convo_state::State,
9895    St::Message: log_unlock_convo_state::IsUnset,
9896{
9897    /// Set the `message` field (required)
9898    pub fn message(
9899        mut self,
9900        value: impl Into<convo::SystemMessageView<S>>,
9901    ) -> LogUnlockConvoBuilder<log_unlock_convo_state::SetMessage<St>, S> {
9902        self._fields.1 = Option::Some(value.into());
9903        LogUnlockConvoBuilder {
9904            _state: PhantomData,
9905            _fields: self._fields,
9906            _type: PhantomData,
9907        }
9908    }
9909}
9910
9911impl<St, S: BosStr> LogUnlockConvoBuilder<St, S>
9912where
9913    St: log_unlock_convo_state::State,
9914    St::RelatedProfiles: log_unlock_convo_state::IsUnset,
9915{
9916    /// Set the `relatedProfiles` field (required)
9917    pub fn related_profiles(
9918        mut self,
9919        value: impl Into<Vec<ProfileViewBasic<S>>>,
9920    ) -> LogUnlockConvoBuilder<log_unlock_convo_state::SetRelatedProfiles<St>, S> {
9921        self._fields.2 = Option::Some(value.into());
9922        LogUnlockConvoBuilder {
9923            _state: PhantomData,
9924            _fields: self._fields,
9925            _type: PhantomData,
9926        }
9927    }
9928}
9929
9930impl<St, S: BosStr> LogUnlockConvoBuilder<St, S>
9931where
9932    St: log_unlock_convo_state::State,
9933    St::Rev: log_unlock_convo_state::IsUnset,
9934{
9935    /// Set the `rev` field (required)
9936    pub fn rev(
9937        mut self,
9938        value: impl Into<S>,
9939    ) -> LogUnlockConvoBuilder<log_unlock_convo_state::SetRev<St>, S> {
9940        self._fields.3 = Option::Some(value.into());
9941        LogUnlockConvoBuilder {
9942            _state: PhantomData,
9943            _fields: self._fields,
9944            _type: PhantomData,
9945        }
9946    }
9947}
9948
9949impl<St, S: BosStr> LogUnlockConvoBuilder<St, S>
9950where
9951    St: log_unlock_convo_state::State,
9952    St::ConvoId: log_unlock_convo_state::IsSet,
9953    St::Message: log_unlock_convo_state::IsSet,
9954    St::RelatedProfiles: log_unlock_convo_state::IsSet,
9955    St::Rev: log_unlock_convo_state::IsSet,
9956{
9957    /// Build the final struct.
9958    pub fn build(self) -> LogUnlockConvo<S> {
9959        LogUnlockConvo {
9960            convo_id: self._fields.0.unwrap(),
9961            message: self._fields.1.unwrap(),
9962            related_profiles: self._fields.2.unwrap(),
9963            rev: self._fields.3.unwrap(),
9964            extra_data: Default::default(),
9965        }
9966    }
9967    /// Build the final struct with custom extra_data.
9968    pub fn build_with_data(
9969        self,
9970        extra_data: BTreeMap<SmolStr, Data<S>>,
9971    ) -> LogUnlockConvo<S> {
9972        LogUnlockConvo {
9973            convo_id: self._fields.0.unwrap(),
9974            message: self._fields.1.unwrap(),
9975            related_profiles: self._fields.2.unwrap(),
9976            rev: self._fields.3.unwrap(),
9977            extra_data: Some(extra_data),
9978        }
9979    }
9980}
9981
9982pub mod log_withdraw_incoming_join_request_state {
9983
9984    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
9985    #[allow(unused)]
9986    use ::core::marker::PhantomData;
9987    mod sealed {
9988        pub trait Sealed {}
9989    }
9990    /// State trait tracking which required fields have been set
9991    pub trait State: sealed::Sealed {
9992        type ConvoId;
9993        type Member;
9994        type Rev;
9995    }
9996    /// Empty state - all required fields are unset
9997    pub struct Empty(());
9998    impl sealed::Sealed for Empty {}
9999    impl State for Empty {
10000        type ConvoId = Unset;
10001        type Member = Unset;
10002        type Rev = Unset;
10003    }
10004    ///State transition - sets the `convo_id` field to Set
10005    pub struct SetConvoId<St: State = Empty>(PhantomData<fn() -> St>);
10006    impl<St: State> sealed::Sealed for SetConvoId<St> {}
10007    impl<St: State> State for SetConvoId<St> {
10008        type ConvoId = Set<members::convo_id>;
10009        type Member = St::Member;
10010        type Rev = St::Rev;
10011    }
10012    ///State transition - sets the `member` field to Set
10013    pub struct SetMember<St: State = Empty>(PhantomData<fn() -> St>);
10014    impl<St: State> sealed::Sealed for SetMember<St> {}
10015    impl<St: State> State for SetMember<St> {
10016        type ConvoId = St::ConvoId;
10017        type Member = Set<members::member>;
10018        type Rev = St::Rev;
10019    }
10020    ///State transition - sets the `rev` field to Set
10021    pub struct SetRev<St: State = Empty>(PhantomData<fn() -> St>);
10022    impl<St: State> sealed::Sealed for SetRev<St> {}
10023    impl<St: State> State for SetRev<St> {
10024        type ConvoId = St::ConvoId;
10025        type Member = St::Member;
10026        type Rev = Set<members::rev>;
10027    }
10028    /// Marker types for field names
10029    #[allow(non_camel_case_types)]
10030    pub mod members {
10031        ///Marker type for the `convo_id` field
10032        pub struct convo_id(());
10033        ///Marker type for the `member` field
10034        pub struct member(());
10035        ///Marker type for the `rev` field
10036        pub struct rev(());
10037    }
10038}
10039
10040/// Builder for constructing an instance of this type.
10041pub struct LogWithdrawIncomingJoinRequestBuilder<
10042    St: log_withdraw_incoming_join_request_state::State,
10043    S: BosStr = DefaultStr,
10044> {
10045    _state: PhantomData<fn() -> St>,
10046    _fields: (Option<S>, Option<ProfileViewBasic<S>>, Option<S>),
10047    _type: PhantomData<fn() -> S>,
10048}
10049
10050impl LogWithdrawIncomingJoinRequest<DefaultStr> {
10051    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
10052    pub fn new() -> LogWithdrawIncomingJoinRequestBuilder<
10053        log_withdraw_incoming_join_request_state::Empty,
10054        DefaultStr,
10055    > {
10056        LogWithdrawIncomingJoinRequestBuilder::new()
10057    }
10058}
10059
10060impl<S: BosStr> LogWithdrawIncomingJoinRequest<S> {
10061    /// Create a new builder for this type
10062    pub fn builder() -> LogWithdrawIncomingJoinRequestBuilder<
10063        log_withdraw_incoming_join_request_state::Empty,
10064        S,
10065    > {
10066        LogWithdrawIncomingJoinRequestBuilder::builder()
10067    }
10068}
10069
10070impl LogWithdrawIncomingJoinRequestBuilder<
10071    log_withdraw_incoming_join_request_state::Empty,
10072    DefaultStr,
10073> {
10074    /// Create a new builder with all fields unset, using the default string type, if needed
10075    pub fn new() -> Self {
10076        LogWithdrawIncomingJoinRequestBuilder {
10077            _state: PhantomData,
10078            _fields: (None, None, None),
10079            _type: PhantomData,
10080        }
10081    }
10082}
10083
10084impl<
10085    S: BosStr,
10086> LogWithdrawIncomingJoinRequestBuilder<
10087    log_withdraw_incoming_join_request_state::Empty,
10088    S,
10089> {
10090    /// Create a new builder with all fields unset
10091    pub fn builder() -> Self {
10092        LogWithdrawIncomingJoinRequestBuilder {
10093            _state: PhantomData,
10094            _fields: (None, None, None),
10095            _type: PhantomData,
10096        }
10097    }
10098}
10099
10100impl<St, S: BosStr> LogWithdrawIncomingJoinRequestBuilder<St, S>
10101where
10102    St: log_withdraw_incoming_join_request_state::State,
10103    St::ConvoId: log_withdraw_incoming_join_request_state::IsUnset,
10104{
10105    /// Set the `convoId` field (required)
10106    pub fn convo_id(
10107        mut self,
10108        value: impl Into<S>,
10109    ) -> LogWithdrawIncomingJoinRequestBuilder<
10110        log_withdraw_incoming_join_request_state::SetConvoId<St>,
10111        S,
10112    > {
10113        self._fields.0 = Option::Some(value.into());
10114        LogWithdrawIncomingJoinRequestBuilder {
10115            _state: PhantomData,
10116            _fields: self._fields,
10117            _type: PhantomData,
10118        }
10119    }
10120}
10121
10122impl<St, S: BosStr> LogWithdrawIncomingJoinRequestBuilder<St, S>
10123where
10124    St: log_withdraw_incoming_join_request_state::State,
10125    St::Member: log_withdraw_incoming_join_request_state::IsUnset,
10126{
10127    /// Set the `member` field (required)
10128    pub fn member(
10129        mut self,
10130        value: impl Into<ProfileViewBasic<S>>,
10131    ) -> LogWithdrawIncomingJoinRequestBuilder<
10132        log_withdraw_incoming_join_request_state::SetMember<St>,
10133        S,
10134    > {
10135        self._fields.1 = Option::Some(value.into());
10136        LogWithdrawIncomingJoinRequestBuilder {
10137            _state: PhantomData,
10138            _fields: self._fields,
10139            _type: PhantomData,
10140        }
10141    }
10142}
10143
10144impl<St, S: BosStr> LogWithdrawIncomingJoinRequestBuilder<St, S>
10145where
10146    St: log_withdraw_incoming_join_request_state::State,
10147    St::Rev: log_withdraw_incoming_join_request_state::IsUnset,
10148{
10149    /// Set the `rev` field (required)
10150    pub fn rev(
10151        mut self,
10152        value: impl Into<S>,
10153    ) -> LogWithdrawIncomingJoinRequestBuilder<
10154        log_withdraw_incoming_join_request_state::SetRev<St>,
10155        S,
10156    > {
10157        self._fields.2 = Option::Some(value.into());
10158        LogWithdrawIncomingJoinRequestBuilder {
10159            _state: PhantomData,
10160            _fields: self._fields,
10161            _type: PhantomData,
10162        }
10163    }
10164}
10165
10166impl<St, S: BosStr> LogWithdrawIncomingJoinRequestBuilder<St, S>
10167where
10168    St: log_withdraw_incoming_join_request_state::State,
10169    St::ConvoId: log_withdraw_incoming_join_request_state::IsSet,
10170    St::Member: log_withdraw_incoming_join_request_state::IsSet,
10171    St::Rev: log_withdraw_incoming_join_request_state::IsSet,
10172{
10173    /// Build the final struct.
10174    pub fn build(self) -> LogWithdrawIncomingJoinRequest<S> {
10175        LogWithdrawIncomingJoinRequest {
10176            convo_id: self._fields.0.unwrap(),
10177            member: self._fields.1.unwrap(),
10178            rev: self._fields.2.unwrap(),
10179            extra_data: Default::default(),
10180        }
10181    }
10182    /// Build the final struct with custom extra_data.
10183    pub fn build_with_data(
10184        self,
10185        extra_data: BTreeMap<SmolStr, Data<S>>,
10186    ) -> LogWithdrawIncomingJoinRequest<S> {
10187        LogWithdrawIncomingJoinRequest {
10188            convo_id: self._fields.0.unwrap(),
10189            member: self._fields.1.unwrap(),
10190            rev: self._fields.2.unwrap(),
10191            extra_data: Some(extra_data),
10192        }
10193    }
10194}
10195
10196pub mod message_and_reaction_view_state {
10197
10198    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
10199    #[allow(unused)]
10200    use ::core::marker::PhantomData;
10201    mod sealed {
10202        pub trait Sealed {}
10203    }
10204    /// State trait tracking which required fields have been set
10205    pub trait State: sealed::Sealed {
10206        type Message;
10207        type Reaction;
10208    }
10209    /// Empty state - all required fields are unset
10210    pub struct Empty(());
10211    impl sealed::Sealed for Empty {}
10212    impl State for Empty {
10213        type Message = Unset;
10214        type Reaction = Unset;
10215    }
10216    ///State transition - sets the `message` field to Set
10217    pub struct SetMessage<St: State = Empty>(PhantomData<fn() -> St>);
10218    impl<St: State> sealed::Sealed for SetMessage<St> {}
10219    impl<St: State> State for SetMessage<St> {
10220        type Message = Set<members::message>;
10221        type Reaction = St::Reaction;
10222    }
10223    ///State transition - sets the `reaction` field to Set
10224    pub struct SetReaction<St: State = Empty>(PhantomData<fn() -> St>);
10225    impl<St: State> sealed::Sealed for SetReaction<St> {}
10226    impl<St: State> State for SetReaction<St> {
10227        type Message = St::Message;
10228        type Reaction = Set<members::reaction>;
10229    }
10230    /// Marker types for field names
10231    #[allow(non_camel_case_types)]
10232    pub mod members {
10233        ///Marker type for the `message` field
10234        pub struct message(());
10235        ///Marker type for the `reaction` field
10236        pub struct reaction(());
10237    }
10238}
10239
10240/// Builder for constructing an instance of this type.
10241pub struct MessageAndReactionViewBuilder<
10242    St: message_and_reaction_view_state::State,
10243    S: BosStr = DefaultStr,
10244> {
10245    _state: PhantomData<fn() -> St>,
10246    _fields: (Option<convo::MessageView<S>>, Option<convo::ReactionView<S>>),
10247    _type: PhantomData<fn() -> S>,
10248}
10249
10250impl MessageAndReactionView<DefaultStr> {
10251    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
10252    pub fn new() -> MessageAndReactionViewBuilder<
10253        message_and_reaction_view_state::Empty,
10254        DefaultStr,
10255    > {
10256        MessageAndReactionViewBuilder::new()
10257    }
10258}
10259
10260impl<S: BosStr> MessageAndReactionView<S> {
10261    /// Create a new builder for this type
10262    pub fn builder() -> MessageAndReactionViewBuilder<
10263        message_and_reaction_view_state::Empty,
10264        S,
10265    > {
10266        MessageAndReactionViewBuilder::builder()
10267    }
10268}
10269
10270impl MessageAndReactionViewBuilder<message_and_reaction_view_state::Empty, DefaultStr> {
10271    /// Create a new builder with all fields unset, using the default string type, if needed
10272    pub fn new() -> Self {
10273        MessageAndReactionViewBuilder {
10274            _state: PhantomData,
10275            _fields: (None, None),
10276            _type: PhantomData,
10277        }
10278    }
10279}
10280
10281impl<
10282    S: BosStr,
10283> MessageAndReactionViewBuilder<message_and_reaction_view_state::Empty, S> {
10284    /// Create a new builder with all fields unset
10285    pub fn builder() -> Self {
10286        MessageAndReactionViewBuilder {
10287            _state: PhantomData,
10288            _fields: (None, None),
10289            _type: PhantomData,
10290        }
10291    }
10292}
10293
10294impl<St, S: BosStr> MessageAndReactionViewBuilder<St, S>
10295where
10296    St: message_and_reaction_view_state::State,
10297    St::Message: message_and_reaction_view_state::IsUnset,
10298{
10299    /// Set the `message` field (required)
10300    pub fn message(
10301        mut self,
10302        value: impl Into<convo::MessageView<S>>,
10303    ) -> MessageAndReactionViewBuilder<
10304        message_and_reaction_view_state::SetMessage<St>,
10305        S,
10306    > {
10307        self._fields.0 = Option::Some(value.into());
10308        MessageAndReactionViewBuilder {
10309            _state: PhantomData,
10310            _fields: self._fields,
10311            _type: PhantomData,
10312        }
10313    }
10314}
10315
10316impl<St, S: BosStr> MessageAndReactionViewBuilder<St, S>
10317where
10318    St: message_and_reaction_view_state::State,
10319    St::Reaction: message_and_reaction_view_state::IsUnset,
10320{
10321    /// Set the `reaction` field (required)
10322    pub fn reaction(
10323        mut self,
10324        value: impl Into<convo::ReactionView<S>>,
10325    ) -> MessageAndReactionViewBuilder<
10326        message_and_reaction_view_state::SetReaction<St>,
10327        S,
10328    > {
10329        self._fields.1 = Option::Some(value.into());
10330        MessageAndReactionViewBuilder {
10331            _state: PhantomData,
10332            _fields: self._fields,
10333            _type: PhantomData,
10334        }
10335    }
10336}
10337
10338impl<St, S: BosStr> MessageAndReactionViewBuilder<St, S>
10339where
10340    St: message_and_reaction_view_state::State,
10341    St::Message: message_and_reaction_view_state::IsSet,
10342    St::Reaction: message_and_reaction_view_state::IsSet,
10343{
10344    /// Build the final struct.
10345    pub fn build(self) -> MessageAndReactionView<S> {
10346        MessageAndReactionView {
10347            message: self._fields.0.unwrap(),
10348            reaction: self._fields.1.unwrap(),
10349            extra_data: Default::default(),
10350        }
10351    }
10352    /// Build the final struct with custom extra_data.
10353    pub fn build_with_data(
10354        self,
10355        extra_data: BTreeMap<SmolStr, Data<S>>,
10356    ) -> MessageAndReactionView<S> {
10357        MessageAndReactionView {
10358            message: self._fields.0.unwrap(),
10359            reaction: self._fields.1.unwrap(),
10360            extra_data: Some(extra_data),
10361        }
10362    }
10363}
10364
10365pub mod message_ref_state {
10366
10367    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
10368    #[allow(unused)]
10369    use ::core::marker::PhantomData;
10370    mod sealed {
10371        pub trait Sealed {}
10372    }
10373    /// State trait tracking which required fields have been set
10374    pub trait State: sealed::Sealed {
10375        type ConvoId;
10376        type Did;
10377        type MessageId;
10378    }
10379    /// Empty state - all required fields are unset
10380    pub struct Empty(());
10381    impl sealed::Sealed for Empty {}
10382    impl State for Empty {
10383        type ConvoId = Unset;
10384        type Did = Unset;
10385        type MessageId = Unset;
10386    }
10387    ///State transition - sets the `convo_id` field to Set
10388    pub struct SetConvoId<St: State = Empty>(PhantomData<fn() -> St>);
10389    impl<St: State> sealed::Sealed for SetConvoId<St> {}
10390    impl<St: State> State for SetConvoId<St> {
10391        type ConvoId = Set<members::convo_id>;
10392        type Did = St::Did;
10393        type MessageId = St::MessageId;
10394    }
10395    ///State transition - sets the `did` field to Set
10396    pub struct SetDid<St: State = Empty>(PhantomData<fn() -> St>);
10397    impl<St: State> sealed::Sealed for SetDid<St> {}
10398    impl<St: State> State for SetDid<St> {
10399        type ConvoId = St::ConvoId;
10400        type Did = Set<members::did>;
10401        type MessageId = St::MessageId;
10402    }
10403    ///State transition - sets the `message_id` field to Set
10404    pub struct SetMessageId<St: State = Empty>(PhantomData<fn() -> St>);
10405    impl<St: State> sealed::Sealed for SetMessageId<St> {}
10406    impl<St: State> State for SetMessageId<St> {
10407        type ConvoId = St::ConvoId;
10408        type Did = St::Did;
10409        type MessageId = Set<members::message_id>;
10410    }
10411    /// Marker types for field names
10412    #[allow(non_camel_case_types)]
10413    pub mod members {
10414        ///Marker type for the `convo_id` field
10415        pub struct convo_id(());
10416        ///Marker type for the `did` field
10417        pub struct did(());
10418        ///Marker type for the `message_id` field
10419        pub struct message_id(());
10420    }
10421}
10422
10423/// Builder for constructing an instance of this type.
10424pub struct MessageRefBuilder<St: message_ref_state::State, S: BosStr = DefaultStr> {
10425    _state: PhantomData<fn() -> St>,
10426    _fields: (Option<S>, Option<Did<S>>, Option<S>),
10427    _type: PhantomData<fn() -> S>,
10428}
10429
10430impl MessageRef<DefaultStr> {
10431    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
10432    pub fn new() -> MessageRefBuilder<message_ref_state::Empty, DefaultStr> {
10433        MessageRefBuilder::new()
10434    }
10435}
10436
10437impl<S: BosStr> MessageRef<S> {
10438    /// Create a new builder for this type
10439    pub fn builder() -> MessageRefBuilder<message_ref_state::Empty, S> {
10440        MessageRefBuilder::builder()
10441    }
10442}
10443
10444impl MessageRefBuilder<message_ref_state::Empty, DefaultStr> {
10445    /// Create a new builder with all fields unset, using the default string type, if needed
10446    pub fn new() -> Self {
10447        MessageRefBuilder {
10448            _state: PhantomData,
10449            _fields: (None, None, None),
10450            _type: PhantomData,
10451        }
10452    }
10453}
10454
10455impl<S: BosStr> MessageRefBuilder<message_ref_state::Empty, S> {
10456    /// Create a new builder with all fields unset
10457    pub fn builder() -> Self {
10458        MessageRefBuilder {
10459            _state: PhantomData,
10460            _fields: (None, None, None),
10461            _type: PhantomData,
10462        }
10463    }
10464}
10465
10466impl<St, S: BosStr> MessageRefBuilder<St, S>
10467where
10468    St: message_ref_state::State,
10469    St::ConvoId: message_ref_state::IsUnset,
10470{
10471    /// Set the `convoId` field (required)
10472    pub fn convo_id(
10473        mut self,
10474        value: impl Into<S>,
10475    ) -> MessageRefBuilder<message_ref_state::SetConvoId<St>, S> {
10476        self._fields.0 = Option::Some(value.into());
10477        MessageRefBuilder {
10478            _state: PhantomData,
10479            _fields: self._fields,
10480            _type: PhantomData,
10481        }
10482    }
10483}
10484
10485impl<St, S: BosStr> MessageRefBuilder<St, S>
10486where
10487    St: message_ref_state::State,
10488    St::Did: message_ref_state::IsUnset,
10489{
10490    /// Set the `did` field (required)
10491    pub fn did(
10492        mut self,
10493        value: impl Into<Did<S>>,
10494    ) -> MessageRefBuilder<message_ref_state::SetDid<St>, S> {
10495        self._fields.1 = Option::Some(value.into());
10496        MessageRefBuilder {
10497            _state: PhantomData,
10498            _fields: self._fields,
10499            _type: PhantomData,
10500        }
10501    }
10502}
10503
10504impl<St, S: BosStr> MessageRefBuilder<St, S>
10505where
10506    St: message_ref_state::State,
10507    St::MessageId: message_ref_state::IsUnset,
10508{
10509    /// Set the `messageId` field (required)
10510    pub fn message_id(
10511        mut self,
10512        value: impl Into<S>,
10513    ) -> MessageRefBuilder<message_ref_state::SetMessageId<St>, S> {
10514        self._fields.2 = Option::Some(value.into());
10515        MessageRefBuilder {
10516            _state: PhantomData,
10517            _fields: self._fields,
10518            _type: PhantomData,
10519        }
10520    }
10521}
10522
10523impl<St, S: BosStr> MessageRefBuilder<St, S>
10524where
10525    St: message_ref_state::State,
10526    St::ConvoId: message_ref_state::IsSet,
10527    St::Did: message_ref_state::IsSet,
10528    St::MessageId: message_ref_state::IsSet,
10529{
10530    /// Build the final struct.
10531    pub fn build(self) -> MessageRef<S> {
10532        MessageRef {
10533            convo_id: self._fields.0.unwrap(),
10534            did: self._fields.1.unwrap(),
10535            message_id: self._fields.2.unwrap(),
10536            extra_data: Default::default(),
10537        }
10538    }
10539    /// Build the final struct with custom extra_data.
10540    pub fn build_with_data(
10541        self,
10542        extra_data: BTreeMap<SmolStr, Data<S>>,
10543    ) -> MessageRef<S> {
10544        MessageRef {
10545            convo_id: self._fields.0.unwrap(),
10546            did: self._fields.1.unwrap(),
10547            message_id: self._fields.2.unwrap(),
10548            extra_data: Some(extra_data),
10549        }
10550    }
10551}
10552
10553pub mod message_view_state {
10554
10555    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
10556    #[allow(unused)]
10557    use ::core::marker::PhantomData;
10558    mod sealed {
10559        pub trait Sealed {}
10560    }
10561    /// State trait tracking which required fields have been set
10562    pub trait State: sealed::Sealed {
10563        type Id;
10564        type Rev;
10565        type Sender;
10566        type SentAt;
10567        type Text;
10568    }
10569    /// Empty state - all required fields are unset
10570    pub struct Empty(());
10571    impl sealed::Sealed for Empty {}
10572    impl State for Empty {
10573        type Id = Unset;
10574        type Rev = Unset;
10575        type Sender = Unset;
10576        type SentAt = Unset;
10577        type Text = Unset;
10578    }
10579    ///State transition - sets the `id` field to Set
10580    pub struct SetId<St: State = Empty>(PhantomData<fn() -> St>);
10581    impl<St: State> sealed::Sealed for SetId<St> {}
10582    impl<St: State> State for SetId<St> {
10583        type Id = Set<members::id>;
10584        type Rev = St::Rev;
10585        type Sender = St::Sender;
10586        type SentAt = St::SentAt;
10587        type Text = St::Text;
10588    }
10589    ///State transition - sets the `rev` field to Set
10590    pub struct SetRev<St: State = Empty>(PhantomData<fn() -> St>);
10591    impl<St: State> sealed::Sealed for SetRev<St> {}
10592    impl<St: State> State for SetRev<St> {
10593        type Id = St::Id;
10594        type Rev = Set<members::rev>;
10595        type Sender = St::Sender;
10596        type SentAt = St::SentAt;
10597        type Text = St::Text;
10598    }
10599    ///State transition - sets the `sender` field to Set
10600    pub struct SetSender<St: State = Empty>(PhantomData<fn() -> St>);
10601    impl<St: State> sealed::Sealed for SetSender<St> {}
10602    impl<St: State> State for SetSender<St> {
10603        type Id = St::Id;
10604        type Rev = St::Rev;
10605        type Sender = Set<members::sender>;
10606        type SentAt = St::SentAt;
10607        type Text = St::Text;
10608    }
10609    ///State transition - sets the `sent_at` field to Set
10610    pub struct SetSentAt<St: State = Empty>(PhantomData<fn() -> St>);
10611    impl<St: State> sealed::Sealed for SetSentAt<St> {}
10612    impl<St: State> State for SetSentAt<St> {
10613        type Id = St::Id;
10614        type Rev = St::Rev;
10615        type Sender = St::Sender;
10616        type SentAt = Set<members::sent_at>;
10617        type Text = St::Text;
10618    }
10619    ///State transition - sets the `text` field to Set
10620    pub struct SetText<St: State = Empty>(PhantomData<fn() -> St>);
10621    impl<St: State> sealed::Sealed for SetText<St> {}
10622    impl<St: State> State for SetText<St> {
10623        type Id = St::Id;
10624        type Rev = St::Rev;
10625        type Sender = St::Sender;
10626        type SentAt = St::SentAt;
10627        type Text = Set<members::text>;
10628    }
10629    /// Marker types for field names
10630    #[allow(non_camel_case_types)]
10631    pub mod members {
10632        ///Marker type for the `id` field
10633        pub struct id(());
10634        ///Marker type for the `rev` field
10635        pub struct rev(());
10636        ///Marker type for the `sender` field
10637        pub struct sender(());
10638        ///Marker type for the `sent_at` field
10639        pub struct sent_at(());
10640        ///Marker type for the `text` field
10641        pub struct text(());
10642    }
10643}
10644
10645/// Builder for constructing an instance of this type.
10646pub struct MessageViewBuilder<St: message_view_state::State, S: BosStr = DefaultStr> {
10647    _state: PhantomData<fn() -> St>,
10648    _fields: (
10649        Option<MessageViewEmbed<S>>,
10650        Option<Vec<Facet<S>>>,
10651        Option<S>,
10652        Option<Vec<convo::ReactionView<S>>>,
10653        Option<MessageViewReplyTo<S>>,
10654        Option<S>,
10655        Option<convo::MessageViewSender<S>>,
10656        Option<Datetime>,
10657        Option<S>,
10658    ),
10659    _type: PhantomData<fn() -> S>,
10660}
10661
10662impl MessageView<DefaultStr> {
10663    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
10664    pub fn new() -> MessageViewBuilder<message_view_state::Empty, DefaultStr> {
10665        MessageViewBuilder::new()
10666    }
10667}
10668
10669impl<S: BosStr> MessageView<S> {
10670    /// Create a new builder for this type
10671    pub fn builder() -> MessageViewBuilder<message_view_state::Empty, S> {
10672        MessageViewBuilder::builder()
10673    }
10674}
10675
10676impl MessageViewBuilder<message_view_state::Empty, DefaultStr> {
10677    /// Create a new builder with all fields unset, using the default string type, if needed
10678    pub fn new() -> Self {
10679        MessageViewBuilder {
10680            _state: PhantomData,
10681            _fields: (None, None, None, None, None, None, None, None, None),
10682            _type: PhantomData,
10683        }
10684    }
10685}
10686
10687impl<S: BosStr> MessageViewBuilder<message_view_state::Empty, S> {
10688    /// Create a new builder with all fields unset
10689    pub fn builder() -> Self {
10690        MessageViewBuilder {
10691            _state: PhantomData,
10692            _fields: (None, None, None, None, None, None, None, None, None),
10693            _type: PhantomData,
10694        }
10695    }
10696}
10697
10698impl<St: message_view_state::State, S: BosStr> MessageViewBuilder<St, S> {
10699    /// Set the `embed` field (optional)
10700    pub fn embed(mut self, value: impl Into<Option<MessageViewEmbed<S>>>) -> Self {
10701        self._fields.0 = value.into();
10702        self
10703    }
10704    /// Set the `embed` field to an Option value (optional)
10705    pub fn maybe_embed(mut self, value: Option<MessageViewEmbed<S>>) -> Self {
10706        self._fields.0 = value;
10707        self
10708    }
10709}
10710
10711impl<St: message_view_state::State, S: BosStr> MessageViewBuilder<St, S> {
10712    /// Set the `facets` field (optional)
10713    pub fn facets(mut self, value: impl Into<Option<Vec<Facet<S>>>>) -> Self {
10714        self._fields.1 = value.into();
10715        self
10716    }
10717    /// Set the `facets` field to an Option value (optional)
10718    pub fn maybe_facets(mut self, value: Option<Vec<Facet<S>>>) -> Self {
10719        self._fields.1 = value;
10720        self
10721    }
10722}
10723
10724impl<St, S: BosStr> MessageViewBuilder<St, S>
10725where
10726    St: message_view_state::State,
10727    St::Id: message_view_state::IsUnset,
10728{
10729    /// Set the `id` field (required)
10730    pub fn id(
10731        mut self,
10732        value: impl Into<S>,
10733    ) -> MessageViewBuilder<message_view_state::SetId<St>, S> {
10734        self._fields.2 = Option::Some(value.into());
10735        MessageViewBuilder {
10736            _state: PhantomData,
10737            _fields: self._fields,
10738            _type: PhantomData,
10739        }
10740    }
10741}
10742
10743impl<St: message_view_state::State, S: BosStr> MessageViewBuilder<St, S> {
10744    /// Set the `reactions` field (optional)
10745    pub fn reactions(
10746        mut self,
10747        value: impl Into<Option<Vec<convo::ReactionView<S>>>>,
10748    ) -> Self {
10749        self._fields.3 = value.into();
10750        self
10751    }
10752    /// Set the `reactions` field to an Option value (optional)
10753    pub fn maybe_reactions(
10754        mut self,
10755        value: Option<Vec<convo::ReactionView<S>>>,
10756    ) -> Self {
10757        self._fields.3 = value;
10758        self
10759    }
10760}
10761
10762impl<St: message_view_state::State, S: BosStr> MessageViewBuilder<St, S> {
10763    /// Set the `replyTo` field (optional)
10764    pub fn reply_to(mut self, value: impl Into<Option<MessageViewReplyTo<S>>>) -> Self {
10765        self._fields.4 = value.into();
10766        self
10767    }
10768    /// Set the `replyTo` field to an Option value (optional)
10769    pub fn maybe_reply_to(mut self, value: Option<MessageViewReplyTo<S>>) -> Self {
10770        self._fields.4 = value;
10771        self
10772    }
10773}
10774
10775impl<St, S: BosStr> MessageViewBuilder<St, S>
10776where
10777    St: message_view_state::State,
10778    St::Rev: message_view_state::IsUnset,
10779{
10780    /// Set the `rev` field (required)
10781    pub fn rev(
10782        mut self,
10783        value: impl Into<S>,
10784    ) -> MessageViewBuilder<message_view_state::SetRev<St>, S> {
10785        self._fields.5 = Option::Some(value.into());
10786        MessageViewBuilder {
10787            _state: PhantomData,
10788            _fields: self._fields,
10789            _type: PhantomData,
10790        }
10791    }
10792}
10793
10794impl<St, S: BosStr> MessageViewBuilder<St, S>
10795where
10796    St: message_view_state::State,
10797    St::Sender: message_view_state::IsUnset,
10798{
10799    /// Set the `sender` field (required)
10800    pub fn sender(
10801        mut self,
10802        value: impl Into<convo::MessageViewSender<S>>,
10803    ) -> MessageViewBuilder<message_view_state::SetSender<St>, S> {
10804        self._fields.6 = Option::Some(value.into());
10805        MessageViewBuilder {
10806            _state: PhantomData,
10807            _fields: self._fields,
10808            _type: PhantomData,
10809        }
10810    }
10811}
10812
10813impl<St, S: BosStr> MessageViewBuilder<St, S>
10814where
10815    St: message_view_state::State,
10816    St::SentAt: message_view_state::IsUnset,
10817{
10818    /// Set the `sentAt` field (required)
10819    pub fn sent_at(
10820        mut self,
10821        value: impl Into<Datetime>,
10822    ) -> MessageViewBuilder<message_view_state::SetSentAt<St>, S> {
10823        self._fields.7 = Option::Some(value.into());
10824        MessageViewBuilder {
10825            _state: PhantomData,
10826            _fields: self._fields,
10827            _type: PhantomData,
10828        }
10829    }
10830}
10831
10832impl<St, S: BosStr> MessageViewBuilder<St, S>
10833where
10834    St: message_view_state::State,
10835    St::Text: message_view_state::IsUnset,
10836{
10837    /// Set the `text` field (required)
10838    pub fn text(
10839        mut self,
10840        value: impl Into<S>,
10841    ) -> MessageViewBuilder<message_view_state::SetText<St>, S> {
10842        self._fields.8 = Option::Some(value.into());
10843        MessageViewBuilder {
10844            _state: PhantomData,
10845            _fields: self._fields,
10846            _type: PhantomData,
10847        }
10848    }
10849}
10850
10851impl<St, S: BosStr> MessageViewBuilder<St, S>
10852where
10853    St: message_view_state::State,
10854    St::Id: message_view_state::IsSet,
10855    St::Rev: message_view_state::IsSet,
10856    St::Sender: message_view_state::IsSet,
10857    St::SentAt: message_view_state::IsSet,
10858    St::Text: message_view_state::IsSet,
10859{
10860    /// Build the final struct.
10861    pub fn build(self) -> MessageView<S> {
10862        MessageView {
10863            embed: self._fields.0,
10864            facets: self._fields.1,
10865            id: self._fields.2.unwrap(),
10866            reactions: self._fields.3,
10867            reply_to: self._fields.4,
10868            rev: self._fields.5.unwrap(),
10869            sender: self._fields.6.unwrap(),
10870            sent_at: self._fields.7.unwrap(),
10871            text: self._fields.8.unwrap(),
10872            extra_data: Default::default(),
10873        }
10874    }
10875    /// Build the final struct with custom extra_data.
10876    pub fn build_with_data(
10877        self,
10878        extra_data: BTreeMap<SmolStr, Data<S>>,
10879    ) -> MessageView<S> {
10880        MessageView {
10881            embed: self._fields.0,
10882            facets: self._fields.1,
10883            id: self._fields.2.unwrap(),
10884            reactions: self._fields.3,
10885            reply_to: self._fields.4,
10886            rev: self._fields.5.unwrap(),
10887            sender: self._fields.6.unwrap(),
10888            sent_at: self._fields.7.unwrap(),
10889            text: self._fields.8.unwrap(),
10890            extra_data: Some(extra_data),
10891        }
10892    }
10893}
10894
10895pub mod message_view_sender_state {
10896
10897    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
10898    #[allow(unused)]
10899    use ::core::marker::PhantomData;
10900    mod sealed {
10901        pub trait Sealed {}
10902    }
10903    /// State trait tracking which required fields have been set
10904    pub trait State: sealed::Sealed {
10905        type Did;
10906    }
10907    /// Empty state - all required fields are unset
10908    pub struct Empty(());
10909    impl sealed::Sealed for Empty {}
10910    impl State for Empty {
10911        type Did = Unset;
10912    }
10913    ///State transition - sets the `did` field to Set
10914    pub struct SetDid<St: State = Empty>(PhantomData<fn() -> St>);
10915    impl<St: State> sealed::Sealed for SetDid<St> {}
10916    impl<St: State> State for SetDid<St> {
10917        type Did = Set<members::did>;
10918    }
10919    /// Marker types for field names
10920    #[allow(non_camel_case_types)]
10921    pub mod members {
10922        ///Marker type for the `did` field
10923        pub struct did(());
10924    }
10925}
10926
10927/// Builder for constructing an instance of this type.
10928pub struct MessageViewSenderBuilder<
10929    St: message_view_sender_state::State,
10930    S: BosStr = DefaultStr,
10931> {
10932    _state: PhantomData<fn() -> St>,
10933    _fields: (Option<Did<S>>,),
10934    _type: PhantomData<fn() -> S>,
10935}
10936
10937impl MessageViewSender<DefaultStr> {
10938    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
10939    pub fn new() -> MessageViewSenderBuilder<
10940        message_view_sender_state::Empty,
10941        DefaultStr,
10942    > {
10943        MessageViewSenderBuilder::new()
10944    }
10945}
10946
10947impl<S: BosStr> MessageViewSender<S> {
10948    /// Create a new builder for this type
10949    pub fn builder() -> MessageViewSenderBuilder<message_view_sender_state::Empty, S> {
10950        MessageViewSenderBuilder::builder()
10951    }
10952}
10953
10954impl MessageViewSenderBuilder<message_view_sender_state::Empty, DefaultStr> {
10955    /// Create a new builder with all fields unset, using the default string type, if needed
10956    pub fn new() -> Self {
10957        MessageViewSenderBuilder {
10958            _state: PhantomData,
10959            _fields: (None,),
10960            _type: PhantomData,
10961        }
10962    }
10963}
10964
10965impl<S: BosStr> MessageViewSenderBuilder<message_view_sender_state::Empty, S> {
10966    /// Create a new builder with all fields unset
10967    pub fn builder() -> Self {
10968        MessageViewSenderBuilder {
10969            _state: PhantomData,
10970            _fields: (None,),
10971            _type: PhantomData,
10972        }
10973    }
10974}
10975
10976impl<St, S: BosStr> MessageViewSenderBuilder<St, S>
10977where
10978    St: message_view_sender_state::State,
10979    St::Did: message_view_sender_state::IsUnset,
10980{
10981    /// Set the `did` field (required)
10982    pub fn did(
10983        mut self,
10984        value: impl Into<Did<S>>,
10985    ) -> MessageViewSenderBuilder<message_view_sender_state::SetDid<St>, S> {
10986        self._fields.0 = Option::Some(value.into());
10987        MessageViewSenderBuilder {
10988            _state: PhantomData,
10989            _fields: self._fields,
10990            _type: PhantomData,
10991        }
10992    }
10993}
10994
10995impl<St, S: BosStr> MessageViewSenderBuilder<St, S>
10996where
10997    St: message_view_sender_state::State,
10998    St::Did: message_view_sender_state::IsSet,
10999{
11000    /// Build the final struct.
11001    pub fn build(self) -> MessageViewSender<S> {
11002        MessageViewSender {
11003            did: self._fields.0.unwrap(),
11004            extra_data: Default::default(),
11005        }
11006    }
11007    /// Build the final struct with custom extra_data.
11008    pub fn build_with_data(
11009        self,
11010        extra_data: BTreeMap<SmolStr, Data<S>>,
11011    ) -> MessageViewSender<S> {
11012        MessageViewSender {
11013            did: self._fields.0.unwrap(),
11014            extra_data: Some(extra_data),
11015        }
11016    }
11017}
11018
11019pub mod reaction_view_state {
11020
11021    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
11022    #[allow(unused)]
11023    use ::core::marker::PhantomData;
11024    mod sealed {
11025        pub trait Sealed {}
11026    }
11027    /// State trait tracking which required fields have been set
11028    pub trait State: sealed::Sealed {
11029        type CreatedAt;
11030        type Sender;
11031        type Value;
11032    }
11033    /// Empty state - all required fields are unset
11034    pub struct Empty(());
11035    impl sealed::Sealed for Empty {}
11036    impl State for Empty {
11037        type CreatedAt = Unset;
11038        type Sender = Unset;
11039        type Value = Unset;
11040    }
11041    ///State transition - sets the `created_at` field to Set
11042    pub struct SetCreatedAt<St: State = Empty>(PhantomData<fn() -> St>);
11043    impl<St: State> sealed::Sealed for SetCreatedAt<St> {}
11044    impl<St: State> State for SetCreatedAt<St> {
11045        type CreatedAt = Set<members::created_at>;
11046        type Sender = St::Sender;
11047        type Value = St::Value;
11048    }
11049    ///State transition - sets the `sender` field to Set
11050    pub struct SetSender<St: State = Empty>(PhantomData<fn() -> St>);
11051    impl<St: State> sealed::Sealed for SetSender<St> {}
11052    impl<St: State> State for SetSender<St> {
11053        type CreatedAt = St::CreatedAt;
11054        type Sender = Set<members::sender>;
11055        type Value = St::Value;
11056    }
11057    ///State transition - sets the `value` field to Set
11058    pub struct SetValue<St: State = Empty>(PhantomData<fn() -> St>);
11059    impl<St: State> sealed::Sealed for SetValue<St> {}
11060    impl<St: State> State for SetValue<St> {
11061        type CreatedAt = St::CreatedAt;
11062        type Sender = St::Sender;
11063        type Value = Set<members::value>;
11064    }
11065    /// Marker types for field names
11066    #[allow(non_camel_case_types)]
11067    pub mod members {
11068        ///Marker type for the `created_at` field
11069        pub struct created_at(());
11070        ///Marker type for the `sender` field
11071        pub struct sender(());
11072        ///Marker type for the `value` field
11073        pub struct value(());
11074    }
11075}
11076
11077/// Builder for constructing an instance of this type.
11078pub struct ReactionViewBuilder<St: reaction_view_state::State, S: BosStr = DefaultStr> {
11079    _state: PhantomData<fn() -> St>,
11080    _fields: (Option<Datetime>, Option<convo::ReactionViewSender<S>>, Option<S>),
11081    _type: PhantomData<fn() -> S>,
11082}
11083
11084impl ReactionView<DefaultStr> {
11085    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
11086    pub fn new() -> ReactionViewBuilder<reaction_view_state::Empty, DefaultStr> {
11087        ReactionViewBuilder::new()
11088    }
11089}
11090
11091impl<S: BosStr> ReactionView<S> {
11092    /// Create a new builder for this type
11093    pub fn builder() -> ReactionViewBuilder<reaction_view_state::Empty, S> {
11094        ReactionViewBuilder::builder()
11095    }
11096}
11097
11098impl ReactionViewBuilder<reaction_view_state::Empty, DefaultStr> {
11099    /// Create a new builder with all fields unset, using the default string type, if needed
11100    pub fn new() -> Self {
11101        ReactionViewBuilder {
11102            _state: PhantomData,
11103            _fields: (None, None, None),
11104            _type: PhantomData,
11105        }
11106    }
11107}
11108
11109impl<S: BosStr> ReactionViewBuilder<reaction_view_state::Empty, S> {
11110    /// Create a new builder with all fields unset
11111    pub fn builder() -> Self {
11112        ReactionViewBuilder {
11113            _state: PhantomData,
11114            _fields: (None, None, None),
11115            _type: PhantomData,
11116        }
11117    }
11118}
11119
11120impl<St, S: BosStr> ReactionViewBuilder<St, S>
11121where
11122    St: reaction_view_state::State,
11123    St::CreatedAt: reaction_view_state::IsUnset,
11124{
11125    /// Set the `createdAt` field (required)
11126    pub fn created_at(
11127        mut self,
11128        value: impl Into<Datetime>,
11129    ) -> ReactionViewBuilder<reaction_view_state::SetCreatedAt<St>, S> {
11130        self._fields.0 = Option::Some(value.into());
11131        ReactionViewBuilder {
11132            _state: PhantomData,
11133            _fields: self._fields,
11134            _type: PhantomData,
11135        }
11136    }
11137}
11138
11139impl<St, S: BosStr> ReactionViewBuilder<St, S>
11140where
11141    St: reaction_view_state::State,
11142    St::Sender: reaction_view_state::IsUnset,
11143{
11144    /// Set the `sender` field (required)
11145    pub fn sender(
11146        mut self,
11147        value: impl Into<convo::ReactionViewSender<S>>,
11148    ) -> ReactionViewBuilder<reaction_view_state::SetSender<St>, S> {
11149        self._fields.1 = Option::Some(value.into());
11150        ReactionViewBuilder {
11151            _state: PhantomData,
11152            _fields: self._fields,
11153            _type: PhantomData,
11154        }
11155    }
11156}
11157
11158impl<St, S: BosStr> ReactionViewBuilder<St, S>
11159where
11160    St: reaction_view_state::State,
11161    St::Value: reaction_view_state::IsUnset,
11162{
11163    /// Set the `value` field (required)
11164    pub fn value(
11165        mut self,
11166        value: impl Into<S>,
11167    ) -> ReactionViewBuilder<reaction_view_state::SetValue<St>, S> {
11168        self._fields.2 = Option::Some(value.into());
11169        ReactionViewBuilder {
11170            _state: PhantomData,
11171            _fields: self._fields,
11172            _type: PhantomData,
11173        }
11174    }
11175}
11176
11177impl<St, S: BosStr> ReactionViewBuilder<St, S>
11178where
11179    St: reaction_view_state::State,
11180    St::CreatedAt: reaction_view_state::IsSet,
11181    St::Sender: reaction_view_state::IsSet,
11182    St::Value: reaction_view_state::IsSet,
11183{
11184    /// Build the final struct.
11185    pub fn build(self) -> ReactionView<S> {
11186        ReactionView {
11187            created_at: self._fields.0.unwrap(),
11188            sender: self._fields.1.unwrap(),
11189            value: self._fields.2.unwrap(),
11190            extra_data: Default::default(),
11191        }
11192    }
11193    /// Build the final struct with custom extra_data.
11194    pub fn build_with_data(
11195        self,
11196        extra_data: BTreeMap<SmolStr, Data<S>>,
11197    ) -> ReactionView<S> {
11198        ReactionView {
11199            created_at: self._fields.0.unwrap(),
11200            sender: self._fields.1.unwrap(),
11201            value: self._fields.2.unwrap(),
11202            extra_data: Some(extra_data),
11203        }
11204    }
11205}
11206
11207pub mod reaction_view_sender_state {
11208
11209    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
11210    #[allow(unused)]
11211    use ::core::marker::PhantomData;
11212    mod sealed {
11213        pub trait Sealed {}
11214    }
11215    /// State trait tracking which required fields have been set
11216    pub trait State: sealed::Sealed {
11217        type Did;
11218    }
11219    /// Empty state - all required fields are unset
11220    pub struct Empty(());
11221    impl sealed::Sealed for Empty {}
11222    impl State for Empty {
11223        type Did = Unset;
11224    }
11225    ///State transition - sets the `did` field to Set
11226    pub struct SetDid<St: State = Empty>(PhantomData<fn() -> St>);
11227    impl<St: State> sealed::Sealed for SetDid<St> {}
11228    impl<St: State> State for SetDid<St> {
11229        type Did = Set<members::did>;
11230    }
11231    /// Marker types for field names
11232    #[allow(non_camel_case_types)]
11233    pub mod members {
11234        ///Marker type for the `did` field
11235        pub struct did(());
11236    }
11237}
11238
11239/// Builder for constructing an instance of this type.
11240pub struct ReactionViewSenderBuilder<
11241    St: reaction_view_sender_state::State,
11242    S: BosStr = DefaultStr,
11243> {
11244    _state: PhantomData<fn() -> St>,
11245    _fields: (Option<Did<S>>,),
11246    _type: PhantomData<fn() -> S>,
11247}
11248
11249impl ReactionViewSender<DefaultStr> {
11250    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
11251    pub fn new() -> ReactionViewSenderBuilder<
11252        reaction_view_sender_state::Empty,
11253        DefaultStr,
11254    > {
11255        ReactionViewSenderBuilder::new()
11256    }
11257}
11258
11259impl<S: BosStr> ReactionViewSender<S> {
11260    /// Create a new builder for this type
11261    pub fn builder() -> ReactionViewSenderBuilder<reaction_view_sender_state::Empty, S> {
11262        ReactionViewSenderBuilder::builder()
11263    }
11264}
11265
11266impl ReactionViewSenderBuilder<reaction_view_sender_state::Empty, DefaultStr> {
11267    /// Create a new builder with all fields unset, using the default string type, if needed
11268    pub fn new() -> Self {
11269        ReactionViewSenderBuilder {
11270            _state: PhantomData,
11271            _fields: (None,),
11272            _type: PhantomData,
11273        }
11274    }
11275}
11276
11277impl<S: BosStr> ReactionViewSenderBuilder<reaction_view_sender_state::Empty, S> {
11278    /// Create a new builder with all fields unset
11279    pub fn builder() -> Self {
11280        ReactionViewSenderBuilder {
11281            _state: PhantomData,
11282            _fields: (None,),
11283            _type: PhantomData,
11284        }
11285    }
11286}
11287
11288impl<St, S: BosStr> ReactionViewSenderBuilder<St, S>
11289where
11290    St: reaction_view_sender_state::State,
11291    St::Did: reaction_view_sender_state::IsUnset,
11292{
11293    /// Set the `did` field (required)
11294    pub fn did(
11295        mut self,
11296        value: impl Into<Did<S>>,
11297    ) -> ReactionViewSenderBuilder<reaction_view_sender_state::SetDid<St>, S> {
11298        self._fields.0 = Option::Some(value.into());
11299        ReactionViewSenderBuilder {
11300            _state: PhantomData,
11301            _fields: self._fields,
11302            _type: PhantomData,
11303        }
11304    }
11305}
11306
11307impl<St, S: BosStr> ReactionViewSenderBuilder<St, S>
11308where
11309    St: reaction_view_sender_state::State,
11310    St::Did: reaction_view_sender_state::IsSet,
11311{
11312    /// Build the final struct.
11313    pub fn build(self) -> ReactionViewSender<S> {
11314        ReactionViewSender {
11315            did: self._fields.0.unwrap(),
11316            extra_data: Default::default(),
11317        }
11318    }
11319    /// Build the final struct with custom extra_data.
11320    pub fn build_with_data(
11321        self,
11322        extra_data: BTreeMap<SmolStr, Data<S>>,
11323    ) -> ReactionViewSender<S> {
11324        ReactionViewSender {
11325            did: self._fields.0.unwrap(),
11326            extra_data: Some(extra_data),
11327        }
11328    }
11329}
11330
11331pub mod system_message_data_add_member_state {
11332
11333    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
11334    #[allow(unused)]
11335    use ::core::marker::PhantomData;
11336    mod sealed {
11337        pub trait Sealed {}
11338    }
11339    /// State trait tracking which required fields have been set
11340    pub trait State: sealed::Sealed {
11341        type AddedBy;
11342        type Member;
11343        type Role;
11344    }
11345    /// Empty state - all required fields are unset
11346    pub struct Empty(());
11347    impl sealed::Sealed for Empty {}
11348    impl State for Empty {
11349        type AddedBy = Unset;
11350        type Member = Unset;
11351        type Role = Unset;
11352    }
11353    ///State transition - sets the `added_by` field to Set
11354    pub struct SetAddedBy<St: State = Empty>(PhantomData<fn() -> St>);
11355    impl<St: State> sealed::Sealed for SetAddedBy<St> {}
11356    impl<St: State> State for SetAddedBy<St> {
11357        type AddedBy = Set<members::added_by>;
11358        type Member = St::Member;
11359        type Role = St::Role;
11360    }
11361    ///State transition - sets the `member` field to Set
11362    pub struct SetMember<St: State = Empty>(PhantomData<fn() -> St>);
11363    impl<St: State> sealed::Sealed for SetMember<St> {}
11364    impl<St: State> State for SetMember<St> {
11365        type AddedBy = St::AddedBy;
11366        type Member = Set<members::member>;
11367        type Role = St::Role;
11368    }
11369    ///State transition - sets the `role` field to Set
11370    pub struct SetRole<St: State = Empty>(PhantomData<fn() -> St>);
11371    impl<St: State> sealed::Sealed for SetRole<St> {}
11372    impl<St: State> State for SetRole<St> {
11373        type AddedBy = St::AddedBy;
11374        type Member = St::Member;
11375        type Role = Set<members::role>;
11376    }
11377    /// Marker types for field names
11378    #[allow(non_camel_case_types)]
11379    pub mod members {
11380        ///Marker type for the `added_by` field
11381        pub struct added_by(());
11382        ///Marker type for the `member` field
11383        pub struct member(());
11384        ///Marker type for the `role` field
11385        pub struct role(());
11386    }
11387}
11388
11389/// Builder for constructing an instance of this type.
11390pub struct SystemMessageDataAddMemberBuilder<
11391    St: system_message_data_add_member_state::State,
11392    S: BosStr = DefaultStr,
11393> {
11394    _state: PhantomData<fn() -> St>,
11395    _fields: (
11396        Option<convo::SystemMessageReferredUser<S>>,
11397        Option<convo::SystemMessageReferredUser<S>>,
11398        Option<MemberRole<S>>,
11399    ),
11400    _type: PhantomData<fn() -> S>,
11401}
11402
11403impl SystemMessageDataAddMember<DefaultStr> {
11404    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
11405    pub fn new() -> SystemMessageDataAddMemberBuilder<
11406        system_message_data_add_member_state::Empty,
11407        DefaultStr,
11408    > {
11409        SystemMessageDataAddMemberBuilder::new()
11410    }
11411}
11412
11413impl<S: BosStr> SystemMessageDataAddMember<S> {
11414    /// Create a new builder for this type
11415    pub fn builder() -> SystemMessageDataAddMemberBuilder<
11416        system_message_data_add_member_state::Empty,
11417        S,
11418    > {
11419        SystemMessageDataAddMemberBuilder::builder()
11420    }
11421}
11422
11423impl SystemMessageDataAddMemberBuilder<
11424    system_message_data_add_member_state::Empty,
11425    DefaultStr,
11426> {
11427    /// Create a new builder with all fields unset, using the default string type, if needed
11428    pub fn new() -> Self {
11429        SystemMessageDataAddMemberBuilder {
11430            _state: PhantomData,
11431            _fields: (None, None, None),
11432            _type: PhantomData,
11433        }
11434    }
11435}
11436
11437impl<
11438    S: BosStr,
11439> SystemMessageDataAddMemberBuilder<system_message_data_add_member_state::Empty, S> {
11440    /// Create a new builder with all fields unset
11441    pub fn builder() -> Self {
11442        SystemMessageDataAddMemberBuilder {
11443            _state: PhantomData,
11444            _fields: (None, None, None),
11445            _type: PhantomData,
11446        }
11447    }
11448}
11449
11450impl<St, S: BosStr> SystemMessageDataAddMemberBuilder<St, S>
11451where
11452    St: system_message_data_add_member_state::State,
11453    St::AddedBy: system_message_data_add_member_state::IsUnset,
11454{
11455    /// Set the `addedBy` field (required)
11456    pub fn added_by(
11457        mut self,
11458        value: impl Into<convo::SystemMessageReferredUser<S>>,
11459    ) -> SystemMessageDataAddMemberBuilder<
11460        system_message_data_add_member_state::SetAddedBy<St>,
11461        S,
11462    > {
11463        self._fields.0 = Option::Some(value.into());
11464        SystemMessageDataAddMemberBuilder {
11465            _state: PhantomData,
11466            _fields: self._fields,
11467            _type: PhantomData,
11468        }
11469    }
11470}
11471
11472impl<St, S: BosStr> SystemMessageDataAddMemberBuilder<St, S>
11473where
11474    St: system_message_data_add_member_state::State,
11475    St::Member: system_message_data_add_member_state::IsUnset,
11476{
11477    /// Set the `member` field (required)
11478    pub fn member(
11479        mut self,
11480        value: impl Into<convo::SystemMessageReferredUser<S>>,
11481    ) -> SystemMessageDataAddMemberBuilder<
11482        system_message_data_add_member_state::SetMember<St>,
11483        S,
11484    > {
11485        self._fields.1 = Option::Some(value.into());
11486        SystemMessageDataAddMemberBuilder {
11487            _state: PhantomData,
11488            _fields: self._fields,
11489            _type: PhantomData,
11490        }
11491    }
11492}
11493
11494impl<St, S: BosStr> SystemMessageDataAddMemberBuilder<St, S>
11495where
11496    St: system_message_data_add_member_state::State,
11497    St::Role: system_message_data_add_member_state::IsUnset,
11498{
11499    /// Set the `role` field (required)
11500    pub fn role(
11501        mut self,
11502        value: impl Into<MemberRole<S>>,
11503    ) -> SystemMessageDataAddMemberBuilder<
11504        system_message_data_add_member_state::SetRole<St>,
11505        S,
11506    > {
11507        self._fields.2 = Option::Some(value.into());
11508        SystemMessageDataAddMemberBuilder {
11509            _state: PhantomData,
11510            _fields: self._fields,
11511            _type: PhantomData,
11512        }
11513    }
11514}
11515
11516impl<St, S: BosStr> SystemMessageDataAddMemberBuilder<St, S>
11517where
11518    St: system_message_data_add_member_state::State,
11519    St::AddedBy: system_message_data_add_member_state::IsSet,
11520    St::Member: system_message_data_add_member_state::IsSet,
11521    St::Role: system_message_data_add_member_state::IsSet,
11522{
11523    /// Build the final struct.
11524    pub fn build(self) -> SystemMessageDataAddMember<S> {
11525        SystemMessageDataAddMember {
11526            added_by: self._fields.0.unwrap(),
11527            member: self._fields.1.unwrap(),
11528            role: self._fields.2.unwrap(),
11529            extra_data: Default::default(),
11530        }
11531    }
11532    /// Build the final struct with custom extra_data.
11533    pub fn build_with_data(
11534        self,
11535        extra_data: BTreeMap<SmolStr, Data<S>>,
11536    ) -> SystemMessageDataAddMember<S> {
11537        SystemMessageDataAddMember {
11538            added_by: self._fields.0.unwrap(),
11539            member: self._fields.1.unwrap(),
11540            role: self._fields.2.unwrap(),
11541            extra_data: Some(extra_data),
11542        }
11543    }
11544}
11545
11546pub mod system_message_data_lock_convo_state {
11547
11548    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
11549    #[allow(unused)]
11550    use ::core::marker::PhantomData;
11551    mod sealed {
11552        pub trait Sealed {}
11553    }
11554    /// State trait tracking which required fields have been set
11555    pub trait State: sealed::Sealed {
11556        type LockedBy;
11557    }
11558    /// Empty state - all required fields are unset
11559    pub struct Empty(());
11560    impl sealed::Sealed for Empty {}
11561    impl State for Empty {
11562        type LockedBy = Unset;
11563    }
11564    ///State transition - sets the `locked_by` field to Set
11565    pub struct SetLockedBy<St: State = Empty>(PhantomData<fn() -> St>);
11566    impl<St: State> sealed::Sealed for SetLockedBy<St> {}
11567    impl<St: State> State for SetLockedBy<St> {
11568        type LockedBy = Set<members::locked_by>;
11569    }
11570    /// Marker types for field names
11571    #[allow(non_camel_case_types)]
11572    pub mod members {
11573        ///Marker type for the `locked_by` field
11574        pub struct locked_by(());
11575    }
11576}
11577
11578/// Builder for constructing an instance of this type.
11579pub struct SystemMessageDataLockConvoBuilder<
11580    St: system_message_data_lock_convo_state::State,
11581    S: BosStr = DefaultStr,
11582> {
11583    _state: PhantomData<fn() -> St>,
11584    _fields: (Option<convo::SystemMessageReferredUser<S>>,),
11585    _type: PhantomData<fn() -> S>,
11586}
11587
11588impl SystemMessageDataLockConvo<DefaultStr> {
11589    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
11590    pub fn new() -> SystemMessageDataLockConvoBuilder<
11591        system_message_data_lock_convo_state::Empty,
11592        DefaultStr,
11593    > {
11594        SystemMessageDataLockConvoBuilder::new()
11595    }
11596}
11597
11598impl<S: BosStr> SystemMessageDataLockConvo<S> {
11599    /// Create a new builder for this type
11600    pub fn builder() -> SystemMessageDataLockConvoBuilder<
11601        system_message_data_lock_convo_state::Empty,
11602        S,
11603    > {
11604        SystemMessageDataLockConvoBuilder::builder()
11605    }
11606}
11607
11608impl SystemMessageDataLockConvoBuilder<
11609    system_message_data_lock_convo_state::Empty,
11610    DefaultStr,
11611> {
11612    /// Create a new builder with all fields unset, using the default string type, if needed
11613    pub fn new() -> Self {
11614        SystemMessageDataLockConvoBuilder {
11615            _state: PhantomData,
11616            _fields: (None,),
11617            _type: PhantomData,
11618        }
11619    }
11620}
11621
11622impl<
11623    S: BosStr,
11624> SystemMessageDataLockConvoBuilder<system_message_data_lock_convo_state::Empty, S> {
11625    /// Create a new builder with all fields unset
11626    pub fn builder() -> Self {
11627        SystemMessageDataLockConvoBuilder {
11628            _state: PhantomData,
11629            _fields: (None,),
11630            _type: PhantomData,
11631        }
11632    }
11633}
11634
11635impl<St, S: BosStr> SystemMessageDataLockConvoBuilder<St, S>
11636where
11637    St: system_message_data_lock_convo_state::State,
11638    St::LockedBy: system_message_data_lock_convo_state::IsUnset,
11639{
11640    /// Set the `lockedBy` field (required)
11641    pub fn locked_by(
11642        mut self,
11643        value: impl Into<convo::SystemMessageReferredUser<S>>,
11644    ) -> SystemMessageDataLockConvoBuilder<
11645        system_message_data_lock_convo_state::SetLockedBy<St>,
11646        S,
11647    > {
11648        self._fields.0 = Option::Some(value.into());
11649        SystemMessageDataLockConvoBuilder {
11650            _state: PhantomData,
11651            _fields: self._fields,
11652            _type: PhantomData,
11653        }
11654    }
11655}
11656
11657impl<St, S: BosStr> SystemMessageDataLockConvoBuilder<St, S>
11658where
11659    St: system_message_data_lock_convo_state::State,
11660    St::LockedBy: system_message_data_lock_convo_state::IsSet,
11661{
11662    /// Build the final struct.
11663    pub fn build(self) -> SystemMessageDataLockConvo<S> {
11664        SystemMessageDataLockConvo {
11665            locked_by: self._fields.0.unwrap(),
11666            extra_data: Default::default(),
11667        }
11668    }
11669    /// Build the final struct with custom extra_data.
11670    pub fn build_with_data(
11671        self,
11672        extra_data: BTreeMap<SmolStr, Data<S>>,
11673    ) -> SystemMessageDataLockConvo<S> {
11674        SystemMessageDataLockConvo {
11675            locked_by: self._fields.0.unwrap(),
11676            extra_data: Some(extra_data),
11677        }
11678    }
11679}
11680
11681pub mod system_message_data_lock_convo_permanently_state {
11682
11683    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
11684    #[allow(unused)]
11685    use ::core::marker::PhantomData;
11686    mod sealed {
11687        pub trait Sealed {}
11688    }
11689    /// State trait tracking which required fields have been set
11690    pub trait State: sealed::Sealed {
11691        type LockedBy;
11692    }
11693    /// Empty state - all required fields are unset
11694    pub struct Empty(());
11695    impl sealed::Sealed for Empty {}
11696    impl State for Empty {
11697        type LockedBy = Unset;
11698    }
11699    ///State transition - sets the `locked_by` field to Set
11700    pub struct SetLockedBy<St: State = Empty>(PhantomData<fn() -> St>);
11701    impl<St: State> sealed::Sealed for SetLockedBy<St> {}
11702    impl<St: State> State for SetLockedBy<St> {
11703        type LockedBy = Set<members::locked_by>;
11704    }
11705    /// Marker types for field names
11706    #[allow(non_camel_case_types)]
11707    pub mod members {
11708        ///Marker type for the `locked_by` field
11709        pub struct locked_by(());
11710    }
11711}
11712
11713/// Builder for constructing an instance of this type.
11714pub struct SystemMessageDataLockConvoPermanentlyBuilder<
11715    St: system_message_data_lock_convo_permanently_state::State,
11716    S: BosStr = DefaultStr,
11717> {
11718    _state: PhantomData<fn() -> St>,
11719    _fields: (Option<convo::SystemMessageReferredUser<S>>,),
11720    _type: PhantomData<fn() -> S>,
11721}
11722
11723impl SystemMessageDataLockConvoPermanently<DefaultStr> {
11724    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
11725    pub fn new() -> SystemMessageDataLockConvoPermanentlyBuilder<
11726        system_message_data_lock_convo_permanently_state::Empty,
11727        DefaultStr,
11728    > {
11729        SystemMessageDataLockConvoPermanentlyBuilder::new()
11730    }
11731}
11732
11733impl<S: BosStr> SystemMessageDataLockConvoPermanently<S> {
11734    /// Create a new builder for this type
11735    pub fn builder() -> SystemMessageDataLockConvoPermanentlyBuilder<
11736        system_message_data_lock_convo_permanently_state::Empty,
11737        S,
11738    > {
11739        SystemMessageDataLockConvoPermanentlyBuilder::builder()
11740    }
11741}
11742
11743impl SystemMessageDataLockConvoPermanentlyBuilder<
11744    system_message_data_lock_convo_permanently_state::Empty,
11745    DefaultStr,
11746> {
11747    /// Create a new builder with all fields unset, using the default string type, if needed
11748    pub fn new() -> Self {
11749        SystemMessageDataLockConvoPermanentlyBuilder {
11750            _state: PhantomData,
11751            _fields: (None,),
11752            _type: PhantomData,
11753        }
11754    }
11755}
11756
11757impl<
11758    S: BosStr,
11759> SystemMessageDataLockConvoPermanentlyBuilder<
11760    system_message_data_lock_convo_permanently_state::Empty,
11761    S,
11762> {
11763    /// Create a new builder with all fields unset
11764    pub fn builder() -> Self {
11765        SystemMessageDataLockConvoPermanentlyBuilder {
11766            _state: PhantomData,
11767            _fields: (None,),
11768            _type: PhantomData,
11769        }
11770    }
11771}
11772
11773impl<St, S: BosStr> SystemMessageDataLockConvoPermanentlyBuilder<St, S>
11774where
11775    St: system_message_data_lock_convo_permanently_state::State,
11776    St::LockedBy: system_message_data_lock_convo_permanently_state::IsUnset,
11777{
11778    /// Set the `lockedBy` field (required)
11779    pub fn locked_by(
11780        mut self,
11781        value: impl Into<convo::SystemMessageReferredUser<S>>,
11782    ) -> SystemMessageDataLockConvoPermanentlyBuilder<
11783        system_message_data_lock_convo_permanently_state::SetLockedBy<St>,
11784        S,
11785    > {
11786        self._fields.0 = Option::Some(value.into());
11787        SystemMessageDataLockConvoPermanentlyBuilder {
11788            _state: PhantomData,
11789            _fields: self._fields,
11790            _type: PhantomData,
11791        }
11792    }
11793}
11794
11795impl<St, S: BosStr> SystemMessageDataLockConvoPermanentlyBuilder<St, S>
11796where
11797    St: system_message_data_lock_convo_permanently_state::State,
11798    St::LockedBy: system_message_data_lock_convo_permanently_state::IsSet,
11799{
11800    /// Build the final struct.
11801    pub fn build(self) -> SystemMessageDataLockConvoPermanently<S> {
11802        SystemMessageDataLockConvoPermanently {
11803            locked_by: self._fields.0.unwrap(),
11804            extra_data: Default::default(),
11805        }
11806    }
11807    /// Build the final struct with custom extra_data.
11808    pub fn build_with_data(
11809        self,
11810        extra_data: BTreeMap<SmolStr, Data<S>>,
11811    ) -> SystemMessageDataLockConvoPermanently<S> {
11812        SystemMessageDataLockConvoPermanently {
11813            locked_by: self._fields.0.unwrap(),
11814            extra_data: Some(extra_data),
11815        }
11816    }
11817}
11818
11819pub mod system_message_data_member_join_state {
11820
11821    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
11822    #[allow(unused)]
11823    use ::core::marker::PhantomData;
11824    mod sealed {
11825        pub trait Sealed {}
11826    }
11827    /// State trait tracking which required fields have been set
11828    pub trait State: sealed::Sealed {
11829        type Member;
11830        type Role;
11831    }
11832    /// Empty state - all required fields are unset
11833    pub struct Empty(());
11834    impl sealed::Sealed for Empty {}
11835    impl State for Empty {
11836        type Member = Unset;
11837        type Role = Unset;
11838    }
11839    ///State transition - sets the `member` field to Set
11840    pub struct SetMember<St: State = Empty>(PhantomData<fn() -> St>);
11841    impl<St: State> sealed::Sealed for SetMember<St> {}
11842    impl<St: State> State for SetMember<St> {
11843        type Member = Set<members::member>;
11844        type Role = St::Role;
11845    }
11846    ///State transition - sets the `role` field to Set
11847    pub struct SetRole<St: State = Empty>(PhantomData<fn() -> St>);
11848    impl<St: State> sealed::Sealed for SetRole<St> {}
11849    impl<St: State> State for SetRole<St> {
11850        type Member = St::Member;
11851        type Role = Set<members::role>;
11852    }
11853    /// Marker types for field names
11854    #[allow(non_camel_case_types)]
11855    pub mod members {
11856        ///Marker type for the `member` field
11857        pub struct member(());
11858        ///Marker type for the `role` field
11859        pub struct role(());
11860    }
11861}
11862
11863/// Builder for constructing an instance of this type.
11864pub struct SystemMessageDataMemberJoinBuilder<
11865    St: system_message_data_member_join_state::State,
11866    S: BosStr = DefaultStr,
11867> {
11868    _state: PhantomData<fn() -> St>,
11869    _fields: (
11870        Option<convo::SystemMessageReferredUser<S>>,
11871        Option<convo::SystemMessageReferredUser<S>>,
11872        Option<MemberRole<S>>,
11873    ),
11874    _type: PhantomData<fn() -> S>,
11875}
11876
11877impl SystemMessageDataMemberJoin<DefaultStr> {
11878    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
11879    pub fn new() -> SystemMessageDataMemberJoinBuilder<
11880        system_message_data_member_join_state::Empty,
11881        DefaultStr,
11882    > {
11883        SystemMessageDataMemberJoinBuilder::new()
11884    }
11885}
11886
11887impl<S: BosStr> SystemMessageDataMemberJoin<S> {
11888    /// Create a new builder for this type
11889    pub fn builder() -> SystemMessageDataMemberJoinBuilder<
11890        system_message_data_member_join_state::Empty,
11891        S,
11892    > {
11893        SystemMessageDataMemberJoinBuilder::builder()
11894    }
11895}
11896
11897impl SystemMessageDataMemberJoinBuilder<
11898    system_message_data_member_join_state::Empty,
11899    DefaultStr,
11900> {
11901    /// Create a new builder with all fields unset, using the default string type, if needed
11902    pub fn new() -> Self {
11903        SystemMessageDataMemberJoinBuilder {
11904            _state: PhantomData,
11905            _fields: (None, None, None),
11906            _type: PhantomData,
11907        }
11908    }
11909}
11910
11911impl<
11912    S: BosStr,
11913> SystemMessageDataMemberJoinBuilder<system_message_data_member_join_state::Empty, S> {
11914    /// Create a new builder with all fields unset
11915    pub fn builder() -> Self {
11916        SystemMessageDataMemberJoinBuilder {
11917            _state: PhantomData,
11918            _fields: (None, None, None),
11919            _type: PhantomData,
11920        }
11921    }
11922}
11923
11924impl<
11925    St: system_message_data_member_join_state::State,
11926    S: BosStr,
11927> SystemMessageDataMemberJoinBuilder<St, S> {
11928    /// Set the `approvedBy` field (optional)
11929    pub fn approved_by(
11930        mut self,
11931        value: impl Into<Option<convo::SystemMessageReferredUser<S>>>,
11932    ) -> Self {
11933        self._fields.0 = value.into();
11934        self
11935    }
11936    /// Set the `approvedBy` field to an Option value (optional)
11937    pub fn maybe_approved_by(
11938        mut self,
11939        value: Option<convo::SystemMessageReferredUser<S>>,
11940    ) -> Self {
11941        self._fields.0 = value;
11942        self
11943    }
11944}
11945
11946impl<St, S: BosStr> SystemMessageDataMemberJoinBuilder<St, S>
11947where
11948    St: system_message_data_member_join_state::State,
11949    St::Member: system_message_data_member_join_state::IsUnset,
11950{
11951    /// Set the `member` field (required)
11952    pub fn member(
11953        mut self,
11954        value: impl Into<convo::SystemMessageReferredUser<S>>,
11955    ) -> SystemMessageDataMemberJoinBuilder<
11956        system_message_data_member_join_state::SetMember<St>,
11957        S,
11958    > {
11959        self._fields.1 = Option::Some(value.into());
11960        SystemMessageDataMemberJoinBuilder {
11961            _state: PhantomData,
11962            _fields: self._fields,
11963            _type: PhantomData,
11964        }
11965    }
11966}
11967
11968impl<St, S: BosStr> SystemMessageDataMemberJoinBuilder<St, S>
11969where
11970    St: system_message_data_member_join_state::State,
11971    St::Role: system_message_data_member_join_state::IsUnset,
11972{
11973    /// Set the `role` field (required)
11974    pub fn role(
11975        mut self,
11976        value: impl Into<MemberRole<S>>,
11977    ) -> SystemMessageDataMemberJoinBuilder<
11978        system_message_data_member_join_state::SetRole<St>,
11979        S,
11980    > {
11981        self._fields.2 = Option::Some(value.into());
11982        SystemMessageDataMemberJoinBuilder {
11983            _state: PhantomData,
11984            _fields: self._fields,
11985            _type: PhantomData,
11986        }
11987    }
11988}
11989
11990impl<St, S: BosStr> SystemMessageDataMemberJoinBuilder<St, S>
11991where
11992    St: system_message_data_member_join_state::State,
11993    St::Member: system_message_data_member_join_state::IsSet,
11994    St::Role: system_message_data_member_join_state::IsSet,
11995{
11996    /// Build the final struct.
11997    pub fn build(self) -> SystemMessageDataMemberJoin<S> {
11998        SystemMessageDataMemberJoin {
11999            approved_by: self._fields.0,
12000            member: self._fields.1.unwrap(),
12001            role: self._fields.2.unwrap(),
12002            extra_data: Default::default(),
12003        }
12004    }
12005    /// Build the final struct with custom extra_data.
12006    pub fn build_with_data(
12007        self,
12008        extra_data: BTreeMap<SmolStr, Data<S>>,
12009    ) -> SystemMessageDataMemberJoin<S> {
12010        SystemMessageDataMemberJoin {
12011            approved_by: self._fields.0,
12012            member: self._fields.1.unwrap(),
12013            role: self._fields.2.unwrap(),
12014            extra_data: Some(extra_data),
12015        }
12016    }
12017}
12018
12019pub mod system_message_data_member_leave_state {
12020
12021    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
12022    #[allow(unused)]
12023    use ::core::marker::PhantomData;
12024    mod sealed {
12025        pub trait Sealed {}
12026    }
12027    /// State trait tracking which required fields have been set
12028    pub trait State: sealed::Sealed {
12029        type Member;
12030    }
12031    /// Empty state - all required fields are unset
12032    pub struct Empty(());
12033    impl sealed::Sealed for Empty {}
12034    impl State for Empty {
12035        type Member = Unset;
12036    }
12037    ///State transition - sets the `member` field to Set
12038    pub struct SetMember<St: State = Empty>(PhantomData<fn() -> St>);
12039    impl<St: State> sealed::Sealed for SetMember<St> {}
12040    impl<St: State> State for SetMember<St> {
12041        type Member = Set<members::member>;
12042    }
12043    /// Marker types for field names
12044    #[allow(non_camel_case_types)]
12045    pub mod members {
12046        ///Marker type for the `member` field
12047        pub struct member(());
12048    }
12049}
12050
12051/// Builder for constructing an instance of this type.
12052pub struct SystemMessageDataMemberLeaveBuilder<
12053    St: system_message_data_member_leave_state::State,
12054    S: BosStr = DefaultStr,
12055> {
12056    _state: PhantomData<fn() -> St>,
12057    _fields: (Option<convo::SystemMessageReferredUser<S>>,),
12058    _type: PhantomData<fn() -> S>,
12059}
12060
12061impl SystemMessageDataMemberLeave<DefaultStr> {
12062    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
12063    pub fn new() -> SystemMessageDataMemberLeaveBuilder<
12064        system_message_data_member_leave_state::Empty,
12065        DefaultStr,
12066    > {
12067        SystemMessageDataMemberLeaveBuilder::new()
12068    }
12069}
12070
12071impl<S: BosStr> SystemMessageDataMemberLeave<S> {
12072    /// Create a new builder for this type
12073    pub fn builder() -> SystemMessageDataMemberLeaveBuilder<
12074        system_message_data_member_leave_state::Empty,
12075        S,
12076    > {
12077        SystemMessageDataMemberLeaveBuilder::builder()
12078    }
12079}
12080
12081impl SystemMessageDataMemberLeaveBuilder<
12082    system_message_data_member_leave_state::Empty,
12083    DefaultStr,
12084> {
12085    /// Create a new builder with all fields unset, using the default string type, if needed
12086    pub fn new() -> Self {
12087        SystemMessageDataMemberLeaveBuilder {
12088            _state: PhantomData,
12089            _fields: (None,),
12090            _type: PhantomData,
12091        }
12092    }
12093}
12094
12095impl<
12096    S: BosStr,
12097> SystemMessageDataMemberLeaveBuilder<system_message_data_member_leave_state::Empty, S> {
12098    /// Create a new builder with all fields unset
12099    pub fn builder() -> Self {
12100        SystemMessageDataMemberLeaveBuilder {
12101            _state: PhantomData,
12102            _fields: (None,),
12103            _type: PhantomData,
12104        }
12105    }
12106}
12107
12108impl<St, S: BosStr> SystemMessageDataMemberLeaveBuilder<St, S>
12109where
12110    St: system_message_data_member_leave_state::State,
12111    St::Member: system_message_data_member_leave_state::IsUnset,
12112{
12113    /// Set the `member` field (required)
12114    pub fn member(
12115        mut self,
12116        value: impl Into<convo::SystemMessageReferredUser<S>>,
12117    ) -> SystemMessageDataMemberLeaveBuilder<
12118        system_message_data_member_leave_state::SetMember<St>,
12119        S,
12120    > {
12121        self._fields.0 = Option::Some(value.into());
12122        SystemMessageDataMemberLeaveBuilder {
12123            _state: PhantomData,
12124            _fields: self._fields,
12125            _type: PhantomData,
12126        }
12127    }
12128}
12129
12130impl<St, S: BosStr> SystemMessageDataMemberLeaveBuilder<St, S>
12131where
12132    St: system_message_data_member_leave_state::State,
12133    St::Member: system_message_data_member_leave_state::IsSet,
12134{
12135    /// Build the final struct.
12136    pub fn build(self) -> SystemMessageDataMemberLeave<S> {
12137        SystemMessageDataMemberLeave {
12138            member: self._fields.0.unwrap(),
12139            extra_data: Default::default(),
12140        }
12141    }
12142    /// Build the final struct with custom extra_data.
12143    pub fn build_with_data(
12144        self,
12145        extra_data: BTreeMap<SmolStr, Data<S>>,
12146    ) -> SystemMessageDataMemberLeave<S> {
12147        SystemMessageDataMemberLeave {
12148            member: self._fields.0.unwrap(),
12149            extra_data: Some(extra_data),
12150        }
12151    }
12152}
12153
12154pub mod system_message_data_remove_member_state {
12155
12156    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
12157    #[allow(unused)]
12158    use ::core::marker::PhantomData;
12159    mod sealed {
12160        pub trait Sealed {}
12161    }
12162    /// State trait tracking which required fields have been set
12163    pub trait State: sealed::Sealed {
12164        type Member;
12165        type RemovedBy;
12166    }
12167    /// Empty state - all required fields are unset
12168    pub struct Empty(());
12169    impl sealed::Sealed for Empty {}
12170    impl State for Empty {
12171        type Member = Unset;
12172        type RemovedBy = Unset;
12173    }
12174    ///State transition - sets the `member` field to Set
12175    pub struct SetMember<St: State = Empty>(PhantomData<fn() -> St>);
12176    impl<St: State> sealed::Sealed for SetMember<St> {}
12177    impl<St: State> State for SetMember<St> {
12178        type Member = Set<members::member>;
12179        type RemovedBy = St::RemovedBy;
12180    }
12181    ///State transition - sets the `removed_by` field to Set
12182    pub struct SetRemovedBy<St: State = Empty>(PhantomData<fn() -> St>);
12183    impl<St: State> sealed::Sealed for SetRemovedBy<St> {}
12184    impl<St: State> State for SetRemovedBy<St> {
12185        type Member = St::Member;
12186        type RemovedBy = Set<members::removed_by>;
12187    }
12188    /// Marker types for field names
12189    #[allow(non_camel_case_types)]
12190    pub mod members {
12191        ///Marker type for the `member` field
12192        pub struct member(());
12193        ///Marker type for the `removed_by` field
12194        pub struct removed_by(());
12195    }
12196}
12197
12198/// Builder for constructing an instance of this type.
12199pub struct SystemMessageDataRemoveMemberBuilder<
12200    St: system_message_data_remove_member_state::State,
12201    S: BosStr = DefaultStr,
12202> {
12203    _state: PhantomData<fn() -> St>,
12204    _fields: (
12205        Option<convo::SystemMessageReferredUser<S>>,
12206        Option<convo::SystemMessageReferredUser<S>>,
12207    ),
12208    _type: PhantomData<fn() -> S>,
12209}
12210
12211impl SystemMessageDataRemoveMember<DefaultStr> {
12212    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
12213    pub fn new() -> SystemMessageDataRemoveMemberBuilder<
12214        system_message_data_remove_member_state::Empty,
12215        DefaultStr,
12216    > {
12217        SystemMessageDataRemoveMemberBuilder::new()
12218    }
12219}
12220
12221impl<S: BosStr> SystemMessageDataRemoveMember<S> {
12222    /// Create a new builder for this type
12223    pub fn builder() -> SystemMessageDataRemoveMemberBuilder<
12224        system_message_data_remove_member_state::Empty,
12225        S,
12226    > {
12227        SystemMessageDataRemoveMemberBuilder::builder()
12228    }
12229}
12230
12231impl SystemMessageDataRemoveMemberBuilder<
12232    system_message_data_remove_member_state::Empty,
12233    DefaultStr,
12234> {
12235    /// Create a new builder with all fields unset, using the default string type, if needed
12236    pub fn new() -> Self {
12237        SystemMessageDataRemoveMemberBuilder {
12238            _state: PhantomData,
12239            _fields: (None, None),
12240            _type: PhantomData,
12241        }
12242    }
12243}
12244
12245impl<
12246    S: BosStr,
12247> SystemMessageDataRemoveMemberBuilder<
12248    system_message_data_remove_member_state::Empty,
12249    S,
12250> {
12251    /// Create a new builder with all fields unset
12252    pub fn builder() -> Self {
12253        SystemMessageDataRemoveMemberBuilder {
12254            _state: PhantomData,
12255            _fields: (None, None),
12256            _type: PhantomData,
12257        }
12258    }
12259}
12260
12261impl<St, S: BosStr> SystemMessageDataRemoveMemberBuilder<St, S>
12262where
12263    St: system_message_data_remove_member_state::State,
12264    St::Member: system_message_data_remove_member_state::IsUnset,
12265{
12266    /// Set the `member` field (required)
12267    pub fn member(
12268        mut self,
12269        value: impl Into<convo::SystemMessageReferredUser<S>>,
12270    ) -> SystemMessageDataRemoveMemberBuilder<
12271        system_message_data_remove_member_state::SetMember<St>,
12272        S,
12273    > {
12274        self._fields.0 = Option::Some(value.into());
12275        SystemMessageDataRemoveMemberBuilder {
12276            _state: PhantomData,
12277            _fields: self._fields,
12278            _type: PhantomData,
12279        }
12280    }
12281}
12282
12283impl<St, S: BosStr> SystemMessageDataRemoveMemberBuilder<St, S>
12284where
12285    St: system_message_data_remove_member_state::State,
12286    St::RemovedBy: system_message_data_remove_member_state::IsUnset,
12287{
12288    /// Set the `removedBy` field (required)
12289    pub fn removed_by(
12290        mut self,
12291        value: impl Into<convo::SystemMessageReferredUser<S>>,
12292    ) -> SystemMessageDataRemoveMemberBuilder<
12293        system_message_data_remove_member_state::SetRemovedBy<St>,
12294        S,
12295    > {
12296        self._fields.1 = Option::Some(value.into());
12297        SystemMessageDataRemoveMemberBuilder {
12298            _state: PhantomData,
12299            _fields: self._fields,
12300            _type: PhantomData,
12301        }
12302    }
12303}
12304
12305impl<St, S: BosStr> SystemMessageDataRemoveMemberBuilder<St, S>
12306where
12307    St: system_message_data_remove_member_state::State,
12308    St::Member: system_message_data_remove_member_state::IsSet,
12309    St::RemovedBy: system_message_data_remove_member_state::IsSet,
12310{
12311    /// Build the final struct.
12312    pub fn build(self) -> SystemMessageDataRemoveMember<S> {
12313        SystemMessageDataRemoveMember {
12314            member: self._fields.0.unwrap(),
12315            removed_by: self._fields.1.unwrap(),
12316            extra_data: Default::default(),
12317        }
12318    }
12319    /// Build the final struct with custom extra_data.
12320    pub fn build_with_data(
12321        self,
12322        extra_data: BTreeMap<SmolStr, Data<S>>,
12323    ) -> SystemMessageDataRemoveMember<S> {
12324        SystemMessageDataRemoveMember {
12325            member: self._fields.0.unwrap(),
12326            removed_by: self._fields.1.unwrap(),
12327            extra_data: Some(extra_data),
12328        }
12329    }
12330}
12331
12332pub mod system_message_data_unlock_convo_state {
12333
12334    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
12335    #[allow(unused)]
12336    use ::core::marker::PhantomData;
12337    mod sealed {
12338        pub trait Sealed {}
12339    }
12340    /// State trait tracking which required fields have been set
12341    pub trait State: sealed::Sealed {
12342        type UnlockedBy;
12343    }
12344    /// Empty state - all required fields are unset
12345    pub struct Empty(());
12346    impl sealed::Sealed for Empty {}
12347    impl State for Empty {
12348        type UnlockedBy = Unset;
12349    }
12350    ///State transition - sets the `unlocked_by` field to Set
12351    pub struct SetUnlockedBy<St: State = Empty>(PhantomData<fn() -> St>);
12352    impl<St: State> sealed::Sealed for SetUnlockedBy<St> {}
12353    impl<St: State> State for SetUnlockedBy<St> {
12354        type UnlockedBy = Set<members::unlocked_by>;
12355    }
12356    /// Marker types for field names
12357    #[allow(non_camel_case_types)]
12358    pub mod members {
12359        ///Marker type for the `unlocked_by` field
12360        pub struct unlocked_by(());
12361    }
12362}
12363
12364/// Builder for constructing an instance of this type.
12365pub struct SystemMessageDataUnlockConvoBuilder<
12366    St: system_message_data_unlock_convo_state::State,
12367    S: BosStr = DefaultStr,
12368> {
12369    _state: PhantomData<fn() -> St>,
12370    _fields: (Option<convo::SystemMessageReferredUser<S>>,),
12371    _type: PhantomData<fn() -> S>,
12372}
12373
12374impl SystemMessageDataUnlockConvo<DefaultStr> {
12375    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
12376    pub fn new() -> SystemMessageDataUnlockConvoBuilder<
12377        system_message_data_unlock_convo_state::Empty,
12378        DefaultStr,
12379    > {
12380        SystemMessageDataUnlockConvoBuilder::new()
12381    }
12382}
12383
12384impl<S: BosStr> SystemMessageDataUnlockConvo<S> {
12385    /// Create a new builder for this type
12386    pub fn builder() -> SystemMessageDataUnlockConvoBuilder<
12387        system_message_data_unlock_convo_state::Empty,
12388        S,
12389    > {
12390        SystemMessageDataUnlockConvoBuilder::builder()
12391    }
12392}
12393
12394impl SystemMessageDataUnlockConvoBuilder<
12395    system_message_data_unlock_convo_state::Empty,
12396    DefaultStr,
12397> {
12398    /// Create a new builder with all fields unset, using the default string type, if needed
12399    pub fn new() -> Self {
12400        SystemMessageDataUnlockConvoBuilder {
12401            _state: PhantomData,
12402            _fields: (None,),
12403            _type: PhantomData,
12404        }
12405    }
12406}
12407
12408impl<
12409    S: BosStr,
12410> SystemMessageDataUnlockConvoBuilder<system_message_data_unlock_convo_state::Empty, S> {
12411    /// Create a new builder with all fields unset
12412    pub fn builder() -> Self {
12413        SystemMessageDataUnlockConvoBuilder {
12414            _state: PhantomData,
12415            _fields: (None,),
12416            _type: PhantomData,
12417        }
12418    }
12419}
12420
12421impl<St, S: BosStr> SystemMessageDataUnlockConvoBuilder<St, S>
12422where
12423    St: system_message_data_unlock_convo_state::State,
12424    St::UnlockedBy: system_message_data_unlock_convo_state::IsUnset,
12425{
12426    /// Set the `unlockedBy` field (required)
12427    pub fn unlocked_by(
12428        mut self,
12429        value: impl Into<convo::SystemMessageReferredUser<S>>,
12430    ) -> SystemMessageDataUnlockConvoBuilder<
12431        system_message_data_unlock_convo_state::SetUnlockedBy<St>,
12432        S,
12433    > {
12434        self._fields.0 = Option::Some(value.into());
12435        SystemMessageDataUnlockConvoBuilder {
12436            _state: PhantomData,
12437            _fields: self._fields,
12438            _type: PhantomData,
12439        }
12440    }
12441}
12442
12443impl<St, S: BosStr> SystemMessageDataUnlockConvoBuilder<St, S>
12444where
12445    St: system_message_data_unlock_convo_state::State,
12446    St::UnlockedBy: system_message_data_unlock_convo_state::IsSet,
12447{
12448    /// Build the final struct.
12449    pub fn build(self) -> SystemMessageDataUnlockConvo<S> {
12450        SystemMessageDataUnlockConvo {
12451            unlocked_by: self._fields.0.unwrap(),
12452            extra_data: Default::default(),
12453        }
12454    }
12455    /// Build the final struct with custom extra_data.
12456    pub fn build_with_data(
12457        self,
12458        extra_data: BTreeMap<SmolStr, Data<S>>,
12459    ) -> SystemMessageDataUnlockConvo<S> {
12460        SystemMessageDataUnlockConvo {
12461            unlocked_by: self._fields.0.unwrap(),
12462            extra_data: Some(extra_data),
12463        }
12464    }
12465}
12466
12467pub mod system_message_referred_user_state {
12468
12469    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
12470    #[allow(unused)]
12471    use ::core::marker::PhantomData;
12472    mod sealed {
12473        pub trait Sealed {}
12474    }
12475    /// State trait tracking which required fields have been set
12476    pub trait State: sealed::Sealed {
12477        type Did;
12478    }
12479    /// Empty state - all required fields are unset
12480    pub struct Empty(());
12481    impl sealed::Sealed for Empty {}
12482    impl State for Empty {
12483        type Did = Unset;
12484    }
12485    ///State transition - sets the `did` field to Set
12486    pub struct SetDid<St: State = Empty>(PhantomData<fn() -> St>);
12487    impl<St: State> sealed::Sealed for SetDid<St> {}
12488    impl<St: State> State for SetDid<St> {
12489        type Did = Set<members::did>;
12490    }
12491    /// Marker types for field names
12492    #[allow(non_camel_case_types)]
12493    pub mod members {
12494        ///Marker type for the `did` field
12495        pub struct did(());
12496    }
12497}
12498
12499/// Builder for constructing an instance of this type.
12500pub struct SystemMessageReferredUserBuilder<
12501    St: system_message_referred_user_state::State,
12502    S: BosStr = DefaultStr,
12503> {
12504    _state: PhantomData<fn() -> St>,
12505    _fields: (Option<Did<S>>,),
12506    _type: PhantomData<fn() -> S>,
12507}
12508
12509impl SystemMessageReferredUser<DefaultStr> {
12510    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
12511    pub fn new() -> SystemMessageReferredUserBuilder<
12512        system_message_referred_user_state::Empty,
12513        DefaultStr,
12514    > {
12515        SystemMessageReferredUserBuilder::new()
12516    }
12517}
12518
12519impl<S: BosStr> SystemMessageReferredUser<S> {
12520    /// Create a new builder for this type
12521    pub fn builder() -> SystemMessageReferredUserBuilder<
12522        system_message_referred_user_state::Empty,
12523        S,
12524    > {
12525        SystemMessageReferredUserBuilder::builder()
12526    }
12527}
12528
12529impl SystemMessageReferredUserBuilder<
12530    system_message_referred_user_state::Empty,
12531    DefaultStr,
12532> {
12533    /// Create a new builder with all fields unset, using the default string type, if needed
12534    pub fn new() -> Self {
12535        SystemMessageReferredUserBuilder {
12536            _state: PhantomData,
12537            _fields: (None,),
12538            _type: PhantomData,
12539        }
12540    }
12541}
12542
12543impl<
12544    S: BosStr,
12545> SystemMessageReferredUserBuilder<system_message_referred_user_state::Empty, S> {
12546    /// Create a new builder with all fields unset
12547    pub fn builder() -> Self {
12548        SystemMessageReferredUserBuilder {
12549            _state: PhantomData,
12550            _fields: (None,),
12551            _type: PhantomData,
12552        }
12553    }
12554}
12555
12556impl<St, S: BosStr> SystemMessageReferredUserBuilder<St, S>
12557where
12558    St: system_message_referred_user_state::State,
12559    St::Did: system_message_referred_user_state::IsUnset,
12560{
12561    /// Set the `did` field (required)
12562    pub fn did(
12563        mut self,
12564        value: impl Into<Did<S>>,
12565    ) -> SystemMessageReferredUserBuilder<
12566        system_message_referred_user_state::SetDid<St>,
12567        S,
12568    > {
12569        self._fields.0 = Option::Some(value.into());
12570        SystemMessageReferredUserBuilder {
12571            _state: PhantomData,
12572            _fields: self._fields,
12573            _type: PhantomData,
12574        }
12575    }
12576}
12577
12578impl<St, S: BosStr> SystemMessageReferredUserBuilder<St, S>
12579where
12580    St: system_message_referred_user_state::State,
12581    St::Did: system_message_referred_user_state::IsSet,
12582{
12583    /// Build the final struct.
12584    pub fn build(self) -> SystemMessageReferredUser<S> {
12585        SystemMessageReferredUser {
12586            did: self._fields.0.unwrap(),
12587            extra_data: Default::default(),
12588        }
12589    }
12590    /// Build the final struct with custom extra_data.
12591    pub fn build_with_data(
12592        self,
12593        extra_data: BTreeMap<SmolStr, Data<S>>,
12594    ) -> SystemMessageReferredUser<S> {
12595        SystemMessageReferredUser {
12596            did: self._fields.0.unwrap(),
12597            extra_data: Some(extra_data),
12598        }
12599    }
12600}
12601
12602pub mod system_message_view_state {
12603
12604    pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
12605    #[allow(unused)]
12606    use ::core::marker::PhantomData;
12607    mod sealed {
12608        pub trait Sealed {}
12609    }
12610    /// State trait tracking which required fields have been set
12611    pub trait State: sealed::Sealed {
12612        type Data;
12613        type Id;
12614        type Rev;
12615        type SentAt;
12616    }
12617    /// Empty state - all required fields are unset
12618    pub struct Empty(());
12619    impl sealed::Sealed for Empty {}
12620    impl State for Empty {
12621        type Data = Unset;
12622        type Id = Unset;
12623        type Rev = Unset;
12624        type SentAt = Unset;
12625    }
12626    ///State transition - sets the `data` field to Set
12627    pub struct SetData<St: State = Empty>(PhantomData<fn() -> St>);
12628    impl<St: State> sealed::Sealed for SetData<St> {}
12629    impl<St: State> State for SetData<St> {
12630        type Data = Set<members::data>;
12631        type Id = St::Id;
12632        type Rev = St::Rev;
12633        type SentAt = St::SentAt;
12634    }
12635    ///State transition - sets the `id` field to Set
12636    pub struct SetId<St: State = Empty>(PhantomData<fn() -> St>);
12637    impl<St: State> sealed::Sealed for SetId<St> {}
12638    impl<St: State> State for SetId<St> {
12639        type Data = St::Data;
12640        type Id = Set<members::id>;
12641        type Rev = St::Rev;
12642        type SentAt = St::SentAt;
12643    }
12644    ///State transition - sets the `rev` field to Set
12645    pub struct SetRev<St: State = Empty>(PhantomData<fn() -> St>);
12646    impl<St: State> sealed::Sealed for SetRev<St> {}
12647    impl<St: State> State for SetRev<St> {
12648        type Data = St::Data;
12649        type Id = St::Id;
12650        type Rev = Set<members::rev>;
12651        type SentAt = St::SentAt;
12652    }
12653    ///State transition - sets the `sent_at` field to Set
12654    pub struct SetSentAt<St: State = Empty>(PhantomData<fn() -> St>);
12655    impl<St: State> sealed::Sealed for SetSentAt<St> {}
12656    impl<St: State> State for SetSentAt<St> {
12657        type Data = St::Data;
12658        type Id = St::Id;
12659        type Rev = St::Rev;
12660        type SentAt = Set<members::sent_at>;
12661    }
12662    /// Marker types for field names
12663    #[allow(non_camel_case_types)]
12664    pub mod members {
12665        ///Marker type for the `data` field
12666        pub struct data(());
12667        ///Marker type for the `id` field
12668        pub struct id(());
12669        ///Marker type for the `rev` field
12670        pub struct rev(());
12671        ///Marker type for the `sent_at` field
12672        pub struct sent_at(());
12673    }
12674}
12675
12676/// Builder for constructing an instance of this type.
12677pub struct SystemMessageViewBuilder<
12678    St: system_message_view_state::State,
12679    S: BosStr = DefaultStr,
12680> {
12681    _state: PhantomData<fn() -> St>,
12682    _fields: (Option<SystemMessageViewData<S>>, Option<S>, Option<S>, Option<Datetime>),
12683    _type: PhantomData<fn() -> S>,
12684}
12685
12686impl SystemMessageView<DefaultStr> {
12687    /// Create a new builder for this type, using the default string type (DefaultStr = SmolStr) if needed
12688    pub fn new() -> SystemMessageViewBuilder<
12689        system_message_view_state::Empty,
12690        DefaultStr,
12691    > {
12692        SystemMessageViewBuilder::new()
12693    }
12694}
12695
12696impl<S: BosStr> SystemMessageView<S> {
12697    /// Create a new builder for this type
12698    pub fn builder() -> SystemMessageViewBuilder<system_message_view_state::Empty, S> {
12699        SystemMessageViewBuilder::builder()
12700    }
12701}
12702
12703impl SystemMessageViewBuilder<system_message_view_state::Empty, DefaultStr> {
12704    /// Create a new builder with all fields unset, using the default string type, if needed
12705    pub fn new() -> Self {
12706        SystemMessageViewBuilder {
12707            _state: PhantomData,
12708            _fields: (None, None, None, None),
12709            _type: PhantomData,
12710        }
12711    }
12712}
12713
12714impl<S: BosStr> SystemMessageViewBuilder<system_message_view_state::Empty, S> {
12715    /// Create a new builder with all fields unset
12716    pub fn builder() -> Self {
12717        SystemMessageViewBuilder {
12718            _state: PhantomData,
12719            _fields: (None, None, None, None),
12720            _type: PhantomData,
12721        }
12722    }
12723}
12724
12725impl<St, S: BosStr> SystemMessageViewBuilder<St, S>
12726where
12727    St: system_message_view_state::State,
12728    St::Data: system_message_view_state::IsUnset,
12729{
12730    /// Set the `data` field (required)
12731    pub fn data(
12732        mut self,
12733        value: impl Into<SystemMessageViewData<S>>,
12734    ) -> SystemMessageViewBuilder<system_message_view_state::SetData<St>, S> {
12735        self._fields.0 = Option::Some(value.into());
12736        SystemMessageViewBuilder {
12737            _state: PhantomData,
12738            _fields: self._fields,
12739            _type: PhantomData,
12740        }
12741    }
12742}
12743
12744impl<St, S: BosStr> SystemMessageViewBuilder<St, S>
12745where
12746    St: system_message_view_state::State,
12747    St::Id: system_message_view_state::IsUnset,
12748{
12749    /// Set the `id` field (required)
12750    pub fn id(
12751        mut self,
12752        value: impl Into<S>,
12753    ) -> SystemMessageViewBuilder<system_message_view_state::SetId<St>, S> {
12754        self._fields.1 = Option::Some(value.into());
12755        SystemMessageViewBuilder {
12756            _state: PhantomData,
12757            _fields: self._fields,
12758            _type: PhantomData,
12759        }
12760    }
12761}
12762
12763impl<St, S: BosStr> SystemMessageViewBuilder<St, S>
12764where
12765    St: system_message_view_state::State,
12766    St::Rev: system_message_view_state::IsUnset,
12767{
12768    /// Set the `rev` field (required)
12769    pub fn rev(
12770        mut self,
12771        value: impl Into<S>,
12772    ) -> SystemMessageViewBuilder<system_message_view_state::SetRev<St>, S> {
12773        self._fields.2 = Option::Some(value.into());
12774        SystemMessageViewBuilder {
12775            _state: PhantomData,
12776            _fields: self._fields,
12777            _type: PhantomData,
12778        }
12779    }
12780}
12781
12782impl<St, S: BosStr> SystemMessageViewBuilder<St, S>
12783where
12784    St: system_message_view_state::State,
12785    St::SentAt: system_message_view_state::IsUnset,
12786{
12787    /// Set the `sentAt` field (required)
12788    pub fn sent_at(
12789        mut self,
12790        value: impl Into<Datetime>,
12791    ) -> SystemMessageViewBuilder<system_message_view_state::SetSentAt<St>, S> {
12792        self._fields.3 = Option::Some(value.into());
12793        SystemMessageViewBuilder {
12794            _state: PhantomData,
12795            _fields: self._fields,
12796            _type: PhantomData,
12797        }
12798    }
12799}
12800
12801impl<St, S: BosStr> SystemMessageViewBuilder<St, S>
12802where
12803    St: system_message_view_state::State,
12804    St::Data: system_message_view_state::IsSet,
12805    St::Id: system_message_view_state::IsSet,
12806    St::Rev: system_message_view_state::IsSet,
12807    St::SentAt: system_message_view_state::IsSet,
12808{
12809    /// Build the final struct.
12810    pub fn build(self) -> SystemMessageView<S> {
12811        SystemMessageView {
12812            data: self._fields.0.unwrap(),
12813            id: self._fields.1.unwrap(),
12814            rev: self._fields.2.unwrap(),
12815            sent_at: self._fields.3.unwrap(),
12816            extra_data: Default::default(),
12817        }
12818    }
12819    /// Build the final struct with custom extra_data.
12820    pub fn build_with_data(
12821        self,
12822        extra_data: BTreeMap<SmolStr, Data<S>>,
12823    ) -> SystemMessageView<S> {
12824        SystemMessageView {
12825            data: self._fields.0.unwrap(),
12826            id: self._fields.1.unwrap(),
12827            rev: self._fields.2.unwrap(),
12828            sent_at: self._fields.3.unwrap(),
12829            extra_data: Some(extra_data),
12830        }
12831    }
12832}