Struct aws_sdk_amplifybackend::model::create_backend_auth_verification_message_config::Builder
source · pub struct Builder { /* private fields */ }Expand description
A builder for CreateBackendAuthVerificationMessageConfig.
Implementations§
source§impl Builder
impl Builder
sourcepub fn delivery_method(self, input: DeliveryMethod) -> Self
pub fn delivery_method(self, input: DeliveryMethod) -> Self
The type of verification message to send.
sourcepub fn set_delivery_method(self, input: Option<DeliveryMethod>) -> Self
pub fn set_delivery_method(self, input: Option<DeliveryMethod>) -> Self
The type of verification message to send.
Examples found in repository?
src/json_deser.rs (lines 4303-4312)
4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349
pub(crate) fn deser_structure_crate_model_create_backend_auth_verification_message_config<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::CreateBackendAuthVerificationMessageConfig>,
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_verification_message_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() {
"deliveryMethod" => {
builder = builder.set_delivery_method(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped()
.map(|u| crate::model::DeliveryMethod::from(u.as_ref()))
})
.transpose()?,
);
}
"emailSettings" => {
builder = builder.set_email_settings(
crate::json_deser::deser_structure_crate_model_email_settings(
tokens,
)?,
);
}
"smsSettings" => {
builder = builder.set_sms_settings(
crate::json_deser::deser_structure_crate_model_sms_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 email_settings(self, input: EmailSettings) -> Self
pub fn email_settings(self, input: EmailSettings) -> Self
The settings for the email message.
sourcepub fn set_email_settings(self, input: Option<EmailSettings>) -> Self
pub fn set_email_settings(self, input: Option<EmailSettings>) -> Self
The settings for the email message.
Examples found in repository?
src/json_deser.rs (lines 4315-4319)
4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349
pub(crate) fn deser_structure_crate_model_create_backend_auth_verification_message_config<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::CreateBackendAuthVerificationMessageConfig>,
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_verification_message_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() {
"deliveryMethod" => {
builder = builder.set_delivery_method(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped()
.map(|u| crate::model::DeliveryMethod::from(u.as_ref()))
})
.transpose()?,
);
}
"emailSettings" => {
builder = builder.set_email_settings(
crate::json_deser::deser_structure_crate_model_email_settings(
tokens,
)?,
);
}
"smsSettings" => {
builder = builder.set_sms_settings(
crate::json_deser::deser_structure_crate_model_sms_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 sms_settings(self, input: SmsSettings) -> Self
pub fn sms_settings(self, input: SmsSettings) -> Self
The settings for the SMS message.
sourcepub fn set_sms_settings(self, input: Option<SmsSettings>) -> Self
pub fn set_sms_settings(self, input: Option<SmsSettings>) -> Self
The settings for the SMS message.
Examples found in repository?
src/json_deser.rs (lines 4322-4326)
4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349
pub(crate) fn deser_structure_crate_model_create_backend_auth_verification_message_config<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::CreateBackendAuthVerificationMessageConfig>,
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_verification_message_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() {
"deliveryMethod" => {
builder = builder.set_delivery_method(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped()
.map(|u| crate::model::DeliveryMethod::from(u.as_ref()))
})
.transpose()?,
);
}
"emailSettings" => {
builder = builder.set_email_settings(
crate::json_deser::deser_structure_crate_model_email_settings(
tokens,
)?,
);
}
"smsSettings" => {
builder = builder.set_sms_settings(
crate::json_deser::deser_structure_crate_model_sms_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) -> CreateBackendAuthVerificationMessageConfig
pub fn build(self) -> CreateBackendAuthVerificationMessageConfig
Consumes the builder and constructs a CreateBackendAuthVerificationMessageConfig.
Examples found in repository?
src/json_deser.rs (line 4341)
4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349
pub(crate) fn deser_structure_crate_model_create_backend_auth_verification_message_config<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::CreateBackendAuthVerificationMessageConfig>,
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_verification_message_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() {
"deliveryMethod" => {
builder = builder.set_delivery_method(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped()
.map(|u| crate::model::DeliveryMethod::from(u.as_ref()))
})
.transpose()?,
);
}
"emailSettings" => {
builder = builder.set_email_settings(
crate::json_deser::deser_structure_crate_model_email_settings(
tokens,
)?,
);
}
"smsSettings" => {
builder = builder.set_sms_settings(
crate::json_deser::deser_structure_crate_model_sms_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",
),
),
}
}