1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: app.bsky.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(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
10#[serde(rename_all = "camelCase")]
11pub struct Image<'a> {
12 ///Alt text description of the image, for accessibility.
13 #[serde(borrow)]
14 pub alt: jacquard_common::CowStr<'a>,
15 #[serde(skip_serializing_if = "std::option::Option::is_none")]
16 #[serde(borrow)]
17 pub aspect_ratio: std::option::Option<crate::app_bsky::embed::AspectRatio<'a>>,
18 #[serde(borrow)]
19 pub image: jacquard_common::types::blob::Blob<'a>,
20}
21
22impl jacquard_common::IntoStatic for Image<'_> {
23 type Output = Image<'static>;
24 fn into_static(self) -> Self::Output {
25 Image {
26 alt: self.alt.into_static(),
27 aspect_ratio: self.aspect_ratio.into_static(),
28 image: self.image.into_static(),
29 extra_data: self.extra_data.into_static(),
30 }
31 }
32}
33
34#[jacquard_derive::lexicon]
35#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
36#[serde(rename_all = "camelCase")]
37pub struct Images<'a> {
38 #[serde(borrow)]
39 pub images: Vec<crate::app_bsky::embed::images::Image<'a>>,
40}
41
42impl jacquard_common::IntoStatic for Images<'_> {
43 type Output = Images<'static>;
44 fn into_static(self) -> Self::Output {
45 Images {
46 images: self.images.into_static(),
47 extra_data: self.extra_data.into_static(),
48 }
49 }
50}
51
52#[jacquard_derive::lexicon]
53#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
54#[serde(rename_all = "camelCase")]
55pub struct View<'a> {
56 #[serde(borrow)]
57 pub images: Vec<crate::app_bsky::embed::images::ViewImage<'a>>,
58}
59
60impl jacquard_common::IntoStatic for View<'_> {
61 type Output = View<'static>;
62 fn into_static(self) -> Self::Output {
63 View {
64 images: self.images.into_static(),
65 extra_data: self.extra_data.into_static(),
66 }
67 }
68}
69
70#[jacquard_derive::lexicon]
71#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
72#[serde(rename_all = "camelCase")]
73pub struct ViewImage<'a> {
74 ///Alt text description of the image, for accessibility.
75 #[serde(borrow)]
76 pub alt: jacquard_common::CowStr<'a>,
77 #[serde(skip_serializing_if = "std::option::Option::is_none")]
78 #[serde(borrow)]
79 pub aspect_ratio: std::option::Option<crate::app_bsky::embed::AspectRatio<'a>>,
80 ///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.
81 #[serde(borrow)]
82 pub fullsize: jacquard_common::types::string::Uri<'a>,
83 ///Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View.
84 #[serde(borrow)]
85 pub thumb: jacquard_common::types::string::Uri<'a>,
86}
87
88impl jacquard_common::IntoStatic for ViewImage<'_> {
89 type Output = ViewImage<'static>;
90 fn into_static(self) -> Self::Output {
91 ViewImage {
92 alt: self.alt.into_static(),
93 aspect_ratio: self.aspect_ratio.into_static(),
94 fullsize: self.fullsize.into_static(),
95 thumb: self.thumb.into_static(),
96 extra_data: self.extra_data.into_static(),
97 }
98 }
99}