// @generated by jacquard-lexicon. DO NOT EDIT. // // Lexicon: pub.leaflet.pages.linearDocument // // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, bon::Builder )] #[serde(rename_all = "camelCase")] pub struct Block<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[builder(into)] #[serde(borrow)] pub alignment: Option>, #[serde(borrow)] pub block: BlockBlock<'a>, } #[jacquard_derive::open_union] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(tag = "$type")] #[serde(bound(deserialize = "'de: 'a"))] pub enum BlockBlock<'a> { #[serde(rename = "pub.leaflet.blocks.iframe")] Iframe(Box>), #[serde(rename = "pub.leaflet.blocks.text")] Text(Box>), #[serde(rename = "pub.leaflet.blocks.blockquote")] Blockquote(Box>), #[serde(rename = "pub.leaflet.blocks.header")] Header(Box>), #[serde(rename = "pub.leaflet.blocks.image")] Image(Box>), #[serde(rename = "pub.leaflet.blocks.unorderedList")] UnorderedList(Box>), #[serde(rename = "pub.leaflet.blocks.website")] Website(Box>), #[serde(rename = "pub.leaflet.blocks.math")] Math(Box>), #[serde(rename = "pub.leaflet.blocks.code")] Code(Box>), #[serde(rename = "pub.leaflet.blocks.horizontalRule")] HorizontalRule(Box>), #[serde(rename = "pub.leaflet.blocks.bskyPost")] BskyPost(Box>), } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, Default )] #[serde(rename_all = "camelCase")] pub struct LinearDocument<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub blocks: std::option::Option< Vec>, >, } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, bon::Builder )] #[serde(rename_all = "camelCase")] pub struct Position<'a> { pub block: Vec, pub offset: i64, } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, bon::Builder )] #[serde(rename_all = "camelCase")] pub struct Quote<'a> { #[serde(borrow)] pub end: crate::pub_leaflet::pages::linear_document::Position<'a>, #[serde(borrow)] pub start: crate::pub_leaflet::pages::linear_document::Position<'a>, } #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Hash, jacquard_derive::IntoStatic )] pub struct TextAlignCenter; impl std::fmt::Display for TextAlignCenter { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "textAlignCenter") } } #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Hash, jacquard_derive::IntoStatic )] pub struct TextAlignLeft; impl std::fmt::Display for TextAlignLeft { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "textAlignLeft") } } #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, Hash, jacquard_derive::IntoStatic )] pub struct TextAlignRight; impl std::fmt::Display for TextAlignRight { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "textAlignRight") } }