1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: app.bsky.feed.getFeedGenerator
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 GetFeedGenerator<'a> {
20 #[serde(borrow)]
21 pub feed: jacquard_common::types::string::AtUri<'a>,
22}
23
24impl jacquard_common::IntoStatic for GetFeedGenerator<'_> {
25 type Output = GetFeedGenerator<'static>;
26 fn into_static(self) -> Self::Output {
27 GetFeedGenerator {
28 feed: self.feed.into_static(),
29 }
30 }
31}
32
33#[jacquard_derive::lexicon]
34#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
35#[serde(rename_all = "camelCase")]
36pub struct GetFeedGeneratorOutput<'a> {
37 ///Indicates whether the feed generator service has been online recently, or else seems to be inactive.
38 pub is_online: bool,
39 ///Indicates whether the feed generator service is compatible with the record declaration.
40 pub is_valid: bool,
41 #[serde(borrow)]
42 pub view: crate::app_bsky::feed::GeneratorView<'a>,
43}
44
45impl jacquard_common::IntoStatic for GetFeedGeneratorOutput<'_> {
46 type Output = GetFeedGeneratorOutput<'static>;
47 fn into_static(self) -> Self::Output {
48 GetFeedGeneratorOutput {
49 is_online: self.is_online.into_static(),
50 is_valid: self.is_valid.into_static(),
51 view: self.view.into_static(),
52 extra_data: self.extra_data.into_static(),
53 }
54 }
55}
56
57impl jacquard_common::types::xrpc::XrpcRequest for GetFeedGenerator<'_> {
58 const NSID: &'static str = "app.bsky.feed.getFeedGenerator";
59 const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query;
60 const OUTPUT_ENCODING: &'static str = "application/json";
61 type Output<'de> = GetFeedGeneratorOutput<'de>;
62 type Err<'de> = jacquard_common::types::xrpc::GenericError<'de>;
63}