pub struct Builder { /* private fields */ }
Expand description
A builder for StartDocumentTextDetectionOutput
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn job_id(self, input: impl Into<String>) -> Self
pub fn job_id(self, input: impl Into<String>) -> Self
The identifier of the text detection job for the document. Use JobId
to identify the job in a subsequent call to GetDocumentTextDetection
. A JobId
value is only valid for 7 days.
sourcepub fn set_job_id(self, input: Option<String>) -> Self
pub fn set_job_id(self, input: Option<String>) -> Self
The identifier of the text detection job for the document. Use JobId
to identify the job in a subsequent call to GetDocumentTextDetection
. A JobId
value is only valid for 7 days.
Examples found in repository?
src/json_deser.rs (lines 1450-1456)
1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479
pub(crate) fn deser_operation_crate_operation_start_document_text_detection(
value: &[u8],
mut builder: crate::output::start_document_text_detection_output::Builder,
) -> Result<
crate::output::start_document_text_detection_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() {
"JobId" => {
builder = builder.set_job_id(
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) -> StartDocumentTextDetectionOutput
pub fn build(self) -> StartDocumentTextDetectionOutput
Consumes the builder and constructs a StartDocumentTextDetectionOutput
.
Examples found in repository?
src/operation_deser.rs (line 1750)
1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752
pub fn parse_start_document_text_detection_response(
response: &http::Response<bytes::Bytes>,
) -> std::result::Result<
crate::output::StartDocumentTextDetectionOutput,
crate::error::StartDocumentTextDetectionError,
> {
Ok({
#[allow(unused_mut)]
let mut output = crate::output::start_document_text_detection_output::Builder::default();
let _ = response;
output = crate::json_deser::deser_operation_crate_operation_start_document_text_detection(
response.body().as_ref(),
output,
)
.map_err(crate::error::StartDocumentTextDetectionError::unhandled)?;
output.build()
})
}