1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package textract 4 5import ( 6 "github.com/aws/aws-sdk-go/aws" 7 "github.com/aws/aws-sdk-go/aws/awsutil" 8 "github.com/aws/aws-sdk-go/aws/request" 9) 10 11const opAnalyzeDocument = "AnalyzeDocument" 12 13// AnalyzeDocumentRequest generates a "aws/request.Request" representing the 14// client's request for the AnalyzeDocument operation. The "output" return 15// value will be populated with the request's response once the request completes 16// successfully. 17// 18// Use "Send" method on the returned Request to send the API call to the service. 19// the "output" return value is not valid until after Send returns without error. 20// 21// See AnalyzeDocument for more information on using the AnalyzeDocument 22// API call, and error handling. 23// 24// This method is useful when you want to inject custom logic or configuration 25// into the SDK's request lifecycle. Such as custom headers, or retry logic. 26// 27// 28// // Example sending a request using the AnalyzeDocumentRequest method. 29// req, resp := client.AnalyzeDocumentRequest(params) 30// 31// err := req.Send() 32// if err == nil { // resp is now filled 33// fmt.Println(resp) 34// } 35// 36// See also, https://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/AnalyzeDocument 37func (c *Textract) AnalyzeDocumentRequest(input *AnalyzeDocumentInput) (req *request.Request, output *AnalyzeDocumentOutput) { 38 op := &request.Operation{ 39 Name: opAnalyzeDocument, 40 HTTPMethod: "POST", 41 HTTPPath: "/", 42 } 43 44 if input == nil { 45 input = &AnalyzeDocumentInput{} 46 } 47 48 output = &AnalyzeDocumentOutput{} 49 req = c.newRequest(op, input, output) 50 return 51} 52 53// AnalyzeDocument API operation for Amazon Textract. 54// 55// Analyzes an input document for relationships between detected items. 56// 57// The types of information returned are as follows: 58// 59// * Form data (key-value pairs). The related information is returned in 60// two Block objects, each of type KEY_VALUE_SET: a KEY Block object and 61// a VALUE Block object. For example, Name: Ana Silva Carolina contains a 62// key and value. Name: is the key. Ana Silva Carolina is the value. 63// 64// * Table and table cell data. A TABLE Block object contains information 65// about a detected table. A CELL Block object is returned for each cell 66// in a table. 67// 68// * Lines and words of text. A LINE Block object contains one or more WORD 69// Block objects. All lines and words that are detected in the document are 70// returned (including text that doesn't have a relationship with the value 71// of FeatureTypes). 72// 73// Selection elements such as check boxes and option buttons (radio buttons) 74// can be detected in form data and in tables. A SELECTION_ELEMENT Block object 75// contains information about a selection element, including the selection status. 76// 77// You can choose which type of analysis to perform by specifying the FeatureTypes 78// list. 79// 80// The output is returned in a list of Block objects. 81// 82// AnalyzeDocument is a synchronous operation. To analyze documents asynchronously, 83// use StartDocumentAnalysis. 84// 85// For more information, see Document Text Analysis (https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html). 86// 87// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 88// with awserr.Error's Code and Message methods to get detailed information about 89// the error. 90// 91// See the AWS API reference guide for Amazon Textract's 92// API operation AnalyzeDocument for usage and error information. 93// 94// Returned Error Codes: 95// * ErrCodeInvalidParameterException "InvalidParameterException" 96// An input parameter violated a constraint. For example, in synchronous operations, 97// an InvalidParameterException exception occurs when neither of the S3Object 98// or Bytes values are supplied in the Document request parameter. Validate 99// your parameter before calling the API operation again. 100// 101// * ErrCodeInvalidS3ObjectException "InvalidS3ObjectException" 102// Amazon Textract is unable to access the S3 object that's specified in the 103// request. 104// 105// * ErrCodeUnsupportedDocumentException "UnsupportedDocumentException" 106// The format of the input document isn't supported. Documents for synchronous 107// operations can be in PNG or JPEG format. Documents for asynchronous operations 108// can also be in PDF format. 109// 110// * ErrCodeDocumentTooLargeException "DocumentTooLargeException" 111// The document can't be processed because it's too large. The maximum document 112// size for synchronous operations 5 MB. The maximum document size for asynchronous 113// operations is 500 MB for PDF files. 114// 115// * ErrCodeBadDocumentException "BadDocumentException" 116// Amazon Textract isn't able to read the document. 117// 118// * ErrCodeAccessDeniedException "AccessDeniedException" 119// You aren't authorized to perform the action. 120// 121// * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException" 122// The number of requests exceeded your throughput limit. If you want to increase 123// this limit, contact Amazon Textract. 124// 125// * ErrCodeInternalServerError "InternalServerError" 126// Amazon Textract experienced a service issue. Try your call again. 127// 128// * ErrCodeThrottlingException "ThrottlingException" 129// Amazon Textract is temporarily unable to process the request. Try your call 130// again. 131// 132// * ErrCodeHumanLoopQuotaExceededException "HumanLoopQuotaExceededException" 133// Indicates you have exceeded the maximum number of active human in the loop 134// workflows available 135// 136// See also, https://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/AnalyzeDocument 137func (c *Textract) AnalyzeDocument(input *AnalyzeDocumentInput) (*AnalyzeDocumentOutput, error) { 138 req, out := c.AnalyzeDocumentRequest(input) 139 return out, req.Send() 140} 141 142// AnalyzeDocumentWithContext is the same as AnalyzeDocument with the addition of 143// the ability to pass a context and additional request options. 144// 145// See AnalyzeDocument for details on how to use this API operation. 146// 147// The context must be non-nil and will be used for request cancellation. If 148// the context is nil a panic will occur. In the future the SDK may create 149// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 150// for more information on using Contexts. 151func (c *Textract) AnalyzeDocumentWithContext(ctx aws.Context, input *AnalyzeDocumentInput, opts ...request.Option) (*AnalyzeDocumentOutput, error) { 152 req, out := c.AnalyzeDocumentRequest(input) 153 req.SetContext(ctx) 154 req.ApplyOptions(opts...) 155 return out, req.Send() 156} 157 158const opDetectDocumentText = "DetectDocumentText" 159 160// DetectDocumentTextRequest generates a "aws/request.Request" representing the 161// client's request for the DetectDocumentText operation. The "output" return 162// value will be populated with the request's response once the request completes 163// successfully. 164// 165// Use "Send" method on the returned Request to send the API call to the service. 166// the "output" return value is not valid until after Send returns without error. 167// 168// See DetectDocumentText for more information on using the DetectDocumentText 169// API call, and error handling. 170// 171// This method is useful when you want to inject custom logic or configuration 172// into the SDK's request lifecycle. Such as custom headers, or retry logic. 173// 174// 175// // Example sending a request using the DetectDocumentTextRequest method. 176// req, resp := client.DetectDocumentTextRequest(params) 177// 178// err := req.Send() 179// if err == nil { // resp is now filled 180// fmt.Println(resp) 181// } 182// 183// See also, https://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/DetectDocumentText 184func (c *Textract) DetectDocumentTextRequest(input *DetectDocumentTextInput) (req *request.Request, output *DetectDocumentTextOutput) { 185 op := &request.Operation{ 186 Name: opDetectDocumentText, 187 HTTPMethod: "POST", 188 HTTPPath: "/", 189 } 190 191 if input == nil { 192 input = &DetectDocumentTextInput{} 193 } 194 195 output = &DetectDocumentTextOutput{} 196 req = c.newRequest(op, input, output) 197 return 198} 199 200// DetectDocumentText API operation for Amazon Textract. 201// 202// Detects text in the input document. Amazon Textract can detect lines of text 203// and the words that make up a line of text. The input document must be an 204// image in JPEG or PNG format. DetectDocumentText returns the detected text 205// in an array of Block objects. 206// 207// Each document page has as an associated Block of type PAGE. Each PAGE Block 208// object is the parent of LINE Block objects that represent the lines of detected 209// text on a page. A LINE Block object is a parent for each word that makes 210// up the line. Words are represented by Block objects of type WORD. 211// 212// DetectDocumentText is a synchronous operation. To analyze documents asynchronously, 213// use StartDocumentTextDetection. 214// 215// For more information, see Document Text Detection (https://docs.aws.amazon.com/textract/latest/dg/how-it-works-detecting.html). 216// 217// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 218// with awserr.Error's Code and Message methods to get detailed information about 219// the error. 220// 221// See the AWS API reference guide for Amazon Textract's 222// API operation DetectDocumentText for usage and error information. 223// 224// Returned Error Codes: 225// * ErrCodeInvalidParameterException "InvalidParameterException" 226// An input parameter violated a constraint. For example, in synchronous operations, 227// an InvalidParameterException exception occurs when neither of the S3Object 228// or Bytes values are supplied in the Document request parameter. Validate 229// your parameter before calling the API operation again. 230// 231// * ErrCodeInvalidS3ObjectException "InvalidS3ObjectException" 232// Amazon Textract is unable to access the S3 object that's specified in the 233// request. 234// 235// * ErrCodeUnsupportedDocumentException "UnsupportedDocumentException" 236// The format of the input document isn't supported. Documents for synchronous 237// operations can be in PNG or JPEG format. Documents for asynchronous operations 238// can also be in PDF format. 239// 240// * ErrCodeDocumentTooLargeException "DocumentTooLargeException" 241// The document can't be processed because it's too large. The maximum document 242// size for synchronous operations 5 MB. The maximum document size for asynchronous 243// operations is 500 MB for PDF files. 244// 245// * ErrCodeBadDocumentException "BadDocumentException" 246// Amazon Textract isn't able to read the document. 247// 248// * ErrCodeAccessDeniedException "AccessDeniedException" 249// You aren't authorized to perform the action. 250// 251// * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException" 252// The number of requests exceeded your throughput limit. If you want to increase 253// this limit, contact Amazon Textract. 254// 255// * ErrCodeInternalServerError "InternalServerError" 256// Amazon Textract experienced a service issue. Try your call again. 257// 258// * ErrCodeThrottlingException "ThrottlingException" 259// Amazon Textract is temporarily unable to process the request. Try your call 260// again. 261// 262// See also, https://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/DetectDocumentText 263func (c *Textract) DetectDocumentText(input *DetectDocumentTextInput) (*DetectDocumentTextOutput, error) { 264 req, out := c.DetectDocumentTextRequest(input) 265 return out, req.Send() 266} 267 268// DetectDocumentTextWithContext is the same as DetectDocumentText with the addition of 269// the ability to pass a context and additional request options. 270// 271// See DetectDocumentText for details on how to use this API operation. 272// 273// The context must be non-nil and will be used for request cancellation. If 274// the context is nil a panic will occur. In the future the SDK may create 275// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 276// for more information on using Contexts. 277func (c *Textract) DetectDocumentTextWithContext(ctx aws.Context, input *DetectDocumentTextInput, opts ...request.Option) (*DetectDocumentTextOutput, error) { 278 req, out := c.DetectDocumentTextRequest(input) 279 req.SetContext(ctx) 280 req.ApplyOptions(opts...) 281 return out, req.Send() 282} 283 284const opGetDocumentAnalysis = "GetDocumentAnalysis" 285 286// GetDocumentAnalysisRequest generates a "aws/request.Request" representing the 287// client's request for the GetDocumentAnalysis operation. The "output" return 288// value will be populated with the request's response once the request completes 289// successfully. 290// 291// Use "Send" method on the returned Request to send the API call to the service. 292// the "output" return value is not valid until after Send returns without error. 293// 294// See GetDocumentAnalysis for more information on using the GetDocumentAnalysis 295// API call, and error handling. 296// 297// This method is useful when you want to inject custom logic or configuration 298// into the SDK's request lifecycle. Such as custom headers, or retry logic. 299// 300// 301// // Example sending a request using the GetDocumentAnalysisRequest method. 302// req, resp := client.GetDocumentAnalysisRequest(params) 303// 304// err := req.Send() 305// if err == nil { // resp is now filled 306// fmt.Println(resp) 307// } 308// 309// See also, https://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/GetDocumentAnalysis 310func (c *Textract) GetDocumentAnalysisRequest(input *GetDocumentAnalysisInput) (req *request.Request, output *GetDocumentAnalysisOutput) { 311 op := &request.Operation{ 312 Name: opGetDocumentAnalysis, 313 HTTPMethod: "POST", 314 HTTPPath: "/", 315 } 316 317 if input == nil { 318 input = &GetDocumentAnalysisInput{} 319 } 320 321 output = &GetDocumentAnalysisOutput{} 322 req = c.newRequest(op, input, output) 323 return 324} 325 326// GetDocumentAnalysis API operation for Amazon Textract. 327// 328// Gets the results for an Amazon Textract asynchronous operation that analyzes 329// text in a document. 330// 331// You start asynchronous text analysis by calling StartDocumentAnalysis, which 332// returns a job identifier (JobId). When the text analysis operation finishes, 333// Amazon Textract publishes a completion status to the Amazon Simple Notification 334// Service (Amazon SNS) topic that's registered in the initial call to StartDocumentAnalysis. 335// To get the results of the text-detection operation, first check that the 336// status value published to the Amazon SNS topic is SUCCEEDED. If so, call 337// GetDocumentAnalysis, and pass the job identifier (JobId) from the initial 338// call to StartDocumentAnalysis. 339// 340// GetDocumentAnalysis returns an array of Block objects. The following types 341// of information are returned: 342// 343// * Form data (key-value pairs). The related information is returned in 344// two Block objects, each of type KEY_VALUE_SET: a KEY Block object and 345// a VALUE Block object. For example, Name: Ana Silva Carolina contains a 346// key and value. Name: is the key. Ana Silva Carolina is the value. 347// 348// * Table and table cell data. A TABLE Block object contains information 349// about a detected table. A CELL Block object is returned for each cell 350// in a table. 351// 352// * Lines and words of text. A LINE Block object contains one or more WORD 353// Block objects. All lines and words that are detected in the document are 354// returned (including text that doesn't have a relationship with the value 355// of the StartDocumentAnalysis FeatureTypes input parameter). 356// 357// Selection elements such as check boxes and option buttons (radio buttons) 358// can be detected in form data and in tables. A SELECTION_ELEMENT Block object 359// contains information about a selection element, including the selection status. 360// 361// Use the MaxResults parameter to limit the number of blocks that are returned. 362// If there are more results than specified in MaxResults, the value of NextToken 363// in the operation response contains a pagination token for getting the next 364// set of results. To get the next page of results, call GetDocumentAnalysis, 365// and populate the NextToken request parameter with the token value that's 366// returned from the previous call to GetDocumentAnalysis. 367// 368// For more information, see Document Text Analysis (https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html). 369// 370// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 371// with awserr.Error's Code and Message methods to get detailed information about 372// the error. 373// 374// See the AWS API reference guide for Amazon Textract's 375// API operation GetDocumentAnalysis for usage and error information. 376// 377// Returned Error Codes: 378// * ErrCodeInvalidParameterException "InvalidParameterException" 379// An input parameter violated a constraint. For example, in synchronous operations, 380// an InvalidParameterException exception occurs when neither of the S3Object 381// or Bytes values are supplied in the Document request parameter. Validate 382// your parameter before calling the API operation again. 383// 384// * ErrCodeAccessDeniedException "AccessDeniedException" 385// You aren't authorized to perform the action. 386// 387// * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException" 388// The number of requests exceeded your throughput limit. If you want to increase 389// this limit, contact Amazon Textract. 390// 391// * ErrCodeInvalidJobIdException "InvalidJobIdException" 392// An invalid job identifier was passed to GetDocumentAnalysis or to GetDocumentAnalysis. 393// 394// * ErrCodeInternalServerError "InternalServerError" 395// Amazon Textract experienced a service issue. Try your call again. 396// 397// * ErrCodeThrottlingException "ThrottlingException" 398// Amazon Textract is temporarily unable to process the request. Try your call 399// again. 400// 401// See also, https://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/GetDocumentAnalysis 402func (c *Textract) GetDocumentAnalysis(input *GetDocumentAnalysisInput) (*GetDocumentAnalysisOutput, error) { 403 req, out := c.GetDocumentAnalysisRequest(input) 404 return out, req.Send() 405} 406 407// GetDocumentAnalysisWithContext is the same as GetDocumentAnalysis with the addition of 408// the ability to pass a context and additional request options. 409// 410// See GetDocumentAnalysis for details on how to use this API operation. 411// 412// The context must be non-nil and will be used for request cancellation. If 413// the context is nil a panic will occur. In the future the SDK may create 414// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 415// for more information on using Contexts. 416func (c *Textract) GetDocumentAnalysisWithContext(ctx aws.Context, input *GetDocumentAnalysisInput, opts ...request.Option) (*GetDocumentAnalysisOutput, error) { 417 req, out := c.GetDocumentAnalysisRequest(input) 418 req.SetContext(ctx) 419 req.ApplyOptions(opts...) 420 return out, req.Send() 421} 422 423const opGetDocumentTextDetection = "GetDocumentTextDetection" 424 425// GetDocumentTextDetectionRequest generates a "aws/request.Request" representing the 426// client's request for the GetDocumentTextDetection operation. The "output" return 427// value will be populated with the request's response once the request completes 428// successfully. 429// 430// Use "Send" method on the returned Request to send the API call to the service. 431// the "output" return value is not valid until after Send returns without error. 432// 433// See GetDocumentTextDetection for more information on using the GetDocumentTextDetection 434// API call, and error handling. 435// 436// This method is useful when you want to inject custom logic or configuration 437// into the SDK's request lifecycle. Such as custom headers, or retry logic. 438// 439// 440// // Example sending a request using the GetDocumentTextDetectionRequest method. 441// req, resp := client.GetDocumentTextDetectionRequest(params) 442// 443// err := req.Send() 444// if err == nil { // resp is now filled 445// fmt.Println(resp) 446// } 447// 448// See also, https://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/GetDocumentTextDetection 449func (c *Textract) GetDocumentTextDetectionRequest(input *GetDocumentTextDetectionInput) (req *request.Request, output *GetDocumentTextDetectionOutput) { 450 op := &request.Operation{ 451 Name: opGetDocumentTextDetection, 452 HTTPMethod: "POST", 453 HTTPPath: "/", 454 } 455 456 if input == nil { 457 input = &GetDocumentTextDetectionInput{} 458 } 459 460 output = &GetDocumentTextDetectionOutput{} 461 req = c.newRequest(op, input, output) 462 return 463} 464 465// GetDocumentTextDetection API operation for Amazon Textract. 466// 467// Gets the results for an Amazon Textract asynchronous operation that detects 468// text in a document. Amazon Textract can detect lines of text and the words 469// that make up a line of text. 470// 471// You start asynchronous text detection by calling StartDocumentTextDetection, 472// which returns a job identifier (JobId). When the text detection operation 473// finishes, Amazon Textract publishes a completion status to the Amazon Simple 474// Notification Service (Amazon SNS) topic that's registered in the initial 475// call to StartDocumentTextDetection. To get the results of the text-detection 476// operation, first check that the status value published to the Amazon SNS 477// topic is SUCCEEDED. If so, call GetDocumentTextDetection, and pass the job 478// identifier (JobId) from the initial call to StartDocumentTextDetection. 479// 480// GetDocumentTextDetection returns an array of Block objects. 481// 482// Each document page has as an associated Block of type PAGE. Each PAGE Block 483// object is the parent of LINE Block objects that represent the lines of detected 484// text on a page. A LINE Block object is a parent for each word that makes 485// up the line. Words are represented by Block objects of type WORD. 486// 487// Use the MaxResults parameter to limit the number of blocks that are returned. 488// If there are more results than specified in MaxResults, the value of NextToken 489// in the operation response contains a pagination token for getting the next 490// set of results. To get the next page of results, call GetDocumentTextDetection, 491// and populate the NextToken request parameter with the token value that's 492// returned from the previous call to GetDocumentTextDetection. 493// 494// For more information, see Document Text Detection (https://docs.aws.amazon.com/textract/latest/dg/how-it-works-detecting.html). 495// 496// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 497// with awserr.Error's Code and Message methods to get detailed information about 498// the error. 499// 500// See the AWS API reference guide for Amazon Textract's 501// API operation GetDocumentTextDetection for usage and error information. 502// 503// Returned Error Codes: 504// * ErrCodeInvalidParameterException "InvalidParameterException" 505// An input parameter violated a constraint. For example, in synchronous operations, 506// an InvalidParameterException exception occurs when neither of the S3Object 507// or Bytes values are supplied in the Document request parameter. Validate 508// your parameter before calling the API operation again. 509// 510// * ErrCodeAccessDeniedException "AccessDeniedException" 511// You aren't authorized to perform the action. 512// 513// * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException" 514// The number of requests exceeded your throughput limit. If you want to increase 515// this limit, contact Amazon Textract. 516// 517// * ErrCodeInvalidJobIdException "InvalidJobIdException" 518// An invalid job identifier was passed to GetDocumentAnalysis or to GetDocumentAnalysis. 519// 520// * ErrCodeInternalServerError "InternalServerError" 521// Amazon Textract experienced a service issue. Try your call again. 522// 523// * ErrCodeThrottlingException "ThrottlingException" 524// Amazon Textract is temporarily unable to process the request. Try your call 525// again. 526// 527// See also, https://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/GetDocumentTextDetection 528func (c *Textract) GetDocumentTextDetection(input *GetDocumentTextDetectionInput) (*GetDocumentTextDetectionOutput, error) { 529 req, out := c.GetDocumentTextDetectionRequest(input) 530 return out, req.Send() 531} 532 533// GetDocumentTextDetectionWithContext is the same as GetDocumentTextDetection with the addition of 534// the ability to pass a context and additional request options. 535// 536// See GetDocumentTextDetection for details on how to use this API operation. 537// 538// The context must be non-nil and will be used for request cancellation. If 539// the context is nil a panic will occur. In the future the SDK may create 540// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 541// for more information on using Contexts. 542func (c *Textract) GetDocumentTextDetectionWithContext(ctx aws.Context, input *GetDocumentTextDetectionInput, opts ...request.Option) (*GetDocumentTextDetectionOutput, error) { 543 req, out := c.GetDocumentTextDetectionRequest(input) 544 req.SetContext(ctx) 545 req.ApplyOptions(opts...) 546 return out, req.Send() 547} 548 549const opStartDocumentAnalysis = "StartDocumentAnalysis" 550 551// StartDocumentAnalysisRequest generates a "aws/request.Request" representing the 552// client's request for the StartDocumentAnalysis operation. The "output" return 553// value will be populated with the request's response once the request completes 554// successfully. 555// 556// Use "Send" method on the returned Request to send the API call to the service. 557// the "output" return value is not valid until after Send returns without error. 558// 559// See StartDocumentAnalysis for more information on using the StartDocumentAnalysis 560// API call, and error handling. 561// 562// This method is useful when you want to inject custom logic or configuration 563// into the SDK's request lifecycle. Such as custom headers, or retry logic. 564// 565// 566// // Example sending a request using the StartDocumentAnalysisRequest method. 567// req, resp := client.StartDocumentAnalysisRequest(params) 568// 569// err := req.Send() 570// if err == nil { // resp is now filled 571// fmt.Println(resp) 572// } 573// 574// See also, https://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/StartDocumentAnalysis 575func (c *Textract) StartDocumentAnalysisRequest(input *StartDocumentAnalysisInput) (req *request.Request, output *StartDocumentAnalysisOutput) { 576 op := &request.Operation{ 577 Name: opStartDocumentAnalysis, 578 HTTPMethod: "POST", 579 HTTPPath: "/", 580 } 581 582 if input == nil { 583 input = &StartDocumentAnalysisInput{} 584 } 585 586 output = &StartDocumentAnalysisOutput{} 587 req = c.newRequest(op, input, output) 588 return 589} 590 591// StartDocumentAnalysis API operation for Amazon Textract. 592// 593// Starts the asynchronous analysis of an input document for relationships between 594// detected items such as key-value pairs, tables, and selection elements. 595// 596// StartDocumentAnalysis can analyze text in documents that are in JPEG, PNG, 597// and PDF format. The documents are stored in an Amazon S3 bucket. Use DocumentLocation 598// to specify the bucket name and file name of the document. 599// 600// StartDocumentAnalysis returns a job identifier (JobId) that you use to get 601// the results of the operation. When text analysis is finished, Amazon Textract 602// publishes a completion status to the Amazon Simple Notification Service (Amazon 603// SNS) topic that you specify in NotificationChannel. To get the results of 604// the text analysis operation, first check that the status value published 605// to the Amazon SNS topic is SUCCEEDED. If so, call GetDocumentAnalysis, and 606// pass the job identifier (JobId) from the initial call to StartDocumentAnalysis. 607// 608// For more information, see Document Text Analysis (https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html). 609// 610// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 611// with awserr.Error's Code and Message methods to get detailed information about 612// the error. 613// 614// See the AWS API reference guide for Amazon Textract's 615// API operation StartDocumentAnalysis for usage and error information. 616// 617// Returned Error Codes: 618// * ErrCodeInvalidParameterException "InvalidParameterException" 619// An input parameter violated a constraint. For example, in synchronous operations, 620// an InvalidParameterException exception occurs when neither of the S3Object 621// or Bytes values are supplied in the Document request parameter. Validate 622// your parameter before calling the API operation again. 623// 624// * ErrCodeInvalidS3ObjectException "InvalidS3ObjectException" 625// Amazon Textract is unable to access the S3 object that's specified in the 626// request. 627// 628// * ErrCodeUnsupportedDocumentException "UnsupportedDocumentException" 629// The format of the input document isn't supported. Documents for synchronous 630// operations can be in PNG or JPEG format. Documents for asynchronous operations 631// can also be in PDF format. 632// 633// * ErrCodeDocumentTooLargeException "DocumentTooLargeException" 634// The document can't be processed because it's too large. The maximum document 635// size for synchronous operations 5 MB. The maximum document size for asynchronous 636// operations is 500 MB for PDF files. 637// 638// * ErrCodeBadDocumentException "BadDocumentException" 639// Amazon Textract isn't able to read the document. 640// 641// * ErrCodeAccessDeniedException "AccessDeniedException" 642// You aren't authorized to perform the action. 643// 644// * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException" 645// The number of requests exceeded your throughput limit. If you want to increase 646// this limit, contact Amazon Textract. 647// 648// * ErrCodeInternalServerError "InternalServerError" 649// Amazon Textract experienced a service issue. Try your call again. 650// 651// * ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException" 652// A ClientRequestToken input parameter was reused with an operation, but at 653// least one of the other input parameters is different from the previous call 654// to the operation. 655// 656// * ErrCodeThrottlingException "ThrottlingException" 657// Amazon Textract is temporarily unable to process the request. Try your call 658// again. 659// 660// * ErrCodeLimitExceededException "LimitExceededException" 661// An Amazon Textract service limit was exceeded. For example, if you start 662// too many asynchronous jobs concurrently, calls to start operations (StartDocumentTextDetection, 663// for example) raise a LimitExceededException exception (HTTP status code: 664// 400) until the number of concurrently running jobs is below the Amazon Textract 665// service limit. 666// 667// See also, https://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/StartDocumentAnalysis 668func (c *Textract) StartDocumentAnalysis(input *StartDocumentAnalysisInput) (*StartDocumentAnalysisOutput, error) { 669 req, out := c.StartDocumentAnalysisRequest(input) 670 return out, req.Send() 671} 672 673// StartDocumentAnalysisWithContext is the same as StartDocumentAnalysis with the addition of 674// the ability to pass a context and additional request options. 675// 676// See StartDocumentAnalysis for details on how to use this API operation. 677// 678// The context must be non-nil and will be used for request cancellation. If 679// the context is nil a panic will occur. In the future the SDK may create 680// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 681// for more information on using Contexts. 682func (c *Textract) StartDocumentAnalysisWithContext(ctx aws.Context, input *StartDocumentAnalysisInput, opts ...request.Option) (*StartDocumentAnalysisOutput, error) { 683 req, out := c.StartDocumentAnalysisRequest(input) 684 req.SetContext(ctx) 685 req.ApplyOptions(opts...) 686 return out, req.Send() 687} 688 689const opStartDocumentTextDetection = "StartDocumentTextDetection" 690 691// StartDocumentTextDetectionRequest generates a "aws/request.Request" representing the 692// client's request for the StartDocumentTextDetection operation. The "output" return 693// value will be populated with the request's response once the request completes 694// successfully. 695// 696// Use "Send" method on the returned Request to send the API call to the service. 697// the "output" return value is not valid until after Send returns without error. 698// 699// See StartDocumentTextDetection for more information on using the StartDocumentTextDetection 700// API call, and error handling. 701// 702// This method is useful when you want to inject custom logic or configuration 703// into the SDK's request lifecycle. Such as custom headers, or retry logic. 704// 705// 706// // Example sending a request using the StartDocumentTextDetectionRequest method. 707// req, resp := client.StartDocumentTextDetectionRequest(params) 708// 709// err := req.Send() 710// if err == nil { // resp is now filled 711// fmt.Println(resp) 712// } 713// 714// See also, https://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/StartDocumentTextDetection 715func (c *Textract) StartDocumentTextDetectionRequest(input *StartDocumentTextDetectionInput) (req *request.Request, output *StartDocumentTextDetectionOutput) { 716 op := &request.Operation{ 717 Name: opStartDocumentTextDetection, 718 HTTPMethod: "POST", 719 HTTPPath: "/", 720 } 721 722 if input == nil { 723 input = &StartDocumentTextDetectionInput{} 724 } 725 726 output = &StartDocumentTextDetectionOutput{} 727 req = c.newRequest(op, input, output) 728 return 729} 730 731// StartDocumentTextDetection API operation for Amazon Textract. 732// 733// Starts the asynchronous detection of text in a document. Amazon Textract 734// can detect lines of text and the words that make up a line of text. 735// 736// StartDocumentTextDetection can analyze text in documents that are in JPEG, 737// PNG, and PDF format. The documents are stored in an Amazon S3 bucket. Use 738// DocumentLocation to specify the bucket name and file name of the document. 739// 740// StartTextDetection returns a job identifier (JobId) that you use to get the 741// results of the operation. When text detection is finished, Amazon Textract 742// publishes a completion status to the Amazon Simple Notification Service (Amazon 743// SNS) topic that you specify in NotificationChannel. To get the results of 744// the text detection operation, first check that the status value published 745// to the Amazon SNS topic is SUCCEEDED. If so, call GetDocumentTextDetection, 746// and pass the job identifier (JobId) from the initial call to StartDocumentTextDetection. 747// 748// For more information, see Document Text Detection (https://docs.aws.amazon.com/textract/latest/dg/how-it-works-detecting.html). 749// 750// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 751// with awserr.Error's Code and Message methods to get detailed information about 752// the error. 753// 754// See the AWS API reference guide for Amazon Textract's 755// API operation StartDocumentTextDetection for usage and error information. 756// 757// Returned Error Codes: 758// * ErrCodeInvalidParameterException "InvalidParameterException" 759// An input parameter violated a constraint. For example, in synchronous operations, 760// an InvalidParameterException exception occurs when neither of the S3Object 761// or Bytes values are supplied in the Document request parameter. Validate 762// your parameter before calling the API operation again. 763// 764// * ErrCodeInvalidS3ObjectException "InvalidS3ObjectException" 765// Amazon Textract is unable to access the S3 object that's specified in the 766// request. 767// 768// * ErrCodeUnsupportedDocumentException "UnsupportedDocumentException" 769// The format of the input document isn't supported. Documents for synchronous 770// operations can be in PNG or JPEG format. Documents for asynchronous operations 771// can also be in PDF format. 772// 773// * ErrCodeDocumentTooLargeException "DocumentTooLargeException" 774// The document can't be processed because it's too large. The maximum document 775// size for synchronous operations 5 MB. The maximum document size for asynchronous 776// operations is 500 MB for PDF files. 777// 778// * ErrCodeBadDocumentException "BadDocumentException" 779// Amazon Textract isn't able to read the document. 780// 781// * ErrCodeAccessDeniedException "AccessDeniedException" 782// You aren't authorized to perform the action. 783// 784// * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException" 785// The number of requests exceeded your throughput limit. If you want to increase 786// this limit, contact Amazon Textract. 787// 788// * ErrCodeInternalServerError "InternalServerError" 789// Amazon Textract experienced a service issue. Try your call again. 790// 791// * ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException" 792// A ClientRequestToken input parameter was reused with an operation, but at 793// least one of the other input parameters is different from the previous call 794// to the operation. 795// 796// * ErrCodeThrottlingException "ThrottlingException" 797// Amazon Textract is temporarily unable to process the request. Try your call 798// again. 799// 800// * ErrCodeLimitExceededException "LimitExceededException" 801// An Amazon Textract service limit was exceeded. For example, if you start 802// too many asynchronous jobs concurrently, calls to start operations (StartDocumentTextDetection, 803// for example) raise a LimitExceededException exception (HTTP status code: 804// 400) until the number of concurrently running jobs is below the Amazon Textract 805// service limit. 806// 807// See also, https://docs.aws.amazon.com/goto/WebAPI/textract-2018-06-27/StartDocumentTextDetection 808func (c *Textract) StartDocumentTextDetection(input *StartDocumentTextDetectionInput) (*StartDocumentTextDetectionOutput, error) { 809 req, out := c.StartDocumentTextDetectionRequest(input) 810 return out, req.Send() 811} 812 813// StartDocumentTextDetectionWithContext is the same as StartDocumentTextDetection with the addition of 814// the ability to pass a context and additional request options. 815// 816// See StartDocumentTextDetection for details on how to use this API operation. 817// 818// The context must be non-nil and will be used for request cancellation. If 819// the context is nil a panic will occur. In the future the SDK may create 820// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 821// for more information on using Contexts. 822func (c *Textract) StartDocumentTextDetectionWithContext(ctx aws.Context, input *StartDocumentTextDetectionInput, opts ...request.Option) (*StartDocumentTextDetectionOutput, error) { 823 req, out := c.StartDocumentTextDetectionRequest(input) 824 req.SetContext(ctx) 825 req.ApplyOptions(opts...) 826 return out, req.Send() 827} 828 829type AnalyzeDocumentInput struct { 830 _ struct{} `type:"structure"` 831 832 // The input document as base64-encoded bytes or an Amazon S3 object. If you 833 // use the AWS CLI to call Amazon Textract operations, you can't pass image 834 // bytes. The document must be an image in JPEG or PNG format. 835 // 836 // If you're using an AWS SDK to call Amazon Textract, you might not need to 837 // base64-encode image bytes that are passed using the Bytes field. 838 // 839 // Document is a required field 840 Document *Document `type:"structure" required:"true"` 841 842 // A list of the types of analysis to perform. Add TABLES to the list to return 843 // information about the tables that are detected in the input document. Add 844 // FORMS to return detected form data. To perform both types of analysis, add 845 // TABLES and FORMS to FeatureTypes. All lines and words detected in the document 846 // are included in the response (including text that isn't related to the value 847 // of FeatureTypes). 848 // 849 // FeatureTypes is a required field 850 FeatureTypes []*string `type:"list" required:"true"` 851 852 // Sets the configuration for the human in the loop workflow for analyzing documents. 853 HumanLoopConfig *HumanLoopConfig `type:"structure"` 854} 855 856// String returns the string representation 857func (s AnalyzeDocumentInput) String() string { 858 return awsutil.Prettify(s) 859} 860 861// GoString returns the string representation 862func (s AnalyzeDocumentInput) GoString() string { 863 return s.String() 864} 865 866// Validate inspects the fields of the type to determine if they are valid. 867func (s *AnalyzeDocumentInput) Validate() error { 868 invalidParams := request.ErrInvalidParams{Context: "AnalyzeDocumentInput"} 869 if s.Document == nil { 870 invalidParams.Add(request.NewErrParamRequired("Document")) 871 } 872 if s.FeatureTypes == nil { 873 invalidParams.Add(request.NewErrParamRequired("FeatureTypes")) 874 } 875 if s.Document != nil { 876 if err := s.Document.Validate(); err != nil { 877 invalidParams.AddNested("Document", err.(request.ErrInvalidParams)) 878 } 879 } 880 if s.HumanLoopConfig != nil { 881 if err := s.HumanLoopConfig.Validate(); err != nil { 882 invalidParams.AddNested("HumanLoopConfig", err.(request.ErrInvalidParams)) 883 } 884 } 885 886 if invalidParams.Len() > 0 { 887 return invalidParams 888 } 889 return nil 890} 891 892// SetDocument sets the Document field's value. 893func (s *AnalyzeDocumentInput) SetDocument(v *Document) *AnalyzeDocumentInput { 894 s.Document = v 895 return s 896} 897 898// SetFeatureTypes sets the FeatureTypes field's value. 899func (s *AnalyzeDocumentInput) SetFeatureTypes(v []*string) *AnalyzeDocumentInput { 900 s.FeatureTypes = v 901 return s 902} 903 904// SetHumanLoopConfig sets the HumanLoopConfig field's value. 905func (s *AnalyzeDocumentInput) SetHumanLoopConfig(v *HumanLoopConfig) *AnalyzeDocumentInput { 906 s.HumanLoopConfig = v 907 return s 908} 909 910type AnalyzeDocumentOutput struct { 911 _ struct{} `type:"structure"` 912 913 // The version of the model used to analyze the document. 914 AnalyzeDocumentModelVersion *string `type:"string"` 915 916 // The items that are detected and analyzed by AnalyzeDocument. 917 Blocks []*Block `type:"list"` 918 919 // Metadata about the analyzed document. An example is the number of pages. 920 DocumentMetadata *DocumentMetadata `type:"structure"` 921 922 // Shows the results of the human in the loop evaluation. 923 HumanLoopActivationOutput *HumanLoopActivationOutput `type:"structure"` 924} 925 926// String returns the string representation 927func (s AnalyzeDocumentOutput) String() string { 928 return awsutil.Prettify(s) 929} 930 931// GoString returns the string representation 932func (s AnalyzeDocumentOutput) GoString() string { 933 return s.String() 934} 935 936// SetAnalyzeDocumentModelVersion sets the AnalyzeDocumentModelVersion field's value. 937func (s *AnalyzeDocumentOutput) SetAnalyzeDocumentModelVersion(v string) *AnalyzeDocumentOutput { 938 s.AnalyzeDocumentModelVersion = &v 939 return s 940} 941 942// SetBlocks sets the Blocks field's value. 943func (s *AnalyzeDocumentOutput) SetBlocks(v []*Block) *AnalyzeDocumentOutput { 944 s.Blocks = v 945 return s 946} 947 948// SetDocumentMetadata sets the DocumentMetadata field's value. 949func (s *AnalyzeDocumentOutput) SetDocumentMetadata(v *DocumentMetadata) *AnalyzeDocumentOutput { 950 s.DocumentMetadata = v 951 return s 952} 953 954// SetHumanLoopActivationOutput sets the HumanLoopActivationOutput field's value. 955func (s *AnalyzeDocumentOutput) SetHumanLoopActivationOutput(v *HumanLoopActivationOutput) *AnalyzeDocumentOutput { 956 s.HumanLoopActivationOutput = v 957 return s 958} 959 960// A Block represents items that are recognized in a document within a group 961// of pixels close to each other. The information returned in a Block object 962// depends on the type of operation. In text detection for documents (for example 963// DetectDocumentText), you get information about the detected words and lines 964// of text. In text analysis (for example AnalyzeDocument), you can also get 965// information about the fields, tables, and selection elements that are detected 966// in the document. 967// 968// An array of Block objects is returned by both synchronous and asynchronous 969// operations. In synchronous operations, such as DetectDocumentText, the array 970// of Block objects is the entire set of results. In asynchronous operations, 971// such as GetDocumentAnalysis, the array is returned over one or more responses. 972// 973// For more information, see How Amazon Textract Works (https://docs.aws.amazon.com/textract/latest/dg/how-it-works.html). 974type Block struct { 975 _ struct{} `type:"structure"` 976 977 // The type of text item that's recognized. In operations for text detection, 978 // the following types are returned: 979 // 980 // * PAGE - Contains a list of the LINE Block objects that are detected on 981 // a document page. 982 // 983 // * WORD - A word detected on a document page. A word is one or more ISO 984 // basic Latin script characters that aren't separated by spaces. 985 // 986 // * LINE - A string of tab-delimited, contiguous words that are detected 987 // on a document page. 988 // 989 // In text analysis operations, the following types are returned: 990 // 991 // * PAGE - Contains a list of child Block objects that are detected on a 992 // document page. 993 // 994 // * KEY_VALUE_SET - Stores the KEY and VALUE Block objects for linked text 995 // that's detected on a document page. Use the EntityType field to determine 996 // if a KEY_VALUE_SET object is a KEY Block object or a VALUE Block object. 997 // 998 // * WORD - A word that's detected on a document page. A word is one or more 999 // ISO basic Latin script characters that aren't separated by spaces. 1000 // 1001 // * LINE - A string of tab-delimited, contiguous words that are detected 1002 // on a document page. 1003 // 1004 // * TABLE - A table that's detected on a document page. A table is grid-based 1005 // information with two or more rows or columns, with a cell span of one 1006 // row and one column each. 1007 // 1008 // * CELL - A cell within a detected table. The cell is the parent of the 1009 // block that contains the text in the cell. 1010 // 1011 // * SELECTION_ELEMENT - A selection element such as an option button (radio 1012 // button) or a check box that's detected on a document page. Use the value 1013 // of SelectionStatus to determine the status of the selection element. 1014 BlockType *string `type:"string" enum:"BlockType"` 1015 1016 // The column in which a table cell appears. The first column position is 1. 1017 // ColumnIndex isn't returned by DetectDocumentText and GetDocumentTextDetection. 1018 ColumnIndex *int64 `type:"integer"` 1019 1020 // The number of columns that a table cell spans. Currently this value is always 1021 // 1, even if the number of columns spanned is greater than 1. ColumnSpan isn't 1022 // returned by DetectDocumentText and GetDocumentTextDetection. 1023 ColumnSpan *int64 `type:"integer"` 1024 1025 // The confidence score that Amazon Textract has in the accuracy of the recognized 1026 // text and the accuracy of the geometry points around the recognized text. 1027 Confidence *float64 `type:"float"` 1028 1029 // The type of entity. The following can be returned: 1030 // 1031 // * KEY - An identifier for a field on the document. 1032 // 1033 // * VALUE - The field text. 1034 // 1035 // EntityTypes isn't returned by DetectDocumentText and GetDocumentTextDetection. 1036 EntityTypes []*string `type:"list"` 1037 1038 // The location of the recognized text on the image. It includes an axis-aligned, 1039 // coarse bounding box that surrounds the text, and a finer-grain polygon for 1040 // more accurate spatial information. 1041 Geometry *Geometry `type:"structure"` 1042 1043 // The identifier for the recognized text. The identifier is only unique for 1044 // a single operation. 1045 Id *string `type:"string"` 1046 1047 // The page on which a block was detected. Page is returned by asynchronous 1048 // operations. Page values greater than 1 are only returned for multipage documents 1049 // that are in PDF format. A scanned image (JPEG/PNG), even if it contains multiple 1050 // document pages, is considered to be a single-page document. The value of 1051 // Page is always 1. Synchronous operations don't return Page because every 1052 // input document is considered to be a single-page document. 1053 Page *int64 `type:"integer"` 1054 1055 // A list of child blocks of the current block. For example, a LINE object has 1056 // child blocks for each WORD block that's part of the line of text. There aren't 1057 // Relationship objects in the list for relationships that don't exist, such 1058 // as when the current block has no child blocks. The list size can be the following: 1059 // 1060 // * 0 - The block has no child blocks. 1061 // 1062 // * 1 - The block has child blocks. 1063 Relationships []*Relationship `type:"list"` 1064 1065 // The row in which a table cell is located. The first row position is 1. RowIndex 1066 // isn't returned by DetectDocumentText and GetDocumentTextDetection. 1067 RowIndex *int64 `type:"integer"` 1068 1069 // The number of rows that a table cell spans. Currently this value is always 1070 // 1, even if the number of rows spanned is greater than 1. RowSpan isn't returned 1071 // by DetectDocumentText and GetDocumentTextDetection. 1072 RowSpan *int64 `type:"integer"` 1073 1074 // The selection status of a selection element, such as an option button or 1075 // check box. 1076 SelectionStatus *string `type:"string" enum:"SelectionStatus"` 1077 1078 // The word or line of text that's recognized by Amazon Textract. 1079 Text *string `type:"string"` 1080} 1081 1082// String returns the string representation 1083func (s Block) String() string { 1084 return awsutil.Prettify(s) 1085} 1086 1087// GoString returns the string representation 1088func (s Block) GoString() string { 1089 return s.String() 1090} 1091 1092// SetBlockType sets the BlockType field's value. 1093func (s *Block) SetBlockType(v string) *Block { 1094 s.BlockType = &v 1095 return s 1096} 1097 1098// SetColumnIndex sets the ColumnIndex field's value. 1099func (s *Block) SetColumnIndex(v int64) *Block { 1100 s.ColumnIndex = &v 1101 return s 1102} 1103 1104// SetColumnSpan sets the ColumnSpan field's value. 1105func (s *Block) SetColumnSpan(v int64) *Block { 1106 s.ColumnSpan = &v 1107 return s 1108} 1109 1110// SetConfidence sets the Confidence field's value. 1111func (s *Block) SetConfidence(v float64) *Block { 1112 s.Confidence = &v 1113 return s 1114} 1115 1116// SetEntityTypes sets the EntityTypes field's value. 1117func (s *Block) SetEntityTypes(v []*string) *Block { 1118 s.EntityTypes = v 1119 return s 1120} 1121 1122// SetGeometry sets the Geometry field's value. 1123func (s *Block) SetGeometry(v *Geometry) *Block { 1124 s.Geometry = v 1125 return s 1126} 1127 1128// SetId sets the Id field's value. 1129func (s *Block) SetId(v string) *Block { 1130 s.Id = &v 1131 return s 1132} 1133 1134// SetPage sets the Page field's value. 1135func (s *Block) SetPage(v int64) *Block { 1136 s.Page = &v 1137 return s 1138} 1139 1140// SetRelationships sets the Relationships field's value. 1141func (s *Block) SetRelationships(v []*Relationship) *Block { 1142 s.Relationships = v 1143 return s 1144} 1145 1146// SetRowIndex sets the RowIndex field's value. 1147func (s *Block) SetRowIndex(v int64) *Block { 1148 s.RowIndex = &v 1149 return s 1150} 1151 1152// SetRowSpan sets the RowSpan field's value. 1153func (s *Block) SetRowSpan(v int64) *Block { 1154 s.RowSpan = &v 1155 return s 1156} 1157 1158// SetSelectionStatus sets the SelectionStatus field's value. 1159func (s *Block) SetSelectionStatus(v string) *Block { 1160 s.SelectionStatus = &v 1161 return s 1162} 1163 1164// SetText sets the Text field's value. 1165func (s *Block) SetText(v string) *Block { 1166 s.Text = &v 1167 return s 1168} 1169 1170// The bounding box around the detected page, text, key-value pair, table, table 1171// cell, or selection element on a document page. The left (x-coordinate) and 1172// top (y-coordinate) are coordinates that represent the top and left sides 1173// of the bounding box. Note that the upper-left corner of the image is the 1174// origin (0,0). 1175// 1176// The top and left values returned are ratios of the overall document page 1177// size. For example, if the input image is 700 x 200 pixels, and the top-left 1178// coordinate of the bounding box is 350 x 50 pixels, the API returns a left 1179// value of 0.5 (350/700) and a top value of 0.25 (50/200). 1180// 1181// The width and height values represent the dimensions of the bounding box 1182// as a ratio of the overall document page dimension. For example, if the document 1183// page size is 700 x 200 pixels, and the bounding box width is 70 pixels, the 1184// width returned is 0.1. 1185type BoundingBox struct { 1186 _ struct{} `type:"structure"` 1187 1188 // The height of the bounding box as a ratio of the overall document page height. 1189 Height *float64 `type:"float"` 1190 1191 // The left coordinate of the bounding box as a ratio of overall document page 1192 // width. 1193 Left *float64 `type:"float"` 1194 1195 // The top coordinate of the bounding box as a ratio of overall document page 1196 // height. 1197 Top *float64 `type:"float"` 1198 1199 // The width of the bounding box as a ratio of the overall document page width. 1200 Width *float64 `type:"float"` 1201} 1202 1203// String returns the string representation 1204func (s BoundingBox) String() string { 1205 return awsutil.Prettify(s) 1206} 1207 1208// GoString returns the string representation 1209func (s BoundingBox) GoString() string { 1210 return s.String() 1211} 1212 1213// SetHeight sets the Height field's value. 1214func (s *BoundingBox) SetHeight(v float64) *BoundingBox { 1215 s.Height = &v 1216 return s 1217} 1218 1219// SetLeft sets the Left field's value. 1220func (s *BoundingBox) SetLeft(v float64) *BoundingBox { 1221 s.Left = &v 1222 return s 1223} 1224 1225// SetTop sets the Top field's value. 1226func (s *BoundingBox) SetTop(v float64) *BoundingBox { 1227 s.Top = &v 1228 return s 1229} 1230 1231// SetWidth sets the Width field's value. 1232func (s *BoundingBox) SetWidth(v float64) *BoundingBox { 1233 s.Width = &v 1234 return s 1235} 1236 1237type DetectDocumentTextInput struct { 1238 _ struct{} `type:"structure"` 1239 1240 // The input document as base64-encoded bytes or an Amazon S3 object. If you 1241 // use the AWS CLI to call Amazon Textract operations, you can't pass image 1242 // bytes. The document must be an image in JPEG or PNG format. 1243 // 1244 // If you're using an AWS SDK to call Amazon Textract, you might not need to 1245 // base64-encode image bytes that are passed using the Bytes field. 1246 // 1247 // Document is a required field 1248 Document *Document `type:"structure" required:"true"` 1249} 1250 1251// String returns the string representation 1252func (s DetectDocumentTextInput) String() string { 1253 return awsutil.Prettify(s) 1254} 1255 1256// GoString returns the string representation 1257func (s DetectDocumentTextInput) GoString() string { 1258 return s.String() 1259} 1260 1261// Validate inspects the fields of the type to determine if they are valid. 1262func (s *DetectDocumentTextInput) Validate() error { 1263 invalidParams := request.ErrInvalidParams{Context: "DetectDocumentTextInput"} 1264 if s.Document == nil { 1265 invalidParams.Add(request.NewErrParamRequired("Document")) 1266 } 1267 if s.Document != nil { 1268 if err := s.Document.Validate(); err != nil { 1269 invalidParams.AddNested("Document", err.(request.ErrInvalidParams)) 1270 } 1271 } 1272 1273 if invalidParams.Len() > 0 { 1274 return invalidParams 1275 } 1276 return nil 1277} 1278 1279// SetDocument sets the Document field's value. 1280func (s *DetectDocumentTextInput) SetDocument(v *Document) *DetectDocumentTextInput { 1281 s.Document = v 1282 return s 1283} 1284 1285type DetectDocumentTextOutput struct { 1286 _ struct{} `type:"structure"` 1287 1288 // An array of Block objects that contain the text that's detected in the document. 1289 Blocks []*Block `type:"list"` 1290 1291 DetectDocumentTextModelVersion *string `type:"string"` 1292 1293 // Metadata about the document. It contains the number of pages that are detected 1294 // in the document. 1295 DocumentMetadata *DocumentMetadata `type:"structure"` 1296} 1297 1298// String returns the string representation 1299func (s DetectDocumentTextOutput) String() string { 1300 return awsutil.Prettify(s) 1301} 1302 1303// GoString returns the string representation 1304func (s DetectDocumentTextOutput) GoString() string { 1305 return s.String() 1306} 1307 1308// SetBlocks sets the Blocks field's value. 1309func (s *DetectDocumentTextOutput) SetBlocks(v []*Block) *DetectDocumentTextOutput { 1310 s.Blocks = v 1311 return s 1312} 1313 1314// SetDetectDocumentTextModelVersion sets the DetectDocumentTextModelVersion field's value. 1315func (s *DetectDocumentTextOutput) SetDetectDocumentTextModelVersion(v string) *DetectDocumentTextOutput { 1316 s.DetectDocumentTextModelVersion = &v 1317 return s 1318} 1319 1320// SetDocumentMetadata sets the DocumentMetadata field's value. 1321func (s *DetectDocumentTextOutput) SetDocumentMetadata(v *DocumentMetadata) *DetectDocumentTextOutput { 1322 s.DocumentMetadata = v 1323 return s 1324} 1325 1326// The input document, either as bytes or as an S3 object. 1327// 1328// You pass image bytes to an Amazon Textract API operation by using the Bytes 1329// property. For example, you would use the Bytes property to pass a document 1330// loaded from a local file system. Image bytes passed by using the Bytes property 1331// must be base64 encoded. Your code might not need to encode document file 1332// bytes if you're using an AWS SDK to call Amazon Textract API operations. 1333// 1334// You pass images stored in an S3 bucket to an Amazon Textract API operation 1335// by using the S3Object property. Documents stored in an S3 bucket don't need 1336// to be base64 encoded. 1337// 1338// The AWS Region for the S3 bucket that contains the S3 object must match the 1339// AWS Region that you use for Amazon Textract operations. 1340// 1341// If you use the AWS CLI to call Amazon Textract operations, passing image 1342// bytes using the Bytes property isn't supported. You must first upload the 1343// document to an Amazon S3 bucket, and then call the operation using the S3Object 1344// property. 1345// 1346// For Amazon Textract to process an S3 object, the user must have permission 1347// to access the S3 object. 1348type Document struct { 1349 _ struct{} `type:"structure"` 1350 1351 // A blob of base64-encoded document bytes. The maximum size of a document that's 1352 // provided in a blob of bytes is 5 MB. The document bytes must be in PNG or 1353 // JPEG format. 1354 // 1355 // If you're using an AWS SDK to call Amazon Textract, you might not need to 1356 // base64-encode image bytes passed using the Bytes field. 1357 // 1358 // Bytes is automatically base64 encoded/decoded by the SDK. 1359 Bytes []byte `min:"1" type:"blob"` 1360 1361 // Identifies an S3 object as the document source. The maximum size of a document 1362 // that's stored in an S3 bucket is 5 MB. 1363 S3Object *S3Object `type:"structure"` 1364} 1365 1366// String returns the string representation 1367func (s Document) String() string { 1368 return awsutil.Prettify(s) 1369} 1370 1371// GoString returns the string representation 1372func (s Document) GoString() string { 1373 return s.String() 1374} 1375 1376// Validate inspects the fields of the type to determine if they are valid. 1377func (s *Document) Validate() error { 1378 invalidParams := request.ErrInvalidParams{Context: "Document"} 1379 if s.Bytes != nil && len(s.Bytes) < 1 { 1380 invalidParams.Add(request.NewErrParamMinLen("Bytes", 1)) 1381 } 1382 if s.S3Object != nil { 1383 if err := s.S3Object.Validate(); err != nil { 1384 invalidParams.AddNested("S3Object", err.(request.ErrInvalidParams)) 1385 } 1386 } 1387 1388 if invalidParams.Len() > 0 { 1389 return invalidParams 1390 } 1391 return nil 1392} 1393 1394// SetBytes sets the Bytes field's value. 1395func (s *Document) SetBytes(v []byte) *Document { 1396 s.Bytes = v 1397 return s 1398} 1399 1400// SetS3Object sets the S3Object field's value. 1401func (s *Document) SetS3Object(v *S3Object) *Document { 1402 s.S3Object = v 1403 return s 1404} 1405 1406// The Amazon S3 bucket that contains the document to be processed. It's used 1407// by asynchronous operations such as StartDocumentTextDetection. 1408// 1409// The input document can be an image file in JPEG or PNG format. It can also 1410// be a file in PDF format. 1411type DocumentLocation struct { 1412 _ struct{} `type:"structure"` 1413 1414 // The Amazon S3 bucket that contains the input document. 1415 S3Object *S3Object `type:"structure"` 1416} 1417 1418// String returns the string representation 1419func (s DocumentLocation) String() string { 1420 return awsutil.Prettify(s) 1421} 1422 1423// GoString returns the string representation 1424func (s DocumentLocation) GoString() string { 1425 return s.String() 1426} 1427 1428// Validate inspects the fields of the type to determine if they are valid. 1429func (s *DocumentLocation) Validate() error { 1430 invalidParams := request.ErrInvalidParams{Context: "DocumentLocation"} 1431 if s.S3Object != nil { 1432 if err := s.S3Object.Validate(); err != nil { 1433 invalidParams.AddNested("S3Object", err.(request.ErrInvalidParams)) 1434 } 1435 } 1436 1437 if invalidParams.Len() > 0 { 1438 return invalidParams 1439 } 1440 return nil 1441} 1442 1443// SetS3Object sets the S3Object field's value. 1444func (s *DocumentLocation) SetS3Object(v *S3Object) *DocumentLocation { 1445 s.S3Object = v 1446 return s 1447} 1448 1449// Information about the input document. 1450type DocumentMetadata struct { 1451 _ struct{} `type:"structure"` 1452 1453 // The number of pages that are detected in the document. 1454 Pages *int64 `type:"integer"` 1455} 1456 1457// String returns the string representation 1458func (s DocumentMetadata) String() string { 1459 return awsutil.Prettify(s) 1460} 1461 1462// GoString returns the string representation 1463func (s DocumentMetadata) GoString() string { 1464 return s.String() 1465} 1466 1467// SetPages sets the Pages field's value. 1468func (s *DocumentMetadata) SetPages(v int64) *DocumentMetadata { 1469 s.Pages = &v 1470 return s 1471} 1472 1473// Information about where the following items are located on a document page: 1474// detected page, text, key-value pairs, tables, table cells, and selection 1475// elements. 1476type Geometry struct { 1477 _ struct{} `type:"structure"` 1478 1479 // An axis-aligned coarse representation of the location of the recognized item 1480 // on the document page. 1481 BoundingBox *BoundingBox `type:"structure"` 1482 1483 // Within the bounding box, a fine-grained polygon around the recognized item. 1484 Polygon []*Point `type:"list"` 1485} 1486 1487// String returns the string representation 1488func (s Geometry) String() string { 1489 return awsutil.Prettify(s) 1490} 1491 1492// GoString returns the string representation 1493func (s Geometry) GoString() string { 1494 return s.String() 1495} 1496 1497// SetBoundingBox sets the BoundingBox field's value. 1498func (s *Geometry) SetBoundingBox(v *BoundingBox) *Geometry { 1499 s.BoundingBox = v 1500 return s 1501} 1502 1503// SetPolygon sets the Polygon field's value. 1504func (s *Geometry) SetPolygon(v []*Point) *Geometry { 1505 s.Polygon = v 1506 return s 1507} 1508 1509type GetDocumentAnalysisInput struct { 1510 _ struct{} `type:"structure"` 1511 1512 // A unique identifier for the text-detection job. The JobId is returned from 1513 // StartDocumentAnalysis. A JobId value is only valid for 7 days. 1514 // 1515 // JobId is a required field 1516 JobId *string `min:"1" type:"string" required:"true"` 1517 1518 // The maximum number of results to return per paginated call. The largest value 1519 // that you can specify is 1,000. If you specify a value greater than 1,000, 1520 // a maximum of 1,000 results is returned. The default value is 1,000. 1521 MaxResults *int64 `min:"1" type:"integer"` 1522 1523 // If the previous response was incomplete (because there are more blocks to 1524 // retrieve), Amazon Textract returns a pagination token in the response. You 1525 // can use this pagination token to retrieve the next set of blocks. 1526 NextToken *string `min:"1" type:"string"` 1527} 1528 1529// String returns the string representation 1530func (s GetDocumentAnalysisInput) String() string { 1531 return awsutil.Prettify(s) 1532} 1533 1534// GoString returns the string representation 1535func (s GetDocumentAnalysisInput) GoString() string { 1536 return s.String() 1537} 1538 1539// Validate inspects the fields of the type to determine if they are valid. 1540func (s *GetDocumentAnalysisInput) Validate() error { 1541 invalidParams := request.ErrInvalidParams{Context: "GetDocumentAnalysisInput"} 1542 if s.JobId == nil { 1543 invalidParams.Add(request.NewErrParamRequired("JobId")) 1544 } 1545 if s.JobId != nil && len(*s.JobId) < 1 { 1546 invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) 1547 } 1548 if s.MaxResults != nil && *s.MaxResults < 1 { 1549 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 1550 } 1551 if s.NextToken != nil && len(*s.NextToken) < 1 { 1552 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 1553 } 1554 1555 if invalidParams.Len() > 0 { 1556 return invalidParams 1557 } 1558 return nil 1559} 1560 1561// SetJobId sets the JobId field's value. 1562func (s *GetDocumentAnalysisInput) SetJobId(v string) *GetDocumentAnalysisInput { 1563 s.JobId = &v 1564 return s 1565} 1566 1567// SetMaxResults sets the MaxResults field's value. 1568func (s *GetDocumentAnalysisInput) SetMaxResults(v int64) *GetDocumentAnalysisInput { 1569 s.MaxResults = &v 1570 return s 1571} 1572 1573// SetNextToken sets the NextToken field's value. 1574func (s *GetDocumentAnalysisInput) SetNextToken(v string) *GetDocumentAnalysisInput { 1575 s.NextToken = &v 1576 return s 1577} 1578 1579type GetDocumentAnalysisOutput struct { 1580 _ struct{} `type:"structure"` 1581 1582 AnalyzeDocumentModelVersion *string `type:"string"` 1583 1584 // The results of the text-analysis operation. 1585 Blocks []*Block `type:"list"` 1586 1587 // Information about a document that Amazon Textract processed. DocumentMetadata 1588 // is returned in every page of paginated responses from an Amazon Textract 1589 // video operation. 1590 DocumentMetadata *DocumentMetadata `type:"structure"` 1591 1592 // The current status of the text detection job. 1593 JobStatus *string `type:"string" enum:"JobStatus"` 1594 1595 // If the response is truncated, Amazon Textract returns this token. You can 1596 // use this token in the subsequent request to retrieve the next set of text 1597 // detection results. 1598 NextToken *string `min:"1" type:"string"` 1599 1600 // The current status of an asynchronous document-analysis operation. 1601 StatusMessage *string `type:"string"` 1602 1603 // A list of warnings that occurred during the document-analysis operation. 1604 Warnings []*Warning `type:"list"` 1605} 1606 1607// String returns the string representation 1608func (s GetDocumentAnalysisOutput) String() string { 1609 return awsutil.Prettify(s) 1610} 1611 1612// GoString returns the string representation 1613func (s GetDocumentAnalysisOutput) GoString() string { 1614 return s.String() 1615} 1616 1617// SetAnalyzeDocumentModelVersion sets the AnalyzeDocumentModelVersion field's value. 1618func (s *GetDocumentAnalysisOutput) SetAnalyzeDocumentModelVersion(v string) *GetDocumentAnalysisOutput { 1619 s.AnalyzeDocumentModelVersion = &v 1620 return s 1621} 1622 1623// SetBlocks sets the Blocks field's value. 1624func (s *GetDocumentAnalysisOutput) SetBlocks(v []*Block) *GetDocumentAnalysisOutput { 1625 s.Blocks = v 1626 return s 1627} 1628 1629// SetDocumentMetadata sets the DocumentMetadata field's value. 1630func (s *GetDocumentAnalysisOutput) SetDocumentMetadata(v *DocumentMetadata) *GetDocumentAnalysisOutput { 1631 s.DocumentMetadata = v 1632 return s 1633} 1634 1635// SetJobStatus sets the JobStatus field's value. 1636func (s *GetDocumentAnalysisOutput) SetJobStatus(v string) *GetDocumentAnalysisOutput { 1637 s.JobStatus = &v 1638 return s 1639} 1640 1641// SetNextToken sets the NextToken field's value. 1642func (s *GetDocumentAnalysisOutput) SetNextToken(v string) *GetDocumentAnalysisOutput { 1643 s.NextToken = &v 1644 return s 1645} 1646 1647// SetStatusMessage sets the StatusMessage field's value. 1648func (s *GetDocumentAnalysisOutput) SetStatusMessage(v string) *GetDocumentAnalysisOutput { 1649 s.StatusMessage = &v 1650 return s 1651} 1652 1653// SetWarnings sets the Warnings field's value. 1654func (s *GetDocumentAnalysisOutput) SetWarnings(v []*Warning) *GetDocumentAnalysisOutput { 1655 s.Warnings = v 1656 return s 1657} 1658 1659type GetDocumentTextDetectionInput struct { 1660 _ struct{} `type:"structure"` 1661 1662 // A unique identifier for the text detection job. The JobId is returned from 1663 // StartDocumentTextDetection. A JobId value is only valid for 7 days. 1664 // 1665 // JobId is a required field 1666 JobId *string `min:"1" type:"string" required:"true"` 1667 1668 // The maximum number of results to return per paginated call. The largest value 1669 // you can specify is 1,000. If you specify a value greater than 1,000, a maximum 1670 // of 1,000 results is returned. The default value is 1,000. 1671 MaxResults *int64 `min:"1" type:"integer"` 1672 1673 // If the previous response was incomplete (because there are more blocks to 1674 // retrieve), Amazon Textract returns a pagination token in the response. You 1675 // can use this pagination token to retrieve the next set of blocks. 1676 NextToken *string `min:"1" type:"string"` 1677} 1678 1679// String returns the string representation 1680func (s GetDocumentTextDetectionInput) String() string { 1681 return awsutil.Prettify(s) 1682} 1683 1684// GoString returns the string representation 1685func (s GetDocumentTextDetectionInput) GoString() string { 1686 return s.String() 1687} 1688 1689// Validate inspects the fields of the type to determine if they are valid. 1690func (s *GetDocumentTextDetectionInput) Validate() error { 1691 invalidParams := request.ErrInvalidParams{Context: "GetDocumentTextDetectionInput"} 1692 if s.JobId == nil { 1693 invalidParams.Add(request.NewErrParamRequired("JobId")) 1694 } 1695 if s.JobId != nil && len(*s.JobId) < 1 { 1696 invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) 1697 } 1698 if s.MaxResults != nil && *s.MaxResults < 1 { 1699 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 1700 } 1701 if s.NextToken != nil && len(*s.NextToken) < 1 { 1702 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 1703 } 1704 1705 if invalidParams.Len() > 0 { 1706 return invalidParams 1707 } 1708 return nil 1709} 1710 1711// SetJobId sets the JobId field's value. 1712func (s *GetDocumentTextDetectionInput) SetJobId(v string) *GetDocumentTextDetectionInput { 1713 s.JobId = &v 1714 return s 1715} 1716 1717// SetMaxResults sets the MaxResults field's value. 1718func (s *GetDocumentTextDetectionInput) SetMaxResults(v int64) *GetDocumentTextDetectionInput { 1719 s.MaxResults = &v 1720 return s 1721} 1722 1723// SetNextToken sets the NextToken field's value. 1724func (s *GetDocumentTextDetectionInput) SetNextToken(v string) *GetDocumentTextDetectionInput { 1725 s.NextToken = &v 1726 return s 1727} 1728 1729type GetDocumentTextDetectionOutput struct { 1730 _ struct{} `type:"structure"` 1731 1732 // The results of the text-detection operation. 1733 Blocks []*Block `type:"list"` 1734 1735 DetectDocumentTextModelVersion *string `type:"string"` 1736 1737 // Information about a document that Amazon Textract processed. DocumentMetadata 1738 // is returned in every page of paginated responses from an Amazon Textract 1739 // video operation. 1740 DocumentMetadata *DocumentMetadata `type:"structure"` 1741 1742 // The current status of the text detection job. 1743 JobStatus *string `type:"string" enum:"JobStatus"` 1744 1745 // If the response is truncated, Amazon Textract returns this token. You can 1746 // use this token in the subsequent request to retrieve the next set of text-detection 1747 // results. 1748 NextToken *string `min:"1" type:"string"` 1749 1750 // The current status of an asynchronous text-detection operation for the document. 1751 StatusMessage *string `type:"string"` 1752 1753 // A list of warnings that occurred during the text-detection operation for 1754 // the document. 1755 Warnings []*Warning `type:"list"` 1756} 1757 1758// String returns the string representation 1759func (s GetDocumentTextDetectionOutput) String() string { 1760 return awsutil.Prettify(s) 1761} 1762 1763// GoString returns the string representation 1764func (s GetDocumentTextDetectionOutput) GoString() string { 1765 return s.String() 1766} 1767 1768// SetBlocks sets the Blocks field's value. 1769func (s *GetDocumentTextDetectionOutput) SetBlocks(v []*Block) *GetDocumentTextDetectionOutput { 1770 s.Blocks = v 1771 return s 1772} 1773 1774// SetDetectDocumentTextModelVersion sets the DetectDocumentTextModelVersion field's value. 1775func (s *GetDocumentTextDetectionOutput) SetDetectDocumentTextModelVersion(v string) *GetDocumentTextDetectionOutput { 1776 s.DetectDocumentTextModelVersion = &v 1777 return s 1778} 1779 1780// SetDocumentMetadata sets the DocumentMetadata field's value. 1781func (s *GetDocumentTextDetectionOutput) SetDocumentMetadata(v *DocumentMetadata) *GetDocumentTextDetectionOutput { 1782 s.DocumentMetadata = v 1783 return s 1784} 1785 1786// SetJobStatus sets the JobStatus field's value. 1787func (s *GetDocumentTextDetectionOutput) SetJobStatus(v string) *GetDocumentTextDetectionOutput { 1788 s.JobStatus = &v 1789 return s 1790} 1791 1792// SetNextToken sets the NextToken field's value. 1793func (s *GetDocumentTextDetectionOutput) SetNextToken(v string) *GetDocumentTextDetectionOutput { 1794 s.NextToken = &v 1795 return s 1796} 1797 1798// SetStatusMessage sets the StatusMessage field's value. 1799func (s *GetDocumentTextDetectionOutput) SetStatusMessage(v string) *GetDocumentTextDetectionOutput { 1800 s.StatusMessage = &v 1801 return s 1802} 1803 1804// SetWarnings sets the Warnings field's value. 1805func (s *GetDocumentTextDetectionOutput) SetWarnings(v []*Warning) *GetDocumentTextDetectionOutput { 1806 s.Warnings = v 1807 return s 1808} 1809 1810// Shows the results of the human in the loop evaluation. If there is no HumanLoopArn, 1811// the input did not trigger human review. 1812type HumanLoopActivationOutput struct { 1813 _ struct{} `type:"structure"` 1814 1815 // Shows the result of condition evaluations, including those conditions which 1816 // activated a human review. 1817 HumanLoopActivationConditionsEvaluationResults aws.JSONValue `type:"jsonvalue"` 1818 1819 // Shows if and why human review was needed. 1820 HumanLoopActivationReasons []*string `min:"1" type:"list"` 1821 1822 // The Amazon Resource Name (ARN) of the HumanLoop created. 1823 HumanLoopArn *string `type:"string"` 1824} 1825 1826// String returns the string representation 1827func (s HumanLoopActivationOutput) String() string { 1828 return awsutil.Prettify(s) 1829} 1830 1831// GoString returns the string representation 1832func (s HumanLoopActivationOutput) GoString() string { 1833 return s.String() 1834} 1835 1836// SetHumanLoopActivationConditionsEvaluationResults sets the HumanLoopActivationConditionsEvaluationResults field's value. 1837func (s *HumanLoopActivationOutput) SetHumanLoopActivationConditionsEvaluationResults(v aws.JSONValue) *HumanLoopActivationOutput { 1838 s.HumanLoopActivationConditionsEvaluationResults = v 1839 return s 1840} 1841 1842// SetHumanLoopActivationReasons sets the HumanLoopActivationReasons field's value. 1843func (s *HumanLoopActivationOutput) SetHumanLoopActivationReasons(v []*string) *HumanLoopActivationOutput { 1844 s.HumanLoopActivationReasons = v 1845 return s 1846} 1847 1848// SetHumanLoopArn sets the HumanLoopArn field's value. 1849func (s *HumanLoopActivationOutput) SetHumanLoopArn(v string) *HumanLoopActivationOutput { 1850 s.HumanLoopArn = &v 1851 return s 1852} 1853 1854// Sets up the human review workflow the document will be sent to if one of 1855// the conditions is met. You can also set certain attributes of the image before 1856// review. 1857type HumanLoopConfig struct { 1858 _ struct{} `type:"structure"` 1859 1860 // Sets attributes of the input data. 1861 DataAttributes *HumanLoopDataAttributes `type:"structure"` 1862 1863 // The Amazon Resource Name (ARN) of the flow definition. 1864 // 1865 // FlowDefinitionArn is a required field 1866 FlowDefinitionArn *string `type:"string" required:"true"` 1867 1868 // The name of the human workflow used for this image. This should be kept unique 1869 // within a region. 1870 // 1871 // HumanLoopName is a required field 1872 HumanLoopName *string `min:"1" type:"string" required:"true"` 1873} 1874 1875// String returns the string representation 1876func (s HumanLoopConfig) String() string { 1877 return awsutil.Prettify(s) 1878} 1879 1880// GoString returns the string representation 1881func (s HumanLoopConfig) GoString() string { 1882 return s.String() 1883} 1884 1885// Validate inspects the fields of the type to determine if they are valid. 1886func (s *HumanLoopConfig) Validate() error { 1887 invalidParams := request.ErrInvalidParams{Context: "HumanLoopConfig"} 1888 if s.FlowDefinitionArn == nil { 1889 invalidParams.Add(request.NewErrParamRequired("FlowDefinitionArn")) 1890 } 1891 if s.HumanLoopName == nil { 1892 invalidParams.Add(request.NewErrParamRequired("HumanLoopName")) 1893 } 1894 if s.HumanLoopName != nil && len(*s.HumanLoopName) < 1 { 1895 invalidParams.Add(request.NewErrParamMinLen("HumanLoopName", 1)) 1896 } 1897 1898 if invalidParams.Len() > 0 { 1899 return invalidParams 1900 } 1901 return nil 1902} 1903 1904// SetDataAttributes sets the DataAttributes field's value. 1905func (s *HumanLoopConfig) SetDataAttributes(v *HumanLoopDataAttributes) *HumanLoopConfig { 1906 s.DataAttributes = v 1907 return s 1908} 1909 1910// SetFlowDefinitionArn sets the FlowDefinitionArn field's value. 1911func (s *HumanLoopConfig) SetFlowDefinitionArn(v string) *HumanLoopConfig { 1912 s.FlowDefinitionArn = &v 1913 return s 1914} 1915 1916// SetHumanLoopName sets the HumanLoopName field's value. 1917func (s *HumanLoopConfig) SetHumanLoopName(v string) *HumanLoopConfig { 1918 s.HumanLoopName = &v 1919 return s 1920} 1921 1922// Allows you to set attributes of the image. Currently, you can declare an 1923// image as free of personally identifiable information and adult content. 1924type HumanLoopDataAttributes struct { 1925 _ struct{} `type:"structure"` 1926 1927 // Sets whether the input image is free of personally identifiable information 1928 // or adult content. 1929 ContentClassifiers []*string `type:"list"` 1930} 1931 1932// String returns the string representation 1933func (s HumanLoopDataAttributes) String() string { 1934 return awsutil.Prettify(s) 1935} 1936 1937// GoString returns the string representation 1938func (s HumanLoopDataAttributes) GoString() string { 1939 return s.String() 1940} 1941 1942// SetContentClassifiers sets the ContentClassifiers field's value. 1943func (s *HumanLoopDataAttributes) SetContentClassifiers(v []*string) *HumanLoopDataAttributes { 1944 s.ContentClassifiers = v 1945 return s 1946} 1947 1948// The Amazon Simple Notification Service (Amazon SNS) topic to which Amazon 1949// Textract publishes the completion status of an asynchronous document operation, 1950// such as StartDocumentTextDetection. 1951type NotificationChannel struct { 1952 _ struct{} `type:"structure"` 1953 1954 // The Amazon Resource Name (ARN) of an IAM role that gives Amazon Textract 1955 // publishing permissions to the Amazon SNS topic. 1956 // 1957 // RoleArn is a required field 1958 RoleArn *string `min:"20" type:"string" required:"true"` 1959 1960 // The Amazon SNS topic that Amazon Textract posts the completion status to. 1961 // 1962 // SNSTopicArn is a required field 1963 SNSTopicArn *string `min:"20" type:"string" required:"true"` 1964} 1965 1966// String returns the string representation 1967func (s NotificationChannel) String() string { 1968 return awsutil.Prettify(s) 1969} 1970 1971// GoString returns the string representation 1972func (s NotificationChannel) GoString() string { 1973 return s.String() 1974} 1975 1976// Validate inspects the fields of the type to determine if they are valid. 1977func (s *NotificationChannel) Validate() error { 1978 invalidParams := request.ErrInvalidParams{Context: "NotificationChannel"} 1979 if s.RoleArn == nil { 1980 invalidParams.Add(request.NewErrParamRequired("RoleArn")) 1981 } 1982 if s.RoleArn != nil && len(*s.RoleArn) < 20 { 1983 invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) 1984 } 1985 if s.SNSTopicArn == nil { 1986 invalidParams.Add(request.NewErrParamRequired("SNSTopicArn")) 1987 } 1988 if s.SNSTopicArn != nil && len(*s.SNSTopicArn) < 20 { 1989 invalidParams.Add(request.NewErrParamMinLen("SNSTopicArn", 20)) 1990 } 1991 1992 if invalidParams.Len() > 0 { 1993 return invalidParams 1994 } 1995 return nil 1996} 1997 1998// SetRoleArn sets the RoleArn field's value. 1999func (s *NotificationChannel) SetRoleArn(v string) *NotificationChannel { 2000 s.RoleArn = &v 2001 return s 2002} 2003 2004// SetSNSTopicArn sets the SNSTopicArn field's value. 2005func (s *NotificationChannel) SetSNSTopicArn(v string) *NotificationChannel { 2006 s.SNSTopicArn = &v 2007 return s 2008} 2009 2010// The X and Y coordinates of a point on a document page. The X and Y values 2011// that are returned are ratios of the overall document page size. For example, 2012// if the input document is 700 x 200 and the operation returns X=0.5 and Y=0.25, 2013// then the point is at the (350,50) pixel coordinate on the document page. 2014// 2015// An array of Point objects, Polygon, is returned by DetectDocumentText. Polygon 2016// represents a fine-grained polygon around detected text. For more information, 2017// see Geometry in the Amazon Textract Developer Guide. 2018type Point struct { 2019 _ struct{} `type:"structure"` 2020 2021 // The value of the X coordinate for a point on a Polygon. 2022 X *float64 `type:"float"` 2023 2024 // The value of the Y coordinate for a point on a Polygon. 2025 Y *float64 `type:"float"` 2026} 2027 2028// String returns the string representation 2029func (s Point) String() string { 2030 return awsutil.Prettify(s) 2031} 2032 2033// GoString returns the string representation 2034func (s Point) GoString() string { 2035 return s.String() 2036} 2037 2038// SetX sets the X field's value. 2039func (s *Point) SetX(v float64) *Point { 2040 s.X = &v 2041 return s 2042} 2043 2044// SetY sets the Y field's value. 2045func (s *Point) SetY(v float64) *Point { 2046 s.Y = &v 2047 return s 2048} 2049 2050// Information about how blocks are related to each other. A Block object contains 2051// 0 or more Relation objects in a list, Relationships. For more information, 2052// see Block. 2053// 2054// The Type element provides the type of the relationship for all blocks in 2055// the IDs array. 2056type Relationship struct { 2057 _ struct{} `type:"structure"` 2058 2059 // An array of IDs for related blocks. You can get the type of the relationship 2060 // from the Type element. 2061 Ids []*string `type:"list"` 2062 2063 // The type of relationship that the blocks in the IDs array have with the current 2064 // block. The relationship can be VALUE or CHILD. A relationship of type VALUE 2065 // is a list that contains the ID of the VALUE block that's associated with 2066 // the KEY of a key-value pair. A relationship of type CHILD is a list of IDs 2067 // that identify WORD blocks. 2068 Type *string `type:"string" enum:"RelationshipType"` 2069} 2070 2071// String returns the string representation 2072func (s Relationship) String() string { 2073 return awsutil.Prettify(s) 2074} 2075 2076// GoString returns the string representation 2077func (s Relationship) GoString() string { 2078 return s.String() 2079} 2080 2081// SetIds sets the Ids field's value. 2082func (s *Relationship) SetIds(v []*string) *Relationship { 2083 s.Ids = v 2084 return s 2085} 2086 2087// SetType sets the Type field's value. 2088func (s *Relationship) SetType(v string) *Relationship { 2089 s.Type = &v 2090 return s 2091} 2092 2093// The S3 bucket name and file name that identifies the document. 2094// 2095// The AWS Region for the S3 bucket that contains the document must match the 2096// Region that you use for Amazon Textract operations. 2097// 2098// For Amazon Textract to process a file in an S3 bucket, the user must have 2099// permission to access the S3 bucket and file. 2100type S3Object struct { 2101 _ struct{} `type:"structure"` 2102 2103 // The name of the S3 bucket. 2104 Bucket *string `min:"3" type:"string"` 2105 2106 // The file name of the input document. Synchronous operations can use image 2107 // files that are in JPEG or PNG format. Asynchronous operations also support 2108 // PDF format files. 2109 Name *string `min:"1" type:"string"` 2110 2111 // If the bucket has versioning enabled, you can specify the object version. 2112 Version *string `min:"1" type:"string"` 2113} 2114 2115// String returns the string representation 2116func (s S3Object) String() string { 2117 return awsutil.Prettify(s) 2118} 2119 2120// GoString returns the string representation 2121func (s S3Object) GoString() string { 2122 return s.String() 2123} 2124 2125// Validate inspects the fields of the type to determine if they are valid. 2126func (s *S3Object) Validate() error { 2127 invalidParams := request.ErrInvalidParams{Context: "S3Object"} 2128 if s.Bucket != nil && len(*s.Bucket) < 3 { 2129 invalidParams.Add(request.NewErrParamMinLen("Bucket", 3)) 2130 } 2131 if s.Name != nil && len(*s.Name) < 1 { 2132 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 2133 } 2134 if s.Version != nil && len(*s.Version) < 1 { 2135 invalidParams.Add(request.NewErrParamMinLen("Version", 1)) 2136 } 2137 2138 if invalidParams.Len() > 0 { 2139 return invalidParams 2140 } 2141 return nil 2142} 2143 2144// SetBucket sets the Bucket field's value. 2145func (s *S3Object) SetBucket(v string) *S3Object { 2146 s.Bucket = &v 2147 return s 2148} 2149 2150// SetName sets the Name field's value. 2151func (s *S3Object) SetName(v string) *S3Object { 2152 s.Name = &v 2153 return s 2154} 2155 2156// SetVersion sets the Version field's value. 2157func (s *S3Object) SetVersion(v string) *S3Object { 2158 s.Version = &v 2159 return s 2160} 2161 2162type StartDocumentAnalysisInput struct { 2163 _ struct{} `type:"structure"` 2164 2165 // The idempotent token that you use to identify the start request. If you use 2166 // the same token with multiple StartDocumentAnalysis requests, the same JobId 2167 // is returned. Use ClientRequestToken to prevent the same job from being accidentally 2168 // started more than once. For more information, see Calling Amazon Textract 2169 // Asynchronous Operations (https://docs.aws.amazon.com/textract/latest/dg/api-async.html). 2170 ClientRequestToken *string `min:"1" type:"string"` 2171 2172 // The location of the document to be processed. 2173 // 2174 // DocumentLocation is a required field 2175 DocumentLocation *DocumentLocation `type:"structure" required:"true"` 2176 2177 // A list of the types of analysis to perform. Add TABLES to the list to return 2178 // information about the tables that are detected in the input document. Add 2179 // FORMS to return detected form data. To perform both types of analysis, add 2180 // TABLES and FORMS to FeatureTypes. All lines and words detected in the document 2181 // are included in the response (including text that isn't related to the value 2182 // of FeatureTypes). 2183 // 2184 // FeatureTypes is a required field 2185 FeatureTypes []*string `type:"list" required:"true"` 2186 2187 // An identifier that you specify that's included in the completion notification 2188 // published to the Amazon SNS topic. For example, you can use JobTag to identify 2189 // the type of document that the completion notification corresponds to (such 2190 // as a tax form or a receipt). 2191 JobTag *string `min:"1" type:"string"` 2192 2193 // The Amazon SNS topic ARN that you want Amazon Textract to publish the completion 2194 // status of the operation to. 2195 NotificationChannel *NotificationChannel `type:"structure"` 2196} 2197 2198// String returns the string representation 2199func (s StartDocumentAnalysisInput) String() string { 2200 return awsutil.Prettify(s) 2201} 2202 2203// GoString returns the string representation 2204func (s StartDocumentAnalysisInput) GoString() string { 2205 return s.String() 2206} 2207 2208// Validate inspects the fields of the type to determine if they are valid. 2209func (s *StartDocumentAnalysisInput) Validate() error { 2210 invalidParams := request.ErrInvalidParams{Context: "StartDocumentAnalysisInput"} 2211 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { 2212 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) 2213 } 2214 if s.DocumentLocation == nil { 2215 invalidParams.Add(request.NewErrParamRequired("DocumentLocation")) 2216 } 2217 if s.FeatureTypes == nil { 2218 invalidParams.Add(request.NewErrParamRequired("FeatureTypes")) 2219 } 2220 if s.JobTag != nil && len(*s.JobTag) < 1 { 2221 invalidParams.Add(request.NewErrParamMinLen("JobTag", 1)) 2222 } 2223 if s.DocumentLocation != nil { 2224 if err := s.DocumentLocation.Validate(); err != nil { 2225 invalidParams.AddNested("DocumentLocation", err.(request.ErrInvalidParams)) 2226 } 2227 } 2228 if s.NotificationChannel != nil { 2229 if err := s.NotificationChannel.Validate(); err != nil { 2230 invalidParams.AddNested("NotificationChannel", err.(request.ErrInvalidParams)) 2231 } 2232 } 2233 2234 if invalidParams.Len() > 0 { 2235 return invalidParams 2236 } 2237 return nil 2238} 2239 2240// SetClientRequestToken sets the ClientRequestToken field's value. 2241func (s *StartDocumentAnalysisInput) SetClientRequestToken(v string) *StartDocumentAnalysisInput { 2242 s.ClientRequestToken = &v 2243 return s 2244} 2245 2246// SetDocumentLocation sets the DocumentLocation field's value. 2247func (s *StartDocumentAnalysisInput) SetDocumentLocation(v *DocumentLocation) *StartDocumentAnalysisInput { 2248 s.DocumentLocation = v 2249 return s 2250} 2251 2252// SetFeatureTypes sets the FeatureTypes field's value. 2253func (s *StartDocumentAnalysisInput) SetFeatureTypes(v []*string) *StartDocumentAnalysisInput { 2254 s.FeatureTypes = v 2255 return s 2256} 2257 2258// SetJobTag sets the JobTag field's value. 2259func (s *StartDocumentAnalysisInput) SetJobTag(v string) *StartDocumentAnalysisInput { 2260 s.JobTag = &v 2261 return s 2262} 2263 2264// SetNotificationChannel sets the NotificationChannel field's value. 2265func (s *StartDocumentAnalysisInput) SetNotificationChannel(v *NotificationChannel) *StartDocumentAnalysisInput { 2266 s.NotificationChannel = v 2267 return s 2268} 2269 2270type StartDocumentAnalysisOutput struct { 2271 _ struct{} `type:"structure"` 2272 2273 // The identifier for the document text detection job. Use JobId to identify 2274 // the job in a subsequent call to GetDocumentAnalysis. A JobId value is only 2275 // valid for 7 days. 2276 JobId *string `min:"1" type:"string"` 2277} 2278 2279// String returns the string representation 2280func (s StartDocumentAnalysisOutput) String() string { 2281 return awsutil.Prettify(s) 2282} 2283 2284// GoString returns the string representation 2285func (s StartDocumentAnalysisOutput) GoString() string { 2286 return s.String() 2287} 2288 2289// SetJobId sets the JobId field's value. 2290func (s *StartDocumentAnalysisOutput) SetJobId(v string) *StartDocumentAnalysisOutput { 2291 s.JobId = &v 2292 return s 2293} 2294 2295type StartDocumentTextDetectionInput struct { 2296 _ struct{} `type:"structure"` 2297 2298 // The idempotent token that's used to identify the start request. If you use 2299 // the same token with multiple StartDocumentTextDetection requests, the same 2300 // JobId is returned. Use ClientRequestToken to prevent the same job from being 2301 // accidentally started more than once. For more information, see Calling Amazon 2302 // Textract Asynchronous Operations (https://docs.aws.amazon.com/textract/latest/dg/api-async.html). 2303 ClientRequestToken *string `min:"1" type:"string"` 2304 2305 // The location of the document to be processed. 2306 // 2307 // DocumentLocation is a required field 2308 DocumentLocation *DocumentLocation `type:"structure" required:"true"` 2309 2310 // An identifier that you specify that's included in the completion notification 2311 // published to the Amazon SNS topic. For example, you can use JobTag to identify 2312 // the type of document that the completion notification corresponds to (such 2313 // as a tax form or a receipt). 2314 JobTag *string `min:"1" type:"string"` 2315 2316 // The Amazon SNS topic ARN that you want Amazon Textract to publish the completion 2317 // status of the operation to. 2318 NotificationChannel *NotificationChannel `type:"structure"` 2319} 2320 2321// String returns the string representation 2322func (s StartDocumentTextDetectionInput) String() string { 2323 return awsutil.Prettify(s) 2324} 2325 2326// GoString returns the string representation 2327func (s StartDocumentTextDetectionInput) GoString() string { 2328 return s.String() 2329} 2330 2331// Validate inspects the fields of the type to determine if they are valid. 2332func (s *StartDocumentTextDetectionInput) Validate() error { 2333 invalidParams := request.ErrInvalidParams{Context: "StartDocumentTextDetectionInput"} 2334 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { 2335 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) 2336 } 2337 if s.DocumentLocation == nil { 2338 invalidParams.Add(request.NewErrParamRequired("DocumentLocation")) 2339 } 2340 if s.JobTag != nil && len(*s.JobTag) < 1 { 2341 invalidParams.Add(request.NewErrParamMinLen("JobTag", 1)) 2342 } 2343 if s.DocumentLocation != nil { 2344 if err := s.DocumentLocation.Validate(); err != nil { 2345 invalidParams.AddNested("DocumentLocation", err.(request.ErrInvalidParams)) 2346 } 2347 } 2348 if s.NotificationChannel != nil { 2349 if err := s.NotificationChannel.Validate(); err != nil { 2350 invalidParams.AddNested("NotificationChannel", err.(request.ErrInvalidParams)) 2351 } 2352 } 2353 2354 if invalidParams.Len() > 0 { 2355 return invalidParams 2356 } 2357 return nil 2358} 2359 2360// SetClientRequestToken sets the ClientRequestToken field's value. 2361func (s *StartDocumentTextDetectionInput) SetClientRequestToken(v string) *StartDocumentTextDetectionInput { 2362 s.ClientRequestToken = &v 2363 return s 2364} 2365 2366// SetDocumentLocation sets the DocumentLocation field's value. 2367func (s *StartDocumentTextDetectionInput) SetDocumentLocation(v *DocumentLocation) *StartDocumentTextDetectionInput { 2368 s.DocumentLocation = v 2369 return s 2370} 2371 2372// SetJobTag sets the JobTag field's value. 2373func (s *StartDocumentTextDetectionInput) SetJobTag(v string) *StartDocumentTextDetectionInput { 2374 s.JobTag = &v 2375 return s 2376} 2377 2378// SetNotificationChannel sets the NotificationChannel field's value. 2379func (s *StartDocumentTextDetectionInput) SetNotificationChannel(v *NotificationChannel) *StartDocumentTextDetectionInput { 2380 s.NotificationChannel = v 2381 return s 2382} 2383 2384type StartDocumentTextDetectionOutput struct { 2385 _ struct{} `type:"structure"` 2386 2387 // The identifier of the text detection job for the document. Use JobId to identify 2388 // the job in a subsequent call to GetDocumentTextDetection. A JobId value is 2389 // only valid for 7 days. 2390 JobId *string `min:"1" type:"string"` 2391} 2392 2393// String returns the string representation 2394func (s StartDocumentTextDetectionOutput) String() string { 2395 return awsutil.Prettify(s) 2396} 2397 2398// GoString returns the string representation 2399func (s StartDocumentTextDetectionOutput) GoString() string { 2400 return s.String() 2401} 2402 2403// SetJobId sets the JobId field's value. 2404func (s *StartDocumentTextDetectionOutput) SetJobId(v string) *StartDocumentTextDetectionOutput { 2405 s.JobId = &v 2406 return s 2407} 2408 2409// A warning about an issue that occurred during asynchronous text analysis 2410// (StartDocumentAnalysis) or asynchronous document text detection (StartDocumentTextDetection). 2411type Warning struct { 2412 _ struct{} `type:"structure"` 2413 2414 // The error code for the warning. 2415 ErrorCode *string `type:"string"` 2416 2417 // A list of the pages that the warning applies to. 2418 Pages []*int64 `type:"list"` 2419} 2420 2421// String returns the string representation 2422func (s Warning) String() string { 2423 return awsutil.Prettify(s) 2424} 2425 2426// GoString returns the string representation 2427func (s Warning) GoString() string { 2428 return s.String() 2429} 2430 2431// SetErrorCode sets the ErrorCode field's value. 2432func (s *Warning) SetErrorCode(v string) *Warning { 2433 s.ErrorCode = &v 2434 return s 2435} 2436 2437// SetPages sets the Pages field's value. 2438func (s *Warning) SetPages(v []*int64) *Warning { 2439 s.Pages = v 2440 return s 2441} 2442 2443const ( 2444 // BlockTypeKeyValueSet is a BlockType enum value 2445 BlockTypeKeyValueSet = "KEY_VALUE_SET" 2446 2447 // BlockTypePage is a BlockType enum value 2448 BlockTypePage = "PAGE" 2449 2450 // BlockTypeLine is a BlockType enum value 2451 BlockTypeLine = "LINE" 2452 2453 // BlockTypeWord is a BlockType enum value 2454 BlockTypeWord = "WORD" 2455 2456 // BlockTypeTable is a BlockType enum value 2457 BlockTypeTable = "TABLE" 2458 2459 // BlockTypeCell is a BlockType enum value 2460 BlockTypeCell = "CELL" 2461 2462 // BlockTypeSelectionElement is a BlockType enum value 2463 BlockTypeSelectionElement = "SELECTION_ELEMENT" 2464) 2465 2466const ( 2467 // ContentClassifierFreeOfPersonallyIdentifiableInformation is a ContentClassifier enum value 2468 ContentClassifierFreeOfPersonallyIdentifiableInformation = "FreeOfPersonallyIdentifiableInformation" 2469 2470 // ContentClassifierFreeOfAdultContent is a ContentClassifier enum value 2471 ContentClassifierFreeOfAdultContent = "FreeOfAdultContent" 2472) 2473 2474const ( 2475 // EntityTypeKey is a EntityType enum value 2476 EntityTypeKey = "KEY" 2477 2478 // EntityTypeValue is a EntityType enum value 2479 EntityTypeValue = "VALUE" 2480) 2481 2482const ( 2483 // FeatureTypeTables is a FeatureType enum value 2484 FeatureTypeTables = "TABLES" 2485 2486 // FeatureTypeForms is a FeatureType enum value 2487 FeatureTypeForms = "FORMS" 2488) 2489 2490const ( 2491 // JobStatusInProgress is a JobStatus enum value 2492 JobStatusInProgress = "IN_PROGRESS" 2493 2494 // JobStatusSucceeded is a JobStatus enum value 2495 JobStatusSucceeded = "SUCCEEDED" 2496 2497 // JobStatusFailed is a JobStatus enum value 2498 JobStatusFailed = "FAILED" 2499 2500 // JobStatusPartialSuccess is a JobStatus enum value 2501 JobStatusPartialSuccess = "PARTIAL_SUCCESS" 2502) 2503 2504const ( 2505 // RelationshipTypeValue is a RelationshipType enum value 2506 RelationshipTypeValue = "VALUE" 2507 2508 // RelationshipTypeChild is a RelationshipType enum value 2509 RelationshipTypeChild = "CHILD" 2510) 2511 2512const ( 2513 // SelectionStatusSelected is a SelectionStatus enum value 2514 SelectionStatusSelected = "SELECTED" 2515 2516 // SelectionStatusNotSelected is a SelectionStatus enum value 2517 SelectionStatusNotSelected = "NOT_SELECTED" 2518) 2519