Skip to main content

aws_sdk_codedeploy/types/
_deployment_target.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Information about the deployment target.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DeploymentTarget {
7    /// <p>The deployment type that is specific to the deployment's compute platform or deployments initiated by a CloudFormation stack update.</p>
8    pub deployment_target_type: ::std::option::Option<crate::types::DeploymentTargetType>,
9    /// <p>Information about the target for a deployment that uses the EC2/On-premises compute platform.</p>
10    pub instance_target: ::std::option::Option<crate::types::InstanceTarget>,
11    /// <p>Information about the target for a deployment that uses the Lambda compute platform.</p>
12    pub lambda_target: ::std::option::Option<crate::types::LambdaTarget>,
13    /// <p>Information about the target for a deployment that uses the Amazon ECS compute platform.</p>
14    pub ecs_target: ::std::option::Option<crate::types::EcsTarget>,
15    /// <p>Information about the target to be updated by an CloudFormation blue/green deployment. This target type is used for all deployments initiated by a CloudFormation stack update.</p>
16    pub cloud_formation_target: ::std::option::Option<crate::types::CloudFormationTarget>,
17}
18impl DeploymentTarget {
19    /// <p>The deployment type that is specific to the deployment's compute platform or deployments initiated by a CloudFormation stack update.</p>
20    pub fn deployment_target_type(&self) -> ::std::option::Option<&crate::types::DeploymentTargetType> {
21        self.deployment_target_type.as_ref()
22    }
23    /// <p>Information about the target for a deployment that uses the EC2/On-premises compute platform.</p>
24    pub fn instance_target(&self) -> ::std::option::Option<&crate::types::InstanceTarget> {
25        self.instance_target.as_ref()
26    }
27    /// <p>Information about the target for a deployment that uses the Lambda compute platform.</p>
28    pub fn lambda_target(&self) -> ::std::option::Option<&crate::types::LambdaTarget> {
29        self.lambda_target.as_ref()
30    }
31    /// <p>Information about the target for a deployment that uses the Amazon ECS compute platform.</p>
32    pub fn ecs_target(&self) -> ::std::option::Option<&crate::types::EcsTarget> {
33        self.ecs_target.as_ref()
34    }
35    /// <p>Information about the target to be updated by an CloudFormation blue/green deployment. This target type is used for all deployments initiated by a CloudFormation stack update.</p>
36    pub fn cloud_formation_target(&self) -> ::std::option::Option<&crate::types::CloudFormationTarget> {
37        self.cloud_formation_target.as_ref()
38    }
39}
40impl DeploymentTarget {
41    /// Creates a new builder-style object to manufacture [`DeploymentTarget`](crate::types::DeploymentTarget).
42    pub fn builder() -> crate::types::builders::DeploymentTargetBuilder {
43        crate::types::builders::DeploymentTargetBuilder::default()
44    }
45}
46
47/// A builder for [`DeploymentTarget`](crate::types::DeploymentTarget).
48#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
49#[non_exhaustive]
50pub struct DeploymentTargetBuilder {
51    pub(crate) deployment_target_type: ::std::option::Option<crate::types::DeploymentTargetType>,
52    pub(crate) instance_target: ::std::option::Option<crate::types::InstanceTarget>,
53    pub(crate) lambda_target: ::std::option::Option<crate::types::LambdaTarget>,
54    pub(crate) ecs_target: ::std::option::Option<crate::types::EcsTarget>,
55    pub(crate) cloud_formation_target: ::std::option::Option<crate::types::CloudFormationTarget>,
56}
57impl DeploymentTargetBuilder {
58    /// <p>The deployment type that is specific to the deployment's compute platform or deployments initiated by a CloudFormation stack update.</p>
59    pub fn deployment_target_type(mut self, input: crate::types::DeploymentTargetType) -> Self {
60        self.deployment_target_type = ::std::option::Option::Some(input);
61        self
62    }
63    /// <p>The deployment type that is specific to the deployment's compute platform or deployments initiated by a CloudFormation stack update.</p>
64    pub fn set_deployment_target_type(mut self, input: ::std::option::Option<crate::types::DeploymentTargetType>) -> Self {
65        self.deployment_target_type = input;
66        self
67    }
68    /// <p>The deployment type that is specific to the deployment's compute platform or deployments initiated by a CloudFormation stack update.</p>
69    pub fn get_deployment_target_type(&self) -> &::std::option::Option<crate::types::DeploymentTargetType> {
70        &self.deployment_target_type
71    }
72    /// <p>Information about the target for a deployment that uses the EC2/On-premises compute platform.</p>
73    pub fn instance_target(mut self, input: crate::types::InstanceTarget) -> Self {
74        self.instance_target = ::std::option::Option::Some(input);
75        self
76    }
77    /// <p>Information about the target for a deployment that uses the EC2/On-premises compute platform.</p>
78    pub fn set_instance_target(mut self, input: ::std::option::Option<crate::types::InstanceTarget>) -> Self {
79        self.instance_target = input;
80        self
81    }
82    /// <p>Information about the target for a deployment that uses the EC2/On-premises compute platform.</p>
83    pub fn get_instance_target(&self) -> &::std::option::Option<crate::types::InstanceTarget> {
84        &self.instance_target
85    }
86    /// <p>Information about the target for a deployment that uses the Lambda compute platform.</p>
87    pub fn lambda_target(mut self, input: crate::types::LambdaTarget) -> Self {
88        self.lambda_target = ::std::option::Option::Some(input);
89        self
90    }
91    /// <p>Information about the target for a deployment that uses the Lambda compute platform.</p>
92    pub fn set_lambda_target(mut self, input: ::std::option::Option<crate::types::LambdaTarget>) -> Self {
93        self.lambda_target = input;
94        self
95    }
96    /// <p>Information about the target for a deployment that uses the Lambda compute platform.</p>
97    pub fn get_lambda_target(&self) -> &::std::option::Option<crate::types::LambdaTarget> {
98        &self.lambda_target
99    }
100    /// <p>Information about the target for a deployment that uses the Amazon ECS compute platform.</p>
101    pub fn ecs_target(mut self, input: crate::types::EcsTarget) -> Self {
102        self.ecs_target = ::std::option::Option::Some(input);
103        self
104    }
105    /// <p>Information about the target for a deployment that uses the Amazon ECS compute platform.</p>
106    pub fn set_ecs_target(mut self, input: ::std::option::Option<crate::types::EcsTarget>) -> Self {
107        self.ecs_target = input;
108        self
109    }
110    /// <p>Information about the target for a deployment that uses the Amazon ECS compute platform.</p>
111    pub fn get_ecs_target(&self) -> &::std::option::Option<crate::types::EcsTarget> {
112        &self.ecs_target
113    }
114    /// <p>Information about the target to be updated by an CloudFormation blue/green deployment. This target type is used for all deployments initiated by a CloudFormation stack update.</p>
115    pub fn cloud_formation_target(mut self, input: crate::types::CloudFormationTarget) -> Self {
116        self.cloud_formation_target = ::std::option::Option::Some(input);
117        self
118    }
119    /// <p>Information about the target to be updated by an CloudFormation blue/green deployment. This target type is used for all deployments initiated by a CloudFormation stack update.</p>
120    pub fn set_cloud_formation_target(mut self, input: ::std::option::Option<crate::types::CloudFormationTarget>) -> Self {
121        self.cloud_formation_target = input;
122        self
123    }
124    /// <p>Information about the target to be updated by an CloudFormation blue/green deployment. This target type is used for all deployments initiated by a CloudFormation stack update.</p>
125    pub fn get_cloud_formation_target(&self) -> &::std::option::Option<crate::types::CloudFormationTarget> {
126        &self.cloud_formation_target
127    }
128    /// Consumes the builder and constructs a [`DeploymentTarget`](crate::types::DeploymentTarget).
129    pub fn build(self) -> crate::types::DeploymentTarget {
130        crate::types::DeploymentTarget {
131            deployment_target_type: self.deployment_target_type,
132            instance_target: self.instance_target,
133            lambda_target: self.lambda_target,
134            ecs_target: self.ecs_target,
135            cloud_formation_target: self.cloud_formation_target,
136        }
137    }
138}