1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: app.bsky.graph.getLists
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 GetLists<'a> {
20 #[serde(borrow)]
21 pub actor: jacquard_common::types::ident::AtIdentifier<'a>,
22 #[serde(skip_serializing_if = "std::option::Option::is_none")]
23 #[serde(borrow)]
24 #[builder(into)]
25 pub cursor: std::option::Option<jacquard_common::CowStr<'a>>,
26 ///(default: 50, min: 1, max: 100)
27 #[serde(skip_serializing_if = "std::option::Option::is_none")]
28 pub limit: std::option::Option<i64>,
29 #[serde(skip_serializing_if = "std::option::Option::is_none")]
30 #[serde(borrow)]
31 pub purposes: std::option::Option<Vec<jacquard_common::CowStr<'a>>>,
32}
33
34impl jacquard_common::IntoStatic for GetLists<'_> {
35 type Output = GetLists<'static>;
36 fn into_static(self) -> Self::Output {
37 GetLists {
38 actor: self.actor.into_static(),
39 cursor: self.cursor.into_static(),
40 limit: self.limit.into_static(),
41 purposes: self.purposes.into_static(),
42 }
43 }
44}
45
46#[jacquard_derive::lexicon]
47#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
48#[serde(rename_all = "camelCase")]
49pub struct GetListsOutput<'a> {
50 #[serde(skip_serializing_if = "std::option::Option::is_none")]
51 #[serde(borrow)]
52 pub cursor: std::option::Option<jacquard_common::CowStr<'a>>,
53 #[serde(borrow)]
54 pub lists: Vec<crate::app_bsky::graph::ListView<'a>>,
55}
56
57impl jacquard_common::IntoStatic for GetListsOutput<'_> {
58 type Output = GetListsOutput<'static>;
59 fn into_static(self) -> Self::Output {
60 GetListsOutput {
61 cursor: self.cursor.into_static(),
62 lists: self.lists.into_static(),
63 extra_data: self.extra_data.into_static(),
64 }
65 }
66}
67
68impl jacquard_common::types::xrpc::XrpcRequest for GetLists<'_> {
69 const NSID: &'static str = "app.bsky.graph.getLists";
70 const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query;
71 const OUTPUT_ENCODING: &'static str = "application/json";
72 type Output<'de> = GetListsOutput<'de>;
73 type Err<'de> = jacquard_common::types::xrpc::GenericError<'de>;
74}