atrium_api/com/atproto/server/
create_app_password.rs1pub const NSID: &str = "com.atproto.server.createAppPassword";
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct InputData {
7 pub name: String,
9 #[serde(skip_serializing_if = "core::option::Option::is_none")]
11 pub privileged: core::option::Option<bool>,
12}
13pub type Input = crate::types::Object<InputData>;
14pub type Output = AppPassword;
15#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
16#[serde(tag = "error", content = "message")]
17pub enum Error {
18 AccountTakedown(Option<String>),
19}
20impl std::fmt::Display for Error {
21 fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
22 match self {
23 Error::AccountTakedown(msg) => {
24 write!(_f, "AccountTakedown")?;
25 if let Some(msg) = msg {
26 write!(_f, ": {msg}")?;
27 }
28 }
29 }
30 Ok(())
31 }
32}
33#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
34#[serde(rename_all = "camelCase")]
35pub struct AppPasswordData {
36 pub created_at: crate::types::string::Datetime,
37 pub name: String,
38 pub password: String,
39 #[serde(skip_serializing_if = "core::option::Option::is_none")]
40 pub privileged: core::option::Option<bool>,
41}
42pub type AppPassword = crate::types::Object<AppPasswordData>;