// @generated by jacquard-lexicon. DO NOT EDIT. // // Lexicon: sh.weaver.notebook.chapter // // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. /// A grouping of entries in a notebook, intended to be displayed as a single page. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, bon::Builder )] #[serde(rename_all = "camelCase")] pub struct Chapter<'a> { /// Client-declared timestamp when this was originally created. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[builder(into)] pub created_at: Option, #[serde(borrow)] pub entry_list: Vec>, /// The notebook this page belongs to. #[serde(borrow)] pub notebook: crate::com_atproto::repo::strong_ref::StrongRef<'a>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[builder(into)] #[serde(borrow)] pub tags: Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[builder(into)] #[serde(borrow)] pub title: Option>, } /// 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 ChapterGetRecordOutput<'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: Chapter<'a>, } /// Marker type for deserializing records from this collection. pub struct ChapterRecord; impl jacquard_common::xrpc::XrpcResp for ChapterRecord { const NSID: &'static str = "sh.weaver.notebook.chapter"; const ENCODING: &'static str = "application/json"; type Output<'de> = ChapterGetRecordOutput<'de>; type Err<'de> = jacquard_common::types::collection::RecordError<'de>; } impl jacquard_common::types::collection::Collection for Chapter<'_> { const NSID: &'static str = "sh.weaver.notebook.chapter"; type Record = ChapterRecord; } impl From> for Chapter<'_> { fn from(output: ChapterGetRecordOutput<'_>) -> Self { use jacquard_common::IntoStatic; output.value.into_static() } }