aws_sdk_codedeploy/operation/continue_deployment/_continue_deployment_input.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 ContinueDeploymentInput {
6 /// <p>The unique ID of a blue/green deployment for which you want to start rerouting traffic to the replacement environment.</p>
7 pub deployment_id: ::std::option::Option<::std::string::String>,
8 /// <p>The status of the deployment's waiting period. <code>READY_WAIT</code> indicates that the deployment is ready to start shifting traffic. <code>TERMINATION_WAIT</code> indicates that the traffic is shifted, but the original target is not terminated.</p>
9 pub deployment_wait_type: ::std::option::Option<crate::types::DeploymentWaitType>,
10}
11impl ContinueDeploymentInput {
12 /// <p>The unique ID of a blue/green deployment for which you want to start rerouting traffic to the replacement environment.</p>
13 pub fn deployment_id(&self) -> ::std::option::Option<&str> {
14 self.deployment_id.as_deref()
15 }
16 /// <p>The status of the deployment's waiting period. <code>READY_WAIT</code> indicates that the deployment is ready to start shifting traffic. <code>TERMINATION_WAIT</code> indicates that the traffic is shifted, but the original target is not terminated.</p>
17 pub fn deployment_wait_type(&self) -> ::std::option::Option<&crate::types::DeploymentWaitType> {
18 self.deployment_wait_type.as_ref()
19 }
20}
21impl ContinueDeploymentInput {
22 /// Creates a new builder-style object to manufacture [`ContinueDeploymentInput`](crate::operation::continue_deployment::ContinueDeploymentInput).
23 pub fn builder() -> crate::operation::continue_deployment::builders::ContinueDeploymentInputBuilder {
24 crate::operation::continue_deployment::builders::ContinueDeploymentInputBuilder::default()
25 }
26}
27
28/// A builder for [`ContinueDeploymentInput`](crate::operation::continue_deployment::ContinueDeploymentInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct ContinueDeploymentInputBuilder {
32 pub(crate) deployment_id: ::std::option::Option<::std::string::String>,
33 pub(crate) deployment_wait_type: ::std::option::Option<crate::types::DeploymentWaitType>,
34}
35impl ContinueDeploymentInputBuilder {
36 /// <p>The unique ID of a blue/green deployment for which you want to start rerouting traffic to the replacement environment.</p>
37 pub fn deployment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
38 self.deployment_id = ::std::option::Option::Some(input.into());
39 self
40 }
41 /// <p>The unique ID of a blue/green deployment for which you want to start rerouting traffic to the replacement environment.</p>
42 pub fn set_deployment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
43 self.deployment_id = input;
44 self
45 }
46 /// <p>The unique ID of a blue/green deployment for which you want to start rerouting traffic to the replacement environment.</p>
47 pub fn get_deployment_id(&self) -> &::std::option::Option<::std::string::String> {
48 &self.deployment_id
49 }
50 /// <p>The status of the deployment's waiting period. <code>READY_WAIT</code> indicates that the deployment is ready to start shifting traffic. <code>TERMINATION_WAIT</code> indicates that the traffic is shifted, but the original target is not terminated.</p>
51 pub fn deployment_wait_type(mut self, input: crate::types::DeploymentWaitType) -> Self {
52 self.deployment_wait_type = ::std::option::Option::Some(input);
53 self
54 }
55 /// <p>The status of the deployment's waiting period. <code>READY_WAIT</code> indicates that the deployment is ready to start shifting traffic. <code>TERMINATION_WAIT</code> indicates that the traffic is shifted, but the original target is not terminated.</p>
56 pub fn set_deployment_wait_type(mut self, input: ::std::option::Option<crate::types::DeploymentWaitType>) -> Self {
57 self.deployment_wait_type = input;
58 self
59 }
60 /// <p>The status of the deployment's waiting period. <code>READY_WAIT</code> indicates that the deployment is ready to start shifting traffic. <code>TERMINATION_WAIT</code> indicates that the traffic is shifted, but the original target is not terminated.</p>
61 pub fn get_deployment_wait_type(&self) -> &::std::option::Option<crate::types::DeploymentWaitType> {
62 &self.deployment_wait_type
63 }
64 /// Consumes the builder and constructs a [`ContinueDeploymentInput`](crate::operation::continue_deployment::ContinueDeploymentInput).
65 pub fn build(
66 self,
67 ) -> ::std::result::Result<crate::operation::continue_deployment::ContinueDeploymentInput, ::aws_smithy_types::error::operation::BuildError> {
68 ::std::result::Result::Ok(crate::operation::continue_deployment::ContinueDeploymentInput {
69 deployment_id: self.deployment_id,
70 deployment_wait_type: self.deployment_wait_type,
71 })
72 }
73}