Skip to main content

atrium_api/chat/bsky/group/
edit_group.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `chat.bsky.group.editGroup` namespace.
3pub const NSID: &str = "chat.bsky.group.editGroup";
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 name: String,
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    ConvoLocked(Option<String>),
21    InvalidConvo(Option<String>),
22    InsufficientRole(Option<String>),
23}
24impl std::fmt::Display for Error {
25    fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
26        match self {
27            Error::ConvoLocked(msg) => {
28                write!(_f, "ConvoLocked")?;
29                if let Some(msg) = msg {
30                    write!(_f, ": {msg}")?;
31                }
32            }
33            Error::InvalidConvo(msg) => {
34                write!(_f, "InvalidConvo")?;
35                if let Some(msg) = msg {
36                    write!(_f, ": {msg}")?;
37                }
38            }
39            Error::InsufficientRole(msg) => {
40                write!(_f, "InsufficientRole")?;
41                if let Some(msg) = msg {
42                    write!(_f, ": {msg}")?;
43                }
44            }
45        }
46        Ok(())
47    }
48}