pub struct Builder { /* private fields */ }Expand description
A builder for CreateBackendAuthResourceConfig.
Implementations§
source§impl Builder
impl Builder
sourcepub fn auth_resources(self, input: AuthResources) -> Self
pub fn auth_resources(self, input: AuthResources) -> Self
Defines whether you want to configure only authentication or both authentication and authorization settings.
sourcepub fn set_auth_resources(self, input: Option<AuthResources>) -> Self
pub fn set_auth_resources(self, input: Option<AuthResources>) -> Self
Defines whether you want to configure only authentication or both authentication and authorization settings.
Examples found in repository?
2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990
pub(crate) fn deser_structure_crate_model_create_backend_auth_resource_config<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::CreateBackendAuthResourceConfig>,
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_resource_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() {
"authResources" => {
builder = builder.set_auth_resources(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped()
.map(|u| crate::model::AuthResources::from(u.as_ref()))
})
.transpose()?,
);
}
"identityPoolConfigs" => {
builder = builder.set_identity_pool_configs(
crate::json_deser::deser_structure_crate_model_create_backend_auth_identity_pool_config(tokens)?
);
}
"service" => {
builder = builder.set_service(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped()
.map(|u| crate::model::Service::from(u.as_ref()))
})
.transpose()?,
);
}
"userPoolConfigs" => {
builder = builder.set_user_pool_configs(
crate::json_deser::deser_structure_crate_model_create_backend_auth_user_pool_config(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 identity_pool_configs(
self,
input: CreateBackendAuthIdentityPoolConfig
) -> Self
pub fn identity_pool_configs(
self,
input: CreateBackendAuthIdentityPoolConfig
) -> Self
Describes the authorization configuration for the Amazon Cognito identity pool, provisioned as a part of your auth resource in the Amplify project.
sourcepub fn set_identity_pool_configs(
self,
input: Option<CreateBackendAuthIdentityPoolConfig>
) -> Self
pub fn set_identity_pool_configs(
self,
input: Option<CreateBackendAuthIdentityPoolConfig>
) -> Self
Describes the authorization configuration for the Amazon Cognito identity pool, provisioned as a part of your auth resource in the Amplify project.
Examples found in repository?
2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990
pub(crate) fn deser_structure_crate_model_create_backend_auth_resource_config<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::CreateBackendAuthResourceConfig>,
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_resource_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() {
"authResources" => {
builder = builder.set_auth_resources(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped()
.map(|u| crate::model::AuthResources::from(u.as_ref()))
})
.transpose()?,
);
}
"identityPoolConfigs" => {
builder = builder.set_identity_pool_configs(
crate::json_deser::deser_structure_crate_model_create_backend_auth_identity_pool_config(tokens)?
);
}
"service" => {
builder = builder.set_service(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped()
.map(|u| crate::model::Service::from(u.as_ref()))
})
.transpose()?,
);
}
"userPoolConfigs" => {
builder = builder.set_user_pool_configs(
crate::json_deser::deser_structure_crate_model_create_backend_auth_user_pool_config(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 service(self, input: Service) -> Self
pub fn service(self, input: Service) -> Self
Defines the service name to use when configuring an authentication resource in your Amplify project.
sourcepub fn set_service(self, input: Option<Service>) -> Self
pub fn set_service(self, input: Option<Service>) -> Self
Defines the service name to use when configuring an authentication resource in your Amplify project.
Examples found in repository?
2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990
pub(crate) fn deser_structure_crate_model_create_backend_auth_resource_config<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::CreateBackendAuthResourceConfig>,
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_resource_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() {
"authResources" => {
builder = builder.set_auth_resources(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped()
.map(|u| crate::model::AuthResources::from(u.as_ref()))
})
.transpose()?,
);
}
"identityPoolConfigs" => {
builder = builder.set_identity_pool_configs(
crate::json_deser::deser_structure_crate_model_create_backend_auth_identity_pool_config(tokens)?
);
}
"service" => {
builder = builder.set_service(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped()
.map(|u| crate::model::Service::from(u.as_ref()))
})
.transpose()?,
);
}
"userPoolConfigs" => {
builder = builder.set_user_pool_configs(
crate::json_deser::deser_structure_crate_model_create_backend_auth_user_pool_config(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 user_pool_configs(self, input: CreateBackendAuthUserPoolConfig) -> Self
pub fn user_pool_configs(self, input: CreateBackendAuthUserPoolConfig) -> Self
Describes authentication configuration for the Amazon Cognito user pool, provisioned as a part of your auth resource in the Amplify project.
sourcepub fn set_user_pool_configs(
self,
input: Option<CreateBackendAuthUserPoolConfig>
) -> Self
pub fn set_user_pool_configs(
self,
input: Option<CreateBackendAuthUserPoolConfig>
) -> Self
Describes authentication configuration for the Amazon Cognito user pool, provisioned as a part of your auth resource in the Amplify project.
Examples found in repository?
2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990
pub(crate) fn deser_structure_crate_model_create_backend_auth_resource_config<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::CreateBackendAuthResourceConfig>,
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_resource_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() {
"authResources" => {
builder = builder.set_auth_resources(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped()
.map(|u| crate::model::AuthResources::from(u.as_ref()))
})
.transpose()?,
);
}
"identityPoolConfigs" => {
builder = builder.set_identity_pool_configs(
crate::json_deser::deser_structure_crate_model_create_backend_auth_identity_pool_config(tokens)?
);
}
"service" => {
builder = builder.set_service(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped()
.map(|u| crate::model::Service::from(u.as_ref()))
})
.transpose()?,
);
}
"userPoolConfigs" => {
builder = builder.set_user_pool_configs(
crate::json_deser::deser_structure_crate_model_create_backend_auth_user_pool_config(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) -> CreateBackendAuthResourceConfig
pub fn build(self) -> CreateBackendAuthResourceConfig
Consumes the builder and constructs a CreateBackendAuthResourceConfig.
Examples found in repository?
2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990
pub(crate) fn deser_structure_crate_model_create_backend_auth_resource_config<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::CreateBackendAuthResourceConfig>,
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_resource_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() {
"authResources" => {
builder = builder.set_auth_resources(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped()
.map(|u| crate::model::AuthResources::from(u.as_ref()))
})
.transpose()?,
);
}
"identityPoolConfigs" => {
builder = builder.set_identity_pool_configs(
crate::json_deser::deser_structure_crate_model_create_backend_auth_identity_pool_config(tokens)?
);
}
"service" => {
builder = builder.set_service(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped()
.map(|u| crate::model::Service::from(u.as_ref()))
})
.transpose()?,
);
}
"userPoolConfigs" => {
builder = builder.set_user_pool_configs(
crate::json_deser::deser_structure_crate_model_create_backend_auth_user_pool_config(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",
),
),
}
}