Struct aws_sdk_ec2::model::TransitGatewayPolicyRule
source · #[non_exhaustive]pub struct TransitGatewayPolicyRule { /* private fields */ }
Expand description
Describes a rule associated with a transit gateway policy.
Implementations§
source§impl TransitGatewayPolicyRule
impl TransitGatewayPolicyRule
sourcepub fn source_cidr_block(&self) -> Option<&str>
pub fn source_cidr_block(&self) -> Option<&str>
The source CIDR block for the transit gateway policy rule.
sourcepub fn source_port_range(&self) -> Option<&str>
pub fn source_port_range(&self) -> Option<&str>
The port range for the transit gateway policy rule. Currently this is set to * (all).
sourcepub fn destination_cidr_block(&self) -> Option<&str>
pub fn destination_cidr_block(&self) -> Option<&str>
The destination CIDR block for the transit gateway policy rule.
sourcepub fn destination_port_range(&self) -> Option<&str>
pub fn destination_port_range(&self) -> Option<&str>
The port range for the transit gateway policy rule. Currently this is set to * (all).
sourcepub fn meta_data(&self) -> Option<&TransitGatewayPolicyRuleMetaData>
pub fn meta_data(&self) -> Option<&TransitGatewayPolicyRuleMetaData>
The meta data tags used for the transit gateway policy rule.
source§impl TransitGatewayPolicyRule
impl TransitGatewayPolicyRule
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
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§
source§impl Clone for TransitGatewayPolicyRule
impl Clone for TransitGatewayPolicyRule
source§fn clone(&self) -> TransitGatewayPolicyRule
fn clone(&self) -> TransitGatewayPolicyRule
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more