aws_sdk_launchwizard/operation/update_deployment/_update_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)]
5pub struct UpdateDeploymentInput {
6 /// <p>The ID of the deployment.</p>
7 pub deployment_id: ::std::option::Option<::std::string::String>,
8 /// <p>The settings specified for the deployment. These settings define how to deploy and configure your resources created by the deployment. For more information about the specifications required for creating a deployment for a SAP workload, see <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/launch-wizard-specifications-sap.html">SAP deployment specifications</a>. To retrieve the specifications required to create a deployment for other workloads, use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_GetWorkloadDeploymentPattern.html"> <code>GetWorkloadDeploymentPattern</code> </a> operation.</p>
9 pub specifications: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
10 /// <p>The name of the workload version.</p>
11 pub workload_version_name: ::std::option::Option<::std::string::String>,
12 /// <p>The name of the deployment pattern version.</p>
13 pub deployment_pattern_version_name: ::std::option::Option<::std::string::String>,
14 /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
15 pub dry_run: ::std::option::Option<bool>,
16 /// <p>Forces the update even if validation warnings are present.</p>
17 pub force: ::std::option::Option<bool>,
18}
19impl UpdateDeploymentInput {
20 /// <p>The ID of the deployment.</p>
21 pub fn deployment_id(&self) -> ::std::option::Option<&str> {
22 self.deployment_id.as_deref()
23 }
24 /// <p>The settings specified for the deployment. These settings define how to deploy and configure your resources created by the deployment. For more information about the specifications required for creating a deployment for a SAP workload, see <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/launch-wizard-specifications-sap.html">SAP deployment specifications</a>. To retrieve the specifications required to create a deployment for other workloads, use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_GetWorkloadDeploymentPattern.html"> <code>GetWorkloadDeploymentPattern</code> </a> operation.</p>
25 pub fn specifications(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
26 self.specifications.as_ref()
27 }
28 /// <p>The name of the workload version.</p>
29 pub fn workload_version_name(&self) -> ::std::option::Option<&str> {
30 self.workload_version_name.as_deref()
31 }
32 /// <p>The name of the deployment pattern version.</p>
33 pub fn deployment_pattern_version_name(&self) -> ::std::option::Option<&str> {
34 self.deployment_pattern_version_name.as_deref()
35 }
36 /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
37 pub fn dry_run(&self) -> ::std::option::Option<bool> {
38 self.dry_run
39 }
40 /// <p>Forces the update even if validation warnings are present.</p>
41 pub fn force(&self) -> ::std::option::Option<bool> {
42 self.force
43 }
44}
45impl ::std::fmt::Debug for UpdateDeploymentInput {
46 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
47 let mut formatter = f.debug_struct("UpdateDeploymentInput");
48 formatter.field("deployment_id", &self.deployment_id);
49 formatter.field("specifications", &"*** Sensitive Data Redacted ***");
50 formatter.field("workload_version_name", &self.workload_version_name);
51 formatter.field("deployment_pattern_version_name", &self.deployment_pattern_version_name);
52 formatter.field("dry_run", &self.dry_run);
53 formatter.field("force", &self.force);
54 formatter.finish()
55 }
56}
57impl UpdateDeploymentInput {
58 /// Creates a new builder-style object to manufacture [`UpdateDeploymentInput`](crate::operation::update_deployment::UpdateDeploymentInput).
59 pub fn builder() -> crate::operation::update_deployment::builders::UpdateDeploymentInputBuilder {
60 crate::operation::update_deployment::builders::UpdateDeploymentInputBuilder::default()
61 }
62}
63
64/// A builder for [`UpdateDeploymentInput`](crate::operation::update_deployment::UpdateDeploymentInput).
65#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
66#[non_exhaustive]
67pub struct UpdateDeploymentInputBuilder {
68 pub(crate) deployment_id: ::std::option::Option<::std::string::String>,
69 pub(crate) specifications: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
70 pub(crate) workload_version_name: ::std::option::Option<::std::string::String>,
71 pub(crate) deployment_pattern_version_name: ::std::option::Option<::std::string::String>,
72 pub(crate) dry_run: ::std::option::Option<bool>,
73 pub(crate) force: ::std::option::Option<bool>,
74}
75impl UpdateDeploymentInputBuilder {
76 /// <p>The ID of the deployment.</p>
77 /// This field is required.
78 pub fn deployment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
79 self.deployment_id = ::std::option::Option::Some(input.into());
80 self
81 }
82 /// <p>The ID of the deployment.</p>
83 pub fn set_deployment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
84 self.deployment_id = input;
85 self
86 }
87 /// <p>The ID of the deployment.</p>
88 pub fn get_deployment_id(&self) -> &::std::option::Option<::std::string::String> {
89 &self.deployment_id
90 }
91 /// Adds a key-value pair to `specifications`.
92 ///
93 /// To override the contents of this collection use [`set_specifications`](Self::set_specifications).
94 ///
95 /// <p>The settings specified for the deployment. These settings define how to deploy and configure your resources created by the deployment. For more information about the specifications required for creating a deployment for a SAP workload, see <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/launch-wizard-specifications-sap.html">SAP deployment specifications</a>. To retrieve the specifications required to create a deployment for other workloads, use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_GetWorkloadDeploymentPattern.html"> <code>GetWorkloadDeploymentPattern</code> </a> operation.</p>
96 pub fn specifications(
97 mut self,
98 k: impl ::std::convert::Into<::std::string::String>,
99 v: impl ::std::convert::Into<::std::string::String>,
100 ) -> Self {
101 let mut hash_map = self.specifications.unwrap_or_default();
102 hash_map.insert(k.into(), v.into());
103 self.specifications = ::std::option::Option::Some(hash_map);
104 self
105 }
106 /// <p>The settings specified for the deployment. These settings define how to deploy and configure your resources created by the deployment. For more information about the specifications required for creating a deployment for a SAP workload, see <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/launch-wizard-specifications-sap.html">SAP deployment specifications</a>. To retrieve the specifications required to create a deployment for other workloads, use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_GetWorkloadDeploymentPattern.html"> <code>GetWorkloadDeploymentPattern</code> </a> operation.</p>
107 pub fn set_specifications(
108 mut self,
109 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
110 ) -> Self {
111 self.specifications = input;
112 self
113 }
114 /// <p>The settings specified for the deployment. These settings define how to deploy and configure your resources created by the deployment. For more information about the specifications required for creating a deployment for a SAP workload, see <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/launch-wizard-specifications-sap.html">SAP deployment specifications</a>. To retrieve the specifications required to create a deployment for other workloads, use the <a href="https://docs.aws.amazon.com/launchwizard/latest/APIReference/API_GetWorkloadDeploymentPattern.html"> <code>GetWorkloadDeploymentPattern</code> </a> operation.</p>
115 pub fn get_specifications(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
116 &self.specifications
117 }
118 /// <p>The name of the workload version.</p>
119 pub fn workload_version_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
120 self.workload_version_name = ::std::option::Option::Some(input.into());
121 self
122 }
123 /// <p>The name of the workload version.</p>
124 pub fn set_workload_version_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
125 self.workload_version_name = input;
126 self
127 }
128 /// <p>The name of the workload version.</p>
129 pub fn get_workload_version_name(&self) -> &::std::option::Option<::std::string::String> {
130 &self.workload_version_name
131 }
132 /// <p>The name of the deployment pattern version.</p>
133 pub fn deployment_pattern_version_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
134 self.deployment_pattern_version_name = ::std::option::Option::Some(input.into());
135 self
136 }
137 /// <p>The name of the deployment pattern version.</p>
138 pub fn set_deployment_pattern_version_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
139 self.deployment_pattern_version_name = input;
140 self
141 }
142 /// <p>The name of the deployment pattern version.</p>
143 pub fn get_deployment_pattern_version_name(&self) -> &::std::option::Option<::std::string::String> {
144 &self.deployment_pattern_version_name
145 }
146 /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
147 pub fn dry_run(mut self, input: bool) -> Self {
148 self.dry_run = ::std::option::Option::Some(input);
149 self
150 }
151 /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
152 pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
153 self.dry_run = input;
154 self
155 }
156 /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
157 pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
158 &self.dry_run
159 }
160 /// <p>Forces the update even if validation warnings are present.</p>
161 pub fn force(mut self, input: bool) -> Self {
162 self.force = ::std::option::Option::Some(input);
163 self
164 }
165 /// <p>Forces the update even if validation warnings are present.</p>
166 pub fn set_force(mut self, input: ::std::option::Option<bool>) -> Self {
167 self.force = input;
168 self
169 }
170 /// <p>Forces the update even if validation warnings are present.</p>
171 pub fn get_force(&self) -> &::std::option::Option<bool> {
172 &self.force
173 }
174 /// Consumes the builder and constructs a [`UpdateDeploymentInput`](crate::operation::update_deployment::UpdateDeploymentInput).
175 pub fn build(
176 self,
177 ) -> ::std::result::Result<crate::operation::update_deployment::UpdateDeploymentInput, ::aws_smithy_types::error::operation::BuildError> {
178 ::std::result::Result::Ok(crate::operation::update_deployment::UpdateDeploymentInput {
179 deployment_id: self.deployment_id,
180 specifications: self.specifications,
181 workload_version_name: self.workload_version_name,
182 deployment_pattern_version_name: self.deployment_pattern_version_name,
183 dry_run: self.dry_run,
184 force: self.force,
185 })
186 }
187}
188impl ::std::fmt::Debug for UpdateDeploymentInputBuilder {
189 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
190 let mut formatter = f.debug_struct("UpdateDeploymentInputBuilder");
191 formatter.field("deployment_id", &self.deployment_id);
192 formatter.field("specifications", &"*** Sensitive Data Redacted ***");
193 formatter.field("workload_version_name", &self.workload_version_name);
194 formatter.field("deployment_pattern_version_name", &self.deployment_pattern_version_name);
195 formatter.field("dry_run", &self.dry_run);
196 formatter.field("force", &self.force);
197 formatter.finish()
198 }
199}