aws_sdk_proton/operation/update_component/_update_component_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 UpdateComponentInput {
6 /// <p>The name of the component to update.</p>
7 pub name: ::std::option::Option<::std::string::String>,
8 /// <p>The deployment type. It defines the mode for updating a component, as follows:</p>
9 /// <dl>
10 /// <dt></dt>
11 /// <dd>
12 /// <p><code>NONE</code></p>
13 /// <p>In this mode, a deployment <i>doesn't</i> occur. Only the requested metadata parameters are updated. You can only specify <code>description</code> in this mode.</p>
14 /// </dd>
15 /// <dt></dt>
16 /// <dd>
17 /// <p><code>CURRENT_VERSION</code></p>
18 /// <p>In this mode, the component is deployed and updated with the new <code>serviceSpec</code>, <code>templateSource</code>, and/or <code>type</code> that you provide. Only requested parameters are updated.</p>
19 /// </dd>
20 /// </dl>
21 pub deployment_type: ::std::option::Option<crate::types::ComponentDeploymentUpdateType>,
22 /// <p>An optional customer-provided description of the component.</p>
23 pub description: ::std::option::Option<::std::string::String>,
24 /// <p>The name of the service that <code>serviceInstanceName</code> is associated with. Don't specify to keep the component's current service instance attachment. Specify an empty string to detach the component from the service instance it's attached to. Specify non-empty values for both <code>serviceInstanceName</code> and <code>serviceName</code> or for neither of them.</p>
25 pub service_name: ::std::option::Option<::std::string::String>,
26 /// <p>The name of the service instance that you want to attach this component to. Don't specify to keep the component's current service instance attachment. Specify an empty string to detach the component from the service instance it's attached to. Specify non-empty values for both <code>serviceInstanceName</code> and <code>serviceName</code> or for neither of them.</p>
27 pub service_instance_name: ::std::option::Option<::std::string::String>,
28 /// <p>The service spec that you want the component to use to access service inputs. Set this only when the component is attached to a service instance.</p>
29 pub service_spec: ::std::option::Option<::std::string::String>,
30 /// <p>A path to the Infrastructure as Code (IaC) file describing infrastructure that a custom component provisions.</p><note>
31 /// <p>Components support a single IaC file, even if you use Terraform as your template language.</p>
32 /// </note>
33 pub template_file: ::std::option::Option<::std::string::String>,
34 /// <p>The client token for the updated component.</p>
35 pub client_token: ::std::option::Option<::std::string::String>,
36}
37impl UpdateComponentInput {
38 /// <p>The name of the component to update.</p>
39 pub fn name(&self) -> ::std::option::Option<&str> {
40 self.name.as_deref()
41 }
42 /// <p>The deployment type. It defines the mode for updating a component, as follows:</p>
43 /// <dl>
44 /// <dt></dt>
45 /// <dd>
46 /// <p><code>NONE</code></p>
47 /// <p>In this mode, a deployment <i>doesn't</i> occur. Only the requested metadata parameters are updated. You can only specify <code>description</code> in this mode.</p>
48 /// </dd>
49 /// <dt></dt>
50 /// <dd>
51 /// <p><code>CURRENT_VERSION</code></p>
52 /// <p>In this mode, the component is deployed and updated with the new <code>serviceSpec</code>, <code>templateSource</code>, and/or <code>type</code> that you provide. Only requested parameters are updated.</p>
53 /// </dd>
54 /// </dl>
55 pub fn deployment_type(&self) -> ::std::option::Option<&crate::types::ComponentDeploymentUpdateType> {
56 self.deployment_type.as_ref()
57 }
58 /// <p>An optional customer-provided description of the component.</p>
59 pub fn description(&self) -> ::std::option::Option<&str> {
60 self.description.as_deref()
61 }
62 /// <p>The name of the service that <code>serviceInstanceName</code> is associated with. Don't specify to keep the component's current service instance attachment. Specify an empty string to detach the component from the service instance it's attached to. Specify non-empty values for both <code>serviceInstanceName</code> and <code>serviceName</code> or for neither of them.</p>
63 pub fn service_name(&self) -> ::std::option::Option<&str> {
64 self.service_name.as_deref()
65 }
66 /// <p>The name of the service instance that you want to attach this component to. Don't specify to keep the component's current service instance attachment. Specify an empty string to detach the component from the service instance it's attached to. Specify non-empty values for both <code>serviceInstanceName</code> and <code>serviceName</code> or for neither of them.</p>
67 pub fn service_instance_name(&self) -> ::std::option::Option<&str> {
68 self.service_instance_name.as_deref()
69 }
70 /// <p>The service spec that you want the component to use to access service inputs. Set this only when the component is attached to a service instance.</p>
71 pub fn service_spec(&self) -> ::std::option::Option<&str> {
72 self.service_spec.as_deref()
73 }
74 /// <p>A path to the Infrastructure as Code (IaC) file describing infrastructure that a custom component provisions.</p><note>
75 /// <p>Components support a single IaC file, even if you use Terraform as your template language.</p>
76 /// </note>
77 pub fn template_file(&self) -> ::std::option::Option<&str> {
78 self.template_file.as_deref()
79 }
80 /// <p>The client token for the updated component.</p>
81 pub fn client_token(&self) -> ::std::option::Option<&str> {
82 self.client_token.as_deref()
83 }
84}
85impl ::std::fmt::Debug for UpdateComponentInput {
86 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
87 let mut formatter = f.debug_struct("UpdateComponentInput");
88 formatter.field("name", &self.name);
89 formatter.field("deployment_type", &self.deployment_type);
90 formatter.field("description", &"*** Sensitive Data Redacted ***");
91 formatter.field("service_name", &self.service_name);
92 formatter.field("service_instance_name", &self.service_instance_name);
93 formatter.field("service_spec", &"*** Sensitive Data Redacted ***");
94 formatter.field("template_file", &"*** Sensitive Data Redacted ***");
95 formatter.field("client_token", &self.client_token);
96 formatter.finish()
97 }
98}
99impl UpdateComponentInput {
100 /// Creates a new builder-style object to manufacture [`UpdateComponentInput`](crate::operation::update_component::UpdateComponentInput).
101 pub fn builder() -> crate::operation::update_component::builders::UpdateComponentInputBuilder {
102 crate::operation::update_component::builders::UpdateComponentInputBuilder::default()
103 }
104}
105
106/// A builder for [`UpdateComponentInput`](crate::operation::update_component::UpdateComponentInput).
107#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
108#[non_exhaustive]
109pub struct UpdateComponentInputBuilder {
110 pub(crate) name: ::std::option::Option<::std::string::String>,
111 pub(crate) deployment_type: ::std::option::Option<crate::types::ComponentDeploymentUpdateType>,
112 pub(crate) description: ::std::option::Option<::std::string::String>,
113 pub(crate) service_name: ::std::option::Option<::std::string::String>,
114 pub(crate) service_instance_name: ::std::option::Option<::std::string::String>,
115 pub(crate) service_spec: ::std::option::Option<::std::string::String>,
116 pub(crate) template_file: ::std::option::Option<::std::string::String>,
117 pub(crate) client_token: ::std::option::Option<::std::string::String>,
118}
119impl UpdateComponentInputBuilder {
120 /// <p>The name of the component to update.</p>
121 /// This field is required.
122 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123 self.name = ::std::option::Option::Some(input.into());
124 self
125 }
126 /// <p>The name of the component to update.</p>
127 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128 self.name = input;
129 self
130 }
131 /// <p>The name of the component to update.</p>
132 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
133 &self.name
134 }
135 /// <p>The deployment type. It defines the mode for updating a component, as follows:</p>
136 /// <dl>
137 /// <dt></dt>
138 /// <dd>
139 /// <p><code>NONE</code></p>
140 /// <p>In this mode, a deployment <i>doesn't</i> occur. Only the requested metadata parameters are updated. You can only specify <code>description</code> in this mode.</p>
141 /// </dd>
142 /// <dt></dt>
143 /// <dd>
144 /// <p><code>CURRENT_VERSION</code></p>
145 /// <p>In this mode, the component is deployed and updated with the new <code>serviceSpec</code>, <code>templateSource</code>, and/or <code>type</code> that you provide. Only requested parameters are updated.</p>
146 /// </dd>
147 /// </dl>
148 /// This field is required.
149 pub fn deployment_type(mut self, input: crate::types::ComponentDeploymentUpdateType) -> Self {
150 self.deployment_type = ::std::option::Option::Some(input);
151 self
152 }
153 /// <p>The deployment type. It defines the mode for updating a component, as follows:</p>
154 /// <dl>
155 /// <dt></dt>
156 /// <dd>
157 /// <p><code>NONE</code></p>
158 /// <p>In this mode, a deployment <i>doesn't</i> occur. Only the requested metadata parameters are updated. You can only specify <code>description</code> in this mode.</p>
159 /// </dd>
160 /// <dt></dt>
161 /// <dd>
162 /// <p><code>CURRENT_VERSION</code></p>
163 /// <p>In this mode, the component is deployed and updated with the new <code>serviceSpec</code>, <code>templateSource</code>, and/or <code>type</code> that you provide. Only requested parameters are updated.</p>
164 /// </dd>
165 /// </dl>
166 pub fn set_deployment_type(mut self, input: ::std::option::Option<crate::types::ComponentDeploymentUpdateType>) -> Self {
167 self.deployment_type = input;
168 self
169 }
170 /// <p>The deployment type. It defines the mode for updating a component, as follows:</p>
171 /// <dl>
172 /// <dt></dt>
173 /// <dd>
174 /// <p><code>NONE</code></p>
175 /// <p>In this mode, a deployment <i>doesn't</i> occur. Only the requested metadata parameters are updated. You can only specify <code>description</code> in this mode.</p>
176 /// </dd>
177 /// <dt></dt>
178 /// <dd>
179 /// <p><code>CURRENT_VERSION</code></p>
180 /// <p>In this mode, the component is deployed and updated with the new <code>serviceSpec</code>, <code>templateSource</code>, and/or <code>type</code> that you provide. Only requested parameters are updated.</p>
181 /// </dd>
182 /// </dl>
183 pub fn get_deployment_type(&self) -> &::std::option::Option<crate::types::ComponentDeploymentUpdateType> {
184 &self.deployment_type
185 }
186 /// <p>An optional customer-provided description of the component.</p>
187 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
188 self.description = ::std::option::Option::Some(input.into());
189 self
190 }
191 /// <p>An optional customer-provided description of the component.</p>
192 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
193 self.description = input;
194 self
195 }
196 /// <p>An optional customer-provided description of the component.</p>
197 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
198 &self.description
199 }
200 /// <p>The name of the service that <code>serviceInstanceName</code> is associated with. Don't specify to keep the component's current service instance attachment. Specify an empty string to detach the component from the service instance it's attached to. Specify non-empty values for both <code>serviceInstanceName</code> and <code>serviceName</code> or for neither of them.</p>
201 pub fn service_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
202 self.service_name = ::std::option::Option::Some(input.into());
203 self
204 }
205 /// <p>The name of the service that <code>serviceInstanceName</code> is associated with. Don't specify to keep the component's current service instance attachment. Specify an empty string to detach the component from the service instance it's attached to. Specify non-empty values for both <code>serviceInstanceName</code> and <code>serviceName</code> or for neither of them.</p>
206 pub fn set_service_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
207 self.service_name = input;
208 self
209 }
210 /// <p>The name of the service that <code>serviceInstanceName</code> is associated with. Don't specify to keep the component's current service instance attachment. Specify an empty string to detach the component from the service instance it's attached to. Specify non-empty values for both <code>serviceInstanceName</code> and <code>serviceName</code> or for neither of them.</p>
211 pub fn get_service_name(&self) -> &::std::option::Option<::std::string::String> {
212 &self.service_name
213 }
214 /// <p>The name of the service instance that you want to attach this component to. Don't specify to keep the component's current service instance attachment. Specify an empty string to detach the component from the service instance it's attached to. Specify non-empty values for both <code>serviceInstanceName</code> and <code>serviceName</code> or for neither of them.</p>
215 pub fn service_instance_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
216 self.service_instance_name = ::std::option::Option::Some(input.into());
217 self
218 }
219 /// <p>The name of the service instance that you want to attach this component to. Don't specify to keep the component's current service instance attachment. Specify an empty string to detach the component from the service instance it's attached to. Specify non-empty values for both <code>serviceInstanceName</code> and <code>serviceName</code> or for neither of them.</p>
220 pub fn set_service_instance_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
221 self.service_instance_name = input;
222 self
223 }
224 /// <p>The name of the service instance that you want to attach this component to. Don't specify to keep the component's current service instance attachment. Specify an empty string to detach the component from the service instance it's attached to. Specify non-empty values for both <code>serviceInstanceName</code> and <code>serviceName</code> or for neither of them.</p>
225 pub fn get_service_instance_name(&self) -> &::std::option::Option<::std::string::String> {
226 &self.service_instance_name
227 }
228 /// <p>The service spec that you want the component to use to access service inputs. Set this only when the component is attached to a service instance.</p>
229 pub fn service_spec(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
230 self.service_spec = ::std::option::Option::Some(input.into());
231 self
232 }
233 /// <p>The service spec that you want the component to use to access service inputs. Set this only when the component is attached to a service instance.</p>
234 pub fn set_service_spec(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
235 self.service_spec = input;
236 self
237 }
238 /// <p>The service spec that you want the component to use to access service inputs. Set this only when the component is attached to a service instance.</p>
239 pub fn get_service_spec(&self) -> &::std::option::Option<::std::string::String> {
240 &self.service_spec
241 }
242 /// <p>A path to the Infrastructure as Code (IaC) file describing infrastructure that a custom component provisions.</p><note>
243 /// <p>Components support a single IaC file, even if you use Terraform as your template language.</p>
244 /// </note>
245 pub fn template_file(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
246 self.template_file = ::std::option::Option::Some(input.into());
247 self
248 }
249 /// <p>A path to the Infrastructure as Code (IaC) file describing infrastructure that a custom component provisions.</p><note>
250 /// <p>Components support a single IaC file, even if you use Terraform as your template language.</p>
251 /// </note>
252 pub fn set_template_file(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
253 self.template_file = input;
254 self
255 }
256 /// <p>A path to the Infrastructure as Code (IaC) file describing infrastructure that a custom component provisions.</p><note>
257 /// <p>Components support a single IaC file, even if you use Terraform as your template language.</p>
258 /// </note>
259 pub fn get_template_file(&self) -> &::std::option::Option<::std::string::String> {
260 &self.template_file
261 }
262 /// <p>The client token for the updated component.</p>
263 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
264 self.client_token = ::std::option::Option::Some(input.into());
265 self
266 }
267 /// <p>The client token for the updated component.</p>
268 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
269 self.client_token = input;
270 self
271 }
272 /// <p>The client token for the updated component.</p>
273 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
274 &self.client_token
275 }
276 /// Consumes the builder and constructs a [`UpdateComponentInput`](crate::operation::update_component::UpdateComponentInput).
277 pub fn build(
278 self,
279 ) -> ::std::result::Result<crate::operation::update_component::UpdateComponentInput, ::aws_smithy_types::error::operation::BuildError> {
280 ::std::result::Result::Ok(crate::operation::update_component::UpdateComponentInput {
281 name: self.name,
282 deployment_type: self.deployment_type,
283 description: self.description,
284 service_name: self.service_name,
285 service_instance_name: self.service_instance_name,
286 service_spec: self.service_spec,
287 template_file: self.template_file,
288 client_token: self.client_token,
289 })
290 }
291}
292impl ::std::fmt::Debug for UpdateComponentInputBuilder {
293 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
294 let mut formatter = f.debug_struct("UpdateComponentInputBuilder");
295 formatter.field("name", &self.name);
296 formatter.field("deployment_type", &self.deployment_type);
297 formatter.field("description", &"*** Sensitive Data Redacted ***");
298 formatter.field("service_name", &self.service_name);
299 formatter.field("service_instance_name", &self.service_instance_name);
300 formatter.field("service_spec", &"*** Sensitive Data Redacted ***");
301 formatter.field("template_file", &"*** Sensitive Data Redacted ***");
302 formatter.field("client_token", &self.client_token);
303 formatter.finish()
304 }
305}