1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: chat.bsky.convo.sendMessage
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8#[jacquard_derive::lexicon]
9#[derive(
10 serde::Serialize,
11 serde::Deserialize,
12 Debug,
13 Clone,
14 PartialEq,
15 Eq,
16 bon::Builder
17)]
18#[serde(rename_all = "camelCase")]
19#[builder(start_fn = new)]
20pub struct SendMessage<'a> {
21 #[serde(borrow)]
22 #[builder(into)]
23 pub convo_id: jacquard_common::CowStr<'a>,
24 #[serde(borrow)]
25 pub message: crate::chat_bsky::convo::MessageInput<'a>,
26 #[serde(flatten)]
27 #[serde(borrow)]
28 #[builder(default)]
29 pub extra_data: ::std::collections::BTreeMap<
30 ::jacquard_common::smol_str::SmolStr,
31 ::jacquard_common::types::value::Data<'a>,
32 >,
33}
34
35impl jacquard_common::IntoStatic for SendMessage<'_> {
36 type Output = SendMessage<'static>;
37 fn into_static(self) -> Self::Output {
38 SendMessage {
39 convo_id: self.convo_id.into_static(),
40 message: self.message.into_static(),
41 extra_data: self.extra_data.into_static(),
42 }
43 }
44}
45
46#[jacquard_derive::lexicon]
47#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
48#[serde(rename_all = "camelCase")]
49pub struct SendMessageOutput<'a> {
50 #[serde(flatten)]
51 #[serde(borrow)]
52 pub value: crate::chat_bsky::convo::MessageView<'a>,
53}
54
55impl jacquard_common::IntoStatic for SendMessageOutput<'_> {
56 type Output = SendMessageOutput<'static>;
57 fn into_static(self) -> Self::Output {
58 SendMessageOutput {
59 value: self.value.into_static(),
60 extra_data: self.extra_data.into_static(),
61 }
62 }
63}
64
65impl jacquard_common::types::xrpc::XrpcRequest for SendMessage<'_> {
66 const NSID: &'static str = "chat.bsky.convo.sendMessage";
67 const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Procedure(
68 "application/json",
69 );
70 const OUTPUT_ENCODING: &'static str = "application/json";
71 type Output<'de> = SendMessageOutput<'de>;
72 type Err<'de> = jacquard_common::types::xrpc::GenericError<'de>;
73}