Struct aws_sdk_honeycode::model::import_options::Builder
source · pub struct Builder { /* private fields */ }Expand description
A builder for ImportOptions.
Implementations§
source§impl Builder
impl Builder
sourcepub fn destination_options(self, input: DestinationOptions) -> Self
pub fn destination_options(self, input: DestinationOptions) -> Self
Options relating to the destination of the import request.
sourcepub fn set_destination_options(self, input: Option<DestinationOptions>) -> Self
pub fn set_destination_options(self, input: Option<DestinationOptions>) -> Self
Options relating to the destination of the import request.
Examples found in repository?
src/json_deser.rs (lines 2083-2085)
2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113
pub(crate) fn deser_structure_crate_model_import_options<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ImportOptions>,
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_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() {
"destinationOptions" => {
builder = builder.set_destination_options(
crate::json_deser::deser_structure_crate_model_destination_options(tokens)?
);
}
"delimitedTextOptions" => {
builder = builder.set_delimited_text_options(
crate::json_deser::deser_structure_crate_model_delimited_text_import_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 delimited_text_options(self, input: DelimitedTextImportOptions) -> Self
pub fn delimited_text_options(self, input: DelimitedTextImportOptions) -> Self
Options relating to parsing delimited text. Required if dataFormat is DELIMITED_TEXT.
sourcepub fn set_delimited_text_options(
self,
input: Option<DelimitedTextImportOptions>
) -> Self
pub fn set_delimited_text_options(
self,
input: Option<DelimitedTextImportOptions>
) -> Self
Options relating to parsing delimited text. Required if dataFormat is DELIMITED_TEXT.
Examples found in repository?
src/json_deser.rs (lines 2088-2090)
2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113
pub(crate) fn deser_structure_crate_model_import_options<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ImportOptions>,
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_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() {
"destinationOptions" => {
builder = builder.set_destination_options(
crate::json_deser::deser_structure_crate_model_destination_options(tokens)?
);
}
"delimitedTextOptions" => {
builder = builder.set_delimited_text_options(
crate::json_deser::deser_structure_crate_model_delimited_text_import_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) -> ImportOptions
pub fn build(self) -> ImportOptions
Consumes the builder and constructs a ImportOptions.
Examples found in repository?
src/json_deser.rs (line 2105)
2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113
pub(crate) fn deser_structure_crate_model_import_options<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ImportOptions>,
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_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() {
"destinationOptions" => {
builder = builder.set_destination_options(
crate::json_deser::deser_structure_crate_model_destination_options(tokens)?
);
}
"delimitedTextOptions" => {
builder = builder.set_delimited_text_options(
crate::json_deser::deser_structure_crate_model_delimited_text_import_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",
),
),
}
}