atrium-api 0.26.0

API library for AT Protocol (Bluesky)
Documentation
// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
//!Definitions for the `app.bsky.embed.gallery` namespace.
//!An assortment of media embedded in a Bluesky record (eg, a post).
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct MainData {
    ///The schema-level maxLength of 20 is a future-proof ceiling. Clients should currently enforce a soft limit of 10 items in authoring UIs.
    pub items: Vec<crate::types::Union<MainItemsItem>>,
}
pub type Main = crate::types::Object<MainData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ImageData {
    ///Alt text description of the image, for accessibility.
    pub alt: String,
    pub aspect_ratio: crate::app::bsky::embed::defs::AspectRatio,
    pub image: crate::types::BlobRef,
}
pub type Image = crate::types::Object<ImageData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ViewData {
    pub items: Vec<crate::types::Union<ViewItemsItem>>,
}
pub type View = crate::types::Object<ViewData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ViewImageData {
    ///Alt text description of the image, for accessibility.
    pub alt: String,
    pub aspect_ratio: crate::app::bsky::embed::defs::AspectRatio,
    ///Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View.
    pub fullsize: String,
    ///Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View.
    pub thumbnail: String,
}
pub type ViewImage = crate::types::Object<ViewImageData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "$type")]
pub enum MainItemsItem {
    #[serde(rename = "app.bsky.embed.gallery#image")]
    Image(Box<Image>),
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "$type")]
pub enum ViewItemsItem {
    #[serde(rename = "app.bsky.embed.gallery#viewImage")]
    ViewImage(Box<ViewImage>),
}