Skip to main content

atrium_api/app/bsky/embed/
gallery.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `app.bsky.embed.gallery` namespace.
3//!An assortment of media embedded in a Bluesky record (eg, a post).
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct MainData {
7    ///The schema-level maxLength of 20 is a future-proof ceiling. Clients should currently enforce a soft limit of 10 items in authoring UIs.
8    pub items: Vec<crate::types::Union<MainItemsItem>>,
9}
10pub type Main = crate::types::Object<MainData>;
11#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
12#[serde(rename_all = "camelCase")]
13pub struct ImageData {
14    ///Alt text description of the image, for accessibility.
15    pub alt: String,
16    pub aspect_ratio: crate::app::bsky::embed::defs::AspectRatio,
17    pub image: crate::types::BlobRef,
18}
19pub type Image = crate::types::Object<ImageData>;
20#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
21#[serde(rename_all = "camelCase")]
22pub struct ViewData {
23    pub items: Vec<crate::types::Union<ViewItemsItem>>,
24}
25pub type View = crate::types::Object<ViewData>;
26#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
27#[serde(rename_all = "camelCase")]
28pub struct ViewImageData {
29    ///Alt text description of the image, for accessibility.
30    pub alt: String,
31    pub aspect_ratio: crate::app::bsky::embed::defs::AspectRatio,
32    ///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.
33    pub fullsize: String,
34    ///Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View.
35    pub thumbnail: String,
36}
37pub type ViewImage = crate::types::Object<ViewImageData>;
38#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
39#[serde(tag = "$type")]
40pub enum MainItemsItem {
41    #[serde(rename = "app.bsky.embed.gallery#image")]
42    Image(Box<Image>),
43}
44#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
45#[serde(tag = "$type")]
46pub enum ViewItemsItem {
47    #[serde(rename = "app.bsky.embed.gallery#viewImage")]
48    ViewImage(Box<ViewImage>),
49}