205 205 | /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.associated_subnets.is_none()`.
|
206 206 | pub fn associated_subnets(&self) -> &[::std::string::String] {
|
207 207 | self.associated_subnets.as_deref().unwrap_or_default()
|
208 208 | }
|
209 209 | }
|
210 210 | static NETWORKINTERFACE_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
|
211 211 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#NetworkInterface", "com.amazonaws.ec2", "NetworkInterface");
|
212 212 | static NETWORKINTERFACE_MEMBER_ASSOCIATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
213 213 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#NetworkInterface$Association", "com.amazonaws.ec2", "NetworkInterface"),
|
214 214 | ::aws_smithy_schema::ShapeType::Structure,
|
215 - | "association",
|
215 + | "Association",
|
216 216 | 0,
|
217 217 | )
|
218 218 | .with_xml_name("association");
|
219 219 | static NETWORKINTERFACE_MEMBER_ATTACHMENT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
220 220 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#NetworkInterface$Attachment", "com.amazonaws.ec2", "NetworkInterface"),
|
221 221 | ::aws_smithy_schema::ShapeType::Structure,
|
222 - | "attachment",
|
222 + | "Attachment",
|
223 223 | 1,
|
224 224 | )
|
225 225 | .with_xml_name("attachment");
|
226 226 | static NETWORKINTERFACE_MEMBER_AVAILABILITY_ZONE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
227 227 | ::aws_smithy_schema::ShapeId::from_static(
|
228 228 | "com.amazonaws.ec2#NetworkInterface$AvailabilityZone",
|
229 229 | "com.amazonaws.ec2",
|
230 230 | "NetworkInterface",
|
231 231 | ),
|
232 232 | ::aws_smithy_schema::ShapeType::String,
|
233 - | "availability_zone",
|
233 + | "AvailabilityZone",
|
234 234 | 2,
|
235 235 | )
|
236 236 | .with_xml_name("availabilityZone");
|
237 237 | static NETWORKINTERFACE_MEMBER_CONNECTION_TRACKING_CONFIGURATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
238 238 | ::aws_smithy_schema::ShapeId::from_static(
|
239 239 | "com.amazonaws.ec2#NetworkInterface$ConnectionTrackingConfiguration",
|
240 240 | "com.amazonaws.ec2",
|
241 241 | "NetworkInterface",
|
242 242 | ),
|
243 243 | ::aws_smithy_schema::ShapeType::Structure,
|
244 - | "connection_tracking_configuration",
|
244 + | "ConnectionTrackingConfiguration",
|
245 245 | 3,
|
246 246 | )
|
247 247 | .with_xml_name("connectionTrackingConfiguration");
|
248 248 | static NETWORKINTERFACE_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
249 249 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#NetworkInterface$Description", "com.amazonaws.ec2", "NetworkInterface"),
|
250 250 | ::aws_smithy_schema::ShapeType::String,
|
251 - | "description",
|
251 + | "Description",
|
252 252 | 4,
|
253 253 | )
|
254 254 | .with_xml_name("description");
|
255 255 | static NETWORKINTERFACE_MEMBER_GROUPS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
256 256 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#NetworkInterface$Groups", "com.amazonaws.ec2", "NetworkInterface"),
|
257 257 | ::aws_smithy_schema::ShapeType::List,
|
258 - | "groups",
|
258 + | "Groups",
|
259 259 | 5,
|
260 260 | )
|
261 261 | .with_xml_name("groupSet");
|
262 262 | static NETWORKINTERFACE_MEMBER_INTERFACE_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
263 263 | ::aws_smithy_schema::ShapeId::from_static(
|
264 264 | "com.amazonaws.ec2#NetworkInterface$InterfaceType",
|
265 265 | "com.amazonaws.ec2",
|
266 266 | "NetworkInterface",
|
267 267 | ),
|
268 268 | ::aws_smithy_schema::ShapeType::String,
|
269 - | "interface_type",
|
269 + | "InterfaceType",
|
270 270 | 6,
|
271 271 | )
|
272 272 | .with_xml_name("interfaceType");
|
273 273 | static NETWORKINTERFACE_MEMBER_IPV6_ADDRESSES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
274 274 | ::aws_smithy_schema::ShapeId::from_static(
|
275 275 | "com.amazonaws.ec2#NetworkInterface$Ipv6Addresses",
|
276 276 | "com.amazonaws.ec2",
|
277 277 | "NetworkInterface",
|
278 278 | ),
|
279 279 | ::aws_smithy_schema::ShapeType::List,
|
280 - | "ipv6_addresses",
|
280 + | "Ipv6Addresses",
|
281 281 | 7,
|
282 282 | )
|
283 283 | .with_xml_name("ipv6AddressesSet");
|
284 284 | static NETWORKINTERFACE_MEMBER_MAC_ADDRESS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
285 285 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#NetworkInterface$MacAddress", "com.amazonaws.ec2", "NetworkInterface"),
|
286 286 | ::aws_smithy_schema::ShapeType::String,
|
287 - | "mac_address",
|
287 + | "MacAddress",
|
288 288 | 8,
|
289 289 | )
|
290 290 | .with_xml_name("macAddress");
|
291 291 | static NETWORKINTERFACE_MEMBER_NETWORK_INTERFACE_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
292 292 | ::aws_smithy_schema::ShapeId::from_static(
|
293 293 | "com.amazonaws.ec2#NetworkInterface$NetworkInterfaceId",
|
294 294 | "com.amazonaws.ec2",
|
295 295 | "NetworkInterface",
|
296 296 | ),
|
297 297 | ::aws_smithy_schema::ShapeType::String,
|
298 - | "network_interface_id",
|
298 + | "NetworkInterfaceId",
|
299 299 | 9,
|
300 300 | )
|
301 301 | .with_xml_name("networkInterfaceId");
|
302 302 | static NETWORKINTERFACE_MEMBER_OUTPOST_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
303 303 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#NetworkInterface$OutpostArn", "com.amazonaws.ec2", "NetworkInterface"),
|
304 304 | ::aws_smithy_schema::ShapeType::String,
|
305 - | "outpost_arn",
|
305 + | "OutpostArn",
|
306 306 | 10,
|
307 307 | )
|
308 308 | .with_xml_name("outpostArn");
|
309 309 | static NETWORKINTERFACE_MEMBER_OWNER_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
310 310 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#NetworkInterface$OwnerId", "com.amazonaws.ec2", "NetworkInterface"),
|
311 311 | ::aws_smithy_schema::ShapeType::String,
|
312 - | "owner_id",
|
312 + | "OwnerId",
|
313 313 | 11,
|
314 314 | )
|
315 315 | .with_xml_name("ownerId");
|
316 316 | static NETWORKINTERFACE_MEMBER_PRIVATE_DNS_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
317 317 | ::aws_smithy_schema::ShapeId::from_static(
|
318 318 | "com.amazonaws.ec2#NetworkInterface$PrivateDnsName",
|
319 319 | "com.amazonaws.ec2",
|
320 320 | "NetworkInterface",
|
321 321 | ),
|
322 322 | ::aws_smithy_schema::ShapeType::String,
|
323 - | "private_dns_name",
|
323 + | "PrivateDnsName",
|
324 324 | 12,
|
325 325 | )
|
326 326 | .with_xml_name("privateDnsName");
|
327 327 | static NETWORKINTERFACE_MEMBER_PUBLIC_DNS_NAME: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
328 328 | ::aws_smithy_schema::ShapeId::from_static(
|
329 329 | "com.amazonaws.ec2#NetworkInterface$PublicDnsName",
|
330 330 | "com.amazonaws.ec2",
|
331 331 | "NetworkInterface",
|
332 332 | ),
|
333 333 | ::aws_smithy_schema::ShapeType::String,
|
334 - | "public_dns_name",
|
334 + | "PublicDnsName",
|
335 335 | 13,
|
336 336 | )
|
337 337 | .with_xml_name("publicDnsName");
|
338 338 | static NETWORKINTERFACE_MEMBER_PUBLIC_IP_DNS_NAME_OPTIONS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
339 339 | ::aws_smithy_schema::ShapeId::from_static(
|
340 340 | "com.amazonaws.ec2#NetworkInterface$PublicIpDnsNameOptions",
|
341 341 | "com.amazonaws.ec2",
|
342 342 | "NetworkInterface",
|
343 343 | ),
|
344 344 | ::aws_smithy_schema::ShapeType::Structure,
|
345 - | "public_ip_dns_name_options",
|
345 + | "PublicIpDnsNameOptions",
|
346 346 | 14,
|
347 347 | )
|
348 348 | .with_xml_name("publicIpDnsNameOptions");
|
349 349 | static NETWORKINTERFACE_MEMBER_PRIVATE_IP_ADDRESS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
350 350 | ::aws_smithy_schema::ShapeId::from_static(
|
351 351 | "com.amazonaws.ec2#NetworkInterface$PrivateIpAddress",
|
352 352 | "com.amazonaws.ec2",
|
353 353 | "NetworkInterface",
|
354 354 | ),
|
355 355 | ::aws_smithy_schema::ShapeType::String,
|
356 - | "private_ip_address",
|
356 + | "PrivateIpAddress",
|
357 357 | 15,
|
358 358 | )
|
359 359 | .with_xml_name("privateIpAddress");
|
360 360 | static NETWORKINTERFACE_MEMBER_PRIVATE_IP_ADDRESSES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
361 361 | ::aws_smithy_schema::ShapeId::from_static(
|
362 362 | "com.amazonaws.ec2#NetworkInterface$PrivateIpAddresses",
|
363 363 | "com.amazonaws.ec2",
|
364 364 | "NetworkInterface",
|
365 365 | ),
|
366 366 | ::aws_smithy_schema::ShapeType::List,
|
367 - | "private_ip_addresses",
|
367 + | "PrivateIpAddresses",
|
368 368 | 16,
|
369 369 | )
|
370 370 | .with_xml_name("privateIpAddressesSet");
|
371 371 | static NETWORKINTERFACE_MEMBER_IPV4_PREFIXES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
372 372 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#NetworkInterface$Ipv4Prefixes", "com.amazonaws.ec2", "NetworkInterface"),
|
373 373 | ::aws_smithy_schema::ShapeType::List,
|
374 - | "ipv4_prefixes",
|
374 + | "Ipv4Prefixes",
|
375 375 | 17,
|
376 376 | )
|
377 377 | .with_xml_name("ipv4PrefixSet");
|
378 378 | static NETWORKINTERFACE_MEMBER_IPV6_PREFIXES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
379 379 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#NetworkInterface$Ipv6Prefixes", "com.amazonaws.ec2", "NetworkInterface"),
|
380 380 | ::aws_smithy_schema::ShapeType::List,
|
381 - | "ipv6_prefixes",
|
381 + | "Ipv6Prefixes",
|
382 382 | 18,
|
383 383 | )
|
384 384 | .with_xml_name("ipv6PrefixSet");
|
385 385 | static NETWORKINTERFACE_MEMBER_REQUESTER_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
386 386 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#NetworkInterface$RequesterId", "com.amazonaws.ec2", "NetworkInterface"),
|
387 387 | ::aws_smithy_schema::ShapeType::String,
|
388 - | "requester_id",
|
388 + | "RequesterId",
|
389 389 | 19,
|
390 390 | )
|
391 391 | .with_xml_name("requesterId");
|
392 392 | static NETWORKINTERFACE_MEMBER_REQUESTER_MANAGED: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
393 393 | ::aws_smithy_schema::ShapeId::from_static(
|
394 394 | "com.amazonaws.ec2#NetworkInterface$RequesterManaged",
|
395 395 | "com.amazonaws.ec2",
|
396 396 | "NetworkInterface",
|
397 397 | ),
|
398 398 | ::aws_smithy_schema::ShapeType::Boolean,
|
399 - | "requester_managed",
|
399 + | "RequesterManaged",
|
400 400 | 20,
|
401 401 | )
|
402 402 | .with_xml_name("requesterManaged");
|
403 403 | static NETWORKINTERFACE_MEMBER_SOURCE_DEST_CHECK: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
404 404 | ::aws_smithy_schema::ShapeId::from_static(
|
405 405 | "com.amazonaws.ec2#NetworkInterface$SourceDestCheck",
|
406 406 | "com.amazonaws.ec2",
|
407 407 | "NetworkInterface",
|
408 408 | ),
|
409 409 | ::aws_smithy_schema::ShapeType::Boolean,
|
410 - | "source_dest_check",
|
410 + | "SourceDestCheck",
|
411 411 | 21,
|
412 412 | )
|
413 413 | .with_xml_name("sourceDestCheck");
|
414 414 | static NETWORKINTERFACE_MEMBER_STATUS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
415 415 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#NetworkInterface$Status", "com.amazonaws.ec2", "NetworkInterface"),
|
416 416 | ::aws_smithy_schema::ShapeType::String,
|
417 - | "status",
|
417 + | "Status",
|
418 418 | 22,
|
419 419 | )
|
420 420 | .with_xml_name("status");
|
421 421 | static NETWORKINTERFACE_MEMBER_SUBNET_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
422 422 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#NetworkInterface$SubnetId", "com.amazonaws.ec2", "NetworkInterface"),
|
423 423 | ::aws_smithy_schema::ShapeType::String,
|
424 - | "subnet_id",
|
424 + | "SubnetId",
|
425 425 | 23,
|
426 426 | )
|
427 427 | .with_xml_name("subnetId");
|
428 428 | static NETWORKINTERFACE_MEMBER_TAG_SET: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
429 429 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#NetworkInterface$TagSet", "com.amazonaws.ec2", "NetworkInterface"),
|
430 430 | ::aws_smithy_schema::ShapeType::List,
|
431 - | "tag_set",
|
431 + | "TagSet",
|
432 432 | 24,
|
433 433 | )
|
434 434 | .with_xml_name("tagSet");
|
435 435 | static NETWORKINTERFACE_MEMBER_VPC_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
436 436 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#NetworkInterface$VpcId", "com.amazonaws.ec2", "NetworkInterface"),
|
437 437 | ::aws_smithy_schema::ShapeType::String,
|
438 - | "vpc_id",
|
438 + | "VpcId",
|
439 439 | 25,
|
440 440 | )
|
441 441 | .with_xml_name("vpcId");
|
442 442 | static NETWORKINTERFACE_MEMBER_DENY_ALL_IGW_TRAFFIC: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
443 443 | ::aws_smithy_schema::ShapeId::from_static(
|
444 444 | "com.amazonaws.ec2#NetworkInterface$DenyAllIgwTraffic",
|
445 445 | "com.amazonaws.ec2",
|
446 446 | "NetworkInterface",
|
447 447 | ),
|
448 448 | ::aws_smithy_schema::ShapeType::Boolean,
|
449 - | "deny_all_igw_traffic",
|
449 + | "DenyAllIgwTraffic",
|
450 450 | 26,
|
451 451 | )
|
452 452 | .with_xml_name("denyAllIgwTraffic");
|
453 453 | static NETWORKINTERFACE_MEMBER_IPV6_NATIVE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
454 454 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#NetworkInterface$Ipv6Native", "com.amazonaws.ec2", "NetworkInterface"),
|
455 455 | ::aws_smithy_schema::ShapeType::Boolean,
|
456 - | "ipv6_native",
|
456 + | "Ipv6Native",
|
457 457 | 27,
|
458 458 | )
|
459 459 | .with_xml_name("ipv6Native");
|
460 460 | static NETWORKINTERFACE_MEMBER_IPV6_ADDRESS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
461 461 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#NetworkInterface$Ipv6Address", "com.amazonaws.ec2", "NetworkInterface"),
|
462 462 | ::aws_smithy_schema::ShapeType::String,
|
463 - | "ipv6_address",
|
463 + | "Ipv6Address",
|
464 464 | 28,
|
465 465 | )
|
466 466 | .with_xml_name("ipv6Address");
|
467 467 | static NETWORKINTERFACE_MEMBER_OPERATOR: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
468 468 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#NetworkInterface$Operator", "com.amazonaws.ec2", "NetworkInterface"),
|
469 469 | ::aws_smithy_schema::ShapeType::Structure,
|
470 - | "operator",
|
470 + | "Operator",
|
471 471 | 29,
|
472 472 | )
|
473 473 | .with_xml_name("operator");
|
474 474 | static NETWORKINTERFACE_MEMBER_ASSOCIATED_SUBNETS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
475 475 | ::aws_smithy_schema::ShapeId::from_static(
|
476 476 | "com.amazonaws.ec2#NetworkInterface$AssociatedSubnets",
|
477 477 | "com.amazonaws.ec2",
|
478 478 | "NetworkInterface",
|
479 479 | ),
|
480 480 | ::aws_smithy_schema::ShapeType::List,
|
481 - | "associated_subnets",
|
481 + | "AssociatedSubnets",
|
482 482 | 30,
|
483 483 | )
|
484 484 | .with_xml_name("associatedSubnetSet");
|
485 485 | static NETWORKINTERFACE_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
486 486 | NETWORKINTERFACE_SCHEMA_ID,
|
487 487 | ::aws_smithy_schema::ShapeType::Structure,
|
488 488 | &[
|
489 489 | &NETWORKINTERFACE_MEMBER_ASSOCIATION,
|
490 490 | &NETWORKINTERFACE_MEMBER_ATTACHMENT,
|
491 491 | &NETWORKINTERFACE_MEMBER_AVAILABILITY_ZONE,
|
676 676 | }
|
677 677 | Ok(())
|
678 678 | },
|
679 679 | )?;
|
680 680 | }
|
681 681 | Ok(())
|
682 682 | }
|
683 683 | }
|
684 684 | impl NetworkInterface {
|
685 685 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
686 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
687 - | deserializer: &mut D,
|
686 + | pub fn deserialize(
|
687 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
688 688 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
689 689 | #[allow(unused_variables, unused_mut)]
|
690 690 | let mut builder = Self::builder();
|
691 691 | #[allow(
|
692 692 | unused_variables,
|
693 693 | unreachable_code,
|
694 694 | clippy::single_match,
|
695 695 | clippy::match_single_binding,
|
696 696 | clippy::diverging_sub_expression
|
697 697 | )]
|
698 - | deserializer.read_struct(&NETWORKINTERFACE_SCHEMA, (), |_, member, deser| {
|
698 + | deserializer.read_struct(&NETWORKINTERFACE_SCHEMA, &mut |member, deser| {
|
699 699 | match member.member_index() {
|
700 700 | Some(0) => {
|
701 701 | builder.association = Some(crate::types::NetworkInterfaceAssociation::deserialize(deser)?);
|
702 702 | }
|
703 703 | Some(1) => {
|
704 704 | builder.attachment = Some(crate::types::NetworkInterfaceAttachment::deserialize(deser)?);
|
705 705 | }
|
706 706 | Some(2) => {
|
707 707 | builder.availability_zone = Some(deser.read_string(member)?);
|
708 708 | }
|
709 709 | Some(3) => {
|
710 710 | builder.connection_tracking_configuration = Some(crate::types::ConnectionTrackingConfiguration::deserialize(deser)?);
|
711 711 | }
|
712 712 | Some(4) => {
|
713 713 | builder.description = Some(deser.read_string(member)?);
|
714 714 | }
|
715 715 | Some(5) => {
|
716 716 | builder.groups = Some({
|
717 - | let container = if let Some(cap) = deser.container_size() {
|
718 - | Vec::with_capacity(cap)
|
719 - | } else {
|
720 - | Vec::new()
|
721 - | };
|
722 - | deser.read_list(member, container, |mut list, deser| {
|
723 - | list.push(crate::types::GroupIdentifier::deserialize(deser)?);
|
724 - | Ok(list)
|
725 - | })?
|
717 + | let mut container = Vec::new();
|
718 + | deser.read_list(member, &mut |deser| {
|
719 + | container.push(crate::types::GroupIdentifier::deserialize(deser)?);
|
720 + | Ok(())
|
721 + | })?;
|
722 + | container
|
726 723 | });
|
727 724 | }
|
728 725 | Some(6) => {
|
729 726 | builder.interface_type = Some(crate::types::NetworkInterfaceType::from(deser.read_string(member)?.as_str()));
|
730 727 | }
|
731 728 | Some(7) => {
|
732 729 | builder.ipv6_addresses = Some({
|
733 - | let container = if let Some(cap) = deser.container_size() {
|
734 - | Vec::with_capacity(cap)
|
735 - | } else {
|
736 - | Vec::new()
|
737 - | };
|
738 - | deser.read_list(member, container, |mut list, deser| {
|
739 - | list.push(crate::types::NetworkInterfaceIpv6Address::deserialize(deser)?);
|
740 - | Ok(list)
|
741 - | })?
|
730 + | let mut container = Vec::new();
|
731 + | deser.read_list(member, &mut |deser| {
|
732 + | container.push(crate::types::NetworkInterfaceIpv6Address::deserialize(deser)?);
|
733 + | Ok(())
|
734 + | })?;
|
735 + | container
|
742 736 | });
|
743 737 | }
|
744 738 | Some(8) => {
|
745 739 | builder.mac_address = Some(deser.read_string(member)?);
|
746 740 | }
|
747 741 | Some(9) => {
|
748 742 | builder.network_interface_id = Some(deser.read_string(member)?);
|
749 743 | }
|
750 744 | Some(10) => {
|
751 745 | builder.outpost_arn = Some(deser.read_string(member)?);
|
752 746 | }
|
753 747 | Some(11) => {
|
754 748 | builder.owner_id = Some(deser.read_string(member)?);
|
755 749 | }
|
756 750 | Some(12) => {
|
757 751 | builder.private_dns_name = Some(deser.read_string(member)?);
|
758 752 | }
|
759 753 | Some(13) => {
|
760 754 | builder.public_dns_name = Some(deser.read_string(member)?);
|
761 755 | }
|
762 756 | Some(14) => {
|
763 757 | builder.public_ip_dns_name_options = Some(crate::types::PublicIpDnsNameOptions::deserialize(deser)?);
|
764 758 | }
|
765 759 | Some(15) => {
|
766 760 | builder.private_ip_address = Some(deser.read_string(member)?);
|
767 761 | }
|
768 762 | Some(16) => {
|
769 763 | builder.private_ip_addresses = Some({
|
770 - | let container = if let Some(cap) = deser.container_size() {
|
771 - | Vec::with_capacity(cap)
|
772 - | } else {
|
773 - | Vec::new()
|
774 - | };
|
775 - | deser.read_list(member, container, |mut list, deser| {
|
776 - | list.push(crate::types::NetworkInterfacePrivateIpAddress::deserialize(deser)?);
|
777 - | Ok(list)
|
778 - | })?
|
764 + | let mut container = Vec::new();
|
765 + | deser.read_list(member, &mut |deser| {
|
766 + | container.push(crate::types::NetworkInterfacePrivateIpAddress::deserialize(deser)?);
|
767 + | Ok(())
|
768 + | })?;
|
769 + | container
|
779 770 | });
|
780 771 | }
|
781 772 | Some(17) => {
|
782 773 | builder.ipv4_prefixes = Some({
|
783 - | let container = if let Some(cap) = deser.container_size() {
|
784 - | Vec::with_capacity(cap)
|
785 - | } else {
|
786 - | Vec::new()
|
787 - | };
|
788 - | deser.read_list(member, container, |mut list, deser| {
|
789 - | list.push(crate::types::Ipv4PrefixSpecification::deserialize(deser)?);
|
790 - | Ok(list)
|
791 - | })?
|
774 + | let mut container = Vec::new();
|
775 + | deser.read_list(member, &mut |deser| {
|
776 + | container.push(crate::types::Ipv4PrefixSpecification::deserialize(deser)?);
|
777 + | Ok(())
|
778 + | })?;
|
779 + | container
|
792 780 | });
|
793 781 | }
|
794 782 | Some(18) => {
|
795 783 | builder.ipv6_prefixes = Some({
|
796 - | let container = if let Some(cap) = deser.container_size() {
|
797 - | Vec::with_capacity(cap)
|
798 - | } else {
|
799 - | Vec::new()
|
800 - | };
|
801 - | deser.read_list(member, container, |mut list, deser| {
|
802 - | list.push(crate::types::Ipv6PrefixSpecification::deserialize(deser)?);
|
803 - | Ok(list)
|
804 - | })?
|
784 + | let mut container = Vec::new();
|
785 + | deser.read_list(member, &mut |deser| {
|
786 + | container.push(crate::types::Ipv6PrefixSpecification::deserialize(deser)?);
|
787 + | Ok(())
|
788 + | })?;
|
789 + | container
|
805 790 | });
|
806 791 | }
|
807 792 | Some(19) => {
|
808 793 | builder.requester_id = Some(deser.read_string(member)?);
|
809 794 | }
|
810 795 | Some(20) => {
|
811 796 | builder.requester_managed = Some(deser.read_boolean(member)?);
|
812 797 | }
|
813 798 | Some(21) => {
|
814 799 | builder.source_dest_check = Some(deser.read_boolean(member)?);
|
815 800 | }
|
816 801 | Some(22) => {
|
817 802 | builder.status = Some(crate::types::NetworkInterfaceStatus::from(deser.read_string(member)?.as_str()));
|
818 803 | }
|
819 804 | Some(23) => {
|
820 805 | builder.subnet_id = Some(deser.read_string(member)?);
|
821 806 | }
|
822 807 | Some(24) => {
|
823 808 | builder.tag_set = Some({
|
824 - | let container = if let Some(cap) = deser.container_size() {
|
825 - | Vec::with_capacity(cap)
|
826 - | } else {
|
827 - | Vec::new()
|
828 - | };
|
829 - | deser.read_list(member, container, |mut list, deser| {
|
830 - | list.push(crate::types::Tag::deserialize(deser)?);
|
831 - | Ok(list)
|
832 - | })?
|
809 + | let mut container = Vec::new();
|
810 + | deser.read_list(member, &mut |deser| {
|
811 + | container.push(crate::types::Tag::deserialize(deser)?);
|
812 + | Ok(())
|
813 + | })?;
|
814 + | container
|
833 815 | });
|
834 816 | }
|
835 817 | Some(25) => {
|
836 818 | builder.vpc_id = Some(deser.read_string(member)?);
|
837 819 | }
|
838 820 | Some(26) => {
|
839 821 | builder.deny_all_igw_traffic = Some(deser.read_boolean(member)?);
|
840 822 | }
|
841 823 | Some(27) => {
|
842 824 | builder.ipv6_native = Some(deser.read_boolean(member)?);
|
843 825 | }
|
844 826 | Some(28) => {
|
845 827 | builder.ipv6_address = Some(deser.read_string(member)?);
|
846 828 | }
|
847 829 | Some(29) => {
|
848 830 | builder.operator = Some(crate::types::OperatorResponse::deserialize(deser)?);
|
849 831 | }
|
850 832 | Some(30) => {
|
851 - | builder.associated_subnets = Some({
|
852 - | let container = if let Some(cap) = deser.container_size() {
|
853 - | Vec::with_capacity(cap)
|
854 - | } else {
|
855 - | Vec::new()
|
856 - | };
|
857 - | deser.read_list(member, container, |mut list, deser| {
|
858 - | list.push(deser.read_string(member)?);
|
859 - | Ok(list)
|
860 - | })?
|
861 - | });
|
833 + | builder.associated_subnets = Some(deser.read_string_list(member)?);
|
862 834 | }
|
863 835 | _ => {}
|
864 836 | }
|
865 837 | Ok(())
|
866 838 | })?;
|
867 839 | Ok(builder.build())
|
868 840 | }
|
869 841 | }
|
842 + | impl NetworkInterface {
|
843 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
844 + | pub fn deserialize_with_response(
|
845 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
846 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
847 + | _status: u16,
|
848 + | _body: &[u8],
|
849 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
850 + | Self::deserialize(deserializer)
|
851 + | }
|
852 + | }
|
870 853 | impl NetworkInterface {
|
871 854 | /// Creates a new builder-style object to manufacture [`NetworkInterface`](crate::types::NetworkInterface).
|
872 855 | pub fn builder() -> crate::types::builders::NetworkInterfaceBuilder {
|
873 856 | crate::types::builders::NetworkInterfaceBuilder::default()
|
874 857 | }
|
875 858 | }
|
876 859 |
|
877 860 | /// A builder for [`NetworkInterface`](crate::types::NetworkInterface).
|
878 861 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
879 862 | #[non_exhaustive]
|