pub struct Builder { /* private fields */ }
Expand description

Implementations§

The domain prefix for your Amplify app.

The domain prefix for your Amplify app.

Examples found in repository?
src/json_deser.rs (lines 4099-4105)
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
pub(crate) fn deser_structure_crate_model_create_backend_auth_o_auth_config<'a, I>(
    tokens: &mut std::iter::Peekable<I>,
) -> Result<
    Option<crate::model::CreateBackendAuthOAuthConfig>,
    aws_smithy_json::deserialize::error::DeserializeError,
>
where
    I: Iterator<
        Item = Result<
            aws_smithy_json::deserialize::Token<'a>,
            aws_smithy_json::deserialize::error::DeserializeError,
        >,
    >,
{
    match tokens.next().transpose()? {
        Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
        Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
            #[allow(unused_mut)]
            let mut builder = crate::model::create_backend_auth_o_auth_config::Builder::default();
            loop {
                match tokens.next().transpose()? {
                    Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
                    Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
                        match key.to_unescaped()?.as_ref() {
                            "domainPrefix" => {
                                builder = builder.set_domain_prefix(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "oAuthGrantType" => {
                                builder = builder.set_o_auth_grant_type(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped()
                                            .map(|u| crate::model::OAuthGrantType::from(u.as_ref()))
                                    })
                                    .transpose()?,
                                );
                            }
                            "oAuthScopes" => {
                                builder = builder.set_o_auth_scopes(
                                    crate::json_deser::deser_list_com_amazonaws_amplifybackend_list_of_o_auth_scopes_element(tokens)?
                                );
                            }
                            "redirectSignInURIs" => {
                                builder = builder.set_redirect_sign_in_ur_is(
                                    crate::json_deser::deser_list_com_amazonaws_amplifybackend_list_of__string(tokens)?
                                );
                            }
                            "redirectSignOutURIs" => {
                                builder = builder.set_redirect_sign_out_ur_is(
                                    crate::json_deser::deser_list_com_amazonaws_amplifybackend_list_of__string(tokens)?
                                );
                            }
                            "socialProviderSettings" => {
                                builder = builder.set_social_provider_settings(
                                    crate::json_deser::deser_structure_crate_model_social_provider_settings(tokens)?
                                );
                            }
                            _ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
                        }
                    }
                    other => {
                        return Err(
                            aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
                                "expected object key or end object, found: {:?}",
                                other
                            )),
                        )
                    }
                }
            }
            Ok(Some(builder.build()))
        }
        _ => Err(
            aws_smithy_json::deserialize::error::DeserializeError::custom(
                "expected start object or null",
            ),
        ),
    }
}

The OAuth grant type that you use to allow app users to authenticate from your Amplify app.

The OAuth grant type that you use to allow app users to authenticate from your Amplify app.

Examples found in repository?
src/json_deser.rs (lines 4108-4117)
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
pub(crate) fn deser_structure_crate_model_create_backend_auth_o_auth_config<'a, I>(
    tokens: &mut std::iter::Peekable<I>,
) -> Result<
    Option<crate::model::CreateBackendAuthOAuthConfig>,
    aws_smithy_json::deserialize::error::DeserializeError,
>
where
    I: Iterator<
        Item = Result<
            aws_smithy_json::deserialize::Token<'a>,
            aws_smithy_json::deserialize::error::DeserializeError,
        >,
    >,
{
    match tokens.next().transpose()? {
        Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
        Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
            #[allow(unused_mut)]
            let mut builder = crate::model::create_backend_auth_o_auth_config::Builder::default();
            loop {
                match tokens.next().transpose()? {
                    Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
                    Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
                        match key.to_unescaped()?.as_ref() {
                            "domainPrefix" => {
                                builder = builder.set_domain_prefix(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "oAuthGrantType" => {
                                builder = builder.set_o_auth_grant_type(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped()
                                            .map(|u| crate::model::OAuthGrantType::from(u.as_ref()))
                                    })
                                    .transpose()?,
                                );
                            }
                            "oAuthScopes" => {
                                builder = builder.set_o_auth_scopes(
                                    crate::json_deser::deser_list_com_amazonaws_amplifybackend_list_of_o_auth_scopes_element(tokens)?
                                );
                            }
                            "redirectSignInURIs" => {
                                builder = builder.set_redirect_sign_in_ur_is(
                                    crate::json_deser::deser_list_com_amazonaws_amplifybackend_list_of__string(tokens)?
                                );
                            }
                            "redirectSignOutURIs" => {
                                builder = builder.set_redirect_sign_out_ur_is(
                                    crate::json_deser::deser_list_com_amazonaws_amplifybackend_list_of__string(tokens)?
                                );
                            }
                            "socialProviderSettings" => {
                                builder = builder.set_social_provider_settings(
                                    crate::json_deser::deser_structure_crate_model_social_provider_settings(tokens)?
                                );
                            }
                            _ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
                        }
                    }
                    other => {
                        return Err(
                            aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
                                "expected object key or end object, found: {:?}",
                                other
                            )),
                        )
                    }
                }
            }
            Ok(Some(builder.build()))
        }
        _ => Err(
            aws_smithy_json::deserialize::error::DeserializeError::custom(
                "expected start object or null",
            ),
        ),
    }
}

