Skip to main content

opensearch_client/indices/
data_stream_stats.rs

1/*
2 * opensearch-client
3 *
4 * Rust Client for OpenSearch
5 *
6 * The version of the OpenAPI document: 3.1.0
7 * Contact: alberto.paro@gmail.com
8 * Generated by Paro OpenAPI Generator
9 */
10
11use serde::{Deserialize, Serialize};
12
13#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14pub struct DataStreamStats {
15    #[serde(rename = "data_stream")]
16    pub data_stream: String,
17    #[serde(rename = "store_size_bytes")]
18    pub store_size_bytes: u32,
19    #[serde(rename = "maximum_timestamp")]
20    pub maximum_timestamp: String,
21    /// Current number of backing indexes for the data stream.
22    #[serde(rename = "backing_indices")]
23    pub backing_indices: u32,
24    #[serde(
25        rename = "store_size",
26        default,
27        skip_serializing_if = "Option::is_none"
28    )]
29    pub store_size: Option<String>,
30}
31
32impl DataStreamStats {
33    pub fn new(
34        data_stream: String,
35        store_size_bytes: u32,
36        maximum_timestamp: String,
37        backing_indices: u32,
38    ) -> DataStreamStats {
39        DataStreamStats {
40            data_stream,
41            store_size_bytes,
42            maximum_timestamp,
43            backing_indices,
44            store_size: None,
45        }
46    }
47}