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

The BGP configuration information.

Implementations§

The transit gateway Autonomous System Number (ASN).

The peer Autonomous System Number (ASN).

The interior BGP peer IP address for the transit gateway.

The interior BGP peer IP address for the appliance.

The BGP status.

Creates a new builder-style object to manufacture TransitGatewayAttachmentBgpConfiguration.

Examples found in repository?
src/xml_deser.rs (line 64462)
64455
64456
64457
64458
64459
64460
64461
64462
64463
64464
64465
64466
64467
64468
64469
64470
64471
64472
64473
64474
64475
64476
64477
64478
64479
64480
64481
64482
64483
64484
64485
64486
64487
64488
64489
64490
64491
64492
64493
64494
64495
64496
64497
64498
64499
64500
64501
64502
64503
64504
64505
64506
64507
64508
64509
64510
64511
64512
64513
64514
64515
64516
64517
64518
64519
64520
64521
64522
64523
64524
64525
64526
64527
64528
64529
64530
64531
64532
64533
64534
64535
64536
64537
64538
64539
pub fn deser_structure_crate_model_transit_gateway_attachment_bgp_configuration(
    decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<
    crate::model::TransitGatewayAttachmentBgpConfiguration,
    aws_smithy_xml::decode::XmlDecodeError,
> {
    #[allow(unused_mut)]
    let mut builder = crate::model::TransitGatewayAttachmentBgpConfiguration::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("transitGatewayAsn") /* TransitGatewayAsn com.amazonaws.ec2#TransitGatewayAttachmentBgpConfiguration$TransitGatewayAsn */ =>  {
                let var_3171 =
                    Some(
                         {
                            <i64 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 (long: `com.amazonaws.ec2#Long`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_transit_gateway_asn(var_3171);
            }
            ,
            s if s.matches("peerAsn") /* PeerAsn com.amazonaws.ec2#TransitGatewayAttachmentBgpConfiguration$PeerAsn */ =>  {
                let var_3172 =
                    Some(
                         {
                            <i64 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 (long: `com.amazonaws.ec2#Long`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_peer_asn(var_3172);
            }
            ,
            s if s.matches("transitGatewayAddress") /* TransitGatewayAddress com.amazonaws.ec2#TransitGatewayAttachmentBgpConfiguration$TransitGatewayAddress */ =>  {
                let var_3173 =
                    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_address(var_3173);
            }
            ,
            s if s.matches("peerAddress") /* PeerAddress com.amazonaws.ec2#TransitGatewayAttachmentBgpConfiguration$PeerAddress */ =>  {
                let var_3174 =
                    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_peer_address(var_3174);
            }
            ,
            s if s.matches("bgpStatus") /* BgpStatus com.amazonaws.ec2#TransitGatewayAttachmentBgpConfiguration$BgpStatus */ =>  {
                let var_3175 =
                    Some(
                        Result::<crate::model::BgpStatus, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::model::BgpStatus::from(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_bgp_status(var_3175);
            }
            ,
            _ => {}
        }
    }
    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