Appends an item to o_auth_scopes.

To override the contents of this collection use set_o_auth_scopes.

List of OAuth-related flows used to allow your app users to authenticate from your Amplify app.

List of OAuth-related flows used to allow your app users to authenticate from your Amplify app.

Examples found in repository?
src/json_deser.rs (lines 4120-4122)
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
pub(crate) fn deser_structure_crate_model_create_backend_auth_o_auth_config<'a, I>(
    tokens: &mut std::iter::Peekable<I>,
) -> Result<
    Option<crate::model::CreateBackendAuthOAuthConfig>,
    aws_smithy_json::deserialize::error::DeserializeError,
>
where
    I: Iterator<
        Item = Result<
            aws_smithy_json::deserialize::Token<'a>,
            aws_smithy_json::deserialize::error::DeserializeError,
        >,
    >,
{
    match tokens.next().transpose()? {
        Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
        Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
            #[allow(unused_mut)]
            let mut builder = crate::model::create_backend_auth_o_auth_config::Builder::default();
            loop {
                match tokens.next().transpose()? {
                    Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
                    Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
                        match key.to_unescaped()?.as_ref() {
                            "domainPrefix" => {
                                builder = builder.set_domain_prefix(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "oAuthGrantType" => {
                                builder = builder.set_o_auth_grant_type(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped()
                                            .map(|u| crate::model::OAuthGrantType::from(u.as_ref()))
                                    })
                                    .transpose()?,
                                );
                            }
                            "oAuthScopes" => {
                                builder = builder.set_o_auth_scopes(
                                    crate::json_deser::deser_list_com_amazonaws_amplifybackend_list_of_o_auth_scopes_element(tokens)?
                                );
                            }
                            "redirectSignInURIs" => {
                                builder = builder.set_redirect_sign_in_ur_is(
                                    crate::json_deser::deser_list_com_amazonaws_amplifybackend_list_of__string(tokens)?
                                );
                            }
                            "redirectSignOutURIs" => {
                                builder = builder.set_redirect_sign_out_ur_is(
                                    crate::json_deser::deser_list_com_amazonaws_amplifybackend_list_of__string(tokens)?
                                );
                            }
                            "socialProviderSettings" => {
                                builder = builder.set_social_provider_settings(
                                    crate::json_deser::deser_structure_crate_model_social_provider_settings(tokens)?
                                );
                            }
                            _ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
                        }
                    }
                    other => {
                        return Err(
                            aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
                                "expected object key or end object, found: {:?}",
                                other
                            )),
                        )
                    }
                }
            }
            Ok(Some(builder.build()))
        }
        _ => Err(
            aws_smithy_json::deserialize::error::DeserializeError::custom(
                "expected start object or null",
            ),
        ),
    }
}

Appends an item to redirect_sign_in_ur_is.

To override the contents of this collection use set_redirect_sign_in_ur_is.

The redirected URI for signing in to your Amplify app.

The redirected URI for signing in to your Amplify app.

Examples found in repository?
src/json_deser.rs (lines 4125-4127)
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
pub(crate) fn deser_structure_crate_model_create_backend_auth_o_auth_config<'a, I>(
    tokens: &mut std::iter::Peekable<I>,
) -> Result<
    Option<crate::model::CreateBackendAuthOAuthConfig>,
    aws_smithy_json::deserialize::error::DeserializeError,
