jacquard_api/com_atproto/label/
query_labels.rs

1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: com.atproto.label.queryLabels
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8#[derive(
9    serde::Serialize,
10    serde::Deserialize,
11    Debug,
12    Clone,
13    PartialEq,
14    Eq,
15    bon::Builder,
16    jacquard_derive::IntoStatic
17)]
18#[builder(start_fn = new)]
19#[serde(rename_all = "camelCase")]
20pub struct QueryLabels<'a> {
21    #[serde(skip_serializing_if = "std::option::Option::is_none")]
22    #[serde(borrow)]
23    #[builder(into)]
24    pub cursor: std::option::Option<jacquard_common::CowStr<'a>>,
25    ///(default: 50, min: 1, max: 250)
26    #[serde(skip_serializing_if = "std::option::Option::is_none")]
27    pub limit: std::option::Option<i64>,
28    #[serde(skip_serializing_if = "std::option::Option::is_none")]
29    #[serde(borrow)]
30    pub sources: std::option::Option<Vec<jacquard_common::types::string::Did<'a>>>,
31    #[serde(borrow)]
32    pub uri_patterns: Vec<jacquard_common::CowStr<'a>>,
33}
34
35#[jacquard_derive::lexicon]
36#[derive(
37    serde::Serialize,
38    serde::Deserialize,
39    Debug,
40    Clone,
41    PartialEq,
42    Eq,
43    jacquard_derive::IntoStatic
44)]
45#[serde(rename_all = "camelCase")]
46pub struct QueryLabelsOutput<'a> {
47    #[serde(skip_serializing_if = "std::option::Option::is_none")]
48    #[serde(borrow)]
49    pub cursor: std::option::Option<jacquard_common::CowStr<'a>>,
50    #[serde(borrow)]
51    pub labels: Vec<crate::com_atproto::label::Label<'a>>,
52}
53
54///Response type for
55///com.atproto.label.queryLabels
56pub struct QueryLabelsResponse;
57impl jacquard_common::xrpc::XrpcResp for QueryLabelsResponse {
58    const NSID: &'static str = "com.atproto.label.queryLabels";
59    const ENCODING: &'static str = "application/json";
60    type Output<'de> = QueryLabelsOutput<'de>;
61    type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
62}
63
64impl<'a> jacquard_common::xrpc::XrpcRequest for QueryLabels<'a> {
65    const NSID: &'static str = "com.atproto.label.queryLabels";
66    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
67    type Response = QueryLabelsResponse;
68}
69
70///Endpoint type for
71///com.atproto.label.queryLabels
72pub struct QueryLabelsRequest;
73impl jacquard_common::xrpc::XrpcEndpoint for QueryLabelsRequest {
74    const PATH: &'static str = "/xrpc/com.atproto.label.queryLabels";
75    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
76    type Request<'de> = QueryLabels<'de>;
77    type Response = QueryLabelsResponse;
78}