proto-blue-api 0.3.1

AT Protocol high-level API: agent, rich text, moderation, generated types
Documentation
// Generated by atproto-codegen. Do not edit.
//! Lexicon: app.bsky.embed.recordWithMedia
#![allow(clippy::pedantic, clippy::nursery, clippy::all)]

use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(tag = "$type")]
pub enum MainMediaRefs {
    #[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(other)]
    Other,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Main {
    pub media: MainMediaRefs,
    pub record: crate::app::bsky::embed::record::Main,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(tag = "$type")]
pub enum ViewMediaRefs {
    #[serde(rename = "app.bsky.embed.images#view")]
    BskyEmbedImagesView(Box<crate::app::bsky::embed::images::View>),
    #[serde(rename = "app.bsky.embed.video#view")]
    BskyEmbedVideoView(Box<crate::app::bsky::embed::video::View>),
    #[serde(rename = "app.bsky.embed.external#view")]
    BskyEmbedExternalView(Box<crate::app::bsky::embed::external::View>),
    #[serde(other)]
    Other,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct View {
    pub media: ViewMediaRefs,
    pub record: crate::app::bsky::embed::record::View,
}