pub struct Builder { /* private fields */ }Expand description
A builder for ListDocumentClassifierSummariesOutput.
Implementations§
source§impl Builder
impl Builder
sourcepub fn document_classifier_summaries_list(
self,
input: DocumentClassifierSummary
) -> Self
pub fn document_classifier_summaries_list(
self,
input: DocumentClassifierSummary
) -> Self
Appends an item to document_classifier_summaries_list.
To override the contents of this collection use set_document_classifier_summaries_list.
The list of summaries of document classifiers.
sourcepub fn set_document_classifier_summaries_list(
self,
input: Option<Vec<DocumentClassifierSummary>>
) -> Self
pub fn set_document_classifier_summaries_list(
self,
input: Option<Vec<DocumentClassifierSummary>>
) -> Self
The list of summaries of document classifiers.
Examples found in repository?
src/json_deser.rs (lines 2358-2360)
2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392
pub(crate) fn deser_operation_crate_operation_list_document_classifier_summaries(
value: &[u8],
mut builder: crate::output::list_document_classifier_summaries_output::Builder,
) -> Result<
crate::output::list_document_classifier_summaries_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() {
"DocumentClassifierSummariesList" => {
builder = builder.set_document_classifier_summaries_list(
crate::json_deser::deser_list_com_amazonaws_comprehend_document_classifier_summaries_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
Identifies the next page of results to return.
sourcepub fn set_next_token(self, input: Option<String>) -> Self
pub fn set_next_token(self, input: Option<String>) -> Self
Identifies the next page of results to return.
Examples found in repository?
src/json_deser.rs (lines 2363-2369)
2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392
pub(crate) fn deser_operation_crate_operation_list_document_classifier_summaries(
value: &[u8],
mut builder: crate::output::list_document_classifier_summaries_output::Builder,
) -> Result<
crate::output::list_document_classifier_summaries_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() {
"DocumentClassifierSummariesList" => {
builder = builder.set_document_classifier_summaries_list(
crate::json_deser::deser_list_com_amazonaws_comprehend_document_classifier_summaries_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) -> ListDocumentClassifierSummariesOutput
pub fn build(self) -> ListDocumentClassifierSummariesOutput
Consumes the builder and constructs a ListDocumentClassifierSummariesOutput.
Examples found in repository?
src/operation_deser.rs (line 4691)
4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693
pub fn parse_list_document_classifier_summaries_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::ListDocumentClassifierSummariesOutput,
crate::error::ListDocumentClassifierSummariesError,
> {
Ok({
#[allow(unused_mut)]
let mut output =
crate::output::list_document_classifier_summaries_output::Builder::default();
let _ = response;
output =
crate::json_deser::deser_operation_crate_operation_list_document_classifier_summaries(
response.body().as_ref(),
output,
)
.map_err(crate::error::ListDocumentClassifierSummariesError::unhandled)?;
output.build()
})
}