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

Describes an attachment between a resource and a transit gateway.

Implementations§

The ID of the attachment.

The ID of the transit gateway.

The ID of the Amazon Web Services account that owns the transit gateway.

The ID of the Amazon Web Services account that owns the resource.

The resource type. Note that the tgw-peering resource type has been deprecated.

The ID of the resource.

The attachment state. Note that the initiating state has been deprecated.

The association.

The creation time.

The tags for the attachment.

Creates a new builder-style object to manufacture TransitGatewayAttachment.

Examples found in repository?
src/xml_deser.rs (line 50667)
50663
50664
50665
50666
50667
50668
50669
50670
50671
50672
50673
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683
50684
50685
50686
50687
50688
50689
50690
50691
50692
50693
50694
50695
50696
50697
50698
50699
50700
50701
50702
50703
50704
50705
50706
50707
50708
50709
50710
50711
50712
50713
50714
50715
50716
50717
50718
50719
50720
50721
50722
50723
50724
50725
50726
50727
50728
50729
50730
50731
50732
50733
50734
50735
50736
50737
50738
50739
50740
50741
50742
50743
50744
50745
50746
50747
50748
50749
50750
50751
50752
50753
50754
50755
50756
50757
50758
50759
50760
50761
50762
50763
50764
50765
50766
50767
50768
50769
50770
50771
50772
50773
50774
50775
50776
50777
50778
50779
50780
50781
50782
50783
50784
50785
50786
50787
50788
50789
50790
50791
50792
50793
50794
50795
50796
50797
50798
50799
50800
50801
pub fn deser_structure_crate_model_transit_gateway_attachment(
    decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TransitGatewayAttachment, aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::model::TransitGatewayAttachment::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("transitGatewayAttachmentId") /* TransitGatewayAttachmentId com.amazonaws.ec2#TransitGatewayAttachment$TransitGatewayAttachmentId */ =>  {
                let var_2384 =
                    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_transit_gateway_attachment_id(var_2384);
            }
            ,
            s if s.matches("transitGatewayId") /* TransitGatewayId com.amazonaws.ec2#TransitGatewayAttachment$TransitGatewayId */ =>  {
                let var_2385 =
                    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_transit_gateway_id(var_2385);
            }
            ,
            s if s.matches("transitGatewayOwnerId") /* TransitGatewayOwnerId com.amazonaws.ec2#TransitGatewayAttachment$TransitGatewayOwnerId */ =>  {
                let var_2386 =
                    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_transit_gateway_owner_id(var_2386);
            }
            ,
            s if s.matches("resourceOwnerId") /* ResourceOwnerId com.amazonaws.ec2#TransitGatewayAttachment$ResourceOwnerId */ =>  {
                let var_2387 =
                    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_resource_owner_id(var_2387);
            }
            ,
            s if s.matches("resourceType") /* ResourceType com.amazonaws.ec2#TransitGatewayAttachment$ResourceType */ =>  {
                let var_2388 =
                    Some(
                        Result::<crate::model::TransitGatewayAttachmentResourceType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::model::TransitGatewayAttachmentResourceType::from(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_resource_type(var_2388);
            }
            ,
            s if s.matches("resourceId") /* ResourceId com.amazonaws.ec2#TransitGatewayAttachment$ResourceId */ =>  {
                let var_2389 =
                    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_resource_id(var_2389);
            }
            ,
            s if s.matches("state") /* State com.amazonaws.ec2#TransitGatewayAttachment$State */ =>  {
                let var_2390 =
                    Some(
                        Result::<crate::model::TransitGatewayAttachmentState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::model::TransitGatewayAttachmentState::from(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_state(var_2390);
            }
            ,
            s if s.matches("association") /* Association com.amazonaws.ec2#TransitGatewayAttachment$Association */ =>  {
                let var_2391 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_transit_gateway_attachment_association(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_association(var_2391);
            }
            ,
            s if s.matches("creationTime") /* CreationTime com.amazonaws.ec2#TransitGatewayAttachment$CreationTime */ =>  {
                let var_2392 =
                    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_creation_time(var_2392);
            }
            ,
            s if s.matches("tagSet") /* Tags com.amazonaws.ec2#TransitGatewayAttachment$Tags */ =>  {
                let var_2393 =
                    Some(
                        crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_tags(var_2393);
            }
            ,
            _ => {}
        }
    }
    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