Skip to main content

atrium_api/com/atproto/sync/
get_repo_status.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `com.atproto.sync.getRepoStatus` namespace.
3pub const NSID: &str = "com.atproto.sync.getRepoStatus";
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct ParametersData {
7    ///The DID of the repo.
8    pub did: crate::types::string::Did,
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    pub active: bool,
15    pub did: crate::types::string::Did,
16    ///Optional field, the current rev of the repo, if active=true
17    #[serde(skip_serializing_if = "core::option::Option::is_none")]
18    pub rev: core::option::Option<crate::types::string::Tid>,
19    ///If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.
20    #[serde(skip_serializing_if = "core::option::Option::is_none")]
21    pub status: core::option::Option<String>,
22}
23pub type Output = crate::types::Object<OutputData>;
24#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
25#[serde(tag = "error", content = "message")]
26pub enum Error {
27    RepoNotFound(Option<String>),
28}
29impl std::fmt::Display for Error {
30    fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
31        match self {
32            Error::RepoNotFound(msg) => {
33                write!(_f, "RepoNotFound")?;
34                if let Some(msg) = msg {
35                    write!(_f, ": {msg}")?;
36                }
37            }
38        }
39        Ok(())
40    }
41}