// @generated by jacquard-lexicon. DO NOT EDIT. // // Lexicon: sh.weaver.notebook.entry // // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. /// A notebook entry #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, bon::Builder )] #[serde(rename_all = "camelCase")] pub struct Entry<'a> { /// The content of the notebook entry. This should be some flavor of Markdown. #[serde(borrow)] #[builder(into)] pub content: jacquard_common::CowStr<'a>, /// Client-declared timestamp when this was originally created. pub created_at: jacquard_common::types::string::Datetime, /// The set of images, if any, embedded in the notebook entry. #[serde(skip_serializing_if = "std::option::Option::is_none")] #[builder(into)] #[serde(borrow)] pub images: Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[builder(into)] #[serde(borrow)] pub tags: Option>, #[serde(borrow)] pub title: crate::sh_weaver::notebook::Title<'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 EntryGetRecordOutput<'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: Entry<'a>, } /// Marker type for deserializing records from this collection. pub struct EntryRecord; impl jacquard_common::xrpc::XrpcResp for EntryRecord { const NSID: &'static str = "sh.weaver.notebook.entry"; const ENCODING: &'static str = "application/json"; type Output<'de> = EntryGetRecordOutput<'de>; type Err<'de> = jacquard_common::types::collection::RecordError<'de>; } impl jacquard_common::types::collection::Collection for Entry<'_> { const NSID: &'static str = "sh.weaver.notebook.entry"; type Record = EntryRecord; } impl From> for Entry<'_> { fn from(output: EntryGetRecordOutput<'_>) -> Self { use jacquard_common::IntoStatic; output.value.into_static() } }