jacquard_api/place_stream/chat/
message.rs

1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: place.stream.chat.message
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8///Record containing a Streamplace chat message.
9#[jacquard_derive::lexicon]
10#[derive(
11    serde::Serialize,
12    serde::Deserialize,
13    Debug,
14    Clone,
15    PartialEq,
16    Eq,
17    jacquard_derive::IntoStatic
18)]
19#[serde(rename_all = "camelCase")]
20pub struct Message<'a> {
21    ///Client-declared timestamp when this message was originally created.
22    pub created_at: jacquard_common::types::string::Datetime,
23    ///Annotations of text (mentions, URLs, etc)
24    #[serde(skip_serializing_if = "std::option::Option::is_none")]
25    #[serde(borrow)]
26    pub facets: std::option::Option<
27        Vec<crate::place_stream::richtext::facet::Facet<'a>>,
28    >,
29    #[serde(skip_serializing_if = "std::option::Option::is_none")]
30    #[serde(borrow)]
31    pub reply: std::option::Option<crate::place_stream::chat::message::ReplyRef<'a>>,
32    ///The DID of the streamer whose chat this is.
33    #[serde(borrow)]
34    pub streamer: jacquard_common::types::string::Did<'a>,
35    ///The primary message content. May be an empty string, if there are embeds.
36    #[serde(borrow)]
37    pub text: jacquard_common::CowStr<'a>,
38}
39
40impl jacquard_common::types::collection::Collection for Message<'_> {
41    const NSID: &'static str = "place.stream.chat.message";
42}
43
44#[jacquard_derive::lexicon]
45#[derive(
46    serde::Serialize,
47    serde::Deserialize,
48    Debug,
49    Clone,
50    PartialEq,
51    Eq,
52    jacquard_derive::IntoStatic
53)]
54#[serde(rename_all = "camelCase")]
55pub struct ReplyRef<'a> {
56    #[serde(borrow)]
57    pub parent: crate::com_atproto::repo::strong_ref::StrongRef<'a>,
58    #[serde(borrow)]
59    pub root: crate::com_atproto::repo::strong_ref::StrongRef<'a>,
60}