atrium_api/app/bsky/embed/
record.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `app.bsky.embed.record` namespace.
3//!A representation of a record embedded in a Bluesky record (eg, a post). For example, a quote-post, or sharing a feed generator record.
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct MainData {
7    pub record: crate::com::atproto::repo::strong_ref::Main,
8}
9pub type Main = crate::types::Object<MainData>;
10#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
11#[serde(rename_all = "camelCase")]
12pub struct ViewData {
13    pub record: crate::types::Union<ViewRecordRefs>,
14}
15pub type View = crate::types::Object<ViewData>;
16#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
17#[serde(rename_all = "camelCase")]
18pub struct ViewBlockedData {
19    pub author: crate::app::bsky::feed::defs::BlockedAuthor,
20    pub blocked: bool,
21    pub uri: String,
22}
23pub type ViewBlocked = crate::types::Object<ViewBlockedData>;
24#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
25#[serde(rename_all = "camelCase")]
26pub struct ViewDetachedData {
27    pub detached: bool,
28    pub uri: String,
29}
30pub type ViewDetached = crate::types::Object<ViewDetachedData>;
31#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
32#[serde(rename_all = "camelCase")]
33pub struct ViewNotFoundData {
34    pub not_found: bool,
35    pub uri: String,
36}
37pub type ViewNotFound = crate::types::Object<ViewNotFoundData>;
38#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
39#[serde(rename_all = "camelCase")]
40pub struct ViewRecordData {
41    pub author: crate::app::bsky::actor::defs::ProfileViewBasic,
42    pub cid: crate::types::string::Cid,
43    #[serde(skip_serializing_if = "core::option::Option::is_none")]
44    pub embeds: core::option::Option<Vec<crate::types::Union<ViewRecordEmbedsItem>>>,
45    pub indexed_at: crate::types::string::Datetime,
46    #[serde(skip_serializing_if = "core::option::Option::is_none")]
47    pub labels: core::option::Option<Vec<crate::com::atproto::label::defs::Label>>,
48    #[serde(skip_serializing_if = "core::option::Option::is_none")]
49    pub like_count: core::option::Option<i64>,
50    #[serde(skip_serializing_if = "core::option::Option::is_none")]
51    pub quote_count: core::option::Option<i64>,
52    #[serde(skip_serializing_if = "core::option::Option::is_none")]
53    pub reply_count: core::option::Option<i64>,
54    #[serde(skip_serializing_if = "core::option::Option::is_none")]
55    pub repost_count: core::option::Option<i64>,
56    pub uri: String,
57    ///The record data itself.
58    pub value: crate::types::Unknown,
59}
60pub type ViewRecord = crate::types::Object<ViewRecordData>;
61#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
62#[serde(tag = "$type")]
63pub enum ViewRecordEmbedsItem {
64    #[serde(rename = "app.bsky.embed.images#view")]
65    AppBskyEmbedImagesView(Box<crate::app::bsky::embed::images::View>),
66    #[serde(rename = "app.bsky.embed.video#view")]
67    AppBskyEmbedVideoView(Box<crate::app::bsky::embed::video::View>),
68    #[serde(rename = "app.bsky.embed.external#view")]
69    AppBskyEmbedExternalView(Box<crate::app::bsky::embed::external::View>),
70    #[serde(rename = "app.bsky.embed.record#view")]
71    AppBskyEmbedRecordView(Box<crate::app::bsky::embed::record::View>),
72    #[serde(rename = "app.bsky.embed.recordWithMedia#view")]
73    AppBskyEmbedRecordWithMediaView(Box<crate::app::bsky::embed::record_with_media::View>),
74}
75#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
76#[serde(tag = "$type")]
77pub enum ViewRecordRefs {
78    #[serde(rename = "app.bsky.embed.record#viewRecord")]
79    ViewRecord(Box<ViewRecord>),
80    #[serde(rename = "app.bsky.embed.record#viewNotFound")]
81    ViewNotFound(Box<ViewNotFound>),
82    #[serde(rename = "app.bsky.embed.record#viewBlocked")]
83    ViewBlocked(Box<ViewBlocked>),
84    #[serde(rename = "app.bsky.embed.record#viewDetached")]
85    ViewDetached(Box<ViewDetached>),
86    #[serde(rename = "app.bsky.feed.defs#generatorView")]
87    AppBskyFeedDefsGeneratorView(Box<crate::app::bsky::feed::defs::GeneratorView>),
88    #[serde(rename = "app.bsky.graph.defs#listView")]
89    AppBskyGraphDefsListView(Box<crate::app::bsky::graph::defs::ListView>),
90    #[serde(rename = "app.bsky.labeler.defs#labelerView")]
91    AppBskyLabelerDefsLabelerView(Box<crate::app::bsky::labeler::defs::LabelerView>),
92    #[serde(rename = "app.bsky.graph.defs#starterPackViewBasic")]
93    AppBskyGraphDefsStarterPackViewBasic(Box<crate::app::bsky::graph::defs::StarterPackViewBasic>),
94}