atrium_api/com/atproto/sync/
list_hosts.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `com.atproto.sync.listHosts` namespace.
3pub const NSID: &str = "com.atproto.sync.listHosts";
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    #[serde(skip_serializing_if = "core::option::Option::is_none")]
10    pub limit: core::option::Option<crate::types::LimitedNonZeroU16<1000u16>>,
11}
12pub type Parameters = crate::types::Object<ParametersData>;
13#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
14#[serde(rename_all = "camelCase")]
15pub struct OutputData {
16    #[serde(skip_serializing_if = "core::option::Option::is_none")]
17    pub cursor: core::option::Option<String>,
18    ///Sort order is not formally specified. Recommended order is by time host was first seen by the server, with oldest first.
19    pub hosts: Vec<Host>,
20}
21pub type Output = crate::types::Object<OutputData>;
22#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
23#[serde(tag = "error", content = "message")]
24pub enum Error {}
25impl std::fmt::Display for Error {
26    fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
27        Ok(())
28    }
29}
30#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
31#[serde(rename_all = "camelCase")]
32pub struct HostData {
33    #[serde(skip_serializing_if = "core::option::Option::is_none")]
34    pub account_count: core::option::Option<i64>,
35    ///hostname of server; not a URL (no scheme)
36    pub hostname: String,
37    ///Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor).
38    #[serde(skip_serializing_if = "core::option::Option::is_none")]
39    pub seq: core::option::Option<i64>,
40    #[serde(skip_serializing_if = "core::option::Option::is_none")]
41    pub status: core::option::Option<crate::com::atproto::sync::defs::HostStatus>,
42}
43pub type Host = crate::types::Object<HostData>;