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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/*
* Proxmox Virtual Environment API
*
* Generated from apidoc.js. NOT an official Proxmox specification. See https://pve.proxmox.com/pve-docs/api-viewer/ for the upstream documentation.
*
* The version of the OpenAPI document: 9.x
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ClusterGetStatusResponseDataInner {
#[serde(rename = "id")]
pub id: String,
/// [node] IP of the resolved nodename.
#[serde(rename = "ip", skip_serializing_if = "Option::is_none")]
pub ip: Option<String>,
/// [node] Proxmox VE Subscription level, indicates if eligible for enterprise support as well as access to the stable Proxmox VE Enterprise Repository.
#[serde(rename = "level", skip_serializing_if = "Option::is_none")]
pub level: Option<String>,
/// [node] Indicates if this is the responding node.
#[serde(rename = "local", skip_serializing_if = "Option::is_none")]
pub local: Option<models::PveBoolean>,
#[serde(rename = "name")]
pub name: String,
/// [node] ID of the node from the corosync configuration.
#[serde(rename = "nodeid", skip_serializing_if = "Option::is_none")]
pub nodeid: Option<i64>,
/// [cluster] Nodes count, including offline nodes.
#[serde(rename = "nodes", skip_serializing_if = "Option::is_none")]
pub nodes: Option<i64>,
/// [node] Indicates if the node is online or offline.
#[serde(rename = "online", skip_serializing_if = "Option::is_none")]
pub online: Option<models::PveBoolean>,
/// [cluster] Indicates if there is a majority of nodes online to make decisions
#[serde(rename = "quorate", skip_serializing_if = "Option::is_none")]
pub quorate: Option<models::PveBoolean>,
/// Indicates the type, either cluster or node. The type defines the object properties e.g. quorate available for type cluster.
#[serde(rename = "type")]
pub r#type: models::PveClusterTypeEnum3,
/// [cluster] Current version of the corosync configuration file.
#[serde(rename = "version", skip_serializing_if = "Option::is_none")]
pub version: Option<i64>,
}
impl ClusterGetStatusResponseDataInner {
pub fn new(id: String, name: String, r#type: models::PveClusterTypeEnum3) -> ClusterGetStatusResponseDataInner {
ClusterGetStatusResponseDataInner {
id,
ip: None,
level: None,
local: None,
name,
nodeid: None,
nodes: None,
online: None,
quorate: None,
r#type,
version: None,
}
}
}