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
/*
 * Nomad
 *
 * Nomad OpenApi specification
 *
 * The version of the OpenAPI document: 0.11.0
 * 
 * Generated by: https://openapi-generator.tech
 */




#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct DeploymentState {
    #[serde(rename = "PlacedCanaries", skip_serializing_if = "Option::is_none")]
    pub placed_canaries: Option<Vec<String>>,
    #[serde(rename = "AutoRevert", skip_serializing_if = "Option::is_none")]
    pub auto_revert: Option<bool>,
    #[serde(rename = "ProgressDeadline", skip_serializing_if = "Option::is_none")]
    pub progress_deadline: Option<i64>,
    #[serde(rename = "RequireProgressBy", skip_serializing_if = "Option::is_none")]
    pub require_progress_by: Option<String>,
    #[serde(rename = "Promoted", skip_serializing_if = "Option::is_none")]
    pub promoted: Option<bool>,
    #[serde(rename = "DesiredCanaries", skip_serializing_if = "Option::is_none")]
    pub desired_canaries: Option<i32>,
    #[serde(rename = "DesiredTotal", skip_serializing_if = "Option::is_none")]
    pub desired_total: Option<i32>,
    #[serde(rename = "PlacedAllocs", skip_serializing_if = "Option::is_none")]
    pub placed_allocs: Option<i32>,
    #[serde(rename = "HealthyAllocs", skip_serializing_if = "Option::is_none")]
    pub healthy_allocs: Option<i32>,
    #[serde(rename = "UnhealthyAllocs", skip_serializing_if = "Option::is_none")]
    pub unhealthy_allocs: Option<i32>,
}

impl DeploymentState {
    pub fn new() -> DeploymentState {
        DeploymentState {
            placed_canaries: None,
            auto_revert: None,
            progress_deadline: None,
            require_progress_by: None,
            promoted: None,
            desired_canaries: None,
            desired_total: None,
            placed_allocs: None,
            healthy_allocs: None,
            unhealthy_allocs: None,
        }
    }
}