// @generated by jacquard-lexicon. DO NOT EDIT. // // Lexicon: chat.bsky.convo.getLog // // 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, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct GetLog<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, } pub mod get_log_state { pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { pub trait Sealed {} } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed {} /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty {} /// Marker types for field names #[allow(non_camel_case_types)] pub mod members {} } /// Builder for constructing an instance of this type pub struct GetLogBuilder<'a, S: get_log_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: (::core::option::Option>,), _phantom: ::core::marker::PhantomData<&'a ()>, } impl<'a> GetLog<'a> { /// Create a new builder for this type pub fn new() -> GetLogBuilder<'a, get_log_state::Empty> { GetLogBuilder::new() } } impl<'a> GetLogBuilder<'a, get_log_state::Empty> { /// Create a new builder with all fields unset pub fn new() -> Self { GetLogBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: (None,), _phantom: ::core::marker::PhantomData, } } } impl<'a, S: get_log_state::State> GetLogBuilder<'a, S> { /// Set the `cursor` field (optional) pub fn cursor( mut self, value: impl Into>>, ) -> Self { self.__unsafe_private_named.0 = value.into(); self } /// Set the `cursor` field to an Option value (optional) pub fn maybe_cursor(mut self, value: Option>) -> Self { self.__unsafe_private_named.0 = value; self } } impl<'a, S> GetLogBuilder<'a, S> where S: get_log_state::State, { /// Build the final struct pub fn build(self) -> GetLog<'a> { GetLog { cursor: self.__unsafe_private_named.0, } } } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct GetLogOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, #[serde(borrow)] pub logs: Vec>, } #[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 GetLogOutputLogsItem<'a> { #[serde(rename = "chat.bsky.convo.defs#logBeginConvo")] LogBeginConvo(Box>), #[serde(rename = "chat.bsky.convo.defs#logAcceptConvo")] LogAcceptConvo(Box>), #[serde(rename = "chat.bsky.convo.defs#logLeaveConvo")] LogLeaveConvo(Box>), #[serde(rename = "chat.bsky.convo.defs#logMuteConvo")] LogMuteConvo(Box>), #[serde(rename = "chat.bsky.convo.defs#logUnmuteConvo")] LogUnmuteConvo(Box>), #[serde(rename = "chat.bsky.convo.defs#logCreateMessage")] LogCreateMessage(Box>), #[serde(rename = "chat.bsky.convo.defs#logDeleteMessage")] LogDeleteMessage(Box>), #[serde(rename = "chat.bsky.convo.defs#logReadMessage")] LogReadMessage(Box>), #[serde(rename = "chat.bsky.convo.defs#logAddReaction")] LogAddReaction(Box>), #[serde(rename = "chat.bsky.convo.defs#logRemoveReaction")] LogRemoveReaction(Box>), } /// Response type for ///chat.bsky.convo.getLog pub struct GetLogResponse; impl jacquard_common::xrpc::XrpcResp for GetLogResponse { const NSID: &'static str = "chat.bsky.convo.getLog"; const ENCODING: &'static str = "application/json"; type Output<'de> = GetLogOutput<'de>; type Err<'de> = jacquard_common::xrpc::GenericError<'de>; } impl<'a> jacquard_common::xrpc::XrpcRequest for GetLog<'a> { const NSID: &'static str = "chat.bsky.convo.getLog"; const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; type Response = GetLogResponse; } /// Endpoint type for ///chat.bsky.convo.getLog pub struct GetLogRequest; impl jacquard_common::xrpc::XrpcEndpoint for GetLogRequest { const PATH: &'static str = "/xrpc/chat.bsky.convo.getLog"; const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; type Request<'de> = GetLog<'de>; type Response = GetLogResponse; }