// @generated by jacquard-lexicon. DO NOT EDIT. // // Lexicon: com.atproto.sync.listHosts // // This file was automatically generated from Lexicon schemas. // Any manual changes will be overwritten on the next regeneration. #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct Host<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] pub account_count: std::option::Option, ///hostname of server; not a URL (no scheme) #[serde(borrow)] pub hostname: jacquard_common::CowStr<'a>, ///Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor). #[serde(skip_serializing_if = "std::option::Option::is_none")] pub seq: std::option::Option, #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub status: std::option::Option>, } #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, bon::Builder, jacquard_derive::IntoStatic )] #[builder(start_fn = new)] #[serde(rename_all = "camelCase")] pub struct ListHosts<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] #[builder(into)] pub cursor: std::option::Option>, ///(default: 200, min: 1, max: 1000) #[serde(skip_serializing_if = "std::option::Option::is_none")] pub limit: std::option::Option, } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct ListHostsOutput<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub cursor: std::option::Option>, ///Sort order is not formally specified. Recommended order is by time host was first seen by the server, with oldest first. #[serde(borrow)] pub hosts: Vec>, } ///Response type for ///com.atproto.sync.listHosts pub struct ListHostsResponse; impl jacquard_common::xrpc::XrpcResp for ListHostsResponse { const NSID: &'static str = "com.atproto.sync.listHosts"; const ENCODING: &'static str = "application/json"; type Output<'de> = ListHostsOutput<'de>; type Err<'de> = jacquard_common::xrpc::GenericError<'de>; } impl<'a> jacquard_common::xrpc::XrpcRequest for ListHosts<'a> { const NSID: &'static str = "com.atproto.sync.listHosts"; const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; type Response = ListHostsResponse; } ///Endpoint type for ///com.atproto.sync.listHosts pub struct ListHostsRequest; impl jacquard_common::xrpc::XrpcEndpoint for ListHostsRequest { const PATH: &'static str = "/xrpc/com.atproto.sync.listHosts"; const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; type Request<'de> = ListHosts<'de>; type Response = ListHostsResponse; }