aws_sdk_sts/protocol_serde/
shape_region_disabled_exception.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(unused_mut)]
pub fn de_region_disabled_exception_xml_err(
    inp: &[u8],
    mut builder: crate::types::error::builders::RegionDisabledExceptionBuilder,
) -> Result<crate::types::error::builders::RegionDisabledExceptionBuilder, ::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") /* message com.amazonaws.sts#RegionDisabledException$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)
}