Struct aws_sdk_honeycode::model::destination_options::Builder
source · pub struct Builder { /* private fields */ }Expand description
A builder for DestinationOptions.
Implementations§
source§impl Builder
impl Builder
sourcepub fn column_map(
self,
k: impl Into<String>,
v: SourceDataColumnProperties
) -> Self
pub fn column_map(
self,
k: impl Into<String>,
v: SourceDataColumnProperties
) -> Self
Adds a key-value pair to column_map.
To override the contents of this collection use set_column_map.
A map of the column id to the import properties for each column.
sourcepub fn set_column_map(
self,
input: Option<HashMap<String, SourceDataColumnProperties>>
) -> Self
pub fn set_column_map(
self,
input: Option<HashMap<String, SourceDataColumnProperties>>
) -> Self
A map of the column id to the import properties for each column.
Examples found in repository?
src/json_deser.rs (lines 2442-2444)
2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467
pub(crate) fn deser_structure_crate_model_destination_options<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::DestinationOptions>,
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::destination_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() {
"columnMap" => {
builder = builder.set_column_map(
crate::json_deser::deser_map_com_amazonaws_honeycode_import_column_map(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) -> DestinationOptions
pub fn build(self) -> DestinationOptions
Consumes the builder and constructs a DestinationOptions.
Examples found in repository?
src/json_deser.rs (line 2459)
2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467
pub(crate) fn deser_structure_crate_model_destination_options<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::DestinationOptions>,
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::destination_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() {
"columnMap" => {
builder = builder.set_column_map(
crate::json_deser::deser_map_com_amazonaws_honeycode_import_column_map(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",
),
),
}
}