1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: sh.weaver.embed.images
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8#[jacquard_derive::lexicon]
9#[derive(
10 serde::Serialize,
11 serde::Deserialize,
12 Debug,
13 Clone,
14 PartialEq,
15 Eq,
16 jacquard_derive::IntoStatic
17)]
18#[serde(rename_all = "camelCase")]
19pub struct Image<'a> {
20 ///alt text description of the image
21 #[serde(borrow)]
22 pub alt: jacquard_common::CowStr<'a>,
23 ///Blurhash string for the image, used for low-resolution placeholders. This must be a valid Blurhash string.
24 #[serde(skip_serializing_if = "std::option::Option::is_none")]
25 #[serde(borrow)]
26 pub blurhash: std::option::Option<jacquard_common::CowStr<'a>>,
27 #[serde(skip_serializing_if = "std::option::Option::is_none")]
28 #[serde(borrow)]
29 pub dimensions: std::option::Option<ImageDimensions<'a>>,
30 #[serde(borrow)]
31 pub image: jacquard_common::types::blob::Blob<'a>,
32}
33
34#[jacquard_derive::open_union]
35#[derive(
36 serde::Serialize,
37 serde::Deserialize,
38 Debug,
39 Clone,
40 PartialEq,
41 Eq,
42 jacquard_derive::IntoStatic
43)]
44#[serde(tag = "$type")]
45#[serde(bound(deserialize = "'de: 'a"))]
46pub enum ImageDimensions<'a> {
47 #[serde(rename = "app.bsky.embed.defs#aspectRatio")]
48 AspectRatio(Box<crate::app_bsky::embed::AspectRatio<'a>>),
49 #[serde(rename = "sh.weaver.embed.defs#percentSize")]
50 PercentSize(Box<crate::sh_weaver::embed::PercentSize<'a>>),
51 #[serde(rename = "sh.weaver.embed.defs#pixelSize")]
52 PixelSize(Box<crate::sh_weaver::embed::PixelSize<'a>>),
53}
54
55#[jacquard_derive::lexicon]
56#[derive(
57 serde::Serialize,
58 serde::Deserialize,
59 Debug,
60 Clone,
61 PartialEq,
62 Eq,
63 jacquard_derive::IntoStatic
64)]
65#[serde(rename_all = "camelCase")]
66pub struct Images<'a> {
67 #[serde(borrow)]
68 pub images: Vec<crate::sh_weaver::embed::images::Image<'a>>,
69}