1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: net.anisota.feed.repost
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8///Record representing a 'repost' of an existing piece of content published in the Anisota feed. The target of the repost is the 'subject' of the record.
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)]
19#[serde(rename_all = "camelCase")]
20pub struct Repost<'a> {
21 ///Client-declared timestamp when this repost was created.
22 pub created_at: jacquard_common::types::string::Datetime,
23 ///The subject of the repost.
24 #[serde(borrow)]
25 pub subject: crate::com_atproto::repo::strong_ref::StrongRef<'a>,
26}
27
28/// Typed wrapper for GetRecord response with this collection's record type.
29#[derive(
30 serde::Serialize,
31 serde::Deserialize,
32 Debug,
33 Clone,
34 PartialEq,
35 Eq,
36 jacquard_derive::IntoStatic
37)]
38#[serde(rename_all = "camelCase")]
39pub struct RepostGetRecordOutput<'a> {
40 #[serde(skip_serializing_if = "std::option::Option::is_none")]
41 #[serde(borrow)]
42 pub cid: std::option::Option<jacquard_common::types::string::Cid<'a>>,
43 #[serde(borrow)]
44 pub uri: jacquard_common::types::string::AtUri<'a>,
45 #[serde(borrow)]
46 pub value: Repost<'a>,
47}
48
49/// Marker type for deserializing records from this collection.
50pub struct RepostRecord;
51impl jacquard_common::xrpc::XrpcResp for RepostRecord {
52 const NSID: &'static str = "net.anisota.feed.repost";
53 const ENCODING: &'static str = "application/json";
54 type Output<'de> = RepostGetRecordOutput<'de>;
55 type Err<'de> = jacquard_common::types::collection::RecordError<'de>;
56}
57
58impl jacquard_common::types::collection::Collection for Repost<'_> {
59 const NSID: &'static str = "net.anisota.feed.repost";
60 type Record = RepostRecord;
61}
62
63impl From<RepostGetRecordOutput<'_>> for Repost<'_> {
64 fn from(output: RepostGetRecordOutput<'_>) -> Self {
65 use jacquard_common::IntoStatic;
66 output.value.into_static()
67 }
68}