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

Describes the Traffic Mirror rule.

Implementations§

The ID of the Traffic Mirror rule.

The ID of the Traffic Mirror filter that the rule is associated with.

The traffic direction assigned to the Traffic Mirror rule.

The rule number of the Traffic Mirror rule.

The action assigned to the Traffic Mirror rule.

The protocol assigned to the Traffic Mirror rule.

The destination port range assigned to the Traffic Mirror rule.

The source port range assigned to the Traffic Mirror rule.

The destination CIDR block assigned to the Traffic Mirror rule.

The source CIDR block assigned to the Traffic Mirror rule.

The description of the Traffic Mirror rule.

Creates a new builder-style object to manufacture TrafficMirrorFilterRule.

Examples found in repository?
src/xml_deser.rs (line 30174)
30170
30171
30172
30173
30174
30175
30176
30177
30178
30179
30180
30181
30182
30183
30184
30185
30186
30187
30188
30189
30190
30191
30192
30193
30194
30195
30196
30197
30198
30199
30200
30201
30202
30203
30204
30205
30206
30207
30208
30209
30210
30211
30212
30213
30214
30215
30216
30217
30218
30219
30220
30221
30222
30223
30224
30225
30226
30227
30228
30229
30230
30231
30232
30233
30234
30235
30236
30237
30238
30239
30240
30241
30242
30243
30244
30245
30246
30247
30248
30249
30250
30251
30252
30253
30254
30255
30256
30257
30258
30259
30260
30261
30262
30263
30264
30265
30266
30267
30268
30269
30270
30271
30272
30273
30274
30275
30276
30277
30278
30279
30280
30281
30282
30283
30284
30285
30286
30287
30288
30289
30290
30291
30292
30293
30294
30295
30296
30297
30298
30299
30300
30301
30302
30303
30304
30305
30306
30307
30308
30309
30310
30311
30312
30313
30314
30315
30316
30317
30318
30319
30320
30321
30322
30323
30324
pub fn deser_structure_crate_model_traffic_mirror_filter_rule(
    decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TrafficMirrorFilterRule, aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::model::TrafficMirrorFilterRule::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("trafficMirrorFilterRuleId") /* TrafficMirrorFilterRuleId com.amazonaws.ec2#TrafficMirrorFilterRule$TrafficMirrorFilterRuleId */ =>  {
                let var_1302 =
                    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_traffic_mirror_filter_rule_id(var_1302);
            }
            ,
            s if s.matches("trafficMirrorFilterId") /* TrafficMirrorFilterId com.amazonaws.ec2#TrafficMirrorFilterRule$TrafficMirrorFilterId */ =>  {
                let var_1303 =
                    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_traffic_mirror_filter_id(var_1303);
            }
            ,
            s if s.matches("trafficDirection") /* TrafficDirection com.amazonaws.ec2#TrafficMirrorFilterRule$TrafficDirection */ =>  {
                let var_1304 =
                    Some(
                        Result::<crate::model::TrafficDirection, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::model::TrafficDirection::from(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_traffic_direction(var_1304);
            }
            ,
            s if s.matches("ruleNumber") /* RuleNumber com.amazonaws.ec2#TrafficMirrorFilterRule$RuleNumber */ =>  {
                let var_1305 =
                    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_rule_number(var_1305);
            }
            ,
            s if s.matches("ruleAction") /* RuleAction com.amazonaws.ec2#TrafficMirrorFilterRule$RuleAction */ =>  {
                let var_1306 =
                    Some(
                        Result::<crate::model::TrafficMirrorRuleAction, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::model::TrafficMirrorRuleAction::from(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_rule_action(var_1306);
            }
            ,
            s if s.matches("protocol") /* Protocol com.amazonaws.ec2#TrafficMirrorFilterRule$Protocol */ =>  {
                let var_1307 =
                    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_protocol(var_1307);
            }
            ,
            s if s.matches("destinationPortRange") /* DestinationPortRange com.amazonaws.ec2#TrafficMirrorFilterRule$DestinationPortRange */ =>  {
                let var_1308 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_traffic_mirror_port_range(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_destination_port_range(var_1308);
            }
            ,
            s if s.matches("sourcePortRange") /* SourcePortRange com.amazonaws.ec2#TrafficMirrorFilterRule$SourcePortRange */ =>  {
                let var_1309 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_traffic_mirror_port_range(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_source_port_range(var_1309);
            }
            ,
            s if s.matches("destinationCidrBlock") /* DestinationCidrBlock com.amazonaws.ec2#TrafficMirrorFilterRule$DestinationCidrBlock */ =>  {
                let var_1310 =
                    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_1310);
            }
            ,
            s if s.matches("sourceCidrBlock") /* SourceCidrBlock com.amazonaws.ec2#TrafficMirrorFilterRule$SourceCidrBlock */ =>  {
                let var_1311 =
                    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_1311);
            }
            ,
            s if s.matches("description") /* Description com.amazonaws.ec2#TrafficMirrorFilterRule$Description */ =>  {
                let var_1312 =
                    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_description(var_1312);
            }
            ,
            _ => {}
        }
    }
    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