atproto blogging
at main 1410 lines 53 kB view raw
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: com.atproto.admin.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 delete_account; 9pub mod disable_account_invites; 10pub mod disable_invite_codes; 11pub mod enable_account_invites; 12pub mod get_account_info; 13pub mod get_account_infos; 14pub mod get_invite_codes; 15pub mod get_subject_status; 16pub mod search_accounts; 17pub mod send_email; 18pub mod update_account_email; 19pub mod update_account_handle; 20pub mod update_account_password; 21pub mod update_account_signing_key; 22pub mod update_subject_status; 23 24#[jacquard_derive::lexicon] 25#[derive( 26 serde::Serialize, 27 serde::Deserialize, 28 Debug, 29 Clone, 30 PartialEq, 31 Eq, 32 jacquard_derive::IntoStatic 33)] 34#[serde(rename_all = "camelCase")] 35pub struct AccountView<'a> { 36 #[serde(skip_serializing_if = "std::option::Option::is_none")] 37 pub deactivated_at: std::option::Option<jacquard_common::types::string::Datetime>, 38 #[serde(borrow)] 39 pub did: jacquard_common::types::string::Did<'a>, 40 #[serde(skip_serializing_if = "std::option::Option::is_none")] 41 #[serde(borrow)] 42 pub email: std::option::Option<jacquard_common::CowStr<'a>>, 43 #[serde(skip_serializing_if = "std::option::Option::is_none")] 44 pub email_confirmed_at: std::option::Option< 45 jacquard_common::types::string::Datetime, 46 >, 47 #[serde(borrow)] 48 pub handle: jacquard_common::types::string::Handle<'a>, 49 pub indexed_at: jacquard_common::types::string::Datetime, 50 #[serde(skip_serializing_if = "std::option::Option::is_none")] 51 #[serde(borrow)] 52 pub invite_note: std::option::Option<jacquard_common::CowStr<'a>>, 53 #[serde(skip_serializing_if = "std::option::Option::is_none")] 54 #[serde(borrow)] 55 pub invited_by: std::option::Option<crate::com_atproto::server::InviteCode<'a>>, 56 #[serde(skip_serializing_if = "std::option::Option::is_none")] 57 #[serde(borrow)] 58 pub invites: std::option::Option<Vec<crate::com_atproto::server::InviteCode<'a>>>, 59 #[serde(skip_serializing_if = "std::option::Option::is_none")] 60 pub invites_disabled: std::option::Option<bool>, 61 #[serde(skip_serializing_if = "std::option::Option::is_none")] 62 #[serde(borrow)] 63 pub related_records: std::option::Option< 64 Vec<jacquard_common::types::value::Data<'a>>, 65 >, 66 #[serde(skip_serializing_if = "std::option::Option::is_none")] 67 #[serde(borrow)] 68 pub threat_signatures: std::option::Option< 69 Vec<crate::com_atproto::admin::ThreatSignature<'a>>, 70 >, 71} 72 73pub mod account_view_state { 74 75 pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; 76 #[allow(unused)] 77 use ::core::marker::PhantomData; 78 mod sealed { 79 pub trait Sealed {} 80 } 81 /// State trait tracking which required fields have been set 82 pub trait State: sealed::Sealed { 83 type IndexedAt; 84 type Did; 85 type Handle; 86 } 87 /// Empty state - all required fields are unset 88 pub struct Empty(()); 89 impl sealed::Sealed for Empty {} 90 impl State for Empty { 91 type IndexedAt = Unset; 92 type Did = Unset; 93 type Handle = Unset; 94 } 95 ///State transition - sets the `indexed_at` field to Set 96 pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>); 97 impl<S: State> sealed::Sealed for SetIndexedAt<S> {} 98 impl<S: State> State for SetIndexedAt<S> { 99 type IndexedAt = Set<members::indexed_at>; 100 type Did = S::Did; 101 type Handle = S::Handle; 102 } 103 ///State transition - sets the `did` field to Set 104 pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>); 105 impl<S: State> sealed::Sealed for SetDid<S> {} 106 impl<S: State> State for SetDid<S> { 107 type IndexedAt = S::IndexedAt; 108 type Did = Set<members::did>; 109 type Handle = S::Handle; 110 } 111 ///State transition - sets the `handle` field to Set 112 pub struct SetHandle<S: State = Empty>(PhantomData<fn() -> S>); 113 impl<S: State> sealed::Sealed for SetHandle<S> {} 114 impl<S: State> State for SetHandle<S> { 115 type IndexedAt = S::IndexedAt; 116 type Did = S::Did; 117 type Handle = Set<members::handle>; 118 } 119 /// Marker types for field names 120 #[allow(non_camel_case_types)] 121 pub mod members { 122 ///Marker type for the `indexed_at` field 123 pub struct indexed_at(()); 124 ///Marker type for the `did` field 125 pub struct did(()); 126 ///Marker type for the `handle` field 127 pub struct handle(()); 128 } 129} 130 131/// Builder for constructing an instance of this type 132pub struct AccountViewBuilder<'a, S: account_view_state::State> { 133 _phantom_state: ::core::marker::PhantomData<fn() -> S>, 134 __unsafe_private_named: ( 135 ::core::option::Option<jacquard_common::types::string::Datetime>, 136 ::core::option::Option<jacquard_common::types::string::Did<'a>>, 137 ::core::option::Option<jacquard_common::CowStr<'a>>, 138 ::core::option::Option<jacquard_common::types::string::Datetime>, 139 ::core::option::Option<jacquard_common::types::string::Handle<'a>>, 140 ::core::option::Option<jacquard_common::types::string::Datetime>, 141 ::core::option::Option<jacquard_common::CowStr<'a>>, 142 ::core::option::Option<crate::com_atproto::server::InviteCode<'a>>, 143 ::core::option::Option<Vec<crate::com_atproto::server::InviteCode<'a>>>, 144 ::core::option::Option<bool>, 145 ::core::option::Option<Vec<jacquard_common::types::value::Data<'a>>>, 146 ::core::option::Option<Vec<crate::com_atproto::admin::ThreatSignature<'a>>>, 147 ), 148 _phantom: ::core::marker::PhantomData<&'a ()>, 149} 150 151impl<'a> AccountView<'a> { 152 /// Create a new builder for this type 153 pub fn new() -> AccountViewBuilder<'a, account_view_state::Empty> { 154 AccountViewBuilder::new() 155 } 156} 157 158impl<'a> AccountViewBuilder<'a, account_view_state::Empty> { 159 /// Create a new builder with all fields unset 160 pub fn new() -> Self { 161 AccountViewBuilder { 162 _phantom_state: ::core::marker::PhantomData, 163 __unsafe_private_named: ( 164 None, 165 None, 166 None, 167 None, 168 None, 169 None, 170 None, 171 None, 172 None, 173 None, 174 None, 175 None, 176 ), 177 _phantom: ::core::marker::PhantomData, 178 } 179 } 180} 181 182impl<'a, S: account_view_state::State> AccountViewBuilder<'a, S> { 183 /// Set the `deactivatedAt` field (optional) 184 pub fn deactivated_at( 185 mut self, 186 value: impl Into<Option<jacquard_common::types::string::Datetime>>, 187 ) -> Self { 188 self.__unsafe_private_named.0 = value.into(); 189 self 190 } 191 /// Set the `deactivatedAt` field to an Option value (optional) 192 pub fn maybe_deactivated_at( 193 mut self, 194 value: Option<jacquard_common::types::string::Datetime>, 195 ) -> Self { 196 self.__unsafe_private_named.0 = value; 197 self 198 } 199} 200 201impl<'a, S> AccountViewBuilder<'a, S> 202where 203 S: account_view_state::State, 204 S::Did: account_view_state::IsUnset, 205{ 206 /// Set the `did` field (required) 207 pub fn did( 208 mut self, 209 value: impl Into<jacquard_common::types::string::Did<'a>>, 210 ) -> AccountViewBuilder<'a, account_view_state::SetDid<S>> { 211 self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); 212 AccountViewBuilder { 213 _phantom_state: ::core::marker::PhantomData, 214 __unsafe_private_named: self.__unsafe_private_named, 215 _phantom: ::core::marker::PhantomData, 216 } 217 } 218} 219 220impl<'a, S: account_view_state::State> AccountViewBuilder<'a, S> { 221 /// Set the `email` field (optional) 222 pub fn email( 223 mut self, 224 value: impl Into<Option<jacquard_common::CowStr<'a>>>, 225 ) -> Self { 226 self.__unsafe_private_named.2 = value.into(); 227 self 228 } 229 /// Set the `email` field to an Option value (optional) 230 pub fn maybe_email(mut self, value: Option<jacquard_common::CowStr<'a>>) -> Self { 231 self.__unsafe_private_named.2 = value; 232 self 233 } 234} 235 236impl<'a, S: account_view_state::State> AccountViewBuilder<'a, S> { 237 /// Set the `emailConfirmedAt` field (optional) 238 pub fn email_confirmed_at( 239 mut self, 240 value: impl Into<Option<jacquard_common::types::string::Datetime>>, 241 ) -> Self { 242 self.__unsafe_private_named.3 = value.into(); 243 self 244 } 245 /// Set the `emailConfirmedAt` field to an Option value (optional) 246 pub fn maybe_email_confirmed_at( 247 mut self, 248 value: Option<jacquard_common::types::string::Datetime>, 249 ) -> Self { 250 self.__unsafe_private_named.3 = value; 251 self 252 } 253} 254 255impl<'a, S> AccountViewBuilder<'a, S> 256where 257 S: account_view_state::State, 258 S::Handle: account_view_state::IsUnset, 259{ 260 /// Set the `handle` field (required) 261 pub fn handle( 262 mut self, 263 value: impl Into<jacquard_common::types::string::Handle<'a>>, 264 ) -> AccountViewBuilder<'a, account_view_state::SetHandle<S>> { 265 self.__unsafe_private_named.4 = ::core::option::Option::Some(value.into()); 266 AccountViewBuilder { 267 _phantom_state: ::core::marker::PhantomData, 268 __unsafe_private_named: self.__unsafe_private_named, 269 _phantom: ::core::marker::PhantomData, 270 } 271 } 272} 273 274impl<'a, S> AccountViewBuilder<'a, S> 275where 276 S: account_view_state::State, 277 S::IndexedAt: account_view_state::IsUnset, 278{ 279 /// Set the `indexedAt` field (required) 280 pub fn indexed_at( 281 mut self, 282 value: impl Into<jacquard_common::types::string::Datetime>, 283 ) -> AccountViewBuilder<'a, account_view_state::SetIndexedAt<S>> { 284 self.__unsafe_private_named.5 = ::core::option::Option::Some(value.into()); 285 AccountViewBuilder { 286 _phantom_state: ::core::marker::PhantomData, 287 __unsafe_private_named: self.__unsafe_private_named, 288 _phantom: ::core::marker::PhantomData, 289 } 290 } 291} 292 293impl<'a, S: account_view_state::State> AccountViewBuilder<'a, S> { 294 /// Set the `inviteNote` field (optional) 295 pub fn invite_note( 296 mut self, 297 value: impl Into<Option<jacquard_common::CowStr<'a>>>, 298 ) -> Self { 299 self.__unsafe_private_named.6 = value.into(); 300 self 301 } 302 /// Set the `inviteNote` field to an Option value (optional) 303 pub fn maybe_invite_note( 304 mut self, 305 value: Option<jacquard_common::CowStr<'a>>, 306 ) -> Self { 307 self.__unsafe_private_named.6 = value; 308 self 309 } 310} 311 312impl<'a, S: account_view_state::State> AccountViewBuilder<'a, S> { 313 /// Set the `invitedBy` field (optional) 314 pub fn invited_by( 315 mut self, 316 value: impl Into<Option<crate::com_atproto::server::InviteCode<'a>>>, 317 ) -> Self { 318 self.__unsafe_private_named.7 = value.into(); 319 self 320 } 321 /// Set the `invitedBy` field to an Option value (optional) 322 pub fn maybe_invited_by( 323 mut self, 324 value: Option<crate::com_atproto::server::InviteCode<'a>>, 325 ) -> Self { 326 self.__unsafe_private_named.7 = value; 327 self 328 } 329} 330 331impl<'a, S: account_view_state::State> AccountViewBuilder<'a, S> { 332 /// Set the `invites` field (optional) 333 pub fn invites( 334 mut self, 335 value: impl Into<Option<Vec<crate::com_atproto::server::InviteCode<'a>>>>, 336 ) -> Self { 337 self.__unsafe_private_named.8 = value.into(); 338 self 339 } 340 /// Set the `invites` field to an Option value (optional) 341 pub fn maybe_invites( 342 mut self, 343 value: Option<Vec<crate::com_atproto::server::InviteCode<'a>>>, 344 ) -> Self { 345 self.__unsafe_private_named.8 = value; 346 self 347 } 348} 349 350impl<'a, S: account_view_state::State> AccountViewBuilder<'a, S> { 351 /// Set the `invitesDisabled` field (optional) 352 pub fn invites_disabled(mut self, value: impl Into<Option<bool>>) -> Self { 353 self.__unsafe_private_named.9 = value.into(); 354 self 355 } 356 /// Set the `invitesDisabled` field to an Option value (optional) 357 pub fn maybe_invites_disabled(mut self, value: Option<bool>) -> Self { 358 self.__unsafe_private_named.9 = value; 359 self 360 } 361} 362 363impl<'a, S: account_view_state::State> AccountViewBuilder<'a, S> { 364 /// Set the `relatedRecords` field (optional) 365 pub fn related_records( 366 mut self, 367 value: impl Into<Option<Vec<jacquard_common::types::value::Data<'a>>>>, 368 ) -> Self { 369 self.__unsafe_private_named.10 = value.into(); 370 self 371 } 372 /// Set the `relatedRecords` field to an Option value (optional) 373 pub fn maybe_related_records( 374 mut self, 375 value: Option<Vec<jacquard_common::types::value::Data<'a>>>, 376 ) -> Self { 377 self.__unsafe_private_named.10 = value; 378 self 379 } 380} 381 382impl<'a, S: account_view_state::State> AccountViewBuilder<'a, S> { 383 /// Set the `threatSignatures` field (optional) 384 pub fn threat_signatures( 385 mut self, 386 value: impl Into<Option<Vec<crate::com_atproto::admin::ThreatSignature<'a>>>>, 387 ) -> Self { 388 self.__unsafe_private_named.11 = value.into(); 389 self 390 } 391 /// Set the `threatSignatures` field to an Option value (optional) 392 pub fn maybe_threat_signatures( 393 mut self, 394 value: Option<Vec<crate::com_atproto::admin::ThreatSignature<'a>>>, 395 ) -> Self { 396 self.__unsafe_private_named.11 = value; 397 self 398 } 399} 400 401impl<'a, S> AccountViewBuilder<'a, S> 402where 403 S: account_view_state::State, 404 S::IndexedAt: account_view_state::IsSet, 405 S::Did: account_view_state::IsSet, 406 S::Handle: account_view_state::IsSet, 407{ 408 /// Build the final struct 409 pub fn build(self) -> AccountView<'a> { 410 AccountView { 411 deactivated_at: self.__unsafe_private_named.0, 412 did: self.__unsafe_private_named.1.unwrap(), 413 email: self.__unsafe_private_named.2, 414 email_confirmed_at: self.__unsafe_private_named.3, 415 handle: self.__unsafe_private_named.4.unwrap(), 416 indexed_at: self.__unsafe_private_named.5.unwrap(), 417 invite_note: self.__unsafe_private_named.6, 418 invited_by: self.__unsafe_private_named.7, 419 invites: self.__unsafe_private_named.8, 420 invites_disabled: self.__unsafe_private_named.9, 421 related_records: self.__unsafe_private_named.10, 422 threat_signatures: self.__unsafe_private_named.11, 423 extra_data: Default::default(), 424 } 425 } 426 /// Build the final struct with custom extra_data 427 pub fn build_with_data( 428 self, 429 extra_data: std::collections::BTreeMap< 430 jacquard_common::smol_str::SmolStr, 431 jacquard_common::types::value::Data<'a>, 432 >, 433 ) -> AccountView<'a> { 434 AccountView { 435 deactivated_at: self.__unsafe_private_named.0, 436 did: self.__unsafe_private_named.1.unwrap(), 437 email: self.__unsafe_private_named.2, 438 email_confirmed_at: self.__unsafe_private_named.3, 439 handle: self.__unsafe_private_named.4.unwrap(), 440 indexed_at: self.__unsafe_private_named.5.unwrap(), 441 invite_note: self.__unsafe_private_named.6, 442 invited_by: self.__unsafe_private_named.7, 443 invites: self.__unsafe_private_named.8, 444 invites_disabled: self.__unsafe_private_named.9, 445 related_records: self.__unsafe_private_named.10, 446 threat_signatures: self.__unsafe_private_named.11, 447 extra_data: Some(extra_data), 448 } 449 } 450} 451 452fn lexicon_doc_com_atproto_admin_defs() -> ::jacquard_lexicon::lexicon::LexiconDoc< 453 'static, 454> { 455 ::jacquard_lexicon::lexicon::LexiconDoc { 456 lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1, 457 id: ::jacquard_common::CowStr::new_static("com.atproto.admin.defs"), 458 revision: None, 459 description: None, 460 defs: { 461 let mut map = ::alloc::collections::BTreeMap::new(); 462 map.insert( 463 ::jacquard_common::smol_str::SmolStr::new_static("accountView"), 464 ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { 465 description: None, 466 required: Some( 467 vec![ 468 ::jacquard_common::smol_str::SmolStr::new_static("did"), 469 ::jacquard_common::smol_str::SmolStr::new_static("handle"), 470 ::jacquard_common::smol_str::SmolStr::new_static("indexedAt") 471 ], 472 ), 473 nullable: None, 474 properties: { 475 #[allow(unused_mut)] 476 let mut map = ::alloc::collections::BTreeMap::new(); 477 map.insert( 478 ::jacquard_common::smol_str::SmolStr::new_static( 479 "deactivatedAt", 480 ), 481 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 482 description: None, 483 format: Some( 484 ::jacquard_lexicon::lexicon::LexStringFormat::Datetime, 485 ), 486 default: None, 487 min_length: None, 488 max_length: None, 489 min_graphemes: None, 490 max_graphemes: None, 491 r#enum: None, 492 r#const: None, 493 known_values: None, 494 }), 495 ); 496 map.insert( 497 ::jacquard_common::smol_str::SmolStr::new_static("did"), 498 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 499 description: None, 500 format: Some( 501 ::jacquard_lexicon::lexicon::LexStringFormat::Did, 502 ), 503 default: None, 504 min_length: None, 505 max_length: None, 506 min_graphemes: None, 507 max_graphemes: None, 508 r#enum: None, 509 r#const: None, 510 known_values: None, 511 }), 512 ); 513 map.insert( 514 ::jacquard_common::smol_str::SmolStr::new_static("email"), 515 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 516 description: None, 517 format: None, 518 default: None, 519 min_length: None, 520 max_length: None, 521 min_graphemes: None, 522 max_graphemes: None, 523 r#enum: None, 524 r#const: None, 525 known_values: None, 526 }), 527 ); 528 map.insert( 529 ::jacquard_common::smol_str::SmolStr::new_static( 530 "emailConfirmedAt", 531 ), 532 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 533 description: None, 534 format: Some( 535 ::jacquard_lexicon::lexicon::LexStringFormat::Datetime, 536 ), 537 default: None, 538 min_length: None, 539 max_length: None, 540 min_graphemes: None, 541 max_graphemes: None, 542 r#enum: None, 543 r#const: None, 544 known_values: None, 545 }), 546 ); 547 map.insert( 548 ::jacquard_common::smol_str::SmolStr::new_static("handle"), 549 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 550 description: None, 551 format: Some( 552 ::jacquard_lexicon::lexicon::LexStringFormat::Handle, 553 ), 554 default: None, 555 min_length: None, 556 max_length: None, 557 min_graphemes: None, 558 max_graphemes: None, 559 r#enum: None, 560 r#const: None, 561 known_values: None, 562 }), 563 ); 564 map.insert( 565 ::jacquard_common::smol_str::SmolStr::new_static( 566 "indexedAt", 567 ), 568 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 569 description: None, 570 format: Some( 571 ::jacquard_lexicon::lexicon::LexStringFormat::Datetime, 572 ), 573 default: None, 574 min_length: None, 575 max_length: None, 576 min_graphemes: None, 577 max_graphemes: None, 578 r#enum: None, 579 r#const: None, 580 known_values: None, 581 }), 582 ); 583 map.insert( 584 ::jacquard_common::smol_str::SmolStr::new_static( 585 "inviteNote", 586 ), 587 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 588 description: None, 589 format: None, 590 default: None, 591 min_length: None, 592 max_length: None, 593 min_graphemes: None, 594 max_graphemes: None, 595 r#enum: None, 596 r#const: None, 597 known_values: None, 598 }), 599 ); 600 map.insert( 601 ::jacquard_common::smol_str::SmolStr::new_static( 602 "invitedBy", 603 ), 604 ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { 605 description: None, 606 r#ref: ::jacquard_common::CowStr::new_static( 607 "com.atproto.server.defs#inviteCode", 608 ), 609 }), 610 ); 611 map.insert( 612 ::jacquard_common::smol_str::SmolStr::new_static("invites"), 613 ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { 614 description: None, 615 items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef { 616 description: None, 617 r#ref: ::jacquard_common::CowStr::new_static( 618 "com.atproto.server.defs#inviteCode", 619 ), 620 }), 621 min_length: None, 622 max_length: None, 623 }), 624 ); 625 map.insert( 626 ::jacquard_common::smol_str::SmolStr::new_static( 627 "invitesDisabled", 628 ), 629 ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { 630 description: None, 631 default: None, 632 r#const: None, 633 }), 634 ); 635 map.insert( 636 ::jacquard_common::smol_str::SmolStr::new_static( 637 "relatedRecords", 638 ), 639 ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { 640 description: None, 641 items: ::jacquard_lexicon::lexicon::LexArrayItem::Unknown(::jacquard_lexicon::lexicon::LexUnknown { 642 description: None, 643 }), 644 min_length: None, 645 max_length: None, 646 }), 647 ); 648 map.insert( 649 ::jacquard_common::smol_str::SmolStr::new_static( 650 "threatSignatures", 651 ), 652 ::jacquard_lexicon::lexicon::LexObjectProperty::Array(::jacquard_lexicon::lexicon::LexArray { 653 description: None, 654 items: ::jacquard_lexicon::lexicon::LexArrayItem::Ref(::jacquard_lexicon::lexicon::LexRef { 655 description: None, 656 r#ref: ::jacquard_common::CowStr::new_static( 657 "#threatSignature", 658 ), 659 }), 660 min_length: None, 661 max_length: None, 662 }), 663 ); 664 map 665 }, 666 }), 667 ); 668 map.insert( 669 ::jacquard_common::smol_str::SmolStr::new_static("repoBlobRef"), 670 ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { 671 description: None, 672 required: Some( 673 vec![ 674 ::jacquard_common::smol_str::SmolStr::new_static("did"), 675 ::jacquard_common::smol_str::SmolStr::new_static("cid") 676 ], 677 ), 678 nullable: None, 679 properties: { 680 #[allow(unused_mut)] 681 let mut map = ::alloc::collections::BTreeMap::new(); 682 map.insert( 683 ::jacquard_common::smol_str::SmolStr::new_static("cid"), 684 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 685 description: None, 686 format: Some( 687 ::jacquard_lexicon::lexicon::LexStringFormat::Cid, 688 ), 689 default: None, 690 min_length: None, 691 max_length: None, 692 min_graphemes: None, 693 max_graphemes: None, 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("did"), 701 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 702 description: None, 703 format: Some( 704 ::jacquard_lexicon::lexicon::LexStringFormat::Did, 705 ), 706 default: None, 707 min_length: None, 708 max_length: None, 709 min_graphemes: None, 710 max_graphemes: None, 711 r#enum: None, 712 r#const: None, 713 known_values: None, 714 }), 715 ); 716 map.insert( 717 ::jacquard_common::smol_str::SmolStr::new_static( 718 "recordUri", 719 ), 720 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 721 description: None, 722 format: Some( 723 ::jacquard_lexicon::lexicon::LexStringFormat::AtUri, 724 ), 725 default: None, 726 min_length: None, 727 max_length: None, 728 min_graphemes: None, 729 max_graphemes: None, 730 r#enum: None, 731 r#const: None, 732 known_values: None, 733 }), 734 ); 735 map 736 }, 737 }), 738 ); 739 map.insert( 740 ::jacquard_common::smol_str::SmolStr::new_static("repoRef"), 741 ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { 742 description: None, 743 required: Some( 744 vec![::jacquard_common::smol_str::SmolStr::new_static("did")], 745 ), 746 nullable: None, 747 properties: { 748 #[allow(unused_mut)] 749 let mut map = ::alloc::collections::BTreeMap::new(); 750 map.insert( 751 ::jacquard_common::smol_str::SmolStr::new_static("did"), 752 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 753 description: None, 754 format: Some( 755 ::jacquard_lexicon::lexicon::LexStringFormat::Did, 756 ), 757 default: None, 758 min_length: None, 759 max_length: None, 760 min_graphemes: None, 761 max_graphemes: None, 762 r#enum: None, 763 r#const: None, 764 known_values: None, 765 }), 766 ); 767 map 768 }, 769 }), 770 ); 771 map.insert( 772 ::jacquard_common::smol_str::SmolStr::new_static("statusAttr"), 773 ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { 774 description: None, 775 required: Some( 776 vec![::jacquard_common::smol_str::SmolStr::new_static("applied")], 777 ), 778 nullable: None, 779 properties: { 780 #[allow(unused_mut)] 781 let mut map = ::alloc::collections::BTreeMap::new(); 782 map.insert( 783 ::jacquard_common::smol_str::SmolStr::new_static("applied"), 784 ::jacquard_lexicon::lexicon::LexObjectProperty::Boolean(::jacquard_lexicon::lexicon::LexBoolean { 785 description: None, 786 default: None, 787 r#const: None, 788 }), 789 ); 790 map.insert( 791 ::jacquard_common::smol_str::SmolStr::new_static("ref"), 792 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 793 description: None, 794 format: None, 795 default: None, 796 min_length: None, 797 max_length: None, 798 min_graphemes: None, 799 max_graphemes: None, 800 r#enum: None, 801 r#const: None, 802 known_values: None, 803 }), 804 ); 805 map 806 }, 807 }), 808 ); 809 map.insert( 810 ::jacquard_common::smol_str::SmolStr::new_static("threatSignature"), 811 ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { 812 description: None, 813 required: Some( 814 vec![ 815 ::jacquard_common::smol_str::SmolStr::new_static("property"), 816 ::jacquard_common::smol_str::SmolStr::new_static("value") 817 ], 818 ), 819 nullable: None, 820 properties: { 821 #[allow(unused_mut)] 822 let mut map = ::alloc::collections::BTreeMap::new(); 823 map.insert( 824 ::jacquard_common::smol_str::SmolStr::new_static("property"), 825 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 826 description: None, 827 format: None, 828 default: None, 829 min_length: None, 830 max_length: None, 831 min_graphemes: None, 832 max_graphemes: None, 833 r#enum: None, 834 r#const: None, 835 known_values: None, 836 }), 837 ); 838 map.insert( 839 ::jacquard_common::smol_str::SmolStr::new_static("value"), 840 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { 841 description: None, 842 format: None, 843 default: None, 844 min_length: None, 845 max_length: None, 846 min_graphemes: None, 847 max_graphemes: None, 848 r#enum: None, 849 r#const: None, 850 known_values: None, 851 }), 852 ); 853 map 854 }, 855 }), 856 ); 857 map 858 }, 859 } 860} 861 862impl<'a> ::jacquard_lexicon::schema::LexiconSchema for AccountView<'a> { 863 fn nsid() -> &'static str { 864 "com.atproto.admin.defs" 865 } 866 fn def_name() -> &'static str { 867 "accountView" 868 } 869 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 870 lexicon_doc_com_atproto_admin_defs() 871 } 872 fn validate( 873 &self, 874 ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 875 Ok(()) 876 } 877} 878 879#[jacquard_derive::lexicon] 880#[derive( 881 serde::Serialize, 882 serde::Deserialize, 883 Debug, 884 Clone, 885 PartialEq, 886 Eq, 887 jacquard_derive::IntoStatic 888)] 889#[serde(rename_all = "camelCase")] 890pub struct RepoBlobRef<'a> { 891 #[serde(borrow)] 892 pub cid: jacquard_common::types::string::Cid<'a>, 893 #[serde(borrow)] 894 pub did: jacquard_common::types::string::Did<'a>, 895 #[serde(skip_serializing_if = "std::option::Option::is_none")] 896 #[serde(borrow)] 897 pub record_uri: std::option::Option<jacquard_common::types::string::AtUri<'a>>, 898} 899 900pub mod repo_blob_ref_state { 901 902 pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; 903 #[allow(unused)] 904 use ::core::marker::PhantomData; 905 mod sealed { 906 pub trait Sealed {} 907 } 908 /// State trait tracking which required fields have been set 909 pub trait State: sealed::Sealed { 910 type Did; 911 type Cid; 912 } 913 /// Empty state - all required fields are unset 914 pub struct Empty(()); 915 impl sealed::Sealed for Empty {} 916 impl State for Empty { 917 type Did = Unset; 918 type Cid = Unset; 919 } 920 ///State transition - sets the `did` field to Set 921 pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>); 922 impl<S: State> sealed::Sealed for SetDid<S> {} 923 impl<S: State> State for SetDid<S> { 924 type Did = Set<members::did>; 925 type Cid = S::Cid; 926 } 927 ///State transition - sets the `cid` field to Set 928 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>); 929 impl<S: State> sealed::Sealed for SetCid<S> {} 930 impl<S: State> State for SetCid<S> { 931 type Did = S::Did; 932 type Cid = Set<members::cid>; 933 } 934 /// Marker types for field names 935 #[allow(non_camel_case_types)] 936 pub mod members { 937 ///Marker type for the `did` field 938 pub struct did(()); 939 ///Marker type for the `cid` field 940 pub struct cid(()); 941 } 942} 943 944/// Builder for constructing an instance of this type 945pub struct RepoBlobRefBuilder<'a, S: repo_blob_ref_state::State> { 946 _phantom_state: ::core::marker::PhantomData<fn() -> S>, 947 __unsafe_private_named: ( 948 ::core::option::Option<jacquard_common::types::string::Cid<'a>>, 949 ::core::option::Option<jacquard_common::types::string::Did<'a>>, 950 ::core::option::Option<jacquard_common::types::string::AtUri<'a>>, 951 ), 952 _phantom: ::core::marker::PhantomData<&'a ()>, 953} 954 955impl<'a> RepoBlobRef<'a> { 956 /// Create a new builder for this type 957 pub fn new() -> RepoBlobRefBuilder<'a, repo_blob_ref_state::Empty> { 958 RepoBlobRefBuilder::new() 959 } 960} 961 962impl<'a> RepoBlobRefBuilder<'a, repo_blob_ref_state::Empty> { 963 /// Create a new builder with all fields unset 964 pub fn new() -> Self { 965 RepoBlobRefBuilder { 966 _phantom_state: ::core::marker::PhantomData, 967 __unsafe_private_named: (None, None, None), 968 _phantom: ::core::marker::PhantomData, 969 } 970 } 971} 972 973impl<'a, S> RepoBlobRefBuilder<'a, S> 974where 975 S: repo_blob_ref_state::State, 976 S::Cid: repo_blob_ref_state::IsUnset, 977{ 978 /// Set the `cid` field (required) 979 pub fn cid( 980 mut self, 981 value: impl Into<jacquard_common::types::string::Cid<'a>>, 982 ) -> RepoBlobRefBuilder<'a, repo_blob_ref_state::SetCid<S>> { 983 self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); 984 RepoBlobRefBuilder { 985 _phantom_state: ::core::marker::PhantomData, 986 __unsafe_private_named: self.__unsafe_private_named, 987 _phantom: ::core::marker::PhantomData, 988 } 989 } 990} 991 992impl<'a, S> RepoBlobRefBuilder<'a, S> 993where 994 S: repo_blob_ref_state::State, 995 S::Did: repo_blob_ref_state::IsUnset, 996{ 997 /// Set the `did` field (required) 998 pub fn did( 999 mut self, 1000 value: impl Into<jacquard_common::types::string::Did<'a>>, 1001 ) -> RepoBlobRefBuilder<'a, repo_blob_ref_state::SetDid<S>> { 1002 self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); 1003 RepoBlobRefBuilder { 1004 _phantom_state: ::core::marker::PhantomData, 1005 __unsafe_private_named: self.__unsafe_private_named, 1006 _phantom: ::core::marker::PhantomData, 1007 } 1008 } 1009} 1010 1011impl<'a, S: repo_blob_ref_state::State> RepoBlobRefBuilder<'a, S> { 1012 /// Set the `recordUri` field (optional) 1013 pub fn record_uri( 1014 mut self, 1015 value: impl Into<Option<jacquard_common::types::string::AtUri<'a>>>, 1016 ) -> Self { 1017 self.__unsafe_private_named.2 = value.into(); 1018 self 1019 } 1020 /// Set the `recordUri` field to an Option value (optional) 1021 pub fn maybe_record_uri( 1022 mut self, 1023 value: Option<jacquard_common::types::string::AtUri<'a>>, 1024 ) -> Self { 1025 self.__unsafe_private_named.2 = value; 1026 self 1027 } 1028} 1029 1030impl<'a, S> RepoBlobRefBuilder<'a, S> 1031where 1032 S: repo_blob_ref_state::State, 1033 S::Did: repo_blob_ref_state::IsSet, 1034 S::Cid: repo_blob_ref_state::IsSet, 1035{ 1036 /// Build the final struct 1037 pub fn build(self) -> RepoBlobRef<'a> { 1038 RepoBlobRef { 1039 cid: self.__unsafe_private_named.0.unwrap(), 1040 did: self.__unsafe_private_named.1.unwrap(), 1041 record_uri: self.__unsafe_private_named.2, 1042 extra_data: Default::default(), 1043 } 1044 } 1045 /// Build the final struct with custom extra_data 1046 pub fn build_with_data( 1047 self, 1048 extra_data: std::collections::BTreeMap< 1049 jacquard_common::smol_str::SmolStr, 1050 jacquard_common::types::value::Data<'a>, 1051 >, 1052 ) -> RepoBlobRef<'a> { 1053 RepoBlobRef { 1054 cid: self.__unsafe_private_named.0.unwrap(), 1055 did: self.__unsafe_private_named.1.unwrap(), 1056 record_uri: self.__unsafe_private_named.2, 1057 extra_data: Some(extra_data), 1058 } 1059 } 1060} 1061 1062impl<'a> ::jacquard_lexicon::schema::LexiconSchema for RepoBlobRef<'a> { 1063 fn nsid() -> &'static str { 1064 "com.atproto.admin.defs" 1065 } 1066 fn def_name() -> &'static str { 1067 "repoBlobRef" 1068 } 1069 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 1070 lexicon_doc_com_atproto_admin_defs() 1071 } 1072 fn validate( 1073 &self, 1074 ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 1075 Ok(()) 1076 } 1077} 1078 1079#[jacquard_derive::lexicon] 1080#[derive( 1081 serde::Serialize, 1082 serde::Deserialize, 1083 Debug, 1084 Clone, 1085 PartialEq, 1086 Eq, 1087 jacquard_derive::IntoStatic 1088)] 1089#[serde(rename_all = "camelCase")] 1090pub struct RepoRef<'a> { 1091 #[serde(borrow)] 1092 pub did: jacquard_common::types::string::Did<'a>, 1093} 1094 1095pub mod repo_ref_state { 1096 1097 pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; 1098 #[allow(unused)] 1099 use ::core::marker::PhantomData; 1100 mod sealed { 1101 pub trait Sealed {} 1102 } 1103 /// State trait tracking which required fields have been set 1104 pub trait State: sealed::Sealed { 1105 type Did; 1106 } 1107 /// Empty state - all required fields are unset 1108 pub struct Empty(()); 1109 impl sealed::Sealed for Empty {} 1110 impl State for Empty { 1111 type Did = Unset; 1112 } 1113 ///State transition - sets the `did` field to Set 1114 pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>); 1115 impl<S: State> sealed::Sealed for SetDid<S> {} 1116 impl<S: State> State for SetDid<S> { 1117 type Did = Set<members::did>; 1118 } 1119 /// Marker types for field names 1120 #[allow(non_camel_case_types)] 1121 pub mod members { 1122 ///Marker type for the `did` field 1123 pub struct did(()); 1124 } 1125} 1126 1127/// Builder for constructing an instance of this type 1128pub struct RepoRefBuilder<'a, S: repo_ref_state::State> { 1129 _phantom_state: ::core::marker::PhantomData<fn() -> S>, 1130 __unsafe_private_named: ( 1131 ::core::option::Option<jacquard_common::types::string::Did<'a>>, 1132 ), 1133 _phantom: ::core::marker::PhantomData<&'a ()>, 1134} 1135 1136impl<'a> RepoRef<'a> { 1137 /// Create a new builder for this type 1138 pub fn new() -> RepoRefBuilder<'a, repo_ref_state::Empty> { 1139 RepoRefBuilder::new() 1140 } 1141} 1142 1143impl<'a> RepoRefBuilder<'a, repo_ref_state::Empty> { 1144 /// Create a new builder with all fields unset 1145 pub fn new() -> Self { 1146 RepoRefBuilder { 1147 _phantom_state: ::core::marker::PhantomData, 1148 __unsafe_private_named: (None,), 1149 _phantom: ::core::marker::PhantomData, 1150 } 1151 } 1152} 1153 1154impl<'a, S> RepoRefBuilder<'a, S> 1155where 1156 S: repo_ref_state::State, 1157 S::Did: repo_ref_state::IsUnset, 1158{ 1159 /// Set the `did` field (required) 1160 pub fn did( 1161 mut self, 1162 value: impl Into<jacquard_common::types::string::Did<'a>>, 1163 ) -> RepoRefBuilder<'a, repo_ref_state::SetDid<S>> { 1164 self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); 1165 RepoRefBuilder { 1166 _phantom_state: ::core::marker::PhantomData, 1167 __unsafe_private_named: self.__unsafe_private_named, 1168 _phantom: ::core::marker::PhantomData, 1169 } 1170 } 1171} 1172 1173impl<'a, S> RepoRefBuilder<'a, S> 1174where 1175 S: repo_ref_state::State, 1176 S::Did: repo_ref_state::IsSet, 1177{ 1178 /// Build the final struct 1179 pub fn build(self) -> RepoRef<'a> { 1180 RepoRef { 1181 did: self.__unsafe_private_named.0.unwrap(), 1182 extra_data: Default::default(), 1183 } 1184 } 1185 /// Build the final struct with custom extra_data 1186 pub fn build_with_data( 1187 self, 1188 extra_data: std::collections::BTreeMap< 1189 jacquard_common::smol_str::SmolStr, 1190 jacquard_common::types::value::Data<'a>, 1191 >, 1192 ) -> RepoRef<'a> { 1193 RepoRef { 1194 did: self.__unsafe_private_named.0.unwrap(), 1195 extra_data: Some(extra_data), 1196 } 1197 } 1198} 1199 1200impl<'a> ::jacquard_lexicon::schema::LexiconSchema for RepoRef<'a> { 1201 fn nsid() -> &'static str { 1202 "com.atproto.admin.defs" 1203 } 1204 fn def_name() -> &'static str { 1205 "repoRef" 1206 } 1207 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 1208 lexicon_doc_com_atproto_admin_defs() 1209 } 1210 fn validate( 1211 &self, 1212 ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 1213 Ok(()) 1214 } 1215} 1216 1217#[jacquard_derive::lexicon] 1218#[derive( 1219 serde::Serialize, 1220 serde::Deserialize, 1221 Debug, 1222 Clone, 1223 PartialEq, 1224 Eq, 1225 jacquard_derive::IntoStatic 1226)] 1227#[serde(rename_all = "camelCase")] 1228pub struct StatusAttr<'a> { 1229 pub applied: bool, 1230 #[serde(skip_serializing_if = "std::option::Option::is_none")] 1231 #[serde(borrow)] 1232 pub r#ref: std::option::Option<jacquard_common::CowStr<'a>>, 1233} 1234 1235pub mod status_attr_state { 1236 1237 pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; 1238 #[allow(unused)] 1239 use ::core::marker::PhantomData; 1240 mod sealed { 1241 pub trait Sealed {} 1242 } 1243 /// State trait tracking which required fields have been set 1244 pub trait State: sealed::Sealed { 1245 type Applied; 1246 } 1247 /// Empty state - all required fields are unset 1248 pub struct Empty(()); 1249 impl sealed::Sealed for Empty {} 1250 impl State for Empty { 1251 type Applied = Unset; 1252 } 1253 ///State transition - sets the `applied` field to Set 1254 pub struct SetApplied<S: State = Empty>(PhantomData<fn() -> S>); 1255 impl<S: State> sealed::Sealed for SetApplied<S> {} 1256 impl<S: State> State for SetApplied<S> { 1257 type Applied = Set<members::applied>; 1258 } 1259 /// Marker types for field names 1260 #[allow(non_camel_case_types)] 1261 pub mod members { 1262 ///Marker type for the `applied` field 1263 pub struct applied(()); 1264 } 1265} 1266 1267/// Builder for constructing an instance of this type 1268pub struct StatusAttrBuilder<'a, S: status_attr_state::State> { 1269 _phantom_state: ::core::marker::PhantomData<fn() -> S>, 1270 __unsafe_private_named: ( 1271 ::core::option::Option<bool>, 1272 ::core::option::Option<jacquard_common::CowStr<'a>>, 1273 ), 1274 _phantom: ::core::marker::PhantomData<&'a ()>, 1275} 1276 1277impl<'a> StatusAttr<'a> { 1278 /// Create a new builder for this type 1279 pub fn new() -> StatusAttrBuilder<'a, status_attr_state::Empty> { 1280 StatusAttrBuilder::new() 1281 } 1282} 1283 1284impl<'a> StatusAttrBuilder<'a, status_attr_state::Empty> { 1285 /// Create a new builder with all fields unset 1286 pub fn new() -> Self { 1287 StatusAttrBuilder { 1288 _phantom_state: ::core::marker::PhantomData, 1289 __unsafe_private_named: (None, None), 1290 _phantom: ::core::marker::PhantomData, 1291 } 1292 } 1293} 1294 1295impl<'a, S> StatusAttrBuilder<'a, S> 1296where 1297 S: status_attr_state::State, 1298 S::Applied: status_attr_state::IsUnset, 1299{ 1300 /// Set the `applied` field (required) 1301 pub fn applied( 1302 mut self, 1303 value: impl Into<bool>, 1304 ) -> StatusAttrBuilder<'a, status_attr_state::SetApplied<S>> { 1305 self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); 1306 StatusAttrBuilder { 1307 _phantom_state: ::core::marker::PhantomData, 1308 __unsafe_private_named: self.__unsafe_private_named, 1309 _phantom: ::core::marker::PhantomData, 1310 } 1311 } 1312} 1313 1314impl<'a, S: status_attr_state::State> StatusAttrBuilder<'a, S> { 1315 /// Set the `ref` field (optional) 1316 pub fn r#ref( 1317 mut self, 1318 value: impl Into<Option<jacquard_common::CowStr<'a>>>, 1319 ) -> Self { 1320 self.__unsafe_private_named.1 = value.into(); 1321 self 1322 } 1323 /// Set the `ref` field to an Option value (optional) 1324 pub fn maybe_ref(mut self, value: Option<jacquard_common::CowStr<'a>>) -> Self { 1325 self.__unsafe_private_named.1 = value; 1326 self 1327 } 1328} 1329 1330impl<'a, S> StatusAttrBuilder<'a, S> 1331where 1332 S: status_attr_state::State, 1333 S::Applied: status_attr_state::IsSet, 1334{ 1335 /// Build the final struct 1336 pub fn build(self) -> StatusAttr<'a> { 1337 StatusAttr { 1338 applied: self.__unsafe_private_named.0.unwrap(), 1339 r#ref: self.__unsafe_private_named.1, 1340 extra_data: Default::default(), 1341 } 1342 } 1343 /// Build the final struct with custom extra_data 1344 pub fn build_with_data( 1345 self, 1346 extra_data: std::collections::BTreeMap< 1347 jacquard_common::smol_str::SmolStr, 1348 jacquard_common::types::value::Data<'a>, 1349 >, 1350 ) -> StatusAttr<'a> { 1351 StatusAttr { 1352 applied: self.__unsafe_private_named.0.unwrap(), 1353 r#ref: self.__unsafe_private_named.1, 1354 extra_data: Some(extra_data), 1355 } 1356 } 1357} 1358 1359impl<'a> ::jacquard_lexicon::schema::LexiconSchema for StatusAttr<'a> { 1360 fn nsid() -> &'static str { 1361 "com.atproto.admin.defs" 1362 } 1363 fn def_name() -> &'static str { 1364 "statusAttr" 1365 } 1366 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 1367 lexicon_doc_com_atproto_admin_defs() 1368 } 1369 fn validate( 1370 &self, 1371 ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 1372 Ok(()) 1373 } 1374} 1375 1376#[jacquard_derive::lexicon] 1377#[derive( 1378 serde::Serialize, 1379 serde::Deserialize, 1380 Debug, 1381 Clone, 1382 PartialEq, 1383 Eq, 1384 jacquard_derive::IntoStatic, 1385 Default 1386)] 1387#[serde(rename_all = "camelCase")] 1388pub struct ThreatSignature<'a> { 1389 #[serde(borrow)] 1390 pub property: jacquard_common::CowStr<'a>, 1391 #[serde(borrow)] 1392 pub value: jacquard_common::CowStr<'a>, 1393} 1394 1395impl<'a> ::jacquard_lexicon::schema::LexiconSchema for ThreatSignature<'a> { 1396 fn nsid() -> &'static str { 1397 "com.atproto.admin.defs" 1398 } 1399 fn def_name() -> &'static str { 1400 "threatSignature" 1401 } 1402 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { 1403 lexicon_doc_com_atproto_admin_defs() 1404 } 1405 fn validate( 1406 &self, 1407 ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { 1408 Ok(()) 1409 } 1410}