A better Rust ATProto crate
at lifetimes 4.8 kB view raw
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: tools.ozone.verification.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 grant_verifications; 9pub mod list_verifications; 10pub mod revoke_verifications; 11 12///Verification data for the associated subject. 13#[jacquard_derive::lexicon] 14#[derive( 15 serde::Serialize, 16 serde::Deserialize, 17 Debug, 18 Clone, 19 PartialEq, 20 Eq, 21 jacquard_derive::IntoStatic 22)] 23#[serde(rename_all = "camelCase")] 24pub struct VerificationView<'a> { 25 ///Timestamp when the verification was created. 26 pub created_at: jacquard_common::types::string::Datetime, 27 ///Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying. 28 #[serde(borrow)] 29 pub display_name: jacquard_common::CowStr<'a>, 30 ///Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying. 31 #[serde(borrow)] 32 pub handle: jacquard_common::types::string::Handle<'a>, 33 ///The user who issued this verification. 34 #[serde(borrow)] 35 pub issuer: jacquard_common::types::string::Did<'a>, 36 #[serde(skip_serializing_if = "std::option::Option::is_none")] 37 #[serde(borrow)] 38 pub issuer_profile: std::option::Option<VerificationViewRecordIssuerProfile<'a>>, 39 #[serde(skip_serializing_if = "std::option::Option::is_none")] 40 #[serde(borrow)] 41 pub issuer_repo: std::option::Option<VerificationViewRecordIssuerRepo<'a>>, 42 ///Describes the reason for revocation, also indicating that the verification is no longer valid. 43 #[serde(skip_serializing_if = "std::option::Option::is_none")] 44 #[serde(borrow)] 45 pub revoke_reason: std::option::Option<jacquard_common::CowStr<'a>>, 46 ///Timestamp when the verification was revoked. 47 #[serde(skip_serializing_if = "std::option::Option::is_none")] 48 pub revoked_at: std::option::Option<jacquard_common::types::string::Datetime>, 49 ///The user who revoked this verification. 50 #[serde(skip_serializing_if = "std::option::Option::is_none")] 51 #[serde(borrow)] 52 pub revoked_by: std::option::Option<jacquard_common::types::string::Did<'a>>, 53 ///The subject of the verification. 54 #[serde(borrow)] 55 pub subject: jacquard_common::types::string::Did<'a>, 56 #[serde(skip_serializing_if = "std::option::Option::is_none")] 57 #[serde(borrow)] 58 pub subject_profile: std::option::Option<VerificationViewRecordSubjectProfile<'a>>, 59 #[serde(skip_serializing_if = "std::option::Option::is_none")] 60 #[serde(borrow)] 61 pub subject_repo: std::option::Option<VerificationViewRecordSubjectRepo<'a>>, 62 ///The AT-URI of the verification record. 63 #[serde(borrow)] 64 pub uri: jacquard_common::types::string::AtUri<'a>, 65} 66 67#[jacquard_derive::open_union] 68#[derive( 69 serde::Serialize, 70 serde::Deserialize, 71 Debug, 72 Clone, 73 PartialEq, 74 Eq, 75 jacquard_derive::IntoStatic 76)] 77#[serde(tag = "$type")] 78#[serde(bound(deserialize = "'de: 'a"))] 79pub enum VerificationViewRecordIssuerProfile<'a> {} 80#[jacquard_derive::open_union] 81#[derive( 82 serde::Serialize, 83 serde::Deserialize, 84 Debug, 85 Clone, 86 PartialEq, 87 Eq, 88 jacquard_derive::IntoStatic 89)] 90#[serde(tag = "$type")] 91#[serde(bound(deserialize = "'de: 'a"))] 92pub enum VerificationViewRecordIssuerRepo<'a> { 93 #[serde(rename = "tools.ozone.moderation.defs#repoViewDetail")] 94 DefsRepoViewDetail(Box<crate::tools_ozone::moderation::RepoViewDetail<'a>>), 95 #[serde(rename = "tools.ozone.moderation.defs#repoViewNotFound")] 96 DefsRepoViewNotFound(Box<crate::tools_ozone::moderation::RepoViewNotFound<'a>>), 97} 98 99#[jacquard_derive::open_union] 100#[derive( 101 serde::Serialize, 102 serde::Deserialize, 103 Debug, 104 Clone, 105 PartialEq, 106 Eq, 107 jacquard_derive::IntoStatic 108)] 109#[serde(tag = "$type")] 110#[serde(bound(deserialize = "'de: 'a"))] 111pub enum VerificationViewRecordSubjectProfile<'a> {} 112#[jacquard_derive::open_union] 113#[derive( 114 serde::Serialize, 115 serde::Deserialize, 116 Debug, 117 Clone, 118 PartialEq, 119 Eq, 120 jacquard_derive::IntoStatic 121)] 122#[serde(tag = "$type")] 123#[serde(bound(deserialize = "'de: 'a"))] 124pub enum VerificationViewRecordSubjectRepo<'a> { 125 #[serde(rename = "tools.ozone.moderation.defs#repoViewDetail")] 126 DefsRepoViewDetail(Box<crate::tools_ozone::moderation::RepoViewDetail<'a>>), 127 #[serde(rename = "tools.ozone.moderation.defs#repoViewNotFound")] 128 DefsRepoViewNotFound(Box<crate::tools_ozone::moderation::RepoViewNotFound<'a>>), 129}