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
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Describes a subnet.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Subnet {
    /// <p>The Availability Zone of the subnet.</p>
    pub availability_zone: ::std::option::Option<::std::string::String>,
    /// <p>The AZ ID of the subnet.</p>
    pub availability_zone_id: ::std::option::Option<::std::string::String>,
    /// <p>The number of unused private IPv4 addresses in the subnet. The IPv4 addresses for any stopped instances are considered unavailable.</p>
    pub available_ip_address_count: ::std::option::Option<i32>,
    /// <p>The IPv4 CIDR block assigned to the subnet.</p>
    pub cidr_block: ::std::option::Option<::std::string::String>,
    /// <p>Indicates whether this is the default subnet for the Availability Zone.</p>
    pub default_for_az: ::std::option::Option<bool>,
    /// <p> Indicates the device position for local network interfaces in this subnet. For example, <code>1</code> indicates local network interfaces in this subnet are the secondary network interface (eth1). </p>
    pub enable_lni_at_device_index: ::std::option::Option<i32>,
    /// <p>Indicates whether instances launched in this subnet receive a public IPv4 address.</p>
    pub map_public_ip_on_launch: ::std::option::Option<bool>,
    /// <p>Indicates whether a network interface created in this subnet (including a network interface created by <code>RunInstances</code>) receives a customer-owned IPv4 address.</p>
    pub map_customer_owned_ip_on_launch: ::std::option::Option<bool>,
    /// <p>The customer-owned IPv4 address pool associated with the subnet.</p>
    pub customer_owned_ipv4_pool: ::std::option::Option<::std::string::String>,
    /// <p>The current state of the subnet.</p>
    pub state: ::std::option::Option<crate::types::SubnetState>,
    /// <p>The ID of the subnet.</p>
    pub subnet_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the VPC the subnet is in.</p>
    pub vpc_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the Amazon Web Services account that owns the subnet.</p>
    pub owner_id: ::std::option::Option<::std::string::String>,
    /// <p>Indicates whether a network interface created in this subnet (including a network interface created by <code>RunInstances</code>) receives an IPv6 address.</p>
    pub assign_ipv6_address_on_creation: ::std::option::Option<bool>,
    /// <p>Information about the IPv6 CIDR blocks associated with the subnet.</p>
    pub ipv6_cidr_block_association_set: ::std::option::Option<::std::vec::Vec<crate::types::SubnetIpv6CidrBlockAssociation>>,
    /// <p>Any tags assigned to the subnet.</p>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    /// <p>The Amazon Resource Name (ARN) of the subnet.</p>
    pub subnet_arn: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
    pub outpost_arn: ::std::option::Option<::std::string::String>,
    /// <p>Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.</p>
    pub enable_dns64: ::std::option::Option<bool>,
    /// <p>Indicates whether this is an IPv6 only subnet.</p>
    pub ipv6_native: ::std::option::Option<bool>,
    /// <p>The type of hostnames to assign to instances in the subnet at launch. An instance hostname is based on the IPv4 address or ID of the instance.</p>
    pub private_dns_name_options_on_launch: ::std::option::Option<crate::types::PrivateDnsNameOptionsOnLaunch>,
}
impl Subnet {
    /// <p>The Availability Zone of the subnet.</p>
    pub fn availability_zone(&self) -> ::std::option::Option<&str> {
        self.availability_zone.as_deref()
    }
    /// <p>The AZ ID of the subnet.</p>
    pub fn availability_zone_id(&self) -> ::std::option::Option<&str> {
        self.availability_zone_id.as_deref()
    }
    /// <p>The number of unused private IPv4 addresses in the subnet. The IPv4 addresses for any stopped instances are considered unavailable.</p>
    pub fn available_ip_address_count(&self) -> ::std::option::Option<i32> {
        self.available_ip_address_count
    }
    /// <p>The IPv4 CIDR block assigned to the subnet.</p>
    pub fn cidr_block(&self) -> ::std::option::Option<&str> {
        self.cidr_block.as_deref()
    }
    /// <p>Indicates whether this is the default subnet for the Availability Zone.</p>
    pub fn default_for_az(&self) -> ::std::option::Option<bool> {
        self.default_for_az
    }
    /// <p> Indicates the device position for local network interfaces in this subnet. For example, <code>1</code> indicates local network interfaces in this subnet are the secondary network interface (eth1). </p>
    pub fn enable_lni_at_device_index(&self) -> ::std::option::Option<i32> {
        self.enable_lni_at_device_index
    }
    /// <p>Indicates whether instances launched in this subnet receive a public IPv4 address.</p>
    pub fn map_public_ip_on_launch(&self) -> ::std::option::Option<bool> {
        self.map_public_ip_on_launch
    }
    /// <p>Indicates whether a network interface created in this subnet (including a network interface created by <code>RunInstances</code>) receives a customer-owned IPv4 address.</p>
    pub fn map_customer_owned_ip_on_launch(&self) -> ::std::option::Option<bool> {
        self.map_customer_owned_ip_on_launch
    }
    /// <p>The customer-owned IPv4 address pool associated with the subnet.</p>
    pub fn customer_owned_ipv4_pool(&self) -> ::std::option::Option<&str> {
        self.customer_owned_ipv4_pool.as_deref()
    }
    /// <p>The current state of the subnet.</p>
    pub fn state(&self) -> ::std::option::Option<&crate::types::SubnetState> {
        self.state.as_ref()
    }
    /// <p>The ID of the subnet.</p>
    pub fn subnet_id(&self) -> ::std::option::Option<&str> {
        self.subnet_id.as_deref()
    }
    /// <p>The ID of the VPC the subnet is in.</p>
    pub fn vpc_id(&self) -> ::std::option::Option<&str> {
        self.vpc_id.as_deref()
    }
    /// <p>The ID of the Amazon Web Services account that owns the subnet.</p>
    pub fn owner_id(&self) -> ::std::option::Option<&str> {
        self.owner_id.as_deref()
    }
    /// <p>Indicates whether a network interface created in this subnet (including a network interface created by <code>RunInstances</code>) receives an IPv6 address.</p>
    pub fn assign_ipv6_address_on_creation(&self) -> ::std::option::Option<bool> {
        self.assign_ipv6_address_on_creation
    }
    /// <p>Information about the IPv6 CIDR blocks associated with the subnet.</p>
    pub fn ipv6_cidr_block_association_set(&self) -> ::std::option::Option<&[crate::types::SubnetIpv6CidrBlockAssociation]> {
        self.ipv6_cidr_block_association_set.as_deref()
    }
    /// <p>Any tags assigned to the subnet.</p>
    pub fn tags(&self) -> ::std::option::Option<&[crate::types::Tag]> {
        self.tags.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the subnet.</p>
    pub fn subnet_arn(&self) -> ::std::option::Option<&str> {
        self.subnet_arn.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
    pub fn outpost_arn(&self) -> ::std::option::Option<&str> {
        self.outpost_arn.as_deref()
    }
    /// <p>Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.</p>
    pub fn enable_dns64(&self) -> ::std::option::Option<bool> {
        self.enable_dns64
    }
    /// <p>Indicates whether this is an IPv6 only subnet.</p>
    pub fn ipv6_native(&self) -> ::std::option::Option<bool> {
        self.ipv6_native
    }
    /// <p>The type of hostnames to assign to instances in the subnet at launch. An instance hostname is based on the IPv4 address or ID of the instance.</p>
    pub fn private_dns_name_options_on_launch(&self) -> ::std::option::Option<&crate::types::PrivateDnsNameOptionsOnLaunch> {
        self.private_dns_name_options_on_launch.as_ref()
    }
}
impl Subnet {
    /// Creates a new builder-style object to manufacture [`Subnet`](crate::types::Subnet).
    pub fn builder() -> crate::types::builders::SubnetBuilder {
        crate::types::builders::SubnetBuilder::default()
    }
}

/// A builder for [`Subnet`](crate::types::Subnet).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct SubnetBuilder {
    pub(crate) availability_zone: ::std::option::Option<::std::string::String>,
    pub(crate) availability_zone_id: ::std::option::Option<::std::string::String>,
    pub(crate) available_ip_address_count: ::std::option::Option<i32>,
    pub(crate) cidr_block: ::std::option::Option<::std::string::String>,
    pub(crate) default_for_az: ::std::option::Option<bool>,
    pub(crate) enable_lni_at_device_index: ::std::option::Option<i32>,
    pub(crate) map_public_ip_on_launch: ::std::option::Option<bool>,
    pub(crate) map_customer_owned_ip_on_launch: ::std::option::Option<bool>,
    pub(crate) customer_owned_ipv4_pool: ::std::option::Option<::std::string::String>,
    pub(crate) state: ::std::option::Option<crate::types::SubnetState>,
    pub(crate) subnet_id: ::std::option::Option<::std::string::String>,
    pub(crate) vpc_id: ::std::option::Option<::std::string::String>,
    pub(crate) owner_id: ::std::option::Option<::std::string::String>,
    pub(crate) assign_ipv6_address_on_creation: ::std::option::Option<bool>,
    pub(crate) ipv6_cidr_block_association_set: ::std::option::Option<::std::vec::Vec<crate::types::SubnetIpv6CidrBlockAssociation>>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    pub(crate) subnet_arn: ::std::option::Option<::std::string::String>,
    pub(crate) outpost_arn: ::std::option::Option<::std::string::String>,
    pub(crate) enable_dns64: ::std::option::Option<bool>,
    pub(crate) ipv6_native: ::std::option::Option<bool>,
    pub(crate) private_dns_name_options_on_launch: ::std::option::Option<crate::types::PrivateDnsNameOptionsOnLaunch>,
}
impl SubnetBuilder {
    /// <p>The Availability Zone of the subnet.</p>
    pub fn availability_zone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.availability_zone = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Availability Zone of the subnet.</p>
    pub fn set_availability_zone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.availability_zone = input;
        self
    }
    /// <p>The Availability Zone of the subnet.</p>
    pub fn get_availability_zone(&self) -> &::std::option::Option<::std::string::String> {
        &self.availability_zone
    }
    /// <p>The AZ ID of the subnet.</p>
    pub fn availability_zone_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.availability_zone_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The AZ ID of the subnet.</p>
    pub fn set_availability_zone_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.availability_zone_id = input;
        self
    }
    /// <p>The AZ ID of the subnet.</p>
    pub fn get_availability_zone_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.availability_zone_id
    }
    /// <p>The number of unused private IPv4 addresses in the subnet. The IPv4 addresses for any stopped instances are considered unavailable.</p>
    pub fn available_ip_address_count(mut self, input: i32) -> Self {
        self.available_ip_address_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of unused private IPv4 addresses in the subnet. The IPv4 addresses for any stopped instances are considered unavailable.</p>
    pub fn set_available_ip_address_count(mut self, input: ::std::option::Option<i32>) -> Self {
        self.available_ip_address_count = input;
        self
    }
    /// <p>The number of unused private IPv4 addresses in the subnet. The IPv4 addresses for any stopped instances are considered unavailable.</p>
    pub fn get_available_ip_address_count(&self) -> &::std::option::Option<i32> {
        &self.available_ip_address_count
    }
    /// <p>The IPv4 CIDR block assigned to the subnet.</p>
    pub fn cidr_block(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.cidr_block = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The IPv4 CIDR block assigned to the subnet.</p>
    pub fn set_cidr_block(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.cidr_block = input;
        self
    }
    /// <p>The IPv4 CIDR block assigned to the subnet.</p>
    pub fn get_cidr_block(&self) -> &::std::option::Option<::std::string::String> {
        &self.cidr_block
    }
    /// <p>Indicates whether this is the default subnet for the Availability Zone.</p>
    pub fn default_for_az(mut self, input: bool) -> Self {
        self.default_for_az = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether this is the default subnet for the Availability Zone.</p>
    pub fn set_default_for_az(mut self, input: ::std::option::Option<bool>) -> Self {
        self.default_for_az = input;
        self
    }
    /// <p>Indicates whether this is the default subnet for the Availability Zone.</p>
    pub fn get_default_for_az(&self) -> &::std::option::Option<bool> {
        &self.default_for_az
    }
    /// <p> Indicates the device position for local network interfaces in this subnet. For example, <code>1</code> indicates local network interfaces in this subnet are the secondary network interface (eth1). </p>
    pub fn enable_lni_at_device_index(mut self, input: i32) -> Self {
        self.enable_lni_at_device_index = ::std::option::Option::Some(input);
        self
    }
    /// <p> Indicates the device position for local network interfaces in this subnet. For example, <code>1</code> indicates local network interfaces in this subnet are the secondary network interface (eth1). </p>
    pub fn set_enable_lni_at_device_index(mut self, input: ::std::option::Option<i32>) -> Self {
        self.enable_lni_at_device_index = input;
        self
    }
    /// <p> Indicates the device position for local network interfaces in this subnet. For example, <code>1</code> indicates local network interfaces in this subnet are the secondary network interface (eth1). </p>
    pub fn get_enable_lni_at_device_index(&self) -> &::std::option::Option<i32> {
        &self.enable_lni_at_device_index
    }
    /// <p>Indicates whether instances launched in this subnet receive a public IPv4 address.</p>
    pub fn map_public_ip_on_launch(mut self, input: bool) -> Self {
        self.map_public_ip_on_launch = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether instances launched in this subnet receive a public IPv4 address.</p>
    pub fn set_map_public_ip_on_launch(mut self, input: ::std::option::Option<bool>) -> Self {
        self.map_public_ip_on_launch = input;
        self
    }
    /// <p>Indicates whether instances launched in this subnet receive a public IPv4 address.</p>
    pub fn get_map_public_ip_on_launch(&self) -> &::std::option::Option<bool> {
        &self.map_public_ip_on_launch
    }
    /// <p>Indicates whether a network interface created in this subnet (including a network interface created by <code>RunInstances</code>) receives a customer-owned IPv4 address.</p>
    pub fn map_customer_owned_ip_on_launch(mut self, input: bool) -> Self {
        self.map_customer_owned_ip_on_launch = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether a network interface created in this subnet (including a network interface created by <code>RunInstances</code>) receives a customer-owned IPv4 address.</p>
    pub fn set_map_customer_owned_ip_on_launch(mut self, input: ::std::option::Option<bool>) -> Self {
        self.map_customer_owned_ip_on_launch = input;
        self
    }
    /// <p>Indicates whether a network interface created in this subnet (including a network interface created by <code>RunInstances</code>) receives a customer-owned IPv4 address.</p>
    pub fn get_map_customer_owned_ip_on_launch(&self) -> &::std::option::Option<bool> {
        &self.map_customer_owned_ip_on_launch
    }
    /// <p>The customer-owned IPv4 address pool associated with the subnet.</p>
    pub fn customer_owned_ipv4_pool(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.customer_owned_ipv4_pool = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The customer-owned IPv4 address pool associated with the subnet.</p>
    pub fn set_customer_owned_ipv4_pool(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.customer_owned_ipv4_pool = input;
        self
    }
    /// <p>The customer-owned IPv4 address pool associated with the subnet.</p>
    pub fn get_customer_owned_ipv4_pool(&self) -> &::std::option::Option<::std::string::String> {
        &self.customer_owned_ipv4_pool
    }
    /// <p>The current state of the subnet.</p>
    pub fn state(mut self, input: crate::types::SubnetState) -> Self {
        self.state = ::std::option::Option::Some(input);
        self
    }
    /// <p>The current state of the subnet.</p>
    pub fn set_state(mut self, input: ::std::option::Option<crate::types::SubnetState>) -> Self {
        self.state = input;
        self
    }
    /// <p>The current state of the subnet.</p>
    pub fn get_state(&self) -> &::std::option::Option<crate::types::SubnetState> {
        &self.state
    }
    /// <p>The ID of the subnet.</p>
    pub fn subnet_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.subnet_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the subnet.</p>
    pub fn set_subnet_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.subnet_id = input;
        self
    }
    /// <p>The ID of the subnet.</p>
    pub fn get_subnet_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.subnet_id
    }
    /// <p>The ID of the VPC the subnet is in.</p>
    pub fn vpc_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.vpc_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the VPC the subnet is in.</p>
    pub fn set_vpc_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.vpc_id = input;
        self
    }
    /// <p>The ID of the VPC the subnet is in.</p>
    pub fn get_vpc_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.vpc_id
    }
    /// <p>The ID of the Amazon Web Services account that owns the subnet.</p>
    pub fn owner_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.owner_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Amazon Web Services account that owns the subnet.</p>
    pub fn set_owner_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.owner_id = input;
        self
    }
    /// <p>The ID of the Amazon Web Services account that owns the subnet.</p>
    pub fn get_owner_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.owner_id
    }
    /// <p>Indicates whether a network interface created in this subnet (including a network interface created by <code>RunInstances</code>) receives an IPv6 address.</p>
    pub fn assign_ipv6_address_on_creation(mut self, input: bool) -> Self {
        self.assign_ipv6_address_on_creation = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether a network interface created in this subnet (including a network interface created by <code>RunInstances</code>) receives an IPv6 address.</p>
    pub fn set_assign_ipv6_address_on_creation(mut self, input: ::std::option::Option<bool>) -> Self {
        self.assign_ipv6_address_on_creation = input;
        self
    }
    /// <p>Indicates whether a network interface created in this subnet (including a network interface created by <code>RunInstances</code>) receives an IPv6 address.</p>
    pub fn get_assign_ipv6_address_on_creation(&self) -> &::std::option::Option<bool> {
        &self.assign_ipv6_address_on_creation
    }
    /// Appends an item to `ipv6_cidr_block_association_set`.
    ///
    /// To override the contents of this collection use [`set_ipv6_cidr_block_association_set`](Self::set_ipv6_cidr_block_association_set).
    ///
    /// <p>Information about the IPv6 CIDR blocks associated with the subnet.</p>
    pub fn ipv6_cidr_block_association_set(mut self, input: crate::types::SubnetIpv6CidrBlockAssociation) -> Self {
        let mut v = self.ipv6_cidr_block_association_set.unwrap_or_default();
        v.push(input);
        self.ipv6_cidr_block_association_set = ::std::option::Option::Some(v);
        self
    }
    /// <p>Information about the IPv6 CIDR blocks associated with the subnet.</p>
    pub fn set_ipv6_cidr_block_association_set(
        mut self,
        input: ::std::option::Option<::std::vec::Vec<crate::types::SubnetIpv6CidrBlockAssociation>>,
    ) -> Self {
        self.ipv6_cidr_block_association_set = input;
        self
    }
    /// <p>Information about the IPv6 CIDR blocks associated with the subnet.</p>
    pub fn get_ipv6_cidr_block_association_set(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SubnetIpv6CidrBlockAssociation>> {
        &self.ipv6_cidr_block_association_set
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>Any tags assigned to the subnet.</p>
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
        let mut v = self.tags.unwrap_or_default();
        v.push(input);
        self.tags = ::std::option::Option::Some(v);
        self
    }
    /// <p>Any tags assigned to the subnet.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>Any tags assigned to the subnet.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// <p>The Amazon Resource Name (ARN) of the subnet.</p>
    pub fn subnet_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.subnet_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the subnet.</p>
    pub fn set_subnet_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.subnet_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the subnet.</p>
    pub fn get_subnet_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.subnet_arn
    }
    /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
    pub fn outpost_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.outpost_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
    pub fn set_outpost_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.outpost_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Outpost.</p>
    pub fn get_outpost_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.outpost_arn
    }
    /// <p>Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.</p>
    pub fn enable_dns64(mut self, input: bool) -> Self {
        self.enable_dns64 = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.</p>
    pub fn set_enable_dns64(mut self, input: ::std::option::Option<bool>) -> Self {
        self.enable_dns64 = input;
        self
    }
    /// <p>Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.</p>
    pub fn get_enable_dns64(&self) -> &::std::option::Option<bool> {
        &self.enable_dns64
    }
    /// <p>Indicates whether this is an IPv6 only subnet.</p>
    pub fn ipv6_native(mut self, input: bool) -> Self {
        self.ipv6_native = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether this is an IPv6 only subnet.</p>
    pub fn set_ipv6_native(mut self, input: ::std::option::Option<bool>) -> Self {
        self.ipv6_native = input;
        self
    }
    /// <p>Indicates whether this is an IPv6 only subnet.</p>
    pub fn get_ipv6_native(&self) -> &::std::option::Option<bool> {
        &self.ipv6_native
    }
    /// <p>The type of hostnames to assign to instances in the subnet at launch. An instance hostname is based on the IPv4 address or ID of the instance.</p>
    pub fn private_dns_name_options_on_launch(mut self, input: crate::types::PrivateDnsNameOptionsOnLaunch) -> Self {
        self.private_dns_name_options_on_launch = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of hostnames to assign to instances in the subnet at launch. An instance hostname is based on the IPv4 address or ID of the instance.</p>
    pub fn set_private_dns_name_options_on_launch(mut self, input: ::std::option::Option<crate::types::PrivateDnsNameOptionsOnLaunch>) -> Self {
        self.private_dns_name_options_on_launch = input;
        self
    }
    /// <p>The type of hostnames to assign to instances in the subnet at launch. An instance hostname is based on the IPv4 address or ID of the instance.</p>
    pub fn get_private_dns_name_options_on_launch(&self) -> &::std::option::Option<crate::types::PrivateDnsNameOptionsOnLaunch> {
        &self.private_dns_name_options_on_launch
    }
    /// Consumes the builder and constructs a [`Subnet`](crate::types::Subnet).
    pub fn build(self) -> crate::types::Subnet {
        crate::types::Subnet {
            availability_zone: self.availability_zone,
            availability_zone_id: self.availability_zone_id,
            available_ip_address_count: self.available_ip_address_count,
            cidr_block: self.cidr_block,
            default_for_az: self.default_for_az,
            enable_lni_at_device_index: self.enable_lni_at_device_index,
            map_public_ip_on_launch: self.map_public_ip_on_launch,
            map_customer_owned_ip_on_launch: self.map_customer_owned_ip_on_launch,
            customer_owned_ipv4_pool: self.customer_owned_ipv4_pool,
            state: self.state,
            subnet_id: self.subnet_id,
            vpc_id: self.vpc_id,
            owner_id: self.owner_id,
            assign_ipv6_address_on_creation: self.assign_ipv6_address_on_creation,
            ipv6_cidr_block_association_set: self.ipv6_cidr_block_association_set,
            tags: self.tags,
            subnet_arn: self.subnet_arn,
            outpost_arn: self.outpost_arn,
            enable_dns64: self.enable_dns64,
            ipv6_native: self.ipv6_native,
            private_dns_name_options_on_launch: self.private_dns_name_options_on_launch,
        }
    }
}