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