atrium_api/com/atproto/temp/
dereference_scope.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `com.atproto.temp.dereferenceScope` namespace.
3pub const NSID: &str = "com.atproto.temp.dereferenceScope";
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct ParametersData {
7    ///The scope reference (starts with 'ref:')
8    pub scope: String,
9}
10pub type Parameters = crate::types::Object<ParametersData>;
11#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
12#[serde(rename_all = "camelCase")]
13pub struct OutputData {
14    ///The full oauth permission scope
15    pub scope: String,
16}
17pub type Output = crate::types::Object<OutputData>;
18#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
19#[serde(tag = "error", content = "message")]
20pub enum Error {
21    ///An invalid scope reference was provided.
22    InvalidScopeReference(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::InvalidScopeReference(msg) => {
28                write!(_f, "InvalidScopeReference")?;
29                if let Some(msg) = msg {
30                    write!(_f, ": {msg}")?;
31                }
32            }
33        }
34        Ok(())
35    }
36}