pub struct Builder { /* private fields */ }Expand description
A builder for DialogCodeHookInvocationSetting.
Implementations§
source§impl Builder
impl Builder
sourcepub fn enable_code_hook_invocation(self, input: bool) -> Self
pub fn enable_code_hook_invocation(self, input: bool) -> Self
Indicates whether a Lambda function should be invoked for the dialog.
sourcepub fn set_enable_code_hook_invocation(self, input: Option<bool>) -> Self
pub fn set_enable_code_hook_invocation(self, input: Option<bool>) -> Self
Indicates whether a Lambda function should be invoked for the dialog.
Examples found in repository?
9870 9871 9872 9873 9874 9875 9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943
pub(crate) fn deser_structure_crate_model_dialog_code_hook_invocation_setting<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::DialogCodeHookInvocationSetting>,
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::dialog_code_hook_invocation_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() {
"enableCodeHookInvocation" => {
builder = builder.set_enable_code_hook_invocation(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"active" => {
builder = builder.set_active(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"invocationLabel" => {
builder = builder.set_invocation_label(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"postCodeHookSpecification" => {
builder = builder.set_post_code_hook_specification(
crate::json_deser::deser_structure_crate_model_post_dialog_code_hook_invocation_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
Determines whether a dialog code hook is used when the intent is activated.
sourcepub fn set_active(self, input: Option<bool>) -> Self
pub fn set_active(self, input: Option<bool>) -> Self
Determines whether a dialog code hook is used when the intent is activated.
Examples found in repository?
9870 9871 9872 9873 9874 9875 9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943
pub(crate) fn deser_structure_crate_model_dialog_code_hook_invocation_setting<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::DialogCodeHookInvocationSetting>,
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::dialog_code_hook_invocation_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() {
"enableCodeHookInvocation" => {
builder = builder.set_enable_code_hook_invocation(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"active" => {
builder = builder.set_active(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"invocationLabel" => {
builder = builder.set_invocation_label(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"postCodeHookSpecification" => {
builder = builder.set_post_code_hook_specification(
crate::json_deser::deser_structure_crate_model_post_dialog_code_hook_invocation_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 invocation_label(self, input: impl Into<String>) -> Self
pub fn invocation_label(self, input: impl Into<String>) -> Self
A label that indicates the dialog step from which the dialog code hook is happening.
sourcepub fn set_invocation_label(self, input: Option<String>) -> Self
pub fn set_invocation_label(self, input: Option<String>) -> Self
A label that indicates the dialog step from which the dialog code hook is happening.
Examples found in repository?
9870 9871 9872 9873 9874 9875 9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943
pub(crate) fn deser_structure_crate_model_dialog_code_hook_invocation_setting<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::DialogCodeHookInvocationSetting>,
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::dialog_code_hook_invocation_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() {
"enableCodeHookInvocation" => {
builder = builder.set_enable_code_hook_invocation(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"active" => {
builder = builder.set_active(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"invocationLabel" => {
builder = builder.set_invocation_label(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"postCodeHookSpecification" => {
builder = builder.set_post_code_hook_specification(
crate::json_deser::deser_structure_crate_model_post_dialog_code_hook_invocation_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 post_code_hook_specification(
self,
input: PostDialogCodeHookInvocationSpecification
) -> Self
pub fn post_code_hook_specification(
self,
input: PostDialogCodeHookInvocationSpecification
) -> Self
Contains the responses and actions that Amazon Lex takes after the Lambda function is complete.
sourcepub fn set_post_code_hook_specification(
self,
input: Option<PostDialogCodeHookInvocationSpecification>
) -> Self
pub fn set_post_code_hook_specification(
self,
input: Option<PostDialogCodeHookInvocationSpecification>
) -> Self
Contains the responses and actions that Amazon Lex takes after the Lambda function is complete.
Examples found in repository?
9870 9871 9872 9873 9874 9875 9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943
pub(crate) fn deser_structure_crate_model_dialog_code_hook_invocation_setting<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::DialogCodeHookInvocationSetting>,
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::dialog_code_hook_invocation_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() {
"enableCodeHookInvocation" => {
builder = builder.set_enable_code_hook_invocation(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"active" => {
builder = builder.set_active(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"invocationLabel" => {
builder = builder.set_invocation_label(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"postCodeHookSpecification" => {
builder = builder.set_post_code_hook_specification(
crate::json_deser::deser_structure_crate_model_post_dialog_code_hook_invocation_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) -> DialogCodeHookInvocationSetting
pub fn build(self) -> DialogCodeHookInvocationSetting
Consumes the builder and constructs a DialogCodeHookInvocationSetting.
Examples found in repository?
9870 9871 9872 9873 9874 9875 9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943
pub(crate) fn deser_structure_crate_model_dialog_code_hook_invocation_setting<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::DialogCodeHookInvocationSetting>,
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::dialog_code_hook_invocation_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() {
"enableCodeHookInvocation" => {
builder = builder.set_enable_code_hook_invocation(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"active" => {
builder = builder.set_active(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"invocationLabel" => {
builder = builder.set_invocation_label(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"postCodeHookSpecification" => {
builder = builder.set_post_code_hook_specification(
crate::json_deser::deser_structure_crate_model_post_dialog_code_hook_invocation_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",
),
),
}
}