#[non_exhaustive]pub struct InstanceNetworkInterfaceAttachment { /* private fields */ }
Expand description
Describes a network interface attachment.
Implementations§
source§impl InstanceNetworkInterfaceAttachment
impl InstanceNetworkInterfaceAttachment
sourcepub fn attach_time(&self) -> Option<&DateTime>
pub fn attach_time(&self) -> Option<&DateTime>
The time stamp 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 index of the device on the instance for the network interface attachment.
sourcepub fn status(&self) -> Option<&AttachmentStatus>
pub fn status(&self) -> Option<&AttachmentStatus>
The attachment state.
sourcepub fn network_card_index(&self) -> Option<i32>
pub fn network_card_index(&self) -> Option<i32>
The index of the network card.
source§impl InstanceNetworkInterfaceAttachment
impl InstanceNetworkInterfaceAttachment
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture InstanceNetworkInterfaceAttachment
.
Examples found in repository?
src/xml_deser.rs (line 70283)
70278 70279 70280 70281 70282 70283 70284 70285 70286 70287 70288 70289 70290 70291 70292 70293 70294 70295 70296 70297 70298 70299 70300 70301 70302 70303 70304 70305 70306 70307 70308 70309 70310 70311 70312 70313 70314 70315 70316 70317 70318 70319 70320 70321 70322 70323 70324 70325 70326 70327 70328 70329 70330 70331 70332 70333 70334 70335 70336 70337 70338 70339 70340 70341 70342 70343 70344 70345 70346 70347 70348 70349 70350 70351 70352 70353 70354 70355 70356 70357 70358 70359 70360 70361 70362 70363 70364 70365 70366 70367 70368 70369 70370 70371 70372 70373 70374 70375 70376
pub fn deser_structure_crate_model_instance_network_interface_attachment(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceNetworkInterfaceAttachment, aws_smithy_xml::decode::XmlDecodeError>
{
#[allow(unused_mut)]
let mut builder = crate::model::InstanceNetworkInterfaceAttachment::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("attachTime") /* AttachTime com.amazonaws.ec2#InstanceNetworkInterfaceAttachment$AttachTime */ => {
let var_3478 =
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_3478);
}
,
s if s.matches("attachmentId") /* AttachmentId com.amazonaws.ec2#InstanceNetworkInterfaceAttachment$AttachmentId */ => {
let var_3479 =
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_3479);
}
,
s if s.matches("deleteOnTermination") /* DeleteOnTermination com.amazonaws.ec2#InstanceNetworkInterfaceAttachment$DeleteOnTermination */ => {
let var_3480 =
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_3480);
}
,
s if s.matches("deviceIndex") /* DeviceIndex com.amazonaws.ec2#InstanceNetworkInterfaceAttachment$DeviceIndex */ => {
let var_3481 =
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_3481);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#InstanceNetworkInterfaceAttachment$Status */ => {
let var_3482 =
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_3482);
}
,
s if s.matches("networkCardIndex") /* NetworkCardIndex com.amazonaws.ec2#InstanceNetworkInterfaceAttachment$NetworkCardIndex */ => {
let var_3483 =
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_3483);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for InstanceNetworkInterfaceAttachment
impl Clone for InstanceNetworkInterfaceAttachment
source§fn clone(&self) -> InstanceNetworkInterfaceAttachment
fn clone(&self) -> InstanceNetworkInterfaceAttachment
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