Skip to main content

atrium_api/chat/bsky/group/
remove_members.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `chat.bsky.group.removeMembers` namespace.
3pub const NSID: &str = "chat.bsky.group.removeMembers";
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 members: Vec<crate::types::string::Did>,
9}
10pub type Input = crate::types::Object<InputData>;
11#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
12#[serde(rename_all = "camelCase")]
13pub struct OutputData {
14    pub convo: crate::chat::bsky::convo::defs::ConvoView,
15}
16pub type Output = crate::types::Object<OutputData>;
17#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
18#[serde(tag = "error", content = "message")]
19pub enum Error {
20    InvalidConvo(Option<String>),
21    InsufficientRole(Option<String>),
22}
23impl std::fmt::Display for Error {
24    fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
25        match self {
26            Error::InvalidConvo(msg) => {
27                write!(_f, "InvalidConvo")?;
28                if let Some(msg) = msg {
29                    write!(_f, ": {msg}")?;
30                }
31            }
32            Error::InsufficientRole(msg) => {
33                write!(_f, "InsufficientRole")?;
34                if let Some(msg) = msg {
35                    write!(_f, ": {msg}")?;
36                }
37            }
38        }
39        Ok(())
40    }
41}