// @generated by jacquard-lexicon. DO NOT EDIT. // // Lexicon: buzz.bookhive.getBook // // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, bon::Builder, jacquard_derive::IntoStatic )] #[builder(start_fn = new)] #[serde(rename_all = "camelCase")] pub struct GetBook<'a> { #[serde(borrow)] #[builder(into)] pub id: jacquard_common::CowStr<'a>, } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct GetBookOutput<'a> { ///The hive book's info #[serde(borrow)] pub book: jacquard_common::types::value::Data<'a>, ///Comments on the book #[serde(borrow)] pub comments: Vec>, ///Cover image of the book #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cover: std::option::Option>, #[serde(skip_serializing_if = "std::option::Option::is_none")] pub created_at: std::option::Option, ///The date the user finished reading the book #[serde(skip_serializing_if = "std::option::Option::is_none")] pub finished_at: std::option::Option, ///The book's review #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub review: std::option::Option>, ///Reviews of the book #[serde(borrow)] pub reviews: Vec>, ///Number of stars given to the book (1-10) which will be mapped to 1-5 stars #[serde(skip_serializing_if = "std::option::Option::is_none")] pub stars: std::option::Option, ///The date the user started reading the book #[serde(skip_serializing_if = "std::option::Option::is_none")] pub started_at: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub status: std::option::Option>, } ///Response type for ///buzz.bookhive.getBook pub struct GetBookResponse; impl jacquard_common::xrpc::XrpcResp for GetBookResponse { const NSID: &'static str = "buzz.bookhive.getBook"; const ENCODING: &'static str = "application/json"; type Output<'de> = GetBookOutput<'de>; type Err<'de> = jacquard_common::xrpc::GenericError<'de>; } impl<'de> jacquard_common::xrpc::XrpcRequest<'de> for GetBook<'de> { const NSID: &'static str = "buzz.bookhive.getBook"; const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; type Response = GetBookResponse; }