aws-sdk-ec2 1.222.0

AWS SDK for Amazon Elastic Compute Cloud
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(clippy::needless_question_mark)]
pub fn de_native_application_oidc_options(
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> ::std::result::Result<crate::types::NativeApplicationOidcOptions, ::aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::types::NativeApplicationOidcOptions::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("publicSigningKeyEndpoint") /* PublicSigningKeyEndpoint com.amazonaws.ec2#NativeApplicationOidcOptions$PublicSigningKeyEndpoint */ =>  {
                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_public_signing_key_endpoint(var_1);
            }
            ,
            s if s.matches("issuer") /* Issuer com.amazonaws.ec2#NativeApplicationOidcOptions$Issuer */ =>  {
                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_issuer(var_2);
            }
            ,
            s if s.matches("authorizationEndpoint") /* AuthorizationEndpoint com.amazonaws.ec2#NativeApplicationOidcOptions$AuthorizationEndpoint */ =>  {
                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_authorization_endpoint(var_3);
            }
            ,
            s if s.matches("tokenEndpoint") /* TokenEndpoint com.amazonaws.ec2#NativeApplicationOidcOptions$TokenEndpoint */ =>  {
                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_token_endpoint(var_4);
            }
            ,
            s if s.matches("userInfoEndpoint") /* UserInfoEndpoint com.amazonaws.ec2#NativeApplicationOidcOptions$UserInfoEndpoint */ =>  {
                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_user_info_endpoint(var_5);
            }
            ,
            s if s.matches("clientId") /* ClientId com.amazonaws.ec2#NativeApplicationOidcOptions$ClientId */ =>  {
                let var_6 =
                    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_client_id(var_6);
            }
            ,
            s if s.matches("scope") /* Scope com.amazonaws.ec2#NativeApplicationOidcOptions$Scope */ =>  {
                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_scope(var_7);
            }
            ,
            _ => {}
        }
    }
    Ok(builder.build())
}