// @generated by jacquard-lexicon. DO NOT EDIT. // // Lexicon: network.slices.slice.stats // // 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, bon::Builder )] #[serde(rename_all = "camelCase")] pub struct CollectionStats<'a> { /// Collection NSID #[serde(borrow)] pub collection: jacquard_common::types::string::Nsid<'a>, /// Number of records in this collection pub record_count: i64, /// Number of unique actors with records in this collection pub unique_actors: i64, } #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, bon::Builder, jacquard_derive::IntoStatic )] #[builder(start_fn = new)] #[serde(rename_all = "camelCase")] pub struct Stats<'a> { #[serde(borrow)] #[builder(into)] pub slice: jacquard_common::CowStr<'a>, } #[jacquard_derive::lexicon] #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct StatsOutput<'a> { /// Per-collection statistics #[serde(borrow)] pub collection_stats: Vec>, /// List of collection NSIDs indexed in this slice #[serde(borrow)] pub collections: Vec>, /// Total number of unique actors indexed in this slice pub total_actors: i64, /// Total number of lexicons defined for this slice pub total_lexicons: i64, /// Total number of records indexed in this slice pub total_records: i64, } ///Response type for ///network.slices.slice.stats pub struct StatsResponse; impl jacquard_common::xrpc::XrpcResp for StatsResponse { const NSID: &'static str = "network.slices.slice.stats"; const ENCODING: &'static str = "application/json"; type Output<'de> = StatsOutput<'de>; type Err<'de> = jacquard_common::xrpc::GenericError<'de>; } impl<'a> jacquard_common::xrpc::XrpcRequest for Stats<'a> { const NSID: &'static str = "network.slices.slice.stats"; const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; type Response = StatsResponse; } ///Endpoint type for ///network.slices.slice.stats pub struct StatsRequest; impl jacquard_common::xrpc::XrpcEndpoint for StatsRequest { const PATH: &'static str = "/xrpc/network.slices.slice.stats"; const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; type Request<'de> = Stats<'de>; type Response = StatsResponse; }