atrium_api/com/atproto/sync/
list_blobs.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `com.atproto.sync.listBlobs` namespace.
3pub const NSID: &str = "com.atproto.sync.listBlobs";
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct ParametersData {
7    #[serde(skip_serializing_if = "core::option::Option::is_none")]
8    pub cursor: core::option::Option<String>,
9    ///The DID of the repo.
10    pub did: crate::types::string::Did,
11    #[serde(skip_serializing_if = "core::option::Option::is_none")]
12    pub limit: core::option::Option<crate::types::LimitedNonZeroU16<1000u16>>,
13    ///Optional revision of the repo to list blobs since.
14    #[serde(skip_serializing_if = "core::option::Option::is_none")]
15    pub since: core::option::Option<crate::types::string::Tid>,
16}
17pub type Parameters = crate::types::Object<ParametersData>;
18#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
19#[serde(rename_all = "camelCase")]
20pub struct OutputData {
21    pub cids: Vec<crate::types::string::Cid>,
22    #[serde(skip_serializing_if = "core::option::Option::is_none")]
23    pub cursor: core::option::Option<String>,
24}
25pub type Output = crate::types::Object<OutputData>;
26#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
27#[serde(tag = "error", content = "message")]
28pub enum Error {
29    RepoNotFound(Option<String>),
30    RepoTakendown(Option<String>),
31    RepoSuspended(Option<String>),
32    RepoDeactivated(Option<String>),
33}
34impl std::fmt::Display for Error {
35    fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
36        match self {
37            Error::RepoNotFound(msg) => {
38                write!(_f, "RepoNotFound")?;
39                if let Some(msg) = msg {
40                    write!(_f, ": {msg}")?;
41                }
42            }
43            Error::RepoTakendown(msg) => {
44                write!(_f, "RepoTakendown")?;
45                if let Some(msg) = msg {
46                    write!(_f, ": {msg}")?;
47                }
48            }
49            Error::RepoSuspended(msg) => {
50                write!(_f, "RepoSuspended")?;
51                if let Some(msg) = msg {
52                    write!(_f, ": {msg}")?;
53                }
54            }
55            Error::RepoDeactivated(msg) => {
56                write!(_f, "RepoDeactivated")?;
57                if let Some(msg) = msg {
58                    write!(_f, ": {msg}")?;
59                }
60            }
61        }
62        Ok(())
63    }
64}