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 jacquard_derive::IntoStatic,
17 Default
18)]
19#[serde(rename_all = "camelCase")]
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}
26
27#[jacquard_derive::lexicon]
28#[derive(
29 serde::Serialize,
30 serde::Deserialize,
31 Debug,
32 Clone,
33 PartialEq,
34 Eq,
35 jacquard_derive::IntoStatic,
36 Default
37)]
38#[serde(rename_all = "camelCase")]
39pub struct ReserveSigningKeyOutput<'a> {
40 /// The public key for the reserved signing key, in did:key serialization.
41 #[serde(borrow)]
42 pub signing_key: jacquard_common::CowStr<'a>,
43}
44
45///Response type for
46///com.atproto.server.reserveSigningKey
47pub struct ReserveSigningKeyResponse;
48impl jacquard_common::xrpc::XrpcResp for ReserveSigningKeyResponse {
49 const NSID: &'static str = "com.atproto.server.reserveSigningKey";
50 const ENCODING: &'static str = "application/json";
51 type Output<'de> = ReserveSigningKeyOutput<'de>;
52 type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
53}
54
55impl<'a> jacquard_common::xrpc::XrpcRequest for ReserveSigningKey<'a> {
56 const NSID: &'static str = "com.atproto.server.reserveSigningKey";
57 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
58 "application/json",
59 );
60 type Response = ReserveSigningKeyResponse;
61}
62
63///Endpoint type for
64///com.atproto.server.reserveSigningKey
65pub struct ReserveSigningKeyRequest;
66impl jacquard_common::xrpc::XrpcEndpoint for ReserveSigningKeyRequest {
67 const PATH: &'static str = "/xrpc/com.atproto.server.reserveSigningKey";
68 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
69 "application/json",
70 );
71 type Request<'de> = ReserveSigningKey<'de>;
72 type Response = ReserveSigningKeyResponse;
73}