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

Describes a rule associated with a transit gateway policy.

Implementations§

The source CIDR block for the transit gateway policy rule.

The port range for the transit gateway policy rule. Currently this is set to * (all).

The destination CIDR block for the transit gateway policy rule.

The port range for the transit gateway policy rule. Currently this is set to * (all).

The protocol used by the transit gateway policy rule.

The meta data tags used for the transit gateway policy rule.

Creates a new builder-style object to manufacture TransitGatewayPolicyRule.

Examples found in repository?
src/xml_deser.rs (line 62393)
62389
62390
62391
62392
62393
62394
62395
62396
62397
62398
62399
62400
62401
62402
62403
62404
62405
62406
62407
62408
62409
62410
62411
62412
62413
62414
62415
62416
62417
62418
62419
62420
62421
62422
62423
62424
62425
62426
62427
62428
62429
62430
62431
62432
62433
62434
62435
62436
62437
62438
62439
62440
62441
62442
62443
62444
62445
62446
62447
62448
62449
62450
62451
62452
62453
62454
62455
62456
62457
62458
62459
62460
62461
62462
62463
62464
62465
62466
62467
62468
62469
62470
62471
62472
62473
62474
62475
pub fn deser_structure_crate_model_transit_gateway_policy_rule(
    decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TransitGatewayPolicyRule, aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::model::TransitGatewayPolicyRule::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("sourceCidrBlock") /* SourceCidrBlock com.amazonaws.ec2#TransitGatewayPolicyRule$SourceCidrBlock */ =>  {
                let var_3043 =
                    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_source_cidr_block(var_3043);
            }
            ,
            s if s.matches("sourcePortRange") /* SourcePortRange com.amazonaws.ec2#TransitGatewayPolicyRule$SourcePortRange */ =>  {
                let var_3044 =
                    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_source_port_range(var_3044);
            }
            ,
            s if s.matches("destinationCidrBlock") /* DestinationCidrBlock com.amazonaws.ec2#TransitGatewayPolicyRule$DestinationCidrBlock */ =>  {
                let var_3045 =
                    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_destination_cidr_block(var_3045);
            }
            ,
            s if s.matches("destinationPortRange") /* DestinationPortRange com.amazonaws.ec2#TransitGatewayPolicyRule$DestinationPortRange */ =>  {
                let var_3046 =
                    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_destination_port_range(var_3046);
            }
            ,
            s if s.matches("protocol") /* Protocol com.amazonaws.ec2#TransitGatewayPolicyRule$Protocol */ =>  {
                let var_3047 =
                    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_protocol(var_3047);
            }
            ,
            s if s.matches("metaData") /* MetaData com.amazonaws.ec2#TransitGatewayPolicyRule$MetaData */ =>  {
                let var_3048 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_transit_gateway_policy_rule_meta_data(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_meta_data(var_3048);
            }
            ,
            _ => {}
        }
    }
    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