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

Describes a security group rule.

Implementations§

The IPv4 address range, in CIDR notation.

The direction. The following are the possible values:

  • egress

  • ingress

The security group ID.

The port range.

The prefix list ID.

The protocol name.

Creates a new builder-style object to manufacture AnalysisSecurityGroupRule.

Examples found in repository?
src/xml_deser.rs (line 67850)
67846
67847
67848
67849
67850
67851
67852
67853
67854
67855
67856
67857
67858
67859
67860
67861
67862
67863
67864
67865
67866
67867
67868
67869
67870
67871
67872
67873
67874
67875
67876
67877
67878
67879
67880
67881
67882
67883
67884
67885
67886
67887
67888
67889
67890
67891
67892
67893
67894
67895
67896
67897
67898
67899
67900
67901
67902
67903
67904
67905
67906
67907
67908
67909
67910
67911
67912
67913
67914
67915
67916
67917
67918
67919
67920
67921
67922
67923
67924
67925
67926
67927
67928
67929
67930
67931
67932
pub fn deser_structure_crate_model_analysis_security_group_rule(
    decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AnalysisSecurityGroupRule, aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::model::AnalysisSecurityGroupRule::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("cidr") /* Cidr com.amazonaws.ec2#AnalysisSecurityGroupRule$Cidr */ =>  {
                let var_3351 =
                    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_cidr(var_3351);
            }
            ,
            s if s.matches("direction") /* Direction com.amazonaws.ec2#AnalysisSecurityGroupRule$Direction */ =>  {
                let var_3352 =
                    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_direction(var_3352);
            }
            ,
            s if s.matches("securityGroupId") /* SecurityGroupId com.amazonaws.ec2#AnalysisSecurityGroupRule$SecurityGroupId */ =>  {
                let var_3353 =
                    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_security_group_id(var_3353);
            }
            ,
            s if s.matches("portRange") /* PortRange com.amazonaws.ec2#AnalysisSecurityGroupRule$PortRange */ =>  {
                let var_3354 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_port_range(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_port_range(var_3354);
            }
            ,
            s if s.matches("prefixListId") /* PrefixListId com.amazonaws.ec2#AnalysisSecurityGroupRule$PrefixListId */ =>  {
                let var_3355 =
                    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_prefix_list_id(var_3355);
            }
            ,
            s if s.matches("protocol") /* Protocol com.amazonaws.ec2#AnalysisSecurityGroupRule$Protocol */ =>  {
                let var_3356 =
                    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_3356);
            }
            ,
            _ => {}
        }
    }
    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