A better Rust ATProto crate
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: tools.ozone.verification.revokeVerifications 4// 5// This file was automatically generated from Lexicon schemas. 6// Any manual changes will be overwritten on the next regeneration. 7 8#[jacquard_derive::lexicon] 9#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] 10#[serde(rename_all = "camelCase")] 11pub struct RevokeVerifications<'a> { 12 ///Reason for revoking the verification. This is optional and can be omitted if not needed. 13 #[serde(skip_serializing_if = "std::option::Option::is_none")] 14 #[serde(borrow)] 15 pub revoke_reason: std::option::Option<jacquard_common::CowStr<'a>>, 16 ///Array of verification record uris to revoke 17 #[serde(borrow)] 18 pub uris: Vec<jacquard_common::types::string::AtUri<'a>>, 19} 20 21impl jacquard_common::IntoStatic for RevokeVerifications<'_> { 22 type Output = RevokeVerifications<'static>; 23 fn into_static(self) -> Self::Output { 24 RevokeVerifications { 25 revoke_reason: self.revoke_reason.into_static(), 26 uris: self.uris.into_static(), 27 extra_data: self.extra_data.into_static(), 28 } 29 } 30} 31 32#[jacquard_derive::lexicon] 33#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] 34#[serde(rename_all = "camelCase")] 35pub struct RevokeVerificationsOutput<'a> { 36 ///List of verification uris that couldn't be revoked, including failure reasons 37 #[serde(borrow)] 38 pub failed_revocations: Vec<jacquard_common::types::value::Data<'a>>, 39 ///List of verification uris successfully revoked 40 #[serde(borrow)] 41 pub revoked_verifications: Vec<jacquard_common::types::string::AtUri<'a>>, 42} 43 44impl jacquard_common::IntoStatic for RevokeVerificationsOutput<'_> { 45 type Output = RevokeVerificationsOutput<'static>; 46 fn into_static(self) -> Self::Output { 47 RevokeVerificationsOutput { 48 failed_revocations: self.failed_revocations.into_static(), 49 revoked_verifications: self.revoked_verifications.into_static(), 50 extra_data: self.extra_data.into_static(), 51 } 52 } 53} 54 55impl jacquard_common::types::xrpc::XrpcRequest for RevokeVerifications<'_> { 56 const NSID: &'static str = "tools.ozone.verification.revokeVerifications"; 57 const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( 58 "application/json", 59 ); 60 const OUTPUT_ENCODING: &'static str = "application/json"; 61 type Output<'de> = RevokeVerificationsOutput<'de>; 62 type Err<'de> = jacquard_common::types::xrpc::GenericError<'de>; 63} 64 65///Error object for failed revocations 66#[jacquard_derive::lexicon] 67#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] 68#[serde(rename_all = "camelCase")] 69pub struct RevokeError<'a> { 70 ///Description of the error that occurred during revocation. 71 #[serde(borrow)] 72 pub error: jacquard_common::CowStr<'a>, 73 ///The AT-URI of the verification record that failed to revoke. 74 #[serde(borrow)] 75 pub uri: jacquard_common::types::string::AtUri<'a>, 76} 77 78impl jacquard_common::IntoStatic for RevokeError<'_> { 79 type Output = RevokeError<'static>; 80 fn into_static(self) -> Self::Output { 81 RevokeError { 82 error: self.error.into_static(), 83 uri: self.uri.into_static(), 84 extra_data: self.extra_data.into_static(), 85 } 86 } 87}