pub struct Builder { /* private fields */ }Expand description
A builder for ImportResourceSpecification.
Implementations§
source§impl Builder
impl Builder
sourcepub fn bot_import_specification(self, input: BotImportSpecification) -> Self
pub fn bot_import_specification(self, input: BotImportSpecification) -> Self
Parameters for importing a bot.
sourcepub fn set_bot_import_specification(
self,
input: Option<BotImportSpecification>
) -> Self
pub fn set_bot_import_specification(
self,
input: Option<BotImportSpecification>
) -> Self
Parameters for importing a bot.
Examples found in repository?
src/json_deser.rs (lines 8282-8284)
8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317
pub(crate) fn deser_structure_crate_model_import_resource_specification<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ImportResourceSpecification>,
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::import_resource_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() {
"botImportSpecification" => {
builder = builder.set_bot_import_specification(
crate::json_deser::deser_structure_crate_model_bot_import_specification(tokens)?
);
}
"botLocaleImportSpecification" => {
builder = builder.set_bot_locale_import_specification(
crate::json_deser::deser_structure_crate_model_bot_locale_import_specification(tokens)?
);
}
"customVocabularyImportSpecification" => {
builder = builder.set_custom_vocabulary_import_specification(
crate::json_deser::deser_structure_crate_model_custom_vocabulary_import_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 bot_locale_import_specification(
self,
input: BotLocaleImportSpecification
) -> Self
pub fn bot_locale_import_specification(
self,
input: BotLocaleImportSpecification
) -> Self
Parameters for importing a bot locale.
sourcepub fn set_bot_locale_import_specification(
self,
input: Option<BotLocaleImportSpecification>
) -> Self
pub fn set_bot_locale_import_specification(
self,
input: Option<BotLocaleImportSpecification>
) -> Self
Parameters for importing a bot locale.
Examples found in repository?
src/json_deser.rs (lines 8287-8289)
8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317
pub(crate) fn deser_structure_crate_model_import_resource_specification<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ImportResourceSpecification>,
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::import_resource_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() {
"botImportSpecification" => {
builder = builder.set_bot_import_specification(
crate::json_deser::deser_structure_crate_model_bot_import_specification(tokens)?
);
}
"botLocaleImportSpecification" => {
builder = builder.set_bot_locale_import_specification(
crate::json_deser::deser_structure_crate_model_bot_locale_import_specification(tokens)?
);
}
"customVocabularyImportSpecification" => {
builder = builder.set_custom_vocabulary_import_specification(
crate::json_deser::deser_structure_crate_model_custom_vocabulary_import_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 custom_vocabulary_import_specification(
self,
input: CustomVocabularyImportSpecification
) -> Self
pub fn custom_vocabulary_import_specification(
self,
input: CustomVocabularyImportSpecification
) -> Self
Provides the parameters required for importing a custom vocabulary.
sourcepub fn set_custom_vocabulary_import_specification(
self,
input: Option<CustomVocabularyImportSpecification>
) -> Self
pub fn set_custom_vocabulary_import_specification(
self,
input: Option<CustomVocabularyImportSpecification>
) -> Self
Provides the parameters required for importing a custom vocabulary.
Examples found in repository?
src/json_deser.rs (lines 8292-8294)
8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317
pub(crate) fn deser_structure_crate_model_import_resource_specification<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ImportResourceSpecification>,
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::import_resource_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() {
"botImportSpecification" => {
builder = builder.set_bot_import_specification(
crate::json_deser::deser_structure_crate_model_bot_import_specification(tokens)?
);
}
"botLocaleImportSpecification" => {
builder = builder.set_bot_locale_import_specification(
crate::json_deser::deser_structure_crate_model_bot_locale_import_specification(tokens)?
);
}
"customVocabularyImportSpecification" => {
builder = builder.set_custom_vocabulary_import_specification(
crate::json_deser::deser_structure_crate_model_custom_vocabulary_import_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) -> ImportResourceSpecification
pub fn build(self) -> ImportResourceSpecification
Consumes the builder and constructs a ImportResourceSpecification.
Examples found in repository?
src/json_deser.rs (line 8309)
8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317
pub(crate) fn deser_structure_crate_model_import_resource_specification<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ImportResourceSpecification>,
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::import_resource_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() {
"botImportSpecification" => {
builder = builder.set_bot_import_specification(
crate::json_deser::deser_structure_crate_model_bot_import_specification(tokens)?
);
}
"botLocaleImportSpecification" => {
builder = builder.set_bot_locale_import_specification(
crate::json_deser::deser_structure_crate_model_bot_locale_import_specification(tokens)?
);
}
"customVocabularyImportSpecification" => {
builder = builder.set_custom_vocabulary_import_specification(
crate::json_deser::deser_structure_crate_model_custom_vocabulary_import_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",
),
),
}
}