Skip to main content

atrium_api/chat/bsky/group/
disable_join_link.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `chat.bsky.group.disableJoinLink` namespace.
3pub const NSID: &str = "chat.bsky.group.disableJoinLink";
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct InputData {
7    pub convo_id: String,
8}
9pub type Input = crate::types::Object<InputData>;
10#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
11#[serde(rename_all = "camelCase")]
12pub struct OutputData {
13    pub join_link: crate::chat::bsky::group::defs::JoinLinkView,
14}
15pub type Output = crate::types::Object<OutputData>;
16#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
17#[serde(tag = "error", content = "message")]
18pub enum Error {
19    InvalidConvo(Option<String>),
20    InsufficientRole(Option<String>),
21    NoJoinLink(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            Error::NoJoinLink(msg) => {
39                write!(_f, "NoJoinLink")?;
40                if let Some(msg) = msg {
41                    write!(_f, ": {msg}")?;
42                }
43            }
44        }
45        Ok(())
46    }
47}