A better Rust ATProto crate
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 bon::Builder 23)] 24#[serde(rename_all = "camelCase")] 25pub struct VerificationView<'a> { 26 /// Timestamp when the verification was created. 27 pub created_at: jacquard_common::types::string::Datetime, 28 /// 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. 29 #[serde(borrow)] 30 #[builder(into)] 31 pub display_name: jacquard_common::CowStr<'a>, 32 /// 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. 33 #[serde(borrow)] 34 pub handle: jacquard_common::types::string::Handle<'a>, 35 /// The user who issued this verification. 36 #[serde(borrow)] 37 pub issuer: jacquard_common::types::string::Did<'a>, 38 #[serde(skip_serializing_if = "std::option::Option::is_none")] 39 #[builder(into)] 40 #[serde(borrow)] 41 pub issuer_profile: Option<jacquard_common::types::value::Data<'a>>, 42 #[serde(skip_serializing_if = "std::option::Option::is_none")] 43 #[builder(into)] 44 #[serde(borrow)] 45 pub issuer_repo: Option<VerificationViewIssuerRepo<'a>>, 46 /// Describes the reason for revocation, also indicating that the verification is no longer valid. 47 #[serde(skip_serializing_if = "std::option::Option::is_none")] 48 #[builder(into)] 49 #[serde(borrow)] 50 pub revoke_reason: Option<jacquard_common::CowStr<'a>>, 51 /// Timestamp when the verification was revoked. 52 #[serde(skip_serializing_if = "std::option::Option::is_none")] 53 #[builder(into)] 54 pub revoked_at: Option<jacquard_common::types::string::Datetime>, 55 /// The user who revoked this verification. 56 #[serde(skip_serializing_if = "std::option::Option::is_none")] 57 #[builder(into)] 58 #[serde(borrow)] 59 pub revoked_by: Option<jacquard_common::types::string::Did<'a>>, 60 /// The subject of the verification. 61 #[serde(borrow)] 62 pub subject: jacquard_common::types::string::Did<'a>, 63 #[serde(skip_serializing_if = "std::option::Option::is_none")] 64 #[builder(into)] 65 #[serde(borrow)] 66 pub subject_profile: Option<jacquard_common::types::value::Data<'a>>, 67 #[serde(skip_serializing_if = "std::option::Option::is_none")] 68 #[builder(into)] 69 #[serde(borrow)] 70 pub subject_repo: Option<VerificationViewSubjectRepo<'a>>, 71 /// The AT-URI of the verification record. 72 #[serde(borrow)] 73 pub uri: jacquard_common::types::string::AtUri<'a>, 74} 75 76#[jacquard_derive::open_union] 77#[derive( 78 serde::Serialize, 79 serde::Deserialize, 80 Debug, 81 Clone, 82 PartialEq, 83 Eq, 84 jacquard_derive::IntoStatic 85)] 86#[serde(tag = "$type")] 87#[serde(bound(deserialize = "'de: 'a"))] 88pub enum VerificationViewIssuerRepo<'a> { 89 #[serde(rename = "tools.ozone.moderation.defs#repoViewDetail")] 90 RepoViewDetail(Box<crate::tools_ozone::moderation::RepoViewDetail<'a>>), 91 #[serde(rename = "tools.ozone.moderation.defs#repoViewNotFound")] 92 RepoViewNotFound(Box<crate::tools_ozone::moderation::RepoViewNotFound<'a>>), 93} 94 95#[jacquard_derive::open_union] 96#[derive( 97 serde::Serialize, 98 serde::Deserialize, 99 Debug, 100 Clone, 101 PartialEq, 102 Eq, 103 jacquard_derive::IntoStatic 104)] 105#[serde(tag = "$type")] 106#[serde(bound(deserialize = "'de: 'a"))] 107pub enum VerificationViewSubjectRepo<'a> { 108 #[serde(rename = "tools.ozone.moderation.defs#repoViewDetail")] 109 RepoViewDetail(Box<crate::tools_ozone::moderation::RepoViewDetail<'a>>), 110 #[serde(rename = "tools.ozone.moderation.defs#repoViewNotFound")] 111 RepoViewNotFound(Box<crate::tools_ozone::moderation::RepoViewNotFound<'a>>), 112}