Struct aws_sdk_lexmodelsv2::model::path_format::Builder
source · pub struct Builder { /* private fields */ }Expand description
A builder for PathFormat.
Implementations§
source§impl Builder
impl Builder
sourcepub fn object_prefixes(self, input: impl Into<String>) -> Self
pub fn object_prefixes(self, input: impl Into<String>) -> Self
Appends an item to object_prefixes.
To override the contents of this collection use set_object_prefixes.
A list of Amazon S3 prefixes that points to sub-folders in the Amazon S3 bucket. Specify this list if you only want Lex to read the files under this set of sub-folders.
sourcepub fn set_object_prefixes(self, input: Option<Vec<String>>) -> Self
pub fn set_object_prefixes(self, input: Option<Vec<String>>) -> Self
A list of Amazon S3 prefixes that points to sub-folders in the Amazon S3 bucket. Specify this list if you only want Lex to read the files under this set of sub-folders.
Examples found in repository?
src/json_deser.rs (lines 14232-14234)
14210 14211 14212 14213 14214 14215 14216 14217 14218 14219 14220 14221 14222 14223 14224 14225 14226 14227 14228 14229 14230 14231 14232 14233 14234 14235 14236 14237 14238 14239 14240 14241 14242 14243 14244 14245 14246 14247 14248 14249 14250 14251 14252 14253 14254 14255 14256 14257
pub(crate) fn deser_structure_crate_model_path_format<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<Option<crate::model::PathFormat>, 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::path_format::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() {
"objectPrefixes" => {
builder = builder.set_object_prefixes(
crate::json_deser::deser_list_com_amazonaws_lexmodelsv2_object_prefixes(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) -> PathFormat
pub fn build(self) -> PathFormat
Consumes the builder and constructs a PathFormat.
Examples found in repository?
src/json_deser.rs (line 14249)
14210 14211 14212 14213 14214 14215 14216 14217 14218 14219 14220 14221 14222 14223 14224 14225 14226 14227 14228 14229 14230 14231 14232 14233 14234 14235 14236 14237 14238 14239 14240 14241 14242 14243 14244 14245 14246 14247 14248 14249 14250 14251 14252 14253 14254 14255 14256 14257
pub(crate) fn deser_structure_crate_model_path_format<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<Option<crate::model::PathFormat>, 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::path_format::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() {
"objectPrefixes" => {
builder = builder.set_object_prefixes(
crate::json_deser::deser_list_com_amazonaws_lexmodelsv2_object_prefixes(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",
),
),
}
}