jacquard_api/com_atproto/temp/
fetch_labels.rs

1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: com.atproto.temp.fetchLabels
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)]
17#[builder(start_fn = new)]
18#[serde(rename_all = "camelCase")]
19pub struct FetchLabels {
20    ///(default: 50, min: 1, max: 250)
21    #[serde(skip_serializing_if = "std::option::Option::is_none")]
22    pub limit: std::option::Option<i64>,
23    #[serde(skip_serializing_if = "std::option::Option::is_none")]
24    pub since: std::option::Option<i64>,
25}
26
27impl jacquard_common::IntoStatic for FetchLabels {
28    type Output = FetchLabels;
29    fn into_static(self) -> Self::Output {
30        self
31    }
32}
33
34#[jacquard_derive::lexicon]
35#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
36#[serde(rename_all = "camelCase")]
37pub struct FetchLabelsOutput<'a> {
38    #[serde(borrow)]
39    pub labels: Vec<crate::com_atproto::label::Label<'a>>,
40}
41
42impl jacquard_common::IntoStatic for FetchLabelsOutput<'_> {
43    type Output = FetchLabelsOutput<'static>;
44    fn into_static(self) -> Self::Output {
45        FetchLabelsOutput {
46            labels: self.labels.into_static(),
47            extra_data: self.extra_data.into_static(),
48        }
49    }
50}
51
52impl jacquard_common::types::xrpc::XrpcRequest for FetchLabels {
53    const NSID: &'static str = "com.atproto.temp.fetchLabels";
54    const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query;
55    const OUTPUT_ENCODING: &'static str = "application/json";
56    type Output<'de> = FetchLabelsOutput<'de>;
57    type Err<'de> = jacquard_common::types::xrpc::GenericError<'de>;
58}