github.com/aavshr/aws-sdk-go@v1.41.3/service/textract/api.go (about) 1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3 package textract 4 5 import ( 6 "fmt" 7 8 "github.com/aavshr/aws-sdk-go/aws" 9 "github.com/aavshr/aws-sdk-go/aws/awsutil" 10 "github.com/aavshr/aws-sdk-go/aws/request" 11 "github.com/aavshr/aws-sdk-go/private/protocol" 12 ) 13 14 const 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 40 func (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 143 func (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. 157 func (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 164 const 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 190 func (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 269 func (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. 283 func (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 290 const 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 316 func (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 398 func (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. 412 func (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 419 const 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 445 func (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 547 func (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. 561 func (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 568 const 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 594 func (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 683 func (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. 697 func (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 704 const 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 730 func (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 830 func (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. 844 func (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 851 const 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 877 func (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 977 func (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. 991 func (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. 1000 type 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. 1008 // 1009 // API parameter values that are decorated as "sensitive" in the API will not 1010 // be included in the string output. The member name will be present, but the 1011 // value will be replaced with "sensitive". 1012 func (s AccessDeniedException) String() string { 1013 return awsutil.Prettify(s) 1014 } 1015 1016 // GoString returns the string representation. 1017 // 1018 // API parameter values that are decorated as "sensitive" in the API will not 1019 // be included in the string output. The member name will be present, but the 1020 // value will be replaced with "sensitive". 1021 func (s AccessDeniedException) GoString() string { 1022 return s.String() 1023 } 1024 1025 func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { 1026 return &AccessDeniedException{ 1027 RespMetadata: v, 1028 } 1029 } 1030 1031 // Code returns the exception type name. 1032 func (s *AccessDeniedException) Code() string { 1033 return "AccessDeniedException" 1034 } 1035 1036 // Message returns the exception's message. 1037 func (s *AccessDeniedException) Message() string { 1038 if s.Message_ != nil { 1039 return *s.Message_ 1040 } 1041 return "" 1042 } 1043 1044 // OrigErr always returns nil, satisfies awserr.Error interface. 1045 func (s *AccessDeniedException) OrigErr() error { 1046 return nil 1047 } 1048 1049 func (s *AccessDeniedException) Error() string { 1050 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1051 } 1052 1053 // Status code returns the HTTP status code for the request's response error. 1054 func (s *AccessDeniedException) StatusCode() int { 1055 return s.RespMetadata.StatusCode 1056 } 1057 1058 // RequestID returns the service's response RequestID for request. 1059 func (s *AccessDeniedException) RequestID() string { 1060 return s.RespMetadata.RequestID 1061 } 1062 1063 type AnalyzeDocumentInput struct { 1064 _ struct{} `type:"structure"` 1065 1066 // The input document as base64-encoded bytes or an Amazon S3 object. If you 1067 // use the AWS CLI to call Amazon Textract operations, you can't pass image 1068 // bytes. The document must be an image in JPEG or PNG format. 1069 // 1070 // If you're using an AWS SDK to call Amazon Textract, you might not need to 1071 // base64-encode image bytes that are passed using the Bytes field. 1072 // 1073 // Document is a required field 1074 Document *Document `type:"structure" required:"true"` 1075 1076 // A list of the types of analysis to perform. Add TABLES to the list to return 1077 // information about the tables that are detected in the input document. Add 1078 // FORMS to return detected form data. To perform both types of analysis, add 1079 // TABLES and FORMS to FeatureTypes. All lines and words detected in the document 1080 // are included in the response (including text that isn't related to the value 1081 // of FeatureTypes). 1082 // 1083 // FeatureTypes is a required field 1084 FeatureTypes []*string `type:"list" required:"true"` 1085 1086 // Sets the configuration for the human in the loop workflow for analyzing documents. 1087 HumanLoopConfig *HumanLoopConfig `type:"structure"` 1088 } 1089 1090 // String returns the string representation. 1091 // 1092 // API parameter values that are decorated as "sensitive" in the API will not 1093 // be included in the string output. The member name will be present, but the 1094 // value will be replaced with "sensitive". 1095 func (s AnalyzeDocumentInput) String() string { 1096 return awsutil.Prettify(s) 1097 } 1098 1099 // GoString returns the string representation. 1100 // 1101 // API parameter values that are decorated as "sensitive" in the API will not 1102 // be included in the string output. The member name will be present, but the 1103 // value will be replaced with "sensitive". 1104 func (s AnalyzeDocumentInput) GoString() string { 1105 return s.String() 1106 } 1107 1108 // Validate inspects the fields of the type to determine if they are valid. 1109 func (s *AnalyzeDocumentInput) Validate() error { 1110 invalidParams := request.ErrInvalidParams{Context: "AnalyzeDocumentInput"} 1111 if s.Document == nil { 1112 invalidParams.Add(request.NewErrParamRequired("Document")) 1113 } 1114 if s.FeatureTypes == nil { 1115 invalidParams.Add(request.NewErrParamRequired("FeatureTypes")) 1116 } 1117 if s.Document != nil { 1118 if err := s.Document.Validate(); err != nil { 1119 invalidParams.AddNested("Document", err.(request.ErrInvalidParams)) 1120 } 1121 } 1122 if s.HumanLoopConfig != nil { 1123 if err := s.HumanLoopConfig.Validate(); err != nil { 1124 invalidParams.AddNested("HumanLoopConfig", err.(request.ErrInvalidParams)) 1125 } 1126 } 1127 1128 if invalidParams.Len() > 0 { 1129 return invalidParams 1130 } 1131 return nil 1132 } 1133 1134 // SetDocument sets the Document field's value. 1135 func (s *AnalyzeDocumentInput) SetDocument(v *Document) *AnalyzeDocumentInput { 1136 s.Document = v 1137 return s 1138 } 1139 1140 // SetFeatureTypes sets the FeatureTypes field's value. 1141 func (s *AnalyzeDocumentInput) SetFeatureTypes(v []*string) *AnalyzeDocumentInput { 1142 s.FeatureTypes = v 1143 return s 1144 } 1145 1146 // SetHumanLoopConfig sets the HumanLoopConfig field's value. 1147 func (s *AnalyzeDocumentInput) SetHumanLoopConfig(v *HumanLoopConfig) *AnalyzeDocumentInput { 1148 s.HumanLoopConfig = v 1149 return s 1150 } 1151 1152 type AnalyzeDocumentOutput struct { 1153 _ struct{} `type:"structure"` 1154 1155 // The version of the model used to analyze the document. 1156 AnalyzeDocumentModelVersion *string `type:"string"` 1157 1158 // The items that are detected and analyzed by AnalyzeDocument. 1159 Blocks []*Block `type:"list"` 1160 1161 // Metadata about the analyzed document. An example is the number of pages. 1162 DocumentMetadata *DocumentMetadata `type:"structure"` 1163 1164 // Shows the results of the human in the loop evaluation. 1165 HumanLoopActivationOutput *HumanLoopActivationOutput `type:"structure"` 1166 } 1167 1168 // String returns the string representation. 1169 // 1170 // API parameter values that are decorated as "sensitive" in the API will not 1171 // be included in the string output. The member name will be present, but the 1172 // value will be replaced with "sensitive". 1173 func (s AnalyzeDocumentOutput) String() string { 1174 return awsutil.Prettify(s) 1175 } 1176 1177 // GoString returns the string representation. 1178 // 1179 // API parameter values that are decorated as "sensitive" in the API will not 1180 // be included in the string output. The member name will be present, but the 1181 // value will be replaced with "sensitive". 1182 func (s AnalyzeDocumentOutput) GoString() string { 1183 return s.String() 1184 } 1185 1186 // SetAnalyzeDocumentModelVersion sets the AnalyzeDocumentModelVersion field's value. 1187 func (s *AnalyzeDocumentOutput) SetAnalyzeDocumentModelVersion(v string) *AnalyzeDocumentOutput { 1188 s.AnalyzeDocumentModelVersion = &v 1189 return s 1190 } 1191 1192 // SetBlocks sets the Blocks field's value. 1193 func (s *AnalyzeDocumentOutput) SetBlocks(v []*Block) *AnalyzeDocumentOutput { 1194 s.Blocks = v 1195 return s 1196 } 1197 1198 // SetDocumentMetadata sets the DocumentMetadata field's value. 1199 func (s *AnalyzeDocumentOutput) SetDocumentMetadata(v *DocumentMetadata) *AnalyzeDocumentOutput { 1200 s.DocumentMetadata = v 1201 return s 1202 } 1203 1204 // SetHumanLoopActivationOutput sets the HumanLoopActivationOutput field's value. 1205 func (s *AnalyzeDocumentOutput) SetHumanLoopActivationOutput(v *HumanLoopActivationOutput) *AnalyzeDocumentOutput { 1206 s.HumanLoopActivationOutput = v 1207 return s 1208 } 1209 1210 type AnalyzeExpenseInput struct { 1211 _ struct{} `type:"structure"` 1212 1213 // The input document, either as bytes or as an S3 object. 1214 // 1215 // You pass image bytes to an Amazon Textract API operation by using the Bytes 1216 // property. For example, you would use the Bytes property to pass a document 1217 // loaded from a local file system. Image bytes passed by using the Bytes property 1218 // must be base64 encoded. Your code might not need to encode document file 1219 // bytes if you're using an AWS SDK to call Amazon Textract API operations. 1220 // 1221 // You pass images stored in an S3 bucket to an Amazon Textract API operation 1222 // by using the S3Object property. Documents stored in an S3 bucket don't need 1223 // to be base64 encoded. 1224 // 1225 // The AWS Region for the S3 bucket that contains the S3 object must match the 1226 // AWS Region that you use for Amazon Textract operations. 1227 // 1228 // If you use the AWS CLI to call Amazon Textract operations, passing image 1229 // bytes using the Bytes property isn't supported. You must first upload the 1230 // document to an Amazon S3 bucket, and then call the operation using the S3Object 1231 // property. 1232 // 1233 // For Amazon Textract to process an S3 object, the user must have permission 1234 // to access the S3 object. 1235 // 1236 // Document is a required field 1237 Document *Document `type:"structure" required:"true"` 1238 } 1239 1240 // String returns the string representation. 1241 // 1242 // API parameter values that are decorated as "sensitive" in the API will not 1243 // be included in the string output. The member name will be present, but the 1244 // value will be replaced with "sensitive". 1245 func (s AnalyzeExpenseInput) String() string { 1246 return awsutil.Prettify(s) 1247 } 1248 1249 // GoString returns the string representation. 1250 // 1251 // API parameter values that are decorated as "sensitive" in the API will not 1252 // be included in the string output. The member name will be present, but the 1253 // value will be replaced with "sensitive". 1254 func (s AnalyzeExpenseInput) GoString() string { 1255 return s.String() 1256 } 1257 1258 // Validate inspects the fields of the type to determine if they are valid. 1259 func (s *AnalyzeExpenseInput) Validate() error { 1260 invalidParams := request.ErrInvalidParams{Context: "AnalyzeExpenseInput"} 1261 if s.Document == nil { 1262 invalidParams.Add(request.NewErrParamRequired("Document")) 1263 } 1264 if s.Document != nil { 1265 if err := s.Document.Validate(); err != nil { 1266 invalidParams.AddNested("Document", err.(request.ErrInvalidParams)) 1267 } 1268 } 1269 1270 if invalidParams.Len() > 0 { 1271 return invalidParams 1272 } 1273 return nil 1274 } 1275 1276 // SetDocument sets the Document field's value. 1277 func (s *AnalyzeExpenseInput) SetDocument(v *Document) *AnalyzeExpenseInput { 1278 s.Document = v 1279 return s 1280 } 1281 1282 type AnalyzeExpenseOutput struct { 1283 _ struct{} `type:"structure"` 1284 1285 // Information about the input document. 1286 DocumentMetadata *DocumentMetadata `type:"structure"` 1287 1288 // The expenses detected by Amazon Textract. 1289 ExpenseDocuments []*ExpenseDocument `type:"list"` 1290 } 1291 1292 // String returns the string representation. 1293 // 1294 // API parameter values that are decorated as "sensitive" in the API will not 1295 // be included in the string output. The member name will be present, but the 1296 // value will be replaced with "sensitive". 1297 func (s AnalyzeExpenseOutput) String() string { 1298 return awsutil.Prettify(s) 1299 } 1300 1301 // GoString returns the string representation. 1302 // 1303 // API parameter values that are decorated as "sensitive" in the API will not 1304 // be included in the string output. The member name will be present, but the 1305 // value will be replaced with "sensitive". 1306 func (s AnalyzeExpenseOutput) GoString() string { 1307 return s.String() 1308 } 1309 1310 // SetDocumentMetadata sets the DocumentMetadata field's value. 1311 func (s *AnalyzeExpenseOutput) SetDocumentMetadata(v *DocumentMetadata) *AnalyzeExpenseOutput { 1312 s.DocumentMetadata = v 1313 return s 1314 } 1315 1316 // SetExpenseDocuments sets the ExpenseDocuments field's value. 1317 func (s *AnalyzeExpenseOutput) SetExpenseDocuments(v []*ExpenseDocument) *AnalyzeExpenseOutput { 1318 s.ExpenseDocuments = v 1319 return s 1320 } 1321 1322 // Amazon Textract isn't able to read the document. For more information on 1323 // the document limits in Amazon Textract, see limits. 1324 type BadDocumentException struct { 1325 _ struct{} `type:"structure"` 1326 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1327 1328 Message_ *string `locationName:"message" type:"string"` 1329 } 1330 1331 // String returns the string representation. 1332 // 1333 // API parameter values that are decorated as "sensitive" in the API will not 1334 // be included in the string output. The member name will be present, but the 1335 // value will be replaced with "sensitive". 1336 func (s BadDocumentException) String() string { 1337 return awsutil.Prettify(s) 1338 } 1339 1340 // GoString returns the string representation. 1341 // 1342 // API parameter values that are decorated as "sensitive" in the API will not 1343 // be included in the string output. The member name will be present, but the 1344 // value will be replaced with "sensitive". 1345 func (s BadDocumentException) GoString() string { 1346 return s.String() 1347 } 1348 1349 func newErrorBadDocumentException(v protocol.ResponseMetadata) error { 1350 return &BadDocumentException{ 1351 RespMetadata: v, 1352 } 1353 } 1354 1355 // Code returns the exception type name. 1356 func (s *BadDocumentException) Code() string { 1357 return "BadDocumentException" 1358 } 1359 1360 // Message returns the exception's message. 1361 func (s *BadDocumentException) Message() string { 1362 if s.Message_ != nil { 1363 return *s.Message_ 1364 } 1365 return "" 1366 } 1367 1368 // OrigErr always returns nil, satisfies awserr.Error interface. 1369 func (s *BadDocumentException) OrigErr() error { 1370 return nil 1371 } 1372 1373 func (s *BadDocumentException) Error() string { 1374 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1375 } 1376 1377 // Status code returns the HTTP status code for the request's response error. 1378 func (s *BadDocumentException) StatusCode() int { 1379 return s.RespMetadata.StatusCode 1380 } 1381 1382 // RequestID returns the service's response RequestID for request. 1383 func (s *BadDocumentException) RequestID() string { 1384 return s.RespMetadata.RequestID 1385 } 1386 1387 // A Block represents items that are recognized in a document within a group 1388 // of pixels close to each other. The information returned in a Block object 1389 // depends on the type of operation. In text detection for documents (for example 1390 // DetectDocumentText), you get information about the detected words and lines 1391 // of text. In text analysis (for example AnalyzeDocument), you can also get 1392 // information about the fields, tables, and selection elements that are detected 1393 // in the document. 1394 // 1395 // An array of Block objects is returned by both synchronous and asynchronous 1396 // operations. In synchronous operations, such as DetectDocumentText, the array 1397 // of Block objects is the entire set of results. In asynchronous operations, 1398 // such as GetDocumentAnalysis, the array is returned over one or more responses. 1399 // 1400 // For more information, see How Amazon Textract Works (https://docs.aws.amazon.com/textract/latest/dg/how-it-works.html). 1401 type Block struct { 1402 _ struct{} `type:"structure"` 1403 1404 // The type of text item that's recognized. In operations for text detection, 1405 // the following types are returned: 1406 // 1407 // * PAGE - Contains a list of the LINE Block objects that are detected on 1408 // a document page. 1409 // 1410 // * WORD - A word detected on a document page. A word is one or more ISO 1411 // basic Latin script characters that aren't separated by spaces. 1412 // 1413 // * LINE - A string of tab-delimited, contiguous words that are detected 1414 // on a document page. 1415 // 1416 // In text analysis operations, the following types are returned: 1417 // 1418 // * PAGE - Contains a list of child Block objects that are detected on a 1419 // document page. 1420 // 1421 // * KEY_VALUE_SET - Stores the KEY and VALUE Block objects for linked text 1422 // that's detected on a document page. Use the EntityType field to determine 1423 // if a KEY_VALUE_SET object is a KEY Block object or a VALUE Block object. 1424 // 1425 // * WORD - A word that's detected on a document page. A word is one or more 1426 // ISO basic Latin script characters that aren't separated by spaces. 1427 // 1428 // * LINE - A string of tab-delimited, contiguous words that are detected 1429 // on a document page. 1430 // 1431 // * TABLE - A table that's detected on a document page. A table is grid-based 1432 // information with two or more rows or columns, with a cell span of one 1433 // row and one column each. 1434 // 1435 // * CELL - A cell within a detected table. The cell is the parent of the 1436 // block that contains the text in the cell. 1437 // 1438 // * SELECTION_ELEMENT - A selection element such as an option button (radio 1439 // button) or a check box that's detected on a document page. Use the value 1440 // of SelectionStatus to determine the status of the selection element. 1441 BlockType *string `type:"string" enum:"BlockType"` 1442 1443 // The column in which a table cell appears. The first column position is 1. 1444 // ColumnIndex isn't returned by DetectDocumentText and GetDocumentTextDetection. 1445 ColumnIndex *int64 `type:"integer"` 1446 1447 // The number of columns that a table cell spans. Currently this value is always 1448 // 1, even if the number of columns spanned is greater than 1. ColumnSpan isn't 1449 // returned by DetectDocumentText and GetDocumentTextDetection. 1450 ColumnSpan *int64 `type:"integer"` 1451 1452 // The confidence score that Amazon Textract has in the accuracy of the recognized 1453 // text and the accuracy of the geometry points around the recognized text. 1454 Confidence *float64 `type:"float"` 1455 1456 // The type of entity. The following can be returned: 1457 // 1458 // * KEY - An identifier for a field on the document. 1459 // 1460 // * VALUE - The field text. 1461 // 1462 // EntityTypes isn't returned by DetectDocumentText and GetDocumentTextDetection. 1463 EntityTypes []*string `type:"list"` 1464 1465 // The location of the recognized text on the image. It includes an axis-aligned, 1466 // coarse bounding box that surrounds the text, and a finer-grain polygon for 1467 // more accurate spatial information. 1468 Geometry *Geometry `type:"structure"` 1469 1470 // The identifier for the recognized text. The identifier is only unique for 1471 // a single operation. 1472 Id *string `type:"string"` 1473 1474 // The page on which a block was detected. Page is returned by asynchronous 1475 // operations. Page values greater than 1 are only returned for multipage documents 1476 // that are in PDF format. A scanned image (JPEG/PNG), even if it contains multiple 1477 // document pages, is considered to be a single-page document. The value of 1478 // Page is always 1. Synchronous operations don't return Page because every 1479 // input document is considered to be a single-page document. 1480 Page *int64 `type:"integer"` 1481 1482 // A list of child blocks of the current block. For example, a LINE object has 1483 // child blocks for each WORD block that's part of the line of text. There aren't 1484 // Relationship objects in the list for relationships that don't exist, such 1485 // as when the current block has no child blocks. The list size can be the following: 1486 // 1487 // * 0 - The block has no child blocks. 1488 // 1489 // * 1 - The block has child blocks. 1490 Relationships []*Relationship `type:"list"` 1491 1492 // The row in which a table cell is located. The first row position is 1. RowIndex 1493 // isn't returned by DetectDocumentText and GetDocumentTextDetection. 1494 RowIndex *int64 `type:"integer"` 1495 1496 // The number of rows that a table cell spans. Currently this value is always 1497 // 1, even if the number of rows spanned is greater than 1. RowSpan isn't returned 1498 // by DetectDocumentText and GetDocumentTextDetection. 1499 RowSpan *int64 `type:"integer"` 1500 1501 // The selection status of a selection element, such as an option button or 1502 // check box. 1503 SelectionStatus *string `type:"string" enum:"SelectionStatus"` 1504 1505 // The word or line of text that's recognized by Amazon Textract. 1506 Text *string `type:"string"` 1507 1508 // The kind of text that Amazon Textract has detected. Can check for handwritten 1509 // text and printed text. 1510 TextType *string `type:"string" enum:"TextType"` 1511 } 1512 1513 // String returns the string representation. 1514 // 1515 // API parameter values that are decorated as "sensitive" in the API will not 1516 // be included in the string output. The member name will be present, but the 1517 // value will be replaced with "sensitive". 1518 func (s Block) String() string { 1519 return awsutil.Prettify(s) 1520 } 1521 1522 // GoString returns the string representation. 1523 // 1524 // API parameter values that are decorated as "sensitive" in the API will not 1525 // be included in the string output. The member name will be present, but the 1526 // value will be replaced with "sensitive". 1527 func (s Block) GoString() string { 1528 return s.String() 1529 } 1530 1531 // SetBlockType sets the BlockType field's value. 1532 func (s *Block) SetBlockType(v string) *Block { 1533 s.BlockType = &v 1534 return s 1535 } 1536 1537 // SetColumnIndex sets the ColumnIndex field's value. 1538 func (s *Block) SetColumnIndex(v int64) *Block { 1539 s.ColumnIndex = &v 1540 return s 1541 } 1542 1543 // SetColumnSpan sets the ColumnSpan field's value. 1544 func (s *Block) SetColumnSpan(v int64) *Block { 1545 s.ColumnSpan = &v 1546 return s 1547 } 1548 1549 // SetConfidence sets the Confidence field's value. 1550 func (s *Block) SetConfidence(v float64) *Block { 1551 s.Confidence = &v 1552 return s 1553 } 1554 1555 // SetEntityTypes sets the EntityTypes field's value. 1556 func (s *Block) SetEntityTypes(v []*string) *Block { 1557 s.EntityTypes = v 1558 return s 1559 } 1560 1561 // SetGeometry sets the Geometry field's value. 1562 func (s *Block) SetGeometry(v *Geometry) *Block { 1563 s.Geometry = v 1564 return s 1565 } 1566 1567 // SetId sets the Id field's value. 1568 func (s *Block) SetId(v string) *Block { 1569 s.Id = &v 1570 return s 1571 } 1572 1573 // SetPage sets the Page field's value. 1574 func (s *Block) SetPage(v int64) *Block { 1575 s.Page = &v 1576 return s 1577 } 1578 1579 // SetRelationships sets the Relationships field's value. 1580 func (s *Block) SetRelationships(v []*Relationship) *Block { 1581 s.Relationships = v 1582 return s 1583 } 1584 1585 // SetRowIndex sets the RowIndex field's value. 1586 func (s *Block) SetRowIndex(v int64) *Block { 1587 s.RowIndex = &v 1588 return s 1589 } 1590 1591 // SetRowSpan sets the RowSpan field's value. 1592 func (s *Block) SetRowSpan(v int64) *Block { 1593 s.RowSpan = &v 1594 return s 1595 } 1596 1597 // SetSelectionStatus sets the SelectionStatus field's value. 1598 func (s *Block) SetSelectionStatus(v string) *Block { 1599 s.SelectionStatus = &v 1600 return s 1601 } 1602 1603 // SetText sets the Text field's value. 1604 func (s *Block) SetText(v string) *Block { 1605 s.Text = &v 1606 return s 1607 } 1608 1609 // SetTextType sets the TextType field's value. 1610 func (s *Block) SetTextType(v string) *Block { 1611 s.TextType = &v 1612 return s 1613 } 1614 1615 // The bounding box around the detected page, text, key-value pair, table, table 1616 // cell, or selection element on a document page. The left (x-coordinate) and 1617 // top (y-coordinate) are coordinates that represent the top and left sides 1618 // of the bounding box. Note that the upper-left corner of the image is the 1619 // origin (0,0). 1620 // 1621 // The top and left values returned are ratios of the overall document page 1622 // size. For example, if the input image is 700 x 200 pixels, and the top-left 1623 // coordinate of the bounding box is 350 x 50 pixels, the API returns a left 1624 // value of 0.5 (350/700) and a top value of 0.25 (50/200). 1625 // 1626 // The width and height values represent the dimensions of the bounding box 1627 // as a ratio of the overall document page dimension. For example, if the document 1628 // page size is 700 x 200 pixels, and the bounding box width is 70 pixels, the 1629 // width returned is 0.1. 1630 type BoundingBox struct { 1631 _ struct{} `type:"structure"` 1632 1633 // The height of the bounding box as a ratio of the overall document page height. 1634 Height *float64 `type:"float"` 1635 1636 // The left coordinate of the bounding box as a ratio of overall document page 1637 // width. 1638 Left *float64 `type:"float"` 1639 1640 // The top coordinate of the bounding box as a ratio of overall document page 1641 // height. 1642 Top *float64 `type:"float"` 1643 1644 // The width of the bounding box as a ratio of the overall document page width. 1645 Width *float64 `type:"float"` 1646 } 1647 1648 // String returns the string representation. 1649 // 1650 // API parameter values that are decorated as "sensitive" in the API will not 1651 // be included in the string output. The member name will be present, but the 1652 // value will be replaced with "sensitive". 1653 func (s BoundingBox) String() string { 1654 return awsutil.Prettify(s) 1655 } 1656 1657 // GoString returns the string representation. 1658 // 1659 // API parameter values that are decorated as "sensitive" in the API will not 1660 // be included in the string output. The member name will be present, but the 1661 // value will be replaced with "sensitive". 1662 func (s BoundingBox) GoString() string { 1663 return s.String() 1664 } 1665 1666 // SetHeight sets the Height field's value. 1667 func (s *BoundingBox) SetHeight(v float64) *BoundingBox { 1668 s.Height = &v 1669 return s 1670 } 1671 1672 // SetLeft sets the Left field's value. 1673 func (s *BoundingBox) SetLeft(v float64) *BoundingBox { 1674 s.Left = &v 1675 return s 1676 } 1677 1678 // SetTop sets the Top field's value. 1679 func (s *BoundingBox) SetTop(v float64) *BoundingBox { 1680 s.Top = &v 1681 return s 1682 } 1683 1684 // SetWidth sets the Width field's value. 1685 func (s *BoundingBox) SetWidth(v float64) *BoundingBox { 1686 s.Width = &v 1687 return s 1688 } 1689 1690 type DetectDocumentTextInput struct { 1691 _ struct{} `type:"structure"` 1692 1693 // The input document as base64-encoded bytes or an Amazon S3 object. If you 1694 // use the AWS CLI to call Amazon Textract operations, you can't pass image 1695 // bytes. The document must be an image in JPEG or PNG format. 1696 // 1697 // If you're using an AWS SDK to call Amazon Textract, you might not need to 1698 // base64-encode image bytes that are passed using the Bytes field. 1699 // 1700 // Document is a required field 1701 Document *Document `type:"structure" required:"true"` 1702 } 1703 1704 // String returns the string representation. 1705 // 1706 // API parameter values that are decorated as "sensitive" in the API will not 1707 // be included in the string output. The member name will be present, but the 1708 // value will be replaced with "sensitive". 1709 func (s DetectDocumentTextInput) String() string { 1710 return awsutil.Prettify(s) 1711 } 1712 1713 // GoString returns the string representation. 1714 // 1715 // API parameter values that are decorated as "sensitive" in the API will not 1716 // be included in the string output. The member name will be present, but the 1717 // value will be replaced with "sensitive". 1718 func (s DetectDocumentTextInput) GoString() string { 1719 return s.String() 1720 } 1721 1722 // Validate inspects the fields of the type to determine if they are valid. 1723 func (s *DetectDocumentTextInput) Validate() error { 1724 invalidParams := request.ErrInvalidParams{Context: "DetectDocumentTextInput"} 1725 if s.Document == nil { 1726 invalidParams.Add(request.NewErrParamRequired("Document")) 1727 } 1728 if s.Document != nil { 1729 if err := s.Document.Validate(); err != nil { 1730 invalidParams.AddNested("Document", err.(request.ErrInvalidParams)) 1731 } 1732 } 1733 1734 if invalidParams.Len() > 0 { 1735 return invalidParams 1736 } 1737 return nil 1738 } 1739 1740 // SetDocument sets the Document field's value. 1741 func (s *DetectDocumentTextInput) SetDocument(v *Document) *DetectDocumentTextInput { 1742 s.Document = v 1743 return s 1744 } 1745 1746 type DetectDocumentTextOutput struct { 1747 _ struct{} `type:"structure"` 1748 1749 // An array of Block objects that contain the text that's detected in the document. 1750 Blocks []*Block `type:"list"` 1751 1752 DetectDocumentTextModelVersion *string `type:"string"` 1753 1754 // Metadata about the document. It contains the number of pages that are detected 1755 // in the document. 1756 DocumentMetadata *DocumentMetadata `type:"structure"` 1757 } 1758 1759 // String returns the string representation. 1760 // 1761 // API parameter values that are decorated as "sensitive" in the API will not 1762 // be included in the string output. The member name will be present, but the 1763 // value will be replaced with "sensitive". 1764 func (s DetectDocumentTextOutput) String() string { 1765 return awsutil.Prettify(s) 1766 } 1767 1768 // GoString returns the string representation. 1769 // 1770 // API parameter values that are decorated as "sensitive" in the API will not 1771 // be included in the string output. The member name will be present, but the 1772 // value will be replaced with "sensitive". 1773 func (s DetectDocumentTextOutput) GoString() string { 1774 return s.String() 1775 } 1776 1777 // SetBlocks sets the Blocks field's value. 1778 func (s *DetectDocumentTextOutput) SetBlocks(v []*Block) *DetectDocumentTextOutput { 1779 s.Blocks = v 1780 return s 1781 } 1782 1783 // SetDetectDocumentTextModelVersion sets the DetectDocumentTextModelVersion field's value. 1784 func (s *DetectDocumentTextOutput) SetDetectDocumentTextModelVersion(v string) *DetectDocumentTextOutput { 1785 s.DetectDocumentTextModelVersion = &v 1786 return s 1787 } 1788 1789 // SetDocumentMetadata sets the DocumentMetadata field's value. 1790 func (s *DetectDocumentTextOutput) SetDocumentMetadata(v *DocumentMetadata) *DetectDocumentTextOutput { 1791 s.DocumentMetadata = v 1792 return s 1793 } 1794 1795 // The input document, either as bytes or as an S3 object. 1796 // 1797 // You pass image bytes to an Amazon Textract API operation by using the Bytes 1798 // property. For example, you would use the Bytes property to pass a document 1799 // loaded from a local file system. Image bytes passed by using the Bytes property 1800 // must be base64 encoded. Your code might not need to encode document file 1801 // bytes if you're using an AWS SDK to call Amazon Textract API operations. 1802 // 1803 // You pass images stored in an S3 bucket to an Amazon Textract API operation 1804 // by using the S3Object property. Documents stored in an S3 bucket don't need 1805 // to be base64 encoded. 1806 // 1807 // The AWS Region for the S3 bucket that contains the S3 object must match the 1808 // AWS Region that you use for Amazon Textract operations. 1809 // 1810 // If you use the AWS CLI to call Amazon Textract operations, passing image 1811 // bytes using the Bytes property isn't supported. You must first upload the 1812 // document to an Amazon S3 bucket, and then call the operation using the S3Object 1813 // property. 1814 // 1815 // For Amazon Textract to process an S3 object, the user must have permission 1816 // to access the S3 object. 1817 type Document struct { 1818 _ struct{} `type:"structure"` 1819 1820 // A blob of base64-encoded document bytes. The maximum size of a document that's 1821 // provided in a blob of bytes is 5 MB. The document bytes must be in PNG or 1822 // JPEG format. 1823 // 1824 // If you're using an AWS SDK to call Amazon Textract, you might not need to 1825 // base64-encode image bytes passed using the Bytes field. 1826 // Bytes is automatically base64 encoded/decoded by the SDK. 1827 Bytes []byte `min:"1" type:"blob"` 1828 1829 // Identifies an S3 object as the document source. The maximum size of a document 1830 // that's stored in an S3 bucket is 5 MB. 1831 S3Object *S3Object `type:"structure"` 1832 } 1833 1834 // String returns the string representation. 1835 // 1836 // API parameter values that are decorated as "sensitive" in the API will not 1837 // be included in the string output. The member name will be present, but the 1838 // value will be replaced with "sensitive". 1839 func (s Document) String() string { 1840 return awsutil.Prettify(s) 1841 } 1842 1843 // GoString returns the string representation. 1844 // 1845 // API parameter values that are decorated as "sensitive" in the API will not 1846 // be included in the string output. The member name will be present, but the 1847 // value will be replaced with "sensitive". 1848 func (s Document) GoString() string { 1849 return s.String() 1850 } 1851 1852 // Validate inspects the fields of the type to determine if they are valid. 1853 func (s *Document) Validate() error { 1854 invalidParams := request.ErrInvalidParams{Context: "Document"} 1855 if s.Bytes != nil && len(s.Bytes) < 1 { 1856 invalidParams.Add(request.NewErrParamMinLen("Bytes", 1)) 1857 } 1858 if s.S3Object != nil { 1859 if err := s.S3Object.Validate(); err != nil { 1860 invalidParams.AddNested("S3Object", err.(request.ErrInvalidParams)) 1861 } 1862 } 1863 1864 if invalidParams.Len() > 0 { 1865 return invalidParams 1866 } 1867 return nil 1868 } 1869 1870 // SetBytes sets the Bytes field's value. 1871 func (s *Document) SetBytes(v []byte) *Document { 1872 s.Bytes = v 1873 return s 1874 } 1875 1876 // SetS3Object sets the S3Object field's value. 1877 func (s *Document) SetS3Object(v *S3Object) *Document { 1878 s.S3Object = v 1879 return s 1880 } 1881 1882 // The Amazon S3 bucket that contains the document to be processed. It's used 1883 // by asynchronous operations such as StartDocumentTextDetection. 1884 // 1885 // The input document can be an image file in JPEG or PNG format. It can also 1886 // be a file in PDF format. 1887 type DocumentLocation struct { 1888 _ struct{} `type:"structure"` 1889 1890 // The Amazon S3 bucket that contains the input document. 1891 S3Object *S3Object `type:"structure"` 1892 } 1893 1894 // String returns the string representation. 1895 // 1896 // API parameter values that are decorated as "sensitive" in the API will not 1897 // be included in the string output. The member name will be present, but the 1898 // value will be replaced with "sensitive". 1899 func (s DocumentLocation) String() string { 1900 return awsutil.Prettify(s) 1901 } 1902 1903 // GoString returns the string representation. 1904 // 1905 // API parameter values that are decorated as "sensitive" in the API will not 1906 // be included in the string output. The member name will be present, but the 1907 // value will be replaced with "sensitive". 1908 func (s DocumentLocation) GoString() string { 1909 return s.String() 1910 } 1911 1912 // Validate inspects the fields of the type to determine if they are valid. 1913 func (s *DocumentLocation) Validate() error { 1914 invalidParams := request.ErrInvalidParams{Context: "DocumentLocation"} 1915 if s.S3Object != nil { 1916 if err := s.S3Object.Validate(); err != nil { 1917 invalidParams.AddNested("S3Object", err.(request.ErrInvalidParams)) 1918 } 1919 } 1920 1921 if invalidParams.Len() > 0 { 1922 return invalidParams 1923 } 1924 return nil 1925 } 1926 1927 // SetS3Object sets the S3Object field's value. 1928 func (s *DocumentLocation) SetS3Object(v *S3Object) *DocumentLocation { 1929 s.S3Object = v 1930 return s 1931 } 1932 1933 // Information about the input document. 1934 type DocumentMetadata struct { 1935 _ struct{} `type:"structure"` 1936 1937 // The number of pages that are detected in the document. 1938 Pages *int64 `type:"integer"` 1939 } 1940 1941 // String returns the string representation. 1942 // 1943 // API parameter values that are decorated as "sensitive" in the API will not 1944 // be included in the string output. The member name will be present, but the 1945 // value will be replaced with "sensitive". 1946 func (s DocumentMetadata) String() string { 1947 return awsutil.Prettify(s) 1948 } 1949 1950 // GoString returns the string representation. 1951 // 1952 // API parameter values that are decorated as "sensitive" in the API will not 1953 // be included in the string output. The member name will be present, but the 1954 // value will be replaced with "sensitive". 1955 func (s DocumentMetadata) GoString() string { 1956 return s.String() 1957 } 1958 1959 // SetPages sets the Pages field's value. 1960 func (s *DocumentMetadata) SetPages(v int64) *DocumentMetadata { 1961 s.Pages = &v 1962 return s 1963 } 1964 1965 // The document can't be processed because it's too large. The maximum document 1966 // size for synchronous operations 10 MB. The maximum document size for asynchronous 1967 // operations is 500 MB for PDF files. 1968 type DocumentTooLargeException struct { 1969 _ struct{} `type:"structure"` 1970 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1971 1972 Message_ *string `locationName:"message" type:"string"` 1973 } 1974 1975 // String returns the string representation. 1976 // 1977 // API parameter values that are decorated as "sensitive" in the API will not 1978 // be included in the string output. The member name will be present, but the 1979 // value will be replaced with "sensitive". 1980 func (s DocumentTooLargeException) String() string { 1981 return awsutil.Prettify(s) 1982 } 1983 1984 // GoString returns the string representation. 1985 // 1986 // API parameter values that are decorated as "sensitive" in the API will not 1987 // be included in the string output. The member name will be present, but the 1988 // value will be replaced with "sensitive". 1989 func (s DocumentTooLargeException) GoString() string { 1990 return s.String() 1991 } 1992 1993 func newErrorDocumentTooLargeException(v protocol.ResponseMetadata) error { 1994 return &DocumentTooLargeException{ 1995 RespMetadata: v, 1996 } 1997 } 1998 1999 // Code returns the exception type name. 2000 func (s *DocumentTooLargeException) Code() string { 2001 return "DocumentTooLargeException" 2002 } 2003 2004 // Message returns the exception's message. 2005 func (s *DocumentTooLargeException) Message() string { 2006 if s.Message_ != nil { 2007 return *s.Message_ 2008 } 2009 return "" 2010 } 2011 2012 // OrigErr always returns nil, satisfies awserr.Error interface. 2013 func (s *DocumentTooLargeException) OrigErr() error { 2014 return nil 2015 } 2016 2017 func (s *DocumentTooLargeException) Error() string { 2018 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2019 } 2020 2021 // Status code returns the HTTP status code for the request's response error. 2022 func (s *DocumentTooLargeException) StatusCode() int { 2023 return s.RespMetadata.StatusCode 2024 } 2025 2026 // RequestID returns the service's response RequestID for request. 2027 func (s *DocumentTooLargeException) RequestID() string { 2028 return s.RespMetadata.RequestID 2029 } 2030 2031 // An object used to store information about the Value or Label detected by 2032 // Amazon Textract. 2033 type ExpenseDetection struct { 2034 _ struct{} `type:"structure"` 2035 2036 // The confidence in detection, as a percentage 2037 Confidence *float64 `type:"float"` 2038 2039 // Information about where the following items are located on a document page: 2040 // detected page, text, key-value pairs, tables, table cells, and selection 2041 // elements. 2042 Geometry *Geometry `type:"structure"` 2043 2044 // The word or line of text recognized by Amazon Textract 2045 Text *string `type:"string"` 2046 } 2047 2048 // String returns the string representation. 2049 // 2050 // API parameter values that are decorated as "sensitive" in the API will not 2051 // be included in the string output. The member name will be present, but the 2052 // value will be replaced with "sensitive". 2053 func (s ExpenseDetection) String() string { 2054 return awsutil.Prettify(s) 2055 } 2056 2057 // GoString returns the string representation. 2058 // 2059 // API parameter values that are decorated as "sensitive" in the API will not 2060 // be included in the string output. The member name will be present, but the 2061 // value will be replaced with "sensitive". 2062 func (s ExpenseDetection) GoString() string { 2063 return s.String() 2064 } 2065 2066 // SetConfidence sets the Confidence field's value. 2067 func (s *ExpenseDetection) SetConfidence(v float64) *ExpenseDetection { 2068 s.Confidence = &v 2069 return s 2070 } 2071 2072 // SetGeometry sets the Geometry field's value. 2073 func (s *ExpenseDetection) SetGeometry(v *Geometry) *ExpenseDetection { 2074 s.Geometry = v 2075 return s 2076 } 2077 2078 // SetText sets the Text field's value. 2079 func (s *ExpenseDetection) SetText(v string) *ExpenseDetection { 2080 s.Text = &v 2081 return s 2082 } 2083 2084 // The structure holding all the information returned by AnalyzeExpense 2085 type ExpenseDocument struct { 2086 _ struct{} `type:"structure"` 2087 2088 // Denotes which invoice or receipt in the document the information is coming 2089 // from. First document will be 1, the second 2, and so on. 2090 ExpenseIndex *int64 `type:"integer"` 2091 2092 // Information detected on each table of a document, seperated into LineItems. 2093 LineItemGroups []*LineItemGroup `type:"list"` 2094 2095 // Any information found outside of a table by Amazon Textract. 2096 SummaryFields []*ExpenseField `type:"list"` 2097 } 2098 2099 // String returns the string representation. 2100 // 2101 // API parameter values that are decorated as "sensitive" in the API will not 2102 // be included in the string output. The member name will be present, but the 2103 // value will be replaced with "sensitive". 2104 func (s ExpenseDocument) String() string { 2105 return awsutil.Prettify(s) 2106 } 2107 2108 // GoString returns the string representation. 2109 // 2110 // API parameter values that are decorated as "sensitive" in the API will not 2111 // be included in the string output. The member name will be present, but the 2112 // value will be replaced with "sensitive". 2113 func (s ExpenseDocument) GoString() string { 2114 return s.String() 2115 } 2116 2117 // SetExpenseIndex sets the ExpenseIndex field's value. 2118 func (s *ExpenseDocument) SetExpenseIndex(v int64) *ExpenseDocument { 2119 s.ExpenseIndex = &v 2120 return s 2121 } 2122 2123 // SetLineItemGroups sets the LineItemGroups field's value. 2124 func (s *ExpenseDocument) SetLineItemGroups(v []*LineItemGroup) *ExpenseDocument { 2125 s.LineItemGroups = v 2126 return s 2127 } 2128 2129 // SetSummaryFields sets the SummaryFields field's value. 2130 func (s *ExpenseDocument) SetSummaryFields(v []*ExpenseField) *ExpenseDocument { 2131 s.SummaryFields = v 2132 return s 2133 } 2134 2135 // Breakdown of detected information, seperated into the catagories Type, LableDetection, 2136 // and ValueDetection 2137 type ExpenseField struct { 2138 _ struct{} `type:"structure"` 2139 2140 // The explicitly stated label of a detected element. 2141 LabelDetection *ExpenseDetection `type:"structure"` 2142 2143 // The page number the value was detected on. 2144 PageNumber *int64 `type:"integer"` 2145 2146 // The implied label of a detected element. Present alongside LabelDetection 2147 // for explicit elements. 2148 Type *ExpenseType `type:"structure"` 2149 2150 // The value of a detected element. Present in explicit and implicit elements. 2151 ValueDetection *ExpenseDetection `type:"structure"` 2152 } 2153 2154 // String returns the string representation. 2155 // 2156 // API parameter values that are decorated as "sensitive" in the API will not 2157 // be included in the string output. The member name will be present, but the 2158 // value will be replaced with "sensitive". 2159 func (s ExpenseField) String() string { 2160 return awsutil.Prettify(s) 2161 } 2162 2163 // GoString returns the string representation. 2164 // 2165 // API parameter values that are decorated as "sensitive" in the API will not 2166 // be included in the string output. The member name will be present, but the 2167 // value will be replaced with "sensitive". 2168 func (s ExpenseField) GoString() string { 2169 return s.String() 2170 } 2171 2172 // SetLabelDetection sets the LabelDetection field's value. 2173 func (s *ExpenseField) SetLabelDetection(v *ExpenseDetection) *ExpenseField { 2174 s.LabelDetection = v 2175 return s 2176 } 2177 2178 // SetPageNumber sets the PageNumber field's value. 2179 func (s *ExpenseField) SetPageNumber(v int64) *ExpenseField { 2180 s.PageNumber = &v 2181 return s 2182 } 2183 2184 // SetType sets the Type field's value. 2185 func (s *ExpenseField) SetType(v *ExpenseType) *ExpenseField { 2186 s.Type = v 2187 return s 2188 } 2189 2190 // SetValueDetection sets the ValueDetection field's value. 2191 func (s *ExpenseField) SetValueDetection(v *ExpenseDetection) *ExpenseField { 2192 s.ValueDetection = v 2193 return s 2194 } 2195 2196 // An object used to store information about the Type detected by Amazon Textract. 2197 type ExpenseType struct { 2198 _ struct{} `type:"structure"` 2199 2200 // The confidence of accuracy, as a percentage. 2201 Confidence *float64 `type:"float"` 2202 2203 // The word or line of text detected by Amazon Textract. 2204 Text *string `type:"string"` 2205 } 2206 2207 // String returns the string representation. 2208 // 2209 // API parameter values that are decorated as "sensitive" in the API will not 2210 // be included in the string output. The member name will be present, but the 2211 // value will be replaced with "sensitive". 2212 func (s ExpenseType) String() string { 2213 return awsutil.Prettify(s) 2214 } 2215 2216 // GoString returns the string representation. 2217 // 2218 // API parameter values that are decorated as "sensitive" in the API will not 2219 // be included in the string output. The member name will be present, but the 2220 // value will be replaced with "sensitive". 2221 func (s ExpenseType) GoString() string { 2222 return s.String() 2223 } 2224 2225 // SetConfidence sets the Confidence field's value. 2226 func (s *ExpenseType) SetConfidence(v float64) *ExpenseType { 2227 s.Confidence = &v 2228 return s 2229 } 2230 2231 // SetText sets the Text field's value. 2232 func (s *ExpenseType) SetText(v string) *ExpenseType { 2233 s.Text = &v 2234 return s 2235 } 2236 2237 // Information about where the following items are located on a document page: 2238 // detected page, text, key-value pairs, tables, table cells, and selection 2239 // elements. 2240 type Geometry struct { 2241 _ struct{} `type:"structure"` 2242 2243 // An axis-aligned coarse representation of the location of the recognized item 2244 // on the document page. 2245 BoundingBox *BoundingBox `type:"structure"` 2246 2247 // Within the bounding box, a fine-grained polygon around the recognized item. 2248 Polygon []*Point `type:"list"` 2249 } 2250 2251 // String returns the string representation. 2252 // 2253 // API parameter values that are decorated as "sensitive" in the API will not 2254 // be included in the string output. The member name will be present, but the 2255 // value will be replaced with "sensitive". 2256 func (s Geometry) String() string { 2257 return awsutil.Prettify(s) 2258 } 2259 2260 // GoString returns the string representation. 2261 // 2262 // API parameter values that are decorated as "sensitive" in the API will not 2263 // be included in the string output. The member name will be present, but the 2264 // value will be replaced with "sensitive". 2265 func (s Geometry) GoString() string { 2266 return s.String() 2267 } 2268 2269 // SetBoundingBox sets the BoundingBox field's value. 2270 func (s *Geometry) SetBoundingBox(v *BoundingBox) *Geometry { 2271 s.BoundingBox = v 2272 return s 2273 } 2274 2275 // SetPolygon sets the Polygon field's value. 2276 func (s *Geometry) SetPolygon(v []*Point) *Geometry { 2277 s.Polygon = v 2278 return s 2279 } 2280 2281 type GetDocumentAnalysisInput struct { 2282 _ struct{} `type:"structure"` 2283 2284 // A unique identifier for the text-detection job. The JobId is returned from 2285 // StartDocumentAnalysis. 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 // that you can specify is 1,000. If you specify a value greater than 1,000, 2292 // a maximum 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. 2302 // 2303 // API parameter values that are decorated as "sensitive" in the API will not 2304 // be included in the string output. The member name will be present, but the 2305 // value will be replaced with "sensitive". 2306 func (s GetDocumentAnalysisInput) String() string { 2307 return awsutil.Prettify(s) 2308 } 2309 2310 // GoString returns the string representation. 2311 // 2312 // API parameter values that are decorated as "sensitive" in the API will not 2313 // be included in the string output. The member name will be present, but the 2314 // value will be replaced with "sensitive". 2315 func (s GetDocumentAnalysisInput) GoString() string { 2316 return s.String() 2317 } 2318 2319 // Validate inspects the fields of the type to determine if they are valid. 2320 func (s *GetDocumentAnalysisInput) Validate() error { 2321 invalidParams := request.ErrInvalidParams{Context: "GetDocumentAnalysisInput"} 2322 if s.JobId == nil { 2323 invalidParams.Add(request.NewErrParamRequired("JobId")) 2324 } 2325 if s.JobId != nil && len(*s.JobId) < 1 { 2326 invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) 2327 } 2328 if s.MaxResults != nil && *s.MaxResults < 1 { 2329 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 2330 } 2331 if s.NextToken != nil && len(*s.NextToken) < 1 { 2332 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 2333 } 2334 2335 if invalidParams.Len() > 0 { 2336 return invalidParams 2337 } 2338 return nil 2339 } 2340 2341 // SetJobId sets the JobId field's value. 2342 func (s *GetDocumentAnalysisInput) SetJobId(v string) *GetDocumentAnalysisInput { 2343 s.JobId = &v 2344 return s 2345 } 2346 2347 // SetMaxResults sets the MaxResults field's value. 2348 func (s *GetDocumentAnalysisInput) SetMaxResults(v int64) *GetDocumentAnalysisInput { 2349 s.MaxResults = &v 2350 return s 2351 } 2352 2353 // SetNextToken sets the NextToken field's value. 2354 func (s *GetDocumentAnalysisInput) SetNextToken(v string) *GetDocumentAnalysisInput { 2355 s.NextToken = &v 2356 return s 2357 } 2358 2359 type GetDocumentAnalysisOutput struct { 2360 _ struct{} `type:"structure"` 2361 2362 AnalyzeDocumentModelVersion *string `type:"string"` 2363 2364 // The results of the text-analysis operation. 2365 Blocks []*Block `type:"list"` 2366 2367 // Information about a document that Amazon Textract processed. DocumentMetadata 2368 // is returned in every page of paginated responses from an Amazon Textract 2369 // video operation. 2370 DocumentMetadata *DocumentMetadata `type:"structure"` 2371 2372 // The current status of the text detection job. 2373 JobStatus *string `type:"string" enum:"JobStatus"` 2374 2375 // If the response is truncated, Amazon Textract returns this token. You can 2376 // use this token in the subsequent request to retrieve the next set of text 2377 // detection results. 2378 NextToken *string `min:"1" type:"string"` 2379 2380 // Returns if the detection job could not be completed. Contains explanation 2381 // for what error occured. 2382 StatusMessage *string `type:"string"` 2383 2384 // A list of warnings that occurred during the document-analysis operation. 2385 Warnings []*Warning `type:"list"` 2386 } 2387 2388 // String returns the string representation. 2389 // 2390 // API parameter values that are decorated as "sensitive" in the API will not 2391 // be included in the string output. The member name will be present, but the 2392 // value will be replaced with "sensitive". 2393 func (s GetDocumentAnalysisOutput) String() string { 2394 return awsutil.Prettify(s) 2395 } 2396 2397 // GoString returns the string representation. 2398 // 2399 // API parameter values that are decorated as "sensitive" in the API will not 2400 // be included in the string output. The member name will be present, but the 2401 // value will be replaced with "sensitive". 2402 func (s GetDocumentAnalysisOutput) GoString() string { 2403 return s.String() 2404 } 2405 2406 // SetAnalyzeDocumentModelVersion sets the AnalyzeDocumentModelVersion field's value. 2407 func (s *GetDocumentAnalysisOutput) SetAnalyzeDocumentModelVersion(v string) *GetDocumentAnalysisOutput { 2408 s.AnalyzeDocumentModelVersion = &v 2409 return s 2410 } 2411 2412 // SetBlocks sets the Blocks field's value. 2413 func (s *GetDocumentAnalysisOutput) SetBlocks(v []*Block) *GetDocumentAnalysisOutput { 2414 s.Blocks = v 2415 return s 2416 } 2417 2418 // SetDocumentMetadata sets the DocumentMetadata field's value. 2419 func (s *GetDocumentAnalysisOutput) SetDocumentMetadata(v *DocumentMetadata) *GetDocumentAnalysisOutput { 2420 s.DocumentMetadata = v 2421 return s 2422 } 2423 2424 // SetJobStatus sets the JobStatus field's value. 2425 func (s *GetDocumentAnalysisOutput) SetJobStatus(v string) *GetDocumentAnalysisOutput { 2426 s.JobStatus = &v 2427 return s 2428 } 2429 2430 // SetNextToken sets the NextToken field's value. 2431 func (s *GetDocumentAnalysisOutput) SetNextToken(v string) *GetDocumentAnalysisOutput { 2432 s.NextToken = &v 2433 return s 2434 } 2435 2436 // SetStatusMessage sets the StatusMessage field's value. 2437 func (s *GetDocumentAnalysisOutput) SetStatusMessage(v string) *GetDocumentAnalysisOutput { 2438 s.StatusMessage = &v 2439 return s 2440 } 2441 2442 // SetWarnings sets the Warnings field's value. 2443 func (s *GetDocumentAnalysisOutput) SetWarnings(v []*Warning) *GetDocumentAnalysisOutput { 2444 s.Warnings = v 2445 return s 2446 } 2447 2448 type GetDocumentTextDetectionInput struct { 2449 _ struct{} `type:"structure"` 2450 2451 // A unique identifier for the text detection job. The JobId is returned from 2452 // StartDocumentTextDetection. A JobId value is only valid for 7 days. 2453 // 2454 // JobId is a required field 2455 JobId *string `min:"1" type:"string" required:"true"` 2456 2457 // The maximum number of results to return per paginated call. The largest value 2458 // you can specify is 1,000. If you specify a value greater than 1,000, a maximum 2459 // of 1,000 results is returned. The default value is 1,000. 2460 MaxResults *int64 `min:"1" type:"integer"` 2461 2462 // If the previous response was incomplete (because there are more blocks to 2463 // retrieve), Amazon Textract returns a pagination token in the response. You 2464 // can use this pagination token to retrieve the next set of blocks. 2465 NextToken *string `min:"1" type:"string"` 2466 } 2467 2468 // String returns the string representation. 2469 // 2470 // API parameter values that are decorated as "sensitive" in the API will not 2471 // be included in the string output. The member name will be present, but the 2472 // value will be replaced with "sensitive". 2473 func (s GetDocumentTextDetectionInput) String() string { 2474 return awsutil.Prettify(s) 2475 } 2476 2477 // GoString returns the string representation. 2478 // 2479 // API parameter values that are decorated as "sensitive" in the API will not 2480 // be included in the string output. The member name will be present, but the 2481 // value will be replaced with "sensitive". 2482 func (s GetDocumentTextDetectionInput) GoString() string { 2483 return s.String() 2484 } 2485 2486 // Validate inspects the fields of the type to determine if they are valid. 2487 func (s *GetDocumentTextDetectionInput) Validate() error { 2488 invalidParams := request.ErrInvalidParams{Context: "GetDocumentTextDetectionInput"} 2489 if s.JobId == nil { 2490 invalidParams.Add(request.NewErrParamRequired("JobId")) 2491 } 2492 if s.JobId != nil && len(*s.JobId) < 1 { 2493 invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) 2494 } 2495 if s.MaxResults != nil && *s.MaxResults < 1 { 2496 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 2497 } 2498 if s.NextToken != nil && len(*s.NextToken) < 1 { 2499 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 2500 } 2501 2502 if invalidParams.Len() > 0 { 2503 return invalidParams 2504 } 2505 return nil 2506 } 2507 2508 // SetJobId sets the JobId field's value. 2509 func (s *GetDocumentTextDetectionInput) SetJobId(v string) *GetDocumentTextDetectionInput { 2510 s.JobId = &v 2511 return s 2512 } 2513 2514 // SetMaxResults sets the MaxResults field's value. 2515 func (s *GetDocumentTextDetectionInput) SetMaxResults(v int64) *GetDocumentTextDetectionInput { 2516 s.MaxResults = &v 2517 return s 2518 } 2519 2520 // SetNextToken sets the NextToken field's value. 2521 func (s *GetDocumentTextDetectionInput) SetNextToken(v string) *GetDocumentTextDetectionInput { 2522 s.NextToken = &v 2523 return s 2524 } 2525 2526 type GetDocumentTextDetectionOutput struct { 2527 _ struct{} `type:"structure"` 2528 2529 // The results of the text-detection operation. 2530 Blocks []*Block `type:"list"` 2531 2532 DetectDocumentTextModelVersion *string `type:"string"` 2533 2534 // Information about a document that Amazon Textract processed. DocumentMetadata 2535 // is returned in every page of paginated responses from an Amazon Textract 2536 // video operation. 2537 DocumentMetadata *DocumentMetadata `type:"structure"` 2538 2539 // The current status of the text detection job. 2540 JobStatus *string `type:"string" enum:"JobStatus"` 2541 2542 // If the response is truncated, Amazon Textract returns this token. You can 2543 // use this token in the subsequent request to retrieve the next set of text-detection 2544 // results. 2545 NextToken *string `min:"1" type:"string"` 2546 2547 // Returns if the detection job could not be completed. Contains explanation 2548 // for what error occured. 2549 StatusMessage *string `type:"string"` 2550 2551 // A list of warnings that occurred during the text-detection operation for 2552 // the document. 2553 Warnings []*Warning `type:"list"` 2554 } 2555 2556 // String returns the string representation. 2557 // 2558 // API parameter values that are decorated as "sensitive" in the API will not 2559 // be included in the string output. The member name will be present, but the 2560 // value will be replaced with "sensitive". 2561 func (s GetDocumentTextDetectionOutput) String() string { 2562 return awsutil.Prettify(s) 2563 } 2564 2565 // GoString returns the string representation. 2566 // 2567 // API parameter values that are decorated as "sensitive" in the API will not 2568 // be included in the string output. The member name will be present, but the 2569 // value will be replaced with "sensitive". 2570 func (s GetDocumentTextDetectionOutput) GoString() string { 2571 return s.String() 2572 } 2573 2574 // SetBlocks sets the Blocks field's value. 2575 func (s *GetDocumentTextDetectionOutput) SetBlocks(v []*Block) *GetDocumentTextDetectionOutput { 2576 s.Blocks = v 2577 return s 2578 } 2579 2580 // SetDetectDocumentTextModelVersion sets the DetectDocumentTextModelVersion field's value. 2581 func (s *GetDocumentTextDetectionOutput) SetDetectDocumentTextModelVersion(v string) *GetDocumentTextDetectionOutput { 2582 s.DetectDocumentTextModelVersion = &v 2583 return s 2584 } 2585 2586 // SetDocumentMetadata sets the DocumentMetadata field's value. 2587 func (s *GetDocumentTextDetectionOutput) SetDocumentMetadata(v *DocumentMetadata) *GetDocumentTextDetectionOutput { 2588 s.DocumentMetadata = v 2589 return s 2590 } 2591 2592 // SetJobStatus sets the JobStatus field's value. 2593 func (s *GetDocumentTextDetectionOutput) SetJobStatus(v string) *GetDocumentTextDetectionOutput { 2594 s.JobStatus = &v 2595 return s 2596 } 2597 2598 // SetNextToken sets the NextToken field's value. 2599 func (s *GetDocumentTextDetectionOutput) SetNextToken(v string) *GetDocumentTextDetectionOutput { 2600 s.NextToken = &v 2601 return s 2602 } 2603 2604 // SetStatusMessage sets the StatusMessage field's value. 2605 func (s *GetDocumentTextDetectionOutput) SetStatusMessage(v string) *GetDocumentTextDetectionOutput { 2606 s.StatusMessage = &v 2607 return s 2608 } 2609 2610 // SetWarnings sets the Warnings field's value. 2611 func (s *GetDocumentTextDetectionOutput) SetWarnings(v []*Warning) *GetDocumentTextDetectionOutput { 2612 s.Warnings = v 2613 return s 2614 } 2615 2616 // Shows the results of the human in the loop evaluation. If there is no HumanLoopArn, 2617 // the input did not trigger human review. 2618 type HumanLoopActivationOutput struct { 2619 _ struct{} `type:"structure"` 2620 2621 // Shows the result of condition evaluations, including those conditions which 2622 // activated a human review. 2623 HumanLoopActivationConditionsEvaluationResults aws.JSONValue `type:"jsonvalue"` 2624 2625 // Shows if and why human review was needed. 2626 HumanLoopActivationReasons []*string `min:"1" type:"list"` 2627 2628 // The Amazon Resource Name (ARN) of the HumanLoop created. 2629 HumanLoopArn *string `type:"string"` 2630 } 2631 2632 // String returns the string representation. 2633 // 2634 // API parameter values that are decorated as "sensitive" in the API will not 2635 // be included in the string output. The member name will be present, but the 2636 // value will be replaced with "sensitive". 2637 func (s HumanLoopActivationOutput) String() string { 2638 return awsutil.Prettify(s) 2639 } 2640 2641 // GoString returns the string representation. 2642 // 2643 // API parameter values that are decorated as "sensitive" in the API will not 2644 // be included in the string output. The member name will be present, but the 2645 // value will be replaced with "sensitive". 2646 func (s HumanLoopActivationOutput) GoString() string { 2647 return s.String() 2648 } 2649 2650 // SetHumanLoopActivationConditionsEvaluationResults sets the HumanLoopActivationConditionsEvaluationResults field's value. 2651 func (s *HumanLoopActivationOutput) SetHumanLoopActivationConditionsEvaluationResults(v aws.JSONValue) *HumanLoopActivationOutput { 2652 s.HumanLoopActivationConditionsEvaluationResults = v 2653 return s 2654 } 2655 2656 // SetHumanLoopActivationReasons sets the HumanLoopActivationReasons field's value. 2657 func (s *HumanLoopActivationOutput) SetHumanLoopActivationReasons(v []*string) *HumanLoopActivationOutput { 2658 s.HumanLoopActivationReasons = v 2659 return s 2660 } 2661 2662 // SetHumanLoopArn sets the HumanLoopArn field's value. 2663 func (s *HumanLoopActivationOutput) SetHumanLoopArn(v string) *HumanLoopActivationOutput { 2664 s.HumanLoopArn = &v 2665 return s 2666 } 2667 2668 // Sets up the human review workflow the document will be sent to if one of 2669 // the conditions is met. You can also set certain attributes of the image before 2670 // review. 2671 type HumanLoopConfig struct { 2672 _ struct{} `type:"structure"` 2673 2674 // Sets attributes of the input data. 2675 DataAttributes *HumanLoopDataAttributes `type:"structure"` 2676 2677 // The Amazon Resource Name (ARN) of the flow definition. 2678 // 2679 // FlowDefinitionArn is a required field 2680 FlowDefinitionArn *string `type:"string" required:"true"` 2681 2682 // The name of the human workflow used for this image. This should be kept unique 2683 // within a region. 2684 // 2685 // HumanLoopName is a required field 2686 HumanLoopName *string `min:"1" type:"string" required:"true"` 2687 } 2688 2689 // String returns the string representation. 2690 // 2691 // API parameter values that are decorated as "sensitive" in the API will not 2692 // be included in the string output. The member name will be present, but the 2693 // value will be replaced with "sensitive". 2694 func (s HumanLoopConfig) String() string { 2695 return awsutil.Prettify(s) 2696 } 2697 2698 // GoString returns the string representation. 2699 // 2700 // API parameter values that are decorated as "sensitive" in the API will not 2701 // be included in the string output. The member name will be present, but the 2702 // value will be replaced with "sensitive". 2703 func (s HumanLoopConfig) GoString() string { 2704 return s.String() 2705 } 2706 2707 // Validate inspects the fields of the type to determine if they are valid. 2708 func (s *HumanLoopConfig) Validate() error { 2709 invalidParams := request.ErrInvalidParams{Context: "HumanLoopConfig"} 2710 if s.FlowDefinitionArn == nil { 2711 invalidParams.Add(request.NewErrParamRequired("FlowDefinitionArn")) 2712 } 2713 if s.HumanLoopName == nil { 2714 invalidParams.Add(request.NewErrParamRequired("HumanLoopName")) 2715 } 2716 if s.HumanLoopName != nil && len(*s.HumanLoopName) < 1 { 2717 invalidParams.Add(request.NewErrParamMinLen("HumanLoopName", 1)) 2718 } 2719 2720 if invalidParams.Len() > 0 { 2721 return invalidParams 2722 } 2723 return nil 2724 } 2725 2726 // SetDataAttributes sets the DataAttributes field's value. 2727 func (s *HumanLoopConfig) SetDataAttributes(v *HumanLoopDataAttributes) *HumanLoopConfig { 2728 s.DataAttributes = v 2729 return s 2730 } 2731 2732 // SetFlowDefinitionArn sets the FlowDefinitionArn field's value. 2733 func (s *HumanLoopConfig) SetFlowDefinitionArn(v string) *HumanLoopConfig { 2734 s.FlowDefinitionArn = &v 2735 return s 2736 } 2737 2738 // SetHumanLoopName sets the HumanLoopName field's value. 2739 func (s *HumanLoopConfig) SetHumanLoopName(v string) *HumanLoopConfig { 2740 s.HumanLoopName = &v 2741 return s 2742 } 2743 2744 // Allows you to set attributes of the image. Currently, you can declare an 2745 // image as free of personally identifiable information and adult content. 2746 type HumanLoopDataAttributes struct { 2747 _ struct{} `type:"structure"` 2748 2749 // Sets whether the input image is free of personally identifiable information 2750 // or adult content. 2751 ContentClassifiers []*string `type:"list"` 2752 } 2753 2754 // String returns the string representation. 2755 // 2756 // API parameter values that are decorated as "sensitive" in the API will not 2757 // be included in the string output. The member name will be present, but the 2758 // value will be replaced with "sensitive". 2759 func (s HumanLoopDataAttributes) String() string { 2760 return awsutil.Prettify(s) 2761 } 2762 2763 // GoString returns the string representation. 2764 // 2765 // API parameter values that are decorated as "sensitive" in the API will not 2766 // be included in the string output. The member name will be present, but the 2767 // value will be replaced with "sensitive". 2768 func (s HumanLoopDataAttributes) GoString() string { 2769 return s.String() 2770 } 2771 2772 // SetContentClassifiers sets the ContentClassifiers field's value. 2773 func (s *HumanLoopDataAttributes) SetContentClassifiers(v []*string) *HumanLoopDataAttributes { 2774 s.ContentClassifiers = v 2775 return s 2776 } 2777 2778 // Indicates you have exceeded the maximum number of active human in the loop 2779 // workflows available 2780 type HumanLoopQuotaExceededException struct { 2781 _ struct{} `type:"structure"` 2782 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2783 2784 Message_ *string `locationName:"message" type:"string"` 2785 2786 // The quota code. 2787 QuotaCode *string `type:"string"` 2788 2789 // The resource type. 2790 ResourceType *string `type:"string"` 2791 2792 // The service code. 2793 ServiceCode *string `type:"string"` 2794 } 2795 2796 // String returns the string representation. 2797 // 2798 // API parameter values that are decorated as "sensitive" in the API will not 2799 // be included in the string output. The member name will be present, but the 2800 // value will be replaced with "sensitive". 2801 func (s HumanLoopQuotaExceededException) String() string { 2802 return awsutil.Prettify(s) 2803 } 2804 2805 // GoString returns the string representation. 2806 // 2807 // API parameter values that are decorated as "sensitive" in the API will not 2808 // be included in the string output. The member name will be present, but the 2809 // value will be replaced with "sensitive". 2810 func (s HumanLoopQuotaExceededException) GoString() string { 2811 return s.String() 2812 } 2813 2814 func newErrorHumanLoopQuotaExceededException(v protocol.ResponseMetadata) error { 2815 return &HumanLoopQuotaExceededException{ 2816 RespMetadata: v, 2817 } 2818 } 2819 2820 // Code returns the exception type name. 2821 func (s *HumanLoopQuotaExceededException) Code() string { 2822 return "HumanLoopQuotaExceededException" 2823 } 2824 2825 // Message returns the exception's message. 2826 func (s *HumanLoopQuotaExceededException) Message() string { 2827 if s.Message_ != nil { 2828 return *s.Message_ 2829 } 2830 return "" 2831 } 2832 2833 // OrigErr always returns nil, satisfies awserr.Error interface. 2834 func (s *HumanLoopQuotaExceededException) OrigErr() error { 2835 return nil 2836 } 2837 2838 func (s *HumanLoopQuotaExceededException) Error() string { 2839 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 2840 } 2841 2842 // Status code returns the HTTP status code for the request's response error. 2843 func (s *HumanLoopQuotaExceededException) StatusCode() int { 2844 return s.RespMetadata.StatusCode 2845 } 2846 2847 // RequestID returns the service's response RequestID for request. 2848 func (s *HumanLoopQuotaExceededException) RequestID() string { 2849 return s.RespMetadata.RequestID 2850 } 2851 2852 // A ClientRequestToken input parameter was reused with an operation, but at 2853 // least one of the other input parameters is different from the previous call 2854 // to the operation. 2855 type IdempotentParameterMismatchException struct { 2856 _ struct{} `type:"structure"` 2857 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2858 2859 Message_ *string `locationName:"message" type:"string"` 2860 } 2861 2862 // String returns the string representation. 2863 // 2864 // API parameter values that are decorated as "sensitive" in the API will not 2865 // be included in the string output. The member name will be present, but the 2866 // value will be replaced with "sensitive". 2867 func (s IdempotentParameterMismatchException) String() string { 2868 return awsutil.Prettify(s) 2869 } 2870 2871 // GoString returns the string representation. 2872 // 2873 // API parameter values that are decorated as "sensitive" in the API will not 2874 // be included in the string output. The member name will be present, but the 2875 // value will be replaced with "sensitive". 2876 func (s IdempotentParameterMismatchException) GoString() string { 2877 return s.String() 2878 } 2879 2880 func newErrorIdempotentParameterMismatchException(v protocol.ResponseMetadata) error { 2881 return &IdempotentParameterMismatchException{ 2882 RespMetadata: v, 2883 } 2884 } 2885 2886 // Code returns the exception type name. 2887 func (s *IdempotentParameterMismatchException) Code() string { 2888 return "IdempotentParameterMismatchException" 2889 } 2890 2891 // Message returns the exception's message. 2892 func (s *IdempotentParameterMismatchException) Message() string { 2893 if s.Message_ != nil { 2894 return *s.Message_ 2895 } 2896 return "" 2897 } 2898 2899 // OrigErr always returns nil, satisfies awserr.Error interface. 2900 func (s *IdempotentParameterMismatchException) OrigErr() error { 2901 return nil 2902 } 2903 2904 func (s *IdempotentParameterMismatchException) Error() string { 2905 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2906 } 2907 2908 // Status code returns the HTTP status code for the request's response error. 2909 func (s *IdempotentParameterMismatchException) StatusCode() int { 2910 return s.RespMetadata.StatusCode 2911 } 2912 2913 // RequestID returns the service's response RequestID for request. 2914 func (s *IdempotentParameterMismatchException) RequestID() string { 2915 return s.RespMetadata.RequestID 2916 } 2917 2918 // Amazon Textract experienced a service issue. Try your call again. 2919 type InternalServerError struct { 2920 _ struct{} `type:"structure"` 2921 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2922 2923 Message_ *string `locationName:"message" type:"string"` 2924 } 2925 2926 // String returns the string representation. 2927 // 2928 // API parameter values that are decorated as "sensitive" in the API will not 2929 // be included in the string output. The member name will be present, but the 2930 // value will be replaced with "sensitive". 2931 func (s InternalServerError) String() string { 2932 return awsutil.Prettify(s) 2933 } 2934 2935 // GoString returns the string representation. 2936 // 2937 // API parameter values that are decorated as "sensitive" in the API will not 2938 // be included in the string output. The member name will be present, but the 2939 // value will be replaced with "sensitive". 2940 func (s InternalServerError) GoString() string { 2941 return s.String() 2942 } 2943 2944 func newErrorInternalServerError(v protocol.ResponseMetadata) error { 2945 return &InternalServerError{ 2946 RespMetadata: v, 2947 } 2948 } 2949 2950 // Code returns the exception type name. 2951 func (s *InternalServerError) Code() string { 2952 return "InternalServerError" 2953 } 2954 2955 // Message returns the exception's message. 2956 func (s *InternalServerError) Message() string { 2957 if s.Message_ != nil { 2958 return *s.Message_ 2959 } 2960 return "" 2961 } 2962 2963 // OrigErr always returns nil, satisfies awserr.Error interface. 2964 func (s *InternalServerError) OrigErr() error { 2965 return nil 2966 } 2967 2968 func (s *InternalServerError) Error() string { 2969 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2970 } 2971 2972 // Status code returns the HTTP status code for the request's response error. 2973 func (s *InternalServerError) StatusCode() int { 2974 return s.RespMetadata.StatusCode 2975 } 2976 2977 // RequestID returns the service's response RequestID for request. 2978 func (s *InternalServerError) RequestID() string { 2979 return s.RespMetadata.RequestID 2980 } 2981 2982 // An invalid job identifier was passed to GetDocumentAnalysis or to GetDocumentAnalysis. 2983 type InvalidJobIdException struct { 2984 _ struct{} `type:"structure"` 2985 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2986 2987 Message_ *string `locationName:"message" type:"string"` 2988 } 2989 2990 // String returns the string representation. 2991 // 2992 // API parameter values that are decorated as "sensitive" in the API will not 2993 // be included in the string output. The member name will be present, but the 2994 // value will be replaced with "sensitive". 2995 func (s InvalidJobIdException) String() string { 2996 return awsutil.Prettify(s) 2997 } 2998 2999 // GoString returns the string representation. 3000 // 3001 // API parameter values that are decorated as "sensitive" in the API will not 3002 // be included in the string output. The member name will be present, but the 3003 // value will be replaced with "sensitive". 3004 func (s InvalidJobIdException) GoString() string { 3005 return s.String() 3006 } 3007 3008 func newErrorInvalidJobIdException(v protocol.ResponseMetadata) error { 3009 return &InvalidJobIdException{ 3010 RespMetadata: v, 3011 } 3012 } 3013 3014 // Code returns the exception type name. 3015 func (s *InvalidJobIdException) Code() string { 3016 return "InvalidJobIdException" 3017 } 3018 3019 // Message returns the exception's message. 3020 func (s *InvalidJobIdException) Message() string { 3021 if s.Message_ != nil { 3022 return *s.Message_ 3023 } 3024 return "" 3025 } 3026 3027 // OrigErr always returns nil, satisfies awserr.Error interface. 3028 func (s *InvalidJobIdException) OrigErr() error { 3029 return nil 3030 } 3031 3032 func (s *InvalidJobIdException) Error() string { 3033 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3034 } 3035 3036 // Status code returns the HTTP status code for the request's response error. 3037 func (s *InvalidJobIdException) StatusCode() int { 3038 return s.RespMetadata.StatusCode 3039 } 3040 3041 // RequestID returns the service's response RequestID for request. 3042 func (s *InvalidJobIdException) RequestID() string { 3043 return s.RespMetadata.RequestID 3044 } 3045 3046 // Indicates you do not have decrypt permissions with the KMS key entered, or 3047 // the KMS key was entered incorrectly. 3048 type InvalidKMSKeyException struct { 3049 _ struct{} `type:"structure"` 3050 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3051 3052 Message_ *string `locationName:"message" type:"string"` 3053 } 3054 3055 // String returns the string representation. 3056 // 3057 // API parameter values that are decorated as "sensitive" in the API will not 3058 // be included in the string output. The member name will be present, but the 3059 // value will be replaced with "sensitive". 3060 func (s InvalidKMSKeyException) String() string { 3061 return awsutil.Prettify(s) 3062 } 3063 3064 // GoString returns the string representation. 3065 // 3066 // API parameter values that are decorated as "sensitive" in the API will not 3067 // be included in the string output. The member name will be present, but the 3068 // value will be replaced with "sensitive". 3069 func (s InvalidKMSKeyException) GoString() string { 3070 return s.String() 3071 } 3072 3073 func newErrorInvalidKMSKeyException(v protocol.ResponseMetadata) error { 3074 return &InvalidKMSKeyException{ 3075 RespMetadata: v, 3076 } 3077 } 3078 3079 // Code returns the exception type name. 3080 func (s *InvalidKMSKeyException) Code() string { 3081 return "InvalidKMSKeyException" 3082 } 3083 3084 // Message returns the exception's message. 3085 func (s *InvalidKMSKeyException) Message() string { 3086 if s.Message_ != nil { 3087 return *s.Message_ 3088 } 3089 return "" 3090 } 3091 3092 // OrigErr always returns nil, satisfies awserr.Error interface. 3093 func (s *InvalidKMSKeyException) OrigErr() error { 3094 return nil 3095 } 3096 3097 func (s *InvalidKMSKeyException) Error() string { 3098 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3099 } 3100 3101 // Status code returns the HTTP status code for the request's response error. 3102 func (s *InvalidKMSKeyException) StatusCode() int { 3103 return s.RespMetadata.StatusCode 3104 } 3105 3106 // RequestID returns the service's response RequestID for request. 3107 func (s *InvalidKMSKeyException) RequestID() string { 3108 return s.RespMetadata.RequestID 3109 } 3110 3111 // An input parameter violated a constraint. For example, in synchronous operations, 3112 // an InvalidParameterException exception occurs when neither of the S3Object 3113 // or Bytes values are supplied in the Document request parameter. Validate 3114 // your parameter before calling the API operation again. 3115 type InvalidParameterException struct { 3116 _ struct{} `type:"structure"` 3117 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3118 3119 Message_ *string `locationName:"message" type:"string"` 3120 } 3121 3122 // String returns the string representation. 3123 // 3124 // API parameter values that are decorated as "sensitive" in the API will not 3125 // be included in the string output. The member name will be present, but the 3126 // value will be replaced with "sensitive". 3127 func (s InvalidParameterException) String() string { 3128 return awsutil.Prettify(s) 3129 } 3130 3131 // GoString returns the string representation. 3132 // 3133 // API parameter values that are decorated as "sensitive" in the API will not 3134 // be included in the string output. The member name will be present, but the 3135 // value will be replaced with "sensitive". 3136 func (s InvalidParameterException) GoString() string { 3137 return s.String() 3138 } 3139 3140 func newErrorInvalidParameterException(v protocol.ResponseMetadata) error { 3141 return &InvalidParameterException{ 3142 RespMetadata: v, 3143 } 3144 } 3145 3146 // Code returns the exception type name. 3147 func (s *InvalidParameterException) Code() string { 3148 return "InvalidParameterException" 3149 } 3150 3151 // Message returns the exception's message. 3152 func (s *InvalidParameterException) Message() string { 3153 if s.Message_ != nil { 3154 return *s.Message_ 3155 } 3156 return "" 3157 } 3158 3159 // OrigErr always returns nil, satisfies awserr.Error interface. 3160 func (s *InvalidParameterException) OrigErr() error { 3161 return nil 3162 } 3163 3164 func (s *InvalidParameterException) Error() string { 3165 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3166 } 3167 3168 // Status code returns the HTTP status code for the request's response error. 3169 func (s *InvalidParameterException) StatusCode() int { 3170 return s.RespMetadata.StatusCode 3171 } 3172 3173 // RequestID returns the service's response RequestID for request. 3174 func (s *InvalidParameterException) RequestID() string { 3175 return s.RespMetadata.RequestID 3176 } 3177 3178 // Amazon Textract is unable to access the S3 object that's specified in the 3179 // request. for more information, Configure Access to Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) 3180 // For troubleshooting information, see Troubleshooting Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/troubleshooting.html) 3181 type InvalidS3ObjectException struct { 3182 _ struct{} `type:"structure"` 3183 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3184 3185 Message_ *string `locationName:"message" type:"string"` 3186 } 3187 3188 // String returns the string representation. 3189 // 3190 // API parameter values that are decorated as "sensitive" in the API will not 3191 // be included in the string output. The member name will be present, but the 3192 // value will be replaced with "sensitive". 3193 func (s InvalidS3ObjectException) String() string { 3194 return awsutil.Prettify(s) 3195 } 3196 3197 // GoString returns the string representation. 3198 // 3199 // API parameter values that are decorated as "sensitive" in the API will not 3200 // be included in the string output. The member name will be present, but the 3201 // value will be replaced with "sensitive". 3202 func (s InvalidS3ObjectException) GoString() string { 3203 return s.String() 3204 } 3205 3206 func newErrorInvalidS3ObjectException(v protocol.ResponseMetadata) error { 3207 return &InvalidS3ObjectException{ 3208 RespMetadata: v, 3209 } 3210 } 3211 3212 // Code returns the exception type name. 3213 func (s *InvalidS3ObjectException) Code() string { 3214 return "InvalidS3ObjectException" 3215 } 3216 3217 // Message returns the exception's message. 3218 func (s *InvalidS3ObjectException) Message() string { 3219 if s.Message_ != nil { 3220 return *s.Message_ 3221 } 3222 return "" 3223 } 3224 3225 // OrigErr always returns nil, satisfies awserr.Error interface. 3226 func (s *InvalidS3ObjectException) OrigErr() error { 3227 return nil 3228 } 3229 3230 func (s *InvalidS3ObjectException) Error() string { 3231 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3232 } 3233 3234 // Status code returns the HTTP status code for the request's response error. 3235 func (s *InvalidS3ObjectException) StatusCode() int { 3236 return s.RespMetadata.StatusCode 3237 } 3238 3239 // RequestID returns the service's response RequestID for request. 3240 func (s *InvalidS3ObjectException) RequestID() string { 3241 return s.RespMetadata.RequestID 3242 } 3243 3244 // An Amazon Textract service limit was exceeded. For example, if you start 3245 // too many asynchronous jobs concurrently, calls to start operations (StartDocumentTextDetection, 3246 // for example) raise a LimitExceededException exception (HTTP status code: 3247 // 400) until the number of concurrently running jobs is below the Amazon Textract 3248 // service limit. 3249 type LimitExceededException struct { 3250 _ struct{} `type:"structure"` 3251 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3252 3253 Message_ *string `locationName:"message" type:"string"` 3254 } 3255 3256 // String returns the string representation. 3257 // 3258 // API parameter values that are decorated as "sensitive" in the API will not 3259 // be included in the string output. The member name will be present, but the 3260 // value will be replaced with "sensitive". 3261 func (s LimitExceededException) String() string { 3262 return awsutil.Prettify(s) 3263 } 3264 3265 // GoString returns the string representation. 3266 // 3267 // API parameter values that are decorated as "sensitive" in the API will not 3268 // be included in the string output. The member name will be present, but the 3269 // value will be replaced with "sensitive". 3270 func (s LimitExceededException) GoString() string { 3271 return s.String() 3272 } 3273 3274 func newErrorLimitExceededException(v protocol.ResponseMetadata) error { 3275 return &LimitExceededException{ 3276 RespMetadata: v, 3277 } 3278 } 3279 3280 // Code returns the exception type name. 3281 func (s *LimitExceededException) Code() string { 3282 return "LimitExceededException" 3283 } 3284 3285 // Message returns the exception's message. 3286 func (s *LimitExceededException) Message() string { 3287 if s.Message_ != nil { 3288 return *s.Message_ 3289 } 3290 return "" 3291 } 3292 3293 // OrigErr always returns nil, satisfies awserr.Error interface. 3294 func (s *LimitExceededException) OrigErr() error { 3295 return nil 3296 } 3297 3298 func (s *LimitExceededException) Error() string { 3299 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3300 } 3301 3302 // Status code returns the HTTP status code for the request's response error. 3303 func (s *LimitExceededException) StatusCode() int { 3304 return s.RespMetadata.StatusCode 3305 } 3306 3307 // RequestID returns the service's response RequestID for request. 3308 func (s *LimitExceededException) RequestID() string { 3309 return s.RespMetadata.RequestID 3310 } 3311 3312 // A structure that holds information about the different lines found in a document's 3313 // tables. 3314 type LineItemFields struct { 3315 _ struct{} `type:"structure"` 3316 3317 // ExpenseFields used to show information from detected lines on a table. 3318 LineItemExpenseFields []*ExpenseField `type:"list"` 3319 } 3320 3321 // String returns the string representation. 3322 // 3323 // API parameter values that are decorated as "sensitive" in the API will not 3324 // be included in the string output. The member name will be present, but the 3325 // value will be replaced with "sensitive". 3326 func (s LineItemFields) String() string { 3327 return awsutil.Prettify(s) 3328 } 3329 3330 // GoString returns the string representation. 3331 // 3332 // API parameter values that are decorated as "sensitive" in the API will not 3333 // be included in the string output. The member name will be present, but the 3334 // value will be replaced with "sensitive". 3335 func (s LineItemFields) GoString() string { 3336 return s.String() 3337 } 3338 3339 // SetLineItemExpenseFields sets the LineItemExpenseFields field's value. 3340 func (s *LineItemFields) SetLineItemExpenseFields(v []*ExpenseField) *LineItemFields { 3341 s.LineItemExpenseFields = v 3342 return s 3343 } 3344 3345 // A grouping of tables which contain LineItems, with each table identified 3346 // by the table's LineItemGroupIndex. 3347 type LineItemGroup struct { 3348 _ struct{} `type:"structure"` 3349 3350 // The number used to identify a specific table in a document. The first table 3351 // encountered will have a LineItemGroupIndex of 1, the second 2, etc. 3352 LineItemGroupIndex *int64 `type:"integer"` 3353 3354 // The breakdown of information on a particular line of a table. 3355 LineItems []*LineItemFields `type:"list"` 3356 } 3357 3358 // String returns the string representation. 3359 // 3360 // API parameter values that are decorated as "sensitive" in the API will not 3361 // be included in the string output. The member name will be present, but the 3362 // value will be replaced with "sensitive". 3363 func (s LineItemGroup) String() string { 3364 return awsutil.Prettify(s) 3365 } 3366 3367 // GoString returns the string representation. 3368 // 3369 // API parameter values that are decorated as "sensitive" in the API will not 3370 // be included in the string output. The member name will be present, but the 3371 // value will be replaced with "sensitive". 3372 func (s LineItemGroup) GoString() string { 3373 return s.String() 3374 } 3375 3376 // SetLineItemGroupIndex sets the LineItemGroupIndex field's value. 3377 func (s *LineItemGroup) SetLineItemGroupIndex(v int64) *LineItemGroup { 3378 s.LineItemGroupIndex = &v 3379 return s 3380 } 3381 3382 // SetLineItems sets the LineItems field's value. 3383 func (s *LineItemGroup) SetLineItems(v []*LineItemFields) *LineItemGroup { 3384 s.LineItems = v 3385 return s 3386 } 3387 3388 // The Amazon Simple Notification Service (Amazon SNS) topic to which Amazon 3389 // Textract publishes the completion status of an asynchronous document operation, 3390 // such as StartDocumentTextDetection. 3391 type NotificationChannel struct { 3392 _ struct{} `type:"structure"` 3393 3394 // The Amazon Resource Name (ARN) of an IAM role that gives Amazon Textract 3395 // publishing permissions to the Amazon SNS topic. 3396 // 3397 // RoleArn is a required field 3398 RoleArn *string `min:"20" type:"string" required:"true"` 3399 3400 // The Amazon SNS topic that Amazon Textract posts the completion status to. 3401 // 3402 // SNSTopicArn is a required field 3403 SNSTopicArn *string `min:"20" type:"string" required:"true"` 3404 } 3405 3406 // String returns the string representation. 3407 // 3408 // API parameter values that are decorated as "sensitive" in the API will not 3409 // be included in the string output. The member name will be present, but the 3410 // value will be replaced with "sensitive". 3411 func (s NotificationChannel) String() string { 3412 return awsutil.Prettify(s) 3413 } 3414 3415 // GoString returns the string representation. 3416 // 3417 // API parameter values that are decorated as "sensitive" in the API will not 3418 // be included in the string output. The member name will be present, but the 3419 // value will be replaced with "sensitive". 3420 func (s NotificationChannel) GoString() string { 3421 return s.String() 3422 } 3423 3424 // Validate inspects the fields of the type to determine if they are valid. 3425 func (s *NotificationChannel) Validate() error { 3426 invalidParams := request.ErrInvalidParams{Context: "NotificationChannel"} 3427 if s.RoleArn == nil { 3428 invalidParams.Add(request.NewErrParamRequired("RoleArn")) 3429 } 3430 if s.RoleArn != nil && len(*s.RoleArn) < 20 { 3431 invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) 3432 } 3433 if s.SNSTopicArn == nil { 3434 invalidParams.Add(request.NewErrParamRequired("SNSTopicArn")) 3435 } 3436 if s.SNSTopicArn != nil && len(*s.SNSTopicArn) < 20 { 3437 invalidParams.Add(request.NewErrParamMinLen("SNSTopicArn", 20)) 3438 } 3439 3440 if invalidParams.Len() > 0 { 3441 return invalidParams 3442 } 3443 return nil 3444 } 3445 3446 // SetRoleArn sets the RoleArn field's value. 3447 func (s *NotificationChannel) SetRoleArn(v string) *NotificationChannel { 3448 s.RoleArn = &v 3449 return s 3450 } 3451 3452 // SetSNSTopicArn sets the SNSTopicArn field's value. 3453 func (s *NotificationChannel) SetSNSTopicArn(v string) *NotificationChannel { 3454 s.SNSTopicArn = &v 3455 return s 3456 } 3457 3458 // Sets whether or not your output will go to a user created bucket. Used to 3459 // set the name of the bucket, and the prefix on the output file. 3460 // 3461 // OutputConfig is an optional parameter which lets you adjust where your output 3462 // will be placed. By default, Amazon Textract will store the results internally 3463 // and can only be accessed by the Get API operations. With OutputConfig enabled, 3464 // you can set the name of the bucket the output will be sent to and the file 3465 // prefix of the results where you can download your results. Additionally, 3466 // you can set the KMSKeyID parameter to a customer master key (CMK) to encrypt 3467 // your output. Without this parameter set Amazon Textract will encrypt server-side 3468 // using the AWS managed CMK for Amazon S3. 3469 // 3470 // Decryption of Customer Content is necessary for processing of the documents 3471 // by Amazon Textract. If your account is opted out under an AI services opt 3472 // out policy then all unencrypted Customer Content is immediately and permanently 3473 // deleted after the Customer Content has been processed by the service. No 3474 // copy of of the output is retained by Amazon Textract. For information about 3475 // 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) 3476 // 3477 // For more information on data privacy, see the Data Privacy FAQ (https://aws.amazon.com/compliance/data-privacy-faq/). 3478 type OutputConfig struct { 3479 _ struct{} `type:"structure"` 3480 3481 // The name of the bucket your output will go to. 3482 // 3483 // S3Bucket is a required field 3484 S3Bucket *string `min:"3" type:"string" required:"true"` 3485 3486 // The prefix of the object key that the output will be saved to. When not enabled, 3487 // the prefix will be “textract_output". 3488 S3Prefix *string `min:"1" type:"string"` 3489 } 3490 3491 // String returns the string representation. 3492 // 3493 // API parameter values that are decorated as "sensitive" in the API will not 3494 // be included in the string output. The member name will be present, but the 3495 // value will be replaced with "sensitive". 3496 func (s OutputConfig) String() string { 3497 return awsutil.Prettify(s) 3498 } 3499 3500 // GoString returns the string representation. 3501 // 3502 // API parameter values that are decorated as "sensitive" in the API will not 3503 // be included in the string output. The member name will be present, but the 3504 // value will be replaced with "sensitive". 3505 func (s OutputConfig) GoString() string { 3506 return s.String() 3507 } 3508 3509 // Validate inspects the fields of the type to determine if they are valid. 3510 func (s *OutputConfig) Validate() error { 3511 invalidParams := request.ErrInvalidParams{Context: "OutputConfig"} 3512 if s.S3Bucket == nil { 3513 invalidParams.Add(request.NewErrParamRequired("S3Bucket")) 3514 } 3515 if s.S3Bucket != nil && len(*s.S3Bucket) < 3 { 3516 invalidParams.Add(request.NewErrParamMinLen("S3Bucket", 3)) 3517 } 3518 if s.S3Prefix != nil && len(*s.S3Prefix) < 1 { 3519 invalidParams.Add(request.NewErrParamMinLen("S3Prefix", 1)) 3520 } 3521 3522 if invalidParams.Len() > 0 { 3523 return invalidParams 3524 } 3525 return nil 3526 } 3527 3528 // SetS3Bucket sets the S3Bucket field's value. 3529 func (s *OutputConfig) SetS3Bucket(v string) *OutputConfig { 3530 s.S3Bucket = &v 3531 return s 3532 } 3533 3534 // SetS3Prefix sets the S3Prefix field's value. 3535 func (s *OutputConfig) SetS3Prefix(v string) *OutputConfig { 3536 s.S3Prefix = &v 3537 return s 3538 } 3539 3540 // The X and Y coordinates of a point on a document page. The X and Y values 3541 // that are returned are ratios of the overall document page size. For example, 3542 // if the input document is 700 x 200 and the operation returns X=0.5 and Y=0.25, 3543 // then the point is at the (350,50) pixel coordinate on the document page. 3544 // 3545 // An array of Point objects, Polygon, is returned by DetectDocumentText. Polygon 3546 // represents a fine-grained polygon around detected text. For more information, 3547 // see Geometry in the Amazon Textract Developer Guide. 3548 type Point struct { 3549 _ struct{} `type:"structure"` 3550 3551 // The value of the X coordinate for a point on a Polygon. 3552 X *float64 `type:"float"` 3553 3554 // The value of the Y coordinate for a point on a Polygon. 3555 Y *float64 `type:"float"` 3556 } 3557 3558 // String returns the string representation. 3559 // 3560 // API parameter values that are decorated as "sensitive" in the API will not 3561 // be included in the string output. The member name will be present, but the 3562 // value will be replaced with "sensitive". 3563 func (s Point) String() string { 3564 return awsutil.Prettify(s) 3565 } 3566 3567 // GoString returns the string representation. 3568 // 3569 // API parameter values that are decorated as "sensitive" in the API will not 3570 // be included in the string output. The member name will be present, but the 3571 // value will be replaced with "sensitive". 3572 func (s Point) GoString() string { 3573 return s.String() 3574 } 3575 3576 // SetX sets the X field's value. 3577 func (s *Point) SetX(v float64) *Point { 3578 s.X = &v 3579 return s 3580 } 3581 3582 // SetY sets the Y field's value. 3583 func (s *Point) SetY(v float64) *Point { 3584 s.Y = &v 3585 return s 3586 } 3587 3588 // The number of requests exceeded your throughput limit. If you want to increase 3589 // this limit, contact Amazon Textract. 3590 type ProvisionedThroughputExceededException struct { 3591 _ struct{} `type:"structure"` 3592 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3593 3594 Message_ *string `locationName:"message" type:"string"` 3595 } 3596 3597 // String returns the string representation. 3598 // 3599 // API parameter values that are decorated as "sensitive" in the API will not 3600 // be included in the string output. The member name will be present, but the 3601 // value will be replaced with "sensitive". 3602 func (s ProvisionedThroughputExceededException) String() string { 3603 return awsutil.Prettify(s) 3604 } 3605 3606 // GoString returns the string representation. 3607 // 3608 // API parameter values that are decorated as "sensitive" in the API will not 3609 // be included in the string output. The member name will be present, but the 3610 // value will be replaced with "sensitive". 3611 func (s ProvisionedThroughputExceededException) GoString() string { 3612 return s.String() 3613 } 3614 3615 func newErrorProvisionedThroughputExceededException(v protocol.ResponseMetadata) error { 3616 return &ProvisionedThroughputExceededException{ 3617 RespMetadata: v, 3618 } 3619 } 3620 3621 // Code returns the exception type name. 3622 func (s *ProvisionedThroughputExceededException) Code() string { 3623 return "ProvisionedThroughputExceededException" 3624 } 3625 3626 // Message returns the exception's message. 3627 func (s *ProvisionedThroughputExceededException) Message() string { 3628 if s.Message_ != nil { 3629 return *s.Message_ 3630 } 3631 return "" 3632 } 3633 3634 // OrigErr always returns nil, satisfies awserr.Error interface. 3635 func (s *ProvisionedThroughputExceededException) OrigErr() error { 3636 return nil 3637 } 3638 3639 func (s *ProvisionedThroughputExceededException) Error() string { 3640 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3641 } 3642 3643 // Status code returns the HTTP status code for the request's response error. 3644 func (s *ProvisionedThroughputExceededException) StatusCode() int { 3645 return s.RespMetadata.StatusCode 3646 } 3647 3648 // RequestID returns the service's response RequestID for request. 3649 func (s *ProvisionedThroughputExceededException) RequestID() string { 3650 return s.RespMetadata.RequestID 3651 } 3652 3653 // Information about how blocks are related to each other. A Block object contains 3654 // 0 or more Relation objects in a list, Relationships. For more information, 3655 // see Block. 3656 // 3657 // The Type element provides the type of the relationship for all blocks in 3658 // the IDs array. 3659 type Relationship struct { 3660 _ struct{} `type:"structure"` 3661 3662 // An array of IDs for related blocks. You can get the type of the relationship 3663 // from the Type element. 3664 Ids []*string `type:"list"` 3665 3666 // The type of relationship that the blocks in the IDs array have with the current 3667 // block. The relationship can be VALUE or CHILD. A relationship of type VALUE 3668 // is a list that contains the ID of the VALUE block that's associated with 3669 // the KEY of a key-value pair. A relationship of type CHILD is a list of IDs 3670 // that identify WORD blocks in the case of lines Cell blocks in the case of 3671 // Tables, and WORD blocks in the case of Selection Elements. 3672 Type *string `type:"string" enum:"RelationshipType"` 3673 } 3674 3675 // String returns the string representation. 3676 // 3677 // API parameter values that are decorated as "sensitive" in the API will not 3678 // be included in the string output. The member name will be present, but the 3679 // value will be replaced with "sensitive". 3680 func (s Relationship) String() string { 3681 return awsutil.Prettify(s) 3682 } 3683 3684 // GoString returns the string representation. 3685 // 3686 // API parameter values that are decorated as "sensitive" in the API will not 3687 // be included in the string output. The member name will be present, but the 3688 // value will be replaced with "sensitive". 3689 func (s Relationship) GoString() string { 3690 return s.String() 3691 } 3692 3693 // SetIds sets the Ids field's value. 3694 func (s *Relationship) SetIds(v []*string) *Relationship { 3695 s.Ids = v 3696 return s 3697 } 3698 3699 // SetType sets the Type field's value. 3700 func (s *Relationship) SetType(v string) *Relationship { 3701 s.Type = &v 3702 return s 3703 } 3704 3705 // The S3 bucket name and file name that identifies the document. 3706 // 3707 // The AWS Region for the S3 bucket that contains the document must match the 3708 // Region that you use for Amazon Textract operations. 3709 // 3710 // For Amazon Textract to process a file in an S3 bucket, the user must have 3711 // permission to access the S3 bucket and file. 3712 type S3Object struct { 3713 _ struct{} `type:"structure"` 3714 3715 // The name of the S3 bucket. Note that the # character is not valid in the 3716 // file name. 3717 Bucket *string `min:"3" type:"string"` 3718 3719 // The file name of the input document. Synchronous operations can use image 3720 // files that are in JPEG or PNG format. Asynchronous operations also support 3721 // PDF format files. 3722 Name *string `min:"1" type:"string"` 3723 3724 // If the bucket has versioning enabled, you can specify the object version. 3725 Version *string `min:"1" type:"string"` 3726 } 3727 3728 // String returns the string representation. 3729 // 3730 // API parameter values that are decorated as "sensitive" in the API will not 3731 // be included in the string output. The member name will be present, but the 3732 // value will be replaced with "sensitive". 3733 func (s S3Object) String() string { 3734 return awsutil.Prettify(s) 3735 } 3736 3737 // GoString returns the string representation. 3738 // 3739 // API parameter values that are decorated as "sensitive" in the API will not 3740 // be included in the string output. The member name will be present, but the 3741 // value will be replaced with "sensitive". 3742 func (s S3Object) GoString() string { 3743 return s.String() 3744 } 3745 3746 // Validate inspects the fields of the type to determine if they are valid. 3747 func (s *S3Object) Validate() error { 3748 invalidParams := request.ErrInvalidParams{Context: "S3Object"} 3749 if s.Bucket != nil && len(*s.Bucket) < 3 { 3750 invalidParams.Add(request.NewErrParamMinLen("Bucket", 3)) 3751 } 3752 if s.Name != nil && len(*s.Name) < 1 { 3753 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 3754 } 3755 if s.Version != nil && len(*s.Version) < 1 { 3756 invalidParams.Add(request.NewErrParamMinLen("Version", 1)) 3757 } 3758 3759 if invalidParams.Len() > 0 { 3760 return invalidParams 3761 } 3762 return nil 3763 } 3764 3765 // SetBucket sets the Bucket field's value. 3766 func (s *S3Object) SetBucket(v string) *S3Object { 3767 s.Bucket = &v 3768 return s 3769 } 3770 3771 // SetName sets the Name field's value. 3772 func (s *S3Object) SetName(v string) *S3Object { 3773 s.Name = &v 3774 return s 3775 } 3776 3777 // SetVersion sets the Version field's value. 3778 func (s *S3Object) SetVersion(v string) *S3Object { 3779 s.Version = &v 3780 return s 3781 } 3782 3783 type StartDocumentAnalysisInput struct { 3784 _ struct{} `type:"structure"` 3785 3786 // The idempotent token that you use to identify the start request. If you use 3787 // the same token with multiple StartDocumentAnalysis requests, the same JobId 3788 // is returned. Use ClientRequestToken to prevent the same job from being accidentally 3789 // started more than once. For more information, see Calling Amazon Textract 3790 // Asynchronous Operations (https://docs.aws.amazon.com/textract/latest/dg/api-async.html). 3791 ClientRequestToken *string `min:"1" type:"string"` 3792 3793 // The location of the document to be processed. 3794 // 3795 // DocumentLocation is a required field 3796 DocumentLocation *DocumentLocation `type:"structure" required:"true"` 3797 3798 // A list of the types of analysis to perform. Add TABLES to the list to return 3799 // information about the tables that are detected in the input document. Add 3800 // FORMS to return detected form data. To perform both types of analysis, add 3801 // TABLES and FORMS to FeatureTypes. All lines and words detected in the document 3802 // are included in the response (including text that isn't related to the value 3803 // of FeatureTypes). 3804 // 3805 // FeatureTypes is a required field 3806 FeatureTypes []*string `type:"list" required:"true"` 3807 3808 // An identifier that you specify that's included in the completion notification 3809 // published to the Amazon SNS topic. For example, you can use JobTag to identify 3810 // the type of document that the completion notification corresponds to (such 3811 // as a tax form or a receipt). 3812 JobTag *string `min:"1" type:"string"` 3813 3814 // The KMS key used to encrypt the inference results. This can be in either 3815 // Key ID or Key Alias format. When a KMS key is provided, the KMS key will 3816 // be used for server-side encryption of the objects in the customer bucket. 3817 // When this parameter is not enabled, the result will be encrypted server side,using 3818 // SSE-S3. 3819 KMSKeyId *string `min:"1" type:"string"` 3820 3821 // The Amazon SNS topic ARN that you want Amazon Textract to publish the completion 3822 // status of the operation to. 3823 NotificationChannel *NotificationChannel `type:"structure"` 3824 3825 // Sets if the output will go to a customer defined bucket. By default, Amazon 3826 // Textract will save the results internally to be accessed by the GetDocumentAnalysis 3827 // operation. 3828 OutputConfig *OutputConfig `type:"structure"` 3829 } 3830 3831 // String returns the string representation. 3832 // 3833 // API parameter values that are decorated as "sensitive" in the API will not 3834 // be included in the string output. The member name will be present, but the 3835 // value will be replaced with "sensitive". 3836 func (s StartDocumentAnalysisInput) String() string { 3837 return awsutil.Prettify(s) 3838 } 3839 3840 // GoString returns the string representation. 3841 // 3842 // API parameter values that are decorated as "sensitive" in the API will not 3843 // be included in the string output. The member name will be present, but the 3844 // value will be replaced with "sensitive". 3845 func (s StartDocumentAnalysisInput) GoString() string { 3846 return s.String() 3847 } 3848 3849 // Validate inspects the fields of the type to determine if they are valid. 3850 func (s *StartDocumentAnalysisInput) Validate() error { 3851 invalidParams := request.ErrInvalidParams{Context: "StartDocumentAnalysisInput"} 3852 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { 3853 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) 3854 } 3855 if s.DocumentLocation == nil { 3856 invalidParams.Add(request.NewErrParamRequired("DocumentLocation")) 3857 } 3858 if s.FeatureTypes == nil { 3859 invalidParams.Add(request.NewErrParamRequired("FeatureTypes")) 3860 } 3861 if s.JobTag != nil && len(*s.JobTag) < 1 { 3862 invalidParams.Add(request.NewErrParamMinLen("JobTag", 1)) 3863 } 3864 if s.KMSKeyId != nil && len(*s.KMSKeyId) < 1 { 3865 invalidParams.Add(request.NewErrParamMinLen("KMSKeyId", 1)) 3866 } 3867 if s.DocumentLocation != nil { 3868 if err := s.DocumentLocation.Validate(); err != nil { 3869 invalidParams.AddNested("DocumentLocation", err.(request.ErrInvalidParams)) 3870 } 3871 } 3872 if s.NotificationChannel != nil { 3873 if err := s.NotificationChannel.Validate(); err != nil { 3874 invalidParams.AddNested("NotificationChannel", err.(request.ErrInvalidParams)) 3875 } 3876 } 3877 if s.OutputConfig != nil { 3878 if err := s.OutputConfig.Validate(); err != nil { 3879 invalidParams.AddNested("OutputConfig", err.(request.ErrInvalidParams)) 3880 } 3881 } 3882 3883 if invalidParams.Len() > 0 { 3884 return invalidParams 3885 } 3886 return nil 3887 } 3888 3889 // SetClientRequestToken sets the ClientRequestToken field's value. 3890 func (s *StartDocumentAnalysisInput) SetClientRequestToken(v string) *StartDocumentAnalysisInput { 3891 s.ClientRequestToken = &v 3892 return s 3893 } 3894 3895 // SetDocumentLocation sets the DocumentLocation field's value. 3896 func (s *StartDocumentAnalysisInput) SetDocumentLocation(v *DocumentLocation) *StartDocumentAnalysisInput { 3897 s.DocumentLocation = v 3898 return s 3899 } 3900 3901 // SetFeatureTypes sets the FeatureTypes field's value. 3902 func (s *StartDocumentAnalysisInput) SetFeatureTypes(v []*string) *StartDocumentAnalysisInput { 3903 s.FeatureTypes = v 3904 return s 3905 } 3906 3907 // SetJobTag sets the JobTag field's value. 3908 func (s *StartDocumentAnalysisInput) SetJobTag(v string) *StartDocumentAnalysisInput { 3909 s.JobTag = &v 3910 return s 3911 } 3912 3913 // SetKMSKeyId sets the KMSKeyId field's value. 3914 func (s *StartDocumentAnalysisInput) SetKMSKeyId(v string) *StartDocumentAnalysisInput { 3915 s.KMSKeyId = &v 3916 return s 3917 } 3918 3919 // SetNotificationChannel sets the NotificationChannel field's value. 3920 func (s *StartDocumentAnalysisInput) SetNotificationChannel(v *NotificationChannel) *StartDocumentAnalysisInput { 3921 s.NotificationChannel = v 3922 return s 3923 } 3924 3925 // SetOutputConfig sets the OutputConfig field's value. 3926 func (s *StartDocumentAnalysisInput) SetOutputConfig(v *OutputConfig) *StartDocumentAnalysisInput { 3927 s.OutputConfig = v 3928 return s 3929 } 3930 3931 type StartDocumentAnalysisOutput struct { 3932 _ struct{} `type:"structure"` 3933 3934 // The identifier for the document text detection job. Use JobId to identify 3935 // the job in a subsequent call to GetDocumentAnalysis. A JobId value is only 3936 // valid for 7 days. 3937 JobId *string `min:"1" type:"string"` 3938 } 3939 3940 // String returns the string representation. 3941 // 3942 // API parameter values that are decorated as "sensitive" in the API will not 3943 // be included in the string output. The member name will be present, but the 3944 // value will be replaced with "sensitive". 3945 func (s StartDocumentAnalysisOutput) String() string { 3946 return awsutil.Prettify(s) 3947 } 3948 3949 // GoString returns the string representation. 3950 // 3951 // API parameter values that are decorated as "sensitive" in the API will not 3952 // be included in the string output. The member name will be present, but the 3953 // value will be replaced with "sensitive". 3954 func (s StartDocumentAnalysisOutput) GoString() string { 3955 return s.String() 3956 } 3957 3958 // SetJobId sets the JobId field's value. 3959 func (s *StartDocumentAnalysisOutput) SetJobId(v string) *StartDocumentAnalysisOutput { 3960 s.JobId = &v 3961 return s 3962 } 3963 3964 type StartDocumentTextDetectionInput struct { 3965 _ struct{} `type:"structure"` 3966 3967 // The idempotent token that's used to identify the start request. If you use 3968 // the same token with multiple StartDocumentTextDetection requests, the same 3969 // JobId is returned. Use ClientRequestToken to prevent the same job from being 3970 // accidentally started more than once. For more information, see Calling Amazon 3971 // Textract Asynchronous Operations (https://docs.aws.amazon.com/textract/latest/dg/api-async.html). 3972 ClientRequestToken *string `min:"1" type:"string"` 3973 3974 // The location of the document to be processed. 3975 // 3976 // DocumentLocation is a required field 3977 DocumentLocation *DocumentLocation `type:"structure" required:"true"` 3978 3979 // An identifier that you specify that's included in the completion notification 3980 // published to the Amazon SNS topic. For example, you can use JobTag to identify 3981 // the type of document that the completion notification corresponds to (such 3982 // as a tax form or a receipt). 3983 JobTag *string `min:"1" type:"string"` 3984 3985 // The KMS key used to encrypt the inference results. This can be in either 3986 // Key ID or Key Alias format. When a KMS key is provided, the KMS key will 3987 // be used for server-side encryption of the objects in the customer bucket. 3988 // When this parameter is not enabled, the result will be encrypted server side,using 3989 // SSE-S3. 3990 KMSKeyId *string `min:"1" type:"string"` 3991 3992 // The Amazon SNS topic ARN that you want Amazon Textract to publish the completion 3993 // status of the operation to. 3994 NotificationChannel *NotificationChannel `type:"structure"` 3995 3996 // Sets if the output will go to a customer defined bucket. By default Amazon 3997 // Textract will save the results internally to be accessed with the GetDocumentTextDetection 3998 // operation. 3999 OutputConfig *OutputConfig `type:"structure"` 4000 } 4001 4002 // String returns the string representation. 4003 // 4004 // API parameter values that are decorated as "sensitive" in the API will not 4005 // be included in the string output. The member name will be present, but the 4006 // value will be replaced with "sensitive". 4007 func (s StartDocumentTextDetectionInput) String() string { 4008 return awsutil.Prettify(s) 4009 } 4010 4011 // GoString returns the string representation. 4012 // 4013 // API parameter values that are decorated as "sensitive" in the API will not 4014 // be included in the string output. The member name will be present, but the 4015 // value will be replaced with "sensitive". 4016 func (s StartDocumentTextDetectionInput) GoString() string { 4017 return s.String() 4018 } 4019 4020 // Validate inspects the fields of the type to determine if they are valid. 4021 func (s *StartDocumentTextDetectionInput) Validate() error { 4022 invalidParams := request.ErrInvalidParams{Context: "StartDocumentTextDetectionInput"} 4023 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { 4024 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) 4025 } 4026 if s.DocumentLocation == nil { 4027 invalidParams.Add(request.NewErrParamRequired("DocumentLocation")) 4028 } 4029 if s.JobTag != nil && len(*s.JobTag) < 1 { 4030 invalidParams.Add(request.NewErrParamMinLen("JobTag", 1)) 4031 } 4032 if s.KMSKeyId != nil && len(*s.KMSKeyId) < 1 { 4033 invalidParams.Add(request.NewErrParamMinLen("KMSKeyId", 1)) 4034 } 4035 if s.DocumentLocation != nil { 4036 if err := s.DocumentLocation.Validate(); err != nil { 4037 invalidParams.AddNested("DocumentLocation", err.(request.ErrInvalidParams)) 4038 } 4039 } 4040 if s.NotificationChannel != nil { 4041 if err := s.NotificationChannel.Validate(); err != nil { 4042 invalidParams.AddNested("NotificationChannel", err.(request.ErrInvalidParams)) 4043 } 4044 } 4045 if s.OutputConfig != nil { 4046 if err := s.OutputConfig.Validate(); err != nil { 4047 invalidParams.AddNested("OutputConfig", err.(request.ErrInvalidParams)) 4048 } 4049 } 4050 4051 if invalidParams.Len() > 0 { 4052 return invalidParams 4053 } 4054 return nil 4055 } 4056 4057 // SetClientRequestToken sets the ClientRequestToken field's value. 4058 func (s *StartDocumentTextDetectionInput) SetClientRequestToken(v string) *StartDocumentTextDetectionInput { 4059 s.ClientRequestToken = &v 4060 return s 4061 } 4062 4063 // SetDocumentLocation sets the DocumentLocation field's value. 4064 func (s *StartDocumentTextDetectionInput) SetDocumentLocation(v *DocumentLocation) *StartDocumentTextDetectionInput { 4065 s.DocumentLocation = v 4066 return s 4067 } 4068 4069 // SetJobTag sets the JobTag field's value. 4070 func (s *StartDocumentTextDetectionInput) SetJobTag(v string) *StartDocumentTextDetectionInput { 4071 s.JobTag = &v 4072 return s 4073 } 4074 4075 // SetKMSKeyId sets the KMSKeyId field's value. 4076 func (s *StartDocumentTextDetectionInput) SetKMSKeyId(v string) *StartDocumentTextDetectionInput { 4077 s.KMSKeyId = &v 4078 return s 4079 } 4080 4081 // SetNotificationChannel sets the NotificationChannel field's value. 4082 func (s *StartDocumentTextDetectionInput) SetNotificationChannel(v *NotificationChannel) *StartDocumentTextDetectionInput { 4083 s.NotificationChannel = v 4084 return s 4085 } 4086 4087 // SetOutputConfig sets the OutputConfig field's value. 4088 func (s *StartDocumentTextDetectionInput) SetOutputConfig(v *OutputConfig) *StartDocumentTextDetectionInput { 4089 s.OutputConfig = v 4090 return s 4091 } 4092 4093 type StartDocumentTextDetectionOutput struct { 4094 _ struct{} `type:"structure"` 4095 4096 // The identifier of the text detection job for the document. Use JobId to identify 4097 // the job in a subsequent call to GetDocumentTextDetection. A JobId value is 4098 // only valid for 7 days. 4099 JobId *string `min:"1" type:"string"` 4100 } 4101 4102 // String returns the string representation. 4103 // 4104 // API parameter values that are decorated as "sensitive" in the API will not 4105 // be included in the string output. The member name will be present, but the 4106 // value will be replaced with "sensitive". 4107 func (s StartDocumentTextDetectionOutput) String() string { 4108 return awsutil.Prettify(s) 4109 } 4110 4111 // GoString returns the string representation. 4112 // 4113 // API parameter values that are decorated as "sensitive" in the API will not 4114 // be included in the string output. The member name will be present, but the 4115 // value will be replaced with "sensitive". 4116 func (s StartDocumentTextDetectionOutput) GoString() string { 4117 return s.String() 4118 } 4119 4120 // SetJobId sets the JobId field's value. 4121 func (s *StartDocumentTextDetectionOutput) SetJobId(v string) *StartDocumentTextDetectionOutput { 4122 s.JobId = &v 4123 return s 4124 } 4125 4126 // Amazon Textract is temporarily unable to process the request. Try your call 4127 // again. 4128 type ThrottlingException struct { 4129 _ struct{} `type:"structure"` 4130 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4131 4132 Message_ *string `locationName:"message" type:"string"` 4133 } 4134 4135 // String returns the string representation. 4136 // 4137 // API parameter values that are decorated as "sensitive" in the API will not 4138 // be included in the string output. The member name will be present, but the 4139 // value will be replaced with "sensitive". 4140 func (s ThrottlingException) String() string { 4141 return awsutil.Prettify(s) 4142 } 4143 4144 // GoString returns the string representation. 4145 // 4146 // API parameter values that are decorated as "sensitive" in the API will not 4147 // be included in the string output. The member name will be present, but the 4148 // value will be replaced with "sensitive". 4149 func (s ThrottlingException) GoString() string { 4150 return s.String() 4151 } 4152 4153 func newErrorThrottlingException(v protocol.ResponseMetadata) error { 4154 return &ThrottlingException{ 4155 RespMetadata: v, 4156 } 4157 } 4158 4159 // Code returns the exception type name. 4160 func (s *ThrottlingException) Code() string { 4161 return "ThrottlingException" 4162 } 4163 4164 // Message returns the exception's message. 4165 func (s *ThrottlingException) Message() string { 4166 if s.Message_ != nil { 4167 return *s.Message_ 4168 } 4169 return "" 4170 } 4171 4172 // OrigErr always returns nil, satisfies awserr.Error interface. 4173 func (s *ThrottlingException) OrigErr() error { 4174 return nil 4175 } 4176 4177 func (s *ThrottlingException) Error() string { 4178 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4179 } 4180 4181 // Status code returns the HTTP status code for the request's response error. 4182 func (s *ThrottlingException) StatusCode() int { 4183 return s.RespMetadata.StatusCode 4184 } 4185 4186 // RequestID returns the service's response RequestID for request. 4187 func (s *ThrottlingException) RequestID() string { 4188 return s.RespMetadata.RequestID 4189 } 4190 4191 // The format of the input document isn't supported. Documents for synchronous 4192 // operations can be in PNG or JPEG format. Documents for asynchronous operations 4193 // can also be in PDF format. 4194 type UnsupportedDocumentException struct { 4195 _ struct{} `type:"structure"` 4196 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4197 4198 Message_ *string `locationName:"message" type:"string"` 4199 } 4200 4201 // String returns the string representation. 4202 // 4203 // API parameter values that are decorated as "sensitive" in the API will not 4204 // be included in the string output. The member name will be present, but the 4205 // value will be replaced with "sensitive". 4206 func (s UnsupportedDocumentException) String() string { 4207 return awsutil.Prettify(s) 4208 } 4209 4210 // GoString returns the string representation. 4211 // 4212 // API parameter values that are decorated as "sensitive" in the API will not 4213 // be included in the string output. The member name will be present, but the 4214 // value will be replaced with "sensitive". 4215 func (s UnsupportedDocumentException) GoString() string { 4216 return s.String() 4217 } 4218 4219 func newErrorUnsupportedDocumentException(v protocol.ResponseMetadata) error { 4220 return &UnsupportedDocumentException{ 4221 RespMetadata: v, 4222 } 4223 } 4224 4225 // Code returns the exception type name. 4226 func (s *UnsupportedDocumentException) Code() string { 4227 return "UnsupportedDocumentException" 4228 } 4229 4230 // Message returns the exception's message. 4231 func (s *UnsupportedDocumentException) Message() string { 4232 if s.Message_ != nil { 4233 return *s.Message_ 4234 } 4235 return "" 4236 } 4237 4238 // OrigErr always returns nil, satisfies awserr.Error interface. 4239 func (s *UnsupportedDocumentException) OrigErr() error { 4240 return nil 4241 } 4242 4243 func (s *UnsupportedDocumentException) Error() string { 4244 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4245 } 4246 4247 // Status code returns the HTTP status code for the request's response error. 4248 func (s *UnsupportedDocumentException) StatusCode() int { 4249 return s.RespMetadata.StatusCode 4250 } 4251 4252 // RequestID returns the service's response RequestID for request. 4253 func (s *UnsupportedDocumentException) RequestID() string { 4254 return s.RespMetadata.RequestID 4255 } 4256 4257 // A warning about an issue that occurred during asynchronous text analysis 4258 // (StartDocumentAnalysis) or asynchronous document text detection (StartDocumentTextDetection). 4259 type Warning struct { 4260 _ struct{} `type:"structure"` 4261 4262 // The error code for the warning. 4263 ErrorCode *string `type:"string"` 4264 4265 // A list of the pages that the warning applies to. 4266 Pages []*int64 `type:"list"` 4267 } 4268 4269 // String returns the string representation. 4270 // 4271 // API parameter values that are decorated as "sensitive" in the API will not 4272 // be included in the string output. The member name will be present, but the 4273 // value will be replaced with "sensitive". 4274 func (s Warning) String() string { 4275 return awsutil.Prettify(s) 4276 } 4277 4278 // GoString returns the string representation. 4279 // 4280 // API parameter values that are decorated as "sensitive" in the API will not 4281 // be included in the string output. The member name will be present, but the 4282 // value will be replaced with "sensitive". 4283 func (s Warning) GoString() string { 4284 return s.String() 4285 } 4286 4287 // SetErrorCode sets the ErrorCode field's value. 4288 func (s *Warning) SetErrorCode(v string) *Warning { 4289 s.ErrorCode = &v 4290 return s 4291 } 4292 4293 // SetPages sets the Pages field's value. 4294 func (s *Warning) SetPages(v []*int64) *Warning { 4295 s.Pages = v 4296 return s 4297 } 4298 4299 const ( 4300 // BlockTypeKeyValueSet is a BlockType enum value 4301 BlockTypeKeyValueSet = "KEY_VALUE_SET" 4302 4303 // BlockTypePage is a BlockType enum value 4304 BlockTypePage = "PAGE" 4305 4306 // BlockTypeLine is a BlockType enum value 4307 BlockTypeLine = "LINE" 4308 4309 // BlockTypeWord is a BlockType enum value 4310 BlockTypeWord = "WORD" 4311 4312 // BlockTypeTable is a BlockType enum value 4313 BlockTypeTable = "TABLE" 4314 4315 // BlockTypeCell is a BlockType enum value 4316 BlockTypeCell = "CELL" 4317 4318 // BlockTypeSelectionElement is a BlockType enum value 4319 BlockTypeSelectionElement = "SELECTION_ELEMENT" 4320 ) 4321 4322 // BlockType_Values returns all elements of the BlockType enum 4323 func BlockType_Values() []string { 4324 return []string{ 4325 BlockTypeKeyValueSet, 4326 BlockTypePage, 4327 BlockTypeLine, 4328 BlockTypeWord, 4329 BlockTypeTable, 4330 BlockTypeCell, 4331 BlockTypeSelectionElement, 4332 } 4333 } 4334 4335 const ( 4336 // ContentClassifierFreeOfPersonallyIdentifiableInformation is a ContentClassifier enum value 4337 ContentClassifierFreeOfPersonallyIdentifiableInformation = "FreeOfPersonallyIdentifiableInformation" 4338 4339 // ContentClassifierFreeOfAdultContent is a ContentClassifier enum value 4340 ContentClassifierFreeOfAdultContent = "FreeOfAdultContent" 4341 ) 4342 4343 // ContentClassifier_Values returns all elements of the ContentClassifier enum 4344 func ContentClassifier_Values() []string { 4345 return []string{ 4346 ContentClassifierFreeOfPersonallyIdentifiableInformation, 4347 ContentClassifierFreeOfAdultContent, 4348 } 4349 } 4350 4351 const ( 4352 // EntityTypeKey is a EntityType enum value 4353 EntityTypeKey = "KEY" 4354 4355 // EntityTypeValue is a EntityType enum value 4356 EntityTypeValue = "VALUE" 4357 ) 4358 4359 // EntityType_Values returns all elements of the EntityType enum 4360 func EntityType_Values() []string { 4361 return []string{ 4362 EntityTypeKey, 4363 EntityTypeValue, 4364 } 4365 } 4366 4367 const ( 4368 // FeatureTypeTables is a FeatureType enum value 4369 FeatureTypeTables = "TABLES" 4370 4371 // FeatureTypeForms is a FeatureType enum value 4372 FeatureTypeForms = "FORMS" 4373 ) 4374 4375 // FeatureType_Values returns all elements of the FeatureType enum 4376 func FeatureType_Values() []string { 4377 return []string{ 4378 FeatureTypeTables, 4379 FeatureTypeForms, 4380 } 4381 } 4382 4383 const ( 4384 // JobStatusInProgress is a JobStatus enum value 4385 JobStatusInProgress = "IN_PROGRESS" 4386 4387 // JobStatusSucceeded is a JobStatus enum value 4388 JobStatusSucceeded = "SUCCEEDED" 4389 4390 // JobStatusFailed is a JobStatus enum value 4391 JobStatusFailed = "FAILED" 4392 4393 // JobStatusPartialSuccess is a JobStatus enum value 4394 JobStatusPartialSuccess = "PARTIAL_SUCCESS" 4395 ) 4396 4397 // JobStatus_Values returns all elements of the JobStatus enum 4398 func JobStatus_Values() []string { 4399 return []string{ 4400 JobStatusInProgress, 4401 JobStatusSucceeded, 4402 JobStatusFailed, 4403 JobStatusPartialSuccess, 4404 } 4405 } 4406 4407 const ( 4408 // RelationshipTypeValue is a RelationshipType enum value 4409 RelationshipTypeValue = "VALUE" 4410 4411 // RelationshipTypeChild is a RelationshipType enum value 4412 RelationshipTypeChild = "CHILD" 4413 4414 // RelationshipTypeComplexFeatures is a RelationshipType enum value 4415 RelationshipTypeComplexFeatures = "COMPLEX_FEATURES" 4416 ) 4417 4418 // RelationshipType_Values returns all elements of the RelationshipType enum 4419 func RelationshipType_Values() []string { 4420 return []string{ 4421 RelationshipTypeValue, 4422 RelationshipTypeChild, 4423 RelationshipTypeComplexFeatures, 4424 } 4425 } 4426 4427 const ( 4428 // SelectionStatusSelected is a SelectionStatus enum value 4429 SelectionStatusSelected = "SELECTED" 4430 4431 // SelectionStatusNotSelected is a SelectionStatus enum value 4432 SelectionStatusNotSelected = "NOT_SELECTED" 4433 ) 4434 4435 // SelectionStatus_Values returns all elements of the SelectionStatus enum 4436 func SelectionStatus_Values() []string { 4437 return []string{ 4438 SelectionStatusSelected, 4439 SelectionStatusNotSelected, 4440 } 4441 } 4442 4443 const ( 4444 // TextTypeHandwriting is a TextType enum value 4445 TextTypeHandwriting = "HANDWRITING" 4446 4447 // TextTypePrinted is a TextType enum value 4448 TextTypePrinted = "PRINTED" 4449 ) 4450 4451 // TextType_Values returns all elements of the TextType enum 4452 func TextType_Values() []string { 4453 return []string{ 4454 TextTypeHandwriting, 4455 TextTypePrinted, 4456 } 4457 }