aws_sdk_codedeploy/operation/stop_deployment/
_stop_deployment_output.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct StopDeploymentOutput {
7 pub status: ::std::option::Option<crate::types::StopStatus>,
15 pub status_message: ::std::option::Option<::std::string::String>,
17 _request_id: Option<String>,
18}
19impl StopDeploymentOutput {
20 pub fn status(&self) -> ::std::option::Option<&crate::types::StopStatus> {
28 self.status.as_ref()
29 }
30 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 pub fn builder() -> crate::operation::stop_deployment::builders::StopDeploymentOutputBuilder {
43 crate::operation::stop_deployment::builders::StopDeploymentOutputBuilder::default()
44 }
45}
46
47#[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 pub fn status(mut self, input: crate::types::StopStatus) -> Self {
64 self.status = ::std::option::Option::Some(input);
65 self
66 }
67 pub fn set_status(mut self, input: ::std::option::Option<crate::types::StopStatus>) -> Self {
75 self.status = input;
76 self
77 }
78 pub fn get_status(&self) -> &::std::option::Option<crate::types::StopStatus> {
86 &self.status
87 }
88 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 pub fn set_status_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95 self.status_message = input;
96 self
97 }
98 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 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}