atrium_api/chat/bsky/convo/
remove_reaction.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `chat.bsky.convo.removeReaction` namespace.
3pub const NSID: &str = "chat.bsky.convo.removeReaction";
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct InputData {
7    pub convo_id: String,
8    pub message_id: String,
9    pub value: String,
10}
11pub type Input = crate::types::Object<InputData>;
12#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
13#[serde(rename_all = "camelCase")]
14pub struct OutputData {
15    pub message: crate::chat::bsky::convo::defs::MessageView,
16}
17pub type Output = crate::types::Object<OutputData>;
18#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
19#[serde(tag = "error", content = "message")]
20pub enum Error {
21    ///Indicates that the message has been deleted and reactions can no longer be added/removed.
22    ReactionMessageDeleted(Option<String>),
23    ///Indicates the value for the reaction is not acceptable. In general, this means it is not an emoji.
24    ReactionInvalidValue(Option<String>),
25}
26impl std::fmt::Display for Error {
27    fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
28        match self {
29            Error::ReactionMessageDeleted(msg) => {
30                write!(_f, "ReactionMessageDeleted")?;
31                if let Some(msg) = msg {
32                    write!(_f, ": {msg}")?;
33                }
34            }
35            Error::ReactionInvalidValue(msg) => {
36                write!(_f, "ReactionInvalidValue")?;
37                if let Some(msg) = msg {
38                    write!(_f, ": {msg}")?;
39                }
40            }
41        }
42        Ok(())
43    }
44}