pub const NSID: &str = "com.atproto.sync.getHostStatus";
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ParametersData {
pub hostname: String,
}
pub type Parameters = crate::types::Object<ParametersData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct OutputData {
#[serde(skip_serializing_if = "core::option::Option::is_none")]
pub account_count: core::option::Option<i64>,
pub hostname: String,
#[serde(skip_serializing_if = "core::option::Option::is_none")]
pub seq: core::option::Option<i64>,
#[serde(skip_serializing_if = "core::option::Option::is_none")]
pub status: core::option::Option<crate::com::atproto::sync::defs::HostStatus>,
}
pub type Output = crate::types::Object<OutputData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "error", content = "message")]
pub enum Error {
HostNotFound(Option<String>),
}
impl std::fmt::Display for Error {
fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Error::HostNotFound(msg) => {
write!(_f, "HostNotFound")?;
if let Some(msg) = msg {
write!(_f, ": {msg}")?;
}
}
}
Ok(())
}
}