Struct aws_sdk_lexmodelsv2::model::intent_closing_setting::Builder
source · pub struct Builder { /* private fields */ }Expand description
A builder for IntentClosingSetting.
Implementations§
source§impl Builder
impl Builder
sourcepub fn closing_response(self, input: ResponseSpecification) -> Self
pub fn closing_response(self, input: ResponseSpecification) -> Self
The response that Amazon Lex sends to the user when the intent is complete.
sourcepub fn set_closing_response(self, input: Option<ResponseSpecification>) -> Self
pub fn set_closing_response(self, input: Option<ResponseSpecification>) -> Self
The response that Amazon Lex sends to the user when the intent is complete.
Examples found in repository?
7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113
pub(crate) fn deser_structure_crate_model_intent_closing_setting<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::IntentClosingSetting>,
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::intent_closing_setting::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() {
"closingResponse" => {
builder = builder.set_closing_response(
crate::json_deser::deser_structure_crate_model_response_specification(tokens)?
);
}
"active" => {
builder = builder.set_active(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"nextStep" => {
builder = builder.set_next_step(
crate::json_deser::deser_structure_crate_model_dialog_state(
tokens,
)?,
);
}
"conditional" => {
builder = builder.set_conditional(
crate::json_deser::deser_structure_crate_model_conditional_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 active(self, input: bool) -> Self
pub fn active(self, input: bool) -> Self
Specifies whether an intent's closing response is used. When this field is false, the closing response isn't sent to the user. If the active field isn't specified, the default is true.
sourcepub fn set_active(self, input: Option<bool>) -> Self
pub fn set_active(self, input: Option<bool>) -> Self
Specifies whether an intent's closing response is used. When this field is false, the closing response isn't sent to the user. If the active field isn't specified, the default is true.
Examples found in repository?
7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113
pub(crate) fn deser_structure_crate_model_intent_closing_setting<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::IntentClosingSetting>,
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::intent_closing_setting::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() {
"closingResponse" => {
builder = builder.set_closing_response(
crate::json_deser::deser_structure_crate_model_response_specification(tokens)?
);
}
"active" => {
builder = builder.set_active(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"nextStep" => {
builder = builder.set_next_step(
crate::json_deser::deser_structure_crate_model_dialog_state(
tokens,
)?,
);
}
"conditional" => {
builder = builder.set_conditional(
crate::json_deser::deser_structure_crate_model_conditional_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 next_step(self, input: DialogState) -> Self
pub fn next_step(self, input: DialogState) -> Self
Specifies the next step that the bot executes after playing the intent's closing response.
sourcepub fn set_next_step(self, input: Option<DialogState>) -> Self
pub fn set_next_step(self, input: Option<DialogState>) -> Self
Specifies the next step that the bot executes after playing the intent's closing response.
Examples found in repository?
7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113
pub(crate) fn deser_structure_crate_model_intent_closing_setting<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::IntentClosingSetting>,
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::intent_closing_setting::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() {
"closingResponse" => {
builder = builder.set_closing_response(
crate::json_deser::deser_structure_crate_model_response_specification(tokens)?
);
}
"active" => {
builder = builder.set_active(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"nextStep" => {
builder = builder.set_next_step(
crate::json_deser::deser_structure_crate_model_dialog_state(
tokens,
)?,
);
}
"conditional" => {
builder = builder.set_conditional(
crate::json_deser::deser_structure_crate_model_conditional_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 conditional(self, input: ConditionalSpecification) -> Self
pub fn conditional(self, input: ConditionalSpecification) -> Self
A list of conditional branches associated with the intent's closing response. These branches are executed when the nextStep attribute is set to EvalutateConditional.
sourcepub fn set_conditional(self, input: Option<ConditionalSpecification>) -> Self
pub fn set_conditional(self, input: Option<ConditionalSpecification>) -> Self
A list of conditional branches associated with the intent's closing response. These branches are executed when the nextStep attribute is set to EvalutateConditional.
Examples found in repository?
7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113
pub(crate) fn deser_structure_crate_model_intent_closing_setting<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::IntentClosingSetting>,
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::intent_closing_setting::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() {
"closingResponse" => {
builder = builder.set_closing_response(
crate::json_deser::deser_structure_crate_model_response_specification(tokens)?
);
}
"active" => {
builder = builder.set_active(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"nextStep" => {
builder = builder.set_next_step(
crate::json_deser::deser_structure_crate_model_dialog_state(
tokens,
)?,
);
}
"conditional" => {
builder = builder.set_conditional(
crate::json_deser::deser_structure_crate_model_conditional_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) -> IntentClosingSetting
pub fn build(self) -> IntentClosingSetting
Consumes the builder and constructs a IntentClosingSetting.
Examples found in repository?
7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113
pub(crate) fn deser_structure_crate_model_intent_closing_setting<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::IntentClosingSetting>,
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::intent_closing_setting::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() {
"closingResponse" => {
builder = builder.set_closing_response(
crate::json_deser::deser_structure_crate_model_response_specification(tokens)?
);
}
"active" => {
builder = builder.set_active(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"nextStep" => {
builder = builder.set_next_step(
crate::json_deser::deser_structure_crate_model_dialog_state(
tokens,
)?,
);
}
"conditional" => {
builder = builder.set_conditional(
crate::json_deser::deser_structure_crate_model_conditional_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",
),
),
}
}