1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: sh.tangled.feed.star
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8#[jacquard_derive::lexicon]
9#[derive(
10 serde::Serialize,
11 serde::Deserialize,
12 Debug,
13 Clone,
14 PartialEq,
15 Eq,
16 jacquard_derive::IntoStatic,
17 bon::Builder
18)]
19#[serde(rename_all = "camelCase")]
20pub struct Star<'a> {
21 pub created_at: jacquard_common::types::string::Datetime,
22 #[serde(borrow)]
23 pub subject: jacquard_common::types::string::AtUri<'a>,
24}
25
26/// Typed wrapper for GetRecord response with this collection's record type.
27#[derive(
28 serde::Serialize,
29 serde::Deserialize,
30 Debug,
31 Clone,
32 PartialEq,
33 Eq,
34 jacquard_derive::IntoStatic
35)]
36#[serde(rename_all = "camelCase")]
37pub struct StarGetRecordOutput<'a> {
38 #[serde(skip_serializing_if = "std::option::Option::is_none")]
39 #[serde(borrow)]
40 pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
41 #[serde(borrow)]
42 pub uri: jacquard_common::types::string::AtUri<'a>,
43 #[serde(borrow)]
44 pub value: Star<'a>,
45}
46
47/// Marker type for deserializing records from this collection.
48pub struct StarRecord;
49impl jacquard_common::xrpc::XrpcResp for StarRecord {
50 const NSID: &'static str = "sh.tangled.feed.star";
51 const ENCODING: &'static str = "application/json";
52 type Output<'de> = StarGetRecordOutput<'de>;
53 type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
54}
55
56impl jacquard_common::types::collection::Collection for Star<'_> {
57 const NSID: &'static str = "sh.tangled.feed.star";
58 type Record = StarRecord;
59}
60
61impl From<StarGetRecordOutput<'_>> for Star<'_> {
62 fn from(output: StarGetRecordOutput<'_>) -> Self {
63 use jacquard_common::IntoStatic;
64 output.value.into_static()
65 }
66}