// @generated by jacquard-lexicon. DO NOT EDIT. // // Lexicon: chat.bsky.convo.defs // // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. pub mod accept_convo; pub mod add_reaction; pub mod delete_message_for_self; pub mod get_convo; pub mod get_convo_availability; pub mod get_convo_for_members; pub mod get_log; pub mod get_messages; pub mod leave_convo; pub mod list_convos; pub mod mute_convo; pub mod remove_reaction; pub mod send_message; pub mod send_message_batch; pub mod unmute_convo; pub mod update_all_read; pub mod update_read; #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ConvoView<'a> { #[serde(borrow)] pub id: jacquard_common::CowStr<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub last_message: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub last_reaction: std::option::Option< crate::chat_bsky::convo::MessageAndReactionView<'a>, >, #[serde(borrow)] pub members: Vec>, pub muted: bool, #[serde(borrow)] pub rev: jacquard_common::CowStr<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub status: std::option::Option>, pub unread_count: i64, } pub mod convo_view_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Id; type Members; type Rev; type Muted; type UnreadCount; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Id = Unset; type Members = Unset; type Rev = Unset; type Muted = Unset; type UnreadCount = Unset; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData S>); impl sealed::Sealed for SetId {} impl State for SetId { type Id = Set; type Members = S::Members; type Rev = S::Rev; type Muted = S::Muted; type UnreadCount = S::UnreadCount; } ///State transition - sets the `members` field to Set pub struct SetMembers(PhantomData S>); impl sealed::Sealed for SetMembers {} impl State for SetMembers { type Id = S::Id; type Members = Set; type Rev = S::Rev; type Muted = S::Muted; type UnreadCount = S::UnreadCount; } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData S>); impl sealed::Sealed for SetRev {} impl State for SetRev { type Id = S::Id; type Members = S::Members; type Rev = Set; type Muted = S::Muted; type UnreadCount = S::UnreadCount; } ///State transition - sets the `muted` field to Set pub struct SetMuted(PhantomData S>); impl sealed::Sealed for SetMuted {} impl State for SetMuted { type Id = S::Id; type Members = S::Members; type Rev = S::Rev; type Muted = Set; type UnreadCount = S::UnreadCount; } ///State transition - sets the `unread_count` field to Set pub struct SetUnreadCount(PhantomData S>); impl sealed::Sealed for SetUnreadCount {} impl State for SetUnreadCount { type Id = S::Id; type Members = S::Members; type Rev = S::Rev; type Muted = S::Muted; type UnreadCount = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `id` field pub struct id(()); ///Marker type for the `members` field pub struct members(()); ///Marker type for the `rev` field pub struct rev(()); ///Marker type for the `muted` field pub struct muted(()); ///Marker type for the `unread_count` field pub struct unread_count(()); } } /// Builder for constructing an instance of this type pub struct ConvoViewBuilder<'a, S: convo_view_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option>>, ::core::option::Option, ::core::option::Option>, ::core::option::Option>, ::core::option::Option, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> ConvoView<'a> { /// Create a new builder for this type pub fn new() -> ConvoViewBuilder<'a, convo_view_state::Empty> { ConvoViewBuilder::new() } } impl<'a> ConvoViewBuilder<'a, convo_view_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { ConvoViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None, None, None, None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ConvoViewBuilder<'a, S> where S: convo_view_state::State, S::Id: convo_view_state::IsUnset, { /// Set the `id` field (required) pub fn id( mut self, value: impl Into>, ) -> ConvoViewBuilder<'a, convo_view_state::SetId> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); ConvoViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: convo_view_state::State> ConvoViewBuilder<'a, S> { /// Set the `lastMessage` field (optional) pub fn last_message( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.1 = value.into(); self } /// Set the `lastMessage` field to an Option value (optional) pub fn maybe_last_message( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.1 = value; self } } impl<'a, S: convo_view_state::State> ConvoViewBuilder<'a, S> { /// Set the `lastReaction` field (optional) pub fn last_reaction( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.2 = value.into(); self } /// Set the `lastReaction` field to an Option value (optional) pub fn maybe_last_reaction( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.2 = value; self } } impl<'a, S> ConvoViewBuilder<'a, S> where S: convo_view_state::State, S::Members: convo_view_state::IsUnset, { /// Set the `members` field (required) pub fn members( mut self, value: impl Into>>, ) -> ConvoViewBuilder<'a, convo_view_state::SetMembers> { self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into()); ConvoViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ConvoViewBuilder<'a, S> where S: convo_view_state::State, S::Muted: convo_view_state::IsUnset, { /// Set the `muted` field (required) pub fn muted( mut self, value: impl Into, ) -> ConvoViewBuilder<'a, convo_view_state::SetMuted> { self.__unsafe_private_named.4 = ::core::option::Option::Some(value.into()); ConvoViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ConvoViewBuilder<'a, S> where S: convo_view_state::State, S::Rev: convo_view_state::IsUnset, { /// Set the `rev` field (required) pub fn rev( mut self, value: impl Into>, ) -> ConvoViewBuilder<'a, convo_view_state::SetRev> { self.__unsafe_private_named.5 = ::core::option::Option::Some(value.into()); ConvoViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: convo_view_state::State> ConvoViewBuilder<'a, S> { /// Set the `status` field (optional) pub fn status(mut self, value: impl Into>>) -> Self { self.__unsafe_private_named.6 = value.into(); self } /// Set the `status` field to an Option value (optional) pub fn maybe_status(mut self, value: Option>) -> Self { self.__unsafe_private_named.6 = value; self } } impl<'a, S> ConvoViewBuilder<'a, S> where S: convo_view_state::State, S::UnreadCount: convo_view_state::IsUnset, { /// Set the `unreadCount` field (required) pub fn unread_count( mut self, value: impl Into, ) -> ConvoViewBuilder<'a, convo_view_state::SetUnreadCount> { self.__unsafe_private_named.7 = ::core::option::Option::Some(value.into()); ConvoViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ConvoViewBuilder<'a, S> where S: convo_view_state::State, S::Id: convo_view_state::IsSet, S::Members: convo_view_state::IsSet, S::Rev: convo_view_state::IsSet, S::Muted: convo_view_state::IsSet, S::UnreadCount: convo_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ConvoView<'a> { ConvoView { id: self.__unsafe_private_named.0.unwrap(), last_message: self.__unsafe_private_named.1, last_reaction: self.__unsafe_private_named.2, members: self.__unsafe_private_named.3.unwrap(), muted: self.__unsafe_private_named.4.unwrap(), rev: self.__unsafe_private_named.5.unwrap(), status: self.__unsafe_private_named.6, unread_count: self.__unsafe_private_named.7.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> ConvoView<'a> { ConvoView { id: self.__unsafe_private_named.0.unwrap(), last_message: self.__unsafe_private_named.1, last_reaction: self.__unsafe_private_named.2, members: self.__unsafe_private_named.3.unwrap(), muted: self.__unsafe_private_named.4.unwrap(), rev: self.__unsafe_private_named.5.unwrap(), status: self.__unsafe_private_named.6, unread_count: self.__unsafe_private_named.7.unwrap(), extra_data: Some(extra_data), } } } #[jacquard_derive::open_union] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(tag = "$type")] #[serde(bound(deserialize = "'de: 'a"))] pub enum ConvoViewLastMessage<'a> { #[serde(rename = "chat.bsky.convo.defs#messageView")] MessageView(Box>), #[serde(rename = "chat.bsky.convo.defs#deletedMessageView")] DeletedMessageView(Box>), } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum ConvoViewStatus<'a> { Request, Accepted, Other(jacquard_common::CowStr<'a>), } impl<'a> ConvoViewStatus<'a> { pub fn as_str(&self) -> &str { match self { Self::Request => "request", Self::Accepted => "accepted", Self::Other(s) => s.as_ref(), } } } impl<'a> From<&'a str> for ConvoViewStatus<'a> { fn from(s: &'a str) -> Self { match s { "request" => Self::Request, "accepted" => Self::Accepted, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> From for ConvoViewStatus<'a> { fn from(s: String) -> Self { match s.as_str() { "request" => Self::Request, "accepted" => Self::Accepted, _ => Self::Other(jacquard_common::CowStr::from(s)), } } } impl<'a> core::fmt::Display for ConvoViewStatus<'a> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "{}", self.as_str()) } } impl<'a> AsRef for ConvoViewStatus<'a> { fn as_ref(&self) -> &str { self.as_str() } } impl<'a> serde::Serialize for ConvoViewStatus<'a> { fn serialize(&self, serializer: S) -> Result where S: serde::Serializer, { serializer.serialize_str(self.as_str()) } } impl<'de, 'a> serde::Deserialize<'de> for ConvoViewStatus<'a> where 'de: 'a, { fn deserialize(deserializer: D) -> Result where D: serde::Deserializer<'de>, { let s = <&'de str>::deserialize(deserializer)?; Ok(Self::from(s)) } } impl<'a> Default for ConvoViewStatus<'a> { fn default() -> Self { Self::Other(Default::default()) } } impl jacquard_common::IntoStatic for ConvoViewStatus<'_> { type Output = ConvoViewStatus<'static>; fn into_static(self) -> Self::Output { match self { ConvoViewStatus::Request => ConvoViewStatus::Request, ConvoViewStatus::Accepted => ConvoViewStatus::Accepted, ConvoViewStatus::Other(v) => ConvoViewStatus::Other(v.into_static()), } } } fn lexicon_doc_chat_bsky_convo_defs() -> ::jacquard_lexicon::lexicon::LexiconDoc< 'static, > { ::jacquard_lexicon::lexicon::LexiconDoc { lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1, id: ::jacquard_common::CowStr::new_static("chat.bsky.convo.defs"), revision: None, description: None, defs: { let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("convoView"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("id"), ::jacquard_common::smol_str::SmolStr::new_static("rev"), ::jacquard_common::smol_str::SmolStr::new_static("members"), ::jacquard_common::smol_str::SmolStr::new_static("muted"), ::jacquard_common::smol_str::SmolStr::new_static("unreadCount") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("id"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "lastMessage", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion { description: None, refs: vec![ ::jacquard_common::CowStr::new_static("#messageView"), ::jacquard_common::CowStr::new_static("#deletedMessageView") ], closed: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "lastReaction", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion { description: None, refs: vec![ ::jacquard_common::CowStr::new_static("#messageAndReactionView") ], closed: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("members"), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: None, items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "chat.bsky.actor.defs#profileViewBasic", ), }), min_length: None, max_length: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("muted"), ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { description: None, default: None, r#const: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("rev"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("status"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "unreadCount", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Integer(::jacquard_lexicon::lexicon::LexInteger { description: None, default: None, minimum: None, maximum: None, r#enum: None, r#const: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("deletedMessageView"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("id"), ::jacquard_common::smol_str::SmolStr::new_static("rev"), ::jacquard_common::smol_str::SmolStr::new_static("sender"), ::jacquard_common::smol_str::SmolStr::new_static("sentAt") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("id"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("rev"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("sender"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "#messageViewSender", ), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("sentAt"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Datetime, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("logAcceptConvo"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("rev"), ::jacquard_common::smol_str::SmolStr::new_static("convoId") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("convoId"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("rev"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("logAddReaction"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("rev"), ::jacquard_common::smol_str::SmolStr::new_static("convoId"), ::jacquard_common::smol_str::SmolStr::new_static("message"), ::jacquard_common::smol_str::SmolStr::new_static("reaction") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("convoId"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("message"), ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion { description: None, refs: vec![ ::jacquard_common::CowStr::new_static("#messageView"), ::jacquard_common::CowStr::new_static("#deletedMessageView") ], closed: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("reaction"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "#reactionView", ), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("rev"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("logBeginConvo"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("rev"), ::jacquard_common::smol_str::SmolStr::new_static("convoId") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("convoId"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("rev"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("logCreateMessage"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("rev"), ::jacquard_common::smol_str::SmolStr::new_static("convoId"), ::jacquard_common::smol_str::SmolStr::new_static("message") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("convoId"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("message"), ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion { description: None, refs: vec![ ::jacquard_common::CowStr::new_static("#messageView"), ::jacquard_common::CowStr::new_static("#deletedMessageView") ], closed: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("rev"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("logDeleteMessage"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("rev"), ::jacquard_common::smol_str::SmolStr::new_static("convoId"), ::jacquard_common::smol_str::SmolStr::new_static("message") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("convoId"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("message"), ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion { description: None, refs: vec![ ::jacquard_common::CowStr::new_static("#messageView"), ::jacquard_common::CowStr::new_static("#deletedMessageView") ], closed: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("rev"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("logLeaveConvo"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("rev"), ::jacquard_common::smol_str::SmolStr::new_static("convoId") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("convoId"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("rev"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("logMuteConvo"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("rev"), ::jacquard_common::smol_str::SmolStr::new_static("convoId") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("convoId"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("rev"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("logReadMessage"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("rev"), ::jacquard_common::smol_str::SmolStr::new_static("convoId"), ::jacquard_common::smol_str::SmolStr::new_static("message") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("convoId"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("message"), ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion { description: None, refs: vec![ ::jacquard_common::CowStr::new_static("#messageView"), ::jacquard_common::CowStr::new_static("#deletedMessageView") ], closed: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("rev"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("logRemoveReaction"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("rev"), ::jacquard_common::smol_str::SmolStr::new_static("convoId"), ::jacquard_common::smol_str::SmolStr::new_static("message"), ::jacquard_common::smol_str::SmolStr::new_static("reaction") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("convoId"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("message"), ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion { description: None, refs: vec![ ::jacquard_common::CowStr::new_static("#messageView"), ::jacquard_common::CowStr::new_static("#deletedMessageView") ], closed: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("reaction"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "#reactionView", ), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("rev"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("logUnmuteConvo"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("rev"), ::jacquard_common::smol_str::SmolStr::new_static("convoId") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("convoId"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("rev"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "messageAndReactionView", ), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("message"), ::jacquard_common::smol_str::SmolStr::new_static("reaction") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("message"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static("#messageView"), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("reaction"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "#reactionView", ), }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("messageInput"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![::jacquard_common::smol_str::SmolStr::new_static("text")], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("embed"), ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion { description: None, refs: vec![ ::jacquard_common::CowStr::new_static("app.bsky.embed.record") ], closed: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("facets"), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: Some( ::jacquard_common::CowStr::new_static( "Annotations of text (mentions, URLs, hashtags, etc)", ), ), items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "app.bsky.richtext.facet", ), }), min_length: None, max_length: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("text"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: Some(10000usize), min_graphemes: None, max_graphemes: Some(1000usize), r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("messageRef"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("did"), ::jacquard_common::smol_str::SmolStr::new_static("messageId"), ::jacquard_common::smol_str::SmolStr::new_static("convoId") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("convoId"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("did"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Did, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "messageId", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("messageView"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("id"), ::jacquard_common::smol_str::SmolStr::new_static("rev"), ::jacquard_common::smol_str::SmolStr::new_static("text"), ::jacquard_common::smol_str::SmolStr::new_static("sender"), ::jacquard_common::smol_str::SmolStr::new_static("sentAt") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("embed"), ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion { description: None, refs: vec![ ::jacquard_common::CowStr::new_static("app.bsky.embed.record#view") ], closed: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("facets"), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: Some( ::jacquard_common::CowStr::new_static( "Annotations of text (mentions, URLs, hashtags, etc)", ), ), items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "app.bsky.richtext.facet", ), }), min_length: None, max_length: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("id"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "reactions", ), ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { description: Some( ::jacquard_common::CowStr::new_static( "Reactions to this message, in ascending order of creation time.", ), ), items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "#reactionView", ), }), min_length: None, max_length: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("rev"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("sender"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "#messageViewSender", ), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("sentAt"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Datetime, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("text"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: Some(10000usize), min_graphemes: None, max_graphemes: Some(1000usize), r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("messageViewSender"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![::jacquard_common::smol_str::SmolStr::new_static("did")], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("did"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Did, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("reactionView"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![ ::jacquard_common::smol_str::SmolStr::new_static("value"), ::jacquard_common::smol_str::SmolStr::new_static("sender"), ::jacquard_common::smol_str::SmolStr::new_static("createdAt") ], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static( "createdAt", ), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Datetime, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("sender"), ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { description: None, r#ref: ::jacquard_common::CowStr::new_static( "#reactionViewSender", ), }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("value"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: None, default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("reactionViewSender"), ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { description: None, required: Some( vec![::jacquard_common::smol_str::SmolStr::new_static("did")], ), nullable: None, properties: { #[allow(unused_mut)] let mut map = ::alloc::collections::BTreeMap::new(); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("did"), ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { description: None, format: Some( ::jacquard_lexicon::lexicon::LexStringFormat::Did, ), default: None, min_length: None, max_length: None, min_graphemes: None, max_graphemes: None, r#enum: None, r#const: None, known_values: None, }), ); map }, }), ); map }, } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ConvoView<'a> { fn nsid() -> &'static str { "chat.bsky.convo.defs" } fn def_name() -> &'static str { "convoView" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_chat_bsky_convo_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct DeletedMessageView<'a> { #[serde(borrow)] pub id: jacquard_common::CowStr<'a>, #[serde(borrow)] pub rev: jacquard_common::CowStr<'a>, #[serde(borrow)] pub sender: crate::chat_bsky::convo::MessageViewSender<'a>, pub sent_at: jacquard_common::types::string::Datetime, } pub mod deleted_message_view_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Rev; type Id; type SentAt; type Sender; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Rev = Unset; type Id = Unset; type SentAt = Unset; type Sender = Unset; } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData S>); impl sealed::Sealed for SetRev {} impl State for SetRev { type Rev = Set; type Id = S::Id; type SentAt = S::SentAt; type Sender = S::Sender; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData S>); impl sealed::Sealed for SetId {} impl State for SetId { type Rev = S::Rev; type Id = Set; type SentAt = S::SentAt; type Sender = S::Sender; } ///State transition - sets the `sent_at` field to Set pub struct SetSentAt(PhantomData S>); impl sealed::Sealed for SetSentAt {} impl State for SetSentAt { type Rev = S::Rev; type Id = S::Id; type SentAt = Set; type Sender = S::Sender; } ///State transition - sets the `sender` field to Set pub struct SetSender(PhantomData S>); impl sealed::Sealed for SetSender {} impl State for SetSender { type Rev = S::Rev; type Id = S::Id; type SentAt = S::SentAt; type Sender = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `rev` field pub struct rev(()); ///Marker type for the `id` field pub struct id(()); ///Marker type for the `sent_at` field pub struct sent_at(()); ///Marker type for the `sender` field pub struct sender(()); } } /// Builder for constructing an instance of this type pub struct DeletedMessageViewBuilder<'a, S: deleted_message_view_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> DeletedMessageView<'a> { /// Create a new builder for this type pub fn new() -> DeletedMessageViewBuilder<'a, deleted_message_view_state::Empty> { DeletedMessageViewBuilder::new() } } impl<'a> DeletedMessageViewBuilder<'a, deleted_message_view_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { DeletedMessageViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> DeletedMessageViewBuilder<'a, S> where S: deleted_message_view_state::State, S::Id: deleted_message_view_state::IsUnset, { /// Set the `id` field (required) pub fn id( mut self, value: impl Into>, ) -> DeletedMessageViewBuilder<'a, deleted_message_view_state::SetId> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); DeletedMessageViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> DeletedMessageViewBuilder<'a, S> where S: deleted_message_view_state::State, S::Rev: deleted_message_view_state::IsUnset, { /// Set the `rev` field (required) pub fn rev( mut self, value: impl Into>, ) -> DeletedMessageViewBuilder<'a, deleted_message_view_state::SetRev> { self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); DeletedMessageViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> DeletedMessageViewBuilder<'a, S> where S: deleted_message_view_state::State, S::Sender: deleted_message_view_state::IsUnset, { /// Set the `sender` field (required) pub fn sender( mut self, value: impl Into>, ) -> DeletedMessageViewBuilder<'a, deleted_message_view_state::SetSender> { self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); DeletedMessageViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> DeletedMessageViewBuilder<'a, S> where S: deleted_message_view_state::State, S::SentAt: deleted_message_view_state::IsUnset, { /// Set the `sentAt` field (required) pub fn sent_at( mut self, value: impl Into, ) -> DeletedMessageViewBuilder<'a, deleted_message_view_state::SetSentAt> { self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into()); DeletedMessageViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> DeletedMessageViewBuilder<'a, S> where S: deleted_message_view_state::State, S::Rev: deleted_message_view_state::IsSet, S::Id: deleted_message_view_state::IsSet, S::SentAt: deleted_message_view_state::IsSet, S::Sender: deleted_message_view_state::IsSet, { /// Build the final struct pub fn build(self) -> DeletedMessageView<'a> { DeletedMessageView { id: self.__unsafe_private_named.0.unwrap(), rev: self.__unsafe_private_named.1.unwrap(), sender: self.__unsafe_private_named.2.unwrap(), sent_at: self.__unsafe_private_named.3.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> DeletedMessageView<'a> { DeletedMessageView { id: self.__unsafe_private_named.0.unwrap(), rev: self.__unsafe_private_named.1.unwrap(), sender: self.__unsafe_private_named.2.unwrap(), sent_at: self.__unsafe_private_named.3.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for DeletedMessageView<'a> { fn nsid() -> &'static str { "chat.bsky.convo.defs" } fn def_name() -> &'static str { "deletedMessageView" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_chat_bsky_convo_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct LogAcceptConvo<'a> { #[serde(borrow)] pub convo_id: jacquard_common::CowStr<'a>, #[serde(borrow)] pub rev: jacquard_common::CowStr<'a>, } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for LogAcceptConvo<'a> { fn nsid() -> &'static str { "chat.bsky.convo.defs" } fn def_name() -> &'static str { "logAcceptConvo" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_chat_bsky_convo_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct LogAddReaction<'a> { #[serde(borrow)] pub convo_id: jacquard_common::CowStr<'a>, #[serde(borrow)] pub message: LogAddReactionMessage<'a>, #[serde(borrow)] pub reaction: crate::chat_bsky::convo::ReactionView<'a>, #[serde(borrow)] pub rev: jacquard_common::CowStr<'a>, } pub mod log_add_reaction_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Message; type Reaction; type Rev; type ConvoId; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Message = Unset; type Reaction = Unset; type Rev = Unset; type ConvoId = Unset; } ///State transition - sets the `message` field to Set pub struct SetMessage(PhantomData S>); impl sealed::Sealed for SetMessage {} impl State for SetMessage { type Message = Set; type Reaction = S::Reaction; type Rev = S::Rev; type ConvoId = S::ConvoId; } ///State transition - sets the `reaction` field to Set pub struct SetReaction(PhantomData S>); impl sealed::Sealed for SetReaction {} impl State for SetReaction { type Message = S::Message; type Reaction = Set; type Rev = S::Rev; type ConvoId = S::ConvoId; } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData S>); impl sealed::Sealed for SetRev {} impl State for SetRev { type Message = S::Message; type Reaction = S::Reaction; type Rev = Set; type ConvoId = S::ConvoId; } ///State transition - sets the `convo_id` field to Set pub struct SetConvoId(PhantomData S>); impl sealed::Sealed for SetConvoId {} impl State for SetConvoId { type Message = S::Message; type Reaction = S::Reaction; type Rev = S::Rev; type ConvoId = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `message` field pub struct message(()); ///Marker type for the `reaction` field pub struct reaction(()); ///Marker type for the `rev` field pub struct rev(()); ///Marker type for the `convo_id` field pub struct convo_id(()); } } /// Builder for constructing an instance of this type pub struct LogAddReactionBuilder<'a, S: log_add_reaction_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> LogAddReaction<'a> { /// Create a new builder for this type pub fn new() -> LogAddReactionBuilder<'a, log_add_reaction_state::Empty> { LogAddReactionBuilder::new() } } impl<'a> LogAddReactionBuilder<'a, log_add_reaction_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { LogAddReactionBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> LogAddReactionBuilder<'a, S> where S: log_add_reaction_state::State, S::ConvoId: log_add_reaction_state::IsUnset, { /// Set the `convoId` field (required) pub fn convo_id( mut self, value: impl Into>, ) -> LogAddReactionBuilder<'a, log_add_reaction_state::SetConvoId> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); LogAddReactionBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> LogAddReactionBuilder<'a, S> where S: log_add_reaction_state::State, S::Message: log_add_reaction_state::IsUnset, { /// Set the `message` field (required) pub fn message( mut self, value: impl Into>, ) -> LogAddReactionBuilder<'a, log_add_reaction_state::SetMessage> { self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); LogAddReactionBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> LogAddReactionBuilder<'a, S> where S: log_add_reaction_state::State, S::Reaction: log_add_reaction_state::IsUnset, { /// Set the `reaction` field (required) pub fn reaction( mut self, value: impl Into>, ) -> LogAddReactionBuilder<'a, log_add_reaction_state::SetReaction> { self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); LogAddReactionBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> LogAddReactionBuilder<'a, S> where S: log_add_reaction_state::State, S::Rev: log_add_reaction_state::IsUnset, { /// Set the `rev` field (required) pub fn rev( mut self, value: impl Into>, ) -> LogAddReactionBuilder<'a, log_add_reaction_state::SetRev> { self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into()); LogAddReactionBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> LogAddReactionBuilder<'a, S> where S: log_add_reaction_state::State, S::Message: log_add_reaction_state::IsSet, S::Reaction: log_add_reaction_state::IsSet, S::Rev: log_add_reaction_state::IsSet, S::ConvoId: log_add_reaction_state::IsSet, { /// Build the final struct pub fn build(self) -> LogAddReaction<'a> { LogAddReaction { convo_id: self.__unsafe_private_named.0.unwrap(), message: self.__unsafe_private_named.1.unwrap(), reaction: self.__unsafe_private_named.2.unwrap(), rev: self.__unsafe_private_named.3.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> LogAddReaction<'a> { LogAddReaction { convo_id: self.__unsafe_private_named.0.unwrap(), message: self.__unsafe_private_named.1.unwrap(), reaction: self.__unsafe_private_named.2.unwrap(), rev: self.__unsafe_private_named.3.unwrap(), extra_data: Some(extra_data), } } } #[jacquard_derive::open_union] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(tag = "$type")] #[serde(bound(deserialize = "'de: 'a"))] pub enum LogAddReactionMessage<'a> { #[serde(rename = "chat.bsky.convo.defs#messageView")] MessageView(Box>), #[serde(rename = "chat.bsky.convo.defs#deletedMessageView")] DeletedMessageView(Box>), } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for LogAddReaction<'a> { fn nsid() -> &'static str { "chat.bsky.convo.defs" } fn def_name() -> &'static str { "logAddReaction" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_chat_bsky_convo_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct LogBeginConvo<'a> { #[serde(borrow)] pub convo_id: jacquard_common::CowStr<'a>, #[serde(borrow)] pub rev: jacquard_common::CowStr<'a>, } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for LogBeginConvo<'a> { fn nsid() -> &'static str { "chat.bsky.convo.defs" } fn def_name() -> &'static str { "logBeginConvo" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_chat_bsky_convo_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct LogCreateMessage<'a> { #[serde(borrow)] pub convo_id: jacquard_common::CowStr<'a>, #[serde(borrow)] pub message: LogCreateMessageMessage<'a>, #[serde(borrow)] pub rev: jacquard_common::CowStr<'a>, } pub mod log_create_message_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Rev; type ConvoId; type Message; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Rev = Unset; type ConvoId = Unset; type Message = Unset; } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData S>); impl sealed::Sealed for SetRev {} impl State for SetRev { type Rev = Set; type ConvoId = S::ConvoId; type Message = S::Message; } ///State transition - sets the `convo_id` field to Set pub struct SetConvoId(PhantomData S>); impl sealed::Sealed for SetConvoId {} impl State for SetConvoId { type Rev = S::Rev; type ConvoId = Set; type Message = S::Message; } ///State transition - sets the `message` field to Set pub struct SetMessage(PhantomData S>); impl sealed::Sealed for SetMessage {} impl State for SetMessage { type Rev = S::Rev; type ConvoId = S::ConvoId; type Message = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `rev` field pub struct rev(()); ///Marker type for the `convo_id` field pub struct convo_id(()); ///Marker type for the `message` field pub struct message(()); } } /// Builder for constructing an instance of this type pub struct LogCreateMessageBuilder<'a, S: log_create_message_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> LogCreateMessage<'a> { /// Create a new builder for this type pub fn new() -> LogCreateMessageBuilder<'a, log_create_message_state::Empty> { LogCreateMessageBuilder::new() } } impl<'a> LogCreateMessageBuilder<'a, log_create_message_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { LogCreateMessageBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> LogCreateMessageBuilder<'a, S> where S: log_create_message_state::State, S::ConvoId: log_create_message_state::IsUnset, { /// Set the `convoId` field (required) pub fn convo_id( mut self, value: impl Into>, ) -> LogCreateMessageBuilder<'a, log_create_message_state::SetConvoId> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); LogCreateMessageBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> LogCreateMessageBuilder<'a, S> where S: log_create_message_state::State, S::Message: log_create_message_state::IsUnset, { /// Set the `message` field (required) pub fn message( mut self, value: impl Into>, ) -> LogCreateMessageBuilder<'a, log_create_message_state::SetMessage> { self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); LogCreateMessageBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> LogCreateMessageBuilder<'a, S> where S: log_create_message_state::State, S::Rev: log_create_message_state::IsUnset, { /// Set the `rev` field (required) pub fn rev( mut self, value: impl Into>, ) -> LogCreateMessageBuilder<'a, log_create_message_state::SetRev> { self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); LogCreateMessageBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> LogCreateMessageBuilder<'a, S> where S: log_create_message_state::State, S::Rev: log_create_message_state::IsSet, S::ConvoId: log_create_message_state::IsSet, S::Message: log_create_message_state::IsSet, { /// Build the final struct pub fn build(self) -> LogCreateMessage<'a> { LogCreateMessage { convo_id: self.__unsafe_private_named.0.unwrap(), message: self.__unsafe_private_named.1.unwrap(), rev: self.__unsafe_private_named.2.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> LogCreateMessage<'a> { LogCreateMessage { convo_id: self.__unsafe_private_named.0.unwrap(), message: self.__unsafe_private_named.1.unwrap(), rev: self.__unsafe_private_named.2.unwrap(), extra_data: Some(extra_data), } } } #[jacquard_derive::open_union] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(tag = "$type")] #[serde(bound(deserialize = "'de: 'a"))] pub enum LogCreateMessageMessage<'a> { #[serde(rename = "chat.bsky.convo.defs#messageView")] MessageView(Box>), #[serde(rename = "chat.bsky.convo.defs#deletedMessageView")] DeletedMessageView(Box>), } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for LogCreateMessage<'a> { fn nsid() -> &'static str { "chat.bsky.convo.defs" } fn def_name() -> &'static str { "logCreateMessage" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_chat_bsky_convo_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct LogDeleteMessage<'a> { #[serde(borrow)] pub convo_id: jacquard_common::CowStr<'a>, #[serde(borrow)] pub message: LogDeleteMessageMessage<'a>, #[serde(borrow)] pub rev: jacquard_common::CowStr<'a>, } pub mod log_delete_message_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Message; type ConvoId; type Rev; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Message = Unset; type ConvoId = Unset; type Rev = Unset; } ///State transition - sets the `message` field to Set pub struct SetMessage(PhantomData S>); impl sealed::Sealed for SetMessage {} impl State for SetMessage { type Message = Set; type ConvoId = S::ConvoId; type Rev = S::Rev; } ///State transition - sets the `convo_id` field to Set pub struct SetConvoId(PhantomData S>); impl sealed::Sealed for SetConvoId {} impl State for SetConvoId { type Message = S::Message; type ConvoId = Set; type Rev = S::Rev; } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData S>); impl sealed::Sealed for SetRev {} impl State for SetRev { type Message = S::Message; type ConvoId = S::ConvoId; type Rev = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `message` field pub struct message(()); ///Marker type for the `convo_id` field pub struct convo_id(()); ///Marker type for the `rev` field pub struct rev(()); } } /// Builder for constructing an instance of this type pub struct LogDeleteMessageBuilder<'a, S: log_delete_message_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> LogDeleteMessage<'a> { /// Create a new builder for this type pub fn new() -> LogDeleteMessageBuilder<'a, log_delete_message_state::Empty> { LogDeleteMessageBuilder::new() } } impl<'a> LogDeleteMessageBuilder<'a, log_delete_message_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { LogDeleteMessageBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> LogDeleteMessageBuilder<'a, S> where S: log_delete_message_state::State, S::ConvoId: log_delete_message_state::IsUnset, { /// Set the `convoId` field (required) pub fn convo_id( mut self, value: impl Into>, ) -> LogDeleteMessageBuilder<'a, log_delete_message_state::SetConvoId> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); LogDeleteMessageBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> LogDeleteMessageBuilder<'a, S> where S: log_delete_message_state::State, S::Message: log_delete_message_state::IsUnset, { /// Set the `message` field (required) pub fn message( mut self, value: impl Into>, ) -> LogDeleteMessageBuilder<'a, log_delete_message_state::SetMessage> { self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); LogDeleteMessageBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> LogDeleteMessageBuilder<'a, S> where S: log_delete_message_state::State, S::Rev: log_delete_message_state::IsUnset, { /// Set the `rev` field (required) pub fn rev( mut self, value: impl Into>, ) -> LogDeleteMessageBuilder<'a, log_delete_message_state::SetRev> { self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); LogDeleteMessageBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> LogDeleteMessageBuilder<'a, S> where S: log_delete_message_state::State, S::Message: log_delete_message_state::IsSet, S::ConvoId: log_delete_message_state::IsSet, S::Rev: log_delete_message_state::IsSet, { /// Build the final struct pub fn build(self) -> LogDeleteMessage<'a> { LogDeleteMessage { convo_id: self.__unsafe_private_named.0.unwrap(), message: self.__unsafe_private_named.1.unwrap(), rev: self.__unsafe_private_named.2.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> LogDeleteMessage<'a> { LogDeleteMessage { convo_id: self.__unsafe_private_named.0.unwrap(), message: self.__unsafe_private_named.1.unwrap(), rev: self.__unsafe_private_named.2.unwrap(), extra_data: Some(extra_data), } } } #[jacquard_derive::open_union] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(tag = "$type")] #[serde(bound(deserialize = "'de: 'a"))] pub enum LogDeleteMessageMessage<'a> { #[serde(rename = "chat.bsky.convo.defs#messageView")] MessageView(Box>), #[serde(rename = "chat.bsky.convo.defs#deletedMessageView")] DeletedMessageView(Box>), } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for LogDeleteMessage<'a> { fn nsid() -> &'static str { "chat.bsky.convo.defs" } fn def_name() -> &'static str { "logDeleteMessage" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_chat_bsky_convo_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct LogLeaveConvo<'a> { #[serde(borrow)] pub convo_id: jacquard_common::CowStr<'a>, #[serde(borrow)] pub rev: jacquard_common::CowStr<'a>, } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for LogLeaveConvo<'a> { fn nsid() -> &'static str { "chat.bsky.convo.defs" } fn def_name() -> &'static str { "logLeaveConvo" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_chat_bsky_convo_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct LogMuteConvo<'a> { #[serde(borrow)] pub convo_id: jacquard_common::CowStr<'a>, #[serde(borrow)] pub rev: jacquard_common::CowStr<'a>, } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for LogMuteConvo<'a> { fn nsid() -> &'static str { "chat.bsky.convo.defs" } fn def_name() -> &'static str { "logMuteConvo" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_chat_bsky_convo_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct LogReadMessage<'a> { #[serde(borrow)] pub convo_id: jacquard_common::CowStr<'a>, #[serde(borrow)] pub message: LogReadMessageMessage<'a>, #[serde(borrow)] pub rev: jacquard_common::CowStr<'a>, } pub mod log_read_message_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type ConvoId; type Rev; type Message; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type ConvoId = Unset; type Rev = Unset; type Message = Unset; } ///State transition - sets the `convo_id` field to Set pub struct SetConvoId(PhantomData S>); impl sealed::Sealed for SetConvoId {} impl State for SetConvoId { type ConvoId = Set; type Rev = S::Rev; type Message = S::Message; } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData S>); impl sealed::Sealed for SetRev {} impl State for SetRev { type ConvoId = S::ConvoId; type Rev = Set; type Message = S::Message; } ///State transition - sets the `message` field to Set pub struct SetMessage(PhantomData S>); impl sealed::Sealed for SetMessage {} impl State for SetMessage { type ConvoId = S::ConvoId; type Rev = S::Rev; type Message = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `convo_id` field pub struct convo_id(()); ///Marker type for the `rev` field pub struct rev(()); ///Marker type for the `message` field pub struct message(()); } } /// Builder for constructing an instance of this type pub struct LogReadMessageBuilder<'a, S: log_read_message_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> LogReadMessage<'a> { /// Create a new builder for this type pub fn new() -> LogReadMessageBuilder<'a, log_read_message_state::Empty> { LogReadMessageBuilder::new() } } impl<'a> LogReadMessageBuilder<'a, log_read_message_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { LogReadMessageBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> LogReadMessageBuilder<'a, S> where S: log_read_message_state::State, S::ConvoId: log_read_message_state::IsUnset, { /// Set the `convoId` field (required) pub fn convo_id( mut self, value: impl Into>, ) -> LogReadMessageBuilder<'a, log_read_message_state::SetConvoId> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); LogReadMessageBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> LogReadMessageBuilder<'a, S> where S: log_read_message_state::State, S::Message: log_read_message_state::IsUnset, { /// Set the `message` field (required) pub fn message( mut self, value: impl Into>, ) -> LogReadMessageBuilder<'a, log_read_message_state::SetMessage> { self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); LogReadMessageBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> LogReadMessageBuilder<'a, S> where S: log_read_message_state::State, S::Rev: log_read_message_state::IsUnset, { /// Set the `rev` field (required) pub fn rev( mut self, value: impl Into>, ) -> LogReadMessageBuilder<'a, log_read_message_state::SetRev> { self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); LogReadMessageBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> LogReadMessageBuilder<'a, S> where S: log_read_message_state::State, S::ConvoId: log_read_message_state::IsSet, S::Rev: log_read_message_state::IsSet, S::Message: log_read_message_state::IsSet, { /// Build the final struct pub fn build(self) -> LogReadMessage<'a> { LogReadMessage { convo_id: self.__unsafe_private_named.0.unwrap(), message: self.__unsafe_private_named.1.unwrap(), rev: self.__unsafe_private_named.2.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> LogReadMessage<'a> { LogReadMessage { convo_id: self.__unsafe_private_named.0.unwrap(), message: self.__unsafe_private_named.1.unwrap(), rev: self.__unsafe_private_named.2.unwrap(), extra_data: Some(extra_data), } } } #[jacquard_derive::open_union] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(tag = "$type")] #[serde(bound(deserialize = "'de: 'a"))] pub enum LogReadMessageMessage<'a> { #[serde(rename = "chat.bsky.convo.defs#messageView")] MessageView(Box>), #[serde(rename = "chat.bsky.convo.defs#deletedMessageView")] DeletedMessageView(Box>), } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for LogReadMessage<'a> { fn nsid() -> &'static str { "chat.bsky.convo.defs" } fn def_name() -> &'static str { "logReadMessage" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_chat_bsky_convo_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct LogRemoveReaction<'a> { #[serde(borrow)] pub convo_id: jacquard_common::CowStr<'a>, #[serde(borrow)] pub message: LogRemoveReactionMessage<'a>, #[serde(borrow)] pub reaction: crate::chat_bsky::convo::ReactionView<'a>, #[serde(borrow)] pub rev: jacquard_common::CowStr<'a>, } pub mod log_remove_reaction_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Rev; type Reaction; type ConvoId; type Message; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Rev = Unset; type Reaction = Unset; type ConvoId = Unset; type Message = Unset; } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData S>); impl sealed::Sealed for SetRev {} impl State for SetRev { type Rev = Set; type Reaction = S::Reaction; type ConvoId = S::ConvoId; type Message = S::Message; } ///State transition - sets the `reaction` field to Set pub struct SetReaction(PhantomData S>); impl sealed::Sealed for SetReaction {} impl State for SetReaction { type Rev = S::Rev; type Reaction = Set; type ConvoId = S::ConvoId; type Message = S::Message; } ///State transition - sets the `convo_id` field to Set pub struct SetConvoId(PhantomData S>); impl sealed::Sealed for SetConvoId {} impl State for SetConvoId { type Rev = S::Rev; type Reaction = S::Reaction; type ConvoId = Set; type Message = S::Message; } ///State transition - sets the `message` field to Set pub struct SetMessage(PhantomData S>); impl sealed::Sealed for SetMessage {} impl State for SetMessage { type Rev = S::Rev; type Reaction = S::Reaction; type ConvoId = S::ConvoId; type Message = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `rev` field pub struct rev(()); ///Marker type for the `reaction` field pub struct reaction(()); ///Marker type for the `convo_id` field pub struct convo_id(()); ///Marker type for the `message` field pub struct message(()); } } /// Builder for constructing an instance of this type pub struct LogRemoveReactionBuilder<'a, S: log_remove_reaction_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> LogRemoveReaction<'a> { /// Create a new builder for this type pub fn new() -> LogRemoveReactionBuilder<'a, log_remove_reaction_state::Empty> { LogRemoveReactionBuilder::new() } } impl<'a> LogRemoveReactionBuilder<'a, log_remove_reaction_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { LogRemoveReactionBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> LogRemoveReactionBuilder<'a, S> where S: log_remove_reaction_state::State, S::ConvoId: log_remove_reaction_state::IsUnset, { /// Set the `convoId` field (required) pub fn convo_id( mut self, value: impl Into>, ) -> LogRemoveReactionBuilder<'a, log_remove_reaction_state::SetConvoId> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); LogRemoveReactionBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> LogRemoveReactionBuilder<'a, S> where S: log_remove_reaction_state::State, S::Message: log_remove_reaction_state::IsUnset, { /// Set the `message` field (required) pub fn message( mut self, value: impl Into>, ) -> LogRemoveReactionBuilder<'a, log_remove_reaction_state::SetMessage> { self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); LogRemoveReactionBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> LogRemoveReactionBuilder<'a, S> where S: log_remove_reaction_state::State, S::Reaction: log_remove_reaction_state::IsUnset, { /// Set the `reaction` field (required) pub fn reaction( mut self, value: impl Into>, ) -> LogRemoveReactionBuilder<'a, log_remove_reaction_state::SetReaction> { self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); LogRemoveReactionBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> LogRemoveReactionBuilder<'a, S> where S: log_remove_reaction_state::State, S::Rev: log_remove_reaction_state::IsUnset, { /// Set the `rev` field (required) pub fn rev( mut self, value: impl Into>, ) -> LogRemoveReactionBuilder<'a, log_remove_reaction_state::SetRev> { self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into()); LogRemoveReactionBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> LogRemoveReactionBuilder<'a, S> where S: log_remove_reaction_state::State, S::Rev: log_remove_reaction_state::IsSet, S::Reaction: log_remove_reaction_state::IsSet, S::ConvoId: log_remove_reaction_state::IsSet, S::Message: log_remove_reaction_state::IsSet, { /// Build the final struct pub fn build(self) -> LogRemoveReaction<'a> { LogRemoveReaction { convo_id: self.__unsafe_private_named.0.unwrap(), message: self.__unsafe_private_named.1.unwrap(), reaction: self.__unsafe_private_named.2.unwrap(), rev: self.__unsafe_private_named.3.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> LogRemoveReaction<'a> { LogRemoveReaction { convo_id: self.__unsafe_private_named.0.unwrap(), message: self.__unsafe_private_named.1.unwrap(), reaction: self.__unsafe_private_named.2.unwrap(), rev: self.__unsafe_private_named.3.unwrap(), extra_data: Some(extra_data), } } } #[jacquard_derive::open_union] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(tag = "$type")] #[serde(bound(deserialize = "'de: 'a"))] pub enum LogRemoveReactionMessage<'a> { #[serde(rename = "chat.bsky.convo.defs#messageView")] MessageView(Box>), #[serde(rename = "chat.bsky.convo.defs#deletedMessageView")] DeletedMessageView(Box>), } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for LogRemoveReaction<'a> { fn nsid() -> &'static str { "chat.bsky.convo.defs" } fn def_name() -> &'static str { "logRemoveReaction" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_chat_bsky_convo_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct LogUnmuteConvo<'a> { #[serde(borrow)] pub convo_id: jacquard_common::CowStr<'a>, #[serde(borrow)] pub rev: jacquard_common::CowStr<'a>, } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for LogUnmuteConvo<'a> { fn nsid() -> &'static str { "chat.bsky.convo.defs" } fn def_name() -> &'static str { "logUnmuteConvo" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_chat_bsky_convo_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct MessageAndReactionView<'a> { #[serde(borrow)] pub message: crate::chat_bsky::convo::MessageView<'a>, #[serde(borrow)] pub reaction: crate::chat_bsky::convo::ReactionView<'a>, } pub mod message_and_reaction_view_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Message; type Reaction; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Message = Unset; type Reaction = Unset; } ///State transition - sets the `message` field to Set pub struct SetMessage(PhantomData S>); impl sealed::Sealed for SetMessage {} impl State for SetMessage { type Message = Set; type Reaction = S::Reaction; } ///State transition - sets the `reaction` field to Set pub struct SetReaction(PhantomData S>); impl sealed::Sealed for SetReaction {} impl State for SetReaction { type Message = S::Message; type Reaction = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `message` field pub struct message(()); ///Marker type for the `reaction` field pub struct reaction(()); } } /// Builder for constructing an instance of this type pub struct MessageAndReactionViewBuilder<'a, S: message_and_reaction_view_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> MessageAndReactionView<'a> { /// Create a new builder for this type pub fn new() -> MessageAndReactionViewBuilder< 'a, message_and_reaction_view_state::Empty, > { MessageAndReactionViewBuilder::new() } } impl<'a> MessageAndReactionViewBuilder<'a, message_and_reaction_view_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { MessageAndReactionViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> MessageAndReactionViewBuilder<'a, S> where S: message_and_reaction_view_state::State, S::Message: message_and_reaction_view_state::IsUnset, { /// Set the `message` field (required) pub fn message( mut self, value: impl Into>, ) -> MessageAndReactionViewBuilder< 'a, message_and_reaction_view_state::SetMessage, > { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); MessageAndReactionViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> MessageAndReactionViewBuilder<'a, S> where S: message_and_reaction_view_state::State, S::Reaction: message_and_reaction_view_state::IsUnset, { /// Set the `reaction` field (required) pub fn reaction( mut self, value: impl Into>, ) -> MessageAndReactionViewBuilder< 'a, message_and_reaction_view_state::SetReaction, > { self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); MessageAndReactionViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> MessageAndReactionViewBuilder<'a, S> where S: message_and_reaction_view_state::State, S::Message: message_and_reaction_view_state::IsSet, S::Reaction: message_and_reaction_view_state::IsSet, { /// Build the final struct pub fn build(self) -> MessageAndReactionView<'a> { MessageAndReactionView { message: self.__unsafe_private_named.0.unwrap(), reaction: self.__unsafe_private_named.1.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> MessageAndReactionView<'a> { MessageAndReactionView { message: self.__unsafe_private_named.0.unwrap(), reaction: self.__unsafe_private_named.1.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for MessageAndReactionView<'a> { fn nsid() -> &'static str { "chat.bsky.convo.defs" } fn def_name() -> &'static str { "messageAndReactionView" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_chat_bsky_convo_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct MessageInput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub embed: std::option::Option>, /// Annotations of text (mentions, URLs, hashtags, etc) #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub facets: std::option::Option>>, #[serde(borrow)] pub text: jacquard_common::CowStr<'a>, } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for MessageInput<'a> { fn nsid() -> &'static str { "chat.bsky.convo.defs" } fn def_name() -> &'static str { "messageInput" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_chat_bsky_convo_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { { let value = &self.text; #[allow(unused_comparisons)] if ::len(value.as_ref()) > 10000usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "text", ), max: 10000usize, actual: ::len(value.as_ref()), }); } } { let value = &self.text; { let count = ::unicode_segmentation::UnicodeSegmentation::graphemes( value.as_ref(), true, ) .count(); if count > 1000usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxGraphemes { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "text", ), max: 1000usize, actual: count, }); } } } Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct MessageRef<'a> { #[serde(borrow)] pub convo_id: jacquard_common::CowStr<'a>, #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, #[serde(borrow)] pub message_id: jacquard_common::CowStr<'a>, } pub mod message_ref_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Did; type MessageId; type ConvoId; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Did = Unset; type MessageId = Unset; type ConvoId = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { type Did = Set; type MessageId = S::MessageId; type ConvoId = S::ConvoId; } ///State transition - sets the `message_id` field to Set pub struct SetMessageId(PhantomData S>); impl sealed::Sealed for SetMessageId {} impl State for SetMessageId { type Did = S::Did; type MessageId = Set; type ConvoId = S::ConvoId; } ///State transition - sets the `convo_id` field to Set pub struct SetConvoId(PhantomData S>); impl sealed::Sealed for SetConvoId {} impl State for SetConvoId { type Did = S::Did; type MessageId = S::MessageId; type ConvoId = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `did` field pub struct did(()); ///Marker type for the `message_id` field pub struct message_id(()); ///Marker type for the `convo_id` field pub struct convo_id(()); } } /// Builder for constructing an instance of this type pub struct MessageRefBuilder<'a, S: message_ref_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ::core::option::Option>, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> MessageRef<'a> { /// Create a new builder for this type pub fn new() -> MessageRefBuilder<'a, message_ref_state::Empty> { MessageRefBuilder::new() } } impl<'a> MessageRefBuilder<'a, message_ref_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { MessageRefBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> MessageRefBuilder<'a, S> where S: message_ref_state::State, S::ConvoId: message_ref_state::IsUnset, { /// Set the `convoId` field (required) pub fn convo_id( mut self, value: impl Into>, ) -> MessageRefBuilder<'a, message_ref_state::SetConvoId> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); MessageRefBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> MessageRefBuilder<'a, S> where S: message_ref_state::State, S::Did: message_ref_state::IsUnset, { /// Set the `did` field (required) pub fn did( mut self, value: impl Into>, ) -> MessageRefBuilder<'a, message_ref_state::SetDid> { self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); MessageRefBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> MessageRefBuilder<'a, S> where S: message_ref_state::State, S::MessageId: message_ref_state::IsUnset, { /// Set the `messageId` field (required) pub fn message_id( mut self, value: impl Into>, ) -> MessageRefBuilder<'a, message_ref_state::SetMessageId> { self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); MessageRefBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> MessageRefBuilder<'a, S> where S: message_ref_state::State, S::Did: message_ref_state::IsSet, S::MessageId: message_ref_state::IsSet, S::ConvoId: message_ref_state::IsSet, { /// Build the final struct pub fn build(self) -> MessageRef<'a> { MessageRef { convo_id: self.__unsafe_private_named.0.unwrap(), did: self.__unsafe_private_named.1.unwrap(), message_id: self.__unsafe_private_named.2.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> MessageRef<'a> { MessageRef { convo_id: self.__unsafe_private_named.0.unwrap(), did: self.__unsafe_private_named.1.unwrap(), message_id: self.__unsafe_private_named.2.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for MessageRef<'a> { fn nsid() -> &'static str { "chat.bsky.convo.defs" } fn def_name() -> &'static str { "messageRef" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_chat_bsky_convo_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct MessageView<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub embed: std::option::Option>, /// Annotations of text (mentions, URLs, hashtags, etc) #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub facets: std::option::Option>>, #[serde(borrow)] pub id: jacquard_common::CowStr<'a>, /// Reactions to this message, in ascending order of creation time. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub reactions: std::option::Option>>, #[serde(borrow)] pub rev: jacquard_common::CowStr<'a>, #[serde(borrow)] pub sender: crate::chat_bsky::convo::MessageViewSender<'a>, pub sent_at: jacquard_common::types::string::Datetime, #[serde(borrow)] pub text: jacquard_common::CowStr<'a>, } pub mod message_view_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Id; type Rev; type Text; type Sender; type SentAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Id = Unset; type Rev = Unset; type Text = Unset; type Sender = Unset; type SentAt = Unset; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData S>); impl sealed::Sealed for SetId {} impl State for SetId { type Id = Set; type Rev = S::Rev; type Text = S::Text; type Sender = S::Sender; type SentAt = S::SentAt; } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData S>); impl sealed::Sealed for SetRev {} impl State for SetRev { type Id = S::Id; type Rev = Set; type Text = S::Text; type Sender = S::Sender; type SentAt = S::SentAt; } ///State transition - sets the `text` field to Set pub struct SetText(PhantomData S>); impl sealed::Sealed for SetText {} impl State for SetText { type Id = S::Id; type Rev = S::Rev; type Text = Set; type Sender = S::Sender; type SentAt = S::SentAt; } ///State transition - sets the `sender` field to Set pub struct SetSender(PhantomData S>); impl sealed::Sealed for SetSender {} impl State for SetSender { type Id = S::Id; type Rev = S::Rev; type Text = S::Text; type Sender = Set; type SentAt = S::SentAt; } ///State transition - sets the `sent_at` field to Set pub struct SetSentAt(PhantomData S>); impl sealed::Sealed for SetSentAt {} impl State for SetSentAt { type Id = S::Id; type Rev = S::Rev; type Text = S::Text; type Sender = S::Sender; type SentAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `id` field pub struct id(()); ///Marker type for the `rev` field pub struct rev(()); ///Marker type for the `text` field pub struct text(()); ///Marker type for the `sender` field pub struct sender(()); ///Marker type for the `sent_at` field pub struct sent_at(()); } } /// Builder for constructing an instance of this type pub struct MessageViewBuilder<'a, S: message_view_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ::core::option::Option>>, ::core::option::Option>, ::core::option::Option>>, ::core::option::Option>, ::core::option::Option>, ::core::option::Option, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> MessageView<'a> { /// Create a new builder for this type pub fn new() -> MessageViewBuilder<'a, message_view_state::Empty> { MessageViewBuilder::new() } } impl<'a> MessageViewBuilder<'a, message_view_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { MessageViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None, None, None, None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S: message_view_state::State> MessageViewBuilder<'a, S> { /// Set the `embed` field (optional) pub fn embed( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.0 = value.into(); self } /// Set the `embed` field to an Option value (optional) pub fn maybe_embed( mut self, value: Option>, ) -> Self { self.__unsafe_private_named.0 = value; self } } impl<'a, S: message_view_state::State> MessageViewBuilder<'a, S> { /// Set the `facets` field (optional) pub fn facets( mut self, value: impl Into>>>, ) -> Self { self.__unsafe_private_named.1 = value.into(); self } /// Set the `facets` field to an Option value (optional) pub fn maybe_facets( mut self, value: Option>>, ) -> Self { self.__unsafe_private_named.1 = value; self } } impl<'a, S> MessageViewBuilder<'a, S> where S: message_view_state::State, S::Id: message_view_state::IsUnset, { /// Set the `id` field (required) pub fn id( mut self, value: impl Into>, ) -> MessageViewBuilder<'a, message_view_state::SetId> { self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); MessageViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S: message_view_state::State> MessageViewBuilder<'a, S> { /// Set the `reactions` field (optional) pub fn reactions( mut self, value: impl Into>>>, ) -> Self { self.__unsafe_private_named.3 = value.into(); self } /// Set the `reactions` field to an Option value (optional) pub fn maybe_reactions( mut self, value: Option>>, ) -> Self { self.__unsafe_private_named.3 = value; self } } impl<'a, S> MessageViewBuilder<'a, S> where S: message_view_state::State, S::Rev: message_view_state::IsUnset, { /// Set the `rev` field (required) pub fn rev( mut self, value: impl Into>, ) -> MessageViewBuilder<'a, message_view_state::SetRev> { self.__unsafe_private_named.4 = ::core::option::Option::Some(value.into()); MessageViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> MessageViewBuilder<'a, S> where S: message_view_state::State, S::Sender: message_view_state::IsUnset, { /// Set the `sender` field (required) pub fn sender( mut self, value: impl Into>, ) -> MessageViewBuilder<'a, message_view_state::SetSender> { self.__unsafe_private_named.5 = ::core::option::Option::Some(value.into()); MessageViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> MessageViewBuilder<'a, S> where S: message_view_state::State, S::SentAt: message_view_state::IsUnset, { /// Set the `sentAt` field (required) pub fn sent_at( mut self, value: impl Into, ) -> MessageViewBuilder<'a, message_view_state::SetSentAt> { self.__unsafe_private_named.6 = ::core::option::Option::Some(value.into()); MessageViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> MessageViewBuilder<'a, S> where S: message_view_state::State, S::Text: message_view_state::IsUnset, { /// Set the `text` field (required) pub fn text( mut self, value: impl Into>, ) -> MessageViewBuilder<'a, message_view_state::SetText> { self.__unsafe_private_named.7 = ::core::option::Option::Some(value.into()); MessageViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> MessageViewBuilder<'a, S> where S: message_view_state::State, S::Id: message_view_state::IsSet, S::Rev: message_view_state::IsSet, S::Text: message_view_state::IsSet, S::Sender: message_view_state::IsSet, S::SentAt: message_view_state::IsSet, { /// Build the final struct pub fn build(self) -> MessageView<'a> { MessageView { embed: self.__unsafe_private_named.0, facets: self.__unsafe_private_named.1, id: self.__unsafe_private_named.2.unwrap(), reactions: self.__unsafe_private_named.3, rev: self.__unsafe_private_named.4.unwrap(), sender: self.__unsafe_private_named.5.unwrap(), sent_at: self.__unsafe_private_named.6.unwrap(), text: self.__unsafe_private_named.7.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> MessageView<'a> { MessageView { embed: self.__unsafe_private_named.0, facets: self.__unsafe_private_named.1, id: self.__unsafe_private_named.2.unwrap(), reactions: self.__unsafe_private_named.3, rev: self.__unsafe_private_named.4.unwrap(), sender: self.__unsafe_private_named.5.unwrap(), sent_at: self.__unsafe_private_named.6.unwrap(), text: self.__unsafe_private_named.7.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for MessageView<'a> { fn nsid() -> &'static str { "chat.bsky.convo.defs" } fn def_name() -> &'static str { "messageView" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_chat_bsky_convo_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { { let value = &self.text; #[allow(unused_comparisons)] if ::len(value.as_ref()) > 10000usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "text", ), max: 10000usize, actual: ::len(value.as_ref()), }); } } { let value = &self.text; { let count = ::unicode_segmentation::UnicodeSegmentation::graphemes( value.as_ref(), true, ) .count(); if count > 1000usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxGraphemes { path: ::jacquard_lexicon::validation::ValidationPath::from_field( "text", ), max: 1000usize, actual: count, }); } } } Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct MessageViewSender<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } pub mod message_view_sender_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Did = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `did` field pub struct did(()); } } /// Builder for constructing an instance of this type pub struct MessageViewSenderBuilder<'a, S: message_view_sender_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> MessageViewSender<'a> { /// Create a new builder for this type pub fn new() -> MessageViewSenderBuilder<'a, message_view_sender_state::Empty> { MessageViewSenderBuilder::new() } } impl<'a> MessageViewSenderBuilder<'a, message_view_sender_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { MessageViewSenderBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None,), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> MessageViewSenderBuilder<'a, S> where S: message_view_sender_state::State, S::Did: message_view_sender_state::IsUnset, { /// Set the `did` field (required) pub fn did( mut self, value: impl Into>, ) -> MessageViewSenderBuilder<'a, message_view_sender_state::SetDid> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); MessageViewSenderBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> MessageViewSenderBuilder<'a, S> where S: message_view_sender_state::State, S::Did: message_view_sender_state::IsSet, { /// Build the final struct pub fn build(self) -> MessageViewSender<'a> { MessageViewSender { did: self.__unsafe_private_named.0.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> MessageViewSender<'a> { MessageViewSender { did: self.__unsafe_private_named.0.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for MessageViewSender<'a> { fn nsid() -> &'static str { "chat.bsky.convo.defs" } fn def_name() -> &'static str { "messageViewSender" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_chat_bsky_convo_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ReactionView<'a> { pub created_at: jacquard_common::types::string::Datetime, #[serde(borrow)] pub sender: crate::chat_bsky::convo::ReactionViewSender<'a>, #[serde(borrow)] pub value: jacquard_common::CowStr<'a>, } pub mod reaction_view_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Sender; type CreatedAt; type Value; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Sender = Unset; type CreatedAt = Unset; type Value = Unset; } ///State transition - sets the `sender` field to Set pub struct SetSender(PhantomData S>); impl sealed::Sealed for SetSender {} impl State for SetSender { type Sender = Set; type CreatedAt = S::CreatedAt; type Value = S::Value; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type Sender = S::Sender; type CreatedAt = Set; type Value = S::Value; } ///State transition - sets the `value` field to Set pub struct SetValue(PhantomData S>); impl sealed::Sealed for SetValue {} impl State for SetValue { type Sender = S::Sender; type CreatedAt = S::CreatedAt; type Value = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `sender` field pub struct sender(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `value` field pub struct value(()); } } /// Builder for constructing an instance of this type pub struct ReactionViewBuilder<'a, S: reaction_view_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option, ::core::option::Option>, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> ReactionView<'a> { /// Create a new builder for this type pub fn new() -> ReactionViewBuilder<'a, reaction_view_state::Empty> { ReactionViewBuilder::new() } } impl<'a> ReactionViewBuilder<'a, reaction_view_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { ReactionViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None, None, None), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ReactionViewBuilder<'a, S> where S: reaction_view_state::State, S::CreatedAt: reaction_view_state::IsUnset, { /// Set the `createdAt` field (required) pub fn created_at( mut self, value: impl Into, ) -> ReactionViewBuilder<'a, reaction_view_state::SetCreatedAt> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); ReactionViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ReactionViewBuilder<'a, S> where S: reaction_view_state::State, S::Sender: reaction_view_state::IsUnset, { /// Set the `sender` field (required) pub fn sender( mut self, value: impl Into>, ) -> ReactionViewBuilder<'a, reaction_view_state::SetSender> { self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); ReactionViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ReactionViewBuilder<'a, S> where S: reaction_view_state::State, S::Value: reaction_view_state::IsUnset, { /// Set the `value` field (required) pub fn value( mut self, value: impl Into>, ) -> ReactionViewBuilder<'a, reaction_view_state::SetValue> { self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); ReactionViewBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ReactionViewBuilder<'a, S> where S: reaction_view_state::State, S::Sender: reaction_view_state::IsSet, S::CreatedAt: reaction_view_state::IsSet, S::Value: reaction_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ReactionView<'a> { ReactionView { created_at: self.__unsafe_private_named.0.unwrap(), sender: self.__unsafe_private_named.1.unwrap(), value: self.__unsafe_private_named.2.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> ReactionView<'a> { ReactionView { created_at: self.__unsafe_private_named.0.unwrap(), sender: self.__unsafe_private_named.1.unwrap(), value: self.__unsafe_private_named.2.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ReactionView<'a> { fn nsid() -> &'static str { "chat.bsky.convo.defs" } fn def_name() -> &'static str { "reactionView" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_chat_bsky_convo_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ReactionViewSender<'a> { #[serde(borrow)] pub did: jacquard_common::types::string::Did<'a>, } pub mod reaction_view_sender_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Did = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `did` field pub struct did(()); } } /// Builder for constructing an instance of this type pub struct ReactionViewSenderBuilder<'a, S: reaction_view_sender_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> ReactionViewSender<'a> { /// Create a new builder for this type pub fn new() -> ReactionViewSenderBuilder<'a, reaction_view_sender_state::Empty> { ReactionViewSenderBuilder::new() } } impl<'a> ReactionViewSenderBuilder<'a, reaction_view_sender_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { ReactionViewSenderBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None,), _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ReactionViewSenderBuilder<'a, S> where S: reaction_view_sender_state::State, S::Did: reaction_view_sender_state::IsUnset, { /// Set the `did` field (required) pub fn did( mut self, value: impl Into>, ) -> ReactionViewSenderBuilder<'a, reaction_view_sender_state::SetDid> { self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); ReactionViewSenderBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, _phantom: ::core::marker::PhantomData, } } } impl<'a, S> ReactionViewSenderBuilder<'a, S> where S: reaction_view_sender_state::State, S::Did: reaction_view_sender_state::IsSet, { /// Build the final struct pub fn build(self) -> ReactionViewSender<'a> { ReactionViewSender { did: self.__unsafe_private_named.0.unwrap(), extra_data: Default::default(), } } /// Build the final struct with custom extra_data pub fn build_with_data( self, extra_data: std::collections::BTreeMap< jacquard_common::smol_str::SmolStr, jacquard_common::types::value::Data<'a>, >, ) -> ReactionViewSender<'a> { ReactionViewSender { did: self.__unsafe_private_named.0.unwrap(), extra_data: Some(extra_data), } } } impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ReactionViewSender<'a> { fn nsid() -> &'static str { "chat.bsky.convo.defs" } fn def_name() -> &'static str { "reactionViewSender" } fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { lexicon_doc_chat_bsky_convo_defs() } fn validate( &self, ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } }