aws_sdk_elasticbeanstalk/types/_deployment.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Information about an application version deployment.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct Deployment {
7 /// <p>The version label of the application version in the deployment.</p>
8 pub version_label: ::std::option::Option<::std::string::String>,
9 /// <p>The ID of the deployment. This number increases by one each time that you deploy source code or change instance configuration settings.</p>
10 pub deployment_id: ::std::option::Option<i64>,
11 /// <p>The status of the deployment:</p>
12 /// <ul>
13 /// <li>
14 /// <p><code>In Progress</code> : The deployment is in progress.</p></li>
15 /// <li>
16 /// <p><code>Deployed</code> : The deployment succeeded.</p></li>
17 /// <li>
18 /// <p><code>Failed</code> : The deployment failed.</p></li>
19 /// </ul>
20 pub status: ::std::option::Option<::std::string::String>,
21 /// <p>For in-progress deployments, the time that the deployment started.</p>
22 /// <p>For completed deployments, the time that the deployment ended.</p>
23 pub deployment_time: ::std::option::Option<::aws_smithy_types::DateTime>,
24}
25impl Deployment {
26 /// <p>The version label of the application version in the deployment.</p>
27 pub fn version_label(&self) -> ::std::option::Option<&str> {
28 self.version_label.as_deref()
29 }
30 /// <p>The ID of the deployment. This number increases by one each time that you deploy source code or change instance configuration settings.</p>
31 pub fn deployment_id(&self) -> ::std::option::Option<i64> {
32 self.deployment_id
33 }
34 /// <p>The status of the deployment:</p>
35 /// <ul>
36 /// <li>
37 /// <p><code>In Progress</code> : The deployment is in progress.</p></li>
38 /// <li>
39 /// <p><code>Deployed</code> : The deployment succeeded.</p></li>
40 /// <li>
41 /// <p><code>Failed</code> : The deployment failed.</p></li>
42 /// </ul>
43 pub fn status(&self) -> ::std::option::Option<&str> {
44 self.status.as_deref()
45 }
46 /// <p>For in-progress deployments, the time that the deployment started.</p>
47 /// <p>For completed deployments, the time that the deployment ended.</p>
48 pub fn deployment_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
49 self.deployment_time.as_ref()
50 }
51}
52impl Deployment {
53 /// Creates a new builder-style object to manufacture [`Deployment`](crate::types::Deployment).
54 pub fn builder() -> crate::types::builders::DeploymentBuilder {
55 crate::types::builders::DeploymentBuilder::default()
56 }
57}
58
59/// A builder for [`Deployment`](crate::types::Deployment).
60#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
61#[non_exhaustive]
62pub struct DeploymentBuilder {
63 pub(crate) version_label: ::std::option::Option<::std::string::String>,
64 pub(crate) deployment_id: ::std::option::Option<i64>,
65 pub(crate) status: ::std::option::Option<::std::string::String>,
66 pub(crate) deployment_time: ::std::option::Option<::aws_smithy_types::DateTime>,
67}
68impl DeploymentBuilder {
69 /// <p>The version label of the application version in the deployment.</p>
70 pub fn version_label(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
71 self.version_label = ::std::option::Option::Some(input.into());
72 self
73 }
74 /// <p>The version label of the application version in the deployment.</p>
75 pub fn set_version_label(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
76 self.version_label = input;
77 self
78 }
79 /// <p>The version label of the application version in the deployment.</p>
80 pub fn get_version_label(&self) -> &::std::option::Option<::std::string::String> {
81 &self.version_label
82 }
83 /// <p>The ID of the deployment. This number increases by one each time that you deploy source code or change instance configuration settings.</p>
84 pub fn deployment_id(mut self, input: i64) -> Self {
85 self.deployment_id = ::std::option::Option::Some(input);
86 self
87 }
88 /// <p>The ID of the deployment. This number increases by one each time that you deploy source code or change instance configuration settings.</p>
89 pub fn set_deployment_id(mut self, input: ::std::option::Option<i64>) -> Self {
90 self.deployment_id = input;
91 self
92 }
93 /// <p>The ID of the deployment. This number increases by one each time that you deploy source code or change instance configuration settings.</p>
94 pub fn get_deployment_id(&self) -> &::std::option::Option<i64> {
95 &self.deployment_id
96 }
97 /// <p>The status of the deployment:</p>
98 /// <ul>
99 /// <li>
100 /// <p><code>In Progress</code> : The deployment is in progress.</p></li>
101 /// <li>
102 /// <p><code>Deployed</code> : The deployment succeeded.</p></li>
103 /// <li>
104 /// <p><code>Failed</code> : The deployment failed.</p></li>
105 /// </ul>
106 pub fn status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
107 self.status = ::std::option::Option::Some(input.into());
108 self
109 }
110 /// <p>The status of the deployment:</p>
111 /// <ul>
112 /// <li>
113 /// <p><code>In Progress</code> : The deployment is in progress.</p></li>
114 /// <li>
115 /// <p><code>Deployed</code> : The deployment succeeded.</p></li>
116 /// <li>
117 /// <p><code>Failed</code> : The deployment failed.</p></li>
118 /// </ul>
119 pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120 self.status = input;
121 self
122 }
123 /// <p>The status of the deployment:</p>
124 /// <ul>
125 /// <li>
126 /// <p><code>In Progress</code> : The deployment is in progress.</p></li>
127 /// <li>
128 /// <p><code>Deployed</code> : The deployment succeeded.</p></li>
129 /// <li>
130 /// <p><code>Failed</code> : The deployment failed.</p></li>
131 /// </ul>
132 pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
133 &self.status
134 }
135 /// <p>For in-progress deployments, the time that the deployment started.</p>
136 /// <p>For completed deployments, the time that the deployment ended.</p>
137 pub fn deployment_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
138 self.deployment_time = ::std::option::Option::Some(input);
139 self
140 }
141 /// <p>For in-progress deployments, the time that the deployment started.</p>
142 /// <p>For completed deployments, the time that the deployment ended.</p>
143 pub fn set_deployment_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
144 self.deployment_time = input;
145 self
146 }
147 /// <p>For in-progress deployments, the time that the deployment started.</p>
148 /// <p>For completed deployments, the time that the deployment ended.</p>
149 pub fn get_deployment_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
150 &self.deployment_time
151 }
152 /// Consumes the builder and constructs a [`Deployment`](crate::types::Deployment).
153 pub fn build(self) -> crate::types::Deployment {
154 crate::types::Deployment {
155 version_label: self.version_label,
156 deployment_id: self.deployment_id,
157 status: self.status,
158 deployment_time: self.deployment_time,
159 }
160 }
161}