Skip to main content

atrium_api/chat/bsky/moderation/
get_message_context.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `chat.bsky.moderation.getMessageContext` namespace.
3pub const NSID: &str = "chat.bsky.moderation.getMessageContext";
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct ParametersData {
7    ///Number of user messages after the target to include. System messages between the target and the latest returned user message are also included, capped per gap by `maxInterleavedSystemMessages`. If there are no user messages after the target, up to `maxInterleavedSystemMessages` system messages immediately following the target are returned instead.
8    #[serde(skip_serializing_if = "core::option::Option::is_none")]
9    pub after: core::option::Option<i64>,
10    ///Number of user messages before the target to include. System messages between the earliest returned user message and the target are also included, capped per gap by `maxInterleavedSystemMessages`. If there are no user messages before the target, up to `maxInterleavedSystemMessages` system messages immediately preceding the target are returned instead.
11    #[serde(skip_serializing_if = "core::option::Option::is_none")]
12    pub before: core::option::Option<i64>,
13    ///Conversation that the message is from. NOTE: this field will eventually be required.
14    #[serde(skip_serializing_if = "core::option::Option::is_none")]
15    pub convo_id: core::option::Option<String>,
16    ///Maximum number of system messages to include per gap between consecutive returned messages (and per side when there are no user messages on that side). Within a gap, the system messages closest to the earlier message are kept.
17    #[serde(skip_serializing_if = "core::option::Option::is_none")]
18    pub max_interleaved_system_messages: core::option::Option<
19        crate::types::LimitedU16<1000u16>,
20    >,
21    pub message_id: String,
22}
23pub type Parameters = crate::types::Object<ParametersData>;
24#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
25#[serde(rename_all = "camelCase")]
26pub struct OutputData {
27    pub messages: Vec<crate::types::Union<OutputMessagesItem>>,
28}
29pub type Output = crate::types::Object<OutputData>;
30#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
31#[serde(tag = "error", content = "message")]
32pub enum Error {}
33impl std::fmt::Display for Error {
34    fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
35        Ok(())
36    }
37}
38#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
39#[serde(tag = "$type")]
40pub enum OutputMessagesItem {
41    #[serde(rename = "chat.bsky.convo.defs#messageView")]
42    ChatBskyConvoDefsMessageView(Box<crate::chat::bsky::convo::defs::MessageView>),
43    #[serde(rename = "chat.bsky.convo.defs#systemMessageView")]
44    ChatBskyConvoDefsSystemMessageView(
45        Box<crate::chat::bsky::convo::defs::SystemMessageView>,
46    ),
47}