pub struct Builder { /* private fields */ }Expand description
A builder for BotRecommendationResultStatistics.
Implementations§
source§impl Builder
impl Builder
sourcepub fn intents(self, input: IntentStatistics) -> Self
pub fn intents(self, input: IntentStatistics) -> Self
Statistical information about about the intents associated with the bot recommendation results.
sourcepub fn set_intents(self, input: Option<IntentStatistics>) -> Self
pub fn set_intents(self, input: Option<IntentStatistics>) -> Self
Statistical information about about the intents associated with the bot recommendation results.
Examples found in repository?
src/json_deser.rs (lines 10974-10976)
10948 10949 10950 10951 10952 10953 10954 10955 10956 10957 10958 10959 10960 10961 10962 10963 10964 10965 10966 10967 10968 10969 10970 10971 10972 10973 10974 10975 10976 10977 10978 10979 10980 10981 10982 10983 10984 10985 10986 10987 10988 10989 10990 10991 10992 10993 10994 10995 10996 10997 10998 10999 11000 11001 11002 11003 11004
pub(crate) fn deser_structure_crate_model_bot_recommendation_result_statistics<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::BotRecommendationResultStatistics>,
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::bot_recommendation_result_statistics::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() {
"intents" => {
builder = builder.set_intents(
crate::json_deser::deser_structure_crate_model_intent_statistics(tokens)?
);
}
"slotTypes" => {
builder = builder.set_slot_types(
crate::json_deser::deser_structure_crate_model_slot_type_statistics(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 slot_types(self, input: SlotTypeStatistics) -> Self
pub fn slot_types(self, input: SlotTypeStatistics) -> Self
Statistical information about the slot types associated with the bot recommendation results.
sourcepub fn set_slot_types(self, input: Option<SlotTypeStatistics>) -> Self
pub fn set_slot_types(self, input: Option<SlotTypeStatistics>) -> Self
Statistical information about the slot types associated with the bot recommendation results.
Examples found in repository?
src/json_deser.rs (lines 10979-10981)
10948 10949 10950 10951 10952 10953 10954 10955 10956 10957 10958 10959 10960 10961 10962 10963 10964 10965 10966 10967 10968 10969 10970 10971 10972 10973 10974 10975 10976 10977 10978 10979 10980 10981 10982 10983 10984 10985 10986 10987 10988 10989 10990 10991 10992 10993 10994 10995 10996 10997 10998 10999 11000 11001 11002 11003 11004
pub(crate) fn deser_structure_crate_model_bot_recommendation_result_statistics<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::BotRecommendationResultStatistics>,
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::bot_recommendation_result_statistics::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() {
"intents" => {
builder = builder.set_intents(
crate::json_deser::deser_structure_crate_model_intent_statistics(tokens)?
);
}
"slotTypes" => {
builder = builder.set_slot_types(
crate::json_deser::deser_structure_crate_model_slot_type_statistics(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) -> BotRecommendationResultStatistics
pub fn build(self) -> BotRecommendationResultStatistics
Consumes the builder and constructs a BotRecommendationResultStatistics.
Examples found in repository?
src/json_deser.rs (line 10996)
10948 10949 10950 10951 10952 10953 10954 10955 10956 10957 10958 10959 10960 10961 10962 10963 10964 10965 10966 10967 10968 10969 10970 10971 10972 10973 10974 10975 10976 10977 10978 10979 10980 10981 10982 10983 10984 10985 10986 10987 10988 10989 10990 10991 10992 10993 10994 10995 10996 10997 10998 10999 11000 11001 11002 11003 11004
pub(crate) fn deser_structure_crate_model_bot_recommendation_result_statistics<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::BotRecommendationResultStatistics>,
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::bot_recommendation_result_statistics::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() {
"intents" => {
builder = builder.set_intents(
crate::json_deser::deser_structure_crate_model_intent_statistics(tokens)?
);
}
"slotTypes" => {
builder = builder.set_slot_types(
crate::json_deser::deser_structure_crate_model_slot_type_statistics(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",
),
),
}
}