1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
* opensearch-client
*
* Rust Client for OpenSearch
*
* The version of the OpenAPI document: 3.1.0
* Contact: alberto.paro@gmail.com
* Generated by Paro OpenAPI Generator
*/
use crate::common;
use serde::{Deserialize, Serialize};
/// RemoteStoreUploadStats
/// Statistics related to uploads to the remote segment store.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RemoteStoreUploadStats {
/// A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and
/// `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
#[serde(
rename = "total_time_spent",
default,
skip_serializing_if = "Option::is_none"
)]
pub total_time_spent: Option<String>,
/// A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and
/// `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
#[serde(
rename = "max_refresh_time_lag",
default,
skip_serializing_if = "Option::is_none"
)]
pub max_refresh_time_lag: Option<String>,
#[serde(rename = "total_time_spent_in_millis")]
pub total_time_spent_in_millis: String,
/// The amount of data, in bytes, uploaded or downloaded to/from the remote segment store.
#[serde(rename = "total_upload_size")]
pub total_upload_size: common::RemoteStoreUploadDownloadStats,
/// Statistics related to segment store upload backpressure.
#[serde(rename = "pressure", default, skip_serializing_if = "Option::is_none")]
pub pressure: Option<common::RemoteStoreUploadPressureStats>,
/// The amount of lag during upload between the remote segment store and the local store.
#[serde(rename = "refresh_size_lag")]
pub refresh_size_lag: common::RemoteStoreUploadRefreshSizeLagStats,
#[serde(rename = "max_refresh_time_lag_in_millis")]
pub max_refresh_time_lag_in_millis: String,
}
impl RemoteStoreUploadStats {
/// Statistics related to uploads to the remote segment store.
pub fn new(
total_time_spent_in_millis: String,
total_upload_size: common::RemoteStoreUploadDownloadStats,
refresh_size_lag: common::RemoteStoreUploadRefreshSizeLagStats,
max_refresh_time_lag_in_millis: String,
) -> RemoteStoreUploadStats {
RemoteStoreUploadStats {
total_time_spent: None,
max_refresh_time_lag: None,
total_time_spent_in_millis,
total_upload_size,
pressure: None,
refresh_size_lag,
max_refresh_time_lag_in_millis,
}
}
}