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
use serde::{Deserialize, Serialize}; /*
* Compute Engine API
*
* Creates and runs virtual machines on Google Cloud Platform.
*
* The version of the OpenAPI document: v1
*
* Generated by: https://openapi-generator.tech
*/
use crate::google_rest_apis::compute_v1::models;
/// Zone : Represents a Zone resource. A zone is a deployment area. These deployment areas are subsets of a region. For example the zone us-east1-a is located in the us-east1 region. For more information, read Regions and Zones.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Zone {
/// [Output Only] Available cpu/platform selections for the zone.
#[serde(
rename = "availableCpuPlatforms",
skip_serializing_if = "Option::is_none"
)]
pub available_cpu_platforms: Option<Vec<String>>,
/// [Output Only] Creation timestamp in RFC3339 text format.
#[serde(rename = "creationTimestamp", skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "deprecated", skip_serializing_if = "Option::is_none")]
pub deprecated: Option<Box<models::DeprecationStatus>>,
/// [Output Only] Textual description of the resource.
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
/// [Output Only] The unique identifier for the resource. This identifier is defined by the server.
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
/// [Output Only] Type of the resource. Always compute#zone for zones.
#[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
pub kind: Option<String>,
/// [Output Only] Name of the resource.
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// [Output Only] Full URL reference to the region which hosts the zone.
#[serde(rename = "region", skip_serializing_if = "Option::is_none")]
pub region: Option<String>,
/// [Output Only] Server-defined URL for the resource.
#[serde(rename = "selfLink", skip_serializing_if = "Option::is_none")]
pub self_link: Option<String>,
/// [Output Only] Status of the zone, either UP or DOWN.
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
pub status: Option<Status>,
/// [Output Only] Reserved for future use.
#[serde(rename = "supportsPzs", skip_serializing_if = "Option::is_none")]
pub supports_pzs: Option<bool>,
}
impl Zone {
/// Represents a Zone resource. A zone is a deployment area. These deployment areas are subsets of a region. For example the zone us-east1-a is located in the us-east1 region. For more information, read Regions and Zones.
pub fn new() -> Zone {
Zone {
available_cpu_platforms: None,
creation_timestamp: None,
deprecated: None,
description: None,
id: None,
kind: None,
name: None,
region: None,
self_link: None,
status: None,
supports_pzs: None,
}
}
}
/// [Output Only] Status of the zone, either UP or DOWN.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
#[serde(rename = "DOWN")]
Down,
#[serde(rename = "UP")]
Up,
}
impl Default for Status {
fn default() -> Status {
Self::Down
}
}