1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package textract 4 5import ( 6 "fmt" 7 8 "github.com/aws/aws-sdk-go/aws" 9 "github.com/aws/aws-sdk-go/aws/awsutil" 10 "github.com/aws/aws-sdk-go/aws/request" 11 "github.com/aws/aws-sdk-go/private/protocol" 12) 13 14const opAnalyzeDocument = "AnalyzeDocument" 15 16// AnalyzeDocumentRequest generates a "aws/request.Request" representing the 17// client's request for the AnalyzeDocument operation. The "output" return 18// value will be populated with the request's response once the request completes 19// successfully. 20// 21// Use "Send" method on the returned Request to send the API call to the service. 22// the "output" return value is not valid until after Send returns without error. 23// 24// See AnalyzeDocument for more information on using the AnalyzeDocument 25// API call, and error handling. 26// 27// This method is useful when you want to inject custom logic or configuration 28// into the SDK's request lifecycle. Such as custom headers, or retry logic. 29// 30// 31// // Example sending a request using the AnalyzeDocumentRequest method. 32// req, resp := client.AnalyzeDocumentRequest(params) 33// 34// err := req.Send() 35// if err == nil { // resp is now filled 36// fmt.Println(resp) 37// } 38// 39// See also, https://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/AnalyzeDocument 40func (c *Textract) AnalyzeDocumentRequest(input *AnalyzeDocumentInput) (req *request.Request, output *AnalyzeDocumentOutput) { 41 op := &request.Operation{ 42 Name: opAnalyzeDocument, 43 HTTPMethod: "POST", 44 HTTPPath: "/", 45 } 46 47 if input == nil { 48 input = &AnalyzeDocumentInput{} 49 } 50 51 output = &AnalyzeDocumentOutput{} 52 req = c.newRequest(op, input, output) 53 return 54} 55 56// AnalyzeDocument API operation for Amazon Textract. 57// 58// Analyzes an input document for relationships between detected items. 59// 60// The types of information returned are as follows: 61// 62// * Form data (key-value pairs). The related information is returned in 63// two Block objects, each of type KEY_VALUE_SET: a KEY Block object and 64// a VALUE Block object. For example, Name: Ana Silva Carolina contains a 65// key and value. Name: is the key. Ana Silva Carolina is the value. 66// 67// * Table and table cell data. A TABLE Block object contains information 68// about a detected table. A CELL Block object is returned for each cell 69// in a table. 70// 71// * Lines and words of text. A LINE Block object contains one or more WORD 72// Block objects. All lines and words that are detected in the document are 73// returned (including text that doesn't have a relationship with the value 74// of FeatureTypes). 75// 76// Selection elements such as check boxes and option buttons (radio buttons) 77// can be detected in form data and in tables. A SELECTION_ELEMENT Block object 78// contains information about a selection element, including the selection status. 79// 80// You can choose which type of analysis to perform by specifying the FeatureTypes 81// list. 82// 83// The output is returned in a list of Block objects. 84// 85// AnalyzeDocument is a synchronous operation. To analyze documents asynchronously, 86// use StartDocumentAnalysis. 87// 88// For more information, see Document Text Analysis (https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html). 89// 90// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 91// with awserr.Error's Code and Message methods to get detailed information about 92// the error. 93// 94// See the AWS API reference guide for Amazon Textract's 95// API operation AnalyzeDocument for usage and error information. 96// 97// Returned Error Types: 98// * InvalidParameterException 99// An input parameter violated a constraint. For example, in synchronous operations, 100// an InvalidParameterException exception occurs when neither of the S3Object 101// or Bytes values are supplied in the Document request parameter. Validate 102// your parameter before calling the API operation again. 103// 104// * InvalidS3ObjectException 105// Amazon Textract is unable to access the S3 object that's specified in the 106// request. for more information, Configure Access to Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) 107// For troubleshooting information, see Troubleshooting Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/troubleshooting.html) 108// 109// * UnsupportedDocumentException 110// The format of the input document isn't supported. Documents for synchronous 111// operations can be in PNG or JPEG format. Documents for asynchronous operations 112// can also be in PDF format. 113// 114// * DocumentTooLargeException 115// The document can't be processed because it's too large. The maximum document 116// size for synchronous operations 10 MB. The maximum document size for asynchronous 117// operations is 500 MB for PDF files. 118// 119// * BadDocumentException 120// Amazon Textract isn't able to read the document. For more information on 121// the document limits in Amazon Textract, see limits. 122// 123// * AccessDeniedException 124// You aren't authorized to perform the action. Use the Amazon Resource Name 125// (ARN) of an authorized user or IAM role to perform the operation. 126// 127// * ProvisionedThroughputExceededException 128// The number of requests exceeded your throughput limit. If you want to increase 129// this limit, contact Amazon Textract. 130// 131// * InternalServerError 132// Amazon Textract experienced a service issue. Try your call again. 133// 134// * ThrottlingException 135// Amazon Textract is temporarily unable to process the request. Try your call 136// again. 137// 138// * HumanLoopQuotaExceededException 139// Indicates you have exceeded the maximum number of active human in the loop 140// workflows available 141// 142// See also, https://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/AnalyzeDocument 143func (c *Textract) AnalyzeDocument(input *AnalyzeDocumentInput) (*AnalyzeDocumentOutput, error) { 144 req, out := c.AnalyzeDocumentRequest(input) 145 return out, req.Send() 146} 147 148// AnalyzeDocumentWithContext is the same as AnalyzeDocument with the addition of 149// the ability to pass a context and additional request options. 150// 151// See AnalyzeDocument for details on how to use this API operation. 152// 153// The context must be non-nil and will be used for request cancellation. If 154// the context is nil a panic will occur. In the future the SDK may create 155// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 156// for more information on using Contexts. 157func (c *Textract) AnalyzeDocumentWithContext(ctx aws.Context, input *AnalyzeDocumentInput, opts ...request.Option) (*AnalyzeDocumentOutput, error) { 158 req, out := c.AnalyzeDocumentRequest(input) 159 req.SetContext(ctx) 160 req.ApplyOptions(opts...) 161 return out, req.Send() 162} 163 164const opAnalyzeExpense = "AnalyzeExpense" 165 166// AnalyzeExpenseRequest generates a "aws/request.Request" representing the 167// client's request for the AnalyzeExpense operation. The "output" return 168// value will be populated with the request's response once the request completes 169// successfully. 170// 171// Use "Send" method on the returned Request to send the API call to the service. 172// the "output" return value is not valid until after Send returns without error. 173// 174// See AnalyzeExpense for more information on using the AnalyzeExpense 175// API call, and error handling. 176// 177// This method is useful when you want to inject custom logic or configuration 178// into the SDK's request lifecycle. Such as custom headers, or retry logic. 179// 180// 181// // Example sending a request using the AnalyzeExpenseRequest method. 182// req, resp := client.AnalyzeExpenseRequest(params) 183// 184// err := req.Send() 185// if err == nil { // resp is now filled 186// fmt.Println(resp) 187// } 188// 189// See also, https://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/AnalyzeExpense 190func (c *Textract) AnalyzeExpenseRequest(input *AnalyzeExpenseInput) (req *request.Request, output *AnalyzeExpenseOutput) { 191 op := &request.Operation{ 192 Name: opAnalyzeExpense, 193 HTTPMethod: "POST", 194 HTTPPath: "/", 195 } 196 197 if input == nil { 198 input = &AnalyzeExpenseInput{} 199 } 200 201 output = &AnalyzeExpenseOutput{} 202 req = c.newRequest(op, input, output) 203 return 204} 205 206// AnalyzeExpense API operation for Amazon Textract. 207// 208// Analyzes an input document for financially related relationships between 209// text. 210// 211// Information is returned as ExpenseDocuments and seperated as follows. 212// 213// * LineItemGroups- A data set containing LineItems which store information 214// about the lines of text, such as an item purchased and its price on a 215// receipt. 216// 217// * SummaryFields- Contains all other information a receipt, such as header 218// information or the vendors name. 219// 220// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 221// with awserr.Error's Code and Message methods to get detailed information about 222// the error. 223// 224// See the AWS API reference guide for Amazon Textract's 225// API operation AnalyzeExpense for usage and error information. 226// 227// Returned Error Types: 228// * InvalidParameterException 229// An input parameter violated a constraint. For example, in synchronous operations, 230// an InvalidParameterException exception occurs when neither of the S3Object 231// or Bytes values are supplied in the Document request parameter. Validate 232// your parameter before calling the API operation again. 233// 234// * InvalidS3ObjectException 235// Amazon Textract is unable to access the S3 object that's specified in the 236// request. for more information, Configure Access to Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) 237// For troubleshooting information, see Troubleshooting Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/troubleshooting.html) 238// 239// * UnsupportedDocumentException 240// The format of the input document isn't supported. Documents for synchronous 241// operations can be in PNG or JPEG format. Documents for asynchronous operations 242// can also be in PDF format. 243// 244// * DocumentTooLargeException 245// The document can't be processed because it's too large. The maximum document 246// size for synchronous operations 10 MB. The maximum document size for asynchronous 247// operations is 500 MB for PDF files. 248// 249// * BadDocumentException 250// Amazon Textract isn't able to read the document. For more information on 251// the document limits in Amazon Textract, see limits. 252// 253// * AccessDeniedException 254// You aren't authorized to perform the action. Use the Amazon Resource Name 255// (ARN) of an authorized user or IAM role to perform the operation. 256// 257// * ProvisionedThroughputExceededException 258// The number of requests exceeded your throughput limit. If you want to increase 259// this limit, contact Amazon Textract. 260// 261// * InternalServerError 262// Amazon Textract experienced a service issue. Try your call again. 263// 264// * ThrottlingException 265// Amazon Textract is temporarily unable to process the request. Try your call 266// again. 267// 268// See also, https://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/AnalyzeExpense 269func (c *Textract) AnalyzeExpense(input *AnalyzeExpenseInput) (*AnalyzeExpenseOutput, error) { 270 req, out := c.AnalyzeExpenseRequest(input) 271 return out, req.Send() 272} 273 274// AnalyzeExpenseWithContext is the same as AnalyzeExpense with the addition of 275// the ability to pass a context and additional request options. 276// 277// See AnalyzeExpense for details on how to use this API operation. 278// 279// The context must be non-nil and will be used for request cancellation. If 280// the context is nil a panic will occur. In the future the SDK may create 281// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 282// for more information on using Contexts. 283func (c *Textract) AnalyzeExpenseWithContext(ctx aws.Context, input *AnalyzeExpenseInput, opts ...request.Option) (*AnalyzeExpenseOutput, error) { 284 req, out := c.AnalyzeExpenseRequest(input) 285 req.SetContext(ctx) 286 req.ApplyOptions(opts...) 287 return out, req.Send() 288} 289 290const opDetectDocumentText = "DetectDocumentText" 291 292// DetectDocumentTextRequest generates a "aws/request.Request" representing the 293// client's request for the DetectDocumentText operation. The "output" return 294// value will be populated with the request's response once the request completes 295// successfully. 296// 297// Use "Send" method on the returned Request to send the API call to the service. 298// the "output" return value is not valid until after Send returns without error. 299// 300// See DetectDocumentText for more information on using the DetectDocumentText 301// API call, and error handling. 302// 303// This method is useful when you want to inject custom logic or configuration 304// into the SDK's request lifecycle. Such as custom headers, or retry logic. 305// 306// 307// // Example sending a request using the DetectDocumentTextRequest method. 308// req, resp := client.DetectDocumentTextRequest(params) 309// 310// err := req.Send() 311// if err == nil { // resp is now filled 312// fmt.Println(resp) 313// } 314// 315// See also, https://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/DetectDocumentText 316func (c *Textract) DetectDocumentTextRequest(input *DetectDocumentTextInput) (req *request.Request, output *DetectDocumentTextOutput) { 317 op := &request.Operation{ 318 Name: opDetectDocumentText, 319 HTTPMethod: "POST", 320 HTTPPath: "/", 321 } 322 323 if input == nil { 324 input = &DetectDocumentTextInput{} 325 } 326 327 output = &DetectDocumentTextOutput{} 328 req = c.newRequest(op, input, output) 329 return 330} 331 332// DetectDocumentText API operation for Amazon Textract. 333// 334// Detects text in the input document. Amazon Textract can detect lines of text 335// and the words that make up a line of text. The input document must be an 336// image in JPEG or PNG format. DetectDocumentText returns the detected text 337// in an array of Block objects. 338// 339// Each document page has as an associated Block of type PAGE. Each PAGE Block 340// object is the parent of LINE Block objects that represent the lines of detected 341// text on a page. A LINE Block object is a parent for each word that makes 342// up the line. Words are represented by Block objects of type WORD. 343// 344// DetectDocumentText is a synchronous operation. To analyze documents asynchronously, 345// use StartDocumentTextDetection. 346// 347// For more information, see Document Text Detection (https://docs.aws.amazon.com/textract/latest/dg/how-it-works-detecting.html). 348// 349// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 350// with awserr.Error's Code and Message methods to get detailed information about 351// the error. 352// 353// See the AWS API reference guide for Amazon Textract's 354// API operation DetectDocumentText for usage and error information. 355// 356// Returned Error Types: 357// * InvalidParameterException 358// An input parameter violated a constraint. For example, in synchronous operations, 359// an InvalidParameterException exception occurs when neither of the S3Object 360// or Bytes values are supplied in the Document request parameter. Validate 361// your parameter before calling the API operation again. 362// 363// * InvalidS3ObjectException 364// Amazon Textract is unable to access the S3 object that's specified in the 365// request. for more information, Configure Access to Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) 366// For troubleshooting information, see Troubleshooting Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/troubleshooting.html) 367// 368// * UnsupportedDocumentException 369// The format of the input document isn't supported. Documents for synchronous 370// operations can be in PNG or JPEG format. Documents for asynchronous operations 371// can also be in PDF format. 372// 373// * DocumentTooLargeException 374// The document can't be processed because it's too large. The maximum document 375// size for synchronous operations 10 MB. The maximum document size for asynchronous 376// operations is 500 MB for PDF files. 377// 378// * BadDocumentException 379// Amazon Textract isn't able to read the document. For more information on 380// the document limits in Amazon Textract, see limits. 381// 382// * AccessDeniedException 383// You aren't authorized to perform the action. Use the Amazon Resource Name 384// (ARN) of an authorized user or IAM role to perform the operation. 385// 386// * ProvisionedThroughputExceededException 387// The number of requests exceeded your throughput limit. If you want to increase 388// this limit, contact Amazon Textract. 389// 390// * InternalServerError 391// Amazon Textract experienced a service issue. Try your call again. 392// 393// * ThrottlingException 394// Amazon Textract is temporarily unable to process the request. Try your call 395// again. 396// 397// See also, https://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/DetectDocumentText 398func (c *Textract) DetectDocumentText(input *DetectDocumentTextInput) (*DetectDocumentTextOutput, error) { 399 req, out := c.DetectDocumentTextRequest(input) 400 return out, req.Send() 401} 402 403// DetectDocumentTextWithContext is the same as DetectDocumentText with the addition of 404// the ability to pass a context and additional request options. 405// 406// See DetectDocumentText for details on how to use this API operation. 407// 408// The context must be non-nil and will be used for request cancellation. If 409// the context is nil a panic will occur. In the future the SDK may create 410// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 411// for more information on using Contexts. 412func (c *Textract) DetectDocumentTextWithContext(ctx aws.Context, input *DetectDocumentTextInput, opts ...request.Option) (*DetectDocumentTextOutput, error) { 413 req, out := c.DetectDocumentTextRequest(input) 414 req.SetContext(ctx) 415 req.ApplyOptions(opts...) 416 return out, req.Send() 417} 418 419const opGetDocumentAnalysis = "GetDocumentAnalysis" 420 421// GetDocumentAnalysisRequest generates a "aws/request.Request" representing the 422// client's request for the GetDocumentAnalysis operation. The "output" return 423// value will be populated with the request's response once the request completes 424// successfully. 425// 426// Use "Send" method on the returned Request to send the API call to the service. 427// the "output" return value is not valid until after Send returns without error. 428// 429// See GetDocumentAnalysis for more information on using the GetDocumentAnalysis 430// API call, and error handling. 431// 432// This method is useful when you want to inject custom logic or configuration 433// into the SDK's request lifecycle. Such as custom headers, or retry logic. 434// 435// 436// // Example sending a request using the GetDocumentAnalysisRequest method. 437// req, resp := client.GetDocumentAnalysisRequest(params) 438// 439// err := req.Send() 440// if err == nil { // resp is now filled 441// fmt.Println(resp) 442// } 443// 444// See also, https://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/GetDocumentAnalysis 445func (c *Textract) GetDocumentAnalysisRequest(input *GetDocumentAnalysisInput) (req *request.Request, output *GetDocumentAnalysisOutput) { 446 op := &request.Operation{ 447 Name: opGetDocumentAnalysis, 448 HTTPMethod: "POST", 449 HTTPPath: "/", 450 } 451 452 if input == nil { 453 input = &GetDocumentAnalysisInput{} 454 } 455 456 output = &GetDocumentAnalysisOutput{} 457 req = c.newRequest(op, input, output) 458 return 459} 460 461// GetDocumentAnalysis API operation for Amazon Textract. 462// 463// Gets the results for an Amazon Textract asynchronous operation that analyzes 464// text in a document. 465// 466// You start asynchronous text analysis by calling StartDocumentAnalysis, which 467// returns a job identifier (JobId). When the text analysis operation finishes, 468// Amazon Textract publishes a completion status to the Amazon Simple Notification 469// Service (Amazon SNS) topic that's registered in the initial call to StartDocumentAnalysis. 470// To get the results of the text-detection operation, first check that the 471// status value published to the Amazon SNS topic is SUCCEEDED. If so, call 472// GetDocumentAnalysis, and pass the job identifier (JobId) from the initial 473// call to StartDocumentAnalysis. 474// 475// GetDocumentAnalysis returns an array of Block objects. The following types 476// of information are returned: 477// 478// * Form data (key-value pairs). The related information is returned in 479// two Block objects, each of type KEY_VALUE_SET: a KEY Block object and 480// a VALUE Block object. For example, Name: Ana Silva Carolina contains a 481// key and value. Name: is the key. Ana Silva Carolina is the value. 482// 483// * Table and table cell data. A TABLE Block object contains information 484// about a detected table. A CELL Block object is returned for each cell 485// in a table. 486// 487// * Lines and words of text. A LINE Block object contains one or more WORD 488// Block objects. All lines and words that are detected in the document are 489// returned (including text that doesn't have a relationship with the value 490// of the StartDocumentAnalysis FeatureTypes input parameter). 491// 492// Selection elements such as check boxes and option buttons (radio buttons) 493// can be detected in form data and in tables. A SELECTION_ELEMENT Block object 494// contains information about a selection element, including the selection status. 495// 496// Use the MaxResults parameter to limit the number of blocks that are returned. 497// If there are more results than specified in MaxResults, the value of NextToken 498// in the operation response contains a pagination token for getting the next 499// set of results. To get the next page of results, call GetDocumentAnalysis, 500// and populate the NextToken request parameter with the token value that's 501// returned from the previous call to GetDocumentAnalysis. 502// 503// For more information, see Document Text Analysis (https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html). 504// 505// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 506// with awserr.Error's Code and Message methods to get detailed information about 507// the error. 508// 509// See the AWS API reference guide for Amazon Textract's 510// API operation GetDocumentAnalysis for usage and error information. 511// 512// Returned Error Types: 513// * InvalidParameterException 514// An input parameter violated a constraint. For example, in synchronous operations, 515// an InvalidParameterException exception occurs when neither of the S3Object 516// or Bytes values are supplied in the Document request parameter. Validate 517// your parameter before calling the API operation again. 518// 519// * AccessDeniedException 520// You aren't authorized to perform the action. Use the Amazon Resource Name 521// (ARN) of an authorized user or IAM role to perform the operation. 522// 523// * ProvisionedThroughputExceededException 524// The number of requests exceeded your throughput limit. If you want to increase 525// this limit, contact Amazon Textract. 526// 527// * InvalidJobIdException 528// An invalid job identifier was passed to GetDocumentAnalysis or to GetDocumentAnalysis. 529// 530// * InternalServerError 531// Amazon Textract experienced a service issue. Try your call again. 532// 533// * ThrottlingException 534// Amazon Textract is temporarily unable to process the request. Try your call 535// again. 536// 537// * InvalidS3ObjectException 538// Amazon Textract is unable to access the S3 object that's specified in the 539// request. for more information, Configure Access to Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) 540// For troubleshooting information, see Troubleshooting Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/troubleshooting.html) 541// 542// * InvalidKMSKeyException 543// Indicates you do not have decrypt permissions with the KMS key entered, or 544// the KMS key was entered incorrectly. 545// 546// See also, https://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/GetDocumentAnalysis 547func (c *Textract) GetDocumentAnalysis(input *GetDocumentAnalysisInput) (*GetDocumentAnalysisOutput, error) { 548 req, out := c.GetDocumentAnalysisRequest(input) 549 return out, req.Send() 550} 551 552// GetDocumentAnalysisWithContext is the same as GetDocumentAnalysis with the addition of 553// the ability to pass a context and additional request options. 554// 555// See GetDocumentAnalysis for details on how to use this API operation. 556// 557// The context must be non-nil and will be used for request cancellation. If 558// the context is nil a panic will occur. In the future the SDK may create 559// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 560// for more information on using Contexts. 561func (c *Textract) GetDocumentAnalysisWithContext(ctx aws.Context, input *GetDocumentAnalysisInput, opts ...request.Option) (*GetDocumentAnalysisOutput, error) { 562 req, out := c.GetDocumentAnalysisRequest(input) 563 req.SetContext(ctx) 564 req.ApplyOptions(opts...) 565 return out, req.Send() 566} 567 568const opGetDocumentTextDetection = "GetDocumentTextDetection" 569 570// GetDocumentTextDetectionRequest generates a "aws/request.Request" representing the 571// client's request for the GetDocumentTextDetection operation. The "output" return 572// value will be populated with the request's response once the request completes 573// successfully. 574// 575// Use "Send" method on the returned Request to send the API call to the service. 576// the "output" return value is not valid until after Send returns without error. 577// 578// See GetDocumentTextDetection for more information on using the GetDocumentTextDetection 579// API call, and error handling. 580// 581// This method is useful when you want to inject custom logic or configuration 582// into the SDK's request lifecycle. Such as custom headers, or retry logic. 583// 584// 585// // Example sending a request using the GetDocumentTextDetectionRequest method. 586// req, resp := client.GetDocumentTextDetectionRequest(params) 587// 588// err := req.Send() 589// if err == nil { // resp is now filled 590// fmt.Println(resp) 591// } 592// 593// See also, https://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/GetDocumentTextDetection 594func (c *Textract) GetDocumentTextDetectionRequest(input *GetDocumentTextDetectionInput) (req *request.Request, output *GetDocumentTextDetectionOutput) { 595 op := &request.Operation{ 596 Name: opGetDocumentTextDetection, 597 HTTPMethod: "POST", 598 HTTPPath: "/", 599 } 600 601 if input == nil { 602 input = &GetDocumentTextDetectionInput{} 603 } 604 605 output = &GetDocumentTextDetectionOutput{} 606 req = c.newRequest(op, input, output) 607 return 608} 609 610// GetDocumentTextDetection API operation for Amazon Textract. 611// 612// Gets the results for an Amazon Textract asynchronous operation that detects 613// text in a document. Amazon Textract can detect lines of text and the words 614// that make up a line of text. 615// 616// You start asynchronous text detection by calling StartDocumentTextDetection, 617// which returns a job identifier (JobId). When the text detection operation 618// finishes, Amazon Textract publishes a completion status to the Amazon Simple 619// Notification Service (Amazon SNS) topic that's registered in the initial 620// call to StartDocumentTextDetection. To get the results of the text-detection 621// operation, first check that the status value published to the Amazon SNS 622// topic is SUCCEEDED. If so, call GetDocumentTextDetection, and pass the job 623// identifier (JobId) from the initial call to StartDocumentTextDetection. 624// 625// GetDocumentTextDetection returns an array of Block objects. 626// 627// Each document page has as an associated Block of type PAGE. Each PAGE Block 628// object is the parent of LINE Block objects that represent the lines of detected 629// text on a page. A LINE Block object is a parent for each word that makes 630// up the line. Words are represented by Block objects of type WORD. 631// 632// Use the MaxResults parameter to limit the number of blocks that are returned. 633// If there are more results than specified in MaxResults, the value of NextToken 634// in the operation response contains a pagination token for getting the next 635// set of results. To get the next page of results, call GetDocumentTextDetection, 636// and populate the NextToken request parameter with the token value that's 637// returned from the previous call to GetDocumentTextDetection. 638// 639// For more information, see Document Text Detection (https://docs.aws.amazon.com/textract/latest/dg/how-it-works-detecting.html). 640// 641// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 642// with awserr.Error's Code and Message methods to get detailed information about 643// the error. 644// 645// See the AWS API reference guide for Amazon Textract's 646// API operation GetDocumentTextDetection for usage and error information. 647// 648// Returned Error Types: 649// * InvalidParameterException 650// An input parameter violated a constraint. For example, in synchronous operations, 651// an InvalidParameterException exception occurs when neither of the S3Object 652// or Bytes values are supplied in the Document request parameter. Validate 653// your parameter before calling the API operation again. 654// 655// * AccessDeniedException 656// You aren't authorized to perform the action. Use the Amazon Resource Name 657// (ARN) of an authorized user or IAM role to perform the operation. 658// 659// * ProvisionedThroughputExceededException 660// The number of requests exceeded your throughput limit. If you want to increase 661// this limit, contact Amazon Textract. 662// 663// * InvalidJobIdException 664// An invalid job identifier was passed to GetDocumentAnalysis or to GetDocumentAnalysis. 665// 666// * InternalServerError 667// Amazon Textract experienced a service issue. Try your call again. 668// 669// * ThrottlingException 670// Amazon Textract is temporarily unable to process the request. Try your call 671// again. 672// 673// * InvalidS3ObjectException 674// Amazon Textract is unable to access the S3 object that's specified in the 675// request. for more information, Configure Access to Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) 676// For troubleshooting information, see Troubleshooting Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/troubleshooting.html) 677// 678// * InvalidKMSKeyException 679// Indicates you do not have decrypt permissions with the KMS key entered, or 680// the KMS key was entered incorrectly. 681// 682// See also, https://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/GetDocumentTextDetection 683func (c *Textract) GetDocumentTextDetection(input *GetDocumentTextDetectionInput) (*GetDocumentTextDetectionOutput, error) { 684 req, out := c.GetDocumentTextDetectionRequest(input) 685 return out, req.Send() 686} 687 688// GetDocumentTextDetectionWithContext is the same as GetDocumentTextDetection with the addition of 689// the ability to pass a context and additional request options. 690// 691// See GetDocumentTextDetection for details on how to use this API operation. 692// 693// The context must be non-nil and will be used for request cancellation. If 694// the context is nil a panic will occur. In the future the SDK may create 695// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 696// for more information on using Contexts. 697func (c *Textract) GetDocumentTextDetectionWithContext(ctx aws.Context, input *GetDocumentTextDetectionInput, opts ...request.Option) (*GetDocumentTextDetectionOutput, error) { 698 req, out := c.GetDocumentTextDetectionRequest(input) 699 req.SetContext(ctx) 700 req.ApplyOptions(opts...) 701 return out, req.Send() 702} 703 704const opStartDocumentAnalysis = "StartDocumentAnalysis" 705 706// StartDocumentAnalysisRequest generates a "aws/request.Request" representing the 707// client's request for the StartDocumentAnalysis operation. The "output" return 708// value will be populated with the request's response once the request completes 709// successfully. 710// 711// Use "Send" method on the returned Request to send the API call to the service. 712// the "output" return value is not valid until after Send returns without error. 713// 714// See StartDocumentAnalysis for more information on using the StartDocumentAnalysis 715// API call, and error handling. 716// 717// This method is useful when you want to inject custom logic or configuration 718// into the SDK's request lifecycle. Such as custom headers, or retry logic. 719// 720// 721// // Example sending a request using the StartDocumentAnalysisRequest method. 722// req, resp := client.StartDocumentAnalysisRequest(params) 723// 724// err := req.Send() 725// if err == nil { // resp is now filled 726// fmt.Println(resp) 727// } 728// 729// See also, https://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/StartDocumentAnalysis 730func (c *Textract) StartDocumentAnalysisRequest(input *StartDocumentAnalysisInput) (req *request.Request, output *StartDocumentAnalysisOutput) { 731 op := &request.Operation{ 732 Name: opStartDocumentAnalysis, 733 HTTPMethod: "POST", 734 HTTPPath: "/", 735 } 736 737 if input == nil { 738 input = &StartDocumentAnalysisInput{} 739 } 740 741 output = &StartDocumentAnalysisOutput{} 742 req = c.newRequest(op, input, output) 743 return 744} 745 746// StartDocumentAnalysis API operation for Amazon Textract. 747// 748// Starts the asynchronous analysis of an input document for relationships between 749// detected items such as key-value pairs, tables, and selection elements. 750// 751// StartDocumentAnalysis can analyze text in documents that are in JPEG, PNG, 752// and PDF format. The documents are stored in an Amazon S3 bucket. Use DocumentLocation 753// to specify the bucket name and file name of the document. 754// 755// StartDocumentAnalysis returns a job identifier (JobId) that you use to get 756// the results of the operation. When text analysis is finished, Amazon Textract 757// publishes a completion status to the Amazon Simple Notification Service (Amazon 758// SNS) topic that you specify in NotificationChannel. To get the results of 759// the text analysis operation, first check that the status value published 760// to the Amazon SNS topic is SUCCEEDED. If so, call GetDocumentAnalysis, and 761// pass the job identifier (JobId) from the initial call to StartDocumentAnalysis. 762// 763// For more information, see Document Text Analysis (https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html). 764// 765// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 766// with awserr.Error's Code and Message methods to get detailed information about 767// the error. 768// 769// See the AWS API reference guide for Amazon Textract's 770// API operation StartDocumentAnalysis for usage and error information. 771// 772// Returned Error Types: 773// * InvalidParameterException 774// An input parameter violated a constraint. For example, in synchronous operations, 775// an InvalidParameterException exception occurs when neither of the S3Object 776// or Bytes values are supplied in the Document request parameter. Validate 777// your parameter before calling the API operation again. 778// 779// * InvalidS3ObjectException 780// Amazon Textract is unable to access the S3 object that's specified in the 781// request. for more information, Configure Access to Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) 782// For troubleshooting information, see Troubleshooting Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/troubleshooting.html) 783// 784// * InvalidKMSKeyException 785// Indicates you do not have decrypt permissions with the KMS key entered, or 786// the KMS key was entered incorrectly. 787// 788// * UnsupportedDocumentException 789// The format of the input document isn't supported. Documents for synchronous 790// operations can be in PNG or JPEG format. Documents for asynchronous operations 791// can also be in PDF format. 792// 793// * DocumentTooLargeException 794// The document can't be processed because it's too large. The maximum document 795// size for synchronous operations 10 MB. The maximum document size for asynchronous 796// operations is 500 MB for PDF files. 797// 798// * BadDocumentException 799// Amazon Textract isn't able to read the document. For more information on 800// the document limits in Amazon Textract, see limits. 801// 802// * AccessDeniedException 803// You aren't authorized to perform the action. Use the Amazon Resource Name 804// (ARN) of an authorized user or IAM role to perform the operation. 805// 806// * ProvisionedThroughputExceededException 807// The number of requests exceeded your throughput limit. If you want to increase 808// this limit, contact Amazon Textract. 809// 810// * InternalServerError 811// Amazon Textract experienced a service issue. Try your call again. 812// 813// * IdempotentParameterMismatchException 814// A ClientRequestToken input parameter was reused with an operation, but at 815// least one of the other input parameters is different from the previous call 816// to the operation. 817// 818// * ThrottlingException 819// Amazon Textract is temporarily unable to process the request. Try your call 820// again. 821// 822// * LimitExceededException 823// An Amazon Textract service limit was exceeded. For example, if you start 824// too many asynchronous jobs concurrently, calls to start operations (StartDocumentTextDetection, 825// for example) raise a LimitExceededException exception (HTTP status code: 826// 400) until the number of concurrently running jobs is below the Amazon Textract 827// service limit. 828// 829// See also, https://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/StartDocumentAnalysis 830func (c *Textract) StartDocumentAnalysis(input *StartDocumentAnalysisInput) (*StartDocumentAnalysisOutput, error) { 831 req, out := c.StartDocumentAnalysisRequest(input) 832 return out, req.Send() 833} 834 835// StartDocumentAnalysisWithContext is the same as StartDocumentAnalysis with the addition of 836// the ability to pass a context and additional request options. 837// 838// See StartDocumentAnalysis for details on how to use this API operation. 839// 840// The context must be non-nil and will be used for request cancellation. If 841// the context is nil a panic will occur. In the future the SDK may create 842// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 843// for more information on using Contexts. 844func (c *Textract) StartDocumentAnalysisWithContext(ctx aws.Context, input *StartDocumentAnalysisInput, opts ...request.Option) (*StartDocumentAnalysisOutput, error) { 845 req, out := c.StartDocumentAnalysisRequest(input) 846 req.SetContext(ctx) 847 req.ApplyOptions(opts...) 848 return out, req.Send() 849} 850 851const opStartDocumentTextDetection = "StartDocumentTextDetection" 852 853// StartDocumentTextDetectionRequest generates a "aws/request.Request" representing the 854// client's request for the StartDocumentTextDetection operation. The "output" return 855// value will be populated with the request's response once the request completes 856// successfully. 857// 858// Use "Send" method on the returned Request to send the API call to the service. 859// the "output" return value is not valid until after Send returns without error. 860// 861// See StartDocumentTextDetection for more information on using the StartDocumentTextDetection 862// API call, and error handling. 863// 864// This method is useful when you want to inject custom logic or configuration 865// into the SDK's request lifecycle. Such as custom headers, or retry logic. 866// 867// 868// // Example sending a request using the StartDocumentTextDetectionRequest method. 869// req, resp := client.StartDocumentTextDetectionRequest(params) 870// 871// err := req.Send() 872// if err == nil { // resp is now filled 873// fmt.Println(resp) 874// } 875// 876// See also, https://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/StartDocumentTextDetection 877func (c *Textract) StartDocumentTextDetectionRequest(input *StartDocumentTextDetectionInput) (req *request.Request, output *StartDocumentTextDetectionOutput) { 878 op := &request.Operation{ 879 Name: opStartDocumentTextDetection, 880 HTTPMethod: "POST", 881 HTTPPath: "/", 882 } 883 884 if input == nil { 885 input = &StartDocumentTextDetectionInput{} 886 } 887 888 output = &StartDocumentTextDetectionOutput{} 889 req = c.newRequest(op, input, output) 890 return 891} 892 893// StartDocumentTextDetection API operation for Amazon Textract. 894// 895// Starts the asynchronous detection of text in a document. Amazon Textract 896// can detect lines of text and the words that make up a line of text. 897// 898// StartDocumentTextDetection can analyze text in documents that are in JPEG, 899// PNG, and PDF format. The documents are stored in an Amazon S3 bucket. Use 900// DocumentLocation to specify the bucket name and file name of the document. 901// 902// StartTextDetection returns a job identifier (JobId) that you use to get the 903// results of the operation. When text detection is finished, Amazon Textract 904// publishes a completion status to the Amazon Simple Notification Service (Amazon 905// SNS) topic that you specify in NotificationChannel. To get the results of 906// the text detection operation, first check that the status value published 907// to the Amazon SNS topic is SUCCEEDED. If so, call GetDocumentTextDetection, 908// and pass the job identifier (JobId) from the initial call to StartDocumentTextDetection. 909// 910// For more information, see Document Text Detection (https://docs.aws.amazon.com/textract/latest/dg/how-it-works-detecting.html). 911// 912// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 913// with awserr.Error's Code and Message methods to get detailed information about 914// the error. 915// 916// See the AWS API reference guide for Amazon Textract's 917// API operation StartDocumentTextDetection for usage and error information. 918// 919// Returned Error Types: 920// * InvalidParameterException 921// An input parameter violated a constraint. For example, in synchronous operations, 922// an InvalidParameterException exception occurs when neither of the S3Object 923// or Bytes values are supplied in the Document request parameter. Validate 924// your parameter before calling the API operation again. 925// 926// * InvalidS3ObjectException 927// Amazon Textract is unable to access the S3 object that's specified in the 928// request. for more information, Configure Access to Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) 929// For troubleshooting information, see Troubleshooting Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/troubleshooting.html) 930// 931// * InvalidKMSKeyException 932// Indicates you do not have decrypt permissions with the KMS key entered, or 933// the KMS key was entered incorrectly. 934// 935// * UnsupportedDocumentException 936// The format of the input document isn't supported. Documents for synchronous 937// operations can be in PNG or JPEG format. Documents for asynchronous operations 938// can also be in PDF format. 939// 940// * DocumentTooLargeException 941// The document can't be processed because it's too large. The maximum document 942// size for synchronous operations 10 MB. The maximum document size for asynchronous 943// operations is 500 MB for PDF files. 944// 945// * BadDocumentException 946// Amazon Textract isn't able to read the document. For more information on 947// the document limits in Amazon Textract, see limits. 948// 949// * AccessDeniedException 950// You aren't authorized to perform the action. Use the Amazon Resource Name 951// (ARN) of an authorized user or IAM role to perform the operation. 952// 953// * ProvisionedThroughputExceededException 954// The number of requests exceeded your throughput limit. If you want to increase 955// this limit, contact Amazon Textract. 956// 957// * InternalServerError 958// Amazon Textract experienced a service issue. Try your call again. 959// 960// * IdempotentParameterMismatchException 961// A ClientRequestToken input parameter was reused with an operation, but at 962// least one of the other input parameters is different from the previous call 963// to the operation. 964// 965// * ThrottlingException 966// Amazon Textract is temporarily unable to process the request. Try your call 967// again. 968// 969// * LimitExceededException 970// An Amazon Textract service limit was exceeded. For example, if you start 971// too many asynchronous jobs concurrently, calls to start operations (StartDocumentTextDetection, 972// for example) raise a LimitExceededException exception (HTTP status code: 973// 400) until the number of concurrently running jobs is below the Amazon Textract 974// service limit. 975// 976// See also, https://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/StartDocumentTextDetection 977func (c *Textract) StartDocumentTextDetection(input *StartDocumentTextDetectionInput) (*StartDocumentTextDetectionOutput, error) { 978 req, out := c.StartDocumentTextDetectionRequest(input) 979 return out, req.Send() 980} 981 982// StartDocumentTextDetectionWithContext is the same as StartDocumentTextDetection with the addition of 983// the ability to pass a context and additional request options. 984// 985// See StartDocumentTextDetection for details on how to use this API operation. 986// 987// The context must be non-nil and will be used for request cancellation. If 988// the context is nil a panic will occur. In the future the SDK may create 989// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 990// for more information on using Contexts. 991func (c *Textract) StartDocumentTextDetectionWithContext(ctx aws.Context, input *StartDocumentTextDetectionInput, opts ...request.Option) (*StartDocumentTextDetectionOutput, error) { 992 req, out := c.StartDocumentTextDetectionRequest(input) 993 req.SetContext(ctx) 994 req.ApplyOptions(opts...) 995 return out, req.Send() 996} 997 998// You aren't authorized to perform the action. Use the Amazon Resource Name 999// (ARN) of an authorized user or IAM role to perform the operation. 1000type AccessDeniedException struct { 1001 _ struct{} `type:"structure"` 1002 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1003 1004 Message_ *string `locationName:"message" type:"string"` 1005} 1006 1007// String returns the string representation 1008func (s AccessDeniedException) String() string { 1009 return awsutil.Prettify(s) 1010} 1011 1012// GoString returns the string representation 1013func (s AccessDeniedException) GoString() string { 1014 return s.String() 1015} 1016 1017func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { 1018 return &AccessDeniedException{ 1019 RespMetadata: v, 1020 } 1021} 1022 1023// Code returns the exception type name. 1024func (s *AccessDeniedException) Code() string { 1025 return "AccessDeniedException" 1026} 1027 1028// Message returns the exception's message. 1029func (s *AccessDeniedException) Message() string { 1030 if s.Message_ != nil { 1031 return *s.Message_ 1032 } 1033 return "" 1034} 1035 1036// OrigErr always returns nil, satisfies awserr.Error interface. 1037func (s *AccessDeniedException) OrigErr() error { 1038 return nil 1039} 1040 1041func (s *AccessDeniedException) Error() string { 1042 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1043} 1044 1045// Status code returns the HTTP status code for the request's response error. 1046func (s *AccessDeniedException) StatusCode() int { 1047 return s.RespMetadata.StatusCode 1048} 1049 1050// RequestID returns the service's response RequestID for request. 1051func (s *AccessDeniedException) RequestID() string { 1052 return s.RespMetadata.RequestID 1053} 1054 1055type AnalyzeDocumentInput struct { 1056 _ struct{} `type:"structure"` 1057 1058 // The input document as base64-encoded bytes or an Amazon S3 object. If you 1059 // use the AWS CLI to call Amazon Textract operations, you can't pass image 1060 // bytes. The document must be an image in JPEG or PNG format. 1061 // 1062 // If you're using an AWS SDK to call Amazon Textract, you might not need to 1063 // base64-encode image bytes that are passed using the Bytes field. 1064 // 1065 // Document is a required field 1066 Document *Document `type:"structure" required:"true"` 1067 1068 // A list of the types of analysis to perform. Add TABLES to the list to return 1069 // information about the tables that are detected in the input document. Add 1070 // FORMS to return detected form data. To perform both types of analysis, add 1071 // TABLES and FORMS to FeatureTypes. All lines and words detected in the document 1072 // are included in the response (including text that isn't related to the value 1073 // of FeatureTypes). 1074 // 1075 // FeatureTypes is a required field 1076 FeatureTypes []*string `type:"list" required:"true"` 1077 1078 // Sets the configuration for the human in the loop workflow for analyzing documents. 1079 HumanLoopConfig *HumanLoopConfig `type:"structure"` 1080} 1081 1082// String returns the string representation 1083func (s AnalyzeDocumentInput) String() string { 1084 return awsutil.Prettify(s) 1085} 1086 1087// GoString returns the string representation 1088func (s AnalyzeDocumentInput) GoString() string { 1089 return s.String() 1090} 1091 1092// Validate inspects the fields of the type to determine if they are valid. 1093func (s *AnalyzeDocumentInput) Validate() error { 1094 invalidParams := request.ErrInvalidParams{Context: "AnalyzeDocumentInput"} 1095 if s.Document == nil { 1096 invalidParams.Add(request.NewErrParamRequired("Document")) 1097 } 1098 if s.FeatureTypes == nil { 1099 invalidParams.Add(request.NewErrParamRequired("FeatureTypes")) 1100 } 1101 if s.Document != nil { 1102 if err := s.Document.Validate(); err != nil { 1103 invalidParams.AddNested("Document", err.(request.ErrInvalidParams)) 1104 } 1105 } 1106 if s.HumanLoopConfig != nil { 1107 if err := s.HumanLoopConfig.Validate(); err != nil { 1108 invalidParams.AddNested("HumanLoopConfig", err.(request.ErrInvalidParams)) 1109 } 1110 } 1111 1112 if invalidParams.Len() > 0 { 1113 return invalidParams 1114 } 1115 return nil 1116} 1117 1118// SetDocument sets the Document field's value. 1119func (s *AnalyzeDocumentInput) SetDocument(v *Document) *AnalyzeDocumentInput { 1120 s.Document = v 1121 return s 1122} 1123 1124// SetFeatureTypes sets the FeatureTypes field's value. 1125func (s *AnalyzeDocumentInput) SetFeatureTypes(v []*string) *AnalyzeDocumentInput { 1126 s.FeatureTypes = v 1127 return s 1128} 1129 1130// SetHumanLoopConfig sets the HumanLoopConfig field's value. 1131func (s *AnalyzeDocumentInput) SetHumanLoopConfig(v *HumanLoopConfig) *AnalyzeDocumentInput { 1132 s.HumanLoopConfig = v 1133 return s 1134} 1135 1136type AnalyzeDocumentOutput struct { 1137 _ struct{} `type:"structure"` 1138 1139 // The version of the model used to analyze the document. 1140 AnalyzeDocumentModelVersion *string `type:"string"` 1141 1142 // The items that are detected and analyzed by AnalyzeDocument. 1143 Blocks []*Block `type:"list"` 1144 1145 // Metadata about the analyzed document. An example is the number of pages. 1146 DocumentMetadata *DocumentMetadata `type:"structure"` 1147 1148 // Shows the results of the human in the loop evaluation. 1149 HumanLoopActivationOutput *HumanLoopActivationOutput `type:"structure"` 1150} 1151 1152// String returns the string representation 1153func (s AnalyzeDocumentOutput) String() string { 1154 return awsutil.Prettify(s) 1155} 1156 1157// GoString returns the string representation 1158func (s AnalyzeDocumentOutput) GoString() string { 1159 return s.String() 1160} 1161 1162// SetAnalyzeDocumentModelVersion sets the AnalyzeDocumentModelVersion field's value. 1163func (s *AnalyzeDocumentOutput) SetAnalyzeDocumentModelVersion(v string) *AnalyzeDocumentOutput { 1164 s.AnalyzeDocumentModelVersion = &v 1165 return s 1166} 1167 1168// SetBlocks sets the Blocks field's value. 1169func (s *AnalyzeDocumentOutput) SetBlocks(v []*Block) *AnalyzeDocumentOutput { 1170 s.Blocks = v 1171 return s 1172} 1173 1174// SetDocumentMetadata sets the DocumentMetadata field's value. 1175func (s *AnalyzeDocumentOutput) SetDocumentMetadata(v *DocumentMetadata) *AnalyzeDocumentOutput { 1176 s.DocumentMetadata = v 1177 return s 1178} 1179 1180// SetHumanLoopActivationOutput sets the HumanLoopActivationOutput field's value. 1181func (s *AnalyzeDocumentOutput) SetHumanLoopActivationOutput(v *HumanLoopActivationOutput) *AnalyzeDocumentOutput { 1182 s.HumanLoopActivationOutput = v 1183 return s 1184} 1185 1186type AnalyzeExpenseInput struct { 1187 _ struct{} `type:"structure"` 1188 1189 // The input document, either as bytes or as an S3 object. 1190 // 1191 // You pass image bytes to an Amazon Textract API operation by using the Bytes 1192 // property. For example, you would use the Bytes property to pass a document 1193 // loaded from a local file system. Image bytes passed by using the Bytes property 1194 // must be base64 encoded. Your code might not need to encode document file 1195 // bytes if you're using an AWS SDK to call Amazon Textract API operations. 1196 // 1197 // You pass images stored in an S3 bucket to an Amazon Textract API operation 1198 // by using the S3Object property. Documents stored in an S3 bucket don't need 1199 // to be base64 encoded. 1200 // 1201 // The AWS Region for the S3 bucket that contains the S3 object must match the 1202 // AWS Region that you use for Amazon Textract operations. 1203 // 1204 // If you use the AWS CLI to call Amazon Textract operations, passing image 1205 // bytes using the Bytes property isn't supported. You must first upload the 1206 // document to an Amazon S3 bucket, and then call the operation using the S3Object 1207 // property. 1208 // 1209 // For Amazon Textract to process an S3 object, the user must have permission 1210 // to access the S3 object. 1211 // 1212 // Document is a required field 1213 Document *Document `type:"structure" required:"true"` 1214} 1215 1216// String returns the string representation 1217func (s AnalyzeExpenseInput) String() string { 1218 return awsutil.Prettify(s) 1219} 1220 1221// GoString returns the string representation 1222func (s AnalyzeExpenseInput) GoString() string { 1223 return s.String() 1224} 1225 1226// Validate inspects the fields of the type to determine if they are valid. 1227func (s *AnalyzeExpenseInput) Validate() error { 1228 invalidParams := request.ErrInvalidParams{Context: "AnalyzeExpenseInput"} 1229 if s.Document == nil { 1230 invalidParams.Add(request.NewErrParamRequired("Document")) 1231 } 1232 if s.Document != nil { 1233 if err := s.Document.Validate(); err != nil { 1234 invalidParams.AddNested("Document", err.(request.ErrInvalidParams)) 1235 } 1236 } 1237 1238 if invalidParams.Len() > 0 { 1239 return invalidParams 1240 } 1241 return nil 1242} 1243 1244// SetDocument sets the Document field's value. 1245func (s *AnalyzeExpenseInput) SetDocument(v *Document) *AnalyzeExpenseInput { 1246 s.Document = v 1247 return s 1248} 1249 1250type AnalyzeExpenseOutput struct { 1251 _ struct{} `type:"structure"` 1252 1253 // Information about the input document. 1254 DocumentMetadata *DocumentMetadata `type:"structure"` 1255 1256 // The expenses detected by Amazon Textract. 1257 ExpenseDocuments []*ExpenseDocument `type:"list"` 1258} 1259 1260// String returns the string representation 1261func (s AnalyzeExpenseOutput) String() string { 1262 return awsutil.Prettify(s) 1263} 1264 1265// GoString returns the string representation 1266func (s AnalyzeExpenseOutput) GoString() string { 1267 return s.String() 1268} 1269 1270// SetDocumentMetadata sets the DocumentMetadata field's value. 1271func (s *AnalyzeExpenseOutput) SetDocumentMetadata(v *DocumentMetadata) *AnalyzeExpenseOutput { 1272 s.DocumentMetadata = v 1273 return s 1274} 1275 1276// SetExpenseDocuments sets the ExpenseDocuments field's value. 1277func (s *AnalyzeExpenseOutput) SetExpenseDocuments(v []*ExpenseDocument) *AnalyzeExpenseOutput { 1278 s.ExpenseDocuments = v 1279 return s 1280} 1281 1282// Amazon Textract isn't able to read the document. For more information on 1283// the document limits in Amazon Textract, see limits. 1284type BadDocumentException struct { 1285 _ struct{} `type:"structure"` 1286 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1287 1288 Message_ *string `locationName:"message" type:"string"` 1289} 1290 1291// String returns the string representation 1292func (s BadDocumentException) String() string { 1293 return awsutil.Prettify(s) 1294} 1295 1296// GoString returns the string representation 1297func (s BadDocumentException) GoString() string { 1298 return s.String() 1299} 1300 1301func newErrorBadDocumentException(v protocol.ResponseMetadata) error { 1302 return &BadDocumentException{ 1303 RespMetadata: v, 1304 } 1305} 1306 1307// Code returns the exception type name. 1308func (s *BadDocumentException) Code() string { 1309 return "BadDocumentException" 1310} 1311 1312// Message returns the exception's message. 1313func (s *BadDocumentException) Message() string { 1314 if s.Message_ != nil { 1315 return *s.Message_ 1316 } 1317 return "" 1318} 1319 1320// OrigErr always returns nil, satisfies awserr.Error interface. 1321func (s *BadDocumentException) OrigErr() error { 1322 return nil 1323} 1324 1325func (s *BadDocumentException) Error() string { 1326 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1327} 1328 1329// Status code returns the HTTP status code for the request's response error. 1330func (s *BadDocumentException) StatusCode() int { 1331 return s.RespMetadata.StatusCode 1332} 1333 1334// RequestID returns the service's response RequestID for request. 1335func (s *BadDocumentException) RequestID() string { 1336 return s.RespMetadata.RequestID 1337} 1338 1339// A Block represents items that are recognized in a document within a group 1340// of pixels close to each other. The information returned in a Block object 1341// depends on the type of operation. In text detection for documents (for example 1342// DetectDocumentText), you get information about the detected words and lines 1343// of text. In text analysis (for example AnalyzeDocument), you can also get 1344// information about the fields, tables, and selection elements that are detected 1345// in the document. 1346// 1347// An array of Block objects is returned by both synchronous and asynchronous 1348// operations. In synchronous operations, such as DetectDocumentText, the array 1349// of Block objects is the entire set of results. In asynchronous operations, 1350// such as GetDocumentAnalysis, the array is returned over one or more responses. 1351// 1352// For more information, see How Amazon Textract Works (https://docs.aws.amazon.com/textract/latest/dg/how-it-works.html). 1353type Block struct { 1354 _ struct{} `type:"structure"` 1355 1356 // The type of text item that's recognized. In operations for text detection, 1357 // the following types are returned: 1358 // 1359 // * PAGE - Contains a list of the LINE Block objects that are detected on 1360 // a document page. 1361 // 1362 // * WORD - A word detected on a document page. A word is one or more ISO 1363 // basic Latin script characters that aren't separated by spaces. 1364 // 1365 // * LINE - A string of tab-delimited, contiguous words that are detected 1366 // on a document page. 1367 // 1368 // In text analysis operations, the following types are returned: 1369 // 1370 // * PAGE - Contains a list of child Block objects that are detected on a 1371 // document page. 1372 // 1373 // * KEY_VALUE_SET - Stores the KEY and VALUE Block objects for linked text 1374 // that's detected on a document page. Use the EntityType field to determine 1375 // if a KEY_VALUE_SET object is a KEY Block object or a VALUE Block object. 1376 // 1377 // * WORD - A word that's detected on a document page. A word is one or more 1378 // ISO basic Latin script characters that aren't separated by spaces. 1379 // 1380 // * LINE - A string of tab-delimited, contiguous words that are detected 1381 // on a document page. 1382 // 1383 // * TABLE - A table that's detected on a document page. A table is grid-based 1384 // information with two or more rows or columns, with a cell span of one 1385 // row and one column each. 1386 // 1387 // * CELL - A cell within a detected table. The cell is the parent of the 1388 // block that contains the text in the cell. 1389 // 1390 // * SELECTION_ELEMENT - A selection element such as an option button (radio 1391 // button) or a check box that's detected on a document page. Use the value 1392 // of SelectionStatus to determine the status of the selection element. 1393 BlockType *string `type:"string" enum:"BlockType"` 1394 1395 // The column in which a table cell appears. The first column position is 1. 1396 // ColumnIndex isn't returned by DetectDocumentText and GetDocumentTextDetection. 1397 ColumnIndex *int64 `type:"integer"` 1398 1399 // The number of columns that a table cell spans. Currently this value is always 1400 // 1, even if the number of columns spanned is greater than 1. ColumnSpan isn't 1401 // returned by DetectDocumentText and GetDocumentTextDetection. 1402 ColumnSpan *int64 `type:"integer"` 1403 1404 // The confidence score that Amazon Textract has in the accuracy of the recognized 1405 // text and the accuracy of the geometry points around the recognized text. 1406 Confidence *float64 `type:"float"` 1407 1408 // The type of entity. The following can be returned: 1409 // 1410 // * KEY - An identifier for a field on the document. 1411 // 1412 // * VALUE - The field text. 1413 // 1414 // EntityTypes isn't returned by DetectDocumentText and GetDocumentTextDetection. 1415 EntityTypes []*string `type:"list"` 1416 1417 // The location of the recognized text on the image. It includes an axis-aligned, 1418 // coarse bounding box that surrounds the text, and a finer-grain polygon for 1419 // more accurate spatial information. 1420 Geometry *Geometry `type:"structure"` 1421 1422 // The identifier for the recognized text. The identifier is only unique for 1423 // a single operation. 1424 Id *string `type:"string"` 1425 1426 // The page on which a block was detected. Page is returned by asynchronous 1427 // operations. Page values greater than 1 are only returned for multipage documents 1428 // that are in PDF format. A scanned image (JPEG/PNG), even if it contains multiple 1429 // document pages, is considered to be a single-page document. The value of 1430 // Page is always 1. Synchronous operations don't return Page because every 1431 // input document is considered to be a single-page document. 1432 Page *int64 `type:"integer"` 1433 1434 // A list of child blocks of the current block. For example, a LINE object has 1435 // child blocks for each WORD block that's part of the line of text. There aren't 1436 // Relationship objects in the list for relationships that don't exist, such 1437 // as when the current block has no child blocks. The list size can be the following: 1438 // 1439 // * 0 - The block has no child blocks. 1440 // 1441 // * 1 - The block has child blocks. 1442 Relationships []*Relationship `type:"list"` 1443 1444 // The row in which a table cell is located. The first row position is 1. RowIndex 1445 // isn't returned by DetectDocumentText and GetDocumentTextDetection. 1446 RowIndex *int64 `type:"integer"` 1447 1448 // The number of rows that a table cell spans. Currently this value is always 1449 // 1, even if the number of rows spanned is greater than 1. RowSpan isn't returned 1450 // by DetectDocumentText and GetDocumentTextDetection. 1451 RowSpan *int64 `type:"integer"` 1452 1453 // The selection status of a selection element, such as an option button or 1454 // check box. 1455 SelectionStatus *string `type:"string" enum:"SelectionStatus"` 1456 1457 // The word or line of text that's recognized by Amazon Textract. 1458 Text *string `type:"string"` 1459 1460 // The kind of text that Amazon Textract has detected. Can check for handwritten 1461 // text and printed text. 1462 TextType *string `type:"string" enum:"TextType"` 1463} 1464 1465// String returns the string representation 1466func (s Block) String() string { 1467 return awsutil.Prettify(s) 1468} 1469 1470// GoString returns the string representation 1471func (s Block) GoString() string { 1472 return s.String() 1473} 1474 1475// SetBlockType sets the BlockType field's value. 1476func (s *Block) SetBlockType(v string) *Block { 1477 s.BlockType = &v 1478 return s 1479} 1480 1481// SetColumnIndex sets the ColumnIndex field's value. 1482func (s *Block) SetColumnIndex(v int64) *Block { 1483 s.ColumnIndex = &v 1484 return s 1485} 1486 1487// SetColumnSpan sets the ColumnSpan field's value. 1488func (s *Block) SetColumnSpan(v int64) *Block { 1489 s.ColumnSpan = &v 1490 return s 1491} 1492 1493// SetConfidence sets the Confidence field's value. 1494func (s *Block) SetConfidence(v float64) *Block { 1495 s.Confidence = &v 1496 return s 1497} 1498 1499// SetEntityTypes sets the EntityTypes field's value. 1500func (s *Block) SetEntityTypes(v []*string) *Block { 1501 s.EntityTypes = v 1502 return s 1503} 1504 1505// SetGeometry sets the Geometry field's value. 1506func (s *Block) SetGeometry(v *Geometry) *Block { 1507 s.Geometry = v 1508 return s 1509} 1510 1511// SetId sets the Id field's value. 1512func (s *Block) SetId(v string) *Block { 1513 s.Id = &v 1514 return s 1515} 1516 1517// SetPage sets the Page field's value. 1518func (s *Block) SetPage(v int64) *Block { 1519 s.Page = &v 1520 return s 1521} 1522 1523// SetRelationships sets the Relationships field's value. 1524func (s *Block) SetRelationships(v []*Relationship) *Block { 1525 s.Relationships = v 1526 return s 1527} 1528 1529// SetRowIndex sets the RowIndex field's value. 1530func (s *Block) SetRowIndex(v int64) *Block { 1531 s.RowIndex = &v 1532 return s 1533} 1534 1535// SetRowSpan sets the RowSpan field's value. 1536func (s *Block) SetRowSpan(v int64) *Block { 1537 s.RowSpan = &v 1538 return s 1539} 1540 1541// SetSelectionStatus sets the SelectionStatus field's value. 1542func (s *Block) SetSelectionStatus(v string) *Block { 1543 s.SelectionStatus = &v 1544 return s 1545} 1546 1547// SetText sets the Text field's value. 1548func (s *Block) SetText(v string) *Block { 1549 s.Text = &v 1550 return s 1551} 1552 1553// SetTextType sets the TextType field's value. 1554func (s *Block) SetTextType(v string) *Block { 1555 s.TextType = &v 1556 return s 1557} 1558 1559// The bounding box around the detected page, text, key-value pair, table, table 1560// cell, or selection element on a document page. The left (x-coordinate) and 1561// top (y-coordinate) are coordinates that represent the top and left sides 1562// of the bounding box. Note that the upper-left corner of the image is the 1563// origin (0,0). 1564// 1565// The top and left values returned are ratios of the overall document page 1566// size. For example, if the input image is 700 x 200 pixels, and the top-left 1567// coordinate of the bounding box is 350 x 50 pixels, the API returns a left 1568// value of 0.5 (350/700) and a top value of 0.25 (50/200). 1569// 1570// The width and height values represent the dimensions of the bounding box 1571// as a ratio of the overall document page dimension. For example, if the document 1572// page size is 700 x 200 pixels, and the bounding box width is 70 pixels, the 1573// width returned is 0.1. 1574type BoundingBox struct { 1575 _ struct{} `type:"structure"` 1576 1577 // The height of the bounding box as a ratio of the overall document page height. 1578 Height *float64 `type:"float"` 1579 1580 // The left coordinate of the bounding box as a ratio of overall document page 1581 // width. 1582 Left *float64 `type:"float"` 1583 1584 // The top coordinate of the bounding box as a ratio of overall document page 1585 // height. 1586 Top *float64 `type:"float"` 1587 1588 // The width of the bounding box as a ratio of the overall document page width. 1589 Width *float64 `type:"float"` 1590} 1591 1592// String returns the string representation 1593func (s BoundingBox) String() string { 1594 return awsutil.Prettify(s) 1595} 1596 1597// GoString returns the string representation 1598func (s BoundingBox) GoString() string { 1599 return s.String() 1600} 1601 1602// SetHeight sets the Height field's value. 1603func (s *BoundingBox) SetHeight(v float64) *BoundingBox { 1604 s.Height = &v 1605 return s 1606} 1607 1608// SetLeft sets the Left field's value. 1609func (s *BoundingBox) SetLeft(v float64) *BoundingBox { 1610 s.Left = &v 1611 return s 1612} 1613 1614// SetTop sets the Top field's value. 1615func (s *BoundingBox) SetTop(v float64) *BoundingBox { 1616 s.Top = &v 1617 return s 1618} 1619 1620// SetWidth sets the Width field's value. 1621func (s *BoundingBox) SetWidth(v float64) *BoundingBox { 1622 s.Width = &v 1623 return s 1624} 1625 1626type DetectDocumentTextInput struct { 1627 _ struct{} `type:"structure"` 1628 1629 // The input document as base64-encoded bytes or an Amazon S3 object. If you 1630 // use the AWS CLI to call Amazon Textract operations, you can't pass image 1631 // bytes. The document must be an image in JPEG or PNG format. 1632 // 1633 // If you're using an AWS SDK to call Amazon Textract, you might not need to 1634 // base64-encode image bytes that are passed using the Bytes field. 1635 // 1636 // Document is a required field 1637 Document *Document `type:"structure" required:"true"` 1638} 1639 1640// String returns the string representation 1641func (s DetectDocumentTextInput) String() string { 1642 return awsutil.Prettify(s) 1643} 1644 1645// GoString returns the string representation 1646func (s DetectDocumentTextInput) GoString() string { 1647 return s.String() 1648} 1649 1650// Validate inspects the fields of the type to determine if they are valid. 1651func (s *DetectDocumentTextInput) Validate() error { 1652 invalidParams := request.ErrInvalidParams{Context: "DetectDocumentTextInput"} 1653 if s.Document == nil { 1654 invalidParams.Add(request.NewErrParamRequired("Document")) 1655 } 1656 if s.Document != nil { 1657 if err := s.Document.Validate(); err != nil { 1658 invalidParams.AddNested("Document", err.(request.ErrInvalidParams)) 1659 } 1660 } 1661 1662 if invalidParams.Len() > 0 { 1663 return invalidParams 1664 } 1665 return nil 1666} 1667 1668// SetDocument sets the Document field's value. 1669func (s *DetectDocumentTextInput) SetDocument(v *Document) *DetectDocumentTextInput { 1670 s.Document = v 1671 return s 1672} 1673 1674type DetectDocumentTextOutput struct { 1675 _ struct{} `type:"structure"` 1676 1677 // An array of Block objects that contain the text that's detected in the document. 1678 Blocks []*Block `type:"list"` 1679 1680 DetectDocumentTextModelVersion *string `type:"string"` 1681 1682 // Metadata about the document. It contains the number of pages that are detected 1683 // in the document. 1684 DocumentMetadata *DocumentMetadata `type:"structure"` 1685} 1686 1687// String returns the string representation 1688func (s DetectDocumentTextOutput) String() string { 1689 return awsutil.Prettify(s) 1690} 1691 1692// GoString returns the string representation 1693func (s DetectDocumentTextOutput) GoString() string { 1694 return s.String() 1695} 1696 1697// SetBlocks sets the Blocks field's value. 1698func (s *DetectDocumentTextOutput) SetBlocks(v []*Block) *DetectDocumentTextOutput { 1699 s.Blocks = v 1700 return s 1701} 1702 1703// SetDetectDocumentTextModelVersion sets the DetectDocumentTextModelVersion field's value. 1704func (s *DetectDocumentTextOutput) SetDetectDocumentTextModelVersion(v string) *DetectDocumentTextOutput { 1705 s.DetectDocumentTextModelVersion = &v 1706 return s 1707} 1708 1709// SetDocumentMetadata sets the DocumentMetadata field's value. 1710func (s *DetectDocumentTextOutput) SetDocumentMetadata(v *DocumentMetadata) *DetectDocumentTextOutput { 1711 s.DocumentMetadata = v 1712 return s 1713} 1714 1715// The input document, either as bytes or as an S3 object. 1716// 1717// You pass image bytes to an Amazon Textract API operation by using the Bytes 1718// property. For example, you would use the Bytes property to pass a document 1719// loaded from a local file system. Image bytes passed by using the Bytes property 1720// must be base64 encoded. Your code might not need to encode document file 1721// bytes if you're using an AWS SDK to call Amazon Textract API operations. 1722// 1723// You pass images stored in an S3 bucket to an Amazon Textract API operation 1724// by using the S3Object property. Documents stored in an S3 bucket don't need 1725// to be base64 encoded. 1726// 1727// The AWS Region for the S3 bucket that contains the S3 object must match the 1728// AWS Region that you use for Amazon Textract operations. 1729// 1730// If you use the AWS CLI to call Amazon Textract operations, passing image 1731// bytes using the Bytes property isn't supported. You must first upload the 1732// document to an Amazon S3 bucket, and then call the operation using the S3Object 1733// property. 1734// 1735// For Amazon Textract to process an S3 object, the user must have permission 1736// to access the S3 object. 1737type Document struct { 1738 _ struct{} `type:"structure"` 1739 1740 // A blob of base64-encoded document bytes. The maximum size of a document that's 1741 // provided in a blob of bytes is 5 MB. The document bytes must be in PNG or 1742 // JPEG format. 1743 // 1744 // If you're using an AWS SDK to call Amazon Textract, you might not need to 1745 // base64-encode image bytes passed using the Bytes field. 1746 // 1747 // Bytes is automatically base64 encoded/decoded by the SDK. 1748 Bytes []byte `min:"1" type:"blob"` 1749 1750 // Identifies an S3 object as the document source. The maximum size of a document 1751 // that's stored in an S3 bucket is 5 MB. 1752 S3Object *S3Object `type:"structure"` 1753} 1754 1755// String returns the string representation 1756func (s Document) String() string { 1757 return awsutil.Prettify(s) 1758} 1759 1760// GoString returns the string representation 1761func (s Document) GoString() string { 1762 return s.String() 1763} 1764 1765// Validate inspects the fields of the type to determine if they are valid. 1766func (s *Document) Validate() error { 1767 invalidParams := request.ErrInvalidParams{Context: "Document"} 1768 if s.Bytes != nil && len(s.Bytes) < 1 { 1769 invalidParams.Add(request.NewErrParamMinLen("Bytes", 1)) 1770 } 1771 if s.S3Object != nil { 1772 if err := s.S3Object.Validate(); err != nil { 1773 invalidParams.AddNested("S3Object", err.(request.ErrInvalidParams)) 1774 } 1775 } 1776 1777 if invalidParams.Len() > 0 { 1778 return invalidParams 1779 } 1780 return nil 1781} 1782 1783// SetBytes sets the Bytes field's value. 1784func (s *Document) SetBytes(v []byte) *Document { 1785 s.Bytes = v 1786 return s 1787} 1788 1789// SetS3Object sets the S3Object field's value. 1790func (s *Document) SetS3Object(v *S3Object) *Document { 1791 s.S3Object = v 1792 return s 1793} 1794 1795// The Amazon S3 bucket that contains the document to be processed. It's used 1796// by asynchronous operations such as StartDocumentTextDetection. 1797// 1798// The input document can be an image file in JPEG or PNG format. It can also 1799// be a file in PDF format. 1800type DocumentLocation struct { 1801 _ struct{} `type:"structure"` 1802 1803 // The Amazon S3 bucket that contains the input document. 1804 S3Object *S3Object `type:"structure"` 1805} 1806 1807// String returns the string representation 1808func (s DocumentLocation) String() string { 1809 return awsutil.Prettify(s) 1810} 1811 1812// GoString returns the string representation 1813func (s DocumentLocation) GoString() string { 1814 return s.String() 1815} 1816 1817// Validate inspects the fields of the type to determine if they are valid. 1818func (s *DocumentLocation) Validate() error { 1819 invalidParams := request.ErrInvalidParams{Context: "DocumentLocation"} 1820 if s.S3Object != nil { 1821 if err := s.S3Object.Validate(); err != nil { 1822 invalidParams.AddNested("S3Object", err.(request.ErrInvalidParams)) 1823 } 1824 } 1825 1826 if invalidParams.Len() > 0 { 1827 return invalidParams 1828 } 1829 return nil 1830} 1831 1832// SetS3Object sets the S3Object field's value. 1833func (s *DocumentLocation) SetS3Object(v *S3Object) *DocumentLocation { 1834 s.S3Object = v 1835 return s 1836} 1837 1838// Information about the input document. 1839type DocumentMetadata struct { 1840 _ struct{} `type:"structure"` 1841 1842 // The number of pages that are detected in the document. 1843 Pages *int64 `type:"integer"` 1844} 1845 1846// String returns the string representation 1847func (s DocumentMetadata) String() string { 1848 return awsutil.Prettify(s) 1849} 1850 1851// GoString returns the string representation 1852func (s DocumentMetadata) GoString() string { 1853 return s.String() 1854} 1855 1856// SetPages sets the Pages field's value. 1857func (s *DocumentMetadata) SetPages(v int64) *DocumentMetadata { 1858 s.Pages = &v 1859 return s 1860} 1861 1862// The document can't be processed because it's too large. The maximum document 1863// size for synchronous operations 10 MB. The maximum document size for asynchronous 1864// operations is 500 MB for PDF files. 1865type DocumentTooLargeException struct { 1866 _ struct{} `type:"structure"` 1867 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1868 1869 Message_ *string `locationName:"message" type:"string"` 1870} 1871 1872// String returns the string representation 1873func (s DocumentTooLargeException) String() string { 1874 return awsutil.Prettify(s) 1875} 1876 1877// GoString returns the string representation 1878func (s DocumentTooLargeException) GoString() string { 1879 return s.String() 1880} 1881 1882func newErrorDocumentTooLargeException(v protocol.ResponseMetadata) error { 1883 return &DocumentTooLargeException{ 1884 RespMetadata: v, 1885 } 1886} 1887 1888// Code returns the exception type name. 1889func (s *DocumentTooLargeException) Code() string { 1890 return "DocumentTooLargeException" 1891} 1892 1893// Message returns the exception's message. 1894func (s *DocumentTooLargeException) Message() string { 1895 if s.Message_ != nil { 1896 return *s.Message_ 1897 } 1898 return "" 1899} 1900 1901// OrigErr always returns nil, satisfies awserr.Error interface. 1902func (s *DocumentTooLargeException) OrigErr() error { 1903 return nil 1904} 1905 1906func (s *DocumentTooLargeException) Error() string { 1907 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1908} 1909 1910// Status code returns the HTTP status code for the request's response error. 1911func (s *DocumentTooLargeException) StatusCode() int { 1912 return s.RespMetadata.StatusCode 1913} 1914 1915// RequestID returns the service's response RequestID for request. 1916func (s *DocumentTooLargeException) RequestID() string { 1917 return s.RespMetadata.RequestID 1918} 1919 1920// An object used to store information about the Value or Label detected by 1921// Amazon Textract. 1922type ExpenseDetection struct { 1923 _ struct{} `type:"structure"` 1924 1925 // The confidence in detection, as a percentage 1926 Confidence *float64 `type:"float"` 1927 1928 // Information about where the following items are located on a document page: 1929 // detected page, text, key-value pairs, tables, table cells, and selection 1930 // elements. 1931 Geometry *Geometry `type:"structure"` 1932 1933 // The word or line of text recognized by Amazon Textract 1934 Text *string `type:"string"` 1935} 1936 1937// String returns the string representation 1938func (s ExpenseDetection) String() string { 1939 return awsutil.Prettify(s) 1940} 1941 1942// GoString returns the string representation 1943func (s ExpenseDetection) GoString() string { 1944 return s.String() 1945} 1946 1947// SetConfidence sets the Confidence field's value. 1948func (s *ExpenseDetection) SetConfidence(v float64) *ExpenseDetection { 1949 s.Confidence = &v 1950 return s 1951} 1952 1953// SetGeometry sets the Geometry field's value. 1954func (s *ExpenseDetection) SetGeometry(v *Geometry) *ExpenseDetection { 1955 s.Geometry = v 1956 return s 1957} 1958 1959// SetText sets the Text field's value. 1960func (s *ExpenseDetection) SetText(v string) *ExpenseDetection { 1961 s.Text = &v 1962 return s 1963} 1964 1965// The structure holding all the information returned by AnalyzeExpense 1966type ExpenseDocument struct { 1967 _ struct{} `type:"structure"` 1968 1969 // Denotes which invoice or receipt in the document the information is coming 1970 // from. First document will be 1, the second 2, and so on. 1971 ExpenseIndex *int64 `type:"integer"` 1972 1973 // Information detected on each table of a document, seperated into LineItems. 1974 LineItemGroups []*LineItemGroup `type:"list"` 1975 1976 // Any information found outside of a table by Amazon Textract. 1977 SummaryFields []*ExpenseField `type:"list"` 1978} 1979 1980// String returns the string representation 1981func (s ExpenseDocument) String() string { 1982 return awsutil.Prettify(s) 1983} 1984 1985// GoString returns the string representation 1986func (s ExpenseDocument) GoString() string { 1987 return s.String() 1988} 1989 1990// SetExpenseIndex sets the ExpenseIndex field's value. 1991func (s *ExpenseDocument) SetExpenseIndex(v int64) *ExpenseDocument { 1992 s.ExpenseIndex = &v 1993 return s 1994} 1995 1996// SetLineItemGroups sets the LineItemGroups field's value. 1997func (s *ExpenseDocument) SetLineItemGroups(v []*LineItemGroup) *ExpenseDocument { 1998 s.LineItemGroups = v 1999 return s 2000} 2001 2002// SetSummaryFields sets the SummaryFields field's value. 2003func (s *ExpenseDocument) SetSummaryFields(v []*ExpenseField) *ExpenseDocument { 2004 s.SummaryFields = v 2005 return s 2006} 2007 2008// Breakdown of detected information, seperated into the catagories Type, LableDetection, 2009// and ValueDetection 2010type ExpenseField struct { 2011 _ struct{} `type:"structure"` 2012 2013 // The explicitly stated label of a detected element. 2014 LabelDetection *ExpenseDetection `type:"structure"` 2015 2016 // The page number the value was detected on. 2017 PageNumber *int64 `type:"integer"` 2018 2019 // The implied label of a detected element. Present alongside LabelDetection 2020 // for explicit elements. 2021 Type *ExpenseType `type:"structure"` 2022 2023 // The value of a detected element. Present in explicit and implicit elements. 2024 ValueDetection *ExpenseDetection `type:"structure"` 2025} 2026 2027// String returns the string representation 2028func (s ExpenseField) String() string { 2029 return awsutil.Prettify(s) 2030} 2031 2032// GoString returns the string representation 2033func (s ExpenseField) GoString() string { 2034 return s.String() 2035} 2036 2037// SetLabelDetection sets the LabelDetection field's value. 2038func (s *ExpenseField) SetLabelDetection(v *ExpenseDetection) *ExpenseField { 2039 s.LabelDetection = v 2040 return s 2041} 2042 2043// SetPageNumber sets the PageNumber field's value. 2044func (s *ExpenseField) SetPageNumber(v int64) *ExpenseField { 2045 s.PageNumber = &v 2046 return s 2047} 2048 2049// SetType sets the Type field's value. 2050func (s *ExpenseField) SetType(v *ExpenseType) *ExpenseField { 2051 s.Type = v 2052 return s 2053} 2054 2055// SetValueDetection sets the ValueDetection field's value. 2056func (s *ExpenseField) SetValueDetection(v *ExpenseDetection) *ExpenseField { 2057 s.ValueDetection = v 2058 return s 2059} 2060 2061// An object used to store information about the Type detected by Amazon Textract. 2062type ExpenseType struct { 2063 _ struct{} `type:"structure"` 2064 2065 // The confidence of accuracy, as a percentage. 2066 Confidence *float64 `type:"float"` 2067 2068 // The word or line of text detected by Amazon Textract. 2069 Text *string `type:"string"` 2070} 2071 2072// String returns the string representation 2073func (s ExpenseType) String() string { 2074 return awsutil.Prettify(s) 2075} 2076 2077// GoString returns the string representation 2078func (s ExpenseType) GoString() string { 2079 return s.String() 2080} 2081 2082// SetConfidence sets the Confidence field's value. 2083func (s *ExpenseType) SetConfidence(v float64) *ExpenseType { 2084 s.Confidence = &v 2085 return s 2086} 2087 2088// SetText sets the Text field's value. 2089func (s *ExpenseType) SetText(v string) *ExpenseType { 2090 s.Text = &v 2091 return s 2092} 2093 2094// Information about where the following items are located on a document page: 2095// detected page, text, key-value pairs, tables, table cells, and selection 2096// elements. 2097type Geometry struct { 2098 _ struct{} `type:"structure"` 2099 2100 // An axis-aligned coarse representation of the location of the recognized item 2101 // on the document page. 2102 BoundingBox *BoundingBox `type:"structure"` 2103 2104 // Within the bounding box, a fine-grained polygon around the recognized item. 2105 Polygon []*Point `type:"list"` 2106} 2107 2108// String returns the string representation 2109func (s Geometry) String() string { 2110 return awsutil.Prettify(s) 2111} 2112 2113// GoString returns the string representation 2114func (s Geometry) GoString() string { 2115 return s.String() 2116} 2117 2118// SetBoundingBox sets the BoundingBox field's value. 2119func (s *Geometry) SetBoundingBox(v *BoundingBox) *Geometry { 2120 s.BoundingBox = v 2121 return s 2122} 2123 2124// SetPolygon sets the Polygon field's value. 2125func (s *Geometry) SetPolygon(v []*Point) *Geometry { 2126 s.Polygon = v 2127 return s 2128} 2129 2130type GetDocumentAnalysisInput struct { 2131 _ struct{} `type:"structure"` 2132 2133 // A unique identifier for the text-detection job. The JobId is returned from 2134 // StartDocumentAnalysis. A JobId value is only valid for 7 days. 2135 // 2136 // JobId is a required field 2137 JobId *string `min:"1" type:"string" required:"true"` 2138 2139 // The maximum number of results to return per paginated call. The largest value 2140 // that you can specify is 1,000. If you specify a value greater than 1,000, 2141 // a maximum of 1,000 results is returned. The default value is 1,000. 2142 MaxResults *int64 `min:"1" type:"integer"` 2143 2144 // If the previous response was incomplete (because there are more blocks to 2145 // retrieve), Amazon Textract returns a pagination token in the response. You 2146 // can use this pagination token to retrieve the next set of blocks. 2147 NextToken *string `min:"1" type:"string"` 2148} 2149 2150// String returns the string representation 2151func (s GetDocumentAnalysisInput) String() string { 2152 return awsutil.Prettify(s) 2153} 2154 2155// GoString returns the string representation 2156func (s GetDocumentAnalysisInput) GoString() string { 2157 return s.String() 2158} 2159 2160// Validate inspects the fields of the type to determine if they are valid. 2161func (s *GetDocumentAnalysisInput) Validate() error { 2162 invalidParams := request.ErrInvalidParams{Context: "GetDocumentAnalysisInput"} 2163 if s.JobId == nil { 2164 invalidParams.Add(request.NewErrParamRequired("JobId")) 2165 } 2166 if s.JobId != nil && len(*s.JobId) < 1 { 2167 invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) 2168 } 2169 if s.MaxResults != nil && *s.MaxResults < 1 { 2170 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 2171 } 2172 if s.NextToken != nil && len(*s.NextToken) < 1 { 2173 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 2174 } 2175 2176 if invalidParams.Len() > 0 { 2177 return invalidParams 2178 } 2179 return nil 2180} 2181 2182// SetJobId sets the JobId field's value. 2183func (s *GetDocumentAnalysisInput) SetJobId(v string) *GetDocumentAnalysisInput { 2184 s.JobId = &v 2185 return s 2186} 2187 2188// SetMaxResults sets the MaxResults field's value. 2189func (s *GetDocumentAnalysisInput) SetMaxResults(v int64) *GetDocumentAnalysisInput { 2190 s.MaxResults = &v 2191 return s 2192} 2193 2194// SetNextToken sets the NextToken field's value. 2195func (s *GetDocumentAnalysisInput) SetNextToken(v string) *GetDocumentAnalysisInput { 2196 s.NextToken = &v 2197 return s 2198} 2199 2200type GetDocumentAnalysisOutput struct { 2201 _ struct{} `type:"structure"` 2202 2203 AnalyzeDocumentModelVersion *string `type:"string"` 2204 2205 // The results of the text-analysis operation. 2206 Blocks []*Block `type:"list"` 2207 2208 // Information about a document that Amazon Textract processed. DocumentMetadata 2209 // is returned in every page of paginated responses from an Amazon Textract 2210 // video operation. 2211 DocumentMetadata *DocumentMetadata `type:"structure"` 2212 2213 // The current status of the text detection job. 2214 JobStatus *string `type:"string" enum:"JobStatus"` 2215 2216 // If the response is truncated, Amazon Textract returns this token. You can 2217 // use this token in the subsequent request to retrieve the next set of text 2218 // detection results. 2219 NextToken *string `min:"1" type:"string"` 2220 2221 // Returns if the detection job could not be completed. Contains explanation 2222 // for what error occured. 2223 StatusMessage *string `type:"string"` 2224 2225 // A list of warnings that occurred during the document-analysis operation. 2226 Warnings []*Warning `type:"list"` 2227} 2228 2229// String returns the string representation 2230func (s GetDocumentAnalysisOutput) String() string { 2231 return awsutil.Prettify(s) 2232} 2233 2234// GoString returns the string representation 2235func (s GetDocumentAnalysisOutput) GoString() string { 2236 return s.String() 2237} 2238 2239// SetAnalyzeDocumentModelVersion sets the AnalyzeDocumentModelVersion field's value. 2240func (s *GetDocumentAnalysisOutput) SetAnalyzeDocumentModelVersion(v string) *GetDocumentAnalysisOutput { 2241 s.AnalyzeDocumentModelVersion = &v 2242 return s 2243} 2244 2245// SetBlocks sets the Blocks field's value. 2246func (s *GetDocumentAnalysisOutput) SetBlocks(v []*Block) *GetDocumentAnalysisOutput { 2247 s.Blocks = v 2248 return s 2249} 2250 2251// SetDocumentMetadata sets the DocumentMetadata field's value. 2252func (s *GetDocumentAnalysisOutput) SetDocumentMetadata(v *DocumentMetadata) *GetDocumentAnalysisOutput { 2253 s.DocumentMetadata = v 2254 return s 2255} 2256 2257// SetJobStatus sets the JobStatus field's value. 2258func (s *GetDocumentAnalysisOutput) SetJobStatus(v string) *GetDocumentAnalysisOutput { 2259 s.JobStatus = &v 2260 return s 2261} 2262 2263// SetNextToken sets the NextToken field's value. 2264func (s *GetDocumentAnalysisOutput) SetNextToken(v string) *GetDocumentAnalysisOutput { 2265 s.NextToken = &v 2266 return s 2267} 2268 2269// SetStatusMessage sets the StatusMessage field's value. 2270func (s *GetDocumentAnalysisOutput) SetStatusMessage(v string) *GetDocumentAnalysisOutput { 2271 s.StatusMessage = &v 2272 return s 2273} 2274 2275// SetWarnings sets the Warnings field's value. 2276func (s *GetDocumentAnalysisOutput) SetWarnings(v []*Warning) *GetDocumentAnalysisOutput { 2277 s.Warnings = v 2278 return s 2279} 2280 2281type GetDocumentTextDetectionInput struct { 2282 _ struct{} `type:"structure"` 2283 2284 // A unique identifier for the text detection job. The JobId is returned from 2285 // StartDocumentTextDetection. A JobId value is only valid for 7 days. 2286 // 2287 // JobId is a required field 2288 JobId *string `min:"1" type:"string" required:"true"` 2289 2290 // The maximum number of results to return per paginated call. The largest value 2291 // you can specify is 1,000. If you specify a value greater than 1,000, a maximum 2292 // of 1,000 results is returned. The default value is 1,000. 2293 MaxResults *int64 `min:"1" type:"integer"` 2294 2295 // If the previous response was incomplete (because there are more blocks to 2296 // retrieve), Amazon Textract returns a pagination token in the response. You 2297 // can use this pagination token to retrieve the next set of blocks. 2298 NextToken *string `min:"1" type:"string"` 2299} 2300 2301// String returns the string representation 2302func (s GetDocumentTextDetectionInput) String() string { 2303 return awsutil.Prettify(s) 2304} 2305 2306// GoString returns the string representation 2307func (s GetDocumentTextDetectionInput) GoString() string { 2308 return s.String() 2309} 2310 2311// Validate inspects the fields of the type to determine if they are valid. 2312func (s *GetDocumentTextDetectionInput) Validate() error { 2313 invalidParams := request.ErrInvalidParams{Context: "GetDocumentTextDetectionInput"} 2314 if s.JobId == nil { 2315 invalidParams.Add(request.NewErrParamRequired("JobId")) 2316 } 2317 if s.JobId != nil && len(*s.JobId) < 1 { 2318 invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) 2319 } 2320 if s.MaxResults != nil && *s.MaxResults < 1 { 2321 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 2322 } 2323 if s.NextToken != nil && len(*s.NextToken) < 1 { 2324 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 2325 } 2326 2327 if invalidParams.Len() > 0 { 2328 return invalidParams 2329 } 2330 return nil 2331} 2332 2333// SetJobId sets the JobId field's value. 2334func (s *GetDocumentTextDetectionInput) SetJobId(v string) *GetDocumentTextDetectionInput { 2335 s.JobId = &v 2336 return s 2337} 2338 2339// SetMaxResults sets the MaxResults field's value. 2340func (s *GetDocumentTextDetectionInput) SetMaxResults(v int64) *GetDocumentTextDetectionInput { 2341 s.MaxResults = &v 2342 return s 2343} 2344 2345// SetNextToken sets the NextToken field's value. 2346func (s *GetDocumentTextDetectionInput) SetNextToken(v string) *GetDocumentTextDetectionInput { 2347 s.NextToken = &v 2348 return s 2349} 2350 2351type GetDocumentTextDetectionOutput struct { 2352 _ struct{} `type:"structure"` 2353 2354 // The results of the text-detection operation. 2355 Blocks []*Block `type:"list"` 2356 2357 DetectDocumentTextModelVersion *string `type:"string"` 2358 2359 // Information about a document that Amazon Textract processed. DocumentMetadata 2360 // is returned in every page of paginated responses from an Amazon Textract 2361 // video operation. 2362 DocumentMetadata *DocumentMetadata `type:"structure"` 2363 2364 // The current status of the text detection job. 2365 JobStatus *string `type:"string" enum:"JobStatus"` 2366 2367 // If the response is truncated, Amazon Textract returns this token. You can 2368 // use this token in the subsequent request to retrieve the next set of text-detection 2369 // results. 2370 NextToken *string `min:"1" type:"string"` 2371 2372 // Returns if the detection job could not be completed. Contains explanation 2373 // for what error occured. 2374 StatusMessage *string `type:"string"` 2375 2376 // A list of warnings that occurred during the text-detection operation for 2377 // the document. 2378 Warnings []*Warning `type:"list"` 2379} 2380 2381// String returns the string representation 2382func (s GetDocumentTextDetectionOutput) String() string { 2383 return awsutil.Prettify(s) 2384} 2385 2386// GoString returns the string representation 2387func (s GetDocumentTextDetectionOutput) GoString() string { 2388 return s.String() 2389} 2390 2391// SetBlocks sets the Blocks field's value. 2392func (s *GetDocumentTextDetectionOutput) SetBlocks(v []*Block) *GetDocumentTextDetectionOutput { 2393 s.Blocks = v 2394 return s 2395} 2396 2397// SetDetectDocumentTextModelVersion sets the DetectDocumentTextModelVersion field's value. 2398func (s *GetDocumentTextDetectionOutput) SetDetectDocumentTextModelVersion(v string) *GetDocumentTextDetectionOutput { 2399 s.DetectDocumentTextModelVersion = &v 2400 return s 2401} 2402 2403// SetDocumentMetadata sets the DocumentMetadata field's value. 2404func (s *GetDocumentTextDetectionOutput) SetDocumentMetadata(v *DocumentMetadata) *GetDocumentTextDetectionOutput { 2405 s.DocumentMetadata = v 2406 return s 2407} 2408 2409// SetJobStatus sets the JobStatus field's value. 2410func (s *GetDocumentTextDetectionOutput) SetJobStatus(v string) *GetDocumentTextDetectionOutput { 2411 s.JobStatus = &v 2412 return s 2413} 2414 2415// SetNextToken sets the NextToken field's value. 2416func (s *GetDocumentTextDetectionOutput) SetNextToken(v string) *GetDocumentTextDetectionOutput { 2417 s.NextToken = &v 2418 return s 2419} 2420 2421// SetStatusMessage sets the StatusMessage field's value. 2422func (s *GetDocumentTextDetectionOutput) SetStatusMessage(v string) *GetDocumentTextDetectionOutput { 2423 s.StatusMessage = &v 2424 return s 2425} 2426 2427// SetWarnings sets the Warnings field's value. 2428func (s *GetDocumentTextDetectionOutput) SetWarnings(v []*Warning) *GetDocumentTextDetectionOutput { 2429 s.Warnings = v 2430 return s 2431} 2432 2433// Shows the results of the human in the loop evaluation. If there is no HumanLoopArn, 2434// the input did not trigger human review. 2435type HumanLoopActivationOutput struct { 2436 _ struct{} `type:"structure"` 2437 2438 // Shows the result of condition evaluations, including those conditions which 2439 // activated a human review. 2440 HumanLoopActivationConditionsEvaluationResults aws.JSONValue `type:"jsonvalue"` 2441 2442 // Shows if and why human review was needed. 2443 HumanLoopActivationReasons []*string `min:"1" type:"list"` 2444 2445 // The Amazon Resource Name (ARN) of the HumanLoop created. 2446 HumanLoopArn *string `type:"string"` 2447} 2448 2449// String returns the string representation 2450func (s HumanLoopActivationOutput) String() string { 2451 return awsutil.Prettify(s) 2452} 2453 2454// GoString returns the string representation 2455func (s HumanLoopActivationOutput) GoString() string { 2456 return s.String() 2457} 2458 2459// SetHumanLoopActivationConditionsEvaluationResults sets the HumanLoopActivationConditionsEvaluationResults field's value. 2460func (s *HumanLoopActivationOutput) SetHumanLoopActivationConditionsEvaluationResults(v aws.JSONValue) *HumanLoopActivationOutput { 2461 s.HumanLoopActivationConditionsEvaluationResults = v 2462 return s 2463} 2464 2465// SetHumanLoopActivationReasons sets the HumanLoopActivationReasons field's value. 2466func (s *HumanLoopActivationOutput) SetHumanLoopActivationReasons(v []*string) *HumanLoopActivationOutput { 2467 s.HumanLoopActivationReasons = v 2468 return s 2469} 2470 2471// SetHumanLoopArn sets the HumanLoopArn field's value. 2472func (s *HumanLoopActivationOutput) SetHumanLoopArn(v string) *HumanLoopActivationOutput { 2473 s.HumanLoopArn = &v 2474 return s 2475} 2476 2477// Sets up the human review workflow the document will be sent to if one of 2478// the conditions is met. You can also set certain attributes of the image before 2479// review. 2480type HumanLoopConfig struct { 2481 _ struct{} `type:"structure"` 2482 2483 // Sets attributes of the input data. 2484 DataAttributes *HumanLoopDataAttributes `type:"structure"` 2485 2486 // The Amazon Resource Name (ARN) of the flow definition. 2487 // 2488 // FlowDefinitionArn is a required field 2489 FlowDefinitionArn *string `type:"string" required:"true"` 2490 2491 // The name of the human workflow used for this image. This should be kept unique 2492 // within a region. 2493 // 2494 // HumanLoopName is a required field 2495 HumanLoopName *string `min:"1" type:"string" required:"true"` 2496} 2497 2498// String returns the string representation 2499func (s HumanLoopConfig) String() string { 2500 return awsutil.Prettify(s) 2501} 2502 2503// GoString returns the string representation 2504func (s HumanLoopConfig) GoString() string { 2505 return s.String() 2506} 2507 2508// Validate inspects the fields of the type to determine if they are valid. 2509func (s *HumanLoopConfig) Validate() error { 2510 invalidParams := request.ErrInvalidParams{Context: "HumanLoopConfig"} 2511 if s.FlowDefinitionArn == nil { 2512 invalidParams.Add(request.NewErrParamRequired("FlowDefinitionArn")) 2513 } 2514 if s.HumanLoopName == nil { 2515 invalidParams.Add(request.NewErrParamRequired("HumanLoopName")) 2516 } 2517 if s.HumanLoopName != nil && len(*s.HumanLoopName) < 1 { 2518 invalidParams.Add(request.NewErrParamMinLen("HumanLoopName", 1)) 2519 } 2520 2521 if invalidParams.Len() > 0 { 2522 return invalidParams 2523 } 2524 return nil 2525} 2526 2527// SetDataAttributes sets the DataAttributes field's value. 2528func (s *HumanLoopConfig) SetDataAttributes(v *HumanLoopDataAttributes) *HumanLoopConfig { 2529 s.DataAttributes = v 2530 return s 2531} 2532 2533// SetFlowDefinitionArn sets the FlowDefinitionArn field's value. 2534func (s *HumanLoopConfig) SetFlowDefinitionArn(v string) *HumanLoopConfig { 2535 s.FlowDefinitionArn = &v 2536 return s 2537} 2538 2539// SetHumanLoopName sets the HumanLoopName field's value. 2540func (s *HumanLoopConfig) SetHumanLoopName(v string) *HumanLoopConfig { 2541 s.HumanLoopName = &v 2542 return s 2543} 2544 2545// Allows you to set attributes of the image. Currently, you can declare an 2546// image as free of personally identifiable information and adult content. 2547type HumanLoopDataAttributes struct { 2548 _ struct{} `type:"structure"` 2549 2550 // Sets whether the input image is free of personally identifiable information 2551 // or adult content. 2552 ContentClassifiers []*string `type:"list"` 2553} 2554 2555// String returns the string representation 2556func (s HumanLoopDataAttributes) String() string { 2557 return awsutil.Prettify(s) 2558} 2559 2560// GoString returns the string representation 2561func (s HumanLoopDataAttributes) GoString() string { 2562 return s.String() 2563} 2564 2565// SetContentClassifiers sets the ContentClassifiers field's value. 2566func (s *HumanLoopDataAttributes) SetContentClassifiers(v []*string) *HumanLoopDataAttributes { 2567 s.ContentClassifiers = v 2568 return s 2569} 2570 2571// Indicates you have exceeded the maximum number of active human in the loop 2572// workflows available 2573type HumanLoopQuotaExceededException struct { 2574 _ struct{} `type:"structure"` 2575 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2576 2577 Message_ *string `locationName:"message" type:"string"` 2578 2579 // The quota code. 2580 QuotaCode *string `type:"string"` 2581 2582 // The resource type. 2583 ResourceType *string `type:"string"` 2584 2585 // The service code. 2586 ServiceCode *string `type:"string"` 2587} 2588 2589// String returns the string representation 2590func (s HumanLoopQuotaExceededException) String() string { 2591 return awsutil.Prettify(s) 2592} 2593 2594// GoString returns the string representation 2595func (s HumanLoopQuotaExceededException) GoString() string { 2596 return s.String() 2597} 2598 2599func newErrorHumanLoopQuotaExceededException(v protocol.ResponseMetadata) error { 2600 return &HumanLoopQuotaExceededException{ 2601 RespMetadata: v, 2602 } 2603} 2604 2605// Code returns the exception type name. 2606func (s *HumanLoopQuotaExceededException) Code() string { 2607 return "HumanLoopQuotaExceededException" 2608} 2609 2610// Message returns the exception's message. 2611func (s *HumanLoopQuotaExceededException) Message() string { 2612 if s.Message_ != nil { 2613 return *s.Message_ 2614 } 2615 return "" 2616} 2617 2618// OrigErr always returns nil, satisfies awserr.Error interface. 2619func (s *HumanLoopQuotaExceededException) OrigErr() error { 2620 return nil 2621} 2622 2623func (s *HumanLoopQuotaExceededException) Error() string { 2624 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 2625} 2626 2627// Status code returns the HTTP status code for the request's response error. 2628func (s *HumanLoopQuotaExceededException) StatusCode() int { 2629 return s.RespMetadata.StatusCode 2630} 2631 2632// RequestID returns the service's response RequestID for request. 2633func (s *HumanLoopQuotaExceededException) RequestID() string { 2634 return s.RespMetadata.RequestID 2635} 2636 2637// A ClientRequestToken input parameter was reused with an operation, but at 2638// least one of the other input parameters is different from the previous call 2639// to the operation. 2640type IdempotentParameterMismatchException struct { 2641 _ struct{} `type:"structure"` 2642 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2643 2644 Message_ *string `locationName:"message" type:"string"` 2645} 2646 2647// String returns the string representation 2648func (s IdempotentParameterMismatchException) String() string { 2649 return awsutil.Prettify(s) 2650} 2651 2652// GoString returns the string representation 2653func (s IdempotentParameterMismatchException) GoString() string { 2654 return s.String() 2655} 2656 2657func newErrorIdempotentParameterMismatchException(v protocol.ResponseMetadata) error { 2658 return &IdempotentParameterMismatchException{ 2659 RespMetadata: v, 2660 } 2661} 2662 2663// Code returns the exception type name. 2664func (s *IdempotentParameterMismatchException) Code() string { 2665 return "IdempotentParameterMismatchException" 2666} 2667 2668// Message returns the exception's message. 2669func (s *IdempotentParameterMismatchException) Message() string { 2670 if s.Message_ != nil { 2671 return *s.Message_ 2672 } 2673 return "" 2674} 2675 2676// OrigErr always returns nil, satisfies awserr.Error interface. 2677func (s *IdempotentParameterMismatchException) OrigErr() error { 2678 return nil 2679} 2680 2681func (s *IdempotentParameterMismatchException) Error() string { 2682 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2683} 2684 2685// Status code returns the HTTP status code for the request's response error. 2686func (s *IdempotentParameterMismatchException) StatusCode() int { 2687 return s.RespMetadata.StatusCode 2688} 2689 2690// RequestID returns the service's response RequestID for request. 2691func (s *IdempotentParameterMismatchException) RequestID() string { 2692 return s.RespMetadata.RequestID 2693} 2694 2695// Amazon Textract experienced a service issue. Try your call again. 2696type InternalServerError struct { 2697 _ struct{} `type:"structure"` 2698 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2699 2700 Message_ *string `locationName:"message" type:"string"` 2701} 2702 2703// String returns the string representation 2704func (s InternalServerError) String() string { 2705 return awsutil.Prettify(s) 2706} 2707 2708// GoString returns the string representation 2709func (s InternalServerError) GoString() string { 2710 return s.String() 2711} 2712 2713func newErrorInternalServerError(v protocol.ResponseMetadata) error { 2714 return &InternalServerError{ 2715 RespMetadata: v, 2716 } 2717} 2718 2719// Code returns the exception type name. 2720func (s *InternalServerError) Code() string { 2721 return "InternalServerError" 2722} 2723 2724// Message returns the exception's message. 2725func (s *InternalServerError) Message() string { 2726 if s.Message_ != nil { 2727 return *s.Message_ 2728 } 2729 return "" 2730} 2731 2732// OrigErr always returns nil, satisfies awserr.Error interface. 2733func (s *InternalServerError) OrigErr() error { 2734 return nil 2735} 2736 2737func (s *InternalServerError) Error() string { 2738 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2739} 2740 2741// Status code returns the HTTP status code for the request's response error. 2742func (s *InternalServerError) StatusCode() int { 2743 return s.RespMetadata.StatusCode 2744} 2745 2746// RequestID returns the service's response RequestID for request. 2747func (s *InternalServerError) RequestID() string { 2748 return s.RespMetadata.RequestID 2749} 2750 2751// An invalid job identifier was passed to GetDocumentAnalysis or to GetDocumentAnalysis. 2752type InvalidJobIdException struct { 2753 _ struct{} `type:"structure"` 2754 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2755 2756 Message_ *string `locationName:"message" type:"string"` 2757} 2758 2759// String returns the string representation 2760func (s InvalidJobIdException) String() string { 2761 return awsutil.Prettify(s) 2762} 2763 2764// GoString returns the string representation 2765func (s InvalidJobIdException) GoString() string { 2766 return s.String() 2767} 2768 2769func newErrorInvalidJobIdException(v protocol.ResponseMetadata) error { 2770 return &InvalidJobIdException{ 2771 RespMetadata: v, 2772 } 2773} 2774 2775// Code returns the exception type name. 2776func (s *InvalidJobIdException) Code() string { 2777 return "InvalidJobIdException" 2778} 2779 2780// Message returns the exception's message. 2781func (s *InvalidJobIdException) Message() string { 2782 if s.Message_ != nil { 2783 return *s.Message_ 2784 } 2785 return "" 2786} 2787 2788// OrigErr always returns nil, satisfies awserr.Error interface. 2789func (s *InvalidJobIdException) OrigErr() error { 2790 return nil 2791} 2792 2793func (s *InvalidJobIdException) Error() string { 2794 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2795} 2796 2797// Status code returns the HTTP status code for the request's response error. 2798func (s *InvalidJobIdException) StatusCode() int { 2799 return s.RespMetadata.StatusCode 2800} 2801 2802// RequestID returns the service's response RequestID for request. 2803func (s *InvalidJobIdException) RequestID() string { 2804 return s.RespMetadata.RequestID 2805} 2806 2807// Indicates you do not have decrypt permissions with the KMS key entered, or 2808// the KMS key was entered incorrectly. 2809type InvalidKMSKeyException struct { 2810 _ struct{} `type:"structure"` 2811 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2812 2813 Message_ *string `locationName:"message" type:"string"` 2814} 2815 2816// String returns the string representation 2817func (s InvalidKMSKeyException) String() string { 2818 return awsutil.Prettify(s) 2819} 2820 2821// GoString returns the string representation 2822func (s InvalidKMSKeyException) GoString() string { 2823 return s.String() 2824} 2825 2826func newErrorInvalidKMSKeyException(v protocol.ResponseMetadata) error { 2827 return &InvalidKMSKeyException{ 2828 RespMetadata: v, 2829 } 2830} 2831 2832// Code returns the exception type name. 2833func (s *InvalidKMSKeyException) Code() string { 2834 return "InvalidKMSKeyException" 2835} 2836 2837// Message returns the exception's message. 2838func (s *InvalidKMSKeyException) Message() string { 2839 if s.Message_ != nil { 2840 return *s.Message_ 2841 } 2842 return "" 2843} 2844 2845// OrigErr always returns nil, satisfies awserr.Error interface. 2846func (s *InvalidKMSKeyException) OrigErr() error { 2847 return nil 2848} 2849 2850func (s *InvalidKMSKeyException) Error() string { 2851 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2852} 2853 2854// Status code returns the HTTP status code for the request's response error. 2855func (s *InvalidKMSKeyException) StatusCode() int { 2856 return s.RespMetadata.StatusCode 2857} 2858 2859// RequestID returns the service's response RequestID for request. 2860func (s *InvalidKMSKeyException) RequestID() string { 2861 return s.RespMetadata.RequestID 2862} 2863 2864// An input parameter violated a constraint. For example, in synchronous operations, 2865// an InvalidParameterException exception occurs when neither of the S3Object 2866// or Bytes values are supplied in the Document request parameter. Validate 2867// your parameter before calling the API operation again. 2868type InvalidParameterException struct { 2869 _ struct{} `type:"structure"` 2870 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2871 2872 Message_ *string `locationName:"message" type:"string"` 2873} 2874 2875// String returns the string representation 2876func (s InvalidParameterException) String() string { 2877 return awsutil.Prettify(s) 2878} 2879 2880// GoString returns the string representation 2881func (s InvalidParameterException) GoString() string { 2882 return s.String() 2883} 2884 2885func newErrorInvalidParameterException(v protocol.ResponseMetadata) error { 2886 return &InvalidParameterException{ 2887 RespMetadata: v, 2888 } 2889} 2890 2891// Code returns the exception type name. 2892func (s *InvalidParameterException) Code() string { 2893 return "InvalidParameterException" 2894} 2895 2896// Message returns the exception's message. 2897func (s *InvalidParameterException) Message() string { 2898 if s.Message_ != nil { 2899 return *s.Message_ 2900 } 2901 return "" 2902} 2903 2904// OrigErr always returns nil, satisfies awserr.Error interface. 2905func (s *InvalidParameterException) OrigErr() error { 2906 return nil 2907} 2908 2909func (s *InvalidParameterException) Error() string { 2910 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2911} 2912 2913// Status code returns the HTTP status code for the request's response error. 2914func (s *InvalidParameterException) StatusCode() int { 2915 return s.RespMetadata.StatusCode 2916} 2917 2918// RequestID returns the service's response RequestID for request. 2919func (s *InvalidParameterException) RequestID() string { 2920 return s.RespMetadata.RequestID 2921} 2922 2923// Amazon Textract is unable to access the S3 object that's specified in the 2924// request. for more information, Configure Access to Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) 2925// For troubleshooting information, see Troubleshooting Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/troubleshooting.html) 2926type InvalidS3ObjectException struct { 2927 _ struct{} `type:"structure"` 2928 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2929 2930 Message_ *string `locationName:"message" type:"string"` 2931} 2932 2933// String returns the string representation 2934func (s InvalidS3ObjectException) String() string { 2935 return awsutil.Prettify(s) 2936} 2937 2938// GoString returns the string representation 2939func (s InvalidS3ObjectException) GoString() string { 2940 return s.String() 2941} 2942 2943func newErrorInvalidS3ObjectException(v protocol.ResponseMetadata) error { 2944 return &InvalidS3ObjectException{ 2945 RespMetadata: v, 2946 } 2947} 2948 2949// Code returns the exception type name. 2950func (s *InvalidS3ObjectException) Code() string { 2951 return "InvalidS3ObjectException" 2952} 2953 2954// Message returns the exception's message. 2955func (s *InvalidS3ObjectException) Message() string { 2956 if s.Message_ != nil { 2957 return *s.Message_ 2958 } 2959 return "" 2960} 2961 2962// OrigErr always returns nil, satisfies awserr.Error interface. 2963func (s *InvalidS3ObjectException) OrigErr() error { 2964 return nil 2965} 2966 2967func (s *InvalidS3ObjectException) Error() string { 2968 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2969} 2970 2971// Status code returns the HTTP status code for the request's response error. 2972func (s *InvalidS3ObjectException) StatusCode() int { 2973 return s.RespMetadata.StatusCode 2974} 2975 2976// RequestID returns the service's response RequestID for request. 2977func (s *InvalidS3ObjectException) RequestID() string { 2978 return s.RespMetadata.RequestID 2979} 2980 2981// An Amazon Textract service limit was exceeded. For example, if you start 2982// too many asynchronous jobs concurrently, calls to start operations (StartDocumentTextDetection, 2983// for example) raise a LimitExceededException exception (HTTP status code: 2984// 400) until the number of concurrently running jobs is below the Amazon Textract 2985// service limit. 2986type LimitExceededException struct { 2987 _ struct{} `type:"structure"` 2988 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2989 2990 Message_ *string `locationName:"message" type:"string"` 2991} 2992 2993// String returns the string representation 2994func (s LimitExceededException) String() string { 2995 return awsutil.Prettify(s) 2996} 2997 2998// GoString returns the string representation 2999func (s LimitExceededException) GoString() string { 3000 return s.String() 3001} 3002 3003func newErrorLimitExceededException(v protocol.ResponseMetadata) error { 3004 return &LimitExceededException{ 3005 RespMetadata: v, 3006 } 3007} 3008 3009// Code returns the exception type name. 3010func (s *LimitExceededException) Code() string { 3011 return "LimitExceededException" 3012} 3013 3014// Message returns the exception's message. 3015func (s *LimitExceededException) Message() string { 3016 if s.Message_ != nil { 3017 return *s.Message_ 3018 } 3019 return "" 3020} 3021 3022// OrigErr always returns nil, satisfies awserr.Error interface. 3023func (s *LimitExceededException) OrigErr() error { 3024 return nil 3025} 3026 3027func (s *LimitExceededException) Error() string { 3028 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3029} 3030 3031// Status code returns the HTTP status code for the request's response error. 3032func (s *LimitExceededException) StatusCode() int { 3033 return s.RespMetadata.StatusCode 3034} 3035 3036// RequestID returns the service's response RequestID for request. 3037func (s *LimitExceededException) RequestID() string { 3038 return s.RespMetadata.RequestID 3039} 3040 3041// A structure that holds information about the different lines found in a document's 3042// tables. 3043type LineItemFields struct { 3044 _ struct{} `type:"structure"` 3045 3046 // ExpenseFields used to show information from detected lines on a table. 3047 LineItemExpenseFields []*ExpenseField `type:"list"` 3048} 3049 3050// String returns the string representation 3051func (s LineItemFields) String() string { 3052 return awsutil.Prettify(s) 3053} 3054 3055// GoString returns the string representation 3056func (s LineItemFields) GoString() string { 3057 return s.String() 3058} 3059 3060// SetLineItemExpenseFields sets the LineItemExpenseFields field's value. 3061func (s *LineItemFields) SetLineItemExpenseFields(v []*ExpenseField) *LineItemFields { 3062 s.LineItemExpenseFields = v 3063 return s 3064} 3065 3066// A grouping of tables which contain LineItems, with each table identified 3067// by the table's LineItemGroupIndex. 3068type LineItemGroup struct { 3069 _ struct{} `type:"structure"` 3070 3071 // The number used to identify a specific table in a document. The first table 3072 // encountered will have a LineItemGroupIndex of 1, the second 2, etc. 3073 LineItemGroupIndex *int64 `type:"integer"` 3074 3075 // The breakdown of information on a particular line of a table. 3076 LineItems []*LineItemFields `type:"list"` 3077} 3078 3079// String returns the string representation 3080func (s LineItemGroup) String() string { 3081 return awsutil.Prettify(s) 3082} 3083 3084// GoString returns the string representation 3085func (s LineItemGroup) GoString() string { 3086 return s.String() 3087} 3088 3089// SetLineItemGroupIndex sets the LineItemGroupIndex field's value. 3090func (s *LineItemGroup) SetLineItemGroupIndex(v int64) *LineItemGroup { 3091 s.LineItemGroupIndex = &v 3092 return s 3093} 3094 3095// SetLineItems sets the LineItems field's value. 3096func (s *LineItemGroup) SetLineItems(v []*LineItemFields) *LineItemGroup { 3097 s.LineItems = v 3098 return s 3099} 3100 3101// The Amazon Simple Notification Service (Amazon SNS) topic to which Amazon 3102// Textract publishes the completion status of an asynchronous document operation, 3103// such as StartDocumentTextDetection. 3104type NotificationChannel struct { 3105 _ struct{} `type:"structure"` 3106 3107 // The Amazon Resource Name (ARN) of an IAM role that gives Amazon Textract 3108 // publishing permissions to the Amazon SNS topic. 3109 // 3110 // RoleArn is a required field 3111 RoleArn *string `min:"20" type:"string" required:"true"` 3112 3113 // The Amazon SNS topic that Amazon Textract posts the completion status to. 3114 // 3115 // SNSTopicArn is a required field 3116 SNSTopicArn *string `min:"20" type:"string" required:"true"` 3117} 3118 3119// String returns the string representation 3120func (s NotificationChannel) String() string { 3121 return awsutil.Prettify(s) 3122} 3123 3124// GoString returns the string representation 3125func (s NotificationChannel) GoString() string { 3126 return s.String() 3127} 3128 3129// Validate inspects the fields of the type to determine if they are valid. 3130func (s *NotificationChannel) Validate() error { 3131 invalidParams := request.ErrInvalidParams{Context: "NotificationChannel"} 3132 if s.RoleArn == nil { 3133 invalidParams.Add(request.NewErrParamRequired("RoleArn")) 3134 } 3135 if s.RoleArn != nil && len(*s.RoleArn) < 20 { 3136 invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) 3137 } 3138 if s.SNSTopicArn == nil { 3139 invalidParams.Add(request.NewErrParamRequired("SNSTopicArn")) 3140 } 3141 if s.SNSTopicArn != nil && len(*s.SNSTopicArn) < 20 { 3142 invalidParams.Add(request.NewErrParamMinLen("SNSTopicArn", 20)) 3143 } 3144 3145 if invalidParams.Len() > 0 { 3146 return invalidParams 3147 } 3148 return nil 3149} 3150 3151// SetRoleArn sets the RoleArn field's value. 3152func (s *NotificationChannel) SetRoleArn(v string) *NotificationChannel { 3153 s.RoleArn = &v 3154 return s 3155} 3156 3157// SetSNSTopicArn sets the SNSTopicArn field's value. 3158func (s *NotificationChannel) SetSNSTopicArn(v string) *NotificationChannel { 3159 s.SNSTopicArn = &v 3160 return s 3161} 3162 3163// Sets whether or not your output will go to a user created bucket. Used to 3164// set the name of the bucket, and the prefix on the output file. 3165// 3166// OutputConfig is an optional parameter which lets you adjust where your output 3167// will be placed. By default, Amazon Textract will store the results internally 3168// and can only be accessed by the Get API operations. With OutputConfig enabled, 3169// you can set the name of the bucket the output will be sent to and the file 3170// prefix of the results where you can download your results. Additionally, 3171// you can set the KMSKeyID parameter to a customer master key (CMK) to encrypt 3172// your output. Without this parameter set Amazon Textract will encrypt server-side 3173// using the AWS managed CMK for Amazon S3. 3174// 3175// Decryption of Customer Content is necessary for processing of the documents 3176// by Amazon Textract. If your account is opted out under an AI services opt 3177// out policy then all unencrypted Customer Content is immediately and permanently 3178// deleted after the Customer Content has been processed by the service. No 3179// copy of of the output is retained by Amazon Textract. For information about 3180// how to opt out, see Managing AI services opt-out policy. (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html) 3181// 3182// For more information on data privacy, see the Data Privacy FAQ (https://aws.amazon.com/compliance/data-privacy-faq/). 3183type OutputConfig struct { 3184 _ struct{} `type:"structure"` 3185 3186 // The name of the bucket your output will go to. 3187 // 3188 // S3Bucket is a required field 3189 S3Bucket *string `min:"3" type:"string" required:"true"` 3190 3191 // The prefix of the object key that the output will be saved to. When not enabled, 3192 // the prefix will be “textract_output". 3193 S3Prefix *string `min:"1" type:"string"` 3194} 3195 3196// String returns the string representation 3197func (s OutputConfig) String() string { 3198 return awsutil.Prettify(s) 3199} 3200 3201// GoString returns the string representation 3202func (s OutputConfig) GoString() string { 3203 return s.String() 3204} 3205 3206// Validate inspects the fields of the type to determine if they are valid. 3207func (s *OutputConfig) Validate() error { 3208 invalidParams := request.ErrInvalidParams{Context: "OutputConfig"} 3209 if s.S3Bucket == nil { 3210 invalidParams.Add(request.NewErrParamRequired("S3Bucket")) 3211 } 3212 if s.S3Bucket != nil && len(*s.S3Bucket) < 3 { 3213 invalidParams.Add(request.NewErrParamMinLen("S3Bucket", 3)) 3214 } 3215 if s.S3Prefix != nil && len(*s.S3Prefix) < 1 { 3216 invalidParams.Add(request.NewErrParamMinLen("S3Prefix", 1)) 3217 } 3218 3219 if invalidParams.Len() > 0 { 3220 return invalidParams 3221 } 3222 return nil 3223} 3224 3225// SetS3Bucket sets the S3Bucket field's value. 3226func (s *OutputConfig) SetS3Bucket(v string) *OutputConfig { 3227 s.S3Bucket = &v 3228 return s 3229} 3230 3231// SetS3Prefix sets the S3Prefix field's value. 3232func (s *OutputConfig) SetS3Prefix(v string) *OutputConfig { 3233 s.S3Prefix = &v 3234 return s 3235} 3236 3237// The X and Y coordinates of a point on a document page. The X and Y values 3238// that are returned are ratios of the overall document page size. For example, 3239// if the input document is 700 x 200 and the operation returns X=0.5 and Y=0.25, 3240// then the point is at the (350,50) pixel coordinate on the document page. 3241// 3242// An array of Point objects, Polygon, is returned by DetectDocumentText. Polygon 3243// represents a fine-grained polygon around detected text. For more information, 3244// see Geometry in the Amazon Textract Developer Guide. 3245type Point struct { 3246 _ struct{} `type:"structure"` 3247 3248 // The value of the X coordinate for a point on a Polygon. 3249 X *float64 `type:"float"` 3250 3251 // The value of the Y coordinate for a point on a Polygon. 3252 Y *float64 `type:"float"` 3253} 3254 3255// String returns the string representation 3256func (s Point) String() string { 3257 return awsutil.Prettify(s) 3258} 3259 3260// GoString returns the string representation 3261func (s Point) GoString() string { 3262 return s.String() 3263} 3264 3265// SetX sets the X field's value. 3266func (s *Point) SetX(v float64) *Point { 3267 s.X = &v 3268 return s 3269} 3270 3271// SetY sets the Y field's value. 3272func (s *Point) SetY(v float64) *Point { 3273 s.Y = &v 3274 return s 3275} 3276 3277// The number of requests exceeded your throughput limit. If you want to increase 3278// this limit, contact Amazon Textract. 3279type ProvisionedThroughputExceededException struct { 3280 _ struct{} `type:"structure"` 3281 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3282 3283 Message_ *string `locationName:"message" type:"string"` 3284} 3285 3286// String returns the string representation 3287func (s ProvisionedThroughputExceededException) String() string { 3288 return awsutil.Prettify(s) 3289} 3290 3291// GoString returns the string representation 3292func (s ProvisionedThroughputExceededException) GoString() string { 3293 return s.String() 3294} 3295 3296func newErrorProvisionedThroughputExceededException(v protocol.ResponseMetadata) error { 3297 return &ProvisionedThroughputExceededException{ 3298 RespMetadata: v, 3299 } 3300} 3301 3302// Code returns the exception type name. 3303func (s *ProvisionedThroughputExceededException) Code() string { 3304 return "ProvisionedThroughputExceededException" 3305} 3306 3307// Message returns the exception's message. 3308func (s *ProvisionedThroughputExceededException) Message() string { 3309 if s.Message_ != nil { 3310 return *s.Message_ 3311 } 3312 return "" 3313} 3314 3315// OrigErr always returns nil, satisfies awserr.Error interface. 3316func (s *ProvisionedThroughputExceededException) OrigErr() error { 3317 return nil 3318} 3319 3320func (s *ProvisionedThroughputExceededException) Error() string { 3321 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3322} 3323 3324// Status code returns the HTTP status code for the request's response error. 3325func (s *ProvisionedThroughputExceededException) StatusCode() int { 3326 return s.RespMetadata.StatusCode 3327} 3328 3329// RequestID returns the service's response RequestID for request. 3330func (s *ProvisionedThroughputExceededException) RequestID() string { 3331 return s.RespMetadata.RequestID 3332} 3333 3334// Information about how blocks are related to each other. A Block object contains 3335// 0 or more Relation objects in a list, Relationships. For more information, 3336// see Block. 3337// 3338// The Type element provides the type of the relationship for all blocks in 3339// the IDs array. 3340type Relationship struct { 3341 _ struct{} `type:"structure"` 3342 3343 // An array of IDs for related blocks. You can get the type of the relationship 3344 // from the Type element. 3345 Ids []*string `type:"list"` 3346 3347 // The type of relationship that the blocks in the IDs array have with the current 3348 // block. The relationship can be VALUE or CHILD. A relationship of type VALUE 3349 // is a list that contains the ID of the VALUE block that's associated with 3350 // the KEY of a key-value pair. A relationship of type CHILD is a list of IDs 3351 // that identify WORD blocks in the case of lines Cell blocks in the case of 3352 // Tables, and WORD blocks in the case of Selection Elements. 3353 Type *string `type:"string" enum:"RelationshipType"` 3354} 3355 3356// String returns the string representation 3357func (s Relationship) String() string { 3358 return awsutil.Prettify(s) 3359} 3360 3361// GoString returns the string representation 3362func (s Relationship) GoString() string { 3363 return s.String() 3364} 3365 3366// SetIds sets the Ids field's value. 3367func (s *Relationship) SetIds(v []*string) *Relationship { 3368 s.Ids = v 3369 return s 3370} 3371 3372// SetType sets the Type field's value. 3373func (s *Relationship) SetType(v string) *Relationship { 3374 s.Type = &v 3375 return s 3376} 3377 3378// The S3 bucket name and file name that identifies the document. 3379// 3380// The AWS Region for the S3 bucket that contains the document must match the 3381// Region that you use for Amazon Textract operations. 3382// 3383// For Amazon Textract to process a file in an S3 bucket, the user must have 3384// permission to access the S3 bucket and file. 3385type S3Object struct { 3386 _ struct{} `type:"structure"` 3387 3388 // The name of the S3 bucket. Note that the # character is not valid in the 3389 // file name. 3390 Bucket *string `min:"3" type:"string"` 3391 3392 // The file name of the input document. Synchronous operations can use image 3393 // files that are in JPEG or PNG format. Asynchronous operations also support 3394 // PDF format files. 3395 Name *string `min:"1" type:"string"` 3396 3397 // If the bucket has versioning enabled, you can specify the object version. 3398 Version *string `min:"1" type:"string"` 3399} 3400 3401// String returns the string representation 3402func (s S3Object) String() string { 3403 return awsutil.Prettify(s) 3404} 3405 3406// GoString returns the string representation 3407func (s S3Object) GoString() string { 3408 return s.String() 3409} 3410 3411// Validate inspects the fields of the type to determine if they are valid. 3412func (s *S3Object) Validate() error { 3413 invalidParams := request.ErrInvalidParams{Context: "S3Object"} 3414 if s.Bucket != nil && len(*s.Bucket) < 3 { 3415 invalidParams.Add(request.NewErrParamMinLen("Bucket", 3)) 3416 } 3417 if s.Name != nil && len(*s.Name) < 1 { 3418 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 3419 } 3420 if s.Version != nil && len(*s.Version) < 1 { 3421 invalidParams.Add(request.NewErrParamMinLen("Version", 1)) 3422 } 3423 3424 if invalidParams.Len() > 0 { 3425 return invalidParams 3426 } 3427 return nil 3428} 3429 3430// SetBucket sets the Bucket field's value. 3431func (s *S3Object) SetBucket(v string) *S3Object { 3432 s.Bucket = &v 3433 return s 3434} 3435 3436// SetName sets the Name field's value. 3437func (s *S3Object) SetName(v string) *S3Object { 3438 s.Name = &v 3439 return s 3440} 3441 3442// SetVersion sets the Version field's value. 3443func (s *S3Object) SetVersion(v string) *S3Object { 3444 s.Version = &v 3445 return s 3446} 3447 3448type StartDocumentAnalysisInput struct { 3449 _ struct{} `type:"structure"` 3450 3451 // The idempotent token that you use to identify the start request. If you use 3452 // the same token with multiple StartDocumentAnalysis requests, the same JobId 3453 // is returned. Use ClientRequestToken to prevent the same job from being accidentally 3454 // started more than once. For more information, see Calling Amazon Textract 3455 // Asynchronous Operations (https://docs.aws.amazon.com/textract/latest/dg/api-async.html). 3456 ClientRequestToken *string `min:"1" type:"string"` 3457 3458 // The location of the document to be processed. 3459 // 3460 // DocumentLocation is a required field 3461 DocumentLocation *DocumentLocation `type:"structure" required:"true"` 3462 3463 // A list of the types of analysis to perform. Add TABLES to the list to return 3464 // information about the tables that are detected in the input document. Add 3465 // FORMS to return detected form data. To perform both types of analysis, add 3466 // TABLES and FORMS to FeatureTypes. All lines and words detected in the document 3467 // are included in the response (including text that isn't related to the value 3468 // of FeatureTypes). 3469 // 3470 // FeatureTypes is a required field 3471 FeatureTypes []*string `type:"list" required:"true"` 3472 3473 // An identifier that you specify that's included in the completion notification 3474 // published to the Amazon SNS topic. For example, you can use JobTag to identify 3475 // the type of document that the completion notification corresponds to (such 3476 // as a tax form or a receipt). 3477 JobTag *string `min:"1" type:"string"` 3478 3479 // The KMS key used to encrypt the inference results. This can be in either 3480 // Key ID or Key Alias format. When a KMS key is provided, the KMS key will 3481 // be used for server-side encryption of the objects in the customer bucket. 3482 // When this parameter is not enabled, the result will be encrypted server side,using 3483 // SSE-S3. 3484 KMSKeyId *string `min:"1" type:"string"` 3485 3486 // The Amazon SNS topic ARN that you want Amazon Textract to publish the completion 3487 // status of the operation to. 3488 NotificationChannel *NotificationChannel `type:"structure"` 3489 3490 // Sets if the output will go to a customer defined bucket. By default, Amazon 3491 // Textract will save the results internally to be accessed by the GetDocumentAnalysis 3492 // operation. 3493 OutputConfig *OutputConfig `type:"structure"` 3494} 3495 3496// String returns the string representation 3497func (s StartDocumentAnalysisInput) String() string { 3498 return awsutil.Prettify(s) 3499} 3500 3501// GoString returns the string representation 3502func (s StartDocumentAnalysisInput) GoString() string { 3503 return s.String() 3504} 3505 3506// Validate inspects the fields of the type to determine if they are valid. 3507func (s *StartDocumentAnalysisInput) Validate() error { 3508 invalidParams := request.ErrInvalidParams{Context: "StartDocumentAnalysisInput"} 3509 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { 3510 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) 3511 } 3512 if s.DocumentLocation == nil { 3513 invalidParams.Add(request.NewErrParamRequired("DocumentLocation")) 3514 } 3515 if s.FeatureTypes == nil { 3516 invalidParams.Add(request.NewErrParamRequired("FeatureTypes")) 3517 } 3518 if s.JobTag != nil && len(*s.JobTag) < 1 { 3519 invalidParams.Add(request.NewErrParamMinLen("JobTag", 1)) 3520 } 3521 if s.KMSKeyId != nil && len(*s.KMSKeyId) < 1 { 3522 invalidParams.Add(request.NewErrParamMinLen("KMSKeyId", 1)) 3523 } 3524 if s.DocumentLocation != nil { 3525 if err := s.DocumentLocation.Validate(); err != nil { 3526 invalidParams.AddNested("DocumentLocation", err.(request.ErrInvalidParams)) 3527 } 3528 } 3529 if s.NotificationChannel != nil { 3530 if err := s.NotificationChannel.Validate(); err != nil { 3531 invalidParams.AddNested("NotificationChannel", err.(request.ErrInvalidParams)) 3532 } 3533 } 3534 if s.OutputConfig != nil { 3535 if err := s.OutputConfig.Validate(); err != nil { 3536 invalidParams.AddNested("OutputConfig", err.(request.ErrInvalidParams)) 3537 } 3538 } 3539 3540 if invalidParams.Len() > 0 { 3541 return invalidParams 3542 } 3543 return nil 3544} 3545 3546// SetClientRequestToken sets the ClientRequestToken field's value. 3547func (s *StartDocumentAnalysisInput) SetClientRequestToken(v string) *StartDocumentAnalysisInput { 3548 s.ClientRequestToken = &v 3549 return s 3550} 3551 3552// SetDocumentLocation sets the DocumentLocation field's value. 3553func (s *StartDocumentAnalysisInput) SetDocumentLocation(v *DocumentLocation) *StartDocumentAnalysisInput { 3554 s.DocumentLocation = v 3555 return s 3556} 3557 3558// SetFeatureTypes sets the FeatureTypes field's value. 3559func (s *StartDocumentAnalysisInput) SetFeatureTypes(v []*string) *StartDocumentAnalysisInput { 3560 s.FeatureTypes = v 3561 return s 3562} 3563 3564// SetJobTag sets the JobTag field's value. 3565func (s *StartDocumentAnalysisInput) SetJobTag(v string) *StartDocumentAnalysisInput { 3566 s.JobTag = &v 3567 return s 3568} 3569 3570// SetKMSKeyId sets the KMSKeyId field's value. 3571func (s *StartDocumentAnalysisInput) SetKMSKeyId(v string) *StartDocumentAnalysisInput { 3572 s.KMSKeyId = &v 3573 return s 3574} 3575 3576// SetNotificationChannel sets the NotificationChannel field's value. 3577func (s *StartDocumentAnalysisInput) SetNotificationChannel(v *NotificationChannel) *StartDocumentAnalysisInput { 3578 s.NotificationChannel = v 3579 return s 3580} 3581 3582// SetOutputConfig sets the OutputConfig field's value. 3583func (s *StartDocumentAnalysisInput) SetOutputConfig(v *OutputConfig) *StartDocumentAnalysisInput { 3584 s.OutputConfig = v 3585 return s 3586} 3587 3588type StartDocumentAnalysisOutput struct { 3589 _ struct{} `type:"structure"` 3590 3591 // The identifier for the document text detection job. Use JobId to identify 3592 // the job in a subsequent call to GetDocumentAnalysis. A JobId value is only 3593 // valid for 7 days. 3594 JobId *string `min:"1" type:"string"` 3595} 3596 3597// String returns the string representation 3598func (s StartDocumentAnalysisOutput) String() string { 3599 return awsutil.Prettify(s) 3600} 3601 3602// GoString returns the string representation 3603func (s StartDocumentAnalysisOutput) GoString() string { 3604 return s.String() 3605} 3606 3607// SetJobId sets the JobId field's value. 3608func (s *StartDocumentAnalysisOutput) SetJobId(v string) *StartDocumentAnalysisOutput { 3609 s.JobId = &v 3610 return s 3611} 3612 3613type StartDocumentTextDetectionInput struct { 3614 _ struct{} `type:"structure"` 3615 3616 // The idempotent token that's used to identify the start request. If you use 3617 // the same token with multiple StartDocumentTextDetection requests, the same 3618 // JobId is returned. Use ClientRequestToken to prevent the same job from being 3619 // accidentally started more than once. For more information, see Calling Amazon 3620 // Textract Asynchronous Operations (https://docs.aws.amazon.com/textract/latest/dg/api-async.html). 3621 ClientRequestToken *string `min:"1" type:"string"` 3622 3623 // The location of the document to be processed. 3624 // 3625 // DocumentLocation is a required field 3626 DocumentLocation *DocumentLocation `type:"structure" required:"true"` 3627 3628 // An identifier that you specify that's included in the completion notification 3629 // published to the Amazon SNS topic. For example, you can use JobTag to identify 3630 // the type of document that the completion notification corresponds to (such 3631 // as a tax form or a receipt). 3632 JobTag *string `min:"1" type:"string"` 3633 3634 // The KMS key used to encrypt the inference results. This can be in either 3635 // Key ID or Key Alias format. When a KMS key is provided, the KMS key will 3636 // be used for server-side encryption of the objects in the customer bucket. 3637 // When this parameter is not enabled, the result will be encrypted server side,using 3638 // SSE-S3. 3639 KMSKeyId *string `min:"1" type:"string"` 3640 3641 // The Amazon SNS topic ARN that you want Amazon Textract to publish the completion 3642 // status of the operation to. 3643 NotificationChannel *NotificationChannel `type:"structure"` 3644 3645 // Sets if the output will go to a customer defined bucket. By default Amazon 3646 // Textract will save the results internally to be accessed with the GetDocumentTextDetection 3647 // operation. 3648 OutputConfig *OutputConfig `type:"structure"` 3649} 3650 3651// String returns the string representation 3652func (s StartDocumentTextDetectionInput) String() string { 3653 return awsutil.Prettify(s) 3654} 3655 3656// GoString returns the string representation 3657func (s StartDocumentTextDetectionInput) GoString() string { 3658 return s.String() 3659} 3660 3661// Validate inspects the fields of the type to determine if they are valid. 3662func (s *StartDocumentTextDetectionInput) Validate() error { 3663 invalidParams := request.ErrInvalidParams{Context: "StartDocumentTextDetectionInput"} 3664 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { 3665 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) 3666 } 3667 if s.DocumentLocation == nil { 3668 invalidParams.Add(request.NewErrParamRequired("DocumentLocation")) 3669 } 3670 if s.JobTag != nil && len(*s.JobTag) < 1 { 3671 invalidParams.Add(request.NewErrParamMinLen("JobTag", 1)) 3672 } 3673 if s.KMSKeyId != nil && len(*s.KMSKeyId) < 1 { 3674 invalidParams.Add(request.NewErrParamMinLen("KMSKeyId", 1)) 3675 } 3676 if s.DocumentLocation != nil { 3677 if err := s.DocumentLocation.Validate(); err != nil { 3678 invalidParams.AddNested("DocumentLocation", err.(request.ErrInvalidParams)) 3679 } 3680 } 3681 if s.NotificationChannel != nil { 3682 if err := s.NotificationChannel.Validate(); err != nil { 3683 invalidParams.AddNested("NotificationChannel", err.(request.ErrInvalidParams)) 3684 } 3685 } 3686 if s.OutputConfig != nil { 3687 if err := s.OutputConfig.Validate(); err != nil { 3688 invalidParams.AddNested("OutputConfig", err.(request.ErrInvalidParams)) 3689 } 3690 } 3691 3692 if invalidParams.Len() > 0 { 3693 return invalidParams 3694 } 3695 return nil 3696} 3697 3698// SetClientRequestToken sets the ClientRequestToken field's value. 3699func (s *StartDocumentTextDetectionInput) SetClientRequestToken(v string) *StartDocumentTextDetectionInput { 3700 s.ClientRequestToken = &v 3701 return s 3702} 3703 3704// SetDocumentLocation sets the DocumentLocation field's value. 3705func (s *StartDocumentTextDetectionInput) SetDocumentLocation(v *DocumentLocation) *StartDocumentTextDetectionInput { 3706 s.DocumentLocation = v 3707 return s 3708} 3709 3710// SetJobTag sets the JobTag field's value. 3711func (s *StartDocumentTextDetectionInput) SetJobTag(v string) *StartDocumentTextDetectionInput { 3712 s.JobTag = &v 3713 return s 3714} 3715 3716// SetKMSKeyId sets the KMSKeyId field's value. 3717func (s *StartDocumentTextDetectionInput) SetKMSKeyId(v string) *StartDocumentTextDetectionInput { 3718 s.KMSKeyId = &v 3719 return s 3720} 3721 3722// SetNotificationChannel sets the NotificationChannel field's value. 3723func (s *StartDocumentTextDetectionInput) SetNotificationChannel(v *NotificationChannel) *StartDocumentTextDetectionInput { 3724 s.NotificationChannel = v 3725 return s 3726} 3727 3728// SetOutputConfig sets the OutputConfig field's value. 3729func (s *StartDocumentTextDetectionInput) SetOutputConfig(v *OutputConfig) *StartDocumentTextDetectionInput { 3730 s.OutputConfig = v 3731 return s 3732} 3733 3734type StartDocumentTextDetectionOutput struct { 3735 _ struct{} `type:"structure"` 3736 3737 // The identifier of the text detection job for the document. Use JobId to identify 3738 // the job in a subsequent call to GetDocumentTextDetection. A JobId value is 3739 // only valid for 7 days. 3740 JobId *string `min:"1" type:"string"` 3741} 3742 3743// String returns the string representation 3744func (s StartDocumentTextDetectionOutput) String() string { 3745 return awsutil.Prettify(s) 3746} 3747 3748// GoString returns the string representation 3749func (s StartDocumentTextDetectionOutput) GoString() string { 3750 return s.String() 3751} 3752 3753// SetJobId sets the JobId field's value. 3754func (s *StartDocumentTextDetectionOutput) SetJobId(v string) *StartDocumentTextDetectionOutput { 3755 s.JobId = &v 3756 return s 3757} 3758 3759// Amazon Textract is temporarily unable to process the request. Try your call 3760// again. 3761type ThrottlingException struct { 3762 _ struct{} `type:"structure"` 3763 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3764 3765 Message_ *string `locationName:"message" type:"string"` 3766} 3767 3768// String returns the string representation 3769func (s ThrottlingException) String() string { 3770 return awsutil.Prettify(s) 3771} 3772 3773// GoString returns the string representation 3774func (s ThrottlingException) GoString() string { 3775 return s.String() 3776} 3777 3778func newErrorThrottlingException(v protocol.ResponseMetadata) error { 3779 return &ThrottlingException{ 3780 RespMetadata: v, 3781 } 3782} 3783 3784// Code returns the exception type name. 3785func (s *ThrottlingException) Code() string { 3786 return "ThrottlingException" 3787} 3788 3789// Message returns the exception's message. 3790func (s *ThrottlingException) Message() string { 3791 if s.Message_ != nil { 3792 return *s.Message_ 3793 } 3794 return "" 3795} 3796 3797// OrigErr always returns nil, satisfies awserr.Error interface. 3798func (s *ThrottlingException) OrigErr() error { 3799 return nil 3800} 3801 3802func (s *ThrottlingException) Error() string { 3803 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3804} 3805 3806// Status code returns the HTTP status code for the request's response error. 3807func (s *ThrottlingException) StatusCode() int { 3808 return s.RespMetadata.StatusCode 3809} 3810 3811// RequestID returns the service's response RequestID for request. 3812func (s *ThrottlingException) RequestID() string { 3813 return s.RespMetadata.RequestID 3814} 3815 3816// The format of the input document isn't supported. Documents for synchronous 3817// operations can be in PNG or JPEG format. Documents for asynchronous operations 3818// can also be in PDF format. 3819type UnsupportedDocumentException struct { 3820 _ struct{} `type:"structure"` 3821 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3822 3823 Message_ *string `locationName:"message" type:"string"` 3824} 3825 3826// String returns the string representation 3827func (s UnsupportedDocumentException) String() string { 3828 return awsutil.Prettify(s) 3829} 3830 3831// GoString returns the string representation 3832func (s UnsupportedDocumentException) GoString() string { 3833 return s.String() 3834} 3835 3836func newErrorUnsupportedDocumentException(v protocol.ResponseMetadata) error { 3837 return &UnsupportedDocumentException{ 3838 RespMetadata: v, 3839 } 3840} 3841 3842// Code returns the exception type name. 3843func (s *UnsupportedDocumentException) Code() string { 3844 return "UnsupportedDocumentException" 3845} 3846 3847// Message returns the exception's message. 3848func (s *UnsupportedDocumentException) Message() string { 3849 if s.Message_ != nil { 3850 return *s.Message_ 3851 } 3852 return "" 3853} 3854 3855// OrigErr always returns nil, satisfies awserr.Error interface. 3856func (s *UnsupportedDocumentException) OrigErr() error { 3857 return nil 3858} 3859 3860func (s *UnsupportedDocumentException) Error() string { 3861 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3862} 3863 3864// Status code returns the HTTP status code for the request's response error. 3865func (s *UnsupportedDocumentException) StatusCode() int { 3866 return s.RespMetadata.StatusCode 3867} 3868 3869// RequestID returns the service's response RequestID for request. 3870func (s *UnsupportedDocumentException) RequestID() string { 3871 return s.RespMetadata.RequestID 3872} 3873 3874// A warning about an issue that occurred during asynchronous text analysis 3875// (StartDocumentAnalysis) or asynchronous document text detection (StartDocumentTextDetection). 3876type Warning struct { 3877 _ struct{} `type:"structure"` 3878 3879 // The error code for the warning. 3880 ErrorCode *string `type:"string"` 3881 3882 // A list of the pages that the warning applies to. 3883 Pages []*int64 `type:"list"` 3884} 3885 3886// String returns the string representation 3887func (s Warning) String() string { 3888 return awsutil.Prettify(s) 3889} 3890 3891// GoString returns the string representation 3892func (s Warning) GoString() string { 3893 return s.String() 3894} 3895 3896// SetErrorCode sets the ErrorCode field's value. 3897func (s *Warning) SetErrorCode(v string) *Warning { 3898 s.ErrorCode = &v 3899 return s 3900} 3901 3902// SetPages sets the Pages field's value. 3903func (s *Warning) SetPages(v []*int64) *Warning { 3904 s.Pages = v 3905 return s 3906} 3907 3908const ( 3909 // BlockTypeKeyValueSet is a BlockType enum value 3910 BlockTypeKeyValueSet = "KEY_VALUE_SET" 3911 3912 // BlockTypePage is a BlockType enum value 3913 BlockTypePage = "PAGE" 3914 3915 // BlockTypeLine is a BlockType enum value 3916 BlockTypeLine = "LINE" 3917 3918 // BlockTypeWord is a BlockType enum value 3919 BlockTypeWord = "WORD" 3920 3921 // BlockTypeTable is a BlockType enum value 3922 BlockTypeTable = "TABLE" 3923 3924 // BlockTypeCell is a BlockType enum value 3925 BlockTypeCell = "CELL" 3926 3927 // BlockTypeSelectionElement is a BlockType enum value 3928 BlockTypeSelectionElement = "SELECTION_ELEMENT" 3929) 3930 3931// BlockType_Values returns all elements of the BlockType enum 3932func BlockType_Values() []string { 3933 return []string{ 3934 BlockTypeKeyValueSet, 3935 BlockTypePage, 3936 BlockTypeLine, 3937 BlockTypeWord, 3938 BlockTypeTable, 3939 BlockTypeCell, 3940 BlockTypeSelectionElement, 3941 } 3942} 3943 3944const ( 3945 // ContentClassifierFreeOfPersonallyIdentifiableInformation is a ContentClassifier enum value 3946 ContentClassifierFreeOfPersonallyIdentifiableInformation = "FreeOfPersonallyIdentifiableInformation" 3947 3948 // ContentClassifierFreeOfAdultContent is a ContentClassifier enum value 3949 ContentClassifierFreeOfAdultContent = "FreeOfAdultContent" 3950) 3951 3952// ContentClassifier_Values returns all elements of the ContentClassifier enum 3953func ContentClassifier_Values() []string { 3954 return []string{ 3955 ContentClassifierFreeOfPersonallyIdentifiableInformation, 3956 ContentClassifierFreeOfAdultContent, 3957 } 3958} 3959 3960const ( 3961 // EntityTypeKey is a EntityType enum value 3962 EntityTypeKey = "KEY" 3963 3964 // EntityTypeValue is a EntityType enum value 3965 EntityTypeValue = "VALUE" 3966) 3967 3968// EntityType_Values returns all elements of the EntityType enum 3969func EntityType_Values() []string { 3970 return []string{ 3971 EntityTypeKey, 3972 EntityTypeValue, 3973 } 3974} 3975 3976const ( 3977 // FeatureTypeTables is a FeatureType enum value 3978 FeatureTypeTables = "TABLES" 3979 3980 // FeatureTypeForms is a FeatureType enum value 3981 FeatureTypeForms = "FORMS" 3982) 3983 3984// FeatureType_Values returns all elements of the FeatureType enum 3985func FeatureType_Values() []string { 3986 return []string{ 3987 FeatureTypeTables, 3988 FeatureTypeForms, 3989 } 3990} 3991 3992const ( 3993 // JobStatusInProgress is a JobStatus enum value 3994 JobStatusInProgress = "IN_PROGRESS" 3995 3996 // JobStatusSucceeded is a JobStatus enum value 3997 JobStatusSucceeded = "SUCCEEDED" 3998 3999 // JobStatusFailed is a JobStatus enum value 4000 JobStatusFailed = "FAILED" 4001 4002 // JobStatusPartialSuccess is a JobStatus enum value 4003 JobStatusPartialSuccess = "PARTIAL_SUCCESS" 4004) 4005 4006// JobStatus_Values returns all elements of the JobStatus enum 4007func JobStatus_Values() []string { 4008 return []string{ 4009 JobStatusInProgress, 4010 JobStatusSucceeded, 4011 JobStatusFailed, 4012 JobStatusPartialSuccess, 4013 } 4014} 4015 4016const ( 4017 // RelationshipTypeValue is a RelationshipType enum value 4018 RelationshipTypeValue = "VALUE" 4019 4020 // RelationshipTypeChild is a RelationshipType enum value 4021 RelationshipTypeChild = "CHILD" 4022 4023 // RelationshipTypeComplexFeatures is a RelationshipType enum value 4024 RelationshipTypeComplexFeatures = "COMPLEX_FEATURES" 4025) 4026 4027// RelationshipType_Values returns all elements of the RelationshipType enum 4028func RelationshipType_Values() []string { 4029 return []string{ 4030 RelationshipTypeValue, 4031 RelationshipTypeChild, 4032 RelationshipTypeComplexFeatures, 4033 } 4034} 4035 4036const ( 4037 // SelectionStatusSelected is a SelectionStatus enum value 4038 SelectionStatusSelected = "SELECTED" 4039 4040 // SelectionStatusNotSelected is a SelectionStatus enum value 4041 SelectionStatusNotSelected = "NOT_SELECTED" 4042) 4043 4044// SelectionStatus_Values returns all elements of the SelectionStatus enum 4045func SelectionStatus_Values() []string { 4046 return []string{ 4047 SelectionStatusSelected, 4048 SelectionStatusNotSelected, 4049 } 4050} 4051 4052const ( 4053 // TextTypeHandwriting is a TextType enum value 4054 TextTypeHandwriting = "HANDWRITING" 4055 4056 // TextTypePrinted is a TextType enum value 4057 TextTypePrinted = "PRINTED" 4058) 4059 4060// TextType_Values returns all elements of the TextType enum 4061func TextType_Values() []string { 4062 return []string{ 4063 TextTypeHandwriting, 4064 TextTypePrinted, 4065 } 4066} 4067