#![allow(clippy::pedantic, clippy::nursery, clippy::all)]
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Entity {
pub index: TextSlice,
#[serde(rename = "type")]
pub r#type: String,
pub value: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(tag = "$type")]
pub enum MainEmbedRefs {
#[serde(rename = "app.bsky.embed.images")]
BskyEmbedImages(Box<crate::app::bsky::embed::images::Main>),
#[serde(rename = "app.bsky.embed.video")]
BskyEmbedVideo(Box<crate::app::bsky::embed::video::Main>),
#[serde(rename = "app.bsky.embed.external")]
BskyEmbedExternal(Box<crate::app::bsky::embed::external::Main>),
#[serde(rename = "app.bsky.embed.record")]
BskyEmbedRecord(Box<crate::app::bsky::embed::record::Main>),
#[serde(rename = "app.bsky.embed.recordWithMedia")]
BskyEmbedRecordWithMedia(Box<crate::app::bsky::embed::record_with_media::Main>),
#[serde(other)]
Other,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(tag = "$type")]
pub enum MainLabelsRefs {
#[serde(rename = "com.atproto.label.defs#selfLabels")]
AtprotoLabelDefsSelfLabels(Box<crate::com::atproto::label::defs::SelfLabels>),
#[serde(other)]
Other,
}
pub const TYPE: &str = "app.bsky.feed.post";
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Main {
#[serde(rename = "$type", default = "default_type")]
pub r#type: String,
pub created_at: proto_blue_syntax::Datetime,
#[serde(skip_serializing_if = "Option::is_none")]
pub embed: Option<MainEmbedRefs>,
#[serde(skip_serializing_if = "Option::is_none")]
pub entities: Option<Vec<Entity>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub facets: Option<Vec<crate::app::bsky::richtext::facet::Main>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub labels: Option<MainLabelsRefs>,
#[serde(skip_serializing_if = "Option::is_none")]
pub langs: Option<Vec<String>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub reply: Option<ReplyRef>,
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<String>>,
pub text: String,
}
fn default_type() -> String {
TYPE.to_string()
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ReplyRef {
pub parent: crate::com::atproto::repo::strong_ref::Main,
pub root: crate::com::atproto::repo::strong_ref::Main,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct TextSlice {
pub end: i64,
pub start: i64,
}