Struct aws_sdk_ec2::model::NetworkInterfaceAttachment
source · #[non_exhaustive]pub struct NetworkInterfaceAttachment { /* private fields */ }
Expand description
Describes a network interface attachment.
Implementations§
source§impl NetworkInterfaceAttachment
impl NetworkInterfaceAttachment
sourcepub fn attach_time(&self) -> Option<&DateTime>
pub fn attach_time(&self) -> Option<&DateTime>
The timestamp indicating when the attachment initiated.
sourcepub fn attachment_id(&self) -> Option<&str>
pub fn attachment_id(&self) -> Option<&str>
The ID of the network interface attachment.
sourcepub fn delete_on_termination(&self) -> Option<bool>
pub fn delete_on_termination(&self) -> Option<bool>
Indicates whether the network interface is deleted when the instance is terminated.
sourcepub fn device_index(&self) -> Option<i32>
pub fn device_index(&self) -> Option<i32>
The device index of the network interface attachment on the instance.
sourcepub fn network_card_index(&self) -> Option<i32>
pub fn network_card_index(&self) -> Option<i32>
The index of the network card.
sourcepub fn instance_id(&self) -> Option<&str>
pub fn instance_id(&self) -> Option<&str>
The ID of the instance.
sourcepub fn instance_owner_id(&self) -> Option<&str>
pub fn instance_owner_id(&self) -> Option<&str>
The Amazon Web Services account ID of the owner of the instance.
sourcepub fn status(&self) -> Option<&AttachmentStatus>
pub fn status(&self) -> Option<&AttachmentStatus>
The attachment state.
source§impl NetworkInterfaceAttachment
impl NetworkInterfaceAttachment
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
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§
source§impl Clone for NetworkInterfaceAttachment
impl Clone for NetworkInterfaceAttachment
source§fn clone(&self) -> NetworkInterfaceAttachment
fn clone(&self) -> NetworkInterfaceAttachment
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more