Struct aws_sdk_databrew::model::format_options::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for FormatOptions
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn json(self, input: JsonOptions) -> Self
pub fn json(self, input: JsonOptions) -> Self
Options that define how JSON input is to be interpreted by DataBrew.
sourcepub fn set_json(self, input: Option<JsonOptions>) -> Self
pub fn set_json(self, input: Option<JsonOptions>) -> Self
Options that define how JSON input is to be interpreted by DataBrew.
Examples found in repository?
src/json_deser.rs (lines 3301-3305)
3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342
pub(crate) fn deser_structure_crate_model_format_options<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::FormatOptions>,
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::format_options::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() {
"Json" => {
builder = builder.set_json(
crate::json_deser::deser_structure_crate_model_json_options(
tokens,
)?,
);
}
"Excel" => {
builder = builder.set_excel(
crate::json_deser::deser_structure_crate_model_excel_options(
tokens,
)?,
);
}
"Csv" => {
builder = builder.set_csv(
crate::json_deser::deser_structure_crate_model_csv_options(
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 excel(self, input: ExcelOptions) -> Self
pub fn excel(self, input: ExcelOptions) -> Self
Options that define how Excel input is to be interpreted by DataBrew.
sourcepub fn set_excel(self, input: Option<ExcelOptions>) -> Self
pub fn set_excel(self, input: Option<ExcelOptions>) -> Self
Options that define how Excel input is to be interpreted by DataBrew.
Examples found in repository?
src/json_deser.rs (lines 3308-3312)
3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342
pub(crate) fn deser_structure_crate_model_format_options<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::FormatOptions>,
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::format_options::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() {
"Json" => {
builder = builder.set_json(
crate::json_deser::deser_structure_crate_model_json_options(
tokens,
)?,
);
}
"Excel" => {
builder = builder.set_excel(
crate::json_deser::deser_structure_crate_model_excel_options(
tokens,
)?,
);
}
"Csv" => {
builder = builder.set_csv(
crate::json_deser::deser_structure_crate_model_csv_options(
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 csv(self, input: CsvOptions) -> Self
pub fn csv(self, input: CsvOptions) -> Self
Options that define how CSV input is to be interpreted by DataBrew.
sourcepub fn set_csv(self, input: Option<CsvOptions>) -> Self
pub fn set_csv(self, input: Option<CsvOptions>) -> Self
Options that define how CSV input is to be interpreted by DataBrew.
Examples found in repository?
src/json_deser.rs (lines 3315-3319)
3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342
pub(crate) fn deser_structure_crate_model_format_options<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::FormatOptions>,
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::format_options::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() {
"Json" => {
builder = builder.set_json(
crate::json_deser::deser_structure_crate_model_json_options(
tokens,
)?,
);
}
"Excel" => {
builder = builder.set_excel(
crate::json_deser::deser_structure_crate_model_excel_options(
tokens,
)?,
);
}
"Csv" => {
builder = builder.set_csv(
crate::json_deser::deser_structure_crate_model_csv_options(
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) -> FormatOptions
pub fn build(self) -> FormatOptions
Consumes the builder and constructs a FormatOptions
.
Examples found in repository?
src/json_deser.rs (line 3334)
3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342
pub(crate) fn deser_structure_crate_model_format_options<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::FormatOptions>,
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::format_options::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() {
"Json" => {
builder = builder.set_json(
crate::json_deser::deser_structure_crate_model_json_options(
tokens,
)?,
);
}
"Excel" => {
builder = builder.set_excel(
crate::json_deser::deser_structure_crate_model_excel_options(
tokens,
)?,
);
}
"Csv" => {
builder = builder.set_csv(
crate::json_deser::deser_structure_crate_model_csv_options(
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",
),
),
}
}