jacquard_api/com_atproto/sync/
notify_of_update.rs

1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: com.atproto.sync.notifyOfUpdate
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    jacquard_derive::IntoStatic
18)]
19#[serde(rename_all = "camelCase")]
20#[builder(start_fn = new)]
21pub struct NotifyOfUpdate<'a> {
22    ///Hostname of the current service (usually a PDS) that is notifying of update.
23    #[serde(borrow)]
24    #[builder(into)]
25    pub hostname: jacquard_common::CowStr<'a>,
26    #[serde(flatten)]
27    #[serde(borrow)]
28    #[builder(default)]
29    pub extra_data: ::std::collections::BTreeMap<
30        ::jacquard_common::smol_str::SmolStr,
31        ::jacquard_common::types::value::Data<'a>,
32    >,
33}
34
35///Response type for
36///com.atproto.sync.notifyOfUpdate
37pub struct NotifyOfUpdateResponse;
38impl jacquard_common::xrpc::XrpcResp for NotifyOfUpdateResponse {
39    const NSID: &'static str = "com.atproto.sync.notifyOfUpdate";
40    const ENCODING: &'static str = "application/json";
41    type Output<'de> = ();
42    type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
43}
44
45impl<'de> jacquard_common::xrpc::XrpcRequest<'de> for NotifyOfUpdate<'de> {
46    const NSID: &'static str = "com.atproto.sync.notifyOfUpdate";
47    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
48        "application/json",
49    );
50    type Response = NotifyOfUpdateResponse;
51}
52
53///Endpoint type for
54///com.atproto.sync.notifyOfUpdate
55pub struct NotifyOfUpdateRequest;
56impl jacquard_common::xrpc::XrpcEndpoint for NotifyOfUpdateRequest {
57    const PATH: &'static str = "/xrpc/com.atproto.sync.notifyOfUpdate";
58    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure(
59        "application/json",
60    );
61    type Request<'de> = NotifyOfUpdate<'de>;
62    type Response = NotifyOfUpdateResponse;
63}