pub struct Builder { /* private fields */ }Expand description
A builder for AudioAndDtmfInputSpecification.
Implementations§
source§impl Builder
impl Builder
sourcepub fn start_timeout_ms(self, input: i32) -> Self
pub fn start_timeout_ms(self, input: i32) -> Self
Time for which a bot waits before assuming that the customer isn't going to speak or press a key. This timeout is shared between Audio and DTMF inputs.
sourcepub fn set_start_timeout_ms(self, input: Option<i32>) -> Self
pub fn set_start_timeout_ms(self, input: Option<i32>) -> Self
Time for which a bot waits before assuming that the customer isn't going to speak or press a key. This timeout is shared between Audio and DTMF inputs.
Examples found in repository?
src/json_deser.rs (lines 15413-15419)
15388 15389 15390 15391 15392 15393 15394 15395 15396 15397 15398 15399 15400 15401 15402 15403 15404 15405 15406 15407 15408 15409 15410 15411 15412 15413 15414 15415 15416 15417 15418 15419 15420 15421 15422 15423 15424 15425 15426 15427 15428 15429 15430 15431 15432 15433 15434 15435 15436 15437 15438 15439 15440 15441 15442 15443 15444 15445 15446 15447 15448 15449 15450 15451 15452
pub(crate) fn deser_structure_crate_model_audio_and_dtmf_input_specification<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AudioAndDtmfInputSpecification>,
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::audio_and_dtmf_input_specification::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() {
"startTimeoutMs" => {
builder = builder.set_start_timeout_ms(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"audioSpecification" => {
builder = builder.set_audio_specification(
crate::json_deser::deser_structure_crate_model_audio_specification(tokens)?
);
}
"dtmfSpecification" => {
builder = builder.set_dtmf_specification(
crate::json_deser::deser_structure_crate_model_dtmf_specification(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 audio_specification(self, input: AudioSpecification) -> Self
pub fn audio_specification(self, input: AudioSpecification) -> Self
Specifies the settings on audio input.
sourcepub fn set_audio_specification(self, input: Option<AudioSpecification>) -> Self
pub fn set_audio_specification(self, input: Option<AudioSpecification>) -> Self
Specifies the settings on audio input.
Examples found in repository?
src/json_deser.rs (lines 15422-15424)
15388 15389 15390 15391 15392 15393 15394 15395 15396 15397 15398 15399 15400 15401 15402 15403 15404 15405 15406 15407 15408 15409 15410 15411 15412 15413 15414 15415 15416 15417 15418 15419 15420 15421 15422 15423 15424 15425 15426 15427 15428 15429 15430 15431 15432 15433 15434 15435 15436 15437 15438 15439 15440 15441 15442 15443 15444 15445 15446 15447 15448 15449 15450 15451 15452
pub(crate) fn deser_structure_crate_model_audio_and_dtmf_input_specification<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AudioAndDtmfInputSpecification>,
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::audio_and_dtmf_input_specification::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() {
"startTimeoutMs" => {
builder = builder.set_start_timeout_ms(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"audioSpecification" => {
builder = builder.set_audio_specification(
crate::json_deser::deser_structure_crate_model_audio_specification(tokens)?
);
}
"dtmfSpecification" => {
builder = builder.set_dtmf_specification(
crate::json_deser::deser_structure_crate_model_dtmf_specification(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 dtmf_specification(self, input: DtmfSpecification) -> Self
pub fn dtmf_specification(self, input: DtmfSpecification) -> Self
Specifies the settings on DTMF input.
sourcepub fn set_dtmf_specification(self, input: Option<DtmfSpecification>) -> Self
pub fn set_dtmf_specification(self, input: Option<DtmfSpecification>) -> Self
Specifies the settings on DTMF input.
Examples found in repository?
src/json_deser.rs (lines 15427-15429)
15388 15389 15390 15391 15392 15393 15394 15395 15396 15397 15398 15399 15400 15401 15402 15403 15404 15405 15406 15407 15408 15409 15410 15411 15412 15413 15414 15415 15416 15417 15418 15419 15420 15421 15422 15423 15424 15425 15426 15427 15428 15429 15430 15431 15432 15433 15434 15435 15436 15437 15438 15439 15440 15441 15442 15443 15444 15445 15446 15447 15448 15449 15450 15451 15452
pub(crate) fn deser_structure_crate_model_audio_and_dtmf_input_specification<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AudioAndDtmfInputSpecification>,
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::audio_and_dtmf_input_specification::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() {
"startTimeoutMs" => {
builder = builder.set_start_timeout_ms(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"audioSpecification" => {
builder = builder.set_audio_specification(
crate::json_deser::deser_structure_crate_model_audio_specification(tokens)?
);
}
"dtmfSpecification" => {
builder = builder.set_dtmf_specification(
crate::json_deser::deser_structure_crate_model_dtmf_specification(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) -> AudioAndDtmfInputSpecification
pub fn build(self) -> AudioAndDtmfInputSpecification
Consumes the builder and constructs a AudioAndDtmfInputSpecification.
Examples found in repository?
src/json_deser.rs (line 15444)
15388 15389 15390 15391 15392 15393 15394 15395 15396 15397 15398 15399 15400 15401 15402 15403 15404 15405 15406 15407 15408 15409 15410 15411 15412 15413 15414 15415 15416 15417 15418 15419 15420 15421 15422 15423 15424 15425 15426 15427 15428 15429 15430 15431 15432 15433 15434 15435 15436 15437 15438 15439 15440 15441 15442 15443 15444 15445 15446 15447 15448 15449 15450 15451 15452
pub(crate) fn deser_structure_crate_model_audio_and_dtmf_input_specification<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AudioAndDtmfInputSpecification>,
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::audio_and_dtmf_input_specification::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() {
"startTimeoutMs" => {
builder = builder.set_start_timeout_ms(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"audioSpecification" => {
builder = builder.set_audio_specification(
crate::json_deser::deser_structure_crate_model_audio_specification(tokens)?
);
}
"dtmfSpecification" => {
builder = builder.set_dtmf_specification(
crate::json_deser::deser_structure_crate_model_dtmf_specification(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",
),
),
}
}