Skip to main content

proto_blue_api/generated/app/bsky/feed/
post.rs

1// Generated by atproto-codegen. Do not edit.
2//! Lexicon: app.bsky.feed.post
3
4use serde::{Deserialize, Serialize};
5
6/// Deprecated: use facets instead.
7#[derive(Debug, Clone, Serialize, Deserialize)]
8#[serde(rename_all = "camelCase")]
9pub struct Entity {
10    pub index: TextSlice,
11    #[serde(rename = "type")]
12    pub r#type: String,
13    pub value: String,
14}
15
16#[derive(Debug, Clone, Serialize, Deserialize)]
17#[serde(rename_all = "camelCase")]
18pub struct Main {
19    pub created_at: String,
20    #[serde(skip_serializing_if = "Option::is_none")]
21    pub embed: Option<serde_json::Value>,
22    #[serde(skip_serializing_if = "Option::is_none")]
23    pub entities: Option<Vec<Entity>>,
24    #[serde(skip_serializing_if = "Option::is_none")]
25    pub facets: Option<Vec<crate::app::bsky::richtext::facet::Main>>,
26    #[serde(skip_serializing_if = "Option::is_none")]
27    pub labels: Option<serde_json::Value>,
28    #[serde(skip_serializing_if = "Option::is_none")]
29    pub langs: Option<Vec<String>>,
30    #[serde(skip_serializing_if = "Option::is_none")]
31    pub reply: Option<ReplyRef>,
32    #[serde(skip_serializing_if = "Option::is_none")]
33    pub tags: Option<Vec<String>>,
34    pub text: String,
35}
36
37#[derive(Debug, Clone, Serialize, Deserialize)]
38#[serde(rename_all = "camelCase")]
39pub struct ReplyRef {
40    pub parent: crate::com::atproto::repo::strongRef::Main,
41    pub root: crate::com::atproto::repo::strongRef::Main,
42}
43
44/// Deprecated. Use app.bsky.richtext instead -- A text segment. Start is inclusive, end is exclusive. Indices are for utf16-encoded strings.
45#[derive(Debug, Clone, Serialize, Deserialize)]
46#[serde(rename_all = "camelCase")]
47pub struct TextSlice {
48    pub end: i64,
49    pub start: i64,
50}