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