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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Information about an application version deployment.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Deployment {
    /// <p>The version label of the application version in the deployment.</p>
    pub version_label: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the deployment. This number increases by one each time that you deploy source code or change instance configuration settings.</p>
    pub deployment_id: ::std::option::Option<i64>,
    /// <p>The status of the deployment:</p>
    /// <ul>
    /// <li>
    /// <p><code>In Progress</code> : The deployment is in progress.</p></li>
    /// <li>
    /// <p><code>Deployed</code> : The deployment succeeded.</p></li>
    /// <li>
    /// <p><code>Failed</code> : The deployment failed.</p></li>
    /// </ul>
    pub status: ::std::option::Option<::std::string::String>,
    /// <p>For in-progress deployments, the time that the deployment started.</p>
    /// <p>For completed deployments, the time that the deployment ended.</p>
    pub deployment_time: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl Deployment {
    /// <p>The version label of the application version in the deployment.</p>
    pub fn version_label(&self) -> ::std::option::Option<&str> {
        self.version_label.as_deref()
    }
    /// <p>The ID of the deployment. This number increases by one each time that you deploy source code or change instance configuration settings.</p>
    pub fn deployment_id(&self) -> ::std::option::Option<i64> {
        self.deployment_id
    }
    /// <p>The status of the deployment:</p>
    /// <ul>
    /// <li>
    /// <p><code>In Progress</code> : The deployment is in progress.</p></li>
    /// <li>
    /// <p><code>Deployed</code> : The deployment succeeded.</p></li>
    /// <li>
    /// <p><code>Failed</code> : The deployment failed.</p></li>
    /// </ul>
    pub fn status(&self) -> ::std::option::Option<&str> {
        self.status.as_deref()
    }
    /// <p>For in-progress deployments, the time that the deployment started.</p>
    /// <p>For completed deployments, the time that the deployment ended.</p>
    pub fn deployment_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.deployment_time.as_ref()
    }
}
impl Deployment {
    /// Creates a new builder-style object to manufacture [`Deployment`](crate::types::Deployment).
    pub fn builder() -> crate::types::builders::DeploymentBuilder {
        crate::types::builders::DeploymentBuilder::default()
    }
}

/// A builder for [`Deployment`](crate::types::Deployment).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeploymentBuilder {
    pub(crate) version_label: ::std::option::Option<::std::string::String>,
    pub(crate) deployment_id: ::std::option::Option<i64>,
    pub(crate) status: ::std::option::Option<::std::string::String>,
    pub(crate) deployment_time: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl DeploymentBuilder {
    /// <p>The version label of the application version in the deployment.</p>
    pub fn version_label(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.version_label = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The version label of the application version in the deployment.</p>
    pub fn set_version_label(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.version_label = input;
        self
    }
    /// <p>The version label of the application version in the deployment.</p>
    pub fn get_version_label(&self) -> &::std::option::Option<::std::string::String> {
        &self.version_label
    }
    /// <p>The ID of the deployment. This number increases by one each time that you deploy source code or change instance configuration settings.</p>
    pub fn deployment_id(mut self, input: i64) -> Self {
        self.deployment_id = ::std::option::Option::Some(input);
        self
    }
    /// <p>The ID of the deployment. This number increases by one each time that you deploy source code or change instance configuration settings.</p>
    pub fn set_deployment_id(mut self, input: ::std::option::Option<i64>) -> Self {
        self.deployment_id = input;
        self
    }
    /// <p>The ID of the deployment. This number increases by one each time that you deploy source code or change instance configuration settings.</p>
    pub fn get_deployment_id(&self) -> &::std::option::Option<i64> {
        &self.deployment_id
    }
    /// <p>The status of the deployment:</p>
    /// <ul>
    /// <li>
    /// <p><code>In Progress</code> : The deployment is in progress.</p></li>
    /// <li>
    /// <p><code>Deployed</code> : The deployment succeeded.</p></li>
    /// <li>
    /// <p><code>Failed</code> : The deployment failed.</p></li>
    /// </ul>
    pub fn status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.status = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The status of the deployment:</p>
    /// <ul>
    /// <li>
    /// <p><code>In Progress</code> : The deployment is in progress.</p></li>
    /// <li>
    /// <p><code>Deployed</code> : The deployment succeeded.</p></li>
    /// <li>
    /// <p><code>Failed</code> : The deployment failed.</p></li>
    /// </ul>
    pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status = input;
        self
    }
    /// <p>The status of the deployment:</p>
    /// <ul>
    /// <li>
    /// <p><code>In Progress</code> : The deployment is in progress.</p></li>
    /// <li>
    /// <p><code>Deployed</code> : The deployment succeeded.</p></li>
    /// <li>
    /// <p><code>Failed</code> : The deployment failed.</p></li>
    /// </ul>
    pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
        &self.status
    }
    /// <p>For in-progress deployments, the time that the deployment started.</p>
    /// <p>For completed deployments, the time that the deployment ended.</p>
    pub fn deployment_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.deployment_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>For in-progress deployments, the time that the deployment started.</p>
    /// <p>For completed deployments, the time that the deployment ended.</p>
    pub fn set_deployment_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.deployment_time = input;
        self
    }
    /// <p>For in-progress deployments, the time that the deployment started.</p>
    /// <p>For completed deployments, the time that the deployment ended.</p>
    pub fn get_deployment_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.deployment_time
    }
    /// Consumes the builder and constructs a [`Deployment`](crate::types::Deployment).
    pub fn build(self) -> crate::types::Deployment {
        crate::types::Deployment {
            version_label: self.version_label,
            deployment_id: self.deployment_id,
            status: self.status,
            deployment_time: self.deployment_time,
        }
    }
}