aws-sdk-imagebuilder 1.111.0

AWS SDK for EC2 Image Builder
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A detailed view of a component.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Component {
    /// <p>The Amazon Resource Name (ARN) of the component.</p>
    pub arn: ::std::option::Option<::std::string::String>,
    /// <p>The name of the component.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The version of the component.</p>
    pub version: ::std::option::Option<::std::string::String>,
    /// <p>The description of the component.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>Describes what change has been made in this version of the component, or what makes this version different from other versions of the component.</p>
    pub change_description: ::std::option::Option<::std::string::String>,
    /// <p>The component type specifies whether Image Builder uses the component to build the image or only to test it.</p>
    pub r#type: ::std::option::Option<crate::types::ComponentType>,
    /// <p>The operating system platform of the component.</p>
    pub platform: ::std::option::Option<crate::types::Platform>,
    /// <p>The operating system (OS) version supported by the component. If the OS information is available, Image Builder performs a prefix match against the base image OS version during image recipe creation.</p>
    pub supported_os_versions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>Describes the current status of the component.</p>
    pub state: ::std::option::Option<crate::types::ComponentState>,
    /// <p>Contains parameter details for each of the parameters that the component document defined for the component.</p>
    pub parameters: ::std::option::Option<::std::vec::Vec<crate::types::ComponentParameterDetail>>,
    /// <p>The owner of the component.</p>
    pub owner: ::std::option::Option<::std::string::String>,
    /// <p>Component data contains the YAML document content for the component.</p>
    pub data: ::std::option::Option<::std::string::String>,
    /// <p>The KMS key identifier used to encrypt the component. This can be either the Key ARN or the Alias ARN. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN">Key identifiers (KeyId)</a> in the <i>Key Management Service Developer Guide</i>.</p>
    pub kms_key_id: ::std::option::Option<::std::string::String>,
    /// <p>The encryption status of the component.</p>
    pub encrypted: ::std::option::Option<bool>,
    /// <p>The date that Image Builder created the component.</p>
    pub date_created: ::std::option::Option<::std::string::String>,
    /// <p>The tags that apply to the component.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>Contains the name of the publisher if this is a third-party component. Otherwise, this property is empty.</p>
    pub publisher: ::std::option::Option<::std::string::String>,
    /// <p>Indicates whether component source is hidden from view in the console, and from component detail results for API, CLI, or SDK operations.</p>
    pub obfuscate: bool,
    /// <p>Contains product codes that are used for billing purposes for Amazon Web Services Marketplace components.</p>
    pub product_codes: ::std::option::Option<::std::vec::Vec<crate::types::ProductCodeListItem>>,
}
impl Component {
    /// <p>The Amazon Resource Name (ARN) of the component.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The name of the component.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The version of the component.</p>
    pub fn version(&self) -> ::std::option::Option<&str> {
        self.version.as_deref()
    }
    /// <p>The description of the component.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>Describes what change has been made in this version of the component, or what makes this version different from other versions of the component.</p>
    pub fn change_description(&self) -> ::std::option::Option<&str> {
        self.change_description.as_deref()
    }
    /// <p>The component type specifies whether Image Builder uses the component to build the image or only to test it.</p>
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::ComponentType> {
        self.r#type.as_ref()
    }
    /// <p>The operating system platform of the component.</p>
    pub fn platform(&self) -> ::std::option::Option<&crate::types::Platform> {
        self.platform.as_ref()
    }
    /// <p>The operating system (OS) version supported by the component. If the OS information is available, Image Builder performs a prefix match against the base image OS version during image recipe creation.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.supported_os_versions.is_none()`.
    pub fn supported_os_versions(&self) -> &[::std::string::String] {
        self.supported_os_versions.as_deref().unwrap_or_default()
    }
    /// <p>Describes the current status of the component.</p>
    pub fn state(&self) -> ::std::option::Option<&crate::types::ComponentState> {
        self.state.as_ref()
    }
    /// <p>Contains parameter details for each of the parameters that the component document defined for the component.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.parameters.is_none()`.
    pub fn parameters(&self) -> &[crate::types::ComponentParameterDetail] {
        self.parameters.as_deref().unwrap_or_default()
    }
    /// <p>The owner of the component.</p>
    pub fn owner(&self) -> ::std::option::Option<&str> {
        self.owner.as_deref()
    }
    /// <p>Component data contains the YAML document content for the component.</p>
    pub fn data(&self) -> ::std::option::Option<&str> {
        self.data.as_deref()
    }
    /// <p>The KMS key identifier used to encrypt the component. This can be either the Key ARN or the Alias ARN. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN">Key identifiers (KeyId)</a> in the <i>Key Management Service Developer Guide</i>.</p>
    pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
        self.kms_key_id.as_deref()
    }
    /// <p>The encryption status of the component.</p>
    pub fn encrypted(&self) -> ::std::option::Option<bool> {
        self.encrypted
    }
    /// <p>The date that Image Builder created the component.</p>
    pub fn date_created(&self) -> ::std::option::Option<&str> {
        self.date_created.as_deref()
    }
    /// <p>The tags that apply to the component.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
    /// <p>Contains the name of the publisher if this is a third-party component. Otherwise, this property is empty.</p>
    pub fn publisher(&self) -> ::std::option::Option<&str> {
        self.publisher.as_deref()
    }
    /// <p>Indicates whether component source is hidden from view in the console, and from component detail results for API, CLI, or SDK operations.</p>
    pub fn obfuscate(&self) -> bool {
        self.obfuscate
    }
    /// <p>Contains product codes that are used for billing purposes for Amazon Web Services Marketplace components.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.product_codes.is_none()`.
    pub fn product_codes(&self) -> &[crate::types::ProductCodeListItem] {
        self.product_codes.as_deref().unwrap_or_default()
    }
}
impl Component {
    /// Creates a new builder-style object to manufacture [`Component`](crate::types::Component).
    pub fn builder() -> crate::types::builders::ComponentBuilder {
        crate::types::builders::ComponentBuilder::default()
    }
}

