#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic,
Default
)]
#[serde(rename_all = "camelCase")]
pub struct Channel<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub name: std::option::Option<jacquard_common::CowStr<'a>>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub uri: std::option::Option<jacquard_common::CowStr<'a>>,
}
fn lexicon_doc_chat_firehose_getUserChannels() -> ::jacquard_lexicon::lexicon::LexiconDoc<
'static,
> {
::jacquard_lexicon::lexicon::LexiconDoc {
lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1,
id: ::jacquard_common::CowStr::new_static("chat.firehose.getUserChannels"),
revision: None,
description: None,
defs: {
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("channel"),
::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
description: None,
required: None,
nullable: None,
properties: {
#[allow(unused_mut)]
let mut map = ::alloc::collections::BTreeMap::new();
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"name",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static(
"uri",
),
::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
description: None,
format: None,
default: None,
min_length: None,
max_length: None,
min_graphemes: None,
max_graphemes: None,
r#enum: None,
r#const: None,
known_values: None,
}),
);
map
},
}),
);
map.insert(
::jacquard_common::deps::smol_str::SmolStr::new_static("main"),
::jacquard_lexicon::lexicon::LexUserType::XrpcQuery(::jacquard_lexicon::lexicon::LexXrpcQuery {
description: None,
parameters: None,
output: None,
errors: None,
}),
);
map
},
}
}
impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Channel<'a> {
fn nsid() -> &'static str {
"chat.firehose.getUserChannels"
}
fn def_name() -> &'static str {
"channel"
}
fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
lexicon_doc_chat_firehose_getUserChannels()
}
fn validate(
&self,
) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
Ok(())
}
}
#[jacquard_derive::lexicon]
#[derive(
serde::Serialize,
serde::Deserialize,
Debug,
Clone,
PartialEq,
Eq,
jacquard_derive::IntoStatic,
Default
)]
#[serde(rename_all = "camelCase")]
pub struct GetUserChannelsOutput<'a> {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
#[serde(borrow)]
pub channels: std::option::Option<
Vec<crate::chat_firehose::get_user_channels::Channel<'a>>,
>,
}
#[derive(
Debug,
Clone,
Copy,
PartialEq,
Eq,
serde::Serialize,
serde::Deserialize,
jacquard_derive::IntoStatic
)]
pub struct GetUserChannels;
pub struct GetUserChannelsResponse;
impl jacquard_common::xrpc::XrpcResp for GetUserChannelsResponse {
const NSID: &'static str = "chat.firehose.getUserChannels";
const ENCODING: &'static str = "application/json";
type Output<'de> = GetUserChannelsOutput<'de>;
type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
}
impl jacquard_common::xrpc::XrpcRequest for GetUserChannels {
const NSID: &'static str = "chat.firehose.getUserChannels";
const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
type Response = GetUserChannelsResponse;
}
pub struct GetUserChannelsRequest;
impl jacquard_common::xrpc::XrpcEndpoint for GetUserChannelsRequest {
const PATH: &'static str = "/xrpc/chat.firehose.getUserChannels";
const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
type Request<'de> = GetUserChannels;
type Response = GetUserChannelsResponse;
}