atrium_api/app/bsky/feed/
post.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `app.bsky.feed.post` namespace.
3#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
4#[serde(rename_all = "camelCase")]
5pub struct RecordData {
6    ///Client-declared timestamp when this post was originally created.
7    pub created_at: crate::types::string::Datetime,
8    #[serde(skip_serializing_if = "core::option::Option::is_none")]
9    pub embed: core::option::Option<crate::types::Union<RecordEmbedRefs>>,
10    ///DEPRECATED: replaced by app.bsky.richtext.facet.
11    #[serde(skip_serializing_if = "core::option::Option::is_none")]
12    pub entities: core::option::Option<Vec<Entity>>,
13    ///Annotations of text (mentions, URLs, hashtags, etc)
14    #[serde(skip_serializing_if = "core::option::Option::is_none")]
15    pub facets: core::option::Option<Vec<crate::app::bsky::richtext::facet::Main>>,
16    ///Self-label values for this post. Effectively content warnings.
17    #[serde(skip_serializing_if = "core::option::Option::is_none")]
18    pub labels: core::option::Option<crate::types::Union<RecordLabelsRefs>>,
19    ///Indicates human language of post primary text content.
20    #[serde(skip_serializing_if = "core::option::Option::is_none")]
21    pub langs: core::option::Option<Vec<crate::types::string::Language>>,
22    #[serde(skip_serializing_if = "core::option::Option::is_none")]
23    pub reply: core::option::Option<ReplyRef>,
24    ///Additional hashtags, in addition to any included in post text and facets.
25    #[serde(skip_serializing_if = "core::option::Option::is_none")]
26    pub tags: core::option::Option<Vec<String>>,
27    ///The primary post content. May be an empty string, if there are embeds.
28    pub text: String,
29}
30pub type Record = crate::types::Object<RecordData>;
31///Deprecated: use facets instead.
32#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
33#[serde(rename_all = "camelCase")]
34pub struct EntityData {
35    pub index: TextSlice,
36    ///Expected values are 'mention' and 'link'.
37    pub r#type: String,
38    pub value: String,
39}
40pub type Entity = crate::types::Object<EntityData>;
41#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
42#[serde(rename_all = "camelCase")]
43pub struct ReplyRefData {
44    pub parent: crate::com::atproto::repo::strong_ref::Main,
45    pub root: crate::com::atproto::repo::strong_ref::Main,
46}
47pub type ReplyRef = crate::types::Object<ReplyRefData>;
48///Deprecated. Use app.bsky.richtext instead -- A text segment. Start is inclusive, end is exclusive. Indices are for utf16-encoded strings.
49#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
50#[serde(rename_all = "camelCase")]
51pub struct TextSliceData {
52    pub end: usize,
53    pub start: usize,
54}
55pub type TextSlice = crate::types::Object<TextSliceData>;
56#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
57#[serde(tag = "$type")]
58pub enum RecordEmbedRefs {
59    #[serde(rename = "app.bsky.embed.images")]
60    AppBskyEmbedImagesMain(Box<crate::app::bsky::embed::images::Main>),
61    #[serde(rename = "app.bsky.embed.video")]
62    AppBskyEmbedVideoMain(Box<crate::app::bsky::embed::video::Main>),
63    #[serde(rename = "app.bsky.embed.external")]
64    AppBskyEmbedExternalMain(Box<crate::app::bsky::embed::external::Main>),
65    #[serde(rename = "app.bsky.embed.record")]
66    AppBskyEmbedRecordMain(Box<crate::app::bsky::embed::record::Main>),
67    #[serde(rename = "app.bsky.embed.recordWithMedia")]
68    AppBskyEmbedRecordWithMediaMain(
69        Box<crate::app::bsky::embed::record_with_media::Main>,
70    ),
71}
72#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
73#[serde(tag = "$type")]
74pub enum RecordLabelsRefs {
75    #[serde(rename = "com.atproto.label.defs#selfLabels")]
76    ComAtprotoLabelDefsSelfLabels(Box<crate::com::atproto::label::defs::SelfLabels>),
77}