pub fn parse_http_generic_error(
response: &http::Response<bytes::Bytes>,
) -> Result<aws_smithy_types::Error, aws_smithy_xml::decode::XmlDecodeError> {
crate::rest_xml_wrapped_errors::parse_generic_error(response.body().as_ref())
}
#[allow(unused_mut)]
pub fn deser_structure_crate_error_access_point_not_found_exception_xml_err(
inp: &[u8],
mut builder: crate::error::access_point_not_found_exception::Builder,
) -> Result<
crate::error::access_point_not_found_exception::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_wrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("Message") => {
let var_1 =
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_message(var_1);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_structure_crate_error_duplicate_tag_keys_exception_xml_err(
inp: &[u8],
mut builder: crate::error::duplicate_tag_keys_exception::Builder,
) -> Result<
crate::error::duplicate_tag_keys_exception::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_wrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("Message") => {
let var_2 =
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_message(var_2);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_structure_crate_error_too_many_tags_exception_xml_err(
inp: &[u8],
mut builder: crate::error::too_many_tags_exception::Builder,
) -> Result<crate::error::too_many_tags_exception::Builder, aws_smithy_xml::decode::XmlDecodeError>
{
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_wrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("Message") => {
let var_3 =
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_message(var_3);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_structure_crate_error_invalid_configuration_request_exception_xml_err(
inp: &[u8],
mut builder: crate::error::invalid_configuration_request_exception::Builder,
) -> Result<
crate::error::invalid_configuration_request_exception::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_wrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("Message") => {
let var_4 =
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_message(var_4);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_structure_crate_error_invalid_security_group_exception_xml_err(
inp: &[u8],
mut builder: crate::error::invalid_security_group_exception::Builder,
) -> Result<
crate::error::invalid_security_group_exception::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_wrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("Message") => {
let var_5 =
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_message(var_5);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_apply_security_groups_to_load_balancer(
inp: &[u8],
mut builder: crate::output::apply_security_groups_to_load_balancer_output::Builder,
) -> Result<
crate::output::apply_security_groups_to_load_balancer_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !(start_el.matches("ApplySecurityGroupsToLoadBalancerResponse")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected ApplySecurityGroupsToLoadBalancerResponse got {:?}",
start_el
)));
}
if let Some(mut result_tag) = decoder.next_tag() {
let start_el = result_tag.start_el();
if !(start_el.matches("ApplySecurityGroupsToLoadBalancerResult")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid result, expected ApplySecurityGroupsToLoadBalancerResult got {:?}",
start_el
)));
}
while let Some(mut tag) = result_tag.next_tag() {
match tag.start_el() {
s if s.matches("SecurityGroups") => {
let var_6 =
Some(
crate::xml_deser::deser_list_com_amazonaws_elasticloadbalancing_security_groups(&mut tag)
?
)
;
builder = builder.set_security_groups(var_6);
}
,
_ => {}
}
}
} else {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(
"expected ApplySecurityGroupsToLoadBalancerResult tag",
));
};
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_structure_crate_error_invalid_subnet_exception_xml_err(
inp: &[u8],
mut builder: crate::error::invalid_subnet_exception::Builder,
) -> Result<crate::error::invalid_subnet_exception::Builder, aws_smithy_xml::decode::XmlDecodeError>
{
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_wrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("Message") => {
let var_7 =
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_message(var_7);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_structure_crate_error_subnet_not_found_exception_xml_err(
inp: &[u8],
mut builder: crate::error::subnet_not_found_exception::Builder,
) -> Result<crate::error::subnet_not_found_exception::Builder, aws_smithy_xml::decode::XmlDecodeError>
{
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_wrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("Message") => {
let var_8 =
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_message(var_8);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_attach_load_balancer_to_subnets(
inp: &[u8],
mut builder: crate::output::attach_load_balancer_to_subnets_output::Builder,
) -> Result<
crate::output::attach_load_balancer_to_subnets_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !(start_el.matches("AttachLoadBalancerToSubnetsResponse")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected AttachLoadBalancerToSubnetsResponse got {:?}",
start_el
)));
}
if let Some(mut result_tag) = decoder.next_tag() {
let start_el = result_tag.start_el();
if !(start_el.matches("AttachLoadBalancerToSubnetsResult")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid result, expected AttachLoadBalancerToSubnetsResult got {:?}",
start_el
)));
}
while let Some(mut tag) = result_tag.next_tag() {
match tag.start_el() {
s if s.matches("Subnets") => {
let var_9 =
Some(
crate::xml_deser::deser_list_com_amazonaws_elasticloadbalancing_subnets(&mut tag)
?
)
;
builder = builder.set_subnets(var_9);
}
,
_ => {}
}
}
} else {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(
"expected AttachLoadBalancerToSubnetsResult tag",
));
};
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_configure_health_check(
inp: &[u8],
mut builder: crate::output::configure_health_check_output::Builder,
) -> Result<
crate::output::configure_health_check_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !(start_el.matches("ConfigureHealthCheckResponse")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected ConfigureHealthCheckResponse got {:?}",
start_el
)));
}
if let Some(mut result_tag) = decoder.next_tag() {
let start_el = result_tag.start_el();
if !(start_el.matches("ConfigureHealthCheckResult")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid result, expected ConfigureHealthCheckResult got {:?}",
start_el
)));
}
while let Some(mut tag) = result_tag.next_tag() {
match tag.start_el() {
s if s.matches("HealthCheck") => {
let var_10 =
Some(
crate::xml_deser::deser_structure_crate_model_health_check(&mut tag)
?
)
;
builder = builder.set_health_check(var_10);
}
,
_ => {}
}
}
} else {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(
"expected ConfigureHealthCheckResult tag",
));
};
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_structure_crate_error_duplicate_policy_name_exception_xml_err(
inp: &[u8],
mut builder: crate::error::duplicate_policy_name_exception::Builder,
) -> Result<
crate::error::duplicate_policy_name_exception::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_wrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("Message") => {
let var_11 =
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_message(var_11);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_structure_crate_error_too_many_policies_exception_xml_err(
inp: &[u8],
mut builder: crate::error::too_many_policies_exception::Builder,
) -> Result<
crate::error::too_many_policies_exception::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_wrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("Message") => {
let var_12 =
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_message(var_12);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_structure_crate_error_certificate_not_found_exception_xml_err(
inp: &[u8],
mut builder: crate::error::certificate_not_found_exception::Builder,
) -> Result<
crate::error::certificate_not_found_exception::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_wrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("Message") => {
let var_13 =
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_message(var_13);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_structure_crate_error_duplicate_access_point_name_exception_xml_err(
inp: &[u8],
mut builder: crate::error::duplicate_access_point_name_exception::Builder,
) -> Result<
crate::error::duplicate_access_point_name_exception::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_wrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("Message") => {
let var_14 =
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_message(var_14);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_structure_crate_error_invalid_scheme_exception_xml_err(
inp: &[u8],
mut builder: crate::error::invalid_scheme_exception::Builder,
) -> Result<crate::error::invalid_scheme_exception::Builder, aws_smithy_xml::decode::XmlDecodeError>
{
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_wrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("Message") => {
let var_15 =
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_message(var_15);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_structure_crate_error_operation_not_permitted_exception_xml_err(
inp: &[u8],
mut builder: crate::error::operation_not_permitted_exception::Builder,
) -> Result<
crate::error::operation_not_permitted_exception::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_wrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("Message") => {
let var_16 =
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_message(var_16);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_structure_crate_error_too_many_access_points_exception_xml_err(
inp: &[u8],
mut builder: crate::error::too_many_access_points_exception::Builder,
) -> Result<
crate::error::too_many_access_points_exception::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_wrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("Message") => {
let var_17 =
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_message(var_17);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_structure_crate_error_unsupported_protocol_exception_xml_err(
inp: &[u8],
mut builder: crate::error::unsupported_protocol_exception::Builder,
) -> Result<
crate::error::unsupported_protocol_exception::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_wrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("Message") => {
let var_18 =
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_message(var_18);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_create_load_balancer(
inp: &[u8],
mut builder: crate::output::create_load_balancer_output::Builder,
) -> Result<
crate::output::create_load_balancer_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !(start_el.matches("CreateLoadBalancerResponse")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected CreateLoadBalancerResponse got {:?}",
start_el
)));
}
if let Some(mut result_tag) = decoder.next_tag() {
let start_el = result_tag.start_el();
if !(start_el.matches("CreateLoadBalancerResult")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid result, expected CreateLoadBalancerResult got {:?}",
start_el
)));
}
while let Some(mut tag) = result_tag.next_tag() {
match tag.start_el() {
s if s.matches("DNSName") => {
let var_19 =
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_dns_name(var_19);
}
,
_ => {}
}
}
} else {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(
"expected CreateLoadBalancerResult tag",
));
};
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_structure_crate_error_duplicate_listener_exception_xml_err(
inp: &[u8],
mut builder: crate::error::duplicate_listener_exception::Builder,
) -> Result<
crate::error::duplicate_listener_exception::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_wrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("Message") => {
let var_20 =
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_message(var_20);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_structure_crate_error_policy_type_not_found_exception_xml_err(
inp: &[u8],
mut builder: crate::error::policy_type_not_found_exception::Builder,
) -> Result<
crate::error::policy_type_not_found_exception::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_wrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("Message") => {
let var_21 =
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_message(var_21);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_structure_crate_error_invalid_end_point_exception_xml_err(
inp: &[u8],
mut builder: crate::error::invalid_end_point_exception::Builder,
) -> Result<
crate::error::invalid_end_point_exception::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_wrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("Message") => {
let var_22 =
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_message(var_22);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_deregister_instances_from_load_balancer(
inp: &[u8],
mut builder: crate::output::deregister_instances_from_load_balancer_output::Builder,
) -> Result<
crate::output::deregister_instances_from_load_balancer_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !(start_el.matches("DeregisterInstancesFromLoadBalancerResponse")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected DeregisterInstancesFromLoadBalancerResponse got {:?}",
start_el
)));
}
if let Some(mut result_tag) = decoder.next_tag() {
let start_el = result_tag.start_el();
if !(start_el.matches("DeregisterInstancesFromLoadBalancerResult")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid result, expected DeregisterInstancesFromLoadBalancerResult got {:?}",
start_el
)));
}
while let Some(mut tag) = result_tag.next_tag() {
match tag.start_el() {
s if s.matches("Instances") => {
let var_23 =
Some(
crate::xml_deser::deser_list_com_amazonaws_elasticloadbalancing_instances(&mut tag)
?
)
;
builder = builder.set_instances(var_23);
}
,
_ => {}
}
}
} else {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(
"expected DeregisterInstancesFromLoadBalancerResult tag",
));
};
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_describe_account_limits(
inp: &[u8],
mut builder: crate::output::describe_account_limits_output::Builder,
) -> Result<
crate::output::describe_account_limits_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !(start_el.matches("DescribeAccountLimitsResponse")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected DescribeAccountLimitsResponse got {:?}",
start_el
)));
}
if let Some(mut result_tag) = decoder.next_tag() {
let start_el = result_tag.start_el();
if !(start_el.matches("DescribeAccountLimitsResult")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid result, expected DescribeAccountLimitsResult got {:?}",
start_el
)));
}
while let Some(mut tag) = result_tag.next_tag() {
match tag.start_el() {
s if s.matches("Limits") => {
let var_24 =
Some(
crate::xml_deser::deser_list_com_amazonaws_elasticloadbalancing_limits(&mut tag)
?
)
;
builder = builder.set_limits(var_24);
}
,
s if s.matches("NextMarker") => {
let var_25 =
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_next_marker(var_25);
}
,
_ => {}
}
}
} else {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(
"expected DescribeAccountLimitsResult tag",
));
};
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_describe_instance_health(
inp: &[u8],
mut builder: crate::output::describe_instance_health_output::Builder,
) -> Result<
crate::output::describe_instance_health_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !(start_el.matches("DescribeInstanceHealthResponse")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected DescribeInstanceHealthResponse got {:?}",
start_el
)));
}
if let Some(mut result_tag) = decoder.next_tag() {
let start_el = result_tag.start_el();
if !(start_el.matches("DescribeInstanceHealthResult")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid result, expected DescribeInstanceHealthResult got {:?}",
start_el
)));
}
while let Some(mut tag) = result_tag.next_tag() {
match tag.start_el() {
s if s.matches("InstanceStates") => {
let var_26 =
Some(
crate::xml_deser::deser_list_com_amazonaws_elasticloadbalancing_instance_states(&mut tag)
?
)
;
builder = builder.set_instance_states(var_26);
}
,
_ => {}
}
}
} else {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(
"expected DescribeInstanceHealthResult tag",
));
};
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_structure_crate_error_load_balancer_attribute_not_found_exception_xml_err(
inp: &[u8],
mut builder: crate::error::load_balancer_attribute_not_found_exception::Builder,
) -> Result<
crate::error::load_balancer_attribute_not_found_exception::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_wrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("Message") => {
let var_27 =
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_message(var_27);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_describe_load_balancer_attributes(
inp: &[u8],
mut builder: crate::output::describe_load_balancer_attributes_output::Builder,
) -> Result<
crate::output::describe_load_balancer_attributes_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !(start_el.matches("DescribeLoadBalancerAttributesResponse")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected DescribeLoadBalancerAttributesResponse got {:?}",
start_el
)));
}
if let Some(mut result_tag) = decoder.next_tag() {
let start_el = result_tag.start_el();
if !(start_el.matches("DescribeLoadBalancerAttributesResult")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid result, expected DescribeLoadBalancerAttributesResult got {:?}",
start_el
)));
}
while let Some(mut tag) = result_tag.next_tag() {
match tag.start_el() {
s if s.matches("LoadBalancerAttributes") => {
let var_28 =
Some(
crate::xml_deser::deser_structure_crate_model_load_balancer_attributes(&mut tag)
?
)
;
builder = builder.set_load_balancer_attributes(var_28);
}
,
_ => {}
}
}
} else {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(
"expected DescribeLoadBalancerAttributesResult tag",
));
};
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_structure_crate_error_policy_not_found_exception_xml_err(
inp: &[u8],
mut builder: crate::error::policy_not_found_exception::Builder,
) -> Result<crate::error::policy_not_found_exception::Builder, aws_smithy_xml::decode::XmlDecodeError>
{
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_wrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("Message") => {
let var_29 =
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_message(var_29);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_describe_load_balancer_policies(
inp: &[u8],
mut builder: crate::output::describe_load_balancer_policies_output::Builder,
) -> Result<
crate::output::describe_load_balancer_policies_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !(start_el.matches("DescribeLoadBalancerPoliciesResponse")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected DescribeLoadBalancerPoliciesResponse got {:?}",
start_el
)));
}
if let Some(mut result_tag) = decoder.next_tag() {
let start_el = result_tag.start_el();
if !(start_el.matches("DescribeLoadBalancerPoliciesResult")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid result, expected DescribeLoadBalancerPoliciesResult got {:?}",
start_el
)));
}
while let Some(mut tag) = result_tag.next_tag() {
match tag.start_el() {
s if s.matches("PolicyDescriptions") => {
let var_30 =
Some(
crate::xml_deser::deser_list_com_amazonaws_elasticloadbalancing_policy_descriptions(&mut tag)
?
)
;
builder = builder.set_policy_descriptions(var_30);
}
,
_ => {}
}
}
} else {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(
"expected DescribeLoadBalancerPoliciesResult tag",
));
};
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_describe_load_balancer_policy_types(
inp: &[u8],
mut builder: crate::output::describe_load_balancer_policy_types_output::Builder,
) -> Result<
crate::output::describe_load_balancer_policy_types_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !(start_el.matches("DescribeLoadBalancerPolicyTypesResponse")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected DescribeLoadBalancerPolicyTypesResponse got {:?}",
start_el
)));
}
if let Some(mut result_tag) = decoder.next_tag() {
let start_el = result_tag.start_el();
if !(start_el.matches("DescribeLoadBalancerPolicyTypesResult")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid result, expected DescribeLoadBalancerPolicyTypesResult got {:?}",
start_el
)));
}
while let Some(mut tag) = result_tag.next_tag() {
match tag.start_el() {
s if s.matches("PolicyTypeDescriptions") => {
let var_31 =
Some(
crate::xml_deser::deser_list_com_amazonaws_elasticloadbalancing_policy_type_descriptions(&mut tag)
?
)
;
builder = builder.set_policy_type_descriptions(var_31);
}
,
_ => {}
}
}
} else {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(
"expected DescribeLoadBalancerPolicyTypesResult tag",
));
};
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_structure_crate_error_dependency_throttle_exception_xml_err(
inp: &[u8],
mut builder: crate::error::dependency_throttle_exception::Builder,
) -> Result<
crate::error::dependency_throttle_exception::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_wrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("Message") => {
let var_32 =
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_message(var_32);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_describe_load_balancers(
inp: &[u8],
mut builder: crate::output::describe_load_balancers_output::Builder,
) -> Result<
crate::output::describe_load_balancers_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !(start_el.matches("DescribeLoadBalancersResponse")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected DescribeLoadBalancersResponse got {:?}",
start_el
)));
}
if let Some(mut result_tag) = decoder.next_tag() {
let start_el = result_tag.start_el();
if !(start_el.matches("DescribeLoadBalancersResult")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid result, expected DescribeLoadBalancersResult got {:?}",
start_el
)));
}
while let Some(mut tag) = result_tag.next_tag() {
match tag.start_el() {
s if s.matches("LoadBalancerDescriptions") => {
let var_33 =
Some(
crate::xml_deser::deser_list_com_amazonaws_elasticloadbalancing_load_balancer_descriptions(&mut tag)
?
)
;
builder = builder.set_load_balancer_descriptions(var_33);
}
,
s if s.matches("NextMarker") => {
let var_34 =
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_next_marker(var_34);
}
,
_ => {}
}
}
} else {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(
"expected DescribeLoadBalancersResult tag",
));
};
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_describe_tags(
inp: &[u8],
mut builder: crate::output::describe_tags_output::Builder,
) -> Result<crate::output::describe_tags_output::Builder, aws_smithy_xml::decode::XmlDecodeError> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !(start_el.matches("DescribeTagsResponse")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected DescribeTagsResponse got {:?}",
start_el
)));
}
if let Some(mut result_tag) = decoder.next_tag() {
let start_el = result_tag.start_el();
if !(start_el.matches("DescribeTagsResult")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid result, expected DescribeTagsResult got {:?}",
start_el
)));
}
while let Some(mut tag) = result_tag.next_tag() {
match tag.start_el() {
s if s.matches("TagDescriptions") => {
let var_35 =
Some(
crate::xml_deser::deser_list_com_amazonaws_elasticloadbalancing_tag_descriptions(&mut tag)
?
)
;
builder = builder.set_tag_descriptions(var_35);
}
,
_ => {}
}
}
} else {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(
"expected DescribeTagsResult tag",
));
};
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_detach_load_balancer_from_subnets(
inp: &[u8],
mut builder: crate::output::detach_load_balancer_from_subnets_output::Builder,
) -> Result<
crate::output::detach_load_balancer_from_subnets_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !(start_el.matches("DetachLoadBalancerFromSubnetsResponse")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected DetachLoadBalancerFromSubnetsResponse got {:?}",
start_el
)));
}
if let Some(mut result_tag) = decoder.next_tag() {
let start_el = result_tag.start_el();
if !(start_el.matches("DetachLoadBalancerFromSubnetsResult")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid result, expected DetachLoadBalancerFromSubnetsResult got {:?}",
start_el
)));
}
while let Some(mut tag) = result_tag.next_tag() {
match tag.start_el() {
s if s.matches("Subnets") => {
let var_36 =
Some(
crate::xml_deser::deser_list_com_amazonaws_elasticloadbalancing_subnets(&mut tag)
?
)
;
builder = builder.set_subnets(var_36);
}
,
_ => {}
}
}
} else {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(
"expected DetachLoadBalancerFromSubnetsResult tag",
));
};
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_disable_availability_zones_for_load_balancer(
inp: &[u8],
mut builder: crate::output::disable_availability_zones_for_load_balancer_output::Builder,
) -> Result<
crate::output::disable_availability_zones_for_load_balancer_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !(start_el.matches("DisableAvailabilityZonesForLoadBalancerResponse")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected DisableAvailabilityZonesForLoadBalancerResponse got {:?}",
start_el
)));
}
if let Some(mut result_tag) = decoder.next_tag() {
let start_el = result_tag.start_el();
if !(start_el.matches("DisableAvailabilityZonesForLoadBalancerResult")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid result, expected DisableAvailabilityZonesForLoadBalancerResult got {:?}",
start_el
)));
}
while let Some(mut tag) = result_tag.next_tag() {
match tag.start_el() {
s if s.matches("AvailabilityZones") => {
let var_37 =
Some(
crate::xml_deser::deser_list_com_amazonaws_elasticloadbalancing_availability_zones(&mut tag)
?
)
;
builder = builder.set_availability_zones(var_37);
}
,
_ => {}
}
}
} else {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(
"expected DisableAvailabilityZonesForLoadBalancerResult tag",
));
};
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_enable_availability_zones_for_load_balancer(
inp: &[u8],
mut builder: crate::output::enable_availability_zones_for_load_balancer_output::Builder,
) -> Result<
crate::output::enable_availability_zones_for_load_balancer_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !(start_el.matches("EnableAvailabilityZonesForLoadBalancerResponse")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected EnableAvailabilityZonesForLoadBalancerResponse got {:?}",
start_el
)));
}
if let Some(mut result_tag) = decoder.next_tag() {
let start_el = result_tag.start_el();
if !(start_el.matches("EnableAvailabilityZonesForLoadBalancerResult")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid result, expected EnableAvailabilityZonesForLoadBalancerResult got {:?}",
start_el
)));
}
while let Some(mut tag) = result_tag.next_tag() {
match tag.start_el() {
s if s.matches("AvailabilityZones") => {
let var_38 =
Some(
crate::xml_deser::deser_list_com_amazonaws_elasticloadbalancing_availability_zones(&mut tag)
?
)
;
builder = builder.set_availability_zones(var_38);
}
,
_ => {}
}
}
} else {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(
"expected EnableAvailabilityZonesForLoadBalancerResult tag",
));
};
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_modify_load_balancer_attributes(
inp: &[u8],
mut builder: crate::output::modify_load_balancer_attributes_output::Builder,
) -> Result<
crate::output::modify_load_balancer_attributes_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !(start_el.matches("ModifyLoadBalancerAttributesResponse")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected ModifyLoadBalancerAttributesResponse got {:?}",
start_el
)));
}
if let Some(mut result_tag) = decoder.next_tag() {
let start_el = result_tag.start_el();
if !(start_el.matches("ModifyLoadBalancerAttributesResult")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid result, expected ModifyLoadBalancerAttributesResult got {:?}",
start_el
)));
}
while let Some(mut tag) = result_tag.next_tag() {
match tag.start_el() {
s if s.matches("LoadBalancerName") => {
let var_39 =
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_load_balancer_name(var_39);
}
,
s if s.matches("LoadBalancerAttributes") => {
let var_40 =
Some(
crate::xml_deser::deser_structure_crate_model_load_balancer_attributes(&mut tag)
?
)
;
builder = builder.set_load_balancer_attributes(var_40);
}
,
_ => {}
}
}
} else {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(
"expected ModifyLoadBalancerAttributesResult tag",
));
};
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_crate_operation_register_instances_with_load_balancer(
inp: &[u8],
mut builder: crate::output::register_instances_with_load_balancer_output::Builder,
) -> Result<
crate::output::register_instances_with_load_balancer_output::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut doc = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
#[allow(unused_variables)]
let start_el = decoder.start_el();
if !(start_el.matches("RegisterInstancesWithLoadBalancerResponse")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid root, expected RegisterInstancesWithLoadBalancerResponse got {:?}",
start_el
)));
}
if let Some(mut result_tag) = decoder.next_tag() {
let start_el = result_tag.start_el();
if !(start_el.matches("RegisterInstancesWithLoadBalancerResult")) {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(format!(
"invalid result, expected RegisterInstancesWithLoadBalancerResult got {:?}",
start_el
)));
}
while let Some(mut tag) = result_tag.next_tag() {
match tag.start_el() {
s if s.matches("Instances") => {
let var_41 =
Some(
crate::xml_deser::deser_list_com_amazonaws_elasticloadbalancing_instances(&mut tag)
?
)
;
builder = builder.set_instances(var_41);
}
,
_ => {}
}
}
} else {
return Err(aws_smithy_xml::decode::XmlDecodeError::custom(
"expected RegisterInstancesWithLoadBalancerResult tag",
));
};
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_structure_crate_error_listener_not_found_exception_xml_err(
inp: &[u8],
mut builder: crate::error::listener_not_found_exception::Builder,
) -> Result<
crate::error::listener_not_found_exception::Builder,
aws_smithy_xml::decode::XmlDecodeError,
> {
if inp.is_empty() {
return Ok(builder);
}
let mut document = aws_smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut error_decoder = crate::rest_xml_wrapped_errors::error_scope(&mut document)?;
while let Some(mut tag) = error_decoder.next_tag() {
match tag.start_el() {
s if s.matches("Message") => {
let var_42 =
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_message(var_42);
}
,
_ => {}
}
}
Ok(builder)
}
pub fn deser_list_com_amazonaws_elasticloadbalancing_security_groups(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<std::string::String>, aws_smithy_xml::decode::XmlDecodeError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("member") => {
out.push(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_com_amazonaws_elasticloadbalancing_subnets(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<std::string::String>, aws_smithy_xml::decode::XmlDecodeError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("member") => {
out.push(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_crate_model_health_check(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::HealthCheck, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::HealthCheck::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Target") => {
let var_43 =
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_target(var_43);
}
,
s if s.matches("Interval") => {
let var_44 =
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.elasticloadbalancing#HealthCheckInterval`)"))
}
?
)
;
builder = builder.set_interval(var_44);
}
,
s if s.matches("Timeout") => {
let var_45 =
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.elasticloadbalancing#HealthCheckTimeout`)"))
}
?
)
;
builder = builder.set_timeout(var_45);
}
,
s if s.matches("UnhealthyThreshold") => {
let var_46 =
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.elasticloadbalancing#UnhealthyThreshold`)"))
}
?
)
;
builder = builder.set_unhealthy_threshold(var_46);
}
,
s if s.matches("HealthyThreshold") => {
let var_47 =
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.elasticloadbalancing#HealthyThreshold`)"))
}
?
)
;
builder = builder.set_healthy_threshold(var_47);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_com_amazonaws_elasticloadbalancing_instances(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::Instance>, aws_smithy_xml::decode::XmlDecodeError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("member") => {
out.push(
crate::xml_deser::deser_structure_crate_model_instance(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_com_amazonaws_elasticloadbalancing_limits(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::Limit>, aws_smithy_xml::decode::XmlDecodeError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("member") => {
out.push(
crate::xml_deser::deser_structure_crate_model_limit(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_com_amazonaws_elasticloadbalancing_instance_states(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::InstanceState>, aws_smithy_xml::decode::XmlDecodeError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("member") => {
out.push(
crate::xml_deser::deser_structure_crate_model_instance_state(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_crate_model_load_balancer_attributes(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LoadBalancerAttributes, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::LoadBalancerAttributes::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("CrossZoneLoadBalancing") => {
let var_48 =
Some(
crate::xml_deser::deser_structure_crate_model_cross_zone_load_balancing(&mut tag)
?
)
;
builder = builder.set_cross_zone_load_balancing(var_48);
}
,
s if s.matches("AccessLog") => {
let var_49 =
Some(
crate::xml_deser::deser_structure_crate_model_access_log(&mut tag)
?
)
;
builder = builder.set_access_log(var_49);
}
,
s if s.matches("ConnectionDraining") => {
let var_50 =
Some(
crate::xml_deser::deser_structure_crate_model_connection_draining(&mut tag)
?
)
;
builder = builder.set_connection_draining(var_50);
}
,
s if s.matches("ConnectionSettings") => {
let var_51 =
Some(
crate::xml_deser::deser_structure_crate_model_connection_settings(&mut tag)
?
)
;
builder = builder.set_connection_settings(var_51);
}
,
s if s.matches("AdditionalAttributes") => {
let var_52 =
Some(
crate::xml_deser::deser_list_com_amazonaws_elasticloadbalancing_additional_attributes(&mut tag)
?
)
;
builder = builder.set_additional_attributes(var_52);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_com_amazonaws_elasticloadbalancing_policy_descriptions(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::PolicyDescription>, aws_smithy_xml::decode::XmlDecodeError>
{
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("member") => {
out.push(
crate::xml_deser::deser_structure_crate_model_policy_description(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_com_amazonaws_elasticloadbalancing_policy_type_descriptions(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::PolicyTypeDescription>,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("member") => {
out.push(
crate::xml_deser::deser_structure_crate_model_policy_type_description(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_com_amazonaws_elasticloadbalancing_load_balancer_descriptions(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::LoadBalancerDescription>,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("member") => {
out.push(
crate::xml_deser::deser_structure_crate_model_load_balancer_description(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_com_amazonaws_elasticloadbalancing_tag_descriptions(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::TagDescription>, aws_smithy_xml::decode::XmlDecodeError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("member") => {
out.push(
crate::xml_deser::deser_structure_crate_model_tag_description(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_com_amazonaws_elasticloadbalancing_availability_zones(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<std::string::String>, aws_smithy_xml::decode::XmlDecodeError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("member") => {
out.push(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_crate_model_instance(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Instance, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Instance::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("InstanceId") => {
let var_53 =
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_instance_id(var_53);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_limit(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Limit, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Limit::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Name") => {
let var_54 =
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_name(var_54);
}
,
s if s.matches("Max") => {
let var_55 =
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_max(var_55);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_instance_state(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceState, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceState::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("InstanceId") => {
let var_56 =
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_instance_id(var_56);
}
,
s if s.matches("State") => {
let var_57 =
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_state(var_57);
}
,
s if s.matches("ReasonCode") => {
let var_58 =
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_reason_code(var_58);
}
,
s if s.matches("Description") => {
let var_59 =
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_59);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_cross_zone_load_balancing(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CrossZoneLoadBalancing, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CrossZoneLoadBalancing::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Enabled") => {
let var_60 =
Some(
{
<bool 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 (boolean: `com.amazonaws.elasticloadbalancing#CrossZoneLoadBalancingEnabled`)"))
}
?
)
;
builder = builder.set_enabled(var_60);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_access_log(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AccessLog, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::AccessLog::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Enabled") => {
let var_61 =
Some(
{
<bool 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 (boolean: `com.amazonaws.elasticloadbalancing#AccessLogEnabled`)"))
}
?
)
;
builder = builder.set_enabled(var_61);
}
,
s if s.matches("S3BucketName") => {
let var_62 =
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_s3_bucket_name(var_62);
}
,
s if s.matches("EmitInterval") => {
let var_63 =
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.elasticloadbalancing#AccessLogInterval`)"))
}
?
)
;
builder = builder.set_emit_interval(var_63);
}
,
s if s.matches("S3BucketPrefix") => {
let var_64 =
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_s3_bucket_prefix(var_64);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_connection_draining(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ConnectionDraining, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ConnectionDraining::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Enabled") => {
let var_65 =
Some(
{
<bool 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 (boolean: `com.amazonaws.elasticloadbalancing#ConnectionDrainingEnabled`)"))
}
?
)
;
builder = builder.set_enabled(var_65);
}
,
s if s.matches("Timeout") => {
let var_66 =
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.elasticloadbalancing#ConnectionDrainingTimeout`)"))
}
?
)
;
builder = builder.set_timeout(var_66);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_connection_settings(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ConnectionSettings, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ConnectionSettings::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("IdleTimeout") => {
let var_67 =
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.elasticloadbalancing#IdleTimeout`)"))
}
?
)
;
builder = builder.set_idle_timeout(var_67);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_com_amazonaws_elasticloadbalancing_additional_attributes(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::AdditionalAttribute>, aws_smithy_xml::decode::XmlDecodeError>
{
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("member") => {
out.push(
crate::xml_deser::deser_structure_crate_model_additional_attribute(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_crate_model_policy_description(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PolicyDescription, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::PolicyDescription::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("PolicyName") => {
let var_68 =
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_policy_name(var_68);
}
,
s if s.matches("PolicyTypeName") => {
let var_69 =
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_policy_type_name(var_69);
}
,
s if s.matches("PolicyAttributeDescriptions") => {
let var_70 =
Some(
crate::xml_deser::deser_list_com_amazonaws_elasticloadbalancing_policy_attribute_descriptions(&mut tag)
?
)
;
builder = builder.set_policy_attribute_descriptions(var_70);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_policy_type_description(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PolicyTypeDescription, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::PolicyTypeDescription::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("PolicyTypeName") => {
let var_71 =
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_policy_type_name(var_71);
}
,
s if s.matches("Description") => {
let var_72 =
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_72);
}
,
s if s.matches("PolicyAttributeTypeDescriptions") => {
let var_73 =
Some(
crate::xml_deser::deser_list_com_amazonaws_elasticloadbalancing_policy_attribute_type_descriptions(&mut tag)
?
)
;
builder = builder.set_policy_attribute_type_descriptions(var_73);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_load_balancer_description(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LoadBalancerDescription, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::LoadBalancerDescription::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("LoadBalancerName") => {
let var_74 =
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_load_balancer_name(var_74);
}
,
s if s.matches("DNSName") => {
let var_75 =
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_dns_name(var_75);
}
,
s if s.matches("CanonicalHostedZoneName") => {
let var_76 =
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_canonical_hosted_zone_name(var_76);
}
,
s if s.matches("CanonicalHostedZoneNameID") => {
let var_77 =
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_canonical_hosted_zone_name_id(var_77);
}
,
s if s.matches("ListenerDescriptions") => {
let var_78 =
Some(
crate::xml_deser::deser_list_com_amazonaws_elasticloadbalancing_listener_descriptions(&mut tag)
?
)
;
builder = builder.set_listener_descriptions(var_78);
}
,
s if s.matches("Policies") => {
let var_79 =
Some(
crate::xml_deser::deser_structure_crate_model_policies(&mut tag)
?
)
;
builder = builder.set_policies(var_79);
}
,
s if s.matches("BackendServerDescriptions") => {
let var_80 =
Some(
crate::xml_deser::deser_list_com_amazonaws_elasticloadbalancing_backend_server_descriptions(&mut tag)
?
)
;
builder = builder.set_backend_server_descriptions(var_80);
}
,
s if s.matches("AvailabilityZones") => {
let var_81 =
Some(
crate::xml_deser::deser_list_com_amazonaws_elasticloadbalancing_availability_zones(&mut tag)
?
)
;
builder = builder.set_availability_zones(var_81);
}
,
s if s.matches("Subnets") => {
let var_82 =
Some(
crate::xml_deser::deser_list_com_amazonaws_elasticloadbalancing_subnets(&mut tag)
?
)
;
builder = builder.set_subnets(var_82);
}
,
s if s.matches("VPCId") => {
let var_83 =
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_vpc_id(var_83);
}
,
s if s.matches("Instances") => {
let var_84 =
Some(
crate::xml_deser::deser_list_com_amazonaws_elasticloadbalancing_instances(&mut tag)
?
)
;
builder = builder.set_instances(var_84);
}
,
s if s.matches("HealthCheck") => {
let var_85 =
Some(
crate::xml_deser::deser_structure_crate_model_health_check(&mut tag)
?
)
;
builder = builder.set_health_check(var_85);
}
,
s if s.matches("SourceSecurityGroup") => {
let var_86 =
Some(
crate::xml_deser::deser_structure_crate_model_source_security_group(&mut tag)
?
)
;
builder = builder.set_source_security_group(var_86);
}
,
s if s.matches("SecurityGroups") => {
let var_87 =
Some(
crate::xml_deser::deser_list_com_amazonaws_elasticloadbalancing_security_groups(&mut tag)
?
)
;
builder = builder.set_security_groups(var_87);
}
,
s if s.matches("CreatedTime") => {
let var_88 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.elasticloadbalancing#CreatedTime`)"))
?
)
;
builder = builder.set_created_time(var_88);
}
,
s if s.matches("Scheme") => {
let var_89 =
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_scheme(var_89);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_tag_description(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TagDescription, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::TagDescription::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("LoadBalancerName") => {
let var_90 =
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_load_balancer_name(var_90);
}
,
s if s.matches("Tags") => {
let var_91 =
Some(
crate::xml_deser::deser_list_com_amazonaws_elasticloadbalancing_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_91);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_additional_attribute(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AdditionalAttribute, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::AdditionalAttribute::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Key") => {
let var_92 =
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_key(var_92);
}
,
s if s.matches("Value") => {
let var_93 =
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_value(var_93);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_com_amazonaws_elasticloadbalancing_policy_attribute_descriptions(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::PolicyAttributeDescription>,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("member") => {
out.push(
crate::xml_deser::deser_structure_crate_model_policy_attribute_description(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_com_amazonaws_elasticloadbalancing_policy_attribute_type_descriptions(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::PolicyAttributeTypeDescription>,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("member") => {
out.push(
crate::xml_deser::deser_structure_crate_model_policy_attribute_type_description(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_com_amazonaws_elasticloadbalancing_listener_descriptions(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ListenerDescription>, aws_smithy_xml::decode::XmlDecodeError>
{
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("member") => {
out.push(
crate::xml_deser::deser_structure_crate_model_listener_description(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_crate_model_policies(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Policies, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Policies::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("AppCookieStickinessPolicies") => {
let var_94 =
Some(
crate::xml_deser::deser_list_com_amazonaws_elasticloadbalancing_app_cookie_stickiness_policies(&mut tag)
?
)
;
builder = builder.set_app_cookie_stickiness_policies(var_94);
}
,
s if s.matches("LBCookieStickinessPolicies") => {
let var_95 =
Some(
crate::xml_deser::deser_list_com_amazonaws_elasticloadbalancing_lb_cookie_stickiness_policies(&mut tag)
?
)
;
builder = builder.set_lb_cookie_stickiness_policies(var_95);
}
,
s if s.matches("OtherPolicies") => {
let var_96 =
Some(
crate::xml_deser::deser_list_com_amazonaws_elasticloadbalancing_policy_names(&mut tag)
?
)
;
builder = builder.set_other_policies(var_96);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_com_amazonaws_elasticloadbalancing_backend_server_descriptions(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::BackendServerDescription>,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("member") => {
out.push(
crate::xml_deser::deser_structure_crate_model_backend_server_description(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_crate_model_source_security_group(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SourceSecurityGroup, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::SourceSecurityGroup::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("OwnerAlias") => {
let var_97 =
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_owner_alias(var_97);
}
,
s if s.matches("GroupName") => {
let var_98 =
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_group_name(var_98);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_com_amazonaws_elasticloadbalancing_tag_list(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::Tag>, aws_smithy_xml::decode::XmlDecodeError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("member") => {
out.push(
crate::xml_deser::deser_structure_crate_model_tag(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_crate_model_policy_attribute_description(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PolicyAttributeDescription, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::PolicyAttributeDescription::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("AttributeName") => {
let var_99 =
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_attribute_name(var_99);
}
,
s if s.matches("AttributeValue") => {
let var_100 =
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_attribute_value(var_100);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_policy_attribute_type_description(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PolicyAttributeTypeDescription, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::PolicyAttributeTypeDescription::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("AttributeName") => {
let var_101 =
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_attribute_name(var_101);
}
,
s if s.matches("AttributeType") => {
let var_102 =
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_attribute_type(var_102);
}
,
s if s.matches("Description") => {
let var_103 =
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_103);
}
,
s if s.matches("DefaultValue") => {
let var_104 =
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_default_value(var_104);
}
,
s if s.matches("Cardinality") => {
let var_105 =
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_cardinality(var_105);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_listener_description(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ListenerDescription, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::ListenerDescription::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Listener") => {
let var_106 =
Some(
crate::xml_deser::deser_structure_crate_model_listener(&mut tag)
?
)
;
builder = builder.set_listener(var_106);
}
,
s if s.matches("PolicyNames") => {
let var_107 =
Some(
crate::xml_deser::deser_list_com_amazonaws_elasticloadbalancing_policy_names(&mut tag)
?
)
;
builder = builder.set_policy_names(var_107);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_com_amazonaws_elasticloadbalancing_app_cookie_stickiness_policies(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::AppCookieStickinessPolicy>,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("member") => {
out.push(
crate::xml_deser::deser_structure_crate_model_app_cookie_stickiness_policy(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_com_amazonaws_elasticloadbalancing_lb_cookie_stickiness_policies(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::LbCookieStickinessPolicy>,
aws_smithy_xml::decode::XmlDecodeError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("member") => {
out.push(
crate::xml_deser::deser_structure_crate_model_lb_cookie_stickiness_policy(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_com_amazonaws_elasticloadbalancing_policy_names(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<std::string::String>, aws_smithy_xml::decode::XmlDecodeError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("member") => {
out.push(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_crate_model_backend_server_description(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::BackendServerDescription, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::BackendServerDescription::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("InstancePort") => {
let var_108 =
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.elasticloadbalancing#InstancePort`)"))
}
?
)
;
builder = builder.set_instance_port(var_108);
}
,
s if s.matches("PolicyNames") => {
let var_109 =
Some(
crate::xml_deser::deser_list_com_amazonaws_elasticloadbalancing_policy_names(&mut tag)
?
)
;
builder = builder.set_policy_names(var_109);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_tag(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Tag, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Tag::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Key") => {
let var_110 =
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_key(var_110);
}
,
s if s.matches("Value") => {
let var_111 =
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_value(var_111);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_listener(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Listener, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::Listener::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Protocol") => {
let var_112 =
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_112);
}
,
s if s.matches("LoadBalancerPort") => {
let var_113 =
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.elasticloadbalancing#AccessPointPort`)"))
}
?
)
;
builder = builder.set_load_balancer_port(var_113);
}
,
s if s.matches("InstanceProtocol") => {
let var_114 =
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_instance_protocol(var_114);
}
,
s if s.matches("InstancePort") => {
let var_115 =
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.elasticloadbalancing#InstancePort`)"))
}
?
)
;
builder = builder.set_instance_port(var_115);
}
,
s if s.matches("SSLCertificateId") => {
let var_116 =
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_ssl_certificate_id(var_116);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_app_cookie_stickiness_policy(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AppCookieStickinessPolicy, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::AppCookieStickinessPolicy::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("PolicyName") => {
let var_117 =
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_policy_name(var_117);
}
,
s if s.matches("CookieName") => {
let var_118 =
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_cookie_name(var_118);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_crate_model_lb_cookie_stickiness_policy(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LbCookieStickinessPolicy, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::LbCookieStickinessPolicy::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("PolicyName") => {
let var_119 =
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_policy_name(var_119);
}
,
s if s.matches("CookieExpirationPeriod") => {
let var_120 =
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.elasticloadbalancing#CookieExpirationPeriod`)"))
}
?
)
;
builder = builder.set_cookie_expiration_period(var_120);
}
,
_ => {}
}
}
Ok(builder.build())
}