// @generated by jacquard-lexicon. DO NOT EDIT. // // Lexicon: tools.ozone.verification.grantVerifications // // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. ///Error object for failed verifications. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GrantError<'a> { ///Error message describing the reason for failure. #[serde(borrow)] pub error: jacquard_common::CowStr<'a>, ///The did of the subject being verified #[serde(borrow)] pub subject: jacquard_common::types::string::Did<'a>, } impl jacquard_common::IntoStatic for GrantError<'_> { type Output = GrantError<'static>; fn into_static(self) -> Self::Output { GrantError { error: self.error.into_static(), subject: self.subject.into_static(), extra_data: self.extra_data.into_static(), } } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, bon::Builder )] #[serde(rename_all = "camelCase")] #[builder(start_fn = new)] pub struct GrantVerifications<'a> { ///Array of verification requests to process #[serde(borrow)] pub verifications: Vec>, #[serde(flatten)] #[serde(borrow)] #[builder(default)] pub extra_data: ::std::collections::BTreeMap< ::jacquard_common::smol_str::SmolStr, ::jacquard_common::types::value::Data<'a>, >, } impl jacquard_common::IntoStatic for GrantVerifications<'_> { type Output = GrantVerifications<'static>; fn into_static(self) -> Self::Output { GrantVerifications { verifications: self.verifications.into_static(), extra_data: self.extra_data.into_static(), } } } #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct GrantVerificationsOutput<'a> { #[serde(borrow)] pub failed_verifications: Vec>, #[serde(borrow)] pub verifications: Vec>, } impl jacquard_common::IntoStatic for GrantVerificationsOutput<'_> { type Output = GrantVerificationsOutput<'static>; fn into_static(self) -> Self::Output { GrantVerificationsOutput { failed_verifications: self.failed_verifications.into_static(), verifications: self.verifications.into_static(), extra_data: self.extra_data.into_static(), } } } impl jacquard_common::types::xrpc::XrpcRequest for GrantVerifications<'_> { const NSID: &'static str = "tools.ozone.verification.grantVerifications"; const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure( "application/json", ); const OUTPUT_ENCODING: &'static str = "application/json"; type Output<'de> = GrantVerificationsOutput<'de>; type Err<'de> = jacquard_common::types::xrpc::GenericError<'de>; } #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct VerificationInput<'a> { ///Timestamp for verification record. Defaults to current time when not specified. #[serde(skip_serializing_if = "std::option::Option::is_none")] pub created_at: std::option::Option, ///Display name of the subject the verification applies to at the moment of verifying. #[serde(borrow)] pub display_name: jacquard_common::CowStr<'a>, ///Handle of the subject the verification applies to at the moment of verifying. #[serde(borrow)] pub handle: jacquard_common::types::string::Handle<'a>, ///The did of the subject being verified #[serde(borrow)] pub subject: jacquard_common::types::string::Did<'a>, } impl jacquard_common::IntoStatic for VerificationInput<'_> { type Output = VerificationInput<'static>; fn into_static(self) -> Self::Output { VerificationInput { created_at: self.created_at.into_static(), display_name: self.display_name.into_static(), handle: self.handle.into_static(), subject: self.subject.into_static(), extra_data: self.extra_data.into_static(), } } }