pub struct Builder { /* private fields */ }Expand description
A builder for CreateBackendAuthPasswordPolicyConfig.
Implementations§
source§impl Builder
impl Builder
sourcepub fn additional_constraints(self, input: AdditionalConstraintsElement) -> Self
pub fn additional_constraints(self, input: AdditionalConstraintsElement) -> Self
Appends an item to additional_constraints.
To override the contents of this collection use set_additional_constraints.
Additional constraints for the password used to access the backend of your Amplify project.
sourcepub fn set_additional_constraints(
self,
input: Option<Vec<AdditionalConstraintsElement>>
) -> Self
pub fn set_additional_constraints(
self,
input: Option<Vec<AdditionalConstraintsElement>>
) -> Self
Additional constraints for the password used to access the backend of your Amplify project.
Examples found in repository?
src/json_deser.rs (lines 4188-4190)
4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221
pub(crate) fn deser_structure_crate_model_create_backend_auth_password_policy_config<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::CreateBackendAuthPasswordPolicyConfig>,
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_password_policy_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() {
"additionalConstraints" => {
builder = builder.set_additional_constraints(
crate::json_deser::deser_list_com_amazonaws_amplifybackend_list_of_additional_constraints_element(tokens)?
);
}
"minimumLength" => {
builder = builder.set_minimum_length(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(|v| v.to_f64_lossy()),
);
}
_ => 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 minimum_length(self, input: f64) -> Self
pub fn minimum_length(self, input: f64) -> Self
The minimum length of the password used to access the backend of your Amplify project.
sourcepub fn set_minimum_length(self, input: Option<f64>) -> Self
pub fn set_minimum_length(self, input: Option<f64>) -> Self
The minimum length of the password used to access the backend of your Amplify project.
Examples found in repository?
src/json_deser.rs (lines 4193-4198)
4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221
pub(crate) fn deser_structure_crate_model_create_backend_auth_password_policy_config<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::CreateBackendAuthPasswordPolicyConfig>,
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_password_policy_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() {
"additionalConstraints" => {
builder = builder.set_additional_constraints(
crate::json_deser::deser_list_com_amazonaws_amplifybackend_list_of_additional_constraints_element(tokens)?
);
}
"minimumLength" => {
builder = builder.set_minimum_length(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(|v| v.to_f64_lossy()),
);
}
_ => 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) -> CreateBackendAuthPasswordPolicyConfig
pub fn build(self) -> CreateBackendAuthPasswordPolicyConfig
Consumes the builder and constructs a CreateBackendAuthPasswordPolicyConfig.
Examples found in repository?
src/json_deser.rs (line 4213)
4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221
pub(crate) fn deser_structure_crate_model_create_backend_auth_password_policy_config<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::CreateBackendAuthPasswordPolicyConfig>,
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_password_policy_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() {
"additionalConstraints" => {
builder = builder.set_additional_constraints(
crate::json_deser::deser_list_com_amazonaws_amplifybackend_list_of_additional_constraints_element(tokens)?
);
}
"minimumLength" => {
builder = builder.set_minimum_length(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(|v| v.to_f64_lossy()),
);
}
_ => 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",
),
),
}
}