atrium_api/com/atproto/server/
get_account_invite_codes.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `com.atproto.server.getAccountInviteCodes` namespace.
3pub const NSID: &str = "com.atproto.server.getAccountInviteCodes";
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct ParametersData {
7    ///Controls whether any new 'earned' but not 'created' invites should be created.
8    #[serde(skip_serializing_if = "core::option::Option::is_none")]
9    pub create_available: core::option::Option<bool>,
10    #[serde(skip_serializing_if = "core::option::Option::is_none")]
11    pub include_used: core::option::Option<bool>,
12}
13pub type Parameters = crate::types::Object<ParametersData>;
14#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
15#[serde(rename_all = "camelCase")]
16pub struct OutputData {
17    pub codes: Vec<crate::com::atproto::server::defs::InviteCode>,
18}
19pub type Output = crate::types::Object<OutputData>;
20#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
21#[serde(tag = "error", content = "message")]
22pub enum Error {
23    DuplicateCreate(Option<String>),
24}
25impl std::fmt::Display for Error {
26    fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
27        match self {
28            Error::DuplicateCreate(msg) => {
29                write!(_f, "DuplicateCreate")?;
30                if let Some(msg) = msg {
31                    write!(_f, ": {msg}")?;
32                }
33            }
34        }
35        Ok(())
36    }
37}