« blib/lib/Paws/Textract/DetectDocumentTextResponse.pm
↑ Summary
blib/lib/Paws/Textract/DocumentLocation.pm »
| 1 | # Generated by default/object.tt | ||
| 2 | package Paws::Textract::Document; | ||
| 3 | use Moose; | ||
| 4 | has Bytes => (is => 'ro', isa => 'Str'); | ||
| 5 | has S3Object => (is => 'ro', isa => 'Paws::Textract::S3Object'); | ||
| 6 | |||
| 7 | 1; | ||
| 8 | |||
| 9 | ### main pod documentation begin ### | ||
| 10 | |||
| 11 | =head1 NAME | ||
| 12 | |||
| 13 | Paws::Textract::Document | ||
| 14 | |||
| 15 | =head1 USAGE | ||
| 16 | |||
| 17 | This class represents one of two things: | ||
| 18 | |||
| 19 | =head3 Arguments in a call to a service | ||
| 20 | |||
| 21 | Use the attributes of this class as arguments to methods. You shouldn't make instances of this class. | ||
| 22 | Each attribute should be used as a named argument in the calls that expect this type of object. | ||
| 23 | |||
| 24 | As an example, if Att1 is expected to be a Paws::Textract::Document object: | ||
| 25 | |||
| 26 | $service_obj->Method(Att1 => { Bytes => $value, ..., S3Object => $value }); | ||
| 27 | |||
| 28 | =head3 Results returned from an API call | ||
| 29 | |||
| 30 | Use accessors for each attribute. If Att1 is expected to be an Paws::Textract::Document object: | ||
| 31 | |||
| 32 | $result = $service_obj->Method(...); | ||
| 33 | $result->Att1->Bytes | ||
| 34 | |||
| 35 | =head1 DESCRIPTION | ||
| 36 | |||
| 37 | The input document, either as bytes or as an S3 object. | ||
| 38 | |||
| 39 | You pass image bytes to an Amazon Textract API operation by using the | ||
| 40 | C<Bytes> property. For example, you would use the C<Bytes> property to | ||
| 41 | pass a document loaded from a local file system. Image bytes passed by | ||
| 42 | using the C<Bytes> property must be base64 encoded. Your code might not | ||
| 43 | need to encode document file bytes if you're using an AWS SDK to call | ||
| 44 | Amazon Textract API operations. | ||
| 45 | |||
| 46 | You pass images stored in an S3 bucket to an Amazon Textract API | ||
| 47 | operation by using the C<S3Object> property. Documents stored in an S3 | ||
| 48 | bucket don't need to be base64 encoded. | ||
| 49 | |||
| 50 | The AWS Region for the S3 bucket that contains the S3 object must match | ||
| 51 | the AWS Region that you use for Amazon Textract operations. | ||
| 52 | |||
| 53 | If you use the AWS CLI to call Amazon Textract operations, passing | ||
| 54 | image bytes using the Bytes property isn't supported. You must first | ||
| 55 | upload the document to an Amazon S3 bucket, and then call the operation | ||
| 56 | using the S3Object property. | ||
| 57 | |||
| 58 | For Amazon Textract to process an S3 object, the user must have | ||
| 59 | permission to access the S3 object. | ||
| 60 | |||
| 61 | =head1 ATTRIBUTES | ||
| 62 | |||
| 63 | |||
| 64 | =head2 Bytes => Str | ||
| 65 | |||
| 66 | A blob of base64-encoded document bytes. The maximum size of a document | ||
| 67 | that's provided in a blob of bytes is 5 MB. The document bytes must be | ||
| 68 | in PNG or JPEG format. | ||
| 69 | |||
| 70 | If you're using an AWS SDK to call Amazon Textract, you might not need | ||
| 71 | to base64-encode image bytes passed using the C<Bytes> field. | ||
| 72 | |||
| 73 | |||
| 74 | =head2 S3Object => L<Paws::Textract::S3Object> | ||
| 75 | |||
| 76 | Identifies an S3 object as the document source. The maximum size of a | ||
| 77 | document that's stored in an S3 bucket is 5 MB. | ||
| 78 | |||
| 79 | |||
| 80 | |||
| 81 | =head1 SEE ALSO | ||
| 82 | |||
| 83 | This class forms part of L<Paws>, describing an object used in L<Paws::Textract> | ||
| 84 | |||
| 85 | =head1 BUGS and CONTRIBUTIONS | ||
| 86 | |||
| 87 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 88 | |||
| 89 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 90 | |||
| 91 | =cut | ||
| 92 |