aws-sdk-rds 1.132.0

AWS SDK for Amazon Relational Database Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(clippy::needless_question_mark)]
pub fn de_db_proxy(
    decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> ::std::result::Result<crate::types::DbProxy, ::aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::types::DbProxy::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("DBProxyName") /* DBProxyName com.amazonaws.rds#DBProxy$DBProxyName */ =>  {
                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_db_proxy_name(var_1);
            }
            ,
            s if s.matches("DBProxyArn") /* DBProxyArn com.amazonaws.rds#DBProxy$DBProxyArn */ =>  {
                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_db_proxy_arn(var_2);
            }
            ,
            s if s.matches("Status") /* Status com.amazonaws.rds#DBProxy$Status */ =>  {
                let var_3 =
                    Some(
                        Result::<crate::types::DbProxyStatus, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::types::DbProxyStatus::from(
                                ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_status(var_3);
            }
            ,
            s if s.matches("EngineFamily") /* EngineFamily com.amazonaws.rds#DBProxy$EngineFamily */ =>  {
                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_engine_family(var_4);
            }
            ,
            s if s.matches("VpcId") /* VpcId com.amazonaws.rds#DBProxy$VpcId */ =>  {
                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_vpc_id(var_5);
            }
            ,
            s if s.matches("VpcSecurityGroupIds") /* VpcSecurityGroupIds com.amazonaws.rds#DBProxy$VpcSecurityGroupIds */ =>  {
                let var_6 =
                    Some(
                        crate::protocol_serde::shape_string_list::de_string_list(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_vpc_security_group_ids(var_6);
            }
            ,
            s if s.matches("VpcSubnetIds") /* VpcSubnetIds com.amazonaws.rds#DBProxy$VpcSubnetIds */ =>  {
                let var_7 =
                    Some(
                        crate::protocol_serde::shape_string_list::de_string_list(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_vpc_subnet_ids(var_7);
            }
            ,
            s if s.matches("DefaultAuthScheme") /* DefaultAuthScheme com.amazonaws.rds#DBProxy$DefaultAuthScheme */ =>  {
                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_default_auth_scheme(var_8);
            }
            ,
            s if s.matches("Auth") /* Auth com.amazonaws.rds#DBProxy$Auth */ =>  {
                let var_9 =
                    Some(
                        crate::protocol_serde::shape_user_auth_config_info_list::de_user_auth_config_info_list(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_auth(var_9);
            }
            ,
            s if s.matches("RoleArn") /* RoleArn com.amazonaws.rds#DBProxy$RoleArn */ =>  {
                let var_10 =
                    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_role_arn(var_10);
            }
            ,
            s if s.matches("Endpoint") /* Endpoint com.amazonaws.rds#DBProxy$Endpoint */ =>  {
                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_endpoint(var_11);
            }
            ,
            s if s.matches("RequireTLS") /* RequireTLS com.amazonaws.rds#DBProxy$RequireTLS */ =>  {
                let var_12 =
                    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.rds#Boolean`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_require_tls(var_12);
            }
            ,
            s if s.matches("IdleClientTimeout") /* IdleClientTimeout com.amazonaws.rds#DBProxy$IdleClientTimeout */ =>  {
                let var_13 =
                    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.rds#Integer`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_idle_client_timeout(var_13);
            }
            ,
            s if s.matches("DebugLogging") /* DebugLogging com.amazonaws.rds#DBProxy$DebugLogging */ =>  {
                let var_14 =
                    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.rds#Boolean`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_debug_logging(var_14);
            }
            ,
            s if s.matches("CreatedDate") /* CreatedDate com.amazonaws.rds#DBProxy$CreatedDate */ =>  {
                let var_15 =
                    Some(
                        ::aws_smithy_types::DateTime::from_str(
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            , ::aws_smithy_types::date_time::Format::DateTimeWithOffset
                        )
                        .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.rds#TStamp`)"))
                        ?
                    )
                ;
                builder = builder.set_created_date(var_15);
            }
            ,
            s if s.matches("UpdatedDate") /* UpdatedDate com.amazonaws.rds#DBProxy$UpdatedDate */ =>  {
                let var_16 =
                    Some(
                        ::aws_smithy_types::DateTime::from_str(
                            ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            , ::aws_smithy_types::date_time::Format::DateTimeWithOffset
                        )
                        .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.rds#TStamp`)"))
                        ?
                    )
                ;
                builder = builder.set_updated_date(var_16);
            }
            ,
            s if s.matches("EndpointNetworkType") /* EndpointNetworkType com.amazonaws.rds#DBProxy$EndpointNetworkType */ =>  {
                let var_17 =
                    Some(
                        Result::<crate::types::EndpointNetworkType, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::types::EndpointNetworkType::from(
                                ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_endpoint_network_type(var_17);
            }
            ,
            s if s.matches("TargetConnectionNetworkType") /* TargetConnectionNetworkType com.amazonaws.rds#DBProxy$TargetConnectionNetworkType */ =>  {
                let var_18 =
                    Some(
                        Result::<crate::types::TargetConnectionNetworkType, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::types::TargetConnectionNetworkType::from(
                                ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_target_connection_network_type(var_18);
            }
            ,
            _ => {}
        }
    }
    Ok(builder.build())
}