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