>
where
    I: Iterator<
        Item = Result<
            aws_smithy_json::deserialize::Token<'a>,
            aws_smithy_json::deserialize::error::DeserializeError,
        >,
    >,
{
    match tokens.next().transpose()? {
        Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
        Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
            #[allow(unused_mut)]
            let mut builder = crate::model::create_backend_auth_o_auth_config::Builder::default();
            loop {
                match tokens.next().transpose()? {
                    Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
                    Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
                        match key.to_unescaped()?.as_ref() {
                            "domainPrefix" => {
                                builder = builder.set_domain_prefix(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "oAuthGrantType" => {
                                builder = builder.set_o_auth_grant_type(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped()
                                            .map(|u| crate::model::OAuthGrantType::from(u.as_ref()))
                                    })
                                    .transpose()?,
                                );
                            }
                            "oAuthScopes" => {
                                builder = builder.set_o_auth_scopes(
                                    crate::json_deser::deser_list_com_amazonaws_amplifybackend_list_of_o_auth_scopes_element(tokens)?
                                );
                            }
                            "redirectSignInURIs" => {
                                builder = builder.set_redirect_sign_in_ur_is(
                                    crate::json_deser::deser_list_com_amazonaws_amplifybackend_list_of__string(tokens)?
                                );
                            }
                            "redirectSignOutURIs" => {
                                builder = builder.set_redirect_sign_out_ur_is(
                                    crate::json_deser::deser_list_com_amazonaws_amplifybackend_list_of__string(tokens)?
                                );
                            }
                            "socialProviderSettings" => {
                                builder = builder.set_social_provider_settings(
                                    crate::json_deser::deser_structure_crate_model_social_provider_settings(tokens)?
                                );
                            }
                            _ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
                        }
                    }
                    other => {
                        return Err(
                            aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
                                "expected object key or end object, found: {:?}",
                                other
                            )),
                        )
                    }
                }
            }
            Ok(Some(builder.build()))
        }
        _ => Err(
            aws_smithy_json::deserialize::error::DeserializeError::custom(
                "expected start object or null",
            ),
        ),
    }
}

Appends an item to redirect_sign_out_ur_is.

To override the contents of this collection use set_redirect_sign_out_ur_is.

Redirect URLs that OAuth uses when a user signs out of an Amplify app.

Redirect URLs that OAuth uses when a user signs out of an Amplify app.

Examples found in repository?
src/json_deser.rs (lines 4130-4132)
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
pub(crate) fn deser_structure_crate_model_create_backend_auth_o_auth_config<'a, I>(
    tokens: &mut std::iter::Peekable<I>,
) -> Result<
    Option<crate::model::CreateBackendAuthOAuthConfig>,
    aws_smithy_json::deserialize::error::DeserializeError,
>
where
    I: Iterator<
        Item = Result<
            aws_smithy_json::deserialize::Token<'a>,
            aws_smithy_json::deserialize::error::DeserializeError,
        >,
    >,
{
    match tokens.next().transpose()? {
        Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
        Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
            #[allow(unused_mut)]
            let mut builder = crate::model::create_backend_auth_o_auth_config::Builder::default();
            loop {
                match tokens.next().transpose()? {
                    Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
                    Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
                        match key.to_unescaped()?.as_ref() {
                            "domainPrefix" => {
                                builder = builder.set_domain_prefix(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "oAuthGrantType" => {
                                builder = builder.set_o_auth_grant_type(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped()
                                            .map(|u| crate::model::OAuthGrantType::from(u.as_ref()))
                                    })
                                    .transpose()?,
                                );
                            }
                            "oAuthScopes" => {
                                builder = builder.set_o_auth_scopes(
                                    crate::json_deser::deser_list_com_amazonaws_amplifybackend_list_of_o_auth_scopes_element(tokens)?
                                );
                            }
                            "redirectSignInURIs" => {
                                builder = builder.set_redirect_sign_in_ur_is(
                                    crate::json_deser::deser_list_com_amazonaws_amplifybackend_list_of__string(tokens)?
                                );
                            }
                            "redirectSignOutURIs" => {
                                builder = builder.set_redirect_sign_out_ur_is(
                                    crate::json_deser::deser_list_com_amazonaws_amplifybackend_list_of__string(tokens)?
                                );
                            }
                            "socialProviderSettings" => {
                                builder = builder.set_social_provider_settings(
                                    crate::json_deser::deser_structure_crate_model_social_provider_settings(tokens)?
                                );
                            }
                            _ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
                        }
                    }
                    other => {
                        return Err(
                            aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
                                "expected object key or end object, found: {:?}",
                                other
                            )),
                        )
                    }
                }
            }
            Ok(Some(builder.build()))
        }
        _ => Err(
            aws_smithy_json::deserialize::error::DeserializeError::custom(
                "expected start object or null",
            ),
        ),
    }
}

The settings for using social providers to access your Amplify app.

The settings for using social providers to access your Amplify app.

Examples found in repository?
src/json_deser.rs (lines 4135-4137)
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
pub(crate) fn deser_structure_crate_model_create_backend_auth_o_auth_config<'a, I>(
    tokens: &mut std::iter::Peekable<I>,
) -> Result<
    Option<crate::model::CreateBackendAuthOAuthConfig>,
    aws_smithy_json::deserialize::error::DeserializeError,
