atproto blogging
at main 769 lines 30 kB view raw
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: app.bsky.feed.generator 4// 5// This file was automatically generated from Lexicon schemas. 6// Any manual changes will be overwritten on the next regeneration. 7 8/// Record declaring of the existence of a feed generator, and containing metadata about it. The record can exist in any repository. 9#[jacquard_derive::lexicon] 10#[derive( 11 serde::Serialize, 12 serde::Deserialize, 13 Debug, 14 Clone, 15 PartialEq, 16 Eq, 17 jacquard_derive::IntoStatic 18)] 19#[serde(rename_all = "camelCase")] 20pub struct Generator<'a> { 21 /// Declaration that a feed accepts feedback interactions from a client through app.bsky.feed.sendInteractions 22 #[serde(skip_serializing_if = "std::option::Option::is_none")] 23 pub accepts_interactions: std::option::Option<bool>, 24 #[serde(skip_serializing_if = "std::option::Option::is_none")] 25 #[serde(borrow)] 26 pub avatar: std::option::Option<jacquard_common::types::blob::BlobRef<'a>>, 27 #[serde(skip_serializing_if = "std::option::Option::is_none")] 28 #[serde(borrow)] 29 pub content_mode: std::option::Option<GeneratorContentMode<'a>>, 30 pub created_at: jacquard_common::types::string::Datetime, 31 #[serde(skip_serializing_if = "std::option::Option::is_none")] 32 #[serde(borrow)] 33 pub description: std::option::Option<jacquard_common::CowStr<'a>>, 34 #[serde(skip_serializing_if = "std::option::Option::is_none")] 35 #[serde(borrow)] 36 pub description_facets: std::option::Option< 37 Vec<crate::app_bsky::richtext::facet::Facet<'a>>, 38 >, 39 #[serde(borrow)] 40 pub did: jacquard_common::types::string::Did<'a>, 41 #[serde(borrow)] 42 pub display_name: jacquard_common::CowStr<'a>, 43 /// Self-label values 44 #[serde(skip_serializing_if = "std::option::Option::is_none")] 45 #[serde(borrow)] 46 pub labels: std::option::Option<crate::com_atproto::label::SelfLabels<'a>>, 47} 48 49pub mod generator_state { 50 51 pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; 52 #[allow(unused)] 53 use ::core::marker::PhantomData; 54 mod sealed { 55 pub trait Sealed {} 56 } 57 /// State trait tracking which required fields have been set 58 pub trait State: sealed::Sealed { 59 type CreatedAt; 60 type Did; 61 type DisplayName; 62 } 63 /// Empty state - all required fields are unset 64 pub struct Empty(()); 65 impl sealed::Sealed for Empty {} 66 impl State for Empty { 67 type CreatedAt = Unset; 68 type Did = Unset; 69 type DisplayName = Unset; 70 } 71 ///State transition - sets the `created_at` field to Set 72 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>); 73 impl<S: State> sealed::Sealed for SetCreatedAt<S> {} 74 impl<S: State> State for SetCreatedAt<S> { 75 type CreatedAt = Set<members::created_at>; 76 type Did = S::Did; 77 type DisplayName = S::DisplayName; 78 } 79 ///State transition - sets the `did` field to Set 80 pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>); 81 impl<S: State> sealed::Sealed for SetDid<S> {} 82 impl<S: State> State for SetDid<S> { 83 type CreatedAt = S::CreatedAt; 84 type Did = Set<members::did>; 85 type DisplayName = S::DisplayName; 86 } 87 ///State transition - sets the `display_name` field to Set 88 pub struct SetDisplayName<S: State = Empty>(PhantomData<fn() -> S>); 89 impl<S: State> sealed::Sealed for SetDisplayName<S> {} 90 impl<S: State> State for SetDisplayName<S> { 91 type CreatedAt = S::CreatedAt; 92 type Did = S::Did; 93 type DisplayName = Set<members::display_name>; 94 } 95 /// Marker types for field names 96 #[allow(non_camel_case_types)] 97 pub mod members { 98 ///Marker type for the `created_at` field 99 pub struct created_at(()); 100 ///Marker type for the `did` field 101 pub struct did(()); 102 ///Marker type for the `display_name` field 103 pub struct display_name(()); 104 } 105} 106 107/// Builder for constructing an instance of this type 108pub struct GeneratorBuilder<'a, S: generator_state::State> { 109 _phantom_state: ::core::marker::PhantomData<fn() -> S>, 110 __unsafe_private_named: ( 111 ::core::option::Option<bool>, 112 ::core::option::Option<jacquard_common::types::blob::BlobRef<'a>>, 113 ::core::option::Option<GeneratorContentMode<'a>>, 114 ::core::option::Option<jacquard_common::types::string::Datetime>, 115 ::core::option::Option<jacquard_common::CowStr<'a>>, 116 ::core::option::Option<Vec<crate::app_bsky::richtext::facet::Facet<'a>>>, 117 ::core::option::Option<jacquard_common::types::string::Did<'a>>, 118 ::core::option::Option<jacquard_common::CowStr<'a>>, 119 ::core::option::Option<crate::com_atproto::label::SelfLabels<'a>>, 120 ), 121 _phantom: ::core::marker::PhantomData<&'a ()>, 122} 123 124impl<'a> Generator<'a> { 125 /// Create a new builder for this type 126 pub fn new() -> GeneratorBuilder<'a, generator_state::Empty> { 127 GeneratorBuilder::new() 128 } 129} 130 131impl<'a> GeneratorBuilder<'a, generator_state::Empty> { 132 /// Create a new builder with all fields unset 133 pub fn new() -> Self { 134 GeneratorBuilder { 135 _phantom_state: ::core::marker::PhantomData, 136 __unsafe_private_named: ( 137 None, 138 None, 139 None, 140 None, 141 None, 142 None, 143 None, 144 None, 145 None, 146 ), 147 _phantom: ::core::marker::PhantomData, 148 } 149 } 150} 151 152impl<'a, S: generator_state::State> GeneratorBuilder<'a, S> { 153 /// Set the `acceptsInteractions` field (optional) 154 pub fn accepts_interactions(mut self, value: impl Into<Option<bool>>) -> Self { 155 self.__unsafe_private_named.0 = value.into(); 156 self 157 } 158 /// Set the `acceptsInteractions` field to an Option value (optional) 159 pub fn maybe_accepts_interactions(mut self, value: Option<bool>) -> Self { 160 self.__unsafe_private_named.0 = value; 161 self 162 } 163} 164 165impl<'a, S: generator_state::State> GeneratorBuilder<'a, S> { 166 /// Set the `avatar` field (optional) 167 pub fn avatar( 168 mut self, 169 value: impl Into<Option<jacquard_common::types::blob::BlobRef<'a>>>, 170 ) -> Self { 171 self.__unsafe_private_named.1 = value.into(); 172 self 173 } 174 /// Set the `avatar` field to an Option value (optional) 175 pub fn maybe_avatar( 176 mut self, 177 value: Option<jacquard_common::types::blob::BlobRef<'a>>, 178 ) -> Self { 179 self.__unsafe_private_named.1 = value; 180 self 181 } 182} 183 184impl<'a, S: generator_state::State> GeneratorBuilder<'a, S> { 185 /// Set the `contentMode` field (optional) 186 pub fn content_mode( 187 mut self, 188 value: impl Into<Option<GeneratorContentMode<'a>>>, 189 ) -> Self { 190 self.__unsafe_private_named.2 = value.into(); 191 self 192 } 193 /// Set the `contentMode` field to an Option value (optional) 194 pub fn maybe_content_mode( 195 mut self, 196 value: Option<GeneratorContentMode<'a>>, 197 ) -> Self { 198 self.__unsafe_private_named.2 = value; 199 self 200 } 201} 202 203impl<'a, S> GeneratorBuilder<'a, S> 204where 205 S: generator_state::State, 206 S::CreatedAt: generator_state::IsUnset, 207{ 208 /// Set the `createdAt` field (required) 209 pub fn created_at( 210 mut self, 211 value: impl Into<jacquard_common::types::string::Datetime>, 212 ) -> GeneratorBuilder<'a, generator_state::SetCreatedAt<S>> { 213 self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into()); 214 GeneratorBuilder { 215 _phantom_state: ::core::marker::PhantomData, 216 __unsafe_private_named: self.__unsafe_private_named, 217 _phantom: ::core::marker::PhantomData, 218 } 219 } 220} 221 222impl<'a, S: generator_state::State> GeneratorBuilder<'a, S> { 223 /// Set the `description` field (optional) 224 pub fn description( 225 mut self, 226 value: impl Into<Option<jacquard_common::CowStr<'a>>>, 227 ) -> Self { 228 self.__unsafe_private_named.4 = value.into(); 229 self 230 } 231 /// Set the `description` field to an Option value (optional) 232 pub fn maybe_description( 233 mut self, 234 value: Option<jacquard_common::CowStr<'a>>, 235 ) -> Self { 236 self.__unsafe_private_named.4 = value; 237 self 238 } 239} 240 241impl<'a, S: generator_state::State> GeneratorBuilder<'a, S> { 242 /// Set the `descriptionFacets` field (optional) 243 pub fn description_facets( 244 mut self, 245 value: impl Into<Option<Vec<crate::app_bsky::richtext::facet::Facet<'a>>>>, 246 ) -> Self { 247 self.__unsafe_private_named.5 = value.into(); 248 self 249 } 250 /// Set the `descriptionFacets` field to an Option value (optional) 251 pub fn maybe_description_facets( 252 mut self, 253 value: Option<Vec<crate::app_bsky::richtext::facet::Facet<'a>>>, 254 ) -> Self { 255 self.__unsafe_private_named.5 = value; 256 self 257 } 258} 259 260impl<'a, S> GeneratorBuilder<'a, S> 261where 262 S: generator_state::State, 263 S::Did: generator_state::IsUnset, 264{ 265 /// Set the `did` field (required) 266 pub fn did( 267 mut self, 268 value: impl Into<jacquard_common::types::string::Did<'a>>, 269 ) -> GeneratorBuilder<'a, generator_state::SetDid<S>> { 270 self.__unsafe_private_named.6 = ::core::option::Option::Some(value.into()); 271 GeneratorBuilder { 272 _phantom_state: ::core::marker::PhantomData, 273 __unsafe_private_named: self.__unsafe_private_named, 274 _phantom: ::core::marker::PhantomData, 275 } 276 } 277} 278 279impl<'a, S> GeneratorBuilder<'a, S> 280where 281 S: generator_state::State, 282 S::DisplayName: generator_state::IsUnset, 283{ 284 /// Set the `displayName` field (required) 285 pub fn display_name( 286 mut self, 287 value: impl Into<jacquard_common::CowStr<'a>>, 288 ) -> GeneratorBuilder<'a, generator_state::SetDisplayName<S>> { 289 self.__unsafe_private_named.7 = ::core::option::Option::Some(value.into()); 290 GeneratorBuilder { 291 _phantom_state: ::core::marker::PhantomData, 292 __unsafe_private_named: self.__unsafe_private_named, 293 _phantom: ::core::marker::PhantomData, 294 } 295 } 296} 297 298impl<'a, S: generator_state::State> GeneratorBuilder<'a, S> { 299 /// Set the `labels` field (optional) 300 pub fn labels( 301 mut self, 302 value: impl Into<Option<crate::com_atproto::label::SelfLabels<'a>>>, 303 ) -> Self { 304 self.__unsafe_private_named.8 = value.into(); 305 self 306 } 307 /// Set the `labels` field to an Option value (optional) 308 pub fn maybe_labels( 309 mut self, 310 value: Option<crate::com_atproto::label::SelfLabels<'a>>, 311 ) -> Self { 312 self.__unsafe_private_named.8 = value; 313 self 314 } 315} 316 317impl<'a, S> GeneratorBuilder<'a, S> 318where 319 S: generator_state::State, 320 S::CreatedAt: generator_state::IsSet, 321 S::Did: generator_state::IsSet, 322 S::DisplayName: generator_state::IsSet, 323{ 324 /// Build the final struct 325 pub fn build(self) -> Generator<'a> { 326 Generator { 327 accepts_interactions: self.__unsafe_private_named.0, 328 avatar: self.__unsafe_private_named.1, 329 content_mode: self.__unsafe_private_named.2, 330 created_at: self.__unsafe_private_named.3.unwrap(), 331 description: self.__unsafe_private_named.4, 332 description_facets: self.__unsafe_private_named.5, 333 did: self.__unsafe_private_named.6.unwrap(), 334 display_name: self.__unsafe_private_named.7.unwrap(), 335 labels: self.__unsafe_private_named.8, 336 extra_data: Default::default(), 337 } 338 } 339 /// Build the final struct with custom extra_data 340 pub fn build_with_data( 341 self, 342 extra_data: std::collections::BTreeMap< 343 jacquard_common::smol_str::SmolStr, 344 jacquard_common::types::value::Data<'a>, 345 >, 346 ) -> Generator<'a> { 347 Generator { 348 accepts_interactions: self.__unsafe_private_named.0, 349 avatar: self.__unsafe_private_named.1, 350 content_mode: self.__unsafe_private_named.2, 351 created_at: self.__unsafe_private_named.3.unwrap(), 352 description: self.__unsafe_private_named.4, 353 description_facets: self.__unsafe_private_named.5, 354 did: self.__unsafe_private_named.6.unwrap(), 355 display_name: self.__unsafe_private_named.7.unwrap(), 356 labels: self.__unsafe_private_named.8, 357 extra_data: Some(extra_data), 358 } 359 } 360} 361 362impl<'a> Generator<'a> { 363 pub fn uri( 364 uri: impl Into<jacquard_common::CowStr<'a>>, 365 ) -> Result< 366 jacquard_common::types::uri::RecordUri<'a, GeneratorRecord>, 367 jacquard_common::types::uri::UriError, 368 > { 369 jacquard_common::types::uri::RecordUri::try_from_uri( 370 jacquard_common::types::string::AtUri::new_cow(uri.into())?, 371 ) 372 } 373} 374 375#[derive(Debug, Clone, PartialEq, Eq, Hash)] 376pub enum GeneratorContentMode<'a> { 377 ContentModeUnspecified, 378 ContentModeVideo, 379 Other(jacquard_common::CowStr<'a>), 380} 381 382impl<'a> GeneratorContentMode<'a> { 383 pub fn as_str(&self) -> &str { 384 match self { 385 Self::ContentModeUnspecified => "app.bsky.feed.defs#contentModeUnspecified", 386 Self::ContentModeVideo => "app.bsky.feed.defs#contentModeVideo", 387 Self::Other(s) => s.as_ref(), 388 } 389 } 390} 391 392impl<'a> From<&'a str> for GeneratorContentMode<'a> { 393 fn from(s: &'a str) -> Self { 394 match s { 395 "app.bsky.feed.defs#contentModeUnspecified" => Self::ContentModeUnspecified, 396 "app.bsky.feed.defs#contentModeVideo" => Self::ContentModeVideo, 397 _ => Self::Other(jacquard_common::CowStr::from(s)), 398 } 399 } 400} 401 402impl<'a> From<String> for GeneratorContentMode<'a> { 403 fn from(s: String) -> Self { 404 match s.as_str() { 405 "app.bsky.feed.defs#contentModeUnspecified" => Self::ContentModeUnspecified, 406 "app.bsky.feed.defs#contentModeVideo" => Self::ContentModeVideo, 407 _ => Self::Other(jacquard_common::CowStr::from(s)), 408 } 409 } 410} 411 412impl<'a> core::fmt::Display for GeneratorContentMode<'a> { 413 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { 414 write!(f, "{}", self.as_str()) 415 } 416} 417 418impl<'a> AsRef<str> for GeneratorContentMode<'a> { 419 fn as_ref(&self) -> &str { 420 self.as_str() 421 } 422} 423 424impl<'a> serde::Serialize for GeneratorContentMode<'a> { 425 fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> 426 where 427 S: serde::Serializer, 428 { 429 serializer.serialize_str(self.as_str()) 430 } 431} 432 433impl<'de, 'a> serde::Deserialize<'de> for GeneratorContentMode<'a> 434where 435 'de: 'a, 436{ 437 fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> 438 where 439 D: serde::Deserializer<'de>, 440 { 441 let s = <&'de str>::deserialize(deserializer)?; 442 Ok(Self::from(s)) 443 } 444} 445 446impl<'a> Default for GeneratorContentMode<'a> { 447 fn default() -> Self { 448 Self::Other(Default::default()) 449 } 450} 451 452impl jacquard_common::IntoStatic for GeneratorContentMode<'_> { 453 type Output = GeneratorContentMode<'static>; 454 fn into_static(self) -> Self::Output { 455 match self { 456 GeneratorContentMode::ContentModeUnspecified => { 457 GeneratorContentMode::ContentModeUnspecified 458 } 459 GeneratorContentMode::ContentModeVideo => { 460 GeneratorContentMode::ContentModeVideo 461 } 462 GeneratorContentMode::Other(v) => { 463 GeneratorContentMode::Other(v.into_static()) 464 } 465 } 466 } 467} 468 469/// Typed wrapper for GetRecord response with this collection's record type. 470#[derive( 471 serde::Serialize, 472 serde::Deserialize, 473 Debug, 474 Clone, 475 PartialEq, 476 Eq, 477 jacquard_derive::IntoStatic 478)] 479#[serde(rename_all = "camelCase")] 480pub struct GeneratorGetRecordOutput<'a> { 481 #[serde(skip_serializing_if = "std::option::Option::is_none")] 482 #[serde(borrow)] 483 pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>, 484 #[serde(borrow)] 485 pub uri: jacquard_common::types::string::AtUri<'a>, 486 #[serde(borrow)] 487 pub value: Generator<'a>, 488} 489 490impl From<GeneratorGetRecordOutput<'_>> for Generator<'_> { 491 fn from(output: GeneratorGetRecordOutput<'_>) -> Self { 492 use jacquard_common::IntoStatic; 493 output.value.into_static() 494 } 495} 496 497impl jacquard_common::types::collection::Collection for Generator<'_> { 498 const NSID: &'static str = "app.bsky.feed.generator"; 499 type Record = GeneratorRecord; 500} 501 502/// Marker type for deserializing records from this collection. 503#[derive(Debug, serde::Serialize, serde::Deserialize)] 504pub struct GeneratorRecord; 505impl jacquard_common::xrpc::XrpcResp for GeneratorRecord { 506 const NSID: &'static str = "app.bsky.feed.generator"; 507 const ENCODING: &'static str = "application/json"; 508 type Output<'de> = GeneratorGetRecordOutput<'de>; 509 type Err<'de> = jacquard_common::types::collection::RecordError<'de>; 510} 511 512impl jacquard_common::types::collection::Collection for GeneratorRecord { 513 const NSID: &'static str = "app.bsky.feed.generator"; 514 type Record = GeneratorRecord; 515} 516 517impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Generator<'a> { 518 fn nsid() -> &'static str { 519 "app.bsky.feed.generator" 520 } 521 fn def_name() -> &'static str { 522 "main" 523 } 524 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 525 lexicon_doc_app_bsky_feed_generator() 526 } 527 fn validate( 528 &self, 529 ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 530 if let Some(ref value) = self.description { 531 #[allow(unused_comparisons)] 532 if <str>::len(value.as_ref()) > 3000usize { 533 return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { 534 path: ::jacquard_lexicon::validation::ValidationPath::from_field( 535 "description", 536 ), 537 max: 3000usize, 538 actual: <str>::len(value.as_ref()), 539 }); 540 } 541 } 542 if let Some(ref value) = self.description { 543 { 544 let count = ::unicode_segmentation::UnicodeSegmentation::graphemes( 545 value.as_ref(), 546 true, 547 ) 548 .count(); 549 if count > 300usize { 550 return Err(::jacquard_lexicon::validation::ConstraintError::MaxGraphemes { 551 path: ::jacquard_lexicon::validation::ValidationPath::from_field( 552 "description", 553 ), 554 max: 300usize, 555 actual: count, 556 }); 557 } 558 } 559 } 560 { 561 let value = &self.display_name; 562 #[allow(unused_comparisons)] 563 if <str>::len(value.as_ref()) > 240usize { 564 return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { 565 path: ::jacquard_lexicon::validation::ValidationPath::from_field( 566 "display_name", 567 ), 568 max: 240usize, 569 actual: <str>::len(value.as_ref()), 570 }); 571 } 572 } 573 { 574 let value = &self.display_name; 575 { 576 let count = ::unicode_segmentation::UnicodeSegmentation::graphemes( 577 value.as_ref(), 578 true, 579 ) 580 .count(); 581 if count > 24usize { 582 return Err(::jacquard_lexicon::validation::ConstraintError::MaxGraphemes { 583 path: ::jacquard_lexicon::validation::ValidationPath::from_field( 584 "display_name", 585 ), 586 max: 24usize, 587 actual: count, 588 }); 589 } 590 } 591 } 592 Ok(()) 593 } 594} 595 596fn lexicon_doc_app_bsky_feed_generator() -> ::jacquard_lexicon::lexicon::LexiconDoc< 597 'static, 598> { 599 ::jacquard_lexicon::lexicon::LexiconDoc { 600 lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1, 601 id: ::jacquard_common::CowStr::new_static("app.bsky.feed.generator"), 602 revision: None, 603 description: None, 604 defs: { 605 let mut map = ::alloc::collections::BTreeMap::new(); 606 map.insert( 607 ::jacquard_common::smol_str::SmolStr::new_static("main"), 608 ::jacquard_lexicon::lexicon::LexUserType::Record(::jacquard_lexicon::lexicon::LexRecord { 609 description: Some( 610 ::jacquard_common::CowStr::new_static( 611 "Record declaring of the existence of a feed generator, and containing metadata about it. The record can exist in any repository.", 612 ), 613 ), 614 key: Some(::jacquard_common::CowStr::new_static("any")), 615 record: ::jacquard_lexicon::lexicon::LexRecordRecord::Object(::jacquard_lexicon::lexicon::LexObject { 616 description: None, 617 required: Some( 618 vec![ 619 ::jacquard_common::smol_str::SmolStr::new_static("did"), 620 ::jacquard_common::smol_str::SmolStr::new_static("displayName"), 621 ::jacquard_common::smol_str::SmolStr::new_static("createdAt") 622 ], 623 ), 624 nullable: None, 625 properties: { 626 #[allow(unused_mut)] 627 let mut map = ::alloc::collections::BTreeMap::new(); 628 map.insert( 629 ::jacquard_common::smol_str::SmolStr::new_static( 630 "acceptsInteractions", 631 ), 632 ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { 633 description: None, 634 default: None, 635 r#const: None, 636 }), 637 ); 638 map.insert( 639 ::jacquard_common::smol_str::SmolStr::new_static("avatar"), 640 ::jacquard_lexicon::lexicon::LexObjectProperty::Blob(::jacquard_lexicon::lexicon::LexBlob { 641 description: None, 642 accept: None, 643 max_size: None, 644 }), 645 ); 646 map.insert( 647 ::jacquard_common::smol_str::SmolStr::new_static( 648 "contentMode", 649 ), 650 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 651 description: None, 652 format: None, 653 default: None, 654 min_length: None, 655 max_length: None, 656 min_graphemes: None, 657 max_graphemes: None, 658 r#enum: None, 659 r#const: None, 660 known_values: None, 661 }), 662 ); 663 map.insert( 664 ::jacquard_common::smol_str::SmolStr::new_static( 665 "createdAt", 666 ), 667 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 668 description: None, 669 format: Some( 670 ::jacquard_lexicon::lexicon::LexStringFormat::Datetime, 671 ), 672 default: None, 673 min_length: None, 674 max_length: None, 675 min_graphemes: None, 676 max_graphemes: None, 677 r#enum: None, 678 r#const: None, 679 known_values: None, 680 }), 681 ); 682 map.insert( 683 ::jacquard_common::smol_str::SmolStr::new_static( 684 "description", 685 ), 686 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 687 description: None, 688 format: None, 689 default: None, 690 min_length: None, 691 max_length: Some(3000usize), 692 min_graphemes: None, 693 max_graphemes: Some(300usize), 694 r#enum: None, 695 r#const: None, 696 known_values: None, 697 }), 698 ); 699 map.insert( 700 ::jacquard_common::smol_str::SmolStr::new_static( 701 "descriptionFacets", 702 ), 703 ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { 704 description: None, 705 items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef { 706 description: None, 707 r#ref: ::jacquard_common::CowStr::new_static( 708 "app.bsky.richtext.facet", 709 ), 710 }), 711 min_length: None, 712 max_length: None, 713 }), 714 ); 715 map.insert( 716 ::jacquard_common::smol_str::SmolStr::new_static("did"), 717 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 718 description: None, 719 format: Some( 720 ::jacquard_lexicon::lexicon::LexStringFormat::Did, 721 ), 722 default: None, 723 min_length: None, 724 max_length: None, 725 min_graphemes: None, 726 max_graphemes: None, 727 r#enum: None, 728 r#const: None, 729 known_values: None, 730 }), 731 ); 732 map.insert( 733 ::jacquard_common::smol_str::SmolStr::new_static( 734 "displayName", 735 ), 736 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 737 description: None, 738 format: None, 739 default: None, 740 min_length: None, 741 max_length: Some(240usize), 742 min_graphemes: None, 743 max_graphemes: Some(24usize), 744 r#enum: None, 745 r#const: None, 746 known_values: None, 747 }), 748 ); 749 map.insert( 750 ::jacquard_common::smol_str::SmolStr::new_static("labels"), 751 ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion { 752 description: Some( 753 ::jacquard_common::CowStr::new_static("Self-label values"), 754 ), 755 refs: vec![ 756 ::jacquard_common::CowStr::new_static("com.atproto.label.defs#selfLabels") 757 ], 758 closed: None, 759 }), 760 ); 761 map 762 }, 763 }), 764 }), 765 ); 766 map 767 }, 768 } 769}