aws_sdk_codedeploy/operation/stop_deployment/
_stop_deployment_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents the output of a <code>StopDeployment</code> operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct StopDeploymentOutput {
7    /// <p>The status of the stop deployment operation:</p>
8    /// <ul>
9    /// <li>
10    /// <p>Pending: The stop operation is pending.</p></li>
11    /// <li>
12    /// <p>Succeeded: The stop operation was successful.</p></li>
13    /// </ul>
14    pub status: ::std::option::Option<crate::types::StopStatus>,
15    /// <p>An accompanying status message.</p>
16    pub status_message: ::std::option::Option<::std::string::String>,
17    _request_id: Option<String>,
18}
19impl StopDeploymentOutput {
20    /// <p>The status of the stop deployment operation:</p>
21    /// <ul>
22    /// <li>
23    /// <p>Pending: The stop operation is pending.</p></li>
24    /// <li>
25    /// <p>Succeeded: The stop operation was successful.</p></li>
26    /// </ul>
27    pub fn status(&self) -> ::std::option::Option<&crate::types::StopStatus> {
28        self.status.as_ref()
29    }
30    /// <p>An accompanying status message.</p>
31    pub fn status_message(&self) -> ::std::option::Option<&str> {
32        self.status_message.as_deref()
33    }
34}
35impl ::aws_types::request_id::RequestId for StopDeploymentOutput {
36    fn request_id(&self) -> Option<&str> {
37        self._request_id.as_deref()
38    }
39}
40impl StopDeploymentOutput {
41    /// Creates a new builder-style object to manufacture [`StopDeploymentOutput`](crate::operation::stop_deployment::StopDeploymentOutput).
42    pub fn builder() -> crate::operation::stop_deployment::builders::StopDeploymentOutputBuilder {
43        crate::operation::stop_deployment::builders::StopDeploymentOutputBuilder::default()
44    }
45}
46
47/// A builder for [`StopDeploymentOutput`](crate::operation::stop_deployment::StopDeploymentOutput).
48#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
49#[non_exhaustive]
50pub struct StopDeploymentOutputBuilder {
51    pub(crate) status: ::std::option::Option<crate::types::StopStatus>,
52    pub(crate) status_message: ::std::option::Option<::std::string::String>,
53    _request_id: Option<String>,
54}
55impl StopDeploymentOutputBuilder {
56    /// <p>The status of the stop deployment operation:</p>
57    /// <ul>
58    /// <li>
59    /// <p>Pending: The stop operation is pending.</p></li>
60    /// <li>
61    /// <p>Succeeded: The stop operation was successful.</p></li>
62    /// </ul>
63    pub fn status(mut self, input: crate::types::StopStatus) -> Self {
64        self.status = ::std::option::Option::Some(input);
65        self
66    }
67    /// <p>The status of the stop deployment operation:</p>
68    /// <ul>
69    /// <li>
70    /// <p>Pending: The stop operation is pending.</p></li>
71    /// <li>
72    /// <p>Succeeded: The stop operation was successful.</p></li>
73    /// </ul>
74    pub fn set_status(mut self, input: ::std::option::Option<crate::types::StopStatus>) -> Self {
75        self.status = input;
76        self
77    }
78    /// <p>The status of the stop deployment operation:</p>
79    /// <ul>
80    /// <li>
81    /// <p>Pending: The stop operation is pending.</p></li>
82    /// <li>
83    /// <p>Succeeded: The stop operation was successful.</p></li>
84    /// </ul>
85    pub fn get_status(&self) -> &::std::option::Option<crate::types::StopStatus> {
86        &self.status
87    }
88    /// <p>An accompanying status message.</p>
89    pub fn status_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90        self.status_message = ::std::option::Option::Some(input.into());
91        self
92    }
93    /// <p>An accompanying status message.</p>
94    pub fn set_status_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95        self.status_message = input;
96        self
97    }
98    /// <p>An accompanying status message.</p>
99    pub fn get_status_message(&self) -> &::std::option::Option<::std::string::String> {
100        &self.status_message
101    }
102    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
103        self._request_id = Some(request_id.into());
104        self
105    }
106
107    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
108        self._request_id = request_id;
109        self
110    }
111    /// Consumes the builder and constructs a [`StopDeploymentOutput`](crate::operation::stop_deployment::StopDeploymentOutput).
112    pub fn build(self) -> crate::operation::stop_deployment::StopDeploymentOutput {
113        crate::operation::stop_deployment::StopDeploymentOutput {
114            status: self.status,
115            status_message: self.status_message,
116            _request_id: self._request_id,
117        }
118    }
119}