#[non_exhaustive]
pub struct NetworkInterfaceAttachment { /* private fields */ }
Expand description

Describes a network interface attachment.

Implementations§

The timestamp indicating when the attachment initiated.

The ID of the network interface attachment.

Indicates whether the network interface is deleted when the instance is terminated.

The device index of the network interface attachment on the instance.

The index of the network card.

The ID of the instance.

The Amazon Web Services account ID of the owner of the instance.

The attachment state.

Creates a new builder-style object to manufacture NetworkInterfaceAttachment.

Examples found in repository?
src/xml_deser.rs (line 34335)
34331
34332
34333
34334
34335
34336
34337
34338
34339
34340
34341
34342
34343
34344
34345
34346
34347
34348
34349
34350
34351
34352
34353
34354
34355
34356
34357
34358
34359
34360
34361
34362
34363
34364
34365
34366
34367
34368
34369
34370
34371
34372
34373
34374
34375
34376
34377
34378
34379
34380
34381
34382
34383
34384
34385
34386
34387
34388
34389
34390
34391
34392
34393
34394
34395
34396
34397
34398
34399
34400
34401
34402
34403
34404
34405
34406
34407
34408
34409
34410
34411
34412
34413
34414
34415
34416
34417
34418
34419
34420
34421
34422
34423
34424
34425
34426
34427
34428
34429
34430
34431
34432
34433
34434
34435
34436
34437
34438
34439
34440
34441
34442
34443
34444
34445
34446
34447
34448
34449
34450
34451
34452
34453
34454
pub fn deser_structure_crate_model_network_interface_attachment(
    decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::NetworkInterfaceAttachment, aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::model::NetworkInterfaceAttachment::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("attachTime") /* AttachTime com.amazonaws.ec2#NetworkInterfaceAttachment$AttachTime */ =>  {
                let var_1479 =
                    Some(
                        aws_smithy_types::DateTime::from_str(
                            aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            , aws_smithy_types::date_time::Format::DateTime
                        )
                        .map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
                        ?
                    )
                ;
                builder = builder.set_attach_time(var_1479);
            }
            ,
            s if s.matches("attachmentId") /* AttachmentId com.amazonaws.ec2#NetworkInterfaceAttachment$AttachmentId */ =>  {
                let var_1480 =
                    Some(
                        Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_attachment_id(var_1480);
            }
            ,
            s if s.matches("deleteOnTermination") /* DeleteOnTermination com.amazonaws.ec2#NetworkInterfaceAttachment$DeleteOnTermination */ =>  {
                let var_1481 =
                    Some(
                         {
                            <bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                            .map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_delete_on_termination(var_1481);
            }
            ,
            s if s.matches("deviceIndex") /* DeviceIndex com.amazonaws.ec2#NetworkInterfaceAttachment$DeviceIndex */ =>  {
                let var_1482 =
                    Some(
                         {
                            <i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                            .map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_device_index(var_1482);
            }
            ,
            s if s.matches("networkCardIndex") /* NetworkCardIndex com.amazonaws.ec2#NetworkInterfaceAttachment$NetworkCardIndex */ =>  {
                let var_1483 =
                    Some(
                         {
                            <i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                            .map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_network_card_index(var_1483);
            }
            ,
            s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#NetworkInterfaceAttachment$InstanceId */ =>  {
                let var_1484 =
                    Some(
                        Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_instance_id(var_1484);
            }
            ,
            s if s.matches("instanceOwnerId") /* InstanceOwnerId com.amazonaws.ec2#NetworkInterfaceAttachment$InstanceOwnerId */ =>  {
                let var_1485 =
                    Some(
                        Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_instance_owner_id(var_1485);
            }
            ,
            s if s.matches("status") /* Status com.amazonaws.ec2#NetworkInterfaceAttachment$Status */ =>  {
                let var_1486 =
                    Some(
                        Result::<crate::model::AttachmentStatus, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::model::AttachmentStatus::from(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_status(var_1486);
            }
            ,
            _ => {}
        }
    }
    Ok(builder.build())
}

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more