Struct aws_sdk_ec2::model::vpn_gateway::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for VpnGateway
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn availability_zone(self, input: impl Into<String>) -> Self
pub fn availability_zone(self, input: impl Into<String>) -> Self
The Availability Zone where the virtual private gateway was created, if applicable. This field may be empty or not returned.
sourcepub fn set_availability_zone(self, input: Option<String>) -> Self
pub fn set_availability_zone(self, input: Option<String>) -> Self
The Availability Zone where the virtual private gateway was created, if applicable. This field may be empty or not returned.
Examples found in repository?
32280 32281 32282 32283 32284 32285 32286 32287 32288 32289 32290 32291 32292 32293 32294 32295 32296 32297 32298 32299 32300 32301 32302 32303 32304 32305 32306 32307 32308 32309 32310 32311 32312 32313 32314 32315 32316 32317 32318 32319 32320 32321 32322 32323 32324 32325 32326 32327 32328 32329 32330 32331 32332 32333 32334 32335 32336 32337 32338 32339 32340 32341 32342 32343 32344 32345 32346 32347 32348 32349 32350 32351 32352 32353 32354 32355 32356 32357 32358 32359 32360 32361 32362 32363 32364 32365 32366 32367 32368 32369 32370 32371 32372 32373 32374 32375 32376 32377 32378 32379 32380
pub fn deser_structure_crate_model_vpn_gateway(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VpnGateway, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::VpnGateway::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#VpnGateway$AvailabilityZone */ => {
let var_1451 =
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_availability_zone(var_1451);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#VpnGateway$State */ => {
let var_1452 =
Some(
Result::<crate::model::VpnState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::VpnState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1452);
}
,
s if s.matches("type") /* Type com.amazonaws.ec2#VpnGateway$Type */ => {
let var_1453 =
Some(
Result::<crate::model::GatewayType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::GatewayType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_type(var_1453);
}
,
s if s.matches("attachments") /* VpcAttachments com.amazonaws.ec2#VpnGateway$VpcAttachments */ => {
let var_1454 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_vpc_attachment_list(&mut tag)
?
)
;
builder = builder.set_vpc_attachments(var_1454);
}
,
s if s.matches("vpnGatewayId") /* VpnGatewayId com.amazonaws.ec2#VpnGateway$VpnGatewayId */ => {
let var_1455 =
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_vpn_gateway_id(var_1455);
}
,
s if s.matches("amazonSideAsn") /* AmazonSideAsn com.amazonaws.ec2#VpnGateway$AmazonSideAsn */ => {
let var_1456 =
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_amazon_side_asn(var_1456);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#VpnGateway$Tags */ => {
let var_1457 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1457);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn set_state(self, input: Option<VpnState>) -> Self
pub fn set_state(self, input: Option<VpnState>) -> Self
The current state of the virtual private gateway.
Examples found in repository?
32280 32281 32282 32283 32284 32285 32286 32287 32288 32289 32290 32291 32292 32293 32294 32295 32296 32297 32298 32299 32300 32301 32302 32303 32304 32305 32306 32307 32308 32309 32310 32311 32312 32313 32314 32315 32316 32317 32318 32319 32320 32321 32322 32323 32324 32325 32326 32327 32328 32329 32330 32331 32332 32333 32334 32335 32336 32337 32338 32339 32340 32341 32342 32343 32344 32345 32346 32347 32348 32349 32350 32351 32352 32353 32354 32355 32356 32357 32358 32359 32360 32361 32362 32363 32364 32365 32366 32367 32368 32369 32370 32371 32372 32373 32374 32375 32376 32377 32378 32379 32380
pub fn deser_structure_crate_model_vpn_gateway(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VpnGateway, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::VpnGateway::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#VpnGateway$AvailabilityZone */ => {
let var_1451 =
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_availability_zone(var_1451);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#VpnGateway$State */ => {
let var_1452 =
Some(
Result::<crate::model::VpnState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::VpnState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1452);
}
,
s if s.matches("type") /* Type com.amazonaws.ec2#VpnGateway$Type */ => {
let var_1453 =
Some(
Result::<crate::model::GatewayType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::GatewayType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_type(var_1453);
}
,
s if s.matches("attachments") /* VpcAttachments com.amazonaws.ec2#VpnGateway$VpcAttachments */ => {
let var_1454 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_vpc_attachment_list(&mut tag)
?
)
;
builder = builder.set_vpc_attachments(var_1454);
}
,
s if s.matches("vpnGatewayId") /* VpnGatewayId com.amazonaws.ec2#VpnGateway$VpnGatewayId */ => {
let var_1455 =
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_vpn_gateway_id(var_1455);
}
,
s if s.matches("amazonSideAsn") /* AmazonSideAsn com.amazonaws.ec2#VpnGateway$AmazonSideAsn */ => {
let var_1456 =
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_amazon_side_asn(var_1456);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#VpnGateway$Tags */ => {
let var_1457 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1457);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn type(self, input: GatewayType) -> Self
pub fn type(self, input: GatewayType) -> Self
The type of VPN connection the virtual private gateway supports.
sourcepub fn set_type(self, input: Option<GatewayType>) -> Self
pub fn set_type(self, input: Option<GatewayType>) -> Self
The type of VPN connection the virtual private gateway supports.
Examples found in repository?
32280 32281 32282 32283 32284 32285 32286 32287 32288 32289 32290 32291 32292 32293 32294 32295 32296 32297 32298 32299 32300 32301 32302 32303 32304 32305 32306 32307 32308 32309 32310 32311 32312 32313 32314 32315 32316 32317 32318 32319 32320 32321 32322 32323 32324 32325 32326 32327 32328 32329 32330 32331 32332 32333 32334 32335 32336 32337 32338 32339 32340 32341 32342 32343 32344 32345 32346 32347 32348 32349 32350 32351 32352 32353 32354 32355 32356 32357 32358 32359 32360 32361 32362 32363 32364 32365 32366 32367 32368 32369 32370 32371 32372 32373 32374 32375 32376 32377 32378 32379 32380
pub fn deser_structure_crate_model_vpn_gateway(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VpnGateway, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::VpnGateway::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#VpnGateway$AvailabilityZone */ => {
let var_1451 =
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_availability_zone(var_1451);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#VpnGateway$State */ => {
let var_1452 =
Some(
Result::<crate::model::VpnState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::VpnState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1452);
}
,
s if s.matches("type") /* Type com.amazonaws.ec2#VpnGateway$Type */ => {
let var_1453 =
Some(
Result::<crate::model::GatewayType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::GatewayType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_type(var_1453);
}
,
s if s.matches("attachments") /* VpcAttachments com.amazonaws.ec2#VpnGateway$VpcAttachments */ => {
let var_1454 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_vpc_attachment_list(&mut tag)
?
)
;
builder = builder.set_vpc_attachments(var_1454);
}
,
s if s.matches("vpnGatewayId") /* VpnGatewayId com.amazonaws.ec2#VpnGateway$VpnGatewayId */ => {
let var_1455 =
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_vpn_gateway_id(var_1455);
}
,
s if s.matches("amazonSideAsn") /* AmazonSideAsn com.amazonaws.ec2#VpnGateway$AmazonSideAsn */ => {
let var_1456 =
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_amazon_side_asn(var_1456);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#VpnGateway$Tags */ => {
let var_1457 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1457);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn vpc_attachments(self, input: VpcAttachment) -> Self
pub fn vpc_attachments(self, input: VpcAttachment) -> Self
Appends an item to vpc_attachments
.
To override the contents of this collection use set_vpc_attachments
.
Any VPCs attached to the virtual private gateway.
sourcepub fn set_vpc_attachments(self, input: Option<Vec<VpcAttachment>>) -> Self
pub fn set_vpc_attachments(self, input: Option<Vec<VpcAttachment>>) -> Self
Any VPCs attached to the virtual private gateway.
Examples found in repository?
32280 32281 32282 32283 32284 32285 32286 32287 32288 32289 32290 32291 32292 32293 32294 32295 32296 32297 32298 32299 32300 32301 32302 32303 32304 32305 32306 32307 32308 32309 32310 32311 32312 32313 32314 32315 32316 32317 32318 32319 32320 32321 32322 32323 32324 32325 32326 32327 32328 32329 32330 32331 32332 32333 32334 32335 32336 32337 32338 32339 32340 32341 32342 32343 32344 32345 32346 32347 32348 32349 32350 32351 32352 32353 32354 32355 32356 32357 32358 32359 32360 32361 32362 32363 32364 32365 32366 32367 32368 32369 32370 32371 32372 32373 32374 32375 32376 32377 32378 32379 32380
pub fn deser_structure_crate_model_vpn_gateway(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VpnGateway, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::VpnGateway::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#VpnGateway$AvailabilityZone */ => {
let var_1451 =
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_availability_zone(var_1451);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#VpnGateway$State */ => {
let var_1452 =
Some(
Result::<crate::model::VpnState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::VpnState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1452);
}
,
s if s.matches("type") /* Type com.amazonaws.ec2#VpnGateway$Type */ => {
let var_1453 =
Some(
Result::<crate::model::GatewayType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::GatewayType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_type(var_1453);
}
,
s if s.matches("attachments") /* VpcAttachments com.amazonaws.ec2#VpnGateway$VpcAttachments */ => {
let var_1454 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_vpc_attachment_list(&mut tag)
?
)
;
builder = builder.set_vpc_attachments(var_1454);
}
,
s if s.matches("vpnGatewayId") /* VpnGatewayId com.amazonaws.ec2#VpnGateway$VpnGatewayId */ => {
let var_1455 =
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_vpn_gateway_id(var_1455);
}
,
s if s.matches("amazonSideAsn") /* AmazonSideAsn com.amazonaws.ec2#VpnGateway$AmazonSideAsn */ => {
let var_1456 =
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_amazon_side_asn(var_1456);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#VpnGateway$Tags */ => {
let var_1457 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1457);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn vpn_gateway_id(self, input: impl Into<String>) -> Self
pub fn vpn_gateway_id(self, input: impl Into<String>) -> Self
The ID of the virtual private gateway.
sourcepub fn set_vpn_gateway_id(self, input: Option<String>) -> Self
pub fn set_vpn_gateway_id(self, input: Option<String>) -> Self
The ID of the virtual private gateway.
Examples found in repository?
32280 32281 32282 32283 32284 32285 32286 32287 32288 32289 32290 32291 32292 32293 32294 32295 32296 32297 32298 32299 32300 32301 32302 32303 32304 32305 32306 32307 32308 32309 32310 32311 32312 32313 32314 32315 32316 32317 32318 32319 32320 32321 32322 32323 32324 32325 32326 32327 32328 32329 32330 32331 32332 32333 32334 32335 32336 32337 32338 32339 32340 32341 32342 32343 32344 32345 32346 32347 32348 32349 32350 32351 32352 32353 32354 32355 32356 32357 32358 32359 32360 32361 32362 32363 32364 32365 32366 32367 32368 32369 32370 32371 32372 32373 32374 32375 32376 32377 32378 32379 32380
pub fn deser_structure_crate_model_vpn_gateway(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VpnGateway, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::VpnGateway::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#VpnGateway$AvailabilityZone */ => {
let var_1451 =
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_availability_zone(var_1451);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#VpnGateway$State */ => {
let var_1452 =
Some(
Result::<crate::model::VpnState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::VpnState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1452);
}
,
s if s.matches("type") /* Type com.amazonaws.ec2#VpnGateway$Type */ => {
let var_1453 =
Some(
Result::<crate::model::GatewayType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::GatewayType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_type(var_1453);
}
,
s if s.matches("attachments") /* VpcAttachments com.amazonaws.ec2#VpnGateway$VpcAttachments */ => {
let var_1454 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_vpc_attachment_list(&mut tag)
?
)
;
builder = builder.set_vpc_attachments(var_1454);
}
,
s if s.matches("vpnGatewayId") /* VpnGatewayId com.amazonaws.ec2#VpnGateway$VpnGatewayId */ => {
let var_1455 =
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_vpn_gateway_id(var_1455);
}
,
s if s.matches("amazonSideAsn") /* AmazonSideAsn com.amazonaws.ec2#VpnGateway$AmazonSideAsn */ => {
let var_1456 =
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_amazon_side_asn(var_1456);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#VpnGateway$Tags */ => {
let var_1457 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1457);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn amazon_side_asn(self, input: i64) -> Self
pub fn amazon_side_asn(self, input: i64) -> Self
The private Autonomous System Number (ASN) for the Amazon side of a BGP session.
sourcepub fn set_amazon_side_asn(self, input: Option<i64>) -> Self
pub fn set_amazon_side_asn(self, input: Option<i64>) -> Self
The private Autonomous System Number (ASN) for the Amazon side of a BGP session.
Examples found in repository?
32280 32281 32282 32283 32284 32285 32286 32287 32288 32289 32290 32291 32292 32293 32294 32295 32296 32297 32298 32299 32300 32301 32302 32303 32304 32305 32306 32307 32308 32309 32310 32311 32312 32313 32314 32315 32316 32317 32318 32319 32320 32321 32322 32323 32324 32325 32326 32327 32328 32329 32330 32331 32332 32333 32334 32335 32336 32337 32338 32339 32340 32341 32342 32343 32344 32345 32346 32347 32348 32349 32350 32351 32352 32353 32354 32355 32356 32357 32358 32359 32360 32361 32362 32363 32364 32365 32366 32367 32368 32369 32370 32371 32372 32373 32374 32375 32376 32377 32378 32379 32380
pub fn deser_structure_crate_model_vpn_gateway(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VpnGateway, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::VpnGateway::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#VpnGateway$AvailabilityZone */ => {
let var_1451 =
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_availability_zone(var_1451);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#VpnGateway$State */ => {
let var_1452 =
Some(
Result::<crate::model::VpnState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::VpnState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1452);
}
,
s if s.matches("type") /* Type com.amazonaws.ec2#VpnGateway$Type */ => {
let var_1453 =
Some(
Result::<crate::model::GatewayType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::GatewayType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_type(var_1453);
}
,
s if s.matches("attachments") /* VpcAttachments com.amazonaws.ec2#VpnGateway$VpcAttachments */ => {
let var_1454 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_vpc_attachment_list(&mut tag)
?
)
;
builder = builder.set_vpc_attachments(var_1454);
}
,
s if s.matches("vpnGatewayId") /* VpnGatewayId com.amazonaws.ec2#VpnGateway$VpnGatewayId */ => {
let var_1455 =
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_vpn_gateway_id(var_1455);
}
,
s if s.matches("amazonSideAsn") /* AmazonSideAsn com.amazonaws.ec2#VpnGateway$AmazonSideAsn */ => {
let var_1456 =
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_amazon_side_asn(var_1456);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#VpnGateway$Tags */ => {
let var_1457 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1457);
}
,
_ => {}
}
}
Ok(builder.build())
}
Appends an item to tags
.
To override the contents of this collection use set_tags
.
Any tags assigned to the virtual private gateway.
Any tags assigned to the virtual private gateway.
Examples found in repository?
32280 32281 32282 32283 32284 32285 32286 32287 32288 32289 32290 32291 32292 32293 32294 32295 32296 32297 32298 32299 32300 32301 32302 32303 32304 32305 32306 32307 32308 32309 32310 32311 32312 32313 32314 32315 32316 32317 32318 32319 32320 32321 32322 32323 32324 32325 32326 32327 32328 32329 32330 32331 32332 32333 32334 32335 32336 32337 32338 32339 32340 32341 32342 32343 32344 32345 32346 32347 32348 32349 32350 32351 32352 32353 32354 32355 32356 32357 32358 32359 32360 32361 32362 32363 32364 32365 32366 32367 32368 32369 32370 32371 32372 32373 32374 32375 32376 32377 32378 32379 32380
pub fn deser_structure_crate_model_vpn_gateway(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VpnGateway, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::VpnGateway::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#VpnGateway$AvailabilityZone */ => {
let var_1451 =
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_availability_zone(var_1451);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#VpnGateway$State */ => {
let var_1452 =
Some(
Result::<crate::model::VpnState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::VpnState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1452);
}
,
s if s.matches("type") /* Type com.amazonaws.ec2#VpnGateway$Type */ => {
let var_1453 =
Some(
Result::<crate::model::GatewayType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::GatewayType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_type(var_1453);
}
,
s if s.matches("attachments") /* VpcAttachments com.amazonaws.ec2#VpnGateway$VpcAttachments */ => {
let var_1454 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_vpc_attachment_list(&mut tag)
?
)
;
builder = builder.set_vpc_attachments(var_1454);
}
,
s if s.matches("vpnGatewayId") /* VpnGatewayId com.amazonaws.ec2#VpnGateway$VpnGatewayId */ => {
let var_1455 =
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_vpn_gateway_id(var_1455);
}
,
s if s.matches("amazonSideAsn") /* AmazonSideAsn com.amazonaws.ec2#VpnGateway$AmazonSideAsn */ => {
let var_1456 =
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_amazon_side_asn(var_1456);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#VpnGateway$Tags */ => {
let var_1457 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1457);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> VpnGateway
pub fn build(self) -> VpnGateway
Consumes the builder and constructs a VpnGateway
.
Examples found in repository?
32280 32281 32282 32283 32284 32285 32286 32287 32288 32289 32290 32291 32292 32293 32294 32295 32296 32297 32298 32299 32300 32301 32302 32303 32304 32305 32306 32307 32308 32309 32310 32311 32312 32313 32314 32315 32316 32317 32318 32319 32320 32321 32322 32323 32324 32325 32326 32327 32328 32329 32330 32331 32332 32333 32334 32335 32336 32337 32338 32339 32340 32341 32342 32343 32344 32345 32346 32347 32348 32349 32350 32351 32352 32353 32354 32355 32356 32357 32358 32359 32360 32361 32362 32363 32364 32365 32366 32367 32368 32369 32370 32371 32372 32373 32374 32375 32376 32377 32378 32379 32380
pub fn deser_structure_crate_model_vpn_gateway(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VpnGateway, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::VpnGateway::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#VpnGateway$AvailabilityZone */ => {
let var_1451 =
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_availability_zone(var_1451);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#VpnGateway$State */ => {
let var_1452 =
Some(
Result::<crate::model::VpnState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::VpnState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1452);
}
,
s if s.matches("type") /* Type com.amazonaws.ec2#VpnGateway$Type */ => {
let var_1453 =
Some(
Result::<crate::model::GatewayType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::GatewayType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_type(var_1453);
}
,
s if s.matches("attachments") /* VpcAttachments com.amazonaws.ec2#VpnGateway$VpcAttachments */ => {
let var_1454 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_vpc_attachment_list(&mut tag)
?
)
;
builder = builder.set_vpc_attachments(var_1454);
}
,
s if s.matches("vpnGatewayId") /* VpnGatewayId com.amazonaws.ec2#VpnGateway$VpnGatewayId */ => {
let var_1455 =
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_vpn_gateway_id(var_1455);
}
,
s if s.matches("amazonSideAsn") /* AmazonSideAsn com.amazonaws.ec2#VpnGateway$AmazonSideAsn */ => {
let var_1456 =
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_amazon_side_asn(var_1456);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#VpnGateway$Tags */ => {
let var_1457 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1457);
}
,
_ => {}
}
}
Ok(builder.build())
}