1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: net.anisota.feed.list
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8/// A list of posts for curation, bookmarking, or organization
9#[jacquard_derive::lexicon]
10#[derive(
11 serde::Serialize,
12 serde::Deserialize,
13 Debug,
14 Clone,
15 PartialEq,
16 Eq,
17 jacquard_derive::IntoStatic,
18 bon::Builder
19)]
20#[serde(rename_all = "camelCase")]
21pub struct List<'a> {
22 /// Optional avatar image for the list
23 #[serde(skip_serializing_if = "std::option::Option::is_none")]
24 #[builder(into)]
25 #[serde(borrow)]
26 pub avatar: Option<jacquard_common::types::blob::Blob<'a>>,
27 /// When the list was created
28 pub created_at: jacquard_common::types::string::Datetime,
29 /// Optional description of the list
30 #[serde(skip_serializing_if = "std::option::Option::is_none")]
31 #[builder(into)]
32 #[serde(borrow)]
33 pub description: Option<jacquard_common::CowStr<'a>>,
34 /// Display name for the list
35 #[serde(borrow)]
36 #[builder(into)]
37 pub name: jacquard_common::CowStr<'a>,
38 /// Tags for categorizing the list
39 #[serde(skip_serializing_if = "std::option::Option::is_none")]
40 #[builder(into)]
41 #[serde(borrow)]
42 pub tags: Option<Vec<jacquard_common::CowStr<'a>>>,
43}
44
45/// Typed wrapper for GetRecord response with this collection's record type.
46#[derive(
47 serde::Serialize,
48 serde::Deserialize,
49 Debug,
50 Clone,
51 PartialEq,
52 Eq,
53 jacquard_derive::IntoStatic
54)]
55#[serde(rename_all = "camelCase")]
56pub struct ListGetRecordOutput<'a> {
57 #[serde(skip_serializing_if = "std::option::Option::is_none")]
58 #[serde(borrow)]
59 pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
60 #[serde(borrow)]
61 pub uri: jacquard_common::types::string::AtUri<'a>,
62 #[serde(borrow)]
63 pub value: List<'a>,
64}
65
66/// Marker type for deserializing records from this collection.
67pub struct ListRecord;
68impl jacquard_common::xrpc::XrpcResp for ListRecord {
69 const NSID: &'static str = "net.anisota.feed.list";
70 const ENCODING: &'static str = "application/json";
71 type Output<'de> = ListGetRecordOutput<'de>;
72 type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
73}
74
75impl jacquard_common::types::collection::Collection for List<'_> {
76 const NSID: &'static str = "net.anisota.feed.list";
77 type Record = ListRecord;
78}
79
80impl From<ListGetRecordOutput<'_>> for List<'_> {
81 fn from(output: ListGetRecordOutput<'_>) -> Self {
82 use jacquard_common::IntoStatic;
83 output.value.into_static()
84 }
85}