opensearch_client/indices/
data_streams_stats_response.rs1use crate::common;
12use crate::indices;
13use serde::{Deserialize, Serialize};
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct DataStreamsStatsResponse {
17 #[serde(rename = "_shards")]
18 pub shards: common::ShardStatistics,
19 #[serde(rename = "backing_indices")]
21 pub backing_indices: u32,
22 #[serde(rename = "data_stream_count")]
24 pub data_stream_count: u32,
25 #[serde(rename = "data_streams")]
27 pub data_streams: Vec<indices::DataStreamStats>,
28 #[serde(
29 rename = "total_store_size",
30 default,
31 skip_serializing_if = "Option::is_none"
32 )]
33 pub total_store_size: Option<String>,
34 #[serde(rename = "total_store_size_bytes")]
35 pub total_store_size_bytes: u32,
36}
37
38impl DataStreamsStatsResponse {
39 pub fn new(
40 shards: common::ShardStatistics,
41 backing_indices: u32,
42 data_stream_count: u32,
43 data_streams: Vec<indices::DataStreamStats>,
44 total_store_size_bytes: u32,
45 ) -> DataStreamsStatsResponse {
46 DataStreamsStatsResponse {
47 shards,
48 backing_indices,
49 data_stream_count,
50 data_streams,
51 total_store_size: None,
52 total_store_size_bytes,
53 }
54 }
55}