pub struct Builder { /* private fields */ }Expand description
A builder for CreateBackendAuthOAuthConfig.
Implementations§
source§impl Builder
impl Builder
sourcepub fn domain_prefix(self, input: impl Into<String>) -> Self
pub fn domain_prefix(self, input: impl Into<String>) -> Self
The domain prefix for your Amplify app.
sourcepub fn set_domain_prefix(self, input: Option<String>) -> Self
pub fn set_domain_prefix(self, input: Option<String>) -> Self
The domain prefix for your Amplify app.
Examples found in repository?
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",
),
),
}
}sourcepub fn o_auth_grant_type(self, input: OAuthGrantType) -> Self
pub fn o_auth_grant_type(self, input: OAuthGrantType) -> Self
The OAuth grant type that you use to allow app users to authenticate from your Amplify app.
sourcepub fn set_o_auth_grant_type(self, input: Option<OAuthGrantType>) -> Self
pub fn set_o_auth_grant_type(self, input: Option<OAuthGrantType>) -> Self
The OAuth grant type that you use to allow app users to authenticate from your Amplify app.
Examples found in repository?
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",
),
),
}
}sourcepub fn o_auth_scopes(self, input: OAuthScopesElement) -> Self
pub fn o_auth_scopes(self, input: OAuthScopesElement) -> Self
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.
sourcepub fn set_o_auth_scopes(self, input: Option<Vec<OAuthScopesElement>>) -> Self
pub fn set_o_auth_scopes(self, input: Option<Vec<OAuthScopesElement>>) -> Self
List of OAuth-related flows used to allow your app users to authenticate from your Amplify app.
Examples found in repository?
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",
),
),
}
}sourcepub fn redirect_sign_in_ur_is(self, input: impl Into<String>) -> Self
pub fn redirect_sign_in_ur_is(self, input: impl Into<String>) -> Self
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.
sourcepub fn set_redirect_sign_in_ur_is(self, input: Option<Vec<String>>) -> Self
pub fn set_redirect_sign_in_ur_is(self, input: Option<Vec<String>>) -> Self
The redirected URI for signing in to your Amplify app.
Examples found in repository?
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",
),
),
}
}sourcepub fn redirect_sign_out_ur_is(self, input: impl Into<String>) -> Self
pub fn redirect_sign_out_ur_is(self, input: impl Into<String>) -> Self
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.
sourcepub fn set_redirect_sign_out_ur_is(self, input: Option<Vec<String>>) -> Self
pub fn set_redirect_sign_out_ur_is(self, input: Option<Vec<String>>) -> Self
Redirect URLs that OAuth uses when a user signs out of an Amplify app.
Examples found in repository?
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?
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",
),
),
}
}sourcepub fn build(self) -> CreateBackendAuthOAuthConfig
pub fn build(self) -> CreateBackendAuthOAuthConfig
Consumes the builder and constructs a CreateBackendAuthOAuthConfig.
Examples found in repository?
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",
),
),
}
}