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
/*
* 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::cluster;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ClusterOperatingSystem {
/// Contains statistics about processor architectures (for example, x86_64 or aarch64) used by selected nodes.
#[serde(
rename = "architectures",
default,
skip_serializing_if = "Option::is_none"
)]
pub architectures: Option<Vec<cluster::stats::ClusterOperatingSystemArchitecture>>,
/// Contains statistics about operating systems used by selected nodes.
#[serde(rename = "pretty_names")]
pub pretty_names: Vec<cluster::stats::ClusterOperatingSystemPrettyName>,
/// Number of processors used to calculate thread pool size across all selected nodes.
/// This number can be set with the processors setting of a node and defaults to the number of processors reported by the operating system.
/// In both cases, this number will never be larger than 32.
#[serde(rename = "allocated_processors")]
pub allocated_processors: u32,
/// Contains statistics about operating systems used by selected nodes.
#[serde(rename = "names")]
pub names: Vec<cluster::stats::ClusterOperatingSystemName>,
/// Number of processors available to JVM across all selected nodes.
#[serde(rename = "available_processors")]
pub available_processors: u32,
#[serde(rename = "mem")]
pub mem: cluster::stats::OperatingSystemMemoryInfo,
}
impl ClusterOperatingSystem {
pub fn new(
pretty_names: Vec<cluster::stats::ClusterOperatingSystemPrettyName>,
allocated_processors: u32,
names: Vec<cluster::stats::ClusterOperatingSystemName>,
available_processors: u32,
mem: cluster::stats::OperatingSystemMemoryInfo,
) -> ClusterOperatingSystem {
ClusterOperatingSystem {
architectures: None,
pretty_names,
allocated_processors,
names,
available_processors,
mem,
}
}
}