// @generated by jacquard-lexicon. DO NOT EDIT. // // Lexicon: com.atproto.server.createInviteCodes // // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct AccountCodes<'a> { #[serde(borrow)] pub account: jacquard_common::CowStr<'a>, #[serde(borrow)] pub codes: Vec>, } impl jacquard_common::IntoStatic for AccountCodes<'_> { type Output = AccountCodes<'static>; fn into_static(self) -> Self::Output { AccountCodes { account: self.account.into_static(), codes: self.codes.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 CreateInviteCodes<'a> { pub code_count: i64, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub for_accounts: std::option::Option>>, pub use_count: i64, #[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 CreateInviteCodes<'_> { type Output = CreateInviteCodes<'static>; fn into_static(self) -> Self::Output { CreateInviteCodes { code_count: self.code_count.into_static(), for_accounts: self.for_accounts.into_static(), use_count: self.use_count.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 CreateInviteCodesOutput<'a> { #[serde(borrow)] pub codes: Vec>, } impl jacquard_common::IntoStatic for CreateInviteCodesOutput<'_> { type Output = CreateInviteCodesOutput<'static>; fn into_static(self) -> Self::Output { CreateInviteCodesOutput { codes: self.codes.into_static(), extra_data: self.extra_data.into_static(), } } } impl jacquard_common::types::xrpc::XrpcRequest for CreateInviteCodes<'_> { const NSID: &'static str = "com.atproto.server.createInviteCodes"; 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> = CreateInviteCodesOutput<'de>; type Err<'de> = jacquard_common::types::xrpc::GenericError<'de>; }