Struct aws_sdk_databrew::output::list_datasets_output::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for ListDatasetsOutput
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn datasets(self, input: Dataset) -> Self
pub fn datasets(self, input: Dataset) -> Self
Appends an item to datasets
.
To override the contents of this collection use set_datasets
.
A list of datasets that are defined.
sourcepub fn set_datasets(self, input: Option<Vec<Dataset>>) -> Self
pub fn set_datasets(self, input: Option<Vec<Dataset>>) -> Self
A list of datasets that are defined.
Examples found in repository?
src/json_deser.rs (lines 2127-2131)
2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163
pub(crate) fn deser_operation_crate_operation_list_datasets(
value: &[u8],
mut builder: crate::output::list_datasets_output::Builder,
) -> Result<
crate::output::list_datasets_output::Builder,
aws_smithy_json::deserialize::error::DeserializeError,
> {
let mut tokens_owned =
aws_smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(value))
.peekable();
let tokens = &mut tokens_owned;
aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
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() {
"Datasets" => {
builder = builder.set_datasets(
crate::json_deser::deser_list_com_amazonaws_databrew_dataset_list(
tokens,
)?,
);
}
"NextToken" => {
builder = builder.set_next_token(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.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
)),
)
}
}
}
if tokens.next().is_some() {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"found more JSON tokens after completing parsing",
),
);
}
Ok(builder)
}
sourcepub fn next_token(self, input: impl Into<String>) -> Self
pub fn next_token(self, input: impl Into<String>) -> Self
A token that you can use in a subsequent call to retrieve the next set of results.
sourcepub fn set_next_token(self, input: Option<String>) -> Self
pub fn set_next_token(self, input: Option<String>) -> Self
A token that you can use in a subsequent call to retrieve the next set of results.
Examples found in repository?
src/json_deser.rs (lines 2134-2140)
2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163
pub(crate) fn deser_operation_crate_operation_list_datasets(
value: &[u8],
mut builder: crate::output::list_datasets_output::Builder,
) -> Result<
crate::output::list_datasets_output::Builder,
aws_smithy_json::deserialize::error::DeserializeError,
> {
let mut tokens_owned =
aws_smithy_json::deserialize::json_token_iter(crate::json_deser::or_empty_doc(value))
.peekable();
let tokens = &mut tokens_owned;
aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
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() {
"Datasets" => {
builder = builder.set_datasets(
crate::json_deser::deser_list_com_amazonaws_databrew_dataset_list(
tokens,
)?,
);
}
"NextToken" => {
builder = builder.set_next_token(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.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
)),
)
}
}
}
if tokens.next().is_some() {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"found more JSON tokens after completing parsing",
),
);
}
Ok(builder)
}
sourcepub fn build(self) -> ListDatasetsOutput
pub fn build(self) -> ListDatasetsOutput
Consumes the builder and constructs a ListDatasetsOutput
.
Examples found in repository?
src/operation_deser.rs (line 1853)
1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855
pub fn parse_list_datasets_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<crate::output::ListDatasetsOutput, crate::error::ListDatasetsError> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::list_datasets_output::Builder::default();
let _ = response;
output = crate::json_deser::deser_operation_crate_operation_list_datasets(
response.body().as_ref(),
output,
)
.map_err(crate::error::ListDatasetsError::unhandled)?;
output.build()
})
}