// @generated by jacquard-lexicon. DO NOT EDIT. // // Lexicon: pub.leaflet.comment // // 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 LinearDocumentQuote<'a> { #[serde(borrow)] pub document: jacquard_common::types::string::AtUri<'a>, #[serde(borrow)] pub quote: crate::pub_leaflet::pages::linear_document::Quote<'a>, } /// Record containing a comment #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, bon::Builder )] #[serde(rename_all = "camelCase")] pub struct Comment<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[builder(into)] #[serde(borrow)] pub attachment: Option>, pub created_at: jacquard_common::types::string::Datetime, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[builder(into)] #[serde(borrow)] pub facets: Option>>, #[serde(borrow)] #[builder(into)] pub plaintext: jacquard_common::CowStr<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[builder(into)] #[serde(borrow)] pub reply: Option>, #[serde(borrow)] pub subject: jacquard_common::types::string::AtUri<'a>, } /// Typed wrapper for GetRecord response with this collection's record type. #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct CommentGetRecordOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cid: std::option::Option>, #[serde(borrow)] pub uri: jacquard_common::types::string::AtUri<'a>, #[serde(borrow)] pub value: Comment<'a>, } /// Marker type for deserializing records from this collection. pub struct CommentRecord; impl jacquard_common::xrpc::XrpcResp for CommentRecord { const NSID: &'static str = "pub.leaflet.comment"; const ENCODING: &'static str = "application/json"; type Output<'de> = CommentGetRecordOutput<'de>; type Err<'de> = jacquard_common::types::collection::RecordError<'de>; } impl jacquard_common::types::collection::Collection for Comment<'_> { const NSID: &'static str = "pub.leaflet.comment"; type Record = CommentRecord; } impl From> for Comment<'_> { fn from(output: CommentGetRecordOutput<'_>) -> Self { use jacquard_common::IntoStatic; output.value.into_static() } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, bon::Builder )] #[serde(rename_all = "camelCase")] pub struct ReplyRef<'a> { #[serde(borrow)] pub parent: jacquard_common::types::string::AtUri<'a>, }