1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: com.atproto.sync.listRepos
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 ListRepos<'a> {
20 #[serde(skip_serializing_if = "std::option::Option::is_none")]
21 #[serde(borrow)]
22 #[builder(into)]
23 pub cursor: std::option::Option<jacquard_common::CowStr<'a>>,
24 ///(default: 500, min: 1, max: 1000)
25 #[serde(skip_serializing_if = "std::option::Option::is_none")]
26 pub limit: std::option::Option<i64>,
27}
28
29impl jacquard_common::IntoStatic for ListRepos<'_> {
30 type Output = ListRepos<'static>;
31 fn into_static(self) -> Self::Output {
32 ListRepos {
33 cursor: self.cursor.into_static(),
34 limit: self.limit.into_static(),
35 }
36 }
37}
38
39#[jacquard_derive::lexicon]
40#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
41#[serde(rename_all = "camelCase")]
42pub struct ListReposOutput<'a> {
43 #[serde(skip_serializing_if = "std::option::Option::is_none")]
44 #[serde(borrow)]
45 pub cursor: std::option::Option<jacquard_common::CowStr<'a>>,
46 #[serde(borrow)]
47 pub repos: Vec<jacquard_common::types::value::Data<'a>>,
48}
49
50impl jacquard_common::IntoStatic for ListReposOutput<'_> {
51 type Output = ListReposOutput<'static>;
52 fn into_static(self) -> Self::Output {
53 ListReposOutput {
54 cursor: self.cursor.into_static(),
55 repos: self.repos.into_static(),
56 extra_data: self.extra_data.into_static(),
57 }
58 }
59}
60
61impl jacquard_common::types::xrpc::XrpcRequest for ListRepos<'_> {
62 const NSID: &'static str = "com.atproto.sync.listRepos";
63 const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query;
64 const OUTPUT_ENCODING: &'static str = "application/json";
65 type Output<'de> = ListReposOutput<'de>;
66 type Err<'de> = jacquard_common::types::xrpc::GenericError<'de>;
67}
68
69#[jacquard_derive::lexicon]
70#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
71#[serde(rename_all = "camelCase")]
72pub struct Repo<'a> {
73 #[serde(skip_serializing_if = "std::option::Option::is_none")]
74 pub active: std::option::Option<bool>,
75 #[serde(borrow)]
76 pub did: jacquard_common::types::string::Did<'a>,
77 ///Current repo commit CID
78 #[serde(borrow)]
79 pub head: jacquard_common::types::string::Cid<'a>,
80 pub rev: jacquard_common::types::string::Tid,
81 ///If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.
82 #[serde(skip_serializing_if = "std::option::Option::is_none")]
83 #[serde(borrow)]
84 pub status: std::option::Option<jacquard_common::CowStr<'a>>,
85}
86
87impl jacquard_common::IntoStatic for Repo<'_> {
88 type Output = Repo<'static>;
89 fn into_static(self) -> Self::Output {
90 Repo {
91 active: self.active.into_static(),
92 did: self.did.into_static(),
93 head: self.head.into_static(),
94 rev: self.rev.into_static(),
95 status: self.status.into_static(),
96 extra_data: self.extra_data.into_static(),
97 }
98 }
99}