/// A builder for [`Component`](crate::types::Component).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ComponentBuilder {
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) version: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) change_description: ::std::option::Option<::std::string::String>,
    pub(crate) r#type: ::std::option::Option<crate::types::ComponentType>,
    pub(crate) platform: ::std::option::Option<crate::types::Platform>,
    pub(crate) supported_os_versions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) state: ::std::option::Option<crate::types::ComponentState>,
    pub(crate) parameters: ::std::option::Option<::std::vec::Vec<crate::types::ComponentParameterDetail>>,
    pub(crate) owner: ::std::option::Option<::std::string::String>,
    pub(crate) data: ::std::option::Option<::std::string::String>,
    pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
    pub(crate) encrypted: ::std::option::Option<bool>,
    pub(crate) date_created: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) publisher: ::std::option::Option<::std::string::String>,
    pub(crate) obfuscate: ::std::option::Option<bool>,
    pub(crate) product_codes: ::std::option::Option<::std::vec::Vec<crate::types::ProductCodeListItem>>,
}
impl ComponentBuilder {
    /// <p>The Amazon Resource Name (ARN) of the component.</p>
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the component.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the component.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>The name of the component.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the component.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the component.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The version of the component.</p>
    pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The version of the component.</p>
    pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.version = input;
        self
    }
    /// <p>The version of the component.</p>
    pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.version
    }
    /// <p>The description of the component.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description of the component.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the component.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>Describes what change has been made in this version of the component, or what makes this version different from other versions of the component.</p>
    pub fn change_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.change_description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Describes what change has been made in this version of the component, or what makes this version different from other versions of the component.</p>
    pub fn set_change_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.change_description = input;
        self
    }
    /// <p>Describes what change has been made in this version of the component, or what makes this version different from other versions of the component.</p>
    pub fn get_change_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.change_description
    }
    /// <p>The component type specifies whether Image Builder uses the component to build the image or only to test it.</p>
    pub fn r#type(mut self, input: crate::types::ComponentType) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The component type specifies whether Image Builder uses the component to build the image or only to test it.</p>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::ComponentType>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The component type specifies whether Image Builder uses the component to build the image or only to test it.</p>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::ComponentType> {
        &self.r#type
    }
    /// <p>The operating system platform of the component.</p>
    pub fn platform(mut self, input: crate::types::Platform) -> Self {
        self.platform = ::std::option::Option::Some(input);
        self
    }
    /// <p>The operating system platform of the component.</p>
    pub fn set_platform(mut self, input: ::std::option::Option<crate::types::Platform>) -> Self {
        self.platform = input;
        self
    }
    /// <p>The operating system platform of the component.</p>
    pub fn get_platform(&self) -> &::std::option::Option<crate::types::Platform> {
        &self.platform
    }
    /// Appends an item to `supported_os_versions`.
    ///
    /// To override the contents of this collection use [`set_supported_os_versions`](Self::set_supported_os_versions).
    ///
    /// <p>The operating system (OS) version supported by the component. If the OS information is available, Image Builder performs a prefix match against the base image OS version during image recipe creation.</p>
    pub fn supported_os_versions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.supported_os_versions.unwrap_or_default();
        v.push(input.into());
        self.supported_os_versions = ::std::option::Option::Some(v);
        self
    }
    /// <p>The operating system (OS) version supported by the component. If the OS information is available, Image Builder performs a prefix match against the base image OS version during image recipe creation.</p>
    pub fn set_supported_os_versions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.supported_os_versions = input;
        self
    }
    /// <p>The operating system (OS) version supported by the component. If the OS information is available, Image Builder performs a prefix match against the base image OS version during image recipe creation.</p>
    pub fn get_supported_os_versions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.supported_os_versions
    }
    /// <p>Describes the current status of the component.</p>
    pub fn state(mut self, input: crate::types::ComponentState) -> Self {
        self.state = ::std::option::Option::Some(input);
        self
    }
    /// <p>Describes the current status of the component.</p>
    pub fn set_state(mut self, input: ::std::option::Option<crate::types::ComponentState>) -> Self {
        self.state = input;
        self
    }
    /// <p>Describes the current status of the component.</p>
    pub fn get_state(&self) -> &::std::option::Option<crate::types::ComponentState> {
        &self.state
    }
    /// Appends an item to `parameters`.
    ///
    /// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
    ///
    /// <p>Contains parameter details for each of the parameters that the component document defined for the component.</p>
    pub fn parameters(mut self, input: crate::types::ComponentParameterDetail) -> Self {
        let mut v = self.parameters.unwrap_or_default();
        v.push(input);
        self.parameters = ::std::option::Option::Some(v);
        self
    }
    /// <p>Contains parameter details for each of the parameters that the component document defined for the component.</p>
    pub fn set_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ComponentParameterDetail>>) -> Self {
        self.parameters = input;
        self
    }
    /// <p>Contains parameter details for each of the parameters that the component document defined for the component.</p>
    pub fn get_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ComponentParameterDetail>> {
        &self.parameters
    }
    /// <p>The owner of the component.</p>
    pub fn owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.owner = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The owner of the component.</p>
    pub fn set_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.owner = input;
        self
    }
    /// <p>The owner of the component.</p>
    pub fn get_owner(&self) -> &::std::option::Option<::std::string::String> {
        &self.owner
    }
    /// <p>Component data contains the YAML document content for the component.</p>
    pub fn data(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.data = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Component data contains the YAML document content for the component.</p>
    pub fn set_data(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.data = input;
        self
    }
    /// <p>Component data contains the YAML document content for the component.</p>
    pub fn get_data(&self) -> &::std::option::Option<::std::string::String> {
        &self.data
    }
    /// <p>The KMS key identifier used to encrypt the component. This can be either the Key ARN or the Alias ARN. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN">Key identifiers (KeyId)</a> in the <i>Key Management Service Developer Guide</i>.</p>
    pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.kms_key_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The KMS key identifier used to encrypt the component. This can be either the Key ARN or the Alias ARN. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN">Key identifiers (KeyId)</a> in the <i>Key Management Service Developer Guide</i>.</p>
    pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.kms_key_id = input;
        self
    }
    /// <p>The KMS key identifier used to encrypt the component. This can be either the Key ARN or the Alias ARN. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN">Key identifiers (KeyId)</a> in the <i>Key Management Service Developer Guide</i>.</p>
    pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.kms_key_id
    }
    /// <p>The encryption status of the component.</p>
    pub fn encrypted(mut self, input: bool) -> Self {
        self.encrypted = ::std::option::Option::Some(input);
        self
    }
    /// <p>The encryption status of the component.</p>
    pub fn set_encrypted(mut self, input: ::std::option::Option<bool>) -> Self {
        self.encrypted = input;
        self
    }
    /// <p>The encryption status of the component.</p>
    pub fn get_encrypted(&self) -> &::std::option::Option<bool> {
        &self.encrypted
    }
    /// <p>The date that Image Builder created the component.</p>
    pub fn date_created(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.date_created = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The date that Image Builder created the component.</p>
    pub fn set_date_created(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.date_created = input;
        self
    }
    /// <p>The date that Image Builder created the component.</p>
    pub fn get_date_created(&self) -> &::std::option::Option<::std::string::String> {
        &self.date_created
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The tags that apply to the component.</p>
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The tags that apply to the component.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>The tags that apply to the component.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// <p>Contains the name of the publisher if this is a third-party component. Otherwise, this property is empty.</p>
    pub fn publisher(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.publisher = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Contains the name of the publisher if this is a third-party component. Otherwise, this property is empty.</p>
    pub fn set_publisher(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.publisher = input;
        self
    }
    /// <p>Contains the name of the publisher if this is a third-party component. Otherwise, this property is empty.</p>
    pub fn get_publisher(&self) -> &::std::option::Option<::std::string::String> {
        &self.publisher
    }
    /// <p>Indicates whether component source is hidden from view in the console, and from component detail results for API, CLI, or SDK operations.</p>
    pub fn obfuscate(mut self, input: bool) -> Self {
        self.obfuscate = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether component source is hidden from view in the console, and from component detail results for API, CLI, or SDK operations.</p>
    pub fn set_obfuscate(mut self, input: ::std::option::Option<bool>) -> Self {
        self.obfuscate = input;
        self
    }
    /// <p>Indicates whether component source is hidden from view in the console, and from component detail results for API, CLI, or SDK operations.</p>
    pub fn get_obfuscate(&self) -> &::std::option::Option<bool> {
        &self.obfuscate
    }
    /// Appends an item to `product_codes`.
    ///
    /// To override the contents of this collection use [`set_product_codes`](Self::set_product_codes).
    ///
    /// <p>Contains product codes that are used for billing purposes for Amazon Web Services Marketplace components.</p>
    pub fn product_codes(mut self, input: crate::types::ProductCodeListItem) -> Self {
        let mut v = self.product_codes.unwrap_or_default();
        v.push(input);
        self.product_codes = ::std::option::Option::Some(v);
        self
    }
    /// <p>Contains product codes that are used for billing purposes for Amazon Web Services Marketplace components.</p>
    pub fn set_product_codes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ProductCodeListItem>>) -> Self {
        self.product_codes = input;
        self
    }
    /// <p>Contains product codes that are used for billing purposes for Amazon Web Services Marketplace components.</p>
    pub fn get_product_codes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ProductCodeListItem>> {
        &self.product_codes
    }
    /// Consumes the builder and constructs a [`Component`](crate::types::Component).
    pub fn build(self) -> crate::types::Component {
        crate::types::Component {
            arn: self.arn,
            name: self.name,
            version: self.version,
            description: self.description,
            change_description: self.change_description,
            r#type: self.r#type,
            platform: self.platform,
            supported_os_versions: self.supported_os_versions,
            state: self.state,
            parameters: self.parameters,
            owner: self.owner,
            data: self.data,
            kms_key_id: self.kms_key_id,
            encrypted: self.encrypted,
            date_created: self.date_created,
            tags: self.tags,
            publisher: self.publisher,
            obfuscate: self.obfuscate.unwrap_or_default(),
            product_codes: self.product_codes,
        }
    }
}