Skip to main content

devops_armory/cloud/gcp/gke/node/
models.rs

1use serde::Deserialize;
2
3#[derive(Deserialize, Default,Debug)]
4pub struct NodeList {
5    pub items: Vec<NodeItems>
6}
7
8#[derive(Deserialize, Default,Debug,Clone)]
9pub struct NodeItems {
10    pub metadata: NodeMetadata
11}
12
13#[derive(Deserialize, Default,Debug, Clone)]
14pub struct NodeMetadata {
15    pub name: String
16}
17
18#[derive(Deserialize, Default,Debug, Clone)]
19pub struct NodePool {
20    pub nodePools: Vec<NodePoolInfo>
21}
22
23#[derive(Deserialize, Default,Debug, Clone)]
24pub struct NodePoolInfo {
25    pub name: String,
26    pub config: NodePoolConfig,
27    pub etag: String
28}
29
30#[derive(Deserialize, Default,Debug, Clone)]
31pub struct NodePoolConfig {
32    pub machineType: String,
33    pub diskSizeGb: i64,
34    pub metadata: NodePoolConfigMetadata,
35    pub imageType: String,
36    pub serviceAccount: String,
37    pub effectiveCgroupMode: String,
38}
39
40#[derive(Deserialize, Default,Debug, Clone)]
41pub struct NodePoolConfigMetadata {
42    #[serde(rename="disable-legacy-endpoints")]
43    pub disable_legacy_endpoint: String
44}