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