>
where
    I: Iterator<
        Item = Result<
            aws_smithy_json::deserialize::Token<'a>,
            aws_smithy_json::deserialize::error::DeserializeError,
        >,
    >,
{
    match tokens.next().transpose()? {
        Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
        Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
            #[allow(unused_mut)]
            let mut builder = crate::model::create_backend_auth_o_auth_config::Builder::default();
            loop {
                match tokens.next().transpose()? {
                    Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
                    Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
                        match key.to_unescaped()?.as_ref() {
                            "domainPrefix" => {
                                builder = builder.set_domain_prefix(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "oAuthGrantType" => {
                                builder = builder.set_o_auth_grant_type(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped()
                                            .map(|u| crate::model::OAuthGrantType::from(u.as_ref()))
                                    })
                                    .transpose()?,
                                );
                            }
                            "oAuthScopes" => {
                                builder = builder.set_o_auth_scopes(
                                    crate::json_deser::deser_list_com_amazonaws_amplifybackend_list_of_o_auth_scopes_element(tokens)?
                                );
                            }
                            "redirectSignInURIs" => {
                                builder = builder.set_redirect_sign_in_ur_is(
                                    crate::json_deser::deser_list_com_amazonaws_amplifybackend_list_of__string(tokens)?
                                );
                            }
                            "redirectSignOutURIs" => {
                                builder = builder.set_redirect_sign_out_ur_is(
                                    crate::json_deser::deser_list_com_amazonaws_amplifybackend_list_of__string(tokens)?
                                );
                            }
                            "socialProviderSettings" => {
                                builder = builder.set_social_provider_settings(
                                    crate::json_deser::deser_structure_crate_model_social_provider_settings(tokens)?
                                );
                            }
                            _ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
                        }
                    }
                    other => {
                        return Err(
                            aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
                                "expected object key or end object, found: {:?}",
                                other
                            )),
                        )
                    }
                }
            }
            Ok(Some(builder.build()))
        }
        _ => Err(
            aws_smithy_json::deserialize::error::DeserializeError::custom(
                "expected start object or null",
            ),
        ),
    }
}

Consumes the builder and constructs a CreateBackendAuthOAuthConfig.

Examples found in repository?
src/json_deser.rs (line 4152)
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
pub(crate) fn deser_structure_crate_model_create_backend_auth_o_auth_config<'a, I>(
    tokens: &mut std::iter::Peekable<I>,
) -> Result<
    Option<crate::model::CreateBackendAuthOAuthConfig>,
    aws_smithy_json::deserialize::error::DeserializeError,
>
where
    I: Iterator<
        Item = Result<
            aws_smithy_json::deserialize::Token<'a>,
            aws_smithy_json::deserialize::error::DeserializeError,
        >,
    >,
{
    match tokens.next().transpose()? {
        Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
        Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
            #[allow(unused_mut)]
            let mut builder = crate::model::create_backend_auth_o_auth_config::Builder::default();
            loop {
                match tokens.next().transpose()? {
                    Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
                    Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
                        match key.to_unescaped()?.as_ref() {
                            "domainPrefix" => {
                                builder = builder.set_domain_prefix(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "oAuthGrantType" => {
                                builder = builder.set_o_auth_grant_type(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped()
                                            .map(|u| crate::model::OAuthGrantType::from(u.as_ref()))
                                    })
                                    .transpose()?,
                                );
                            }
                            "oAuthScopes" => {
                                builder = builder.set_o_auth_scopes(
                                    crate::json_deser::deser_list_com_amazonaws_amplifybackend_list_of_o_auth_scopes_element(tokens)?
                                );
                            }
                            "redirectSignInURIs" => {
                                builder = builder.set_redirect_sign_in_ur_is(
                                    crate::json_deser::deser_list_com_amazonaws_amplifybackend_list_of__string(tokens)?
                                );
                            }
                            "redirectSignOutURIs" => {
                                builder = builder.set_redirect_sign_out_ur_is(
                                    crate::json_deser::deser_list_com_amazonaws_amplifybackend_list_of__string(tokens)?
                                );
                            }
                            "socialProviderSettings" => {
                                builder = builder.set_social_provider_settings(
                                    crate::json_deser::deser_structure_crate_model_social_provider_settings(tokens)?
                                );
                            }
                            _ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
                        }
                    }
                    other => {
                        return Err(
                            aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
                                "expected object key or end object, found: {:?}",
                                other
                            )),
                        )
                    }
                }
            }
            Ok(Some(builder.build()))
        }
        _ => Err(
            aws_smithy_json::deserialize::error::DeserializeError::custom(
                "expected start object or null",
            ),
        ),
    }
}

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more