1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The results extracted for a lending document.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct LendingDetection {
/// <p>The text extracted for a detected value in a lending document.</p>
pub text: ::std::option::Option<::std::string::String>,
/// <p>The selection status of a selection element, such as an option button or check box.</p>
pub selection_status: ::std::option::Option<crate::types::SelectionStatus>,
/// <p>Information about where the following items are located on a document page: detected page, text, key-value pairs, tables, table cells, and selection elements.</p>
pub geometry: ::std::option::Option<crate::types::Geometry>,
/// <p>The confidence level for the text of a detected value in a lending document.</p>
pub confidence: ::std::option::Option<f32>,
}
impl LendingDetection {
/// <p>The text extracted for a detected value in a lending document.</p>
pub fn text(&self) -> ::std::option::Option<&str> {
self.text.as_deref()
}
/// <p>The selection status of a selection element, such as an option button or check box.</p>
pub fn selection_status(&self) -> ::std::option::Option<&crate::types::SelectionStatus> {
self.selection_status.as_ref()
}
/// <p>Information about where the following items are located on a document page: detected page, text, key-value pairs, tables, table cells, and selection elements.</p>
pub fn geometry(&self) -> ::std::option::Option<&crate::types::Geometry> {
self.geometry.as_ref()
}
/// <p>The confidence level for the text of a detected value in a lending document.</p>
pub fn confidence(&self) -> ::std::option::Option<f32> {
self.confidence
}
}
impl LendingDetection {
/// Creates a new builder-style object to manufacture [`LendingDetection`](crate::types::LendingDetection).
pub fn builder() -> crate::types::builders::LendingDetectionBuilder {
crate::types::builders::LendingDetectionBuilder::default()
}
}
/// A builder for [`LendingDetection`](crate::types::LendingDetection).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct LendingDetectionBuilder {
pub(crate) text: ::std::option::Option<::std::string::String>,
pub(crate) selection_status: ::std::option::Option<crate::types::SelectionStatus>,
pub(crate) geometry: ::std::option::Option<crate::types::Geometry>,
pub(crate) confidence: ::std::option::Option<f32>,
}
impl LendingDetectionBuilder {
/// <p>The text extracted for a detected value in a lending document.</p>
pub fn text(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.text = ::std::option::Option::Some(input.into());
self
}
/// <p>The text extracted for a detected value in a lending document.</p>
pub fn set_text(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.text = input;
self
}
/// <p>The text extracted for a detected value in a lending document.</p>
pub fn get_text(&self) -> &::std::option::Option<::std::string::String> {
&self.text
}
/// <p>The selection status of a selection element, such as an option button or check box.</p>
pub fn selection_status(mut self, input: crate::types::SelectionStatus) -> Self {
self.selection_status = ::std::option::Option::Some(input);
self
}
/// <p>The selection status of a selection element, such as an option button or check box.</p>
pub fn set_selection_status(mut self, input: ::std::option::Option<crate::types::SelectionStatus>) -> Self {
self.selection_status = input;
self
}
/// <p>The selection status of a selection element, such as an option button or check box.</p>
pub fn get_selection_status(&self) -> &::std::option::Option<crate::types::SelectionStatus> {
&self.selection_status
}
/// <p>Information about where the following items are located on a document page: detected page, text, key-value pairs, tables, table cells, and selection elements.</p>
pub fn geometry(mut self, input: crate::types::Geometry) -> Self {
self.geometry = ::std::option::Option::Some(input);
self
}
/// <p>Information about where the following items are located on a document page: detected page, text, key-value pairs, tables, table cells, and selection elements.</p>
pub fn set_geometry(mut self, input: ::std::option::Option<crate::types::Geometry>) -> Self {
self.geometry = input;
self
}
/// <p>Information about where the following items are located on a document page: detected page, text, key-value pairs, tables, table cells, and selection elements.</p>
pub fn get_geometry(&self) -> &::std::option::Option<crate::types::Geometry> {
&self.geometry
}
/// <p>The confidence level for the text of a detected value in a lending document.</p>
pub fn confidence(mut self, input: f32) -> Self {
self.confidence = ::std::option::Option::Some(input);
self
}
/// <p>The confidence level for the text of a detected value in a lending document.</p>
pub fn set_confidence(mut self, input: ::std::option::Option<f32>) -> Self {
self.confidence = input;
self
}
/// <p>The confidence level for the text of a detected value in a lending document.</p>
pub fn get_confidence(&self) -> &::std::option::Option<f32> {
&self.confidence
}
/// Consumes the builder and constructs a [`LendingDetection`](crate::types::LendingDetection).
pub fn build(self) -> crate::types::LendingDetection {
crate::types::LendingDetection {
text: self.text,
selection_status: self.selection_status,
geometry: self.geometry,
confidence: self.confidence,
}
}
}