blib/lib/Paws/Textract/AnalyzeDocument.pm untested

filter: Statementstmt 0.0% 0 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 14 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::Textract::AnalyzeDocument;
3 use Moose;
4 has Document => (is => 'ro', isa => 'Paws::Textract::Document', required => 1);
5 has FeatureTypes => (is => 'ro', isa => 'ArrayRef[Str|Undef]', required => 1);
6 has HumanLoopConfig => (is => 'ro', isa => 'Paws::Textract::HumanLoopConfig');
7  
8 use MooseX::ClassAttribute;
9  
10 class_has _api_call => (isa => 'Str', is => 'ro', default => 'AnalyzeDocument');
11 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::Textract::AnalyzeDocumentResponse');
12 class_has _result_key => (isa => 'Str', is => 'ro');
13 1;
14  
15 ### main pod documentation begin ###
16  
17 =head1 NAME
18  
19 Paws::Textract::AnalyzeDocument - Arguments for method AnalyzeDocument on L<Paws::Textract>
20  
21 =head1 DESCRIPTION
22  
23 This class represents the parameters used for calling the method AnalyzeDocument on the
24 L<Amazon Textract|Paws::Textract> service. Use the attributes of this class
25 as arguments to method AnalyzeDocument.
26  
27 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to AnalyzeDocument.
28  
29 =head1 SYNOPSIS
30  
31 my $textract = Paws->service('Textract');
32 my $AnalyzeDocumentResponse = $textract->AnalyzeDocument(
33 Document => {
34 Bytes => 'BlobImageBlob', # min: 1, max: 10485760; OPTIONAL
35 S3Object => {
36 Bucket => 'MyS3Bucket', # min: 3, max: 255; OPTIONAL
37 Name => 'MyS3ObjectName', # min: 1, max: 1024; OPTIONAL
38 Version => 'MyS3ObjectVersion', # min: 1, max: 1024; OPTIONAL
39 }, # OPTIONAL
40 },
41 FeatureTypes => [
42 'TABLES', ... # values: TABLES, FORMS
43 ],
44 HumanLoopConfig => {
45 FlowDefinitionArn => 'MyFlowDefinitionArn', # max: 256
46 HumanLoopName => 'MyHumanLoopName', # min: 1, max: 63
47 DataAttributes => {
48 ContentClassifiers => [
49 'FreeOfPersonallyIdentifiableInformation',
50 ... # values: FreeOfPersonallyIdentifiableInformation, FreeOfAdultContent
51 ], # max: 256; OPTIONAL
52 }, # OPTIONAL
53 }, # OPTIONAL
54 );
55  
56 # Results:
57 my $AnalyzeDocumentModelVersion =
58 $AnalyzeDocumentResponse->AnalyzeDocumentModelVersion;
59 my $Blocks = $AnalyzeDocumentResponse->Blocks;
60 my $DocumentMetadata = $AnalyzeDocumentResponse->DocumentMetadata;
61 my $HumanLoopActivationOutput =
62 $AnalyzeDocumentResponse->HumanLoopActivationOutput;
63  
64 # Returns a L<Paws::Textract::AnalyzeDocumentResponse> object.
65  
66 Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
67 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/textract/AnalyzeDocument>
68  
69 =head1 ATTRIBUTES
70  
71  
72 =head2 B<REQUIRED> Document => L<Paws::Textract::Document>
73  
74 The input document as base64-encoded bytes or an Amazon S3 object. If
75 you use the AWS CLI to call Amazon Textract operations, you can't pass
76 image bytes. The document must be an image in JPEG or PNG format.
77  
78 If you're using an AWS SDK to call Amazon Textract, you might not need
79 to base64-encode image bytes that are passed using the C<Bytes> field.
80  
81  
82  
83 =head2 B<REQUIRED> FeatureTypes => ArrayRef[Str|Undef]
84  
85 A list of the types of analysis to perform. Add TABLES to the list to
86 return information about the tables that are detected in the input
87 document. Add FORMS to return detected form data. To perform both types
88 of analysis, add TABLES and FORMS to C<FeatureTypes>. All lines and
89 words detected in the document are included in the response (including
90 text that isn't related to the value of C<FeatureTypes>).
91  
92  
93  
94 =head2 HumanLoopConfig => L<Paws::Textract::HumanLoopConfig>
95  
96 Sets the configuration for the human in the loop workflow for analyzing
97 documents.
98  
99  
100  
101  
102 =head1 SEE ALSO
103  
104 This class forms part of L<Paws>, documenting arguments for method AnalyzeDocument in L<Paws::Textract>
105  
106 =head1 BUGS and CONTRIBUTIONS
107  
108 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
109  
110 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
111  
112 =cut
113