aws_sdk_codedeploy/operation/stop_deployment/
_stop_deployment_input.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct StopDeploymentInput {
7 pub deployment_id: ::std::option::Option<::std::string::String>,
9 pub auto_rollback_enabled: ::std::option::Option<bool>,
11}
12impl StopDeploymentInput {
13 pub fn deployment_id(&self) -> ::std::option::Option<&str> {
15 self.deployment_id.as_deref()
16 }
17 pub fn auto_rollback_enabled(&self) -> ::std::option::Option<bool> {
19 self.auto_rollback_enabled
20 }
21}
22impl StopDeploymentInput {
23 pub fn builder() -> crate::operation::stop_deployment::builders::StopDeploymentInputBuilder {
25 crate::operation::stop_deployment::builders::StopDeploymentInputBuilder::default()
26 }
27}
28
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct StopDeploymentInputBuilder {
33 pub(crate) deployment_id: ::std::option::Option<::std::string::String>,
34 pub(crate) auto_rollback_enabled: ::std::option::Option<bool>,
35}
36impl StopDeploymentInputBuilder {
37 pub fn deployment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
40 self.deployment_id = ::std::option::Option::Some(input.into());
41 self
42 }
43 pub fn set_deployment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
45 self.deployment_id = input;
46 self
47 }
48 pub fn get_deployment_id(&self) -> &::std::option::Option<::std::string::String> {
50 &self.deployment_id
51 }
52 pub fn auto_rollback_enabled(mut self, input: bool) -> Self {
54 self.auto_rollback_enabled = ::std::option::Option::Some(input);
55 self
56 }
57 pub fn set_auto_rollback_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
59 self.auto_rollback_enabled = input;
60 self
61 }
62 pub fn get_auto_rollback_enabled(&self) -> &::std::option::Option<bool> {
64 &self.auto_rollback_enabled
65 }
66 pub fn build(
68 self,
69 ) -> ::std::result::Result<crate::operation::stop_deployment::StopDeploymentInput, ::aws_smithy_types::error::operation::BuildError> {
70 ::std::result::Result::Ok(crate::operation::stop_deployment::StopDeploymentInput {
71 deployment_id: self.deployment_id,
72 auto_rollback_enabled: self.auto_rollback_enabled,
73 })
74 }
75}