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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Contains information extracted by an analysis operation after using StartLendingAnalysis.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Extraction {
    /// <p>Holds the structured data returned by AnalyzeDocument for lending documents.</p>
    pub lending_document: ::std::option::Option<crate::types::LendingDocument>,
    /// <p>The structure holding all the information returned by AnalyzeExpense</p>
    pub expense_document: ::std::option::Option<crate::types::ExpenseDocument>,
    /// <p>The structure that lists each document processed in an AnalyzeID operation.</p>
    pub identity_document: ::std::option::Option<crate::types::IdentityDocument>,
}
impl Extraction {
    /// <p>Holds the structured data returned by AnalyzeDocument for lending documents.</p>
    pub fn lending_document(&self) -> ::std::option::Option<&crate::types::LendingDocument> {
        self.lending_document.as_ref()
    }
    /// <p>The structure holding all the information returned by AnalyzeExpense</p>
    pub fn expense_document(&self) -> ::std::option::Option<&crate::types::ExpenseDocument> {
        self.expense_document.as_ref()
    }
    /// <p>The structure that lists each document processed in an AnalyzeID operation.</p>
    pub fn identity_document(&self) -> ::std::option::Option<&crate::types::IdentityDocument> {
        self.identity_document.as_ref()
    }
}
impl Extraction {
    /// Creates a new builder-style object to manufacture [`Extraction`](crate::types::Extraction).
    pub fn builder() -> crate::types::builders::ExtractionBuilder {
        crate::types::builders::ExtractionBuilder::default()
    }
}

/// A builder for [`Extraction`](crate::types::Extraction).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ExtractionBuilder {
    pub(crate) lending_document: ::std::option::Option<crate::types::LendingDocument>,
    pub(crate) expense_document: ::std::option::Option<crate::types::ExpenseDocument>,
    pub(crate) identity_document: ::std::option::Option<crate::types::IdentityDocument>,
}
impl ExtractionBuilder {
    /// <p>Holds the structured data returned by AnalyzeDocument for lending documents.</p>
    pub fn lending_document(mut self, input: crate::types::LendingDocument) -> Self {
        self.lending_document = ::std::option::Option::Some(input);
        self
    }
    /// <p>Holds the structured data returned by AnalyzeDocument for lending documents.</p>
    pub fn set_lending_document(mut self, input: ::std::option::Option<crate::types::LendingDocument>) -> Self {
        self.lending_document = input;
        self
    }
    /// <p>Holds the structured data returned by AnalyzeDocument for lending documents.</p>
    pub fn get_lending_document(&self) -> &::std::option::Option<crate::types::LendingDocument> {
        &self.lending_document
    }
    /// <p>The structure holding all the information returned by AnalyzeExpense</p>
    pub fn expense_document(mut self, input: crate::types::ExpenseDocument) -> Self {
        self.expense_document = ::std::option::Option::Some(input);
        self
    }
    /// <p>The structure holding all the information returned by AnalyzeExpense</p>
    pub fn set_expense_document(mut self, input: ::std::option::Option<crate::types::ExpenseDocument>) -> Self {
        self.expense_document = input;
        self
    }
    /// <p>The structure holding all the information returned by AnalyzeExpense</p>
    pub fn get_expense_document(&self) -> &::std::option::Option<crate::types::ExpenseDocument> {
        &self.expense_document
    }
    /// <p>The structure that lists each document processed in an AnalyzeID operation.</p>
    pub fn identity_document(mut self, input: crate::types::IdentityDocument) -> Self {
        self.identity_document = ::std::option::Option::Some(input);
        self
    }
    /// <p>The structure that lists each document processed in an AnalyzeID operation.</p>
    pub fn set_identity_document(mut self, input: ::std::option::Option<crate::types::IdentityDocument>) -> Self {
        self.identity_document = input;
        self
    }
    /// <p>The structure that lists each document processed in an AnalyzeID operation.</p>
    pub fn get_identity_document(&self) -> &::std::option::Option<crate::types::IdentityDocument> {
        &self.identity_document
    }
    /// Consumes the builder and constructs a [`Extraction`](crate::types::Extraction).
    pub fn build(self) -> crate::types::Extraction {
        crate::types::Extraction {
            lending_document: self.lending_document,
            expense_document: self.expense_document,
            identity_document: self.identity_document,
        }
    }
}