Struct aws_sdk_databrew::model::output::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for Output
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn compression_format(self, input: CompressionFormat) -> Self
pub fn compression_format(self, input: CompressionFormat) -> Self
The compression algorithm used to compress the output text of the job.
sourcepub fn set_compression_format(self, input: Option<CompressionFormat>) -> Self
pub fn set_compression_format(self, input: Option<CompressionFormat>) -> Self
The compression algorithm used to compress the output text of the job.
Examples found in repository?
5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392
pub(crate) fn deser_structure_crate_model_output<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<Option<crate::model::Output>, 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::output::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() {
"CompressionFormat" => {
builder = builder.set_compression_format(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped().map(|u| {
crate::model::CompressionFormat::from(u.as_ref())
})
})
.transpose()?,
);
}
"Format" => {
builder = builder.set_format(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped()
.map(|u| crate::model::OutputFormat::from(u.as_ref()))
})
.transpose()?,
);
}
"PartitionColumns" => {
builder = builder.set_partition_columns(
crate::json_deser::deser_list_com_amazonaws_databrew_column_name_list(tokens)?
);
}
"Location" => {
builder = builder.set_location(
crate::json_deser::deser_structure_crate_model_s3_location(
tokens,
)?,
);
}
"Overwrite" => {
builder = builder.set_overwrite(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"FormatOptions" => {
builder = builder.set_format_options(
crate::json_deser::deser_structure_crate_model_output_format_options(tokens)?
);
}
"MaxOutputFiles" => {
builder = builder.set_max_output_files(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
_ => 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 format(self, input: OutputFormat) -> Self
pub fn format(self, input: OutputFormat) -> Self
The data format of the output of the job.
sourcepub fn set_format(self, input: Option<OutputFormat>) -> Self
pub fn set_format(self, input: Option<OutputFormat>) -> Self
The data format of the output of the job.
Examples found in repository?
5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392
pub(crate) fn deser_structure_crate_model_output<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<Option<crate::model::Output>, 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::output::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() {
"CompressionFormat" => {
builder = builder.set_compression_format(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped().map(|u| {
crate::model::CompressionFormat::from(u.as_ref())
})
})
.transpose()?,
);
}
"Format" => {
builder = builder.set_format(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped()
.map(|u| crate::model::OutputFormat::from(u.as_ref()))
})
.transpose()?,
);
}
"PartitionColumns" => {
builder = builder.set_partition_columns(
crate::json_deser::deser_list_com_amazonaws_databrew_column_name_list(tokens)?
);
}
"Location" => {
builder = builder.set_location(
crate::json_deser::deser_structure_crate_model_s3_location(
tokens,
)?,
);
}
"Overwrite" => {
builder = builder.set_overwrite(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"FormatOptions" => {
builder = builder.set_format_options(
crate::json_deser::deser_structure_crate_model_output_format_options(tokens)?
);
}
"MaxOutputFiles" => {
builder = builder.set_max_output_files(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
_ => 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 partition_columns(self, input: impl Into<String>) -> Self
pub fn partition_columns(self, input: impl Into<String>) -> Self
Appends an item to partition_columns
.
To override the contents of this collection use set_partition_columns
.
The names of one or more partition columns for the output of the job.
sourcepub fn set_partition_columns(self, input: Option<Vec<String>>) -> Self
pub fn set_partition_columns(self, input: Option<Vec<String>>) -> Self
The names of one or more partition columns for the output of the job.
Examples found in repository?
5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392
pub(crate) fn deser_structure_crate_model_output<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<Option<crate::model::Output>, 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::output::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() {
"CompressionFormat" => {
builder = builder.set_compression_format(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped().map(|u| {
crate::model::CompressionFormat::from(u.as_ref())
})
})
.transpose()?,
);
}
"Format" => {
builder = builder.set_format(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped()
.map(|u| crate::model::OutputFormat::from(u.as_ref()))
})
.transpose()?,
);
}
"PartitionColumns" => {
builder = builder.set_partition_columns(
crate::json_deser::deser_list_com_amazonaws_databrew_column_name_list(tokens)?
);
}
"Location" => {
builder = builder.set_location(
crate::json_deser::deser_structure_crate_model_s3_location(
tokens,
)?,
);
}
"Overwrite" => {
builder = builder.set_overwrite(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"FormatOptions" => {
builder = builder.set_format_options(
crate::json_deser::deser_structure_crate_model_output_format_options(tokens)?
);
}
"MaxOutputFiles" => {
builder = builder.set_max_output_files(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
_ => 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 location(self, input: S3Location) -> Self
pub fn location(self, input: S3Location) -> Self
The location in Amazon S3 where the job writes its output.
sourcepub fn set_location(self, input: Option<S3Location>) -> Self
pub fn set_location(self, input: Option<S3Location>) -> Self
The location in Amazon S3 where the job writes its output.
Examples found in repository?
5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392
pub(crate) fn deser_structure_crate_model_output<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<Option<crate::model::Output>, 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::output::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() {
"CompressionFormat" => {
builder = builder.set_compression_format(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped().map(|u| {
crate::model::CompressionFormat::from(u.as_ref())
})
})
.transpose()?,
);
}
"Format" => {
builder = builder.set_format(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped()
.map(|u| crate::model::OutputFormat::from(u.as_ref()))
})
.transpose()?,
);
}
"PartitionColumns" => {
builder = builder.set_partition_columns(
crate::json_deser::deser_list_com_amazonaws_databrew_column_name_list(tokens)?
);
}
"Location" => {
builder = builder.set_location(
crate::json_deser::deser_structure_crate_model_s3_location(
tokens,
)?,
);
}
"Overwrite" => {
builder = builder.set_overwrite(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"FormatOptions" => {
builder = builder.set_format_options(
crate::json_deser::deser_structure_crate_model_output_format_options(tokens)?
);
}
"MaxOutputFiles" => {
builder = builder.set_max_output_files(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
_ => 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 overwrite(self, input: bool) -> Self
pub fn overwrite(self, input: bool) -> Self
A value that, if true, means that any data in the location specified for output is overwritten with new output.
sourcepub fn set_overwrite(self, input: Option<bool>) -> Self
pub fn set_overwrite(self, input: Option<bool>) -> Self
A value that, if true, means that any data in the location specified for output is overwritten with new output.
Examples found in repository?
5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392
pub(crate) fn deser_structure_crate_model_output<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<Option<crate::model::Output>, 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::output::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() {
"CompressionFormat" => {
builder = builder.set_compression_format(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped().map(|u| {
crate::model::CompressionFormat::from(u.as_ref())
})
})
.transpose()?,
);
}
"Format" => {
builder = builder.set_format(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped()
.map(|u| crate::model::OutputFormat::from(u.as_ref()))
})
.transpose()?,
);
}
"PartitionColumns" => {
builder = builder.set_partition_columns(
crate::json_deser::deser_list_com_amazonaws_databrew_column_name_list(tokens)?
);
}
"Location" => {
builder = builder.set_location(
crate::json_deser::deser_structure_crate_model_s3_location(
tokens,
)?,
);
}
"Overwrite" => {
builder = builder.set_overwrite(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"FormatOptions" => {
builder = builder.set_format_options(
crate::json_deser::deser_structure_crate_model_output_format_options(tokens)?
);
}
"MaxOutputFiles" => {
builder = builder.set_max_output_files(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
_ => 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 format_options(self, input: OutputFormatOptions) -> Self
pub fn format_options(self, input: OutputFormatOptions) -> Self
Represents options that define how DataBrew formats job output files.
sourcepub fn set_format_options(self, input: Option<OutputFormatOptions>) -> Self
pub fn set_format_options(self, input: Option<OutputFormatOptions>) -> Self
Represents options that define how DataBrew formats job output files.
Examples found in repository?
5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392
pub(crate) fn deser_structure_crate_model_output<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<Option<crate::model::Output>, 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::output::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() {
"CompressionFormat" => {
builder = builder.set_compression_format(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped().map(|u| {
crate::model::CompressionFormat::from(u.as_ref())
})
})
.transpose()?,
);
}
"Format" => {
builder = builder.set_format(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped()
.map(|u| crate::model::OutputFormat::from(u.as_ref()))
})
.transpose()?,
);
}
"PartitionColumns" => {
builder = builder.set_partition_columns(
crate::json_deser::deser_list_com_amazonaws_databrew_column_name_list(tokens)?
);
}
"Location" => {
builder = builder.set_location(
crate::json_deser::deser_structure_crate_model_s3_location(
tokens,
)?,
);
}
"Overwrite" => {
builder = builder.set_overwrite(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"FormatOptions" => {
builder = builder.set_format_options(
crate::json_deser::deser_structure_crate_model_output_format_options(tokens)?
);
}
"MaxOutputFiles" => {
builder = builder.set_max_output_files(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
_ => 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 max_output_files(self, input: i32) -> Self
pub fn max_output_files(self, input: i32) -> Self
Maximum number of files to be generated by the job and written to the output folder. For output partitioned by column(s), the MaxOutputFiles value is the maximum number of files per partition.
sourcepub fn set_max_output_files(self, input: Option<i32>) -> Self
pub fn set_max_output_files(self, input: Option<i32>) -> Self
Maximum number of files to be generated by the job and written to the output folder. For output partitioned by column(s), the MaxOutputFiles value is the maximum number of files per partition.
Examples found in repository?
5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392
pub(crate) fn deser_structure_crate_model_output<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<Option<crate::model::Output>, 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::output::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() {
"CompressionFormat" => {
builder = builder.set_compression_format(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped().map(|u| {
crate::model::CompressionFormat::from(u.as_ref())
})
})
.transpose()?,
);
}
"Format" => {
builder = builder.set_format(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped()
.map(|u| crate::model::OutputFormat::from(u.as_ref()))
})
.transpose()?,
);
}
"PartitionColumns" => {
builder = builder.set_partition_columns(
crate::json_deser::deser_list_com_amazonaws_databrew_column_name_list(tokens)?
);
}
"Location" => {
builder = builder.set_location(
crate::json_deser::deser_structure_crate_model_s3_location(
tokens,
)?,
);
}
"Overwrite" => {
builder = builder.set_overwrite(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"FormatOptions" => {
builder = builder.set_format_options(
crate::json_deser::deser_structure_crate_model_output_format_options(tokens)?
);
}
"MaxOutputFiles" => {
builder = builder.set_max_output_files(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
_ => 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) -> Output
pub fn build(self) -> Output
Consumes the builder and constructs a Output
.
Examples found in repository?
5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392
pub(crate) fn deser_structure_crate_model_output<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<Option<crate::model::Output>, 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::output::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() {
"CompressionFormat" => {
builder = builder.set_compression_format(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped().map(|u| {
crate::model::CompressionFormat::from(u.as_ref())
})
})
.transpose()?,
);
}
"Format" => {
builder = builder.set_format(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| {
s.to_unescaped()
.map(|u| crate::model::OutputFormat::from(u.as_ref()))
})
.transpose()?,
);
}
"PartitionColumns" => {
builder = builder.set_partition_columns(
crate::json_deser::deser_list_com_amazonaws_databrew_column_name_list(tokens)?
);
}
"Location" => {
builder = builder.set_location(
crate::json_deser::deser_structure_crate_model_s3_location(
tokens,
)?,
);
}
"Overwrite" => {
builder = builder.set_overwrite(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"FormatOptions" => {
builder = builder.set_format_options(
crate::json_deser::deser_structure_crate_model_output_format_options(tokens)?
);
}
"MaxOutputFiles" => {
builder = builder.set_max_output_files(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
_ => 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",
),
),
}
}