1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: com.atproto.server.reserveSigningKey
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(
10 serde::Serialize,
11 serde::Deserialize,
12 Debug,
13 Clone,
14 PartialEq,
15 Eq,
16 bon::Builder
17)]
18#[serde(rename_all = "camelCase")]
19#[builder(start_fn = new)]
20pub struct ReserveSigningKey<'a> {
21 ///The DID to reserve a key for.
22 #[serde(skip_serializing_if = "std::option::Option::is_none")]
23 #[serde(borrow)]
24 pub did: std::option::Option<jacquard_common::types::string::Did<'a>>,
25 #[serde(flatten)]
26 #[serde(borrow)]
27 #[builder(default)]
28 pub extra_data: ::std::collections::BTreeMap<
29 ::jacquard_common::smol_str::SmolStr,
30 ::jacquard_common::types::value::Data<'a>,
31 >,
32}
33
34impl jacquard_common::IntoStatic for ReserveSigningKey<'_> {
35 type Output = ReserveSigningKey<'static>;
36 fn into_static(self) -> Self::Output {
37 ReserveSigningKey {
38 did: self.did.into_static(),
39 extra_data: self.extra_data.into_static(),
40 }
41 }
42}
43
44#[jacquard_derive::lexicon]
45#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
46#[serde(rename_all = "camelCase")]
47pub struct ReserveSigningKeyOutput<'a> {
48 ///The public key for the reserved signing key, in did:key serialization.
49 #[serde(borrow)]
50 pub signing_key: jacquard_common::CowStr<'a>,
51}
52
53impl jacquard_common::IntoStatic for ReserveSigningKeyOutput<'_> {
54 type Output = ReserveSigningKeyOutput<'static>;
55 fn into_static(self) -> Self::Output {
56 ReserveSigningKeyOutput {
57 signing_key: self.signing_key.into_static(),
58 extra_data: self.extra_data.into_static(),
59 }
60 }
61}
62
63impl jacquard_common::types::xrpc::XrpcRequest for ReserveSigningKey<'_> {
64 const NSID: &'static str = "com.atproto.server.reserveSigningKey";
65 const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure(
66 "application/json",
67 );
68 const OUTPUT_ENCODING: &'static str = "application/json";
69 type Output<'de> = ReserveSigningKeyOutput<'de>;
70 type Err<'de> = jacquard_common::types::xrpc::GenericError<'de>;
71}