aws_sdk_apigatewayv2/operation/update_deployment/
_update_deployment_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateDeploymentOutput {
6    /// <p>Specifies whether a deployment was automatically released.</p>
7    pub auto_deployed: ::std::option::Option<bool>,
8    /// <p>The date and time when the Deployment resource was created.</p>
9    pub created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
10    /// <p>The identifier for the deployment.</p>
11    pub deployment_id: ::std::option::Option<::std::string::String>,
12    /// <p>The status of the deployment: PENDING, FAILED, or SUCCEEDED.</p>
13    pub deployment_status: ::std::option::Option<crate::types::DeploymentStatus>,
14    /// <p>May contain additional feedback on the status of an API deployment.</p>
15    pub deployment_status_message: ::std::option::Option<::std::string::String>,
16    /// <p>The description for the deployment.</p>
17    pub description: ::std::option::Option<::std::string::String>,
18    _request_id: Option<String>,
19}
20impl UpdateDeploymentOutput {
21    /// <p>Specifies whether a deployment was automatically released.</p>
22    pub fn auto_deployed(&self) -> ::std::option::Option<bool> {
23        self.auto_deployed
24    }
25    /// <p>The date and time when the Deployment resource was created.</p>
26    pub fn created_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
27        self.created_date.as_ref()
28    }
29    /// <p>The identifier for the deployment.</p>
30    pub fn deployment_id(&self) -> ::std::option::Option<&str> {
31        self.deployment_id.as_deref()
32    }
33    /// <p>The status of the deployment: PENDING, FAILED, or SUCCEEDED.</p>
34    pub fn deployment_status(&self) -> ::std::option::Option<&crate::types::DeploymentStatus> {
35        self.deployment_status.as_ref()
36    }
37    /// <p>May contain additional feedback on the status of an API deployment.</p>
38    pub fn deployment_status_message(&self) -> ::std::option::Option<&str> {
39        self.deployment_status_message.as_deref()
40    }
41    /// <p>The description for the deployment.</p>
42    pub fn description(&self) -> ::std::option::Option<&str> {
43        self.description.as_deref()
44    }
45}
46impl ::aws_types::request_id::RequestId for UpdateDeploymentOutput {
47    fn request_id(&self) -> Option<&str> {
48        self._request_id.as_deref()
49    }
50}
51impl UpdateDeploymentOutput {
52    /// Creates a new builder-style object to manufacture [`UpdateDeploymentOutput`](crate::operation::update_deployment::UpdateDeploymentOutput).
53    pub fn builder() -> crate::operation::update_deployment::builders::UpdateDeploymentOutputBuilder {
54        crate::operation::update_deployment::builders::UpdateDeploymentOutputBuilder::default()
55    }
56}
57
58/// A builder for [`UpdateDeploymentOutput`](crate::operation::update_deployment::UpdateDeploymentOutput).
59#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
60#[non_exhaustive]
61pub struct UpdateDeploymentOutputBuilder {
62    pub(crate) auto_deployed: ::std::option::Option<bool>,
63    pub(crate) created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
64    pub(crate) deployment_id: ::std::option::Option<::std::string::String>,
65    pub(crate) deployment_status: ::std::option::Option<crate::types::DeploymentStatus>,
66    pub(crate) deployment_status_message: ::std::option::Option<::std::string::String>,
67    pub(crate) description: ::std::option::Option<::std::string::String>,
68    _request_id: Option<String>,
69}
70impl UpdateDeploymentOutputBuilder {
71    /// <p>Specifies whether a deployment was automatically released.</p>
72    pub fn auto_deployed(mut self, input: bool) -> Self {
73        self.auto_deployed = ::std::option::Option::Some(input);
74        self
75    }
76    /// <p>Specifies whether a deployment was automatically released.</p>
77    pub fn set_auto_deployed(mut self, input: ::std::option::Option<bool>) -> Self {
78        self.auto_deployed = input;
79        self
80    }
81    /// <p>Specifies whether a deployment was automatically released.</p>
82    pub fn get_auto_deployed(&self) -> &::std::option::Option<bool> {
83        &self.auto_deployed
84    }
85    /// <p>The date and time when the Deployment resource was created.</p>
86    pub fn created_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
87        self.created_date = ::std::option::Option::Some(input);
88        self
89    }
90    /// <p>The date and time when the Deployment resource was created.</p>
91    pub fn set_created_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
92        self.created_date = input;
93        self
94    }
95    /// <p>The date and time when the Deployment resource was created.</p>
96    pub fn get_created_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
97        &self.created_date
98    }
99    /// <p>The identifier for the deployment.</p>
100    pub fn deployment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
101        self.deployment_id = ::std::option::Option::Some(input.into());
102        self
103    }
104    /// <p>The identifier for the deployment.</p>
105    pub fn set_deployment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
106        self.deployment_id = input;
107        self
108    }
109    /// <p>The identifier for the deployment.</p>
110    pub fn get_deployment_id(&self) -> &::std::option::Option<::std::string::String> {
111        &self.deployment_id
112    }
113    /// <p>The status of the deployment: PENDING, FAILED, or SUCCEEDED.</p>
114    pub fn deployment_status(mut self, input: crate::types::DeploymentStatus) -> Self {
115        self.deployment_status = ::std::option::Option::Some(input);
116        self
117    }
118    /// <p>The status of the deployment: PENDING, FAILED, or SUCCEEDED.</p>
119    pub fn set_deployment_status(mut self, input: ::std::option::Option<crate::types::DeploymentStatus>) -> Self {
120        self.deployment_status = input;
121        self
122    }
123    /// <p>The status of the deployment: PENDING, FAILED, or SUCCEEDED.</p>
124    pub fn get_deployment_status(&self) -> &::std::option::Option<crate::types::DeploymentStatus> {
125        &self.deployment_status
126    }
127    /// <p>May contain additional feedback on the status of an API deployment.</p>
128    pub fn deployment_status_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129        self.deployment_status_message = ::std::option::Option::Some(input.into());
130        self
131    }
132    /// <p>May contain additional feedback on the status of an API deployment.</p>
133    pub fn set_deployment_status_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134        self.deployment_status_message = input;
135        self
136    }
137    /// <p>May contain additional feedback on the status of an API deployment.</p>
138    pub fn get_deployment_status_message(&self) -> &::std::option::Option<::std::string::String> {
139        &self.deployment_status_message
140    }
141    /// <p>The description for the deployment.</p>
142    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143        self.description = ::std::option::Option::Some(input.into());
144        self
145    }
146    /// <p>The description for the deployment.</p>
147    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148        self.description = input;
149        self
150    }
151    /// <p>The description for the deployment.</p>
152    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
153        &self.description
154    }
155    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
156        self._request_id = Some(request_id.into());
157        self
158    }
159
160    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
161        self._request_id = request_id;
162        self
163    }
164    /// Consumes the builder and constructs a [`UpdateDeploymentOutput`](crate::operation::update_deployment::UpdateDeploymentOutput).
165    pub fn build(self) -> crate::operation::update_deployment::UpdateDeploymentOutput {
166        crate::operation::update_deployment::UpdateDeploymentOutput {
167            auto_deployed: self.auto_deployed,
168            created_date: self.created_date,
169            deployment_id: self.deployment_id,
170            deployment_status: self.deployment_status,
171            deployment_status_message: self.deployment_status_message,
172            description: self.description,
173            _request_id: self._request_id,
174        }
175    }
176}