1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package comprehend 4 5import ( 6 "fmt" 7 "time" 8 9 "github.com/aws/aws-sdk-go/aws" 10 "github.com/aws/aws-sdk-go/aws/awsutil" 11 "github.com/aws/aws-sdk-go/aws/request" 12 "github.com/aws/aws-sdk-go/private/protocol" 13 "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" 14) 15 16const opBatchDetectDominantLanguage = "BatchDetectDominantLanguage" 17 18// BatchDetectDominantLanguageRequest generates a "aws/request.Request" representing the 19// client's request for the BatchDetectDominantLanguage operation. The "output" return 20// value will be populated with the request's response once the request completes 21// successfully. 22// 23// Use "Send" method on the returned Request to send the API call to the service. 24// the "output" return value is not valid until after Send returns without error. 25// 26// See BatchDetectDominantLanguage for more information on using the BatchDetectDominantLanguage 27// API call, and error handling. 28// 29// This method is useful when you want to inject custom logic or configuration 30// into the SDK's request lifecycle. Such as custom headers, or retry logic. 31// 32// 33// // Example sending a request using the BatchDetectDominantLanguageRequest method. 34// req, resp := client.BatchDetectDominantLanguageRequest(params) 35// 36// err := req.Send() 37// if err == nil { // resp is now filled 38// fmt.Println(resp) 39// } 40// 41// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectDominantLanguage 42func (c *Comprehend) BatchDetectDominantLanguageRequest(input *BatchDetectDominantLanguageInput) (req *request.Request, output *BatchDetectDominantLanguageOutput) { 43 op := &request.Operation{ 44 Name: opBatchDetectDominantLanguage, 45 HTTPMethod: "POST", 46 HTTPPath: "/", 47 } 48 49 if input == nil { 50 input = &BatchDetectDominantLanguageInput{} 51 } 52 53 output = &BatchDetectDominantLanguageOutput{} 54 req = c.newRequest(op, input, output) 55 return 56} 57 58// BatchDetectDominantLanguage API operation for Amazon Comprehend. 59// 60// Determines the dominant language of the input text for a batch of documents. 61// For a list of languages that Amazon Comprehend can detect, see Amazon Comprehend 62// Supported Languages (https://docs.aws.amazon.com/comprehend/latest/dg/how-languages.html). 63// 64// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 65// with awserr.Error's Code and Message methods to get detailed information about 66// the error. 67// 68// See the AWS API reference guide for Amazon Comprehend's 69// API operation BatchDetectDominantLanguage for usage and error information. 70// 71// Returned Error Types: 72// * InvalidRequestException 73// The request is invalid. 74// 75// * TextSizeLimitExceededException 76// The size of the input text exceeds the limit. Use a smaller document. 77// 78// * BatchSizeLimitExceededException 79// The number of documents in the request exceeds the limit of 25. Try your 80// request again with fewer documents. 81// 82// * InternalServerException 83// An internal server error occurred. Retry your request. 84// 85// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectDominantLanguage 86func (c *Comprehend) BatchDetectDominantLanguage(input *BatchDetectDominantLanguageInput) (*BatchDetectDominantLanguageOutput, error) { 87 req, out := c.BatchDetectDominantLanguageRequest(input) 88 return out, req.Send() 89} 90 91// BatchDetectDominantLanguageWithContext is the same as BatchDetectDominantLanguage with the addition of 92// the ability to pass a context and additional request options. 93// 94// See BatchDetectDominantLanguage for details on how to use this API operation. 95// 96// The context must be non-nil and will be used for request cancellation. If 97// the context is nil a panic will occur. In the future the SDK may create 98// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 99// for more information on using Contexts. 100func (c *Comprehend) BatchDetectDominantLanguageWithContext(ctx aws.Context, input *BatchDetectDominantLanguageInput, opts ...request.Option) (*BatchDetectDominantLanguageOutput, error) { 101 req, out := c.BatchDetectDominantLanguageRequest(input) 102 req.SetContext(ctx) 103 req.ApplyOptions(opts...) 104 return out, req.Send() 105} 106 107const opBatchDetectEntities = "BatchDetectEntities" 108 109// BatchDetectEntitiesRequest generates a "aws/request.Request" representing the 110// client's request for the BatchDetectEntities operation. The "output" return 111// value will be populated with the request's response once the request completes 112// successfully. 113// 114// Use "Send" method on the returned Request to send the API call to the service. 115// the "output" return value is not valid until after Send returns without error. 116// 117// See BatchDetectEntities for more information on using the BatchDetectEntities 118// API call, and error handling. 119// 120// This method is useful when you want to inject custom logic or configuration 121// into the SDK's request lifecycle. Such as custom headers, or retry logic. 122// 123// 124// // Example sending a request using the BatchDetectEntitiesRequest method. 125// req, resp := client.BatchDetectEntitiesRequest(params) 126// 127// err := req.Send() 128// if err == nil { // resp is now filled 129// fmt.Println(resp) 130// } 131// 132// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectEntities 133func (c *Comprehend) BatchDetectEntitiesRequest(input *BatchDetectEntitiesInput) (req *request.Request, output *BatchDetectEntitiesOutput) { 134 op := &request.Operation{ 135 Name: opBatchDetectEntities, 136 HTTPMethod: "POST", 137 HTTPPath: "/", 138 } 139 140 if input == nil { 141 input = &BatchDetectEntitiesInput{} 142 } 143 144 output = &BatchDetectEntitiesOutput{} 145 req = c.newRequest(op, input, output) 146 return 147} 148 149// BatchDetectEntities API operation for Amazon Comprehend. 150// 151// Inspects the text of a batch of documents for named entities and returns 152// information about them. For more information about named entities, see how-entities 153// 154// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 155// with awserr.Error's Code and Message methods to get detailed information about 156// the error. 157// 158// See the AWS API reference guide for Amazon Comprehend's 159// API operation BatchDetectEntities for usage and error information. 160// 161// Returned Error Types: 162// * InvalidRequestException 163// The request is invalid. 164// 165// * TextSizeLimitExceededException 166// The size of the input text exceeds the limit. Use a smaller document. 167// 168// * UnsupportedLanguageException 169// Amazon Comprehend can't process the language of the input text. For all custom 170// entity recognition APIs (such as CreateEntityRecognizer), only English is 171// accepted. For most other APIs, such as those for Custom Classification, Amazon 172// Comprehend accepts text in all supported languages. For a list of supported 173// languages, see supported-languages. 174// 175// * BatchSizeLimitExceededException 176// The number of documents in the request exceeds the limit of 25. Try your 177// request again with fewer documents. 178// 179// * InternalServerException 180// An internal server error occurred. Retry your request. 181// 182// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectEntities 183func (c *Comprehend) BatchDetectEntities(input *BatchDetectEntitiesInput) (*BatchDetectEntitiesOutput, error) { 184 req, out := c.BatchDetectEntitiesRequest(input) 185 return out, req.Send() 186} 187 188// BatchDetectEntitiesWithContext is the same as BatchDetectEntities with the addition of 189// the ability to pass a context and additional request options. 190// 191// See BatchDetectEntities for details on how to use this API operation. 192// 193// The context must be non-nil and will be used for request cancellation. If 194// the context is nil a panic will occur. In the future the SDK may create 195// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 196// for more information on using Contexts. 197func (c *Comprehend) BatchDetectEntitiesWithContext(ctx aws.Context, input *BatchDetectEntitiesInput, opts ...request.Option) (*BatchDetectEntitiesOutput, error) { 198 req, out := c.BatchDetectEntitiesRequest(input) 199 req.SetContext(ctx) 200 req.ApplyOptions(opts...) 201 return out, req.Send() 202} 203 204const opBatchDetectKeyPhrases = "BatchDetectKeyPhrases" 205 206// BatchDetectKeyPhrasesRequest generates a "aws/request.Request" representing the 207// client's request for the BatchDetectKeyPhrases operation. The "output" return 208// value will be populated with the request's response once the request completes 209// successfully. 210// 211// Use "Send" method on the returned Request to send the API call to the service. 212// the "output" return value is not valid until after Send returns without error. 213// 214// See BatchDetectKeyPhrases for more information on using the BatchDetectKeyPhrases 215// API call, and error handling. 216// 217// This method is useful when you want to inject custom logic or configuration 218// into the SDK's request lifecycle. Such as custom headers, or retry logic. 219// 220// 221// // Example sending a request using the BatchDetectKeyPhrasesRequest method. 222// req, resp := client.BatchDetectKeyPhrasesRequest(params) 223// 224// err := req.Send() 225// if err == nil { // resp is now filled 226// fmt.Println(resp) 227// } 228// 229// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectKeyPhrases 230func (c *Comprehend) BatchDetectKeyPhrasesRequest(input *BatchDetectKeyPhrasesInput) (req *request.Request, output *BatchDetectKeyPhrasesOutput) { 231 op := &request.Operation{ 232 Name: opBatchDetectKeyPhrases, 233 HTTPMethod: "POST", 234 HTTPPath: "/", 235 } 236 237 if input == nil { 238 input = &BatchDetectKeyPhrasesInput{} 239 } 240 241 output = &BatchDetectKeyPhrasesOutput{} 242 req = c.newRequest(op, input, output) 243 return 244} 245 246// BatchDetectKeyPhrases API operation for Amazon Comprehend. 247// 248// Detects the key noun phrases found in a batch of documents. 249// 250// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 251// with awserr.Error's Code and Message methods to get detailed information about 252// the error. 253// 254// See the AWS API reference guide for Amazon Comprehend's 255// API operation BatchDetectKeyPhrases for usage and error information. 256// 257// Returned Error Types: 258// * InvalidRequestException 259// The request is invalid. 260// 261// * TextSizeLimitExceededException 262// The size of the input text exceeds the limit. Use a smaller document. 263// 264// * UnsupportedLanguageException 265// Amazon Comprehend can't process the language of the input text. For all custom 266// entity recognition APIs (such as CreateEntityRecognizer), only English is 267// accepted. For most other APIs, such as those for Custom Classification, Amazon 268// Comprehend accepts text in all supported languages. For a list of supported 269// languages, see supported-languages. 270// 271// * BatchSizeLimitExceededException 272// The number of documents in the request exceeds the limit of 25. Try your 273// request again with fewer documents. 274// 275// * InternalServerException 276// An internal server error occurred. Retry your request. 277// 278// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectKeyPhrases 279func (c *Comprehend) BatchDetectKeyPhrases(input *BatchDetectKeyPhrasesInput) (*BatchDetectKeyPhrasesOutput, error) { 280 req, out := c.BatchDetectKeyPhrasesRequest(input) 281 return out, req.Send() 282} 283 284// BatchDetectKeyPhrasesWithContext is the same as BatchDetectKeyPhrases with the addition of 285// the ability to pass a context and additional request options. 286// 287// See BatchDetectKeyPhrases for details on how to use this API operation. 288// 289// The context must be non-nil and will be used for request cancellation. If 290// the context is nil a panic will occur. In the future the SDK may create 291// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 292// for more information on using Contexts. 293func (c *Comprehend) BatchDetectKeyPhrasesWithContext(ctx aws.Context, input *BatchDetectKeyPhrasesInput, opts ...request.Option) (*BatchDetectKeyPhrasesOutput, error) { 294 req, out := c.BatchDetectKeyPhrasesRequest(input) 295 req.SetContext(ctx) 296 req.ApplyOptions(opts...) 297 return out, req.Send() 298} 299 300const opBatchDetectSentiment = "BatchDetectSentiment" 301 302// BatchDetectSentimentRequest generates a "aws/request.Request" representing the 303// client's request for the BatchDetectSentiment operation. The "output" return 304// value will be populated with the request's response once the request completes 305// successfully. 306// 307// Use "Send" method on the returned Request to send the API call to the service. 308// the "output" return value is not valid until after Send returns without error. 309// 310// See BatchDetectSentiment for more information on using the BatchDetectSentiment 311// API call, and error handling. 312// 313// This method is useful when you want to inject custom logic or configuration 314// into the SDK's request lifecycle. Such as custom headers, or retry logic. 315// 316// 317// // Example sending a request using the BatchDetectSentimentRequest method. 318// req, resp := client.BatchDetectSentimentRequest(params) 319// 320// err := req.Send() 321// if err == nil { // resp is now filled 322// fmt.Println(resp) 323// } 324// 325// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectSentiment 326func (c *Comprehend) BatchDetectSentimentRequest(input *BatchDetectSentimentInput) (req *request.Request, output *BatchDetectSentimentOutput) { 327 op := &request.Operation{ 328 Name: opBatchDetectSentiment, 329 HTTPMethod: "POST", 330 HTTPPath: "/", 331 } 332 333 if input == nil { 334 input = &BatchDetectSentimentInput{} 335 } 336 337 output = &BatchDetectSentimentOutput{} 338 req = c.newRequest(op, input, output) 339 return 340} 341 342// BatchDetectSentiment API operation for Amazon Comprehend. 343// 344// Inspects a batch of documents and returns an inference of the prevailing 345// sentiment, POSITIVE, NEUTRAL, MIXED, or NEGATIVE, in each one. 346// 347// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 348// with awserr.Error's Code and Message methods to get detailed information about 349// the error. 350// 351// See the AWS API reference guide for Amazon Comprehend's 352// API operation BatchDetectSentiment for usage and error information. 353// 354// Returned Error Types: 355// * InvalidRequestException 356// The request is invalid. 357// 358// * TextSizeLimitExceededException 359// The size of the input text exceeds the limit. Use a smaller document. 360// 361// * UnsupportedLanguageException 362// Amazon Comprehend can't process the language of the input text. For all custom 363// entity recognition APIs (such as CreateEntityRecognizer), only English is 364// accepted. For most other APIs, such as those for Custom Classification, Amazon 365// Comprehend accepts text in all supported languages. For a list of supported 366// languages, see supported-languages. 367// 368// * BatchSizeLimitExceededException 369// The number of documents in the request exceeds the limit of 25. Try your 370// request again with fewer documents. 371// 372// * InternalServerException 373// An internal server error occurred. Retry your request. 374// 375// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectSentiment 376func (c *Comprehend) BatchDetectSentiment(input *BatchDetectSentimentInput) (*BatchDetectSentimentOutput, error) { 377 req, out := c.BatchDetectSentimentRequest(input) 378 return out, req.Send() 379} 380 381// BatchDetectSentimentWithContext is the same as BatchDetectSentiment with the addition of 382// the ability to pass a context and additional request options. 383// 384// See BatchDetectSentiment for details on how to use this API operation. 385// 386// The context must be non-nil and will be used for request cancellation. If 387// the context is nil a panic will occur. In the future the SDK may create 388// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 389// for more information on using Contexts. 390func (c *Comprehend) BatchDetectSentimentWithContext(ctx aws.Context, input *BatchDetectSentimentInput, opts ...request.Option) (*BatchDetectSentimentOutput, error) { 391 req, out := c.BatchDetectSentimentRequest(input) 392 req.SetContext(ctx) 393 req.ApplyOptions(opts...) 394 return out, req.Send() 395} 396 397const opBatchDetectSyntax = "BatchDetectSyntax" 398 399// BatchDetectSyntaxRequest generates a "aws/request.Request" representing the 400// client's request for the BatchDetectSyntax operation. The "output" return 401// value will be populated with the request's response once the request completes 402// successfully. 403// 404// Use "Send" method on the returned Request to send the API call to the service. 405// the "output" return value is not valid until after Send returns without error. 406// 407// See BatchDetectSyntax for more information on using the BatchDetectSyntax 408// API call, and error handling. 409// 410// This method is useful when you want to inject custom logic or configuration 411// into the SDK's request lifecycle. Such as custom headers, or retry logic. 412// 413// 414// // Example sending a request using the BatchDetectSyntaxRequest method. 415// req, resp := client.BatchDetectSyntaxRequest(params) 416// 417// err := req.Send() 418// if err == nil { // resp is now filled 419// fmt.Println(resp) 420// } 421// 422// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectSyntax 423func (c *Comprehend) BatchDetectSyntaxRequest(input *BatchDetectSyntaxInput) (req *request.Request, output *BatchDetectSyntaxOutput) { 424 op := &request.Operation{ 425 Name: opBatchDetectSyntax, 426 HTTPMethod: "POST", 427 HTTPPath: "/", 428 } 429 430 if input == nil { 431 input = &BatchDetectSyntaxInput{} 432 } 433 434 output = &BatchDetectSyntaxOutput{} 435 req = c.newRequest(op, input, output) 436 return 437} 438 439// BatchDetectSyntax API operation for Amazon Comprehend. 440// 441// Inspects the text of a batch of documents for the syntax and part of speech 442// of the words in the document and returns information about them. For more 443// information, see how-syntax. 444// 445// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 446// with awserr.Error's Code and Message methods to get detailed information about 447// the error. 448// 449// See the AWS API reference guide for Amazon Comprehend's 450// API operation BatchDetectSyntax for usage and error information. 451// 452// Returned Error Types: 453// * InvalidRequestException 454// The request is invalid. 455// 456// * TextSizeLimitExceededException 457// The size of the input text exceeds the limit. Use a smaller document. 458// 459// * UnsupportedLanguageException 460// Amazon Comprehend can't process the language of the input text. For all custom 461// entity recognition APIs (such as CreateEntityRecognizer), only English is 462// accepted. For most other APIs, such as those for Custom Classification, Amazon 463// Comprehend accepts text in all supported languages. For a list of supported 464// languages, see supported-languages. 465// 466// * BatchSizeLimitExceededException 467// The number of documents in the request exceeds the limit of 25. Try your 468// request again with fewer documents. 469// 470// * InternalServerException 471// An internal server error occurred. Retry your request. 472// 473// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/BatchDetectSyntax 474func (c *Comprehend) BatchDetectSyntax(input *BatchDetectSyntaxInput) (*BatchDetectSyntaxOutput, error) { 475 req, out := c.BatchDetectSyntaxRequest(input) 476 return out, req.Send() 477} 478 479// BatchDetectSyntaxWithContext is the same as BatchDetectSyntax with the addition of 480// the ability to pass a context and additional request options. 481// 482// See BatchDetectSyntax for details on how to use this API operation. 483// 484// The context must be non-nil and will be used for request cancellation. If 485// the context is nil a panic will occur. In the future the SDK may create 486// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 487// for more information on using Contexts. 488func (c *Comprehend) BatchDetectSyntaxWithContext(ctx aws.Context, input *BatchDetectSyntaxInput, opts ...request.Option) (*BatchDetectSyntaxOutput, error) { 489 req, out := c.BatchDetectSyntaxRequest(input) 490 req.SetContext(ctx) 491 req.ApplyOptions(opts...) 492 return out, req.Send() 493} 494 495const opClassifyDocument = "ClassifyDocument" 496 497// ClassifyDocumentRequest generates a "aws/request.Request" representing the 498// client's request for the ClassifyDocument operation. The "output" return 499// value will be populated with the request's response once the request completes 500// successfully. 501// 502// Use "Send" method on the returned Request to send the API call to the service. 503// the "output" return value is not valid until after Send returns without error. 504// 505// See ClassifyDocument for more information on using the ClassifyDocument 506// API call, and error handling. 507// 508// This method is useful when you want to inject custom logic or configuration 509// into the SDK's request lifecycle. Such as custom headers, or retry logic. 510// 511// 512// // Example sending a request using the ClassifyDocumentRequest method. 513// req, resp := client.ClassifyDocumentRequest(params) 514// 515// err := req.Send() 516// if err == nil { // resp is now filled 517// fmt.Println(resp) 518// } 519// 520// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ClassifyDocument 521func (c *Comprehend) ClassifyDocumentRequest(input *ClassifyDocumentInput) (req *request.Request, output *ClassifyDocumentOutput) { 522 op := &request.Operation{ 523 Name: opClassifyDocument, 524 HTTPMethod: "POST", 525 HTTPPath: "/", 526 } 527 528 if input == nil { 529 input = &ClassifyDocumentInput{} 530 } 531 532 output = &ClassifyDocumentOutput{} 533 req = c.newRequest(op, input, output) 534 return 535} 536 537// ClassifyDocument API operation for Amazon Comprehend. 538// 539// Creates a new document classification request to analyze a single document 540// in real-time, using a previously created and trained custom model and an 541// endpoint. 542// 543// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 544// with awserr.Error's Code and Message methods to get detailed information about 545// the error. 546// 547// See the AWS API reference guide for Amazon Comprehend's 548// API operation ClassifyDocument for usage and error information. 549// 550// Returned Error Types: 551// * InvalidRequestException 552// The request is invalid. 553// 554// * ResourceUnavailableException 555// The specified resource is not available. Check to see if the resource is 556// in the TRAINED state and try your request again. 557// 558// * TextSizeLimitExceededException 559// The size of the input text exceeds the limit. Use a smaller document. 560// 561// * InternalServerException 562// An internal server error occurred. Retry your request. 563// 564// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ClassifyDocument 565func (c *Comprehend) ClassifyDocument(input *ClassifyDocumentInput) (*ClassifyDocumentOutput, error) { 566 req, out := c.ClassifyDocumentRequest(input) 567 return out, req.Send() 568} 569 570// ClassifyDocumentWithContext is the same as ClassifyDocument with the addition of 571// the ability to pass a context and additional request options. 572// 573// See ClassifyDocument for details on how to use this API operation. 574// 575// The context must be non-nil and will be used for request cancellation. If 576// the context is nil a panic will occur. In the future the SDK may create 577// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 578// for more information on using Contexts. 579func (c *Comprehend) ClassifyDocumentWithContext(ctx aws.Context, input *ClassifyDocumentInput, opts ...request.Option) (*ClassifyDocumentOutput, error) { 580 req, out := c.ClassifyDocumentRequest(input) 581 req.SetContext(ctx) 582 req.ApplyOptions(opts...) 583 return out, req.Send() 584} 585 586const opCreateDocumentClassifier = "CreateDocumentClassifier" 587 588// CreateDocumentClassifierRequest generates a "aws/request.Request" representing the 589// client's request for the CreateDocumentClassifier operation. The "output" return 590// value will be populated with the request's response once the request completes 591// successfully. 592// 593// Use "Send" method on the returned Request to send the API call to the service. 594// the "output" return value is not valid until after Send returns without error. 595// 596// See CreateDocumentClassifier for more information on using the CreateDocumentClassifier 597// API call, and error handling. 598// 599// This method is useful when you want to inject custom logic or configuration 600// into the SDK's request lifecycle. Such as custom headers, or retry logic. 601// 602// 603// // Example sending a request using the CreateDocumentClassifierRequest method. 604// req, resp := client.CreateDocumentClassifierRequest(params) 605// 606// err := req.Send() 607// if err == nil { // resp is now filled 608// fmt.Println(resp) 609// } 610// 611// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/CreateDocumentClassifier 612func (c *Comprehend) CreateDocumentClassifierRequest(input *CreateDocumentClassifierInput) (req *request.Request, output *CreateDocumentClassifierOutput) { 613 op := &request.Operation{ 614 Name: opCreateDocumentClassifier, 615 HTTPMethod: "POST", 616 HTTPPath: "/", 617 } 618 619 if input == nil { 620 input = &CreateDocumentClassifierInput{} 621 } 622 623 output = &CreateDocumentClassifierOutput{} 624 req = c.newRequest(op, input, output) 625 return 626} 627 628// CreateDocumentClassifier API operation for Amazon Comprehend. 629// 630// Creates a new document classifier that you can use to categorize documents. 631// To create a classifier you provide a set of training documents that labeled 632// with the categories that you want to use. After the classifier is trained 633// you can use it to categorize a set of labeled documents into the categories. 634// For more information, see how-document-classification. 635// 636// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 637// with awserr.Error's Code and Message methods to get detailed information about 638// the error. 639// 640// See the AWS API reference guide for Amazon Comprehend's 641// API operation CreateDocumentClassifier for usage and error information. 642// 643// Returned Error Types: 644// * InvalidRequestException 645// The request is invalid. 646// 647// * ResourceInUseException 648// The specified name is already in use. Use a different name and try your request 649// again. 650// 651// * TooManyTagsException 652// The request contains more tags than can be associated with a resource (50 653// tags per resource). The maximum number of tags includes both existing tags 654// and those included in your current request. 655// 656// * TooManyRequestsException 657// The number of requests exceeds the limit. Resubmit your request later. 658// 659// * ResourceLimitExceededException 660// The maximum number of recognizers per account has been exceeded. Review the 661// recognizers, perform cleanup, and then try your request again. 662// 663// * UnsupportedLanguageException 664// Amazon Comprehend can't process the language of the input text. For all custom 665// entity recognition APIs (such as CreateEntityRecognizer), only English is 666// accepted. For most other APIs, such as those for Custom Classification, Amazon 667// Comprehend accepts text in all supported languages. For a list of supported 668// languages, see supported-languages. 669// 670// * KmsKeyValidationException 671// The KMS customer managed key (CMK) entered cannot be validated. Verify the 672// key and re-enter it. 673// 674// * InternalServerException 675// An internal server error occurred. Retry your request. 676// 677// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/CreateDocumentClassifier 678func (c *Comprehend) CreateDocumentClassifier(input *CreateDocumentClassifierInput) (*CreateDocumentClassifierOutput, error) { 679 req, out := c.CreateDocumentClassifierRequest(input) 680 return out, req.Send() 681} 682 683// CreateDocumentClassifierWithContext is the same as CreateDocumentClassifier with the addition of 684// the ability to pass a context and additional request options. 685// 686// See CreateDocumentClassifier for details on how to use this API operation. 687// 688// The context must be non-nil and will be used for request cancellation. If 689// the context is nil a panic will occur. In the future the SDK may create 690// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 691// for more information on using Contexts. 692func (c *Comprehend) CreateDocumentClassifierWithContext(ctx aws.Context, input *CreateDocumentClassifierInput, opts ...request.Option) (*CreateDocumentClassifierOutput, error) { 693 req, out := c.CreateDocumentClassifierRequest(input) 694 req.SetContext(ctx) 695 req.ApplyOptions(opts...) 696 return out, req.Send() 697} 698 699const opCreateEndpoint = "CreateEndpoint" 700 701// CreateEndpointRequest generates a "aws/request.Request" representing the 702// client's request for the CreateEndpoint operation. The "output" return 703// value will be populated with the request's response once the request completes 704// successfully. 705// 706// Use "Send" method on the returned Request to send the API call to the service. 707// the "output" return value is not valid until after Send returns without error. 708// 709// See CreateEndpoint for more information on using the CreateEndpoint 710// API call, and error handling. 711// 712// This method is useful when you want to inject custom logic or configuration 713// into the SDK's request lifecycle. Such as custom headers, or retry logic. 714// 715// 716// // Example sending a request using the CreateEndpointRequest method. 717// req, resp := client.CreateEndpointRequest(params) 718// 719// err := req.Send() 720// if err == nil { // resp is now filled 721// fmt.Println(resp) 722// } 723// 724// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/CreateEndpoint 725func (c *Comprehend) CreateEndpointRequest(input *CreateEndpointInput) (req *request.Request, output *CreateEndpointOutput) { 726 op := &request.Operation{ 727 Name: opCreateEndpoint, 728 HTTPMethod: "POST", 729 HTTPPath: "/", 730 } 731 732 if input == nil { 733 input = &CreateEndpointInput{} 734 } 735 736 output = &CreateEndpointOutput{} 737 req = c.newRequest(op, input, output) 738 return 739} 740 741// CreateEndpoint API operation for Amazon Comprehend. 742// 743// Creates a model-specific endpoint for synchronous inference for a previously 744// trained custom model 745// 746// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 747// with awserr.Error's Code and Message methods to get detailed information about 748// the error. 749// 750// See the AWS API reference guide for Amazon Comprehend's 751// API operation CreateEndpoint for usage and error information. 752// 753// Returned Error Types: 754// * InvalidRequestException 755// The request is invalid. 756// 757// * ResourceInUseException 758// The specified name is already in use. Use a different name and try your request 759// again. 760// 761// * ResourceLimitExceededException 762// The maximum number of recognizers per account has been exceeded. Review the 763// recognizers, perform cleanup, and then try your request again. 764// 765// * ResourceNotFoundException 766// The specified resource ARN was not found. Check the ARN and try your request 767// again. 768// 769// * ResourceUnavailableException 770// The specified resource is not available. Check to see if the resource is 771// in the TRAINED state and try your request again. 772// 773// * TooManyRequestsException 774// The number of requests exceeds the limit. Resubmit your request later. 775// 776// * TooManyTagsException 777// The request contains more tags than can be associated with a resource (50 778// tags per resource). The maximum number of tags includes both existing tags 779// and those included in your current request. 780// 781// * InternalServerException 782// An internal server error occurred. Retry your request. 783// 784// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/CreateEndpoint 785func (c *Comprehend) CreateEndpoint(input *CreateEndpointInput) (*CreateEndpointOutput, error) { 786 req, out := c.CreateEndpointRequest(input) 787 return out, req.Send() 788} 789 790// CreateEndpointWithContext is the same as CreateEndpoint with the addition of 791// the ability to pass a context and additional request options. 792// 793// See CreateEndpoint for details on how to use this API operation. 794// 795// The context must be non-nil and will be used for request cancellation. If 796// the context is nil a panic will occur. In the future the SDK may create 797// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 798// for more information on using Contexts. 799func (c *Comprehend) CreateEndpointWithContext(ctx aws.Context, input *CreateEndpointInput, opts ...request.Option) (*CreateEndpointOutput, error) { 800 req, out := c.CreateEndpointRequest(input) 801 req.SetContext(ctx) 802 req.ApplyOptions(opts...) 803 return out, req.Send() 804} 805 806const opCreateEntityRecognizer = "CreateEntityRecognizer" 807 808// CreateEntityRecognizerRequest generates a "aws/request.Request" representing the 809// client's request for the CreateEntityRecognizer operation. The "output" return 810// value will be populated with the request's response once the request completes 811// successfully. 812// 813// Use "Send" method on the returned Request to send the API call to the service. 814// the "output" return value is not valid until after Send returns without error. 815// 816// See CreateEntityRecognizer for more information on using the CreateEntityRecognizer 817// API call, and error handling. 818// 819// This method is useful when you want to inject custom logic or configuration 820// into the SDK's request lifecycle. Such as custom headers, or retry logic. 821// 822// 823// // Example sending a request using the CreateEntityRecognizerRequest method. 824// req, resp := client.CreateEntityRecognizerRequest(params) 825// 826// err := req.Send() 827// if err == nil { // resp is now filled 828// fmt.Println(resp) 829// } 830// 831// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/CreateEntityRecognizer 832func (c *Comprehend) CreateEntityRecognizerRequest(input *CreateEntityRecognizerInput) (req *request.Request, output *CreateEntityRecognizerOutput) { 833 op := &request.Operation{ 834 Name: opCreateEntityRecognizer, 835 HTTPMethod: "POST", 836 HTTPPath: "/", 837 } 838 839 if input == nil { 840 input = &CreateEntityRecognizerInput{} 841 } 842 843 output = &CreateEntityRecognizerOutput{} 844 req = c.newRequest(op, input, output) 845 return 846} 847 848// CreateEntityRecognizer API operation for Amazon Comprehend. 849// 850// Creates an entity recognizer using submitted files. After your CreateEntityRecognizer 851// request is submitted, you can check job status using the API. 852// 853// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 854// with awserr.Error's Code and Message methods to get detailed information about 855// the error. 856// 857// See the AWS API reference guide for Amazon Comprehend's 858// API operation CreateEntityRecognizer for usage and error information. 859// 860// Returned Error Types: 861// * InvalidRequestException 862// The request is invalid. 863// 864// * ResourceInUseException 865// The specified name is already in use. Use a different name and try your request 866// again. 867// 868// * TooManyTagsException 869// The request contains more tags than can be associated with a resource (50 870// tags per resource). The maximum number of tags includes both existing tags 871// and those included in your current request. 872// 873// * TooManyRequestsException 874// The number of requests exceeds the limit. Resubmit your request later. 875// 876// * ResourceLimitExceededException 877// The maximum number of recognizers per account has been exceeded. Review the 878// recognizers, perform cleanup, and then try your request again. 879// 880// * UnsupportedLanguageException 881// Amazon Comprehend can't process the language of the input text. For all custom 882// entity recognition APIs (such as CreateEntityRecognizer), only English is 883// accepted. For most other APIs, such as those for Custom Classification, Amazon 884// Comprehend accepts text in all supported languages. For a list of supported 885// languages, see supported-languages. 886// 887// * KmsKeyValidationException 888// The KMS customer managed key (CMK) entered cannot be validated. Verify the 889// key and re-enter it. 890// 891// * InternalServerException 892// An internal server error occurred. Retry your request. 893// 894// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/CreateEntityRecognizer 895func (c *Comprehend) CreateEntityRecognizer(input *CreateEntityRecognizerInput) (*CreateEntityRecognizerOutput, error) { 896 req, out := c.CreateEntityRecognizerRequest(input) 897 return out, req.Send() 898} 899 900// CreateEntityRecognizerWithContext is the same as CreateEntityRecognizer with the addition of 901// the ability to pass a context and additional request options. 902// 903// See CreateEntityRecognizer for details on how to use this API operation. 904// 905// The context must be non-nil and will be used for request cancellation. If 906// the context is nil a panic will occur. In the future the SDK may create 907// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 908// for more information on using Contexts. 909func (c *Comprehend) CreateEntityRecognizerWithContext(ctx aws.Context, input *CreateEntityRecognizerInput, opts ...request.Option) (*CreateEntityRecognizerOutput, error) { 910 req, out := c.CreateEntityRecognizerRequest(input) 911 req.SetContext(ctx) 912 req.ApplyOptions(opts...) 913 return out, req.Send() 914} 915 916const opDeleteDocumentClassifier = "DeleteDocumentClassifier" 917 918// DeleteDocumentClassifierRequest generates a "aws/request.Request" representing the 919// client's request for the DeleteDocumentClassifier operation. The "output" return 920// value will be populated with the request's response once the request completes 921// successfully. 922// 923// Use "Send" method on the returned Request to send the API call to the service. 924// the "output" return value is not valid until after Send returns without error. 925// 926// See DeleteDocumentClassifier for more information on using the DeleteDocumentClassifier 927// API call, and error handling. 928// 929// This method is useful when you want to inject custom logic or configuration 930// into the SDK's request lifecycle. Such as custom headers, or retry logic. 931// 932// 933// // Example sending a request using the DeleteDocumentClassifierRequest method. 934// req, resp := client.DeleteDocumentClassifierRequest(params) 935// 936// err := req.Send() 937// if err == nil { // resp is now filled 938// fmt.Println(resp) 939// } 940// 941// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DeleteDocumentClassifier 942func (c *Comprehend) DeleteDocumentClassifierRequest(input *DeleteDocumentClassifierInput) (req *request.Request, output *DeleteDocumentClassifierOutput) { 943 op := &request.Operation{ 944 Name: opDeleteDocumentClassifier, 945 HTTPMethod: "POST", 946 HTTPPath: "/", 947 } 948 949 if input == nil { 950 input = &DeleteDocumentClassifierInput{} 951 } 952 953 output = &DeleteDocumentClassifierOutput{} 954 req = c.newRequest(op, input, output) 955 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 956 return 957} 958 959// DeleteDocumentClassifier API operation for Amazon Comprehend. 960// 961// Deletes a previously created document classifier 962// 963// Only those classifiers that are in terminated states (IN_ERROR, TRAINED) 964// will be deleted. If an active inference job is using the model, a ResourceInUseException 965// will be returned. 966// 967// This is an asynchronous action that puts the classifier into a DELETING state, 968// and it is then removed by a background job. Once removed, the classifier 969// disappears from your account and is no longer available for use. 970// 971// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 972// with awserr.Error's Code and Message methods to get detailed information about 973// the error. 974// 975// See the AWS API reference guide for Amazon Comprehend's 976// API operation DeleteDocumentClassifier for usage and error information. 977// 978// Returned Error Types: 979// * InvalidRequestException 980// The request is invalid. 981// 982// * TooManyRequestsException 983// The number of requests exceeds the limit. Resubmit your request later. 984// 985// * ResourceNotFoundException 986// The specified resource ARN was not found. Check the ARN and try your request 987// again. 988// 989// * ResourceUnavailableException 990// The specified resource is not available. Check to see if the resource is 991// in the TRAINED state and try your request again. 992// 993// * ResourceInUseException 994// The specified name is already in use. Use a different name and try your request 995// again. 996// 997// * InternalServerException 998// An internal server error occurred. Retry your request. 999// 1000// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DeleteDocumentClassifier 1001func (c *Comprehend) DeleteDocumentClassifier(input *DeleteDocumentClassifierInput) (*DeleteDocumentClassifierOutput, error) { 1002 req, out := c.DeleteDocumentClassifierRequest(input) 1003 return out, req.Send() 1004} 1005 1006// DeleteDocumentClassifierWithContext is the same as DeleteDocumentClassifier with the addition of 1007// the ability to pass a context and additional request options. 1008// 1009// See DeleteDocumentClassifier for details on how to use this API operation. 1010// 1011// The context must be non-nil and will be used for request cancellation. If 1012// the context is nil a panic will occur. In the future the SDK may create 1013// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1014// for more information on using Contexts. 1015func (c *Comprehend) DeleteDocumentClassifierWithContext(ctx aws.Context, input *DeleteDocumentClassifierInput, opts ...request.Option) (*DeleteDocumentClassifierOutput, error) { 1016 req, out := c.DeleteDocumentClassifierRequest(input) 1017 req.SetContext(ctx) 1018 req.ApplyOptions(opts...) 1019 return out, req.Send() 1020} 1021 1022const opDeleteEndpoint = "DeleteEndpoint" 1023 1024// DeleteEndpointRequest generates a "aws/request.Request" representing the 1025// client's request for the DeleteEndpoint operation. The "output" return 1026// value will be populated with the request's response once the request completes 1027// successfully. 1028// 1029// Use "Send" method on the returned Request to send the API call to the service. 1030// the "output" return value is not valid until after Send returns without error. 1031// 1032// See DeleteEndpoint for more information on using the DeleteEndpoint 1033// API call, and error handling. 1034// 1035// This method is useful when you want to inject custom logic or configuration 1036// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1037// 1038// 1039// // Example sending a request using the DeleteEndpointRequest method. 1040// req, resp := client.DeleteEndpointRequest(params) 1041// 1042// err := req.Send() 1043// if err == nil { // resp is now filled 1044// fmt.Println(resp) 1045// } 1046// 1047// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DeleteEndpoint 1048func (c *Comprehend) DeleteEndpointRequest(input *DeleteEndpointInput) (req *request.Request, output *DeleteEndpointOutput) { 1049 op := &request.Operation{ 1050 Name: opDeleteEndpoint, 1051 HTTPMethod: "POST", 1052 HTTPPath: "/", 1053 } 1054 1055 if input == nil { 1056 input = &DeleteEndpointInput{} 1057 } 1058 1059 output = &DeleteEndpointOutput{} 1060 req = c.newRequest(op, input, output) 1061 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1062 return 1063} 1064 1065// DeleteEndpoint API operation for Amazon Comprehend. 1066// 1067// Deletes a model-specific endpoint for a previously-trained custom model. 1068// All endpoints must be deleted in order for the model to be deleted. 1069// 1070// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1071// with awserr.Error's Code and Message methods to get detailed information about 1072// the error. 1073// 1074// See the AWS API reference guide for Amazon Comprehend's 1075// API operation DeleteEndpoint for usage and error information. 1076// 1077// Returned Error Types: 1078// * InvalidRequestException 1079// The request is invalid. 1080// 1081// * ResourceInUseException 1082// The specified name is already in use. Use a different name and try your request 1083// again. 1084// 1085// * ResourceNotFoundException 1086// The specified resource ARN was not found. Check the ARN and try your request 1087// again. 1088// 1089// * TooManyRequestsException 1090// The number of requests exceeds the limit. Resubmit your request later. 1091// 1092// * InternalServerException 1093// An internal server error occurred. Retry your request. 1094// 1095// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DeleteEndpoint 1096func (c *Comprehend) DeleteEndpoint(input *DeleteEndpointInput) (*DeleteEndpointOutput, error) { 1097 req, out := c.DeleteEndpointRequest(input) 1098 return out, req.Send() 1099} 1100 1101// DeleteEndpointWithContext is the same as DeleteEndpoint with the addition of 1102// the ability to pass a context and additional request options. 1103// 1104// See DeleteEndpoint for details on how to use this API operation. 1105// 1106// The context must be non-nil and will be used for request cancellation. If 1107// the context is nil a panic will occur. In the future the SDK may create 1108// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1109// for more information on using Contexts. 1110func (c *Comprehend) DeleteEndpointWithContext(ctx aws.Context, input *DeleteEndpointInput, opts ...request.Option) (*DeleteEndpointOutput, error) { 1111 req, out := c.DeleteEndpointRequest(input) 1112 req.SetContext(ctx) 1113 req.ApplyOptions(opts...) 1114 return out, req.Send() 1115} 1116 1117const opDeleteEntityRecognizer = "DeleteEntityRecognizer" 1118 1119// DeleteEntityRecognizerRequest generates a "aws/request.Request" representing the 1120// client's request for the DeleteEntityRecognizer operation. The "output" return 1121// value will be populated with the request's response once the request completes 1122// successfully. 1123// 1124// Use "Send" method on the returned Request to send the API call to the service. 1125// the "output" return value is not valid until after Send returns without error. 1126// 1127// See DeleteEntityRecognizer for more information on using the DeleteEntityRecognizer 1128// API call, and error handling. 1129// 1130// This method is useful when you want to inject custom logic or configuration 1131// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1132// 1133// 1134// // Example sending a request using the DeleteEntityRecognizerRequest method. 1135// req, resp := client.DeleteEntityRecognizerRequest(params) 1136// 1137// err := req.Send() 1138// if err == nil { // resp is now filled 1139// fmt.Println(resp) 1140// } 1141// 1142// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DeleteEntityRecognizer 1143func (c *Comprehend) DeleteEntityRecognizerRequest(input *DeleteEntityRecognizerInput) (req *request.Request, output *DeleteEntityRecognizerOutput) { 1144 op := &request.Operation{ 1145 Name: opDeleteEntityRecognizer, 1146 HTTPMethod: "POST", 1147 HTTPPath: "/", 1148 } 1149 1150 if input == nil { 1151 input = &DeleteEntityRecognizerInput{} 1152 } 1153 1154 output = &DeleteEntityRecognizerOutput{} 1155 req = c.newRequest(op, input, output) 1156 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1157 return 1158} 1159 1160// DeleteEntityRecognizer API operation for Amazon Comprehend. 1161// 1162// Deletes an entity recognizer. 1163// 1164// Only those recognizers that are in terminated states (IN_ERROR, TRAINED) 1165// will be deleted. If an active inference job is using the model, a ResourceInUseException 1166// will be returned. 1167// 1168// This is an asynchronous action that puts the recognizer into a DELETING state, 1169// and it is then removed by a background job. Once removed, the recognizer 1170// disappears from your account and is no longer available for use. 1171// 1172// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1173// with awserr.Error's Code and Message methods to get detailed information about 1174// the error. 1175// 1176// See the AWS API reference guide for Amazon Comprehend's 1177// API operation DeleteEntityRecognizer for usage and error information. 1178// 1179// Returned Error Types: 1180// * InvalidRequestException 1181// The request is invalid. 1182// 1183// * TooManyRequestsException 1184// The number of requests exceeds the limit. Resubmit your request later. 1185// 1186// * ResourceNotFoundException 1187// The specified resource ARN was not found. Check the ARN and try your request 1188// again. 1189// 1190// * ResourceUnavailableException 1191// The specified resource is not available. Check to see if the resource is 1192// in the TRAINED state and try your request again. 1193// 1194// * ResourceInUseException 1195// The specified name is already in use. Use a different name and try your request 1196// again. 1197// 1198// * InternalServerException 1199// An internal server error occurred. Retry your request. 1200// 1201// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DeleteEntityRecognizer 1202func (c *Comprehend) DeleteEntityRecognizer(input *DeleteEntityRecognizerInput) (*DeleteEntityRecognizerOutput, error) { 1203 req, out := c.DeleteEntityRecognizerRequest(input) 1204 return out, req.Send() 1205} 1206 1207// DeleteEntityRecognizerWithContext is the same as DeleteEntityRecognizer with the addition of 1208// the ability to pass a context and additional request options. 1209// 1210// See DeleteEntityRecognizer for details on how to use this API operation. 1211// 1212// The context must be non-nil and will be used for request cancellation. If 1213// the context is nil a panic will occur. In the future the SDK may create 1214// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1215// for more information on using Contexts. 1216func (c *Comprehend) DeleteEntityRecognizerWithContext(ctx aws.Context, input *DeleteEntityRecognizerInput, opts ...request.Option) (*DeleteEntityRecognizerOutput, error) { 1217 req, out := c.DeleteEntityRecognizerRequest(input) 1218 req.SetContext(ctx) 1219 req.ApplyOptions(opts...) 1220 return out, req.Send() 1221} 1222 1223const opDescribeDocumentClassificationJob = "DescribeDocumentClassificationJob" 1224 1225// DescribeDocumentClassificationJobRequest generates a "aws/request.Request" representing the 1226// client's request for the DescribeDocumentClassificationJob operation. The "output" return 1227// value will be populated with the request's response once the request completes 1228// successfully. 1229// 1230// Use "Send" method on the returned Request to send the API call to the service. 1231// the "output" return value is not valid until after Send returns without error. 1232// 1233// See DescribeDocumentClassificationJob for more information on using the DescribeDocumentClassificationJob 1234// API call, and error handling. 1235// 1236// This method is useful when you want to inject custom logic or configuration 1237// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1238// 1239// 1240// // Example sending a request using the DescribeDocumentClassificationJobRequest method. 1241// req, resp := client.DescribeDocumentClassificationJobRequest(params) 1242// 1243// err := req.Send() 1244// if err == nil { // resp is now filled 1245// fmt.Println(resp) 1246// } 1247// 1248// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeDocumentClassificationJob 1249func (c *Comprehend) DescribeDocumentClassificationJobRequest(input *DescribeDocumentClassificationJobInput) (req *request.Request, output *DescribeDocumentClassificationJobOutput) { 1250 op := &request.Operation{ 1251 Name: opDescribeDocumentClassificationJob, 1252 HTTPMethod: "POST", 1253 HTTPPath: "/", 1254 } 1255 1256 if input == nil { 1257 input = &DescribeDocumentClassificationJobInput{} 1258 } 1259 1260 output = &DescribeDocumentClassificationJobOutput{} 1261 req = c.newRequest(op, input, output) 1262 return 1263} 1264 1265// DescribeDocumentClassificationJob API operation for Amazon Comprehend. 1266// 1267// Gets the properties associated with a document classification job. Use this 1268// operation to get the status of a classification job. 1269// 1270// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1271// with awserr.Error's Code and Message methods to get detailed information about 1272// the error. 1273// 1274// See the AWS API reference guide for Amazon Comprehend's 1275// API operation DescribeDocumentClassificationJob for usage and error information. 1276// 1277// Returned Error Types: 1278// * InvalidRequestException 1279// The request is invalid. 1280// 1281// * TooManyRequestsException 1282// The number of requests exceeds the limit. Resubmit your request later. 1283// 1284// * JobNotFoundException 1285// The specified job was not found. Check the job ID and try again. 1286// 1287// * InternalServerException 1288// An internal server error occurred. Retry your request. 1289// 1290// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeDocumentClassificationJob 1291func (c *Comprehend) DescribeDocumentClassificationJob(input *DescribeDocumentClassificationJobInput) (*DescribeDocumentClassificationJobOutput, error) { 1292 req, out := c.DescribeDocumentClassificationJobRequest(input) 1293 return out, req.Send() 1294} 1295 1296// DescribeDocumentClassificationJobWithContext is the same as DescribeDocumentClassificationJob with the addition of 1297// the ability to pass a context and additional request options. 1298// 1299// See DescribeDocumentClassificationJob for details on how to use this API operation. 1300// 1301// The context must be non-nil and will be used for request cancellation. If 1302// the context is nil a panic will occur. In the future the SDK may create 1303// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1304// for more information on using Contexts. 1305func (c *Comprehend) DescribeDocumentClassificationJobWithContext(ctx aws.Context, input *DescribeDocumentClassificationJobInput, opts ...request.Option) (*DescribeDocumentClassificationJobOutput, error) { 1306 req, out := c.DescribeDocumentClassificationJobRequest(input) 1307 req.SetContext(ctx) 1308 req.ApplyOptions(opts...) 1309 return out, req.Send() 1310} 1311 1312const opDescribeDocumentClassifier = "DescribeDocumentClassifier" 1313 1314// DescribeDocumentClassifierRequest generates a "aws/request.Request" representing the 1315// client's request for the DescribeDocumentClassifier operation. The "output" return 1316// value will be populated with the request's response once the request completes 1317// successfully. 1318// 1319// Use "Send" method on the returned Request to send the API call to the service. 1320// the "output" return value is not valid until after Send returns without error. 1321// 1322// See DescribeDocumentClassifier for more information on using the DescribeDocumentClassifier 1323// API call, and error handling. 1324// 1325// This method is useful when you want to inject custom logic or configuration 1326// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1327// 1328// 1329// // Example sending a request using the DescribeDocumentClassifierRequest method. 1330// req, resp := client.DescribeDocumentClassifierRequest(params) 1331// 1332// err := req.Send() 1333// if err == nil { // resp is now filled 1334// fmt.Println(resp) 1335// } 1336// 1337// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeDocumentClassifier 1338func (c *Comprehend) DescribeDocumentClassifierRequest(input *DescribeDocumentClassifierInput) (req *request.Request, output *DescribeDocumentClassifierOutput) { 1339 op := &request.Operation{ 1340 Name: opDescribeDocumentClassifier, 1341 HTTPMethod: "POST", 1342 HTTPPath: "/", 1343 } 1344 1345 if input == nil { 1346 input = &DescribeDocumentClassifierInput{} 1347 } 1348 1349 output = &DescribeDocumentClassifierOutput{} 1350 req = c.newRequest(op, input, output) 1351 return 1352} 1353 1354// DescribeDocumentClassifier API operation for Amazon Comprehend. 1355// 1356// Gets the properties associated with a document classifier. 1357// 1358// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1359// with awserr.Error's Code and Message methods to get detailed information about 1360// the error. 1361// 1362// See the AWS API reference guide for Amazon Comprehend's 1363// API operation DescribeDocumentClassifier for usage and error information. 1364// 1365// Returned Error Types: 1366// * InvalidRequestException 1367// The request is invalid. 1368// 1369// * TooManyRequestsException 1370// The number of requests exceeds the limit. Resubmit your request later. 1371// 1372// * ResourceNotFoundException 1373// The specified resource ARN was not found. Check the ARN and try your request 1374// again. 1375// 1376// * InternalServerException 1377// An internal server error occurred. Retry your request. 1378// 1379// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeDocumentClassifier 1380func (c *Comprehend) DescribeDocumentClassifier(input *DescribeDocumentClassifierInput) (*DescribeDocumentClassifierOutput, error) { 1381 req, out := c.DescribeDocumentClassifierRequest(input) 1382 return out, req.Send() 1383} 1384 1385// DescribeDocumentClassifierWithContext is the same as DescribeDocumentClassifier with the addition of 1386// the ability to pass a context and additional request options. 1387// 1388// See DescribeDocumentClassifier for details on how to use this API operation. 1389// 1390// The context must be non-nil and will be used for request cancellation. If 1391// the context is nil a panic will occur. In the future the SDK may create 1392// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1393// for more information on using Contexts. 1394func (c *Comprehend) DescribeDocumentClassifierWithContext(ctx aws.Context, input *DescribeDocumentClassifierInput, opts ...request.Option) (*DescribeDocumentClassifierOutput, error) { 1395 req, out := c.DescribeDocumentClassifierRequest(input) 1396 req.SetContext(ctx) 1397 req.ApplyOptions(opts...) 1398 return out, req.Send() 1399} 1400 1401const opDescribeDominantLanguageDetectionJob = "DescribeDominantLanguageDetectionJob" 1402 1403// DescribeDominantLanguageDetectionJobRequest generates a "aws/request.Request" representing the 1404// client's request for the DescribeDominantLanguageDetectionJob operation. The "output" return 1405// value will be populated with the request's response once the request completes 1406// successfully. 1407// 1408// Use "Send" method on the returned Request to send the API call to the service. 1409// the "output" return value is not valid until after Send returns without error. 1410// 1411// See DescribeDominantLanguageDetectionJob for more information on using the DescribeDominantLanguageDetectionJob 1412// API call, and error handling. 1413// 1414// This method is useful when you want to inject custom logic or configuration 1415// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1416// 1417// 1418// // Example sending a request using the DescribeDominantLanguageDetectionJobRequest method. 1419// req, resp := client.DescribeDominantLanguageDetectionJobRequest(params) 1420// 1421// err := req.Send() 1422// if err == nil { // resp is now filled 1423// fmt.Println(resp) 1424// } 1425// 1426// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeDominantLanguageDetectionJob 1427func (c *Comprehend) DescribeDominantLanguageDetectionJobRequest(input *DescribeDominantLanguageDetectionJobInput) (req *request.Request, output *DescribeDominantLanguageDetectionJobOutput) { 1428 op := &request.Operation{ 1429 Name: opDescribeDominantLanguageDetectionJob, 1430 HTTPMethod: "POST", 1431 HTTPPath: "/", 1432 } 1433 1434 if input == nil { 1435 input = &DescribeDominantLanguageDetectionJobInput{} 1436 } 1437 1438 output = &DescribeDominantLanguageDetectionJobOutput{} 1439 req = c.newRequest(op, input, output) 1440 return 1441} 1442 1443// DescribeDominantLanguageDetectionJob API operation for Amazon Comprehend. 1444// 1445// Gets the properties associated with a dominant language detection job. Use 1446// this operation to get the status of a detection job. 1447// 1448// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1449// with awserr.Error's Code and Message methods to get detailed information about 1450// the error. 1451// 1452// See the AWS API reference guide for Amazon Comprehend's 1453// API operation DescribeDominantLanguageDetectionJob for usage and error information. 1454// 1455// Returned Error Types: 1456// * InvalidRequestException 1457// The request is invalid. 1458// 1459// * JobNotFoundException 1460// The specified job was not found. Check the job ID and try again. 1461// 1462// * TooManyRequestsException 1463// The number of requests exceeds the limit. Resubmit your request later. 1464// 1465// * InternalServerException 1466// An internal server error occurred. Retry your request. 1467// 1468// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeDominantLanguageDetectionJob 1469func (c *Comprehend) DescribeDominantLanguageDetectionJob(input *DescribeDominantLanguageDetectionJobInput) (*DescribeDominantLanguageDetectionJobOutput, error) { 1470 req, out := c.DescribeDominantLanguageDetectionJobRequest(input) 1471 return out, req.Send() 1472} 1473 1474// DescribeDominantLanguageDetectionJobWithContext is the same as DescribeDominantLanguageDetectionJob with the addition of 1475// the ability to pass a context and additional request options. 1476// 1477// See DescribeDominantLanguageDetectionJob for details on how to use this API operation. 1478// 1479// The context must be non-nil and will be used for request cancellation. If 1480// the context is nil a panic will occur. In the future the SDK may create 1481// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1482// for more information on using Contexts. 1483func (c *Comprehend) DescribeDominantLanguageDetectionJobWithContext(ctx aws.Context, input *DescribeDominantLanguageDetectionJobInput, opts ...request.Option) (*DescribeDominantLanguageDetectionJobOutput, error) { 1484 req, out := c.DescribeDominantLanguageDetectionJobRequest(input) 1485 req.SetContext(ctx) 1486 req.ApplyOptions(opts...) 1487 return out, req.Send() 1488} 1489 1490const opDescribeEndpoint = "DescribeEndpoint" 1491 1492// DescribeEndpointRequest generates a "aws/request.Request" representing the 1493// client's request for the DescribeEndpoint operation. The "output" return 1494// value will be populated with the request's response once the request completes 1495// successfully. 1496// 1497// Use "Send" method on the returned Request to send the API call to the service. 1498// the "output" return value is not valid until after Send returns without error. 1499// 1500// See DescribeEndpoint for more information on using the DescribeEndpoint 1501// API call, and error handling. 1502// 1503// This method is useful when you want to inject custom logic or configuration 1504// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1505// 1506// 1507// // Example sending a request using the DescribeEndpointRequest method. 1508// req, resp := client.DescribeEndpointRequest(params) 1509// 1510// err := req.Send() 1511// if err == nil { // resp is now filled 1512// fmt.Println(resp) 1513// } 1514// 1515// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeEndpoint 1516func (c *Comprehend) DescribeEndpointRequest(input *DescribeEndpointInput) (req *request.Request, output *DescribeEndpointOutput) { 1517 op := &request.Operation{ 1518 Name: opDescribeEndpoint, 1519 HTTPMethod: "POST", 1520 HTTPPath: "/", 1521 } 1522 1523 if input == nil { 1524 input = &DescribeEndpointInput{} 1525 } 1526 1527 output = &DescribeEndpointOutput{} 1528 req = c.newRequest(op, input, output) 1529 return 1530} 1531 1532// DescribeEndpoint API operation for Amazon Comprehend. 1533// 1534// Gets the properties associated with a specific endpoint. Use this operation 1535// to get the status of an endpoint. 1536// 1537// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1538// with awserr.Error's Code and Message methods to get detailed information about 1539// the error. 1540// 1541// See the AWS API reference guide for Amazon Comprehend's 1542// API operation DescribeEndpoint for usage and error information. 1543// 1544// Returned Error Types: 1545// * InvalidRequestException 1546// The request is invalid. 1547// 1548// * TooManyRequestsException 1549// The number of requests exceeds the limit. Resubmit your request later. 1550// 1551// * ResourceNotFoundException 1552// The specified resource ARN was not found. Check the ARN and try your request 1553// again. 1554// 1555// * InternalServerException 1556// An internal server error occurred. Retry your request. 1557// 1558// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeEndpoint 1559func (c *Comprehend) DescribeEndpoint(input *DescribeEndpointInput) (*DescribeEndpointOutput, error) { 1560 req, out := c.DescribeEndpointRequest(input) 1561 return out, req.Send() 1562} 1563 1564// DescribeEndpointWithContext is the same as DescribeEndpoint with the addition of 1565// the ability to pass a context and additional request options. 1566// 1567// See DescribeEndpoint for details on how to use this API operation. 1568// 1569// The context must be non-nil and will be used for request cancellation. If 1570// the context is nil a panic will occur. In the future the SDK may create 1571// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1572// for more information on using Contexts. 1573func (c *Comprehend) DescribeEndpointWithContext(ctx aws.Context, input *DescribeEndpointInput, opts ...request.Option) (*DescribeEndpointOutput, error) { 1574 req, out := c.DescribeEndpointRequest(input) 1575 req.SetContext(ctx) 1576 req.ApplyOptions(opts...) 1577 return out, req.Send() 1578} 1579 1580const opDescribeEntitiesDetectionJob = "DescribeEntitiesDetectionJob" 1581 1582// DescribeEntitiesDetectionJobRequest generates a "aws/request.Request" representing the 1583// client's request for the DescribeEntitiesDetectionJob operation. The "output" return 1584// value will be populated with the request's response once the request completes 1585// successfully. 1586// 1587// Use "Send" method on the returned Request to send the API call to the service. 1588// the "output" return value is not valid until after Send returns without error. 1589// 1590// See DescribeEntitiesDetectionJob for more information on using the DescribeEntitiesDetectionJob 1591// API call, and error handling. 1592// 1593// This method is useful when you want to inject custom logic or configuration 1594// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1595// 1596// 1597// // Example sending a request using the DescribeEntitiesDetectionJobRequest method. 1598// req, resp := client.DescribeEntitiesDetectionJobRequest(params) 1599// 1600// err := req.Send() 1601// if err == nil { // resp is now filled 1602// fmt.Println(resp) 1603// } 1604// 1605// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeEntitiesDetectionJob 1606func (c *Comprehend) DescribeEntitiesDetectionJobRequest(input *DescribeEntitiesDetectionJobInput) (req *request.Request, output *DescribeEntitiesDetectionJobOutput) { 1607 op := &request.Operation{ 1608 Name: opDescribeEntitiesDetectionJob, 1609 HTTPMethod: "POST", 1610 HTTPPath: "/", 1611 } 1612 1613 if input == nil { 1614 input = &DescribeEntitiesDetectionJobInput{} 1615 } 1616 1617 output = &DescribeEntitiesDetectionJobOutput{} 1618 req = c.newRequest(op, input, output) 1619 return 1620} 1621 1622// DescribeEntitiesDetectionJob API operation for Amazon Comprehend. 1623// 1624// Gets the properties associated with an entities detection job. Use this operation 1625// to get the status of a detection job. 1626// 1627// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1628// with awserr.Error's Code and Message methods to get detailed information about 1629// the error. 1630// 1631// See the AWS API reference guide for Amazon Comprehend's 1632// API operation DescribeEntitiesDetectionJob for usage and error information. 1633// 1634// Returned Error Types: 1635// * InvalidRequestException 1636// The request is invalid. 1637// 1638// * JobNotFoundException 1639// The specified job was not found. Check the job ID and try again. 1640// 1641// * TooManyRequestsException 1642// The number of requests exceeds the limit. Resubmit your request later. 1643// 1644// * InternalServerException 1645// An internal server error occurred. Retry your request. 1646// 1647// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeEntitiesDetectionJob 1648func (c *Comprehend) DescribeEntitiesDetectionJob(input *DescribeEntitiesDetectionJobInput) (*DescribeEntitiesDetectionJobOutput, error) { 1649 req, out := c.DescribeEntitiesDetectionJobRequest(input) 1650 return out, req.Send() 1651} 1652 1653// DescribeEntitiesDetectionJobWithContext is the same as DescribeEntitiesDetectionJob with the addition of 1654// the ability to pass a context and additional request options. 1655// 1656// See DescribeEntitiesDetectionJob for details on how to use this API operation. 1657// 1658// The context must be non-nil and will be used for request cancellation. If 1659// the context is nil a panic will occur. In the future the SDK may create 1660// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1661// for more information on using Contexts. 1662func (c *Comprehend) DescribeEntitiesDetectionJobWithContext(ctx aws.Context, input *DescribeEntitiesDetectionJobInput, opts ...request.Option) (*DescribeEntitiesDetectionJobOutput, error) { 1663 req, out := c.DescribeEntitiesDetectionJobRequest(input) 1664 req.SetContext(ctx) 1665 req.ApplyOptions(opts...) 1666 return out, req.Send() 1667} 1668 1669const opDescribeEntityRecognizer = "DescribeEntityRecognizer" 1670 1671// DescribeEntityRecognizerRequest generates a "aws/request.Request" representing the 1672// client's request for the DescribeEntityRecognizer operation. The "output" return 1673// value will be populated with the request's response once the request completes 1674// successfully. 1675// 1676// Use "Send" method on the returned Request to send the API call to the service. 1677// the "output" return value is not valid until after Send returns without error. 1678// 1679// See DescribeEntityRecognizer for more information on using the DescribeEntityRecognizer 1680// API call, and error handling. 1681// 1682// This method is useful when you want to inject custom logic or configuration 1683// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1684// 1685// 1686// // Example sending a request using the DescribeEntityRecognizerRequest method. 1687// req, resp := client.DescribeEntityRecognizerRequest(params) 1688// 1689// err := req.Send() 1690// if err == nil { // resp is now filled 1691// fmt.Println(resp) 1692// } 1693// 1694// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeEntityRecognizer 1695func (c *Comprehend) DescribeEntityRecognizerRequest(input *DescribeEntityRecognizerInput) (req *request.Request, output *DescribeEntityRecognizerOutput) { 1696 op := &request.Operation{ 1697 Name: opDescribeEntityRecognizer, 1698 HTTPMethod: "POST", 1699 HTTPPath: "/", 1700 } 1701 1702 if input == nil { 1703 input = &DescribeEntityRecognizerInput{} 1704 } 1705 1706 output = &DescribeEntityRecognizerOutput{} 1707 req = c.newRequest(op, input, output) 1708 return 1709} 1710 1711// DescribeEntityRecognizer API operation for Amazon Comprehend. 1712// 1713// Provides details about an entity recognizer including status, S3 buckets 1714// containing training data, recognizer metadata, metrics, and so on. 1715// 1716// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1717// with awserr.Error's Code and Message methods to get detailed information about 1718// the error. 1719// 1720// See the AWS API reference guide for Amazon Comprehend's 1721// API operation DescribeEntityRecognizer for usage and error information. 1722// 1723// Returned Error Types: 1724// * InvalidRequestException 1725// The request is invalid. 1726// 1727// * TooManyRequestsException 1728// The number of requests exceeds the limit. Resubmit your request later. 1729// 1730// * ResourceNotFoundException 1731// The specified resource ARN was not found. Check the ARN and try your request 1732// again. 1733// 1734// * InternalServerException 1735// An internal server error occurred. Retry your request. 1736// 1737// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeEntityRecognizer 1738func (c *Comprehend) DescribeEntityRecognizer(input *DescribeEntityRecognizerInput) (*DescribeEntityRecognizerOutput, error) { 1739 req, out := c.DescribeEntityRecognizerRequest(input) 1740 return out, req.Send() 1741} 1742 1743// DescribeEntityRecognizerWithContext is the same as DescribeEntityRecognizer with the addition of 1744// the ability to pass a context and additional request options. 1745// 1746// See DescribeEntityRecognizer for details on how to use this API operation. 1747// 1748// The context must be non-nil and will be used for request cancellation. If 1749// the context is nil a panic will occur. In the future the SDK may create 1750// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1751// for more information on using Contexts. 1752func (c *Comprehend) DescribeEntityRecognizerWithContext(ctx aws.Context, input *DescribeEntityRecognizerInput, opts ...request.Option) (*DescribeEntityRecognizerOutput, error) { 1753 req, out := c.DescribeEntityRecognizerRequest(input) 1754 req.SetContext(ctx) 1755 req.ApplyOptions(opts...) 1756 return out, req.Send() 1757} 1758 1759const opDescribeKeyPhrasesDetectionJob = "DescribeKeyPhrasesDetectionJob" 1760 1761// DescribeKeyPhrasesDetectionJobRequest generates a "aws/request.Request" representing the 1762// client's request for the DescribeKeyPhrasesDetectionJob operation. The "output" return 1763// value will be populated with the request's response once the request completes 1764// successfully. 1765// 1766// Use "Send" method on the returned Request to send the API call to the service. 1767// the "output" return value is not valid until after Send returns without error. 1768// 1769// See DescribeKeyPhrasesDetectionJob for more information on using the DescribeKeyPhrasesDetectionJob 1770// API call, and error handling. 1771// 1772// This method is useful when you want to inject custom logic or configuration 1773// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1774// 1775// 1776// // Example sending a request using the DescribeKeyPhrasesDetectionJobRequest method. 1777// req, resp := client.DescribeKeyPhrasesDetectionJobRequest(params) 1778// 1779// err := req.Send() 1780// if err == nil { // resp is now filled 1781// fmt.Println(resp) 1782// } 1783// 1784// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeKeyPhrasesDetectionJob 1785func (c *Comprehend) DescribeKeyPhrasesDetectionJobRequest(input *DescribeKeyPhrasesDetectionJobInput) (req *request.Request, output *DescribeKeyPhrasesDetectionJobOutput) { 1786 op := &request.Operation{ 1787 Name: opDescribeKeyPhrasesDetectionJob, 1788 HTTPMethod: "POST", 1789 HTTPPath: "/", 1790 } 1791 1792 if input == nil { 1793 input = &DescribeKeyPhrasesDetectionJobInput{} 1794 } 1795 1796 output = &DescribeKeyPhrasesDetectionJobOutput{} 1797 req = c.newRequest(op, input, output) 1798 return 1799} 1800 1801// DescribeKeyPhrasesDetectionJob API operation for Amazon Comprehend. 1802// 1803// Gets the properties associated with a key phrases detection job. Use this 1804// operation to get the status of a detection job. 1805// 1806// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1807// with awserr.Error's Code and Message methods to get detailed information about 1808// the error. 1809// 1810// See the AWS API reference guide for Amazon Comprehend's 1811// API operation DescribeKeyPhrasesDetectionJob for usage and error information. 1812// 1813// Returned Error Types: 1814// * InvalidRequestException 1815// The request is invalid. 1816// 1817// * JobNotFoundException 1818// The specified job was not found. Check the job ID and try again. 1819// 1820// * TooManyRequestsException 1821// The number of requests exceeds the limit. Resubmit your request later. 1822// 1823// * InternalServerException 1824// An internal server error occurred. Retry your request. 1825// 1826// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeKeyPhrasesDetectionJob 1827func (c *Comprehend) DescribeKeyPhrasesDetectionJob(input *DescribeKeyPhrasesDetectionJobInput) (*DescribeKeyPhrasesDetectionJobOutput, error) { 1828 req, out := c.DescribeKeyPhrasesDetectionJobRequest(input) 1829 return out, req.Send() 1830} 1831 1832// DescribeKeyPhrasesDetectionJobWithContext is the same as DescribeKeyPhrasesDetectionJob with the addition of 1833// the ability to pass a context and additional request options. 1834// 1835// See DescribeKeyPhrasesDetectionJob for details on how to use this API operation. 1836// 1837// The context must be non-nil and will be used for request cancellation. If 1838// the context is nil a panic will occur. In the future the SDK may create 1839// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1840// for more information on using Contexts. 1841func (c *Comprehend) DescribeKeyPhrasesDetectionJobWithContext(ctx aws.Context, input *DescribeKeyPhrasesDetectionJobInput, opts ...request.Option) (*DescribeKeyPhrasesDetectionJobOutput, error) { 1842 req, out := c.DescribeKeyPhrasesDetectionJobRequest(input) 1843 req.SetContext(ctx) 1844 req.ApplyOptions(opts...) 1845 return out, req.Send() 1846} 1847 1848const opDescribeSentimentDetectionJob = "DescribeSentimentDetectionJob" 1849 1850// DescribeSentimentDetectionJobRequest generates a "aws/request.Request" representing the 1851// client's request for the DescribeSentimentDetectionJob operation. The "output" return 1852// value will be populated with the request's response once the request completes 1853// successfully. 1854// 1855// Use "Send" method on the returned Request to send the API call to the service. 1856// the "output" return value is not valid until after Send returns without error. 1857// 1858// See DescribeSentimentDetectionJob for more information on using the DescribeSentimentDetectionJob 1859// API call, and error handling. 1860// 1861// This method is useful when you want to inject custom logic or configuration 1862// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1863// 1864// 1865// // Example sending a request using the DescribeSentimentDetectionJobRequest method. 1866// req, resp := client.DescribeSentimentDetectionJobRequest(params) 1867// 1868// err := req.Send() 1869// if err == nil { // resp is now filled 1870// fmt.Println(resp) 1871// } 1872// 1873// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeSentimentDetectionJob 1874func (c *Comprehend) DescribeSentimentDetectionJobRequest(input *DescribeSentimentDetectionJobInput) (req *request.Request, output *DescribeSentimentDetectionJobOutput) { 1875 op := &request.Operation{ 1876 Name: opDescribeSentimentDetectionJob, 1877 HTTPMethod: "POST", 1878 HTTPPath: "/", 1879 } 1880 1881 if input == nil { 1882 input = &DescribeSentimentDetectionJobInput{} 1883 } 1884 1885 output = &DescribeSentimentDetectionJobOutput{} 1886 req = c.newRequest(op, input, output) 1887 return 1888} 1889 1890// DescribeSentimentDetectionJob API operation for Amazon Comprehend. 1891// 1892// Gets the properties associated with a sentiment detection job. Use this operation 1893// to get the status of a detection job. 1894// 1895// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1896// with awserr.Error's Code and Message methods to get detailed information about 1897// the error. 1898// 1899// See the AWS API reference guide for Amazon Comprehend's 1900// API operation DescribeSentimentDetectionJob for usage and error information. 1901// 1902// Returned Error Types: 1903// * InvalidRequestException 1904// The request is invalid. 1905// 1906// * JobNotFoundException 1907// The specified job was not found. Check the job ID and try again. 1908// 1909// * TooManyRequestsException 1910// The number of requests exceeds the limit. Resubmit your request later. 1911// 1912// * InternalServerException 1913// An internal server error occurred. Retry your request. 1914// 1915// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeSentimentDetectionJob 1916func (c *Comprehend) DescribeSentimentDetectionJob(input *DescribeSentimentDetectionJobInput) (*DescribeSentimentDetectionJobOutput, error) { 1917 req, out := c.DescribeSentimentDetectionJobRequest(input) 1918 return out, req.Send() 1919} 1920 1921// DescribeSentimentDetectionJobWithContext is the same as DescribeSentimentDetectionJob with the addition of 1922// the ability to pass a context and additional request options. 1923// 1924// See DescribeSentimentDetectionJob for details on how to use this API operation. 1925// 1926// The context must be non-nil and will be used for request cancellation. If 1927// the context is nil a panic will occur. In the future the SDK may create 1928// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1929// for more information on using Contexts. 1930func (c *Comprehend) DescribeSentimentDetectionJobWithContext(ctx aws.Context, input *DescribeSentimentDetectionJobInput, opts ...request.Option) (*DescribeSentimentDetectionJobOutput, error) { 1931 req, out := c.DescribeSentimentDetectionJobRequest(input) 1932 req.SetContext(ctx) 1933 req.ApplyOptions(opts...) 1934 return out, req.Send() 1935} 1936 1937const opDescribeTopicsDetectionJob = "DescribeTopicsDetectionJob" 1938 1939// DescribeTopicsDetectionJobRequest generates a "aws/request.Request" representing the 1940// client's request for the DescribeTopicsDetectionJob operation. The "output" return 1941// value will be populated with the request's response once the request completes 1942// successfully. 1943// 1944// Use "Send" method on the returned Request to send the API call to the service. 1945// the "output" return value is not valid until after Send returns without error. 1946// 1947// See DescribeTopicsDetectionJob for more information on using the DescribeTopicsDetectionJob 1948// API call, and error handling. 1949// 1950// This method is useful when you want to inject custom logic or configuration 1951// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1952// 1953// 1954// // Example sending a request using the DescribeTopicsDetectionJobRequest method. 1955// req, resp := client.DescribeTopicsDetectionJobRequest(params) 1956// 1957// err := req.Send() 1958// if err == nil { // resp is now filled 1959// fmt.Println(resp) 1960// } 1961// 1962// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeTopicsDetectionJob 1963func (c *Comprehend) DescribeTopicsDetectionJobRequest(input *DescribeTopicsDetectionJobInput) (req *request.Request, output *DescribeTopicsDetectionJobOutput) { 1964 op := &request.Operation{ 1965 Name: opDescribeTopicsDetectionJob, 1966 HTTPMethod: "POST", 1967 HTTPPath: "/", 1968 } 1969 1970 if input == nil { 1971 input = &DescribeTopicsDetectionJobInput{} 1972 } 1973 1974 output = &DescribeTopicsDetectionJobOutput{} 1975 req = c.newRequest(op, input, output) 1976 return 1977} 1978 1979// DescribeTopicsDetectionJob API operation for Amazon Comprehend. 1980// 1981// Gets the properties associated with a topic detection job. Use this operation 1982// to get the status of a detection job. 1983// 1984// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1985// with awserr.Error's Code and Message methods to get detailed information about 1986// the error. 1987// 1988// See the AWS API reference guide for Amazon Comprehend's 1989// API operation DescribeTopicsDetectionJob for usage and error information. 1990// 1991// Returned Error Types: 1992// * InvalidRequestException 1993// The request is invalid. 1994// 1995// * JobNotFoundException 1996// The specified job was not found. Check the job ID and try again. 1997// 1998// * TooManyRequestsException 1999// The number of requests exceeds the limit. Resubmit your request later. 2000// 2001// * InternalServerException 2002// An internal server error occurred. Retry your request. 2003// 2004// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeTopicsDetectionJob 2005func (c *Comprehend) DescribeTopicsDetectionJob(input *DescribeTopicsDetectionJobInput) (*DescribeTopicsDetectionJobOutput, error) { 2006 req, out := c.DescribeTopicsDetectionJobRequest(input) 2007 return out, req.Send() 2008} 2009 2010// DescribeTopicsDetectionJobWithContext is the same as DescribeTopicsDetectionJob with the addition of 2011// the ability to pass a context and additional request options. 2012// 2013// See DescribeTopicsDetectionJob for details on how to use this API operation. 2014// 2015// The context must be non-nil and will be used for request cancellation. If 2016// the context is nil a panic will occur. In the future the SDK may create 2017// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2018// for more information on using Contexts. 2019func (c *Comprehend) DescribeTopicsDetectionJobWithContext(ctx aws.Context, input *DescribeTopicsDetectionJobInput, opts ...request.Option) (*DescribeTopicsDetectionJobOutput, error) { 2020 req, out := c.DescribeTopicsDetectionJobRequest(input) 2021 req.SetContext(ctx) 2022 req.ApplyOptions(opts...) 2023 return out, req.Send() 2024} 2025 2026const opDetectDominantLanguage = "DetectDominantLanguage" 2027 2028// DetectDominantLanguageRequest generates a "aws/request.Request" representing the 2029// client's request for the DetectDominantLanguage operation. The "output" return 2030// value will be populated with the request's response once the request completes 2031// successfully. 2032// 2033// Use "Send" method on the returned Request to send the API call to the service. 2034// the "output" return value is not valid until after Send returns without error. 2035// 2036// See DetectDominantLanguage for more information on using the DetectDominantLanguage 2037// API call, and error handling. 2038// 2039// This method is useful when you want to inject custom logic or configuration 2040// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2041// 2042// 2043// // Example sending a request using the DetectDominantLanguageRequest method. 2044// req, resp := client.DetectDominantLanguageRequest(params) 2045// 2046// err := req.Send() 2047// if err == nil { // resp is now filled 2048// fmt.Println(resp) 2049// } 2050// 2051// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectDominantLanguage 2052func (c *Comprehend) DetectDominantLanguageRequest(input *DetectDominantLanguageInput) (req *request.Request, output *DetectDominantLanguageOutput) { 2053 op := &request.Operation{ 2054 Name: opDetectDominantLanguage, 2055 HTTPMethod: "POST", 2056 HTTPPath: "/", 2057 } 2058 2059 if input == nil { 2060 input = &DetectDominantLanguageInput{} 2061 } 2062 2063 output = &DetectDominantLanguageOutput{} 2064 req = c.newRequest(op, input, output) 2065 return 2066} 2067 2068// DetectDominantLanguage API operation for Amazon Comprehend. 2069// 2070// Determines the dominant language of the input text. For a list of languages 2071// that Amazon Comprehend can detect, see Amazon Comprehend Supported Languages 2072// (https://docs.aws.amazon.com/comprehend/latest/dg/how-languages.html). 2073// 2074// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2075// with awserr.Error's Code and Message methods to get detailed information about 2076// the error. 2077// 2078// See the AWS API reference guide for Amazon Comprehend's 2079// API operation DetectDominantLanguage for usage and error information. 2080// 2081// Returned Error Types: 2082// * InvalidRequestException 2083// The request is invalid. 2084// 2085// * TextSizeLimitExceededException 2086// The size of the input text exceeds the limit. Use a smaller document. 2087// 2088// * InternalServerException 2089// An internal server error occurred. Retry your request. 2090// 2091// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectDominantLanguage 2092func (c *Comprehend) DetectDominantLanguage(input *DetectDominantLanguageInput) (*DetectDominantLanguageOutput, error) { 2093 req, out := c.DetectDominantLanguageRequest(input) 2094 return out, req.Send() 2095} 2096 2097// DetectDominantLanguageWithContext is the same as DetectDominantLanguage with the addition of 2098// the ability to pass a context and additional request options. 2099// 2100// See DetectDominantLanguage for details on how to use this API operation. 2101// 2102// The context must be non-nil and will be used for request cancellation. If 2103// the context is nil a panic will occur. In the future the SDK may create 2104// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2105// for more information on using Contexts. 2106func (c *Comprehend) DetectDominantLanguageWithContext(ctx aws.Context, input *DetectDominantLanguageInput, opts ...request.Option) (*DetectDominantLanguageOutput, error) { 2107 req, out := c.DetectDominantLanguageRequest(input) 2108 req.SetContext(ctx) 2109 req.ApplyOptions(opts...) 2110 return out, req.Send() 2111} 2112 2113const opDetectEntities = "DetectEntities" 2114 2115// DetectEntitiesRequest generates a "aws/request.Request" representing the 2116// client's request for the DetectEntities operation. The "output" return 2117// value will be populated with the request's response once the request completes 2118// successfully. 2119// 2120// Use "Send" method on the returned Request to send the API call to the service. 2121// the "output" return value is not valid until after Send returns without error. 2122// 2123// See DetectEntities for more information on using the DetectEntities 2124// API call, and error handling. 2125// 2126// This method is useful when you want to inject custom logic or configuration 2127// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2128// 2129// 2130// // Example sending a request using the DetectEntitiesRequest method. 2131// req, resp := client.DetectEntitiesRequest(params) 2132// 2133// err := req.Send() 2134// if err == nil { // resp is now filled 2135// fmt.Println(resp) 2136// } 2137// 2138// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectEntities 2139func (c *Comprehend) DetectEntitiesRequest(input *DetectEntitiesInput) (req *request.Request, output *DetectEntitiesOutput) { 2140 op := &request.Operation{ 2141 Name: opDetectEntities, 2142 HTTPMethod: "POST", 2143 HTTPPath: "/", 2144 } 2145 2146 if input == nil { 2147 input = &DetectEntitiesInput{} 2148 } 2149 2150 output = &DetectEntitiesOutput{} 2151 req = c.newRequest(op, input, output) 2152 return 2153} 2154 2155// DetectEntities API operation for Amazon Comprehend. 2156// 2157// Inspects text for named entities, and returns information about them. For 2158// more information, about named entities, see how-entities. 2159// 2160// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2161// with awserr.Error's Code and Message methods to get detailed information about 2162// the error. 2163// 2164// See the AWS API reference guide for Amazon Comprehend's 2165// API operation DetectEntities for usage and error information. 2166// 2167// Returned Error Types: 2168// * InvalidRequestException 2169// The request is invalid. 2170// 2171// * TextSizeLimitExceededException 2172// The size of the input text exceeds the limit. Use a smaller document. 2173// 2174// * UnsupportedLanguageException 2175// Amazon Comprehend can't process the language of the input text. For all custom 2176// entity recognition APIs (such as CreateEntityRecognizer), only English is 2177// accepted. For most other APIs, such as those for Custom Classification, Amazon 2178// Comprehend accepts text in all supported languages. For a list of supported 2179// languages, see supported-languages. 2180// 2181// * InternalServerException 2182// An internal server error occurred. Retry your request. 2183// 2184// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectEntities 2185func (c *Comprehend) DetectEntities(input *DetectEntitiesInput) (*DetectEntitiesOutput, error) { 2186 req, out := c.DetectEntitiesRequest(input) 2187 return out, req.Send() 2188} 2189 2190// DetectEntitiesWithContext is the same as DetectEntities with the addition of 2191// the ability to pass a context and additional request options. 2192// 2193// See DetectEntities for details on how to use this API operation. 2194// 2195// The context must be non-nil and will be used for request cancellation. If 2196// the context is nil a panic will occur. In the future the SDK may create 2197// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2198// for more information on using Contexts. 2199func (c *Comprehend) DetectEntitiesWithContext(ctx aws.Context, input *DetectEntitiesInput, opts ...request.Option) (*DetectEntitiesOutput, error) { 2200 req, out := c.DetectEntitiesRequest(input) 2201 req.SetContext(ctx) 2202 req.ApplyOptions(opts...) 2203 return out, req.Send() 2204} 2205 2206const opDetectKeyPhrases = "DetectKeyPhrases" 2207 2208// DetectKeyPhrasesRequest generates a "aws/request.Request" representing the 2209// client's request for the DetectKeyPhrases operation. The "output" return 2210// value will be populated with the request's response once the request completes 2211// successfully. 2212// 2213// Use "Send" method on the returned Request to send the API call to the service. 2214// the "output" return value is not valid until after Send returns without error. 2215// 2216// See DetectKeyPhrases for more information on using the DetectKeyPhrases 2217// API call, and error handling. 2218// 2219// This method is useful when you want to inject custom logic or configuration 2220// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2221// 2222// 2223// // Example sending a request using the DetectKeyPhrasesRequest method. 2224// req, resp := client.DetectKeyPhrasesRequest(params) 2225// 2226// err := req.Send() 2227// if err == nil { // resp is now filled 2228// fmt.Println(resp) 2229// } 2230// 2231// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectKeyPhrases 2232func (c *Comprehend) DetectKeyPhrasesRequest(input *DetectKeyPhrasesInput) (req *request.Request, output *DetectKeyPhrasesOutput) { 2233 op := &request.Operation{ 2234 Name: opDetectKeyPhrases, 2235 HTTPMethod: "POST", 2236 HTTPPath: "/", 2237 } 2238 2239 if input == nil { 2240 input = &DetectKeyPhrasesInput{} 2241 } 2242 2243 output = &DetectKeyPhrasesOutput{} 2244 req = c.newRequest(op, input, output) 2245 return 2246} 2247 2248// DetectKeyPhrases API operation for Amazon Comprehend. 2249// 2250// Detects the key noun phrases found in the text. 2251// 2252// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2253// with awserr.Error's Code and Message methods to get detailed information about 2254// the error. 2255// 2256// See the AWS API reference guide for Amazon Comprehend's 2257// API operation DetectKeyPhrases for usage and error information. 2258// 2259// Returned Error Types: 2260// * InvalidRequestException 2261// The request is invalid. 2262// 2263// * TextSizeLimitExceededException 2264// The size of the input text exceeds the limit. Use a smaller document. 2265// 2266// * UnsupportedLanguageException 2267// Amazon Comprehend can't process the language of the input text. For all custom 2268// entity recognition APIs (such as CreateEntityRecognizer), only English is 2269// accepted. For most other APIs, such as those for Custom Classification, Amazon 2270// Comprehend accepts text in all supported languages. For a list of supported 2271// languages, see supported-languages. 2272// 2273// * InternalServerException 2274// An internal server error occurred. Retry your request. 2275// 2276// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectKeyPhrases 2277func (c *Comprehend) DetectKeyPhrases(input *DetectKeyPhrasesInput) (*DetectKeyPhrasesOutput, error) { 2278 req, out := c.DetectKeyPhrasesRequest(input) 2279 return out, req.Send() 2280} 2281 2282// DetectKeyPhrasesWithContext is the same as DetectKeyPhrases with the addition of 2283// the ability to pass a context and additional request options. 2284// 2285// See DetectKeyPhrases for details on how to use this API operation. 2286// 2287// The context must be non-nil and will be used for request cancellation. If 2288// the context is nil a panic will occur. In the future the SDK may create 2289// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2290// for more information on using Contexts. 2291func (c *Comprehend) DetectKeyPhrasesWithContext(ctx aws.Context, input *DetectKeyPhrasesInput, opts ...request.Option) (*DetectKeyPhrasesOutput, error) { 2292 req, out := c.DetectKeyPhrasesRequest(input) 2293 req.SetContext(ctx) 2294 req.ApplyOptions(opts...) 2295 return out, req.Send() 2296} 2297 2298const opDetectSentiment = "DetectSentiment" 2299 2300// DetectSentimentRequest generates a "aws/request.Request" representing the 2301// client's request for the DetectSentiment operation. The "output" return 2302// value will be populated with the request's response once the request completes 2303// successfully. 2304// 2305// Use "Send" method on the returned Request to send the API call to the service. 2306// the "output" return value is not valid until after Send returns without error. 2307// 2308// See DetectSentiment for more information on using the DetectSentiment 2309// API call, and error handling. 2310// 2311// This method is useful when you want to inject custom logic or configuration 2312// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2313// 2314// 2315// // Example sending a request using the DetectSentimentRequest method. 2316// req, resp := client.DetectSentimentRequest(params) 2317// 2318// err := req.Send() 2319// if err == nil { // resp is now filled 2320// fmt.Println(resp) 2321// } 2322// 2323// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectSentiment 2324func (c *Comprehend) DetectSentimentRequest(input *DetectSentimentInput) (req *request.Request, output *DetectSentimentOutput) { 2325 op := &request.Operation{ 2326 Name: opDetectSentiment, 2327 HTTPMethod: "POST", 2328 HTTPPath: "/", 2329 } 2330 2331 if input == nil { 2332 input = &DetectSentimentInput{} 2333 } 2334 2335 output = &DetectSentimentOutput{} 2336 req = c.newRequest(op, input, output) 2337 return 2338} 2339 2340// DetectSentiment API operation for Amazon Comprehend. 2341// 2342// Inspects text and returns an inference of the prevailing sentiment (POSITIVE, 2343// NEUTRAL, MIXED, or NEGATIVE). 2344// 2345// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2346// with awserr.Error's Code and Message methods to get detailed information about 2347// the error. 2348// 2349// See the AWS API reference guide for Amazon Comprehend's 2350// API operation DetectSentiment for usage and error information. 2351// 2352// Returned Error Types: 2353// * InvalidRequestException 2354// The request is invalid. 2355// 2356// * TextSizeLimitExceededException 2357// The size of the input text exceeds the limit. Use a smaller document. 2358// 2359// * UnsupportedLanguageException 2360// Amazon Comprehend can't process the language of the input text. For all custom 2361// entity recognition APIs (such as CreateEntityRecognizer), only English is 2362// accepted. For most other APIs, such as those for Custom Classification, Amazon 2363// Comprehend accepts text in all supported languages. For a list of supported 2364// languages, see supported-languages. 2365// 2366// * InternalServerException 2367// An internal server error occurred. Retry your request. 2368// 2369// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectSentiment 2370func (c *Comprehend) DetectSentiment(input *DetectSentimentInput) (*DetectSentimentOutput, error) { 2371 req, out := c.DetectSentimentRequest(input) 2372 return out, req.Send() 2373} 2374 2375// DetectSentimentWithContext is the same as DetectSentiment with the addition of 2376// the ability to pass a context and additional request options. 2377// 2378// See DetectSentiment for details on how to use this API operation. 2379// 2380// The context must be non-nil and will be used for request cancellation. If 2381// the context is nil a panic will occur. In the future the SDK may create 2382// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2383// for more information on using Contexts. 2384func (c *Comprehend) DetectSentimentWithContext(ctx aws.Context, input *DetectSentimentInput, opts ...request.Option) (*DetectSentimentOutput, error) { 2385 req, out := c.DetectSentimentRequest(input) 2386 req.SetContext(ctx) 2387 req.ApplyOptions(opts...) 2388 return out, req.Send() 2389} 2390 2391const opDetectSyntax = "DetectSyntax" 2392 2393// DetectSyntaxRequest generates a "aws/request.Request" representing the 2394// client's request for the DetectSyntax operation. The "output" return 2395// value will be populated with the request's response once the request completes 2396// successfully. 2397// 2398// Use "Send" method on the returned Request to send the API call to the service. 2399// the "output" return value is not valid until after Send returns without error. 2400// 2401// See DetectSyntax for more information on using the DetectSyntax 2402// API call, and error handling. 2403// 2404// This method is useful when you want to inject custom logic or configuration 2405// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2406// 2407// 2408// // Example sending a request using the DetectSyntaxRequest method. 2409// req, resp := client.DetectSyntaxRequest(params) 2410// 2411// err := req.Send() 2412// if err == nil { // resp is now filled 2413// fmt.Println(resp) 2414// } 2415// 2416// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectSyntax 2417func (c *Comprehend) DetectSyntaxRequest(input *DetectSyntaxInput) (req *request.Request, output *DetectSyntaxOutput) { 2418 op := &request.Operation{ 2419 Name: opDetectSyntax, 2420 HTTPMethod: "POST", 2421 HTTPPath: "/", 2422 } 2423 2424 if input == nil { 2425 input = &DetectSyntaxInput{} 2426 } 2427 2428 output = &DetectSyntaxOutput{} 2429 req = c.newRequest(op, input, output) 2430 return 2431} 2432 2433// DetectSyntax API operation for Amazon Comprehend. 2434// 2435// Inspects text for syntax and the part of speech of words in the document. 2436// For more information, how-syntax. 2437// 2438// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2439// with awserr.Error's Code and Message methods to get detailed information about 2440// the error. 2441// 2442// See the AWS API reference guide for Amazon Comprehend's 2443// API operation DetectSyntax for usage and error information. 2444// 2445// Returned Error Types: 2446// * InvalidRequestException 2447// The request is invalid. 2448// 2449// * TextSizeLimitExceededException 2450// The size of the input text exceeds the limit. Use a smaller document. 2451// 2452// * UnsupportedLanguageException 2453// Amazon Comprehend can't process the language of the input text. For all custom 2454// entity recognition APIs (such as CreateEntityRecognizer), only English is 2455// accepted. For most other APIs, such as those for Custom Classification, Amazon 2456// Comprehend accepts text in all supported languages. For a list of supported 2457// languages, see supported-languages. 2458// 2459// * InternalServerException 2460// An internal server error occurred. Retry your request. 2461// 2462// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DetectSyntax 2463func (c *Comprehend) DetectSyntax(input *DetectSyntaxInput) (*DetectSyntaxOutput, error) { 2464 req, out := c.DetectSyntaxRequest(input) 2465 return out, req.Send() 2466} 2467 2468// DetectSyntaxWithContext is the same as DetectSyntax with the addition of 2469// the ability to pass a context and additional request options. 2470// 2471// See DetectSyntax for details on how to use this API operation. 2472// 2473// The context must be non-nil and will be used for request cancellation. If 2474// the context is nil a panic will occur. In the future the SDK may create 2475// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2476// for more information on using Contexts. 2477func (c *Comprehend) DetectSyntaxWithContext(ctx aws.Context, input *DetectSyntaxInput, opts ...request.Option) (*DetectSyntaxOutput, error) { 2478 req, out := c.DetectSyntaxRequest(input) 2479 req.SetContext(ctx) 2480 req.ApplyOptions(opts...) 2481 return out, req.Send() 2482} 2483 2484const opListDocumentClassificationJobs = "ListDocumentClassificationJobs" 2485 2486// ListDocumentClassificationJobsRequest generates a "aws/request.Request" representing the 2487// client's request for the ListDocumentClassificationJobs operation. The "output" return 2488// value will be populated with the request's response once the request completes 2489// successfully. 2490// 2491// Use "Send" method on the returned Request to send the API call to the service. 2492// the "output" return value is not valid until after Send returns without error. 2493// 2494// See ListDocumentClassificationJobs for more information on using the ListDocumentClassificationJobs 2495// API call, and error handling. 2496// 2497// This method is useful when you want to inject custom logic or configuration 2498// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2499// 2500// 2501// // Example sending a request using the ListDocumentClassificationJobsRequest method. 2502// req, resp := client.ListDocumentClassificationJobsRequest(params) 2503// 2504// err := req.Send() 2505// if err == nil { // resp is now filled 2506// fmt.Println(resp) 2507// } 2508// 2509// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListDocumentClassificationJobs 2510func (c *Comprehend) ListDocumentClassificationJobsRequest(input *ListDocumentClassificationJobsInput) (req *request.Request, output *ListDocumentClassificationJobsOutput) { 2511 op := &request.Operation{ 2512 Name: opListDocumentClassificationJobs, 2513 HTTPMethod: "POST", 2514 HTTPPath: "/", 2515 Paginator: &request.Paginator{ 2516 InputTokens: []string{"NextToken"}, 2517 OutputTokens: []string{"NextToken"}, 2518 LimitToken: "MaxResults", 2519 TruncationToken: "", 2520 }, 2521 } 2522 2523 if input == nil { 2524 input = &ListDocumentClassificationJobsInput{} 2525 } 2526 2527 output = &ListDocumentClassificationJobsOutput{} 2528 req = c.newRequest(op, input, output) 2529 return 2530} 2531 2532// ListDocumentClassificationJobs API operation for Amazon Comprehend. 2533// 2534// Gets a list of the documentation classification jobs that you have submitted. 2535// 2536// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2537// with awserr.Error's Code and Message methods to get detailed information about 2538// the error. 2539// 2540// See the AWS API reference guide for Amazon Comprehend's 2541// API operation ListDocumentClassificationJobs for usage and error information. 2542// 2543// Returned Error Types: 2544// * InvalidRequestException 2545// The request is invalid. 2546// 2547// * TooManyRequestsException 2548// The number of requests exceeds the limit. Resubmit your request later. 2549// 2550// * InvalidFilterException 2551// The filter specified for the operation is invalid. Specify a different filter. 2552// 2553// * InternalServerException 2554// An internal server error occurred. Retry your request. 2555// 2556// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListDocumentClassificationJobs 2557func (c *Comprehend) ListDocumentClassificationJobs(input *ListDocumentClassificationJobsInput) (*ListDocumentClassificationJobsOutput, error) { 2558 req, out := c.ListDocumentClassificationJobsRequest(input) 2559 return out, req.Send() 2560} 2561 2562// ListDocumentClassificationJobsWithContext is the same as ListDocumentClassificationJobs with the addition of 2563// the ability to pass a context and additional request options. 2564// 2565// See ListDocumentClassificationJobs for details on how to use this API operation. 2566// 2567// The context must be non-nil and will be used for request cancellation. If 2568// the context is nil a panic will occur. In the future the SDK may create 2569// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2570// for more information on using Contexts. 2571func (c *Comprehend) ListDocumentClassificationJobsWithContext(ctx aws.Context, input *ListDocumentClassificationJobsInput, opts ...request.Option) (*ListDocumentClassificationJobsOutput, error) { 2572 req, out := c.ListDocumentClassificationJobsRequest(input) 2573 req.SetContext(ctx) 2574 req.ApplyOptions(opts...) 2575 return out, req.Send() 2576} 2577 2578// ListDocumentClassificationJobsPages iterates over the pages of a ListDocumentClassificationJobs operation, 2579// calling the "fn" function with the response data for each page. To stop 2580// iterating, return false from the fn function. 2581// 2582// See ListDocumentClassificationJobs method for more information on how to use this operation. 2583// 2584// Note: This operation can generate multiple requests to a service. 2585// 2586// // Example iterating over at most 3 pages of a ListDocumentClassificationJobs operation. 2587// pageNum := 0 2588// err := client.ListDocumentClassificationJobsPages(params, 2589// func(page *comprehend.ListDocumentClassificationJobsOutput, lastPage bool) bool { 2590// pageNum++ 2591// fmt.Println(page) 2592// return pageNum <= 3 2593// }) 2594// 2595func (c *Comprehend) ListDocumentClassificationJobsPages(input *ListDocumentClassificationJobsInput, fn func(*ListDocumentClassificationJobsOutput, bool) bool) error { 2596 return c.ListDocumentClassificationJobsPagesWithContext(aws.BackgroundContext(), input, fn) 2597} 2598 2599// ListDocumentClassificationJobsPagesWithContext same as ListDocumentClassificationJobsPages except 2600// it takes a Context and allows setting request options on the pages. 2601// 2602// The context must be non-nil and will be used for request cancellation. If 2603// the context is nil a panic will occur. In the future the SDK may create 2604// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2605// for more information on using Contexts. 2606func (c *Comprehend) ListDocumentClassificationJobsPagesWithContext(ctx aws.Context, input *ListDocumentClassificationJobsInput, fn func(*ListDocumentClassificationJobsOutput, bool) bool, opts ...request.Option) error { 2607 p := request.Pagination{ 2608 NewRequest: func() (*request.Request, error) { 2609 var inCpy *ListDocumentClassificationJobsInput 2610 if input != nil { 2611 tmp := *input 2612 inCpy = &tmp 2613 } 2614 req, _ := c.ListDocumentClassificationJobsRequest(inCpy) 2615 req.SetContext(ctx) 2616 req.ApplyOptions(opts...) 2617 return req, nil 2618 }, 2619 } 2620 2621 for p.Next() { 2622 if !fn(p.Page().(*ListDocumentClassificationJobsOutput), !p.HasNextPage()) { 2623 break 2624 } 2625 } 2626 2627 return p.Err() 2628} 2629 2630const opListDocumentClassifiers = "ListDocumentClassifiers" 2631 2632// ListDocumentClassifiersRequest generates a "aws/request.Request" representing the 2633// client's request for the ListDocumentClassifiers operation. The "output" return 2634// value will be populated with the request's response once the request completes 2635// successfully. 2636// 2637// Use "Send" method on the returned Request to send the API call to the service. 2638// the "output" return value is not valid until after Send returns without error. 2639// 2640// See ListDocumentClassifiers for more information on using the ListDocumentClassifiers 2641// API call, and error handling. 2642// 2643// This method is useful when you want to inject custom logic or configuration 2644// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2645// 2646// 2647// // Example sending a request using the ListDocumentClassifiersRequest method. 2648// req, resp := client.ListDocumentClassifiersRequest(params) 2649// 2650// err := req.Send() 2651// if err == nil { // resp is now filled 2652// fmt.Println(resp) 2653// } 2654// 2655// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListDocumentClassifiers 2656func (c *Comprehend) ListDocumentClassifiersRequest(input *ListDocumentClassifiersInput) (req *request.Request, output *ListDocumentClassifiersOutput) { 2657 op := &request.Operation{ 2658 Name: opListDocumentClassifiers, 2659 HTTPMethod: "POST", 2660 HTTPPath: "/", 2661 Paginator: &request.Paginator{ 2662 InputTokens: []string{"NextToken"}, 2663 OutputTokens: []string{"NextToken"}, 2664 LimitToken: "MaxResults", 2665 TruncationToken: "", 2666 }, 2667 } 2668 2669 if input == nil { 2670 input = &ListDocumentClassifiersInput{} 2671 } 2672 2673 output = &ListDocumentClassifiersOutput{} 2674 req = c.newRequest(op, input, output) 2675 return 2676} 2677 2678// ListDocumentClassifiers API operation for Amazon Comprehend. 2679// 2680// Gets a list of the document classifiers that you have created. 2681// 2682// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2683// with awserr.Error's Code and Message methods to get detailed information about 2684// the error. 2685// 2686// See the AWS API reference guide for Amazon Comprehend's 2687// API operation ListDocumentClassifiers for usage and error information. 2688// 2689// Returned Error Types: 2690// * InvalidRequestException 2691// The request is invalid. 2692// 2693// * TooManyRequestsException 2694// The number of requests exceeds the limit. Resubmit your request later. 2695// 2696// * InvalidFilterException 2697// The filter specified for the operation is invalid. Specify a different filter. 2698// 2699// * InternalServerException 2700// An internal server error occurred. Retry your request. 2701// 2702// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListDocumentClassifiers 2703func (c *Comprehend) ListDocumentClassifiers(input *ListDocumentClassifiersInput) (*ListDocumentClassifiersOutput, error) { 2704 req, out := c.ListDocumentClassifiersRequest(input) 2705 return out, req.Send() 2706} 2707 2708// ListDocumentClassifiersWithContext is the same as ListDocumentClassifiers with the addition of 2709// the ability to pass a context and additional request options. 2710// 2711// See ListDocumentClassifiers for details on how to use this API operation. 2712// 2713// The context must be non-nil and will be used for request cancellation. If 2714// the context is nil a panic will occur. In the future the SDK may create 2715// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2716// for more information on using Contexts. 2717func (c *Comprehend) ListDocumentClassifiersWithContext(ctx aws.Context, input *ListDocumentClassifiersInput, opts ...request.Option) (*ListDocumentClassifiersOutput, error) { 2718 req, out := c.ListDocumentClassifiersRequest(input) 2719 req.SetContext(ctx) 2720 req.ApplyOptions(opts...) 2721 return out, req.Send() 2722} 2723 2724// ListDocumentClassifiersPages iterates over the pages of a ListDocumentClassifiers operation, 2725// calling the "fn" function with the response data for each page. To stop 2726// iterating, return false from the fn function. 2727// 2728// See ListDocumentClassifiers method for more information on how to use this operation. 2729// 2730// Note: This operation can generate multiple requests to a service. 2731// 2732// // Example iterating over at most 3 pages of a ListDocumentClassifiers operation. 2733// pageNum := 0 2734// err := client.ListDocumentClassifiersPages(params, 2735// func(page *comprehend.ListDocumentClassifiersOutput, lastPage bool) bool { 2736// pageNum++ 2737// fmt.Println(page) 2738// return pageNum <= 3 2739// }) 2740// 2741func (c *Comprehend) ListDocumentClassifiersPages(input *ListDocumentClassifiersInput, fn func(*ListDocumentClassifiersOutput, bool) bool) error { 2742 return c.ListDocumentClassifiersPagesWithContext(aws.BackgroundContext(), input, fn) 2743} 2744 2745// ListDocumentClassifiersPagesWithContext same as ListDocumentClassifiersPages except 2746// it takes a Context and allows setting request options on the pages. 2747// 2748// The context must be non-nil and will be used for request cancellation. If 2749// the context is nil a panic will occur. In the future the SDK may create 2750// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2751// for more information on using Contexts. 2752func (c *Comprehend) ListDocumentClassifiersPagesWithContext(ctx aws.Context, input *ListDocumentClassifiersInput, fn func(*ListDocumentClassifiersOutput, bool) bool, opts ...request.Option) error { 2753 p := request.Pagination{ 2754 NewRequest: func() (*request.Request, error) { 2755 var inCpy *ListDocumentClassifiersInput 2756 if input != nil { 2757 tmp := *input 2758 inCpy = &tmp 2759 } 2760 req, _ := c.ListDocumentClassifiersRequest(inCpy) 2761 req.SetContext(ctx) 2762 req.ApplyOptions(opts...) 2763 return req, nil 2764 }, 2765 } 2766 2767 for p.Next() { 2768 if !fn(p.Page().(*ListDocumentClassifiersOutput), !p.HasNextPage()) { 2769 break 2770 } 2771 } 2772 2773 return p.Err() 2774} 2775 2776const opListDominantLanguageDetectionJobs = "ListDominantLanguageDetectionJobs" 2777 2778// ListDominantLanguageDetectionJobsRequest generates a "aws/request.Request" representing the 2779// client's request for the ListDominantLanguageDetectionJobs operation. The "output" return 2780// value will be populated with the request's response once the request completes 2781// successfully. 2782// 2783// Use "Send" method on the returned Request to send the API call to the service. 2784// the "output" return value is not valid until after Send returns without error. 2785// 2786// See ListDominantLanguageDetectionJobs for more information on using the ListDominantLanguageDetectionJobs 2787// API call, and error handling. 2788// 2789// This method is useful when you want to inject custom logic or configuration 2790// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2791// 2792// 2793// // Example sending a request using the ListDominantLanguageDetectionJobsRequest method. 2794// req, resp := client.ListDominantLanguageDetectionJobsRequest(params) 2795// 2796// err := req.Send() 2797// if err == nil { // resp is now filled 2798// fmt.Println(resp) 2799// } 2800// 2801// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListDominantLanguageDetectionJobs 2802func (c *Comprehend) ListDominantLanguageDetectionJobsRequest(input *ListDominantLanguageDetectionJobsInput) (req *request.Request, output *ListDominantLanguageDetectionJobsOutput) { 2803 op := &request.Operation{ 2804 Name: opListDominantLanguageDetectionJobs, 2805 HTTPMethod: "POST", 2806 HTTPPath: "/", 2807 Paginator: &request.Paginator{ 2808 InputTokens: []string{"NextToken"}, 2809 OutputTokens: []string{"NextToken"}, 2810 LimitToken: "MaxResults", 2811 TruncationToken: "", 2812 }, 2813 } 2814 2815 if input == nil { 2816 input = &ListDominantLanguageDetectionJobsInput{} 2817 } 2818 2819 output = &ListDominantLanguageDetectionJobsOutput{} 2820 req = c.newRequest(op, input, output) 2821 return 2822} 2823 2824// ListDominantLanguageDetectionJobs API operation for Amazon Comprehend. 2825// 2826// Gets a list of the dominant language detection jobs that you have submitted. 2827// 2828// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2829// with awserr.Error's Code and Message methods to get detailed information about 2830// the error. 2831// 2832// See the AWS API reference guide for Amazon Comprehend's 2833// API operation ListDominantLanguageDetectionJobs for usage and error information. 2834// 2835// Returned Error Types: 2836// * InvalidRequestException 2837// The request is invalid. 2838// 2839// * TooManyRequestsException 2840// The number of requests exceeds the limit. Resubmit your request later. 2841// 2842// * InvalidFilterException 2843// The filter specified for the operation is invalid. Specify a different filter. 2844// 2845// * InternalServerException 2846// An internal server error occurred. Retry your request. 2847// 2848// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListDominantLanguageDetectionJobs 2849func (c *Comprehend) ListDominantLanguageDetectionJobs(input *ListDominantLanguageDetectionJobsInput) (*ListDominantLanguageDetectionJobsOutput, error) { 2850 req, out := c.ListDominantLanguageDetectionJobsRequest(input) 2851 return out, req.Send() 2852} 2853 2854// ListDominantLanguageDetectionJobsWithContext is the same as ListDominantLanguageDetectionJobs with the addition of 2855// the ability to pass a context and additional request options. 2856// 2857// See ListDominantLanguageDetectionJobs for details on how to use this API operation. 2858// 2859// The context must be non-nil and will be used for request cancellation. If 2860// the context is nil a panic will occur. In the future the SDK may create 2861// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2862// for more information on using Contexts. 2863func (c *Comprehend) ListDominantLanguageDetectionJobsWithContext(ctx aws.Context, input *ListDominantLanguageDetectionJobsInput, opts ...request.Option) (*ListDominantLanguageDetectionJobsOutput, error) { 2864 req, out := c.ListDominantLanguageDetectionJobsRequest(input) 2865 req.SetContext(ctx) 2866 req.ApplyOptions(opts...) 2867 return out, req.Send() 2868} 2869 2870// ListDominantLanguageDetectionJobsPages iterates over the pages of a ListDominantLanguageDetectionJobs operation, 2871// calling the "fn" function with the response data for each page. To stop 2872// iterating, return false from the fn function. 2873// 2874// See ListDominantLanguageDetectionJobs method for more information on how to use this operation. 2875// 2876// Note: This operation can generate multiple requests to a service. 2877// 2878// // Example iterating over at most 3 pages of a ListDominantLanguageDetectionJobs operation. 2879// pageNum := 0 2880// err := client.ListDominantLanguageDetectionJobsPages(params, 2881// func(page *comprehend.ListDominantLanguageDetectionJobsOutput, lastPage bool) bool { 2882// pageNum++ 2883// fmt.Println(page) 2884// return pageNum <= 3 2885// }) 2886// 2887func (c *Comprehend) ListDominantLanguageDetectionJobsPages(input *ListDominantLanguageDetectionJobsInput, fn func(*ListDominantLanguageDetectionJobsOutput, bool) bool) error { 2888 return c.ListDominantLanguageDetectionJobsPagesWithContext(aws.BackgroundContext(), input, fn) 2889} 2890 2891// ListDominantLanguageDetectionJobsPagesWithContext same as ListDominantLanguageDetectionJobsPages except 2892// it takes a Context and allows setting request options on the pages. 2893// 2894// The context must be non-nil and will be used for request cancellation. If 2895// the context is nil a panic will occur. In the future the SDK may create 2896// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2897// for more information on using Contexts. 2898func (c *Comprehend) ListDominantLanguageDetectionJobsPagesWithContext(ctx aws.Context, input *ListDominantLanguageDetectionJobsInput, fn func(*ListDominantLanguageDetectionJobsOutput, bool) bool, opts ...request.Option) error { 2899 p := request.Pagination{ 2900 NewRequest: func() (*request.Request, error) { 2901 var inCpy *ListDominantLanguageDetectionJobsInput 2902 if input != nil { 2903 tmp := *input 2904 inCpy = &tmp 2905 } 2906 req, _ := c.ListDominantLanguageDetectionJobsRequest(inCpy) 2907 req.SetContext(ctx) 2908 req.ApplyOptions(opts...) 2909 return req, nil 2910 }, 2911 } 2912 2913 for p.Next() { 2914 if !fn(p.Page().(*ListDominantLanguageDetectionJobsOutput), !p.HasNextPage()) { 2915 break 2916 } 2917 } 2918 2919 return p.Err() 2920} 2921 2922const opListEndpoints = "ListEndpoints" 2923 2924// ListEndpointsRequest generates a "aws/request.Request" representing the 2925// client's request for the ListEndpoints operation. The "output" return 2926// value will be populated with the request's response once the request completes 2927// successfully. 2928// 2929// Use "Send" method on the returned Request to send the API call to the service. 2930// the "output" return value is not valid until after Send returns without error. 2931// 2932// See ListEndpoints for more information on using the ListEndpoints 2933// API call, and error handling. 2934// 2935// This method is useful when you want to inject custom logic or configuration 2936// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2937// 2938// 2939// // Example sending a request using the ListEndpointsRequest method. 2940// req, resp := client.ListEndpointsRequest(params) 2941// 2942// err := req.Send() 2943// if err == nil { // resp is now filled 2944// fmt.Println(resp) 2945// } 2946// 2947// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListEndpoints 2948func (c *Comprehend) ListEndpointsRequest(input *ListEndpointsInput) (req *request.Request, output *ListEndpointsOutput) { 2949 op := &request.Operation{ 2950 Name: opListEndpoints, 2951 HTTPMethod: "POST", 2952 HTTPPath: "/", 2953 } 2954 2955 if input == nil { 2956 input = &ListEndpointsInput{} 2957 } 2958 2959 output = &ListEndpointsOutput{} 2960 req = c.newRequest(op, input, output) 2961 return 2962} 2963 2964// ListEndpoints API operation for Amazon Comprehend. 2965// 2966// Gets a list of all existing endpoints that you've created. 2967// 2968// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2969// with awserr.Error's Code and Message methods to get detailed information about 2970// the error. 2971// 2972// See the AWS API reference guide for Amazon Comprehend's 2973// API operation ListEndpoints for usage and error information. 2974// 2975// Returned Error Types: 2976// * InvalidRequestException 2977// The request is invalid. 2978// 2979// * TooManyRequestsException 2980// The number of requests exceeds the limit. Resubmit your request later. 2981// 2982// * InternalServerException 2983// An internal server error occurred. Retry your request. 2984// 2985// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListEndpoints 2986func (c *Comprehend) ListEndpoints(input *ListEndpointsInput) (*ListEndpointsOutput, error) { 2987 req, out := c.ListEndpointsRequest(input) 2988 return out, req.Send() 2989} 2990 2991// ListEndpointsWithContext is the same as ListEndpoints with the addition of 2992// the ability to pass a context and additional request options. 2993// 2994// See ListEndpoints for details on how to use this API operation. 2995// 2996// The context must be non-nil and will be used for request cancellation. If 2997// the context is nil a panic will occur. In the future the SDK may create 2998// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2999// for more information on using Contexts. 3000func (c *Comprehend) ListEndpointsWithContext(ctx aws.Context, input *ListEndpointsInput, opts ...request.Option) (*ListEndpointsOutput, error) { 3001 req, out := c.ListEndpointsRequest(input) 3002 req.SetContext(ctx) 3003 req.ApplyOptions(opts...) 3004 return out, req.Send() 3005} 3006 3007const opListEntitiesDetectionJobs = "ListEntitiesDetectionJobs" 3008 3009// ListEntitiesDetectionJobsRequest generates a "aws/request.Request" representing the 3010// client's request for the ListEntitiesDetectionJobs operation. The "output" return 3011// value will be populated with the request's response once the request completes 3012// successfully. 3013// 3014// Use "Send" method on the returned Request to send the API call to the service. 3015// the "output" return value is not valid until after Send returns without error. 3016// 3017// See ListEntitiesDetectionJobs for more information on using the ListEntitiesDetectionJobs 3018// API call, and error handling. 3019// 3020// This method is useful when you want to inject custom logic or configuration 3021// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3022// 3023// 3024// // Example sending a request using the ListEntitiesDetectionJobsRequest method. 3025// req, resp := client.ListEntitiesDetectionJobsRequest(params) 3026// 3027// err := req.Send() 3028// if err == nil { // resp is now filled 3029// fmt.Println(resp) 3030// } 3031// 3032// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListEntitiesDetectionJobs 3033func (c *Comprehend) ListEntitiesDetectionJobsRequest(input *ListEntitiesDetectionJobsInput) (req *request.Request, output *ListEntitiesDetectionJobsOutput) { 3034 op := &request.Operation{ 3035 Name: opListEntitiesDetectionJobs, 3036 HTTPMethod: "POST", 3037 HTTPPath: "/", 3038 Paginator: &request.Paginator{ 3039 InputTokens: []string{"NextToken"}, 3040 OutputTokens: []string{"NextToken"}, 3041 LimitToken: "MaxResults", 3042 TruncationToken: "", 3043 }, 3044 } 3045 3046 if input == nil { 3047 input = &ListEntitiesDetectionJobsInput{} 3048 } 3049 3050 output = &ListEntitiesDetectionJobsOutput{} 3051 req = c.newRequest(op, input, output) 3052 return 3053} 3054 3055// ListEntitiesDetectionJobs API operation for Amazon Comprehend. 3056// 3057// Gets a list of the entity detection jobs that you have submitted. 3058// 3059// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3060// with awserr.Error's Code and Message methods to get detailed information about 3061// the error. 3062// 3063// See the AWS API reference guide for Amazon Comprehend's 3064// API operation ListEntitiesDetectionJobs for usage and error information. 3065// 3066// Returned Error Types: 3067// * InvalidRequestException 3068// The request is invalid. 3069// 3070// * TooManyRequestsException 3071// The number of requests exceeds the limit. Resubmit your request later. 3072// 3073// * InvalidFilterException 3074// The filter specified for the operation is invalid. Specify a different filter. 3075// 3076// * InternalServerException 3077// An internal server error occurred. Retry your request. 3078// 3079// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListEntitiesDetectionJobs 3080func (c *Comprehend) ListEntitiesDetectionJobs(input *ListEntitiesDetectionJobsInput) (*ListEntitiesDetectionJobsOutput, error) { 3081 req, out := c.ListEntitiesDetectionJobsRequest(input) 3082 return out, req.Send() 3083} 3084 3085// ListEntitiesDetectionJobsWithContext is the same as ListEntitiesDetectionJobs with the addition of 3086// the ability to pass a context and additional request options. 3087// 3088// See ListEntitiesDetectionJobs for details on how to use this API operation. 3089// 3090// The context must be non-nil and will be used for request cancellation. If 3091// the context is nil a panic will occur. In the future the SDK may create 3092// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3093// for more information on using Contexts. 3094func (c *Comprehend) ListEntitiesDetectionJobsWithContext(ctx aws.Context, input *ListEntitiesDetectionJobsInput, opts ...request.Option) (*ListEntitiesDetectionJobsOutput, error) { 3095 req, out := c.ListEntitiesDetectionJobsRequest(input) 3096 req.SetContext(ctx) 3097 req.ApplyOptions(opts...) 3098 return out, req.Send() 3099} 3100 3101// ListEntitiesDetectionJobsPages iterates over the pages of a ListEntitiesDetectionJobs operation, 3102// calling the "fn" function with the response data for each page. To stop 3103// iterating, return false from the fn function. 3104// 3105// See ListEntitiesDetectionJobs method for more information on how to use this operation. 3106// 3107// Note: This operation can generate multiple requests to a service. 3108// 3109// // Example iterating over at most 3 pages of a ListEntitiesDetectionJobs operation. 3110// pageNum := 0 3111// err := client.ListEntitiesDetectionJobsPages(params, 3112// func(page *comprehend.ListEntitiesDetectionJobsOutput, lastPage bool) bool { 3113// pageNum++ 3114// fmt.Println(page) 3115// return pageNum <= 3 3116// }) 3117// 3118func (c *Comprehend) ListEntitiesDetectionJobsPages(input *ListEntitiesDetectionJobsInput, fn func(*ListEntitiesDetectionJobsOutput, bool) bool) error { 3119 return c.ListEntitiesDetectionJobsPagesWithContext(aws.BackgroundContext(), input, fn) 3120} 3121 3122// ListEntitiesDetectionJobsPagesWithContext same as ListEntitiesDetectionJobsPages except 3123// it takes a Context and allows setting request options on the pages. 3124// 3125// The context must be non-nil and will be used for request cancellation. If 3126// the context is nil a panic will occur. In the future the SDK may create 3127// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3128// for more information on using Contexts. 3129func (c *Comprehend) ListEntitiesDetectionJobsPagesWithContext(ctx aws.Context, input *ListEntitiesDetectionJobsInput, fn func(*ListEntitiesDetectionJobsOutput, bool) bool, opts ...request.Option) error { 3130 p := request.Pagination{ 3131 NewRequest: func() (*request.Request, error) { 3132 var inCpy *ListEntitiesDetectionJobsInput 3133 if input != nil { 3134 tmp := *input 3135 inCpy = &tmp 3136 } 3137 req, _ := c.ListEntitiesDetectionJobsRequest(inCpy) 3138 req.SetContext(ctx) 3139 req.ApplyOptions(opts...) 3140 return req, nil 3141 }, 3142 } 3143 3144 for p.Next() { 3145 if !fn(p.Page().(*ListEntitiesDetectionJobsOutput), !p.HasNextPage()) { 3146 break 3147 } 3148 } 3149 3150 return p.Err() 3151} 3152 3153const opListEntityRecognizers = "ListEntityRecognizers" 3154 3155// ListEntityRecognizersRequest generates a "aws/request.Request" representing the 3156// client's request for the ListEntityRecognizers operation. The "output" return 3157// value will be populated with the request's response once the request completes 3158// successfully. 3159// 3160// Use "Send" method on the returned Request to send the API call to the service. 3161// the "output" return value is not valid until after Send returns without error. 3162// 3163// See ListEntityRecognizers for more information on using the ListEntityRecognizers 3164// API call, and error handling. 3165// 3166// This method is useful when you want to inject custom logic or configuration 3167// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3168// 3169// 3170// // Example sending a request using the ListEntityRecognizersRequest method. 3171// req, resp := client.ListEntityRecognizersRequest(params) 3172// 3173// err := req.Send() 3174// if err == nil { // resp is now filled 3175// fmt.Println(resp) 3176// } 3177// 3178// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListEntityRecognizers 3179func (c *Comprehend) ListEntityRecognizersRequest(input *ListEntityRecognizersInput) (req *request.Request, output *ListEntityRecognizersOutput) { 3180 op := &request.Operation{ 3181 Name: opListEntityRecognizers, 3182 HTTPMethod: "POST", 3183 HTTPPath: "/", 3184 Paginator: &request.Paginator{ 3185 InputTokens: []string{"NextToken"}, 3186 OutputTokens: []string{"NextToken"}, 3187 LimitToken: "MaxResults", 3188 TruncationToken: "", 3189 }, 3190 } 3191 3192 if input == nil { 3193 input = &ListEntityRecognizersInput{} 3194 } 3195 3196 output = &ListEntityRecognizersOutput{} 3197 req = c.newRequest(op, input, output) 3198 return 3199} 3200 3201// ListEntityRecognizers API operation for Amazon Comprehend. 3202// 3203// Gets a list of the properties of all entity recognizers that you created, 3204// including recognizers currently in training. Allows you to filter the list 3205// of recognizers based on criteria such as status and submission time. This 3206// call returns up to 500 entity recognizers in the list, with a default number 3207// of 100 recognizers in the list. 3208// 3209// The results of this list are not in any particular order. Please get the 3210// list and sort locally if needed. 3211// 3212// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3213// with awserr.Error's Code and Message methods to get detailed information about 3214// the error. 3215// 3216// See the AWS API reference guide for Amazon Comprehend's 3217// API operation ListEntityRecognizers for usage and error information. 3218// 3219// Returned Error Types: 3220// * InvalidRequestException 3221// The request is invalid. 3222// 3223// * TooManyRequestsException 3224// The number of requests exceeds the limit. Resubmit your request later. 3225// 3226// * InvalidFilterException 3227// The filter specified for the operation is invalid. Specify a different filter. 3228// 3229// * InternalServerException 3230// An internal server error occurred. Retry your request. 3231// 3232// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListEntityRecognizers 3233func (c *Comprehend) ListEntityRecognizers(input *ListEntityRecognizersInput) (*ListEntityRecognizersOutput, error) { 3234 req, out := c.ListEntityRecognizersRequest(input) 3235 return out, req.Send() 3236} 3237 3238// ListEntityRecognizersWithContext is the same as ListEntityRecognizers with the addition of 3239// the ability to pass a context and additional request options. 3240// 3241// See ListEntityRecognizers for details on how to use this API operation. 3242// 3243// The context must be non-nil and will be used for request cancellation. If 3244// the context is nil a panic will occur. In the future the SDK may create 3245// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3246// for more information on using Contexts. 3247func (c *Comprehend) ListEntityRecognizersWithContext(ctx aws.Context, input *ListEntityRecognizersInput, opts ...request.Option) (*ListEntityRecognizersOutput, error) { 3248 req, out := c.ListEntityRecognizersRequest(input) 3249 req.SetContext(ctx) 3250 req.ApplyOptions(opts...) 3251 return out, req.Send() 3252} 3253 3254// ListEntityRecognizersPages iterates over the pages of a ListEntityRecognizers operation, 3255// calling the "fn" function with the response data for each page. To stop 3256// iterating, return false from the fn function. 3257// 3258// See ListEntityRecognizers method for more information on how to use this operation. 3259// 3260// Note: This operation can generate multiple requests to a service. 3261// 3262// // Example iterating over at most 3 pages of a ListEntityRecognizers operation. 3263// pageNum := 0 3264// err := client.ListEntityRecognizersPages(params, 3265// func(page *comprehend.ListEntityRecognizersOutput, lastPage bool) bool { 3266// pageNum++ 3267// fmt.Println(page) 3268// return pageNum <= 3 3269// }) 3270// 3271func (c *Comprehend) ListEntityRecognizersPages(input *ListEntityRecognizersInput, fn func(*ListEntityRecognizersOutput, bool) bool) error { 3272 return c.ListEntityRecognizersPagesWithContext(aws.BackgroundContext(), input, fn) 3273} 3274 3275// ListEntityRecognizersPagesWithContext same as ListEntityRecognizersPages except 3276// it takes a Context and allows setting request options on the pages. 3277// 3278// The context must be non-nil and will be used for request cancellation. If 3279// the context is nil a panic will occur. In the future the SDK may create 3280// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3281// for more information on using Contexts. 3282func (c *Comprehend) ListEntityRecognizersPagesWithContext(ctx aws.Context, input *ListEntityRecognizersInput, fn func(*ListEntityRecognizersOutput, bool) bool, opts ...request.Option) error { 3283 p := request.Pagination{ 3284 NewRequest: func() (*request.Request, error) { 3285 var inCpy *ListEntityRecognizersInput 3286 if input != nil { 3287 tmp := *input 3288 inCpy = &tmp 3289 } 3290 req, _ := c.ListEntityRecognizersRequest(inCpy) 3291 req.SetContext(ctx) 3292 req.ApplyOptions(opts...) 3293 return req, nil 3294 }, 3295 } 3296 3297 for p.Next() { 3298 if !fn(p.Page().(*ListEntityRecognizersOutput), !p.HasNextPage()) { 3299 break 3300 } 3301 } 3302 3303 return p.Err() 3304} 3305 3306const opListKeyPhrasesDetectionJobs = "ListKeyPhrasesDetectionJobs" 3307 3308// ListKeyPhrasesDetectionJobsRequest generates a "aws/request.Request" representing the 3309// client's request for the ListKeyPhrasesDetectionJobs operation. The "output" return 3310// value will be populated with the request's response once the request completes 3311// successfully. 3312// 3313// Use "Send" method on the returned Request to send the API call to the service. 3314// the "output" return value is not valid until after Send returns without error. 3315// 3316// See ListKeyPhrasesDetectionJobs for more information on using the ListKeyPhrasesDetectionJobs 3317// API call, and error handling. 3318// 3319// This method is useful when you want to inject custom logic or configuration 3320// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3321// 3322// 3323// // Example sending a request using the ListKeyPhrasesDetectionJobsRequest method. 3324// req, resp := client.ListKeyPhrasesDetectionJobsRequest(params) 3325// 3326// err := req.Send() 3327// if err == nil { // resp is now filled 3328// fmt.Println(resp) 3329// } 3330// 3331// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListKeyPhrasesDetectionJobs 3332func (c *Comprehend) ListKeyPhrasesDetectionJobsRequest(input *ListKeyPhrasesDetectionJobsInput) (req *request.Request, output *ListKeyPhrasesDetectionJobsOutput) { 3333 op := &request.Operation{ 3334 Name: opListKeyPhrasesDetectionJobs, 3335 HTTPMethod: "POST", 3336 HTTPPath: "/", 3337 Paginator: &request.Paginator{ 3338 InputTokens: []string{"NextToken"}, 3339 OutputTokens: []string{"NextToken"}, 3340 LimitToken: "MaxResults", 3341 TruncationToken: "", 3342 }, 3343 } 3344 3345 if input == nil { 3346 input = &ListKeyPhrasesDetectionJobsInput{} 3347 } 3348 3349 output = &ListKeyPhrasesDetectionJobsOutput{} 3350 req = c.newRequest(op, input, output) 3351 return 3352} 3353 3354// ListKeyPhrasesDetectionJobs API operation for Amazon Comprehend. 3355// 3356// Get a list of key phrase detection jobs that you have submitted. 3357// 3358// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3359// with awserr.Error's Code and Message methods to get detailed information about 3360// the error. 3361// 3362// See the AWS API reference guide for Amazon Comprehend's 3363// API operation ListKeyPhrasesDetectionJobs for usage and error information. 3364// 3365// Returned Error Types: 3366// * InvalidRequestException 3367// The request is invalid. 3368// 3369// * TooManyRequestsException 3370// The number of requests exceeds the limit. Resubmit your request later. 3371// 3372// * InvalidFilterException 3373// The filter specified for the operation is invalid. Specify a different filter. 3374// 3375// * InternalServerException 3376// An internal server error occurred. Retry your request. 3377// 3378// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListKeyPhrasesDetectionJobs 3379func (c *Comprehend) ListKeyPhrasesDetectionJobs(input *ListKeyPhrasesDetectionJobsInput) (*ListKeyPhrasesDetectionJobsOutput, error) { 3380 req, out := c.ListKeyPhrasesDetectionJobsRequest(input) 3381 return out, req.Send() 3382} 3383 3384// ListKeyPhrasesDetectionJobsWithContext is the same as ListKeyPhrasesDetectionJobs with the addition of 3385// the ability to pass a context and additional request options. 3386// 3387// See ListKeyPhrasesDetectionJobs for details on how to use this API operation. 3388// 3389// The context must be non-nil and will be used for request cancellation. If 3390// the context is nil a panic will occur. In the future the SDK may create 3391// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3392// for more information on using Contexts. 3393func (c *Comprehend) ListKeyPhrasesDetectionJobsWithContext(ctx aws.Context, input *ListKeyPhrasesDetectionJobsInput, opts ...request.Option) (*ListKeyPhrasesDetectionJobsOutput, error) { 3394 req, out := c.ListKeyPhrasesDetectionJobsRequest(input) 3395 req.SetContext(ctx) 3396 req.ApplyOptions(opts...) 3397 return out, req.Send() 3398} 3399 3400// ListKeyPhrasesDetectionJobsPages iterates over the pages of a ListKeyPhrasesDetectionJobs operation, 3401// calling the "fn" function with the response data for each page. To stop 3402// iterating, return false from the fn function. 3403// 3404// See ListKeyPhrasesDetectionJobs method for more information on how to use this operation. 3405// 3406// Note: This operation can generate multiple requests to a service. 3407// 3408// // Example iterating over at most 3 pages of a ListKeyPhrasesDetectionJobs operation. 3409// pageNum := 0 3410// err := client.ListKeyPhrasesDetectionJobsPages(params, 3411// func(page *comprehend.ListKeyPhrasesDetectionJobsOutput, lastPage bool) bool { 3412// pageNum++ 3413// fmt.Println(page) 3414// return pageNum <= 3 3415// }) 3416// 3417func (c *Comprehend) ListKeyPhrasesDetectionJobsPages(input *ListKeyPhrasesDetectionJobsInput, fn func(*ListKeyPhrasesDetectionJobsOutput, bool) bool) error { 3418 return c.ListKeyPhrasesDetectionJobsPagesWithContext(aws.BackgroundContext(), input, fn) 3419} 3420 3421// ListKeyPhrasesDetectionJobsPagesWithContext same as ListKeyPhrasesDetectionJobsPages except 3422// it takes a Context and allows setting request options on the pages. 3423// 3424// The context must be non-nil and will be used for request cancellation. If 3425// the context is nil a panic will occur. In the future the SDK may create 3426// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3427// for more information on using Contexts. 3428func (c *Comprehend) ListKeyPhrasesDetectionJobsPagesWithContext(ctx aws.Context, input *ListKeyPhrasesDetectionJobsInput, fn func(*ListKeyPhrasesDetectionJobsOutput, bool) bool, opts ...request.Option) error { 3429 p := request.Pagination{ 3430 NewRequest: func() (*request.Request, error) { 3431 var inCpy *ListKeyPhrasesDetectionJobsInput 3432 if input != nil { 3433 tmp := *input 3434 inCpy = &tmp 3435 } 3436 req, _ := c.ListKeyPhrasesDetectionJobsRequest(inCpy) 3437 req.SetContext(ctx) 3438 req.ApplyOptions(opts...) 3439 return req, nil 3440 }, 3441 } 3442 3443 for p.Next() { 3444 if !fn(p.Page().(*ListKeyPhrasesDetectionJobsOutput), !p.HasNextPage()) { 3445 break 3446 } 3447 } 3448 3449 return p.Err() 3450} 3451 3452const opListSentimentDetectionJobs = "ListSentimentDetectionJobs" 3453 3454// ListSentimentDetectionJobsRequest generates a "aws/request.Request" representing the 3455// client's request for the ListSentimentDetectionJobs operation. The "output" return 3456// value will be populated with the request's response once the request completes 3457// successfully. 3458// 3459// Use "Send" method on the returned Request to send the API call to the service. 3460// the "output" return value is not valid until after Send returns without error. 3461// 3462// See ListSentimentDetectionJobs for more information on using the ListSentimentDetectionJobs 3463// API call, and error handling. 3464// 3465// This method is useful when you want to inject custom logic or configuration 3466// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3467// 3468// 3469// // Example sending a request using the ListSentimentDetectionJobsRequest method. 3470// req, resp := client.ListSentimentDetectionJobsRequest(params) 3471// 3472// err := req.Send() 3473// if err == nil { // resp is now filled 3474// fmt.Println(resp) 3475// } 3476// 3477// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListSentimentDetectionJobs 3478func (c *Comprehend) ListSentimentDetectionJobsRequest(input *ListSentimentDetectionJobsInput) (req *request.Request, output *ListSentimentDetectionJobsOutput) { 3479 op := &request.Operation{ 3480 Name: opListSentimentDetectionJobs, 3481 HTTPMethod: "POST", 3482 HTTPPath: "/", 3483 Paginator: &request.Paginator{ 3484 InputTokens: []string{"NextToken"}, 3485 OutputTokens: []string{"NextToken"}, 3486 LimitToken: "MaxResults", 3487 TruncationToken: "", 3488 }, 3489 } 3490 3491 if input == nil { 3492 input = &ListSentimentDetectionJobsInput{} 3493 } 3494 3495 output = &ListSentimentDetectionJobsOutput{} 3496 req = c.newRequest(op, input, output) 3497 return 3498} 3499 3500// ListSentimentDetectionJobs API operation for Amazon Comprehend. 3501// 3502// Gets a list of sentiment detection jobs that you have submitted. 3503// 3504// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3505// with awserr.Error's Code and Message methods to get detailed information about 3506// the error. 3507// 3508// See the AWS API reference guide for Amazon Comprehend's 3509// API operation ListSentimentDetectionJobs for usage and error information. 3510// 3511// Returned Error Types: 3512// * InvalidRequestException 3513// The request is invalid. 3514// 3515// * TooManyRequestsException 3516// The number of requests exceeds the limit. Resubmit your request later. 3517// 3518// * InvalidFilterException 3519// The filter specified for the operation is invalid. Specify a different filter. 3520// 3521// * InternalServerException 3522// An internal server error occurred. Retry your request. 3523// 3524// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListSentimentDetectionJobs 3525func (c *Comprehend) ListSentimentDetectionJobs(input *ListSentimentDetectionJobsInput) (*ListSentimentDetectionJobsOutput, error) { 3526 req, out := c.ListSentimentDetectionJobsRequest(input) 3527 return out, req.Send() 3528} 3529 3530// ListSentimentDetectionJobsWithContext is the same as ListSentimentDetectionJobs with the addition of 3531// the ability to pass a context and additional request options. 3532// 3533// See ListSentimentDetectionJobs for details on how to use this API operation. 3534// 3535// The context must be non-nil and will be used for request cancellation. If 3536// the context is nil a panic will occur. In the future the SDK may create 3537// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3538// for more information on using Contexts. 3539func (c *Comprehend) ListSentimentDetectionJobsWithContext(ctx aws.Context, input *ListSentimentDetectionJobsInput, opts ...request.Option) (*ListSentimentDetectionJobsOutput, error) { 3540 req, out := c.ListSentimentDetectionJobsRequest(input) 3541 req.SetContext(ctx) 3542 req.ApplyOptions(opts...) 3543 return out, req.Send() 3544} 3545 3546// ListSentimentDetectionJobsPages iterates over the pages of a ListSentimentDetectionJobs operation, 3547// calling the "fn" function with the response data for each page. To stop 3548// iterating, return false from the fn function. 3549// 3550// See ListSentimentDetectionJobs method for more information on how to use this operation. 3551// 3552// Note: This operation can generate multiple requests to a service. 3553// 3554// // Example iterating over at most 3 pages of a ListSentimentDetectionJobs operation. 3555// pageNum := 0 3556// err := client.ListSentimentDetectionJobsPages(params, 3557// func(page *comprehend.ListSentimentDetectionJobsOutput, lastPage bool) bool { 3558// pageNum++ 3559// fmt.Println(page) 3560// return pageNum <= 3 3561// }) 3562// 3563func (c *Comprehend) ListSentimentDetectionJobsPages(input *ListSentimentDetectionJobsInput, fn func(*ListSentimentDetectionJobsOutput, bool) bool) error { 3564 return c.ListSentimentDetectionJobsPagesWithContext(aws.BackgroundContext(), input, fn) 3565} 3566 3567// ListSentimentDetectionJobsPagesWithContext same as ListSentimentDetectionJobsPages except 3568// it takes a Context and allows setting request options on the pages. 3569// 3570// The context must be non-nil and will be used for request cancellation. If 3571// the context is nil a panic will occur. In the future the SDK may create 3572// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3573// for more information on using Contexts. 3574func (c *Comprehend) ListSentimentDetectionJobsPagesWithContext(ctx aws.Context, input *ListSentimentDetectionJobsInput, fn func(*ListSentimentDetectionJobsOutput, bool) bool, opts ...request.Option) error { 3575 p := request.Pagination{ 3576 NewRequest: func() (*request.Request, error) { 3577 var inCpy *ListSentimentDetectionJobsInput 3578 if input != nil { 3579 tmp := *input 3580 inCpy = &tmp 3581 } 3582 req, _ := c.ListSentimentDetectionJobsRequest(inCpy) 3583 req.SetContext(ctx) 3584 req.ApplyOptions(opts...) 3585 return req, nil 3586 }, 3587 } 3588 3589 for p.Next() { 3590 if !fn(p.Page().(*ListSentimentDetectionJobsOutput), !p.HasNextPage()) { 3591 break 3592 } 3593 } 3594 3595 return p.Err() 3596} 3597 3598const opListTagsForResource = "ListTagsForResource" 3599 3600// ListTagsForResourceRequest generates a "aws/request.Request" representing the 3601// client's request for the ListTagsForResource operation. The "output" return 3602// value will be populated with the request's response once the request completes 3603// successfully. 3604// 3605// Use "Send" method on the returned Request to send the API call to the service. 3606// the "output" return value is not valid until after Send returns without error. 3607// 3608// See ListTagsForResource for more information on using the ListTagsForResource 3609// API call, and error handling. 3610// 3611// This method is useful when you want to inject custom logic or configuration 3612// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3613// 3614// 3615// // Example sending a request using the ListTagsForResourceRequest method. 3616// req, resp := client.ListTagsForResourceRequest(params) 3617// 3618// err := req.Send() 3619// if err == nil { // resp is now filled 3620// fmt.Println(resp) 3621// } 3622// 3623// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListTagsForResource 3624func (c *Comprehend) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { 3625 op := &request.Operation{ 3626 Name: opListTagsForResource, 3627 HTTPMethod: "POST", 3628 HTTPPath: "/", 3629 } 3630 3631 if input == nil { 3632 input = &ListTagsForResourceInput{} 3633 } 3634 3635 output = &ListTagsForResourceOutput{} 3636 req = c.newRequest(op, input, output) 3637 return 3638} 3639 3640// ListTagsForResource API operation for Amazon Comprehend. 3641// 3642// Lists all tags associated with a given Amazon Comprehend resource. 3643// 3644// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3645// with awserr.Error's Code and Message methods to get detailed information about 3646// the error. 3647// 3648// See the AWS API reference guide for Amazon Comprehend's 3649// API operation ListTagsForResource for usage and error information. 3650// 3651// Returned Error Types: 3652// * InvalidRequestException 3653// The request is invalid. 3654// 3655// * ResourceNotFoundException 3656// The specified resource ARN was not found. Check the ARN and try your request 3657// again. 3658// 3659// * InternalServerException 3660// An internal server error occurred. Retry your request. 3661// 3662// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListTagsForResource 3663func (c *Comprehend) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { 3664 req, out := c.ListTagsForResourceRequest(input) 3665 return out, req.Send() 3666} 3667 3668// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of 3669// the ability to pass a context and additional request options. 3670// 3671// See ListTagsForResource for details on how to use this API operation. 3672// 3673// The context must be non-nil and will be used for request cancellation. If 3674// the context is nil a panic will occur. In the future the SDK may create 3675// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3676// for more information on using Contexts. 3677func (c *Comprehend) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { 3678 req, out := c.ListTagsForResourceRequest(input) 3679 req.SetContext(ctx) 3680 req.ApplyOptions(opts...) 3681 return out, req.Send() 3682} 3683 3684const opListTopicsDetectionJobs = "ListTopicsDetectionJobs" 3685 3686// ListTopicsDetectionJobsRequest generates a "aws/request.Request" representing the 3687// client's request for the ListTopicsDetectionJobs operation. The "output" return 3688// value will be populated with the request's response once the request completes 3689// successfully. 3690// 3691// Use "Send" method on the returned Request to send the API call to the service. 3692// the "output" return value is not valid until after Send returns without error. 3693// 3694// See ListTopicsDetectionJobs for more information on using the ListTopicsDetectionJobs 3695// API call, and error handling. 3696// 3697// This method is useful when you want to inject custom logic or configuration 3698// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3699// 3700// 3701// // Example sending a request using the ListTopicsDetectionJobsRequest method. 3702// req, resp := client.ListTopicsDetectionJobsRequest(params) 3703// 3704// err := req.Send() 3705// if err == nil { // resp is now filled 3706// fmt.Println(resp) 3707// } 3708// 3709// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListTopicsDetectionJobs 3710func (c *Comprehend) ListTopicsDetectionJobsRequest(input *ListTopicsDetectionJobsInput) (req *request.Request, output *ListTopicsDetectionJobsOutput) { 3711 op := &request.Operation{ 3712 Name: opListTopicsDetectionJobs, 3713 HTTPMethod: "POST", 3714 HTTPPath: "/", 3715 Paginator: &request.Paginator{ 3716 InputTokens: []string{"NextToken"}, 3717 OutputTokens: []string{"NextToken"}, 3718 LimitToken: "MaxResults", 3719 TruncationToken: "", 3720 }, 3721 } 3722 3723 if input == nil { 3724 input = &ListTopicsDetectionJobsInput{} 3725 } 3726 3727 output = &ListTopicsDetectionJobsOutput{} 3728 req = c.newRequest(op, input, output) 3729 return 3730} 3731 3732// ListTopicsDetectionJobs API operation for Amazon Comprehend. 3733// 3734// Gets a list of the topic detection jobs that you have submitted. 3735// 3736// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3737// with awserr.Error's Code and Message methods to get detailed information about 3738// the error. 3739// 3740// See the AWS API reference guide for Amazon Comprehend's 3741// API operation ListTopicsDetectionJobs for usage and error information. 3742// 3743// Returned Error Types: 3744// * InvalidRequestException 3745// The request is invalid. 3746// 3747// * TooManyRequestsException 3748// The number of requests exceeds the limit. Resubmit your request later. 3749// 3750// * InvalidFilterException 3751// The filter specified for the operation is invalid. Specify a different filter. 3752// 3753// * InternalServerException 3754// An internal server error occurred. Retry your request. 3755// 3756// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListTopicsDetectionJobs 3757func (c *Comprehend) ListTopicsDetectionJobs(input *ListTopicsDetectionJobsInput) (*ListTopicsDetectionJobsOutput, error) { 3758 req, out := c.ListTopicsDetectionJobsRequest(input) 3759 return out, req.Send() 3760} 3761 3762// ListTopicsDetectionJobsWithContext is the same as ListTopicsDetectionJobs with the addition of 3763// the ability to pass a context and additional request options. 3764// 3765// See ListTopicsDetectionJobs for details on how to use this API operation. 3766// 3767// The context must be non-nil and will be used for request cancellation. If 3768// the context is nil a panic will occur. In the future the SDK may create 3769// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3770// for more information on using Contexts. 3771func (c *Comprehend) ListTopicsDetectionJobsWithContext(ctx aws.Context, input *ListTopicsDetectionJobsInput, opts ...request.Option) (*ListTopicsDetectionJobsOutput, error) { 3772 req, out := c.ListTopicsDetectionJobsRequest(input) 3773 req.SetContext(ctx) 3774 req.ApplyOptions(opts...) 3775 return out, req.Send() 3776} 3777 3778// ListTopicsDetectionJobsPages iterates over the pages of a ListTopicsDetectionJobs operation, 3779// calling the "fn" function with the response data for each page. To stop 3780// iterating, return false from the fn function. 3781// 3782// See ListTopicsDetectionJobs method for more information on how to use this operation. 3783// 3784// Note: This operation can generate multiple requests to a service. 3785// 3786// // Example iterating over at most 3 pages of a ListTopicsDetectionJobs operation. 3787// pageNum := 0 3788// err := client.ListTopicsDetectionJobsPages(params, 3789// func(page *comprehend.ListTopicsDetectionJobsOutput, lastPage bool) bool { 3790// pageNum++ 3791// fmt.Println(page) 3792// return pageNum <= 3 3793// }) 3794// 3795func (c *Comprehend) ListTopicsDetectionJobsPages(input *ListTopicsDetectionJobsInput, fn func(*ListTopicsDetectionJobsOutput, bool) bool) error { 3796 return c.ListTopicsDetectionJobsPagesWithContext(aws.BackgroundContext(), input, fn) 3797} 3798 3799// ListTopicsDetectionJobsPagesWithContext same as ListTopicsDetectionJobsPages except 3800// it takes a Context and allows setting request options on the pages. 3801// 3802// The context must be non-nil and will be used for request cancellation. If 3803// the context is nil a panic will occur. In the future the SDK may create 3804// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3805// for more information on using Contexts. 3806func (c *Comprehend) ListTopicsDetectionJobsPagesWithContext(ctx aws.Context, input *ListTopicsDetectionJobsInput, fn func(*ListTopicsDetectionJobsOutput, bool) bool, opts ...request.Option) error { 3807 p := request.Pagination{ 3808 NewRequest: func() (*request.Request, error) { 3809 var inCpy *ListTopicsDetectionJobsInput 3810 if input != nil { 3811 tmp := *input 3812 inCpy = &tmp 3813 } 3814 req, _ := c.ListTopicsDetectionJobsRequest(inCpy) 3815 req.SetContext(ctx) 3816 req.ApplyOptions(opts...) 3817 return req, nil 3818 }, 3819 } 3820 3821 for p.Next() { 3822 if !fn(p.Page().(*ListTopicsDetectionJobsOutput), !p.HasNextPage()) { 3823 break 3824 } 3825 } 3826 3827 return p.Err() 3828} 3829 3830const opStartDocumentClassificationJob = "StartDocumentClassificationJob" 3831 3832// StartDocumentClassificationJobRequest generates a "aws/request.Request" representing the 3833// client's request for the StartDocumentClassificationJob operation. The "output" return 3834// value will be populated with the request's response once the request completes 3835// successfully. 3836// 3837// Use "Send" method on the returned Request to send the API call to the service. 3838// the "output" return value is not valid until after Send returns without error. 3839// 3840// See StartDocumentClassificationJob for more information on using the StartDocumentClassificationJob 3841// API call, and error handling. 3842// 3843// This method is useful when you want to inject custom logic or configuration 3844// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3845// 3846// 3847// // Example sending a request using the StartDocumentClassificationJobRequest method. 3848// req, resp := client.StartDocumentClassificationJobRequest(params) 3849// 3850// err := req.Send() 3851// if err == nil { // resp is now filled 3852// fmt.Println(resp) 3853// } 3854// 3855// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartDocumentClassificationJob 3856func (c *Comprehend) StartDocumentClassificationJobRequest(input *StartDocumentClassificationJobInput) (req *request.Request, output *StartDocumentClassificationJobOutput) { 3857 op := &request.Operation{ 3858 Name: opStartDocumentClassificationJob, 3859 HTTPMethod: "POST", 3860 HTTPPath: "/", 3861 } 3862 3863 if input == nil { 3864 input = &StartDocumentClassificationJobInput{} 3865 } 3866 3867 output = &StartDocumentClassificationJobOutput{} 3868 req = c.newRequest(op, input, output) 3869 return 3870} 3871 3872// StartDocumentClassificationJob API operation for Amazon Comprehend. 3873// 3874// Starts an asynchronous document classification job. Use the operation to 3875// track the progress of the job. 3876// 3877// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3878// with awserr.Error's Code and Message methods to get detailed information about 3879// the error. 3880// 3881// See the AWS API reference guide for Amazon Comprehend's 3882// API operation StartDocumentClassificationJob for usage and error information. 3883// 3884// Returned Error Types: 3885// * InvalidRequestException 3886// The request is invalid. 3887// 3888// * TooManyRequestsException 3889// The number of requests exceeds the limit. Resubmit your request later. 3890// 3891// * ResourceNotFoundException 3892// The specified resource ARN was not found. Check the ARN and try your request 3893// again. 3894// 3895// * ResourceUnavailableException 3896// The specified resource is not available. Check to see if the resource is 3897// in the TRAINED state and try your request again. 3898// 3899// * KmsKeyValidationException 3900// The KMS customer managed key (CMK) entered cannot be validated. Verify the 3901// key and re-enter it. 3902// 3903// * InternalServerException 3904// An internal server error occurred. Retry your request. 3905// 3906// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartDocumentClassificationJob 3907func (c *Comprehend) StartDocumentClassificationJob(input *StartDocumentClassificationJobInput) (*StartDocumentClassificationJobOutput, error) { 3908 req, out := c.StartDocumentClassificationJobRequest(input) 3909 return out, req.Send() 3910} 3911 3912// StartDocumentClassificationJobWithContext is the same as StartDocumentClassificationJob with the addition of 3913// the ability to pass a context and additional request options. 3914// 3915// See StartDocumentClassificationJob for details on how to use this API operation. 3916// 3917// The context must be non-nil and will be used for request cancellation. If 3918// the context is nil a panic will occur. In the future the SDK may create 3919// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 3920// for more information on using Contexts. 3921func (c *Comprehend) StartDocumentClassificationJobWithContext(ctx aws.Context, input *StartDocumentClassificationJobInput, opts ...request.Option) (*StartDocumentClassificationJobOutput, error) { 3922 req, out := c.StartDocumentClassificationJobRequest(input) 3923 req.SetContext(ctx) 3924 req.ApplyOptions(opts...) 3925 return out, req.Send() 3926} 3927 3928const opStartDominantLanguageDetectionJob = "StartDominantLanguageDetectionJob" 3929 3930// StartDominantLanguageDetectionJobRequest generates a "aws/request.Request" representing the 3931// client's request for the StartDominantLanguageDetectionJob operation. The "output" return 3932// value will be populated with the request's response once the request completes 3933// successfully. 3934// 3935// Use "Send" method on the returned Request to send the API call to the service. 3936// the "output" return value is not valid until after Send returns without error. 3937// 3938// See StartDominantLanguageDetectionJob for more information on using the StartDominantLanguageDetectionJob 3939// API call, and error handling. 3940// 3941// This method is useful when you want to inject custom logic or configuration 3942// into the SDK's request lifecycle. Such as custom headers, or retry logic. 3943// 3944// 3945// // Example sending a request using the StartDominantLanguageDetectionJobRequest method. 3946// req, resp := client.StartDominantLanguageDetectionJobRequest(params) 3947// 3948// err := req.Send() 3949// if err == nil { // resp is now filled 3950// fmt.Println(resp) 3951// } 3952// 3953// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartDominantLanguageDetectionJob 3954func (c *Comprehend) StartDominantLanguageDetectionJobRequest(input *StartDominantLanguageDetectionJobInput) (req *request.Request, output *StartDominantLanguageDetectionJobOutput) { 3955 op := &request.Operation{ 3956 Name: opStartDominantLanguageDetectionJob, 3957 HTTPMethod: "POST", 3958 HTTPPath: "/", 3959 } 3960 3961 if input == nil { 3962 input = &StartDominantLanguageDetectionJobInput{} 3963 } 3964 3965 output = &StartDominantLanguageDetectionJobOutput{} 3966 req = c.newRequest(op, input, output) 3967 return 3968} 3969 3970// StartDominantLanguageDetectionJob API operation for Amazon Comprehend. 3971// 3972// Starts an asynchronous dominant language detection job for a collection of 3973// documents. Use the operation to track the status of a job. 3974// 3975// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 3976// with awserr.Error's Code and Message methods to get detailed information about 3977// the error. 3978// 3979// See the AWS API reference guide for Amazon Comprehend's 3980// API operation StartDominantLanguageDetectionJob for usage and error information. 3981// 3982// Returned Error Types: 3983// * InvalidRequestException 3984// The request is invalid. 3985// 3986// * TooManyRequestsException 3987// The number of requests exceeds the limit. Resubmit your request later. 3988// 3989// * KmsKeyValidationException 3990// The KMS customer managed key (CMK) entered cannot be validated. Verify the 3991// key and re-enter it. 3992// 3993// * InternalServerException 3994// An internal server error occurred. Retry your request. 3995// 3996// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartDominantLanguageDetectionJob 3997func (c *Comprehend) StartDominantLanguageDetectionJob(input *StartDominantLanguageDetectionJobInput) (*StartDominantLanguageDetectionJobOutput, error) { 3998 req, out := c.StartDominantLanguageDetectionJobRequest(input) 3999 return out, req.Send() 4000} 4001 4002// StartDominantLanguageDetectionJobWithContext is the same as StartDominantLanguageDetectionJob with the addition of 4003// the ability to pass a context and additional request options. 4004// 4005// See StartDominantLanguageDetectionJob for details on how to use this API operation. 4006// 4007// The context must be non-nil and will be used for request cancellation. If 4008// the context is nil a panic will occur. In the future the SDK may create 4009// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 4010// for more information on using Contexts. 4011func (c *Comprehend) StartDominantLanguageDetectionJobWithContext(ctx aws.Context, input *StartDominantLanguageDetectionJobInput, opts ...request.Option) (*StartDominantLanguageDetectionJobOutput, error) { 4012 req, out := c.StartDominantLanguageDetectionJobRequest(input) 4013 req.SetContext(ctx) 4014 req.ApplyOptions(opts...) 4015 return out, req.Send() 4016} 4017 4018const opStartEntitiesDetectionJob = "StartEntitiesDetectionJob" 4019 4020// StartEntitiesDetectionJobRequest generates a "aws/request.Request" representing the 4021// client's request for the StartEntitiesDetectionJob operation. The "output" return 4022// value will be populated with the request's response once the request completes 4023// successfully. 4024// 4025// Use "Send" method on the returned Request to send the API call to the service. 4026// the "output" return value is not valid until after Send returns without error. 4027// 4028// See StartEntitiesDetectionJob for more information on using the StartEntitiesDetectionJob 4029// API call, and error handling. 4030// 4031// This method is useful when you want to inject custom logic or configuration 4032// into the SDK's request lifecycle. Such as custom headers, or retry logic. 4033// 4034// 4035// // Example sending a request using the StartEntitiesDetectionJobRequest method. 4036// req, resp := client.StartEntitiesDetectionJobRequest(params) 4037// 4038// err := req.Send() 4039// if err == nil { // resp is now filled 4040// fmt.Println(resp) 4041// } 4042// 4043// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartEntitiesDetectionJob 4044func (c *Comprehend) StartEntitiesDetectionJobRequest(input *StartEntitiesDetectionJobInput) (req *request.Request, output *StartEntitiesDetectionJobOutput) { 4045 op := &request.Operation{ 4046 Name: opStartEntitiesDetectionJob, 4047 HTTPMethod: "POST", 4048 HTTPPath: "/", 4049 } 4050 4051 if input == nil { 4052 input = &StartEntitiesDetectionJobInput{} 4053 } 4054 4055 output = &StartEntitiesDetectionJobOutput{} 4056 req = c.newRequest(op, input, output) 4057 return 4058} 4059 4060// StartEntitiesDetectionJob API operation for Amazon Comprehend. 4061// 4062// Starts an asynchronous entity detection job for a collection of documents. 4063// Use the operation to track the status of a job. 4064// 4065// This API can be used for either standard entity detection or custom entity 4066// recognition. In order to be used for custom entity recognition, the optional 4067// EntityRecognizerArn must be used in order to provide access to the recognizer 4068// being used to detect the custom entity. 4069// 4070// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 4071// with awserr.Error's Code and Message methods to get detailed information about 4072// the error. 4073// 4074// See the AWS API reference guide for Amazon Comprehend's 4075// API operation StartEntitiesDetectionJob for usage and error information. 4076// 4077// Returned Error Types: 4078// * InvalidRequestException 4079// The request is invalid. 4080// 4081// * TooManyRequestsException 4082// The number of requests exceeds the limit. Resubmit your request later. 4083// 4084// * ResourceNotFoundException 4085// The specified resource ARN was not found. Check the ARN and try your request 4086// again. 4087// 4088// * ResourceUnavailableException 4089// The specified resource is not available. Check to see if the resource is 4090// in the TRAINED state and try your request again. 4091// 4092// * KmsKeyValidationException 4093// The KMS customer managed key (CMK) entered cannot be validated. Verify the 4094// key and re-enter it. 4095// 4096// * InternalServerException 4097// An internal server error occurred. Retry your request. 4098// 4099// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartEntitiesDetectionJob 4100func (c *Comprehend) StartEntitiesDetectionJob(input *StartEntitiesDetectionJobInput) (*StartEntitiesDetectionJobOutput, error) { 4101 req, out := c.StartEntitiesDetectionJobRequest(input) 4102 return out, req.Send() 4103} 4104 4105// StartEntitiesDetectionJobWithContext is the same as StartEntitiesDetectionJob with the addition of 4106// the ability to pass a context and additional request options. 4107// 4108// See StartEntitiesDetectionJob for details on how to use this API operation. 4109// 4110// The context must be non-nil and will be used for request cancellation. If 4111// the context is nil a panic will occur. In the future the SDK may create 4112// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 4113// for more information on using Contexts. 4114func (c *Comprehend) StartEntitiesDetectionJobWithContext(ctx aws.Context, input *StartEntitiesDetectionJobInput, opts ...request.Option) (*StartEntitiesDetectionJobOutput, error) { 4115 req, out := c.StartEntitiesDetectionJobRequest(input) 4116 req.SetContext(ctx) 4117 req.ApplyOptions(opts...) 4118 return out, req.Send() 4119} 4120 4121const opStartKeyPhrasesDetectionJob = "StartKeyPhrasesDetectionJob" 4122 4123// StartKeyPhrasesDetectionJobRequest generates a "aws/request.Request" representing the 4124// client's request for the StartKeyPhrasesDetectionJob operation. The "output" return 4125// value will be populated with the request's response once the request completes 4126// successfully. 4127// 4128// Use "Send" method on the returned Request to send the API call to the service. 4129// the "output" return value is not valid until after Send returns without error. 4130// 4131// See StartKeyPhrasesDetectionJob for more information on using the StartKeyPhrasesDetectionJob 4132// API call, and error handling. 4133// 4134// This method is useful when you want to inject custom logic or configuration 4135// into the SDK's request lifecycle. Such as custom headers, or retry logic. 4136// 4137// 4138// // Example sending a request using the StartKeyPhrasesDetectionJobRequest method. 4139// req, resp := client.StartKeyPhrasesDetectionJobRequest(params) 4140// 4141// err := req.Send() 4142// if err == nil { // resp is now filled 4143// fmt.Println(resp) 4144// } 4145// 4146// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartKeyPhrasesDetectionJob 4147func (c *Comprehend) StartKeyPhrasesDetectionJobRequest(input *StartKeyPhrasesDetectionJobInput) (req *request.Request, output *StartKeyPhrasesDetectionJobOutput) { 4148 op := &request.Operation{ 4149 Name: opStartKeyPhrasesDetectionJob, 4150 HTTPMethod: "POST", 4151 HTTPPath: "/", 4152 } 4153 4154 if input == nil { 4155 input = &StartKeyPhrasesDetectionJobInput{} 4156 } 4157 4158 output = &StartKeyPhrasesDetectionJobOutput{} 4159 req = c.newRequest(op, input, output) 4160 return 4161} 4162 4163// StartKeyPhrasesDetectionJob API operation for Amazon Comprehend. 4164// 4165// Starts an asynchronous key phrase detection job for a collection of documents. 4166// Use the operation to track the status of a job. 4167// 4168// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 4169// with awserr.Error's Code and Message methods to get detailed information about 4170// the error. 4171// 4172// See the AWS API reference guide for Amazon Comprehend's 4173// API operation StartKeyPhrasesDetectionJob for usage and error information. 4174// 4175// Returned Error Types: 4176// * InvalidRequestException 4177// The request is invalid. 4178// 4179// * TooManyRequestsException 4180// The number of requests exceeds the limit. Resubmit your request later. 4181// 4182// * KmsKeyValidationException 4183// The KMS customer managed key (CMK) entered cannot be validated. Verify the 4184// key and re-enter it. 4185// 4186// * InternalServerException 4187// An internal server error occurred. Retry your request. 4188// 4189// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartKeyPhrasesDetectionJob 4190func (c *Comprehend) StartKeyPhrasesDetectionJob(input *StartKeyPhrasesDetectionJobInput) (*StartKeyPhrasesDetectionJobOutput, error) { 4191 req, out := c.StartKeyPhrasesDetectionJobRequest(input) 4192 return out, req.Send() 4193} 4194 4195// StartKeyPhrasesDetectionJobWithContext is the same as StartKeyPhrasesDetectionJob with the addition of 4196// the ability to pass a context and additional request options. 4197// 4198// See StartKeyPhrasesDetectionJob for details on how to use this API operation. 4199// 4200// The context must be non-nil and will be used for request cancellation. If 4201// the context is nil a panic will occur. In the future the SDK may create 4202// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 4203// for more information on using Contexts. 4204func (c *Comprehend) StartKeyPhrasesDetectionJobWithContext(ctx aws.Context, input *StartKeyPhrasesDetectionJobInput, opts ...request.Option) (*StartKeyPhrasesDetectionJobOutput, error) { 4205 req, out := c.StartKeyPhrasesDetectionJobRequest(input) 4206 req.SetContext(ctx) 4207 req.ApplyOptions(opts...) 4208 return out, req.Send() 4209} 4210 4211const opStartSentimentDetectionJob = "StartSentimentDetectionJob" 4212 4213// StartSentimentDetectionJobRequest generates a "aws/request.Request" representing the 4214// client's request for the StartSentimentDetectionJob operation. The "output" return 4215// value will be populated with the request's response once the request completes 4216// successfully. 4217// 4218// Use "Send" method on the returned Request to send the API call to the service. 4219// the "output" return value is not valid until after Send returns without error. 4220// 4221// See StartSentimentDetectionJob for more information on using the StartSentimentDetectionJob 4222// API call, and error handling. 4223// 4224// This method is useful when you want to inject custom logic or configuration 4225// into the SDK's request lifecycle. Such as custom headers, or retry logic. 4226// 4227// 4228// // Example sending a request using the StartSentimentDetectionJobRequest method. 4229// req, resp := client.StartSentimentDetectionJobRequest(params) 4230// 4231// err := req.Send() 4232// if err == nil { // resp is now filled 4233// fmt.Println(resp) 4234// } 4235// 4236// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartSentimentDetectionJob 4237func (c *Comprehend) StartSentimentDetectionJobRequest(input *StartSentimentDetectionJobInput) (req *request.Request, output *StartSentimentDetectionJobOutput) { 4238 op := &request.Operation{ 4239 Name: opStartSentimentDetectionJob, 4240 HTTPMethod: "POST", 4241 HTTPPath: "/", 4242 } 4243 4244 if input == nil { 4245 input = &StartSentimentDetectionJobInput{} 4246 } 4247 4248 output = &StartSentimentDetectionJobOutput{} 4249 req = c.newRequest(op, input, output) 4250 return 4251} 4252 4253// StartSentimentDetectionJob API operation for Amazon Comprehend. 4254// 4255// Starts an asynchronous sentiment detection job for a collection of documents. 4256// use the operation to track the status of a job. 4257// 4258// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 4259// with awserr.Error's Code and Message methods to get detailed information about 4260// the error. 4261// 4262// See the AWS API reference guide for Amazon Comprehend's 4263// API operation StartSentimentDetectionJob for usage and error information. 4264// 4265// Returned Error Types: 4266// * InvalidRequestException 4267// The request is invalid. 4268// 4269// * TooManyRequestsException 4270// The number of requests exceeds the limit. Resubmit your request later. 4271// 4272// * KmsKeyValidationException 4273// The KMS customer managed key (CMK) entered cannot be validated. Verify the 4274// key and re-enter it. 4275// 4276// * InternalServerException 4277// An internal server error occurred. Retry your request. 4278// 4279// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartSentimentDetectionJob 4280func (c *Comprehend) StartSentimentDetectionJob(input *StartSentimentDetectionJobInput) (*StartSentimentDetectionJobOutput, error) { 4281 req, out := c.StartSentimentDetectionJobRequest(input) 4282 return out, req.Send() 4283} 4284 4285// StartSentimentDetectionJobWithContext is the same as StartSentimentDetectionJob with the addition of 4286// the ability to pass a context and additional request options. 4287// 4288// See StartSentimentDetectionJob for details on how to use this API operation. 4289// 4290// The context must be non-nil and will be used for request cancellation. If 4291// the context is nil a panic will occur. In the future the SDK may create 4292// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 4293// for more information on using Contexts. 4294func (c *Comprehend) StartSentimentDetectionJobWithContext(ctx aws.Context, input *StartSentimentDetectionJobInput, opts ...request.Option) (*StartSentimentDetectionJobOutput, error) { 4295 req, out := c.StartSentimentDetectionJobRequest(input) 4296 req.SetContext(ctx) 4297 req.ApplyOptions(opts...) 4298 return out, req.Send() 4299} 4300 4301const opStartTopicsDetectionJob = "StartTopicsDetectionJob" 4302 4303// StartTopicsDetectionJobRequest generates a "aws/request.Request" representing the 4304// client's request for the StartTopicsDetectionJob operation. The "output" return 4305// value will be populated with the request's response once the request completes 4306// successfully. 4307// 4308// Use "Send" method on the returned Request to send the API call to the service. 4309// the "output" return value is not valid until after Send returns without error. 4310// 4311// See StartTopicsDetectionJob for more information on using the StartTopicsDetectionJob 4312// API call, and error handling. 4313// 4314// This method is useful when you want to inject custom logic or configuration 4315// into the SDK's request lifecycle. Such as custom headers, or retry logic. 4316// 4317// 4318// // Example sending a request using the StartTopicsDetectionJobRequest method. 4319// req, resp := client.StartTopicsDetectionJobRequest(params) 4320// 4321// err := req.Send() 4322// if err == nil { // resp is now filled 4323// fmt.Println(resp) 4324// } 4325// 4326// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartTopicsDetectionJob 4327func (c *Comprehend) StartTopicsDetectionJobRequest(input *StartTopicsDetectionJobInput) (req *request.Request, output *StartTopicsDetectionJobOutput) { 4328 op := &request.Operation{ 4329 Name: opStartTopicsDetectionJob, 4330 HTTPMethod: "POST", 4331 HTTPPath: "/", 4332 } 4333 4334 if input == nil { 4335 input = &StartTopicsDetectionJobInput{} 4336 } 4337 4338 output = &StartTopicsDetectionJobOutput{} 4339 req = c.newRequest(op, input, output) 4340 return 4341} 4342 4343// StartTopicsDetectionJob API operation for Amazon Comprehend. 4344// 4345// Starts an asynchronous topic detection job. Use the DescribeTopicDetectionJob 4346// operation to track the status of a job. 4347// 4348// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 4349// with awserr.Error's Code and Message methods to get detailed information about 4350// the error. 4351// 4352// See the AWS API reference guide for Amazon Comprehend's 4353// API operation StartTopicsDetectionJob for usage and error information. 4354// 4355// Returned Error Types: 4356// * InvalidRequestException 4357// The request is invalid. 4358// 4359// * TooManyRequestsException 4360// The number of requests exceeds the limit. Resubmit your request later. 4361// 4362// * KmsKeyValidationException 4363// The KMS customer managed key (CMK) entered cannot be validated. Verify the 4364// key and re-enter it. 4365// 4366// * InternalServerException 4367// An internal server error occurred. Retry your request. 4368// 4369// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StartTopicsDetectionJob 4370func (c *Comprehend) StartTopicsDetectionJob(input *StartTopicsDetectionJobInput) (*StartTopicsDetectionJobOutput, error) { 4371 req, out := c.StartTopicsDetectionJobRequest(input) 4372 return out, req.Send() 4373} 4374 4375// StartTopicsDetectionJobWithContext is the same as StartTopicsDetectionJob with the addition of 4376// the ability to pass a context and additional request options. 4377// 4378// See StartTopicsDetectionJob for details on how to use this API operation. 4379// 4380// The context must be non-nil and will be used for request cancellation. If 4381// the context is nil a panic will occur. In the future the SDK may create 4382// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 4383// for more information on using Contexts. 4384func (c *Comprehend) StartTopicsDetectionJobWithContext(ctx aws.Context, input *StartTopicsDetectionJobInput, opts ...request.Option) (*StartTopicsDetectionJobOutput, error) { 4385 req, out := c.StartTopicsDetectionJobRequest(input) 4386 req.SetContext(ctx) 4387 req.ApplyOptions(opts...) 4388 return out, req.Send() 4389} 4390 4391const opStopDominantLanguageDetectionJob = "StopDominantLanguageDetectionJob" 4392 4393// StopDominantLanguageDetectionJobRequest generates a "aws/request.Request" representing the 4394// client's request for the StopDominantLanguageDetectionJob operation. The "output" return 4395// value will be populated with the request's response once the request completes 4396// successfully. 4397// 4398// Use "Send" method on the returned Request to send the API call to the service. 4399// the "output" return value is not valid until after Send returns without error. 4400// 4401// See StopDominantLanguageDetectionJob for more information on using the StopDominantLanguageDetectionJob 4402// API call, and error handling. 4403// 4404// This method is useful when you want to inject custom logic or configuration 4405// into the SDK's request lifecycle. Such as custom headers, or retry logic. 4406// 4407// 4408// // Example sending a request using the StopDominantLanguageDetectionJobRequest method. 4409// req, resp := client.StopDominantLanguageDetectionJobRequest(params) 4410// 4411// err := req.Send() 4412// if err == nil { // resp is now filled 4413// fmt.Println(resp) 4414// } 4415// 4416// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopDominantLanguageDetectionJob 4417func (c *Comprehend) StopDominantLanguageDetectionJobRequest(input *StopDominantLanguageDetectionJobInput) (req *request.Request, output *StopDominantLanguageDetectionJobOutput) { 4418 op := &request.Operation{ 4419 Name: opStopDominantLanguageDetectionJob, 4420 HTTPMethod: "POST", 4421 HTTPPath: "/", 4422 } 4423 4424 if input == nil { 4425 input = &StopDominantLanguageDetectionJobInput{} 4426 } 4427 4428 output = &StopDominantLanguageDetectionJobOutput{} 4429 req = c.newRequest(op, input, output) 4430 return 4431} 4432 4433// StopDominantLanguageDetectionJob API operation for Amazon Comprehend. 4434// 4435// Stops a dominant language detection job in progress. 4436// 4437// If the job state is IN_PROGRESS the job is marked for termination and put 4438// into the STOP_REQUESTED state. If the job completes before it can be stopped, 4439// it is put into the COMPLETED state; otherwise the job is stopped and put 4440// into the STOPPED state. 4441// 4442// If the job is in the COMPLETED or FAILED state when you call the StopDominantLanguageDetectionJob 4443// operation, the operation returns a 400 Internal Request Exception. 4444// 4445// When a job is stopped, any documents already processed are written to the 4446// output location. 4447// 4448// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 4449// with awserr.Error's Code and Message methods to get detailed information about 4450// the error. 4451// 4452// See the AWS API reference guide for Amazon Comprehend's 4453// API operation StopDominantLanguageDetectionJob for usage and error information. 4454// 4455// Returned Error Types: 4456// * InvalidRequestException 4457// The request is invalid. 4458// 4459// * JobNotFoundException 4460// The specified job was not found. Check the job ID and try again. 4461// 4462// * InternalServerException 4463// An internal server error occurred. Retry your request. 4464// 4465// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopDominantLanguageDetectionJob 4466func (c *Comprehend) StopDominantLanguageDetectionJob(input *StopDominantLanguageDetectionJobInput) (*StopDominantLanguageDetectionJobOutput, error) { 4467 req, out := c.StopDominantLanguageDetectionJobRequest(input) 4468 return out, req.Send() 4469} 4470 4471// StopDominantLanguageDetectionJobWithContext is the same as StopDominantLanguageDetectionJob with the addition of 4472// the ability to pass a context and additional request options. 4473// 4474// See StopDominantLanguageDetectionJob for details on how to use this API operation. 4475// 4476// The context must be non-nil and will be used for request cancellation. If 4477// the context is nil a panic will occur. In the future the SDK may create 4478// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 4479// for more information on using Contexts. 4480func (c *Comprehend) StopDominantLanguageDetectionJobWithContext(ctx aws.Context, input *StopDominantLanguageDetectionJobInput, opts ...request.Option) (*StopDominantLanguageDetectionJobOutput, error) { 4481 req, out := c.StopDominantLanguageDetectionJobRequest(input) 4482 req.SetContext(ctx) 4483 req.ApplyOptions(opts...) 4484 return out, req.Send() 4485} 4486 4487const opStopEntitiesDetectionJob = "StopEntitiesDetectionJob" 4488 4489// StopEntitiesDetectionJobRequest generates a "aws/request.Request" representing the 4490// client's request for the StopEntitiesDetectionJob operation. The "output" return 4491// value will be populated with the request's response once the request completes 4492// successfully. 4493// 4494// Use "Send" method on the returned Request to send the API call to the service. 4495// the "output" return value is not valid until after Send returns without error. 4496// 4497// See StopEntitiesDetectionJob for more information on using the StopEntitiesDetectionJob 4498// API call, and error handling. 4499// 4500// This method is useful when you want to inject custom logic or configuration 4501// into the SDK's request lifecycle. Such as custom headers, or retry logic. 4502// 4503// 4504// // Example sending a request using the StopEntitiesDetectionJobRequest method. 4505// req, resp := client.StopEntitiesDetectionJobRequest(params) 4506// 4507// err := req.Send() 4508// if err == nil { // resp is now filled 4509// fmt.Println(resp) 4510// } 4511// 4512// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopEntitiesDetectionJob 4513func (c *Comprehend) StopEntitiesDetectionJobRequest(input *StopEntitiesDetectionJobInput) (req *request.Request, output *StopEntitiesDetectionJobOutput) { 4514 op := &request.Operation{ 4515 Name: opStopEntitiesDetectionJob, 4516 HTTPMethod: "POST", 4517 HTTPPath: "/", 4518 } 4519 4520 if input == nil { 4521 input = &StopEntitiesDetectionJobInput{} 4522 } 4523 4524 output = &StopEntitiesDetectionJobOutput{} 4525 req = c.newRequest(op, input, output) 4526 return 4527} 4528 4529// StopEntitiesDetectionJob API operation for Amazon Comprehend. 4530// 4531// Stops an entities detection job in progress. 4532// 4533// If the job state is IN_PROGRESS the job is marked for termination and put 4534// into the STOP_REQUESTED state. If the job completes before it can be stopped, 4535// it is put into the COMPLETED state; otherwise the job is stopped and put 4536// into the STOPPED state. 4537// 4538// If the job is in the COMPLETED or FAILED state when you call the StopDominantLanguageDetectionJob 4539// operation, the operation returns a 400 Internal Request Exception. 4540// 4541// When a job is stopped, any documents already processed are written to the 4542// output location. 4543// 4544// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 4545// with awserr.Error's Code and Message methods to get detailed information about 4546// the error. 4547// 4548// See the AWS API reference guide for Amazon Comprehend's 4549// API operation StopEntitiesDetectionJob for usage and error information. 4550// 4551// Returned Error Types: 4552// * InvalidRequestException 4553// The request is invalid. 4554// 4555// * JobNotFoundException 4556// The specified job was not found. Check the job ID and try again. 4557// 4558// * InternalServerException 4559// An internal server error occurred. Retry your request. 4560// 4561// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopEntitiesDetectionJob 4562func (c *Comprehend) StopEntitiesDetectionJob(input *StopEntitiesDetectionJobInput) (*StopEntitiesDetectionJobOutput, error) { 4563 req, out := c.StopEntitiesDetectionJobRequest(input) 4564 return out, req.Send() 4565} 4566 4567// StopEntitiesDetectionJobWithContext is the same as StopEntitiesDetectionJob with the addition of 4568// the ability to pass a context and additional request options. 4569// 4570// See StopEntitiesDetectionJob for details on how to use this API operation. 4571// 4572// The context must be non-nil and will be used for request cancellation. If 4573// the context is nil a panic will occur. In the future the SDK may create 4574// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 4575// for more information on using Contexts. 4576func (c *Comprehend) StopEntitiesDetectionJobWithContext(ctx aws.Context, input *StopEntitiesDetectionJobInput, opts ...request.Option) (*StopEntitiesDetectionJobOutput, error) { 4577 req, out := c.StopEntitiesDetectionJobRequest(input) 4578 req.SetContext(ctx) 4579 req.ApplyOptions(opts...) 4580 return out, req.Send() 4581} 4582 4583const opStopKeyPhrasesDetectionJob = "StopKeyPhrasesDetectionJob" 4584 4585// StopKeyPhrasesDetectionJobRequest generates a "aws/request.Request" representing the 4586// client's request for the StopKeyPhrasesDetectionJob operation. The "output" return 4587// value will be populated with the request's response once the request completes 4588// successfully. 4589// 4590// Use "Send" method on the returned Request to send the API call to the service. 4591// the "output" return value is not valid until after Send returns without error. 4592// 4593// See StopKeyPhrasesDetectionJob for more information on using the StopKeyPhrasesDetectionJob 4594// API call, and error handling. 4595// 4596// This method is useful when you want to inject custom logic or configuration 4597// into the SDK's request lifecycle. Such as custom headers, or retry logic. 4598// 4599// 4600// // Example sending a request using the StopKeyPhrasesDetectionJobRequest method. 4601// req, resp := client.StopKeyPhrasesDetectionJobRequest(params) 4602// 4603// err := req.Send() 4604// if err == nil { // resp is now filled 4605// fmt.Println(resp) 4606// } 4607// 4608// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopKeyPhrasesDetectionJob 4609func (c *Comprehend) StopKeyPhrasesDetectionJobRequest(input *StopKeyPhrasesDetectionJobInput) (req *request.Request, output *StopKeyPhrasesDetectionJobOutput) { 4610 op := &request.Operation{ 4611 Name: opStopKeyPhrasesDetectionJob, 4612 HTTPMethod: "POST", 4613 HTTPPath: "/", 4614 } 4615 4616 if input == nil { 4617 input = &StopKeyPhrasesDetectionJobInput{} 4618 } 4619 4620 output = &StopKeyPhrasesDetectionJobOutput{} 4621 req = c.newRequest(op, input, output) 4622 return 4623} 4624 4625// StopKeyPhrasesDetectionJob API operation for Amazon Comprehend. 4626// 4627// Stops a key phrases detection job in progress. 4628// 4629// If the job state is IN_PROGRESS the job is marked for termination and put 4630// into the STOP_REQUESTED state. If the job completes before it can be stopped, 4631// it is put into the COMPLETED state; otherwise the job is stopped and put 4632// into the STOPPED state. 4633// 4634// If the job is in the COMPLETED or FAILED state when you call the StopDominantLanguageDetectionJob 4635// operation, the operation returns a 400 Internal Request Exception. 4636// 4637// When a job is stopped, any documents already processed are written to the 4638// output location. 4639// 4640// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 4641// with awserr.Error's Code and Message methods to get detailed information about 4642// the error. 4643// 4644// See the AWS API reference guide for Amazon Comprehend's 4645// API operation StopKeyPhrasesDetectionJob for usage and error information. 4646// 4647// Returned Error Types: 4648// * InvalidRequestException 4649// The request is invalid. 4650// 4651// * JobNotFoundException 4652// The specified job was not found. Check the job ID and try again. 4653// 4654// * InternalServerException 4655// An internal server error occurred. Retry your request. 4656// 4657// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopKeyPhrasesDetectionJob 4658func (c *Comprehend) StopKeyPhrasesDetectionJob(input *StopKeyPhrasesDetectionJobInput) (*StopKeyPhrasesDetectionJobOutput, error) { 4659 req, out := c.StopKeyPhrasesDetectionJobRequest(input) 4660 return out, req.Send() 4661} 4662 4663// StopKeyPhrasesDetectionJobWithContext is the same as StopKeyPhrasesDetectionJob with the addition of 4664// the ability to pass a context and additional request options. 4665// 4666// See StopKeyPhrasesDetectionJob for details on how to use this API operation. 4667// 4668// The context must be non-nil and will be used for request cancellation. If 4669// the context is nil a panic will occur. In the future the SDK may create 4670// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 4671// for more information on using Contexts. 4672func (c *Comprehend) StopKeyPhrasesDetectionJobWithContext(ctx aws.Context, input *StopKeyPhrasesDetectionJobInput, opts ...request.Option) (*StopKeyPhrasesDetectionJobOutput, error) { 4673 req, out := c.StopKeyPhrasesDetectionJobRequest(input) 4674 req.SetContext(ctx) 4675 req.ApplyOptions(opts...) 4676 return out, req.Send() 4677} 4678 4679const opStopSentimentDetectionJob = "StopSentimentDetectionJob" 4680 4681// StopSentimentDetectionJobRequest generates a "aws/request.Request" representing the 4682// client's request for the StopSentimentDetectionJob operation. The "output" return 4683// value will be populated with the request's response once the request completes 4684// successfully. 4685// 4686// Use "Send" method on the returned Request to send the API call to the service. 4687// the "output" return value is not valid until after Send returns without error. 4688// 4689// See StopSentimentDetectionJob for more information on using the StopSentimentDetectionJob 4690// API call, and error handling. 4691// 4692// This method is useful when you want to inject custom logic or configuration 4693// into the SDK's request lifecycle. Such as custom headers, or retry logic. 4694// 4695// 4696// // Example sending a request using the StopSentimentDetectionJobRequest method. 4697// req, resp := client.StopSentimentDetectionJobRequest(params) 4698// 4699// err := req.Send() 4700// if err == nil { // resp is now filled 4701// fmt.Println(resp) 4702// } 4703// 4704// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopSentimentDetectionJob 4705func (c *Comprehend) StopSentimentDetectionJobRequest(input *StopSentimentDetectionJobInput) (req *request.Request, output *StopSentimentDetectionJobOutput) { 4706 op := &request.Operation{ 4707 Name: opStopSentimentDetectionJob, 4708 HTTPMethod: "POST", 4709 HTTPPath: "/", 4710 } 4711 4712 if input == nil { 4713 input = &StopSentimentDetectionJobInput{} 4714 } 4715 4716 output = &StopSentimentDetectionJobOutput{} 4717 req = c.newRequest(op, input, output) 4718 return 4719} 4720 4721// StopSentimentDetectionJob API operation for Amazon Comprehend. 4722// 4723// Stops a sentiment detection job in progress. 4724// 4725// If the job state is IN_PROGRESS the job is marked for termination and put 4726// into the STOP_REQUESTED state. If the job completes before it can be stopped, 4727// it is put into the COMPLETED state; otherwise the job is be stopped and put 4728// into the STOPPED state. 4729// 4730// If the job is in the COMPLETED or FAILED state when you call the StopDominantLanguageDetectionJob 4731// operation, the operation returns a 400 Internal Request Exception. 4732// 4733// When a job is stopped, any documents already processed are written to the 4734// output location. 4735// 4736// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 4737// with awserr.Error's Code and Message methods to get detailed information about 4738// the error. 4739// 4740// See the AWS API reference guide for Amazon Comprehend's 4741// API operation StopSentimentDetectionJob for usage and error information. 4742// 4743// Returned Error Types: 4744// * InvalidRequestException 4745// The request is invalid. 4746// 4747// * JobNotFoundException 4748// The specified job was not found. Check the job ID and try again. 4749// 4750// * InternalServerException 4751// An internal server error occurred. Retry your request. 4752// 4753// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopSentimentDetectionJob 4754func (c *Comprehend) StopSentimentDetectionJob(input *StopSentimentDetectionJobInput) (*StopSentimentDetectionJobOutput, error) { 4755 req, out := c.StopSentimentDetectionJobRequest(input) 4756 return out, req.Send() 4757} 4758 4759// StopSentimentDetectionJobWithContext is the same as StopSentimentDetectionJob with the addition of 4760// the ability to pass a context and additional request options. 4761// 4762// See StopSentimentDetectionJob for details on how to use this API operation. 4763// 4764// The context must be non-nil and will be used for request cancellation. If 4765// the context is nil a panic will occur. In the future the SDK may create 4766// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 4767// for more information on using Contexts. 4768func (c *Comprehend) StopSentimentDetectionJobWithContext(ctx aws.Context, input *StopSentimentDetectionJobInput, opts ...request.Option) (*StopSentimentDetectionJobOutput, error) { 4769 req, out := c.StopSentimentDetectionJobRequest(input) 4770 req.SetContext(ctx) 4771 req.ApplyOptions(opts...) 4772 return out, req.Send() 4773} 4774 4775const opStopTrainingDocumentClassifier = "StopTrainingDocumentClassifier" 4776 4777// StopTrainingDocumentClassifierRequest generates a "aws/request.Request" representing the 4778// client's request for the StopTrainingDocumentClassifier operation. The "output" return 4779// value will be populated with the request's response once the request completes 4780// successfully. 4781// 4782// Use "Send" method on the returned Request to send the API call to the service. 4783// the "output" return value is not valid until after Send returns without error. 4784// 4785// See StopTrainingDocumentClassifier for more information on using the StopTrainingDocumentClassifier 4786// API call, and error handling. 4787// 4788// This method is useful when you want to inject custom logic or configuration 4789// into the SDK's request lifecycle. Such as custom headers, or retry logic. 4790// 4791// 4792// // Example sending a request using the StopTrainingDocumentClassifierRequest method. 4793// req, resp := client.StopTrainingDocumentClassifierRequest(params) 4794// 4795// err := req.Send() 4796// if err == nil { // resp is now filled 4797// fmt.Println(resp) 4798// } 4799// 4800// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopTrainingDocumentClassifier 4801func (c *Comprehend) StopTrainingDocumentClassifierRequest(input *StopTrainingDocumentClassifierInput) (req *request.Request, output *StopTrainingDocumentClassifierOutput) { 4802 op := &request.Operation{ 4803 Name: opStopTrainingDocumentClassifier, 4804 HTTPMethod: "POST", 4805 HTTPPath: "/", 4806 } 4807 4808 if input == nil { 4809 input = &StopTrainingDocumentClassifierInput{} 4810 } 4811 4812 output = &StopTrainingDocumentClassifierOutput{} 4813 req = c.newRequest(op, input, output) 4814 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 4815 return 4816} 4817 4818// StopTrainingDocumentClassifier API operation for Amazon Comprehend. 4819// 4820// Stops a document classifier training job while in progress. 4821// 4822// If the training job state is TRAINING, the job is marked for termination 4823// and put into the STOP_REQUESTED state. If the training job completes before 4824// it can be stopped, it is put into the TRAINED; otherwise the training job 4825// is stopped and put into the STOPPED state and the service sends back an HTTP 4826// 200 response with an empty HTTP body. 4827// 4828// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 4829// with awserr.Error's Code and Message methods to get detailed information about 4830// the error. 4831// 4832// See the AWS API reference guide for Amazon Comprehend's 4833// API operation StopTrainingDocumentClassifier for usage and error information. 4834// 4835// Returned Error Types: 4836// * InvalidRequestException 4837// The request is invalid. 4838// 4839// * TooManyRequestsException 4840// The number of requests exceeds the limit. Resubmit your request later. 4841// 4842// * ResourceNotFoundException 4843// The specified resource ARN was not found. Check the ARN and try your request 4844// again. 4845// 4846// * InternalServerException 4847// An internal server error occurred. Retry your request. 4848// 4849// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopTrainingDocumentClassifier 4850func (c *Comprehend) StopTrainingDocumentClassifier(input *StopTrainingDocumentClassifierInput) (*StopTrainingDocumentClassifierOutput, error) { 4851 req, out := c.StopTrainingDocumentClassifierRequest(input) 4852 return out, req.Send() 4853} 4854 4855// StopTrainingDocumentClassifierWithContext is the same as StopTrainingDocumentClassifier with the addition of 4856// the ability to pass a context and additional request options. 4857// 4858// See StopTrainingDocumentClassifier for details on how to use this API operation. 4859// 4860// The context must be non-nil and will be used for request cancellation. If 4861// the context is nil a panic will occur. In the future the SDK may create 4862// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 4863// for more information on using Contexts. 4864func (c *Comprehend) StopTrainingDocumentClassifierWithContext(ctx aws.Context, input *StopTrainingDocumentClassifierInput, opts ...request.Option) (*StopTrainingDocumentClassifierOutput, error) { 4865 req, out := c.StopTrainingDocumentClassifierRequest(input) 4866 req.SetContext(ctx) 4867 req.ApplyOptions(opts...) 4868 return out, req.Send() 4869} 4870 4871const opStopTrainingEntityRecognizer = "StopTrainingEntityRecognizer" 4872 4873// StopTrainingEntityRecognizerRequest generates a "aws/request.Request" representing the 4874// client's request for the StopTrainingEntityRecognizer operation. The "output" return 4875// value will be populated with the request's response once the request completes 4876// successfully. 4877// 4878// Use "Send" method on the returned Request to send the API call to the service. 4879// the "output" return value is not valid until after Send returns without error. 4880// 4881// See StopTrainingEntityRecognizer for more information on using the StopTrainingEntityRecognizer 4882// API call, and error handling. 4883// 4884// This method is useful when you want to inject custom logic or configuration 4885// into the SDK's request lifecycle. Such as custom headers, or retry logic. 4886// 4887// 4888// // Example sending a request using the StopTrainingEntityRecognizerRequest method. 4889// req, resp := client.StopTrainingEntityRecognizerRequest(params) 4890// 4891// err := req.Send() 4892// if err == nil { // resp is now filled 4893// fmt.Println(resp) 4894// } 4895// 4896// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopTrainingEntityRecognizer 4897func (c *Comprehend) StopTrainingEntityRecognizerRequest(input *StopTrainingEntityRecognizerInput) (req *request.Request, output *StopTrainingEntityRecognizerOutput) { 4898 op := &request.Operation{ 4899 Name: opStopTrainingEntityRecognizer, 4900 HTTPMethod: "POST", 4901 HTTPPath: "/", 4902 } 4903 4904 if input == nil { 4905 input = &StopTrainingEntityRecognizerInput{} 4906 } 4907 4908 output = &StopTrainingEntityRecognizerOutput{} 4909 req = c.newRequest(op, input, output) 4910 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 4911 return 4912} 4913 4914// StopTrainingEntityRecognizer API operation for Amazon Comprehend. 4915// 4916// Stops an entity recognizer training job while in progress. 4917// 4918// If the training job state is TRAINING, the job is marked for termination 4919// and put into the STOP_REQUESTED state. If the training job completes before 4920// it can be stopped, it is put into the TRAINED; otherwise the training job 4921// is stopped and putted into the STOPPED state and the service sends back an 4922// HTTP 200 response with an empty HTTP body. 4923// 4924// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 4925// with awserr.Error's Code and Message methods to get detailed information about 4926// the error. 4927// 4928// See the AWS API reference guide for Amazon Comprehend's 4929// API operation StopTrainingEntityRecognizer for usage and error information. 4930// 4931// Returned Error Types: 4932// * InvalidRequestException 4933// The request is invalid. 4934// 4935// * TooManyRequestsException 4936// The number of requests exceeds the limit. Resubmit your request later. 4937// 4938// * ResourceNotFoundException 4939// The specified resource ARN was not found. Check the ARN and try your request 4940// again. 4941// 4942// * InternalServerException 4943// An internal server error occurred. Retry your request. 4944// 4945// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/StopTrainingEntityRecognizer 4946func (c *Comprehend) StopTrainingEntityRecognizer(input *StopTrainingEntityRecognizerInput) (*StopTrainingEntityRecognizerOutput, error) { 4947 req, out := c.StopTrainingEntityRecognizerRequest(input) 4948 return out, req.Send() 4949} 4950 4951// StopTrainingEntityRecognizerWithContext is the same as StopTrainingEntityRecognizer with the addition of 4952// the ability to pass a context and additional request options. 4953// 4954// See StopTrainingEntityRecognizer for details on how to use this API operation. 4955// 4956// The context must be non-nil and will be used for request cancellation. If 4957// the context is nil a panic will occur. In the future the SDK may create 4958// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 4959// for more information on using Contexts. 4960func (c *Comprehend) StopTrainingEntityRecognizerWithContext(ctx aws.Context, input *StopTrainingEntityRecognizerInput, opts ...request.Option) (*StopTrainingEntityRecognizerOutput, error) { 4961 req, out := c.StopTrainingEntityRecognizerRequest(input) 4962 req.SetContext(ctx) 4963 req.ApplyOptions(opts...) 4964 return out, req.Send() 4965} 4966 4967const opTagResource = "TagResource" 4968 4969// TagResourceRequest generates a "aws/request.Request" representing the 4970// client's request for the TagResource operation. The "output" return 4971// value will be populated with the request's response once the request completes 4972// successfully. 4973// 4974// Use "Send" method on the returned Request to send the API call to the service. 4975// the "output" return value is not valid until after Send returns without error. 4976// 4977// See TagResource for more information on using the TagResource 4978// API call, and error handling. 4979// 4980// This method is useful when you want to inject custom logic or configuration 4981// into the SDK's request lifecycle. Such as custom headers, or retry logic. 4982// 4983// 4984// // Example sending a request using the TagResourceRequest method. 4985// req, resp := client.TagResourceRequest(params) 4986// 4987// err := req.Send() 4988// if err == nil { // resp is now filled 4989// fmt.Println(resp) 4990// } 4991// 4992// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/TagResource 4993func (c *Comprehend) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { 4994 op := &request.Operation{ 4995 Name: opTagResource, 4996 HTTPMethod: "POST", 4997 HTTPPath: "/", 4998 } 4999 5000 if input == nil { 5001 input = &TagResourceInput{} 5002 } 5003 5004 output = &TagResourceOutput{} 5005 req = c.newRequest(op, input, output) 5006 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 5007 return 5008} 5009 5010// TagResource API operation for Amazon Comprehend. 5011// 5012// Associates a specific tag with an Amazon Comprehend resource. A tag is a 5013// key-value pair that adds as a metadata to a resource used by Amazon Comprehend. 5014// For example, a tag with "Sales" as the key might be added to a resource to 5015// indicate its use by the sales department. 5016// 5017// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 5018// with awserr.Error's Code and Message methods to get detailed information about 5019// the error. 5020// 5021// See the AWS API reference guide for Amazon Comprehend's 5022// API operation TagResource for usage and error information. 5023// 5024// Returned Error Types: 5025// * InvalidRequestException 5026// The request is invalid. 5027// 5028// * ConcurrentModificationException 5029// Concurrent modification of the tags associated with an Amazon Comprehend 5030// resource is not supported. 5031// 5032// * ResourceNotFoundException 5033// The specified resource ARN was not found. Check the ARN and try your request 5034// again. 5035// 5036// * TooManyTagsException 5037// The request contains more tags than can be associated with a resource (50 5038// tags per resource). The maximum number of tags includes both existing tags 5039// and those included in your current request. 5040// 5041// * InternalServerException 5042// An internal server error occurred. Retry your request. 5043// 5044// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/TagResource 5045func (c *Comprehend) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { 5046 req, out := c.TagResourceRequest(input) 5047 return out, req.Send() 5048} 5049 5050// TagResourceWithContext is the same as TagResource with the addition of 5051// the ability to pass a context and additional request options. 5052// 5053// See TagResource for details on how to use this API operation. 5054// 5055// The context must be non-nil and will be used for request cancellation. If 5056// the context is nil a panic will occur. In the future the SDK may create 5057// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 5058// for more information on using Contexts. 5059func (c *Comprehend) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { 5060 req, out := c.TagResourceRequest(input) 5061 req.SetContext(ctx) 5062 req.ApplyOptions(opts...) 5063 return out, req.Send() 5064} 5065 5066const opUntagResource = "UntagResource" 5067 5068// UntagResourceRequest generates a "aws/request.Request" representing the 5069// client's request for the UntagResource operation. The "output" return 5070// value will be populated with the request's response once the request completes 5071// successfully. 5072// 5073// Use "Send" method on the returned Request to send the API call to the service. 5074// the "output" return value is not valid until after Send returns without error. 5075// 5076// See UntagResource for more information on using the UntagResource 5077// API call, and error handling. 5078// 5079// This method is useful when you want to inject custom logic or configuration 5080// into the SDK's request lifecycle. Such as custom headers, or retry logic. 5081// 5082// 5083// // Example sending a request using the UntagResourceRequest method. 5084// req, resp := client.UntagResourceRequest(params) 5085// 5086// err := req.Send() 5087// if err == nil { // resp is now filled 5088// fmt.Println(resp) 5089// } 5090// 5091// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/UntagResource 5092func (c *Comprehend) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { 5093 op := &request.Operation{ 5094 Name: opUntagResource, 5095 HTTPMethod: "POST", 5096 HTTPPath: "/", 5097 } 5098 5099 if input == nil { 5100 input = &UntagResourceInput{} 5101 } 5102 5103 output = &UntagResourceOutput{} 5104 req = c.newRequest(op, input, output) 5105 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 5106 return 5107} 5108 5109// UntagResource API operation for Amazon Comprehend. 5110// 5111// Removes a specific tag associated with an Amazon Comprehend resource. 5112// 5113// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 5114// with awserr.Error's Code and Message methods to get detailed information about 5115// the error. 5116// 5117// See the AWS API reference guide for Amazon Comprehend's 5118// API operation UntagResource for usage and error information. 5119// 5120// Returned Error Types: 5121// * TooManyTagKeysException 5122// The request contains more tag keys than can be associated with a resource 5123// (50 tag keys per resource). 5124// 5125// * InvalidRequestException 5126// The request is invalid. 5127// 5128// * ConcurrentModificationException 5129// Concurrent modification of the tags associated with an Amazon Comprehend 5130// resource is not supported. 5131// 5132// * ResourceNotFoundException 5133// The specified resource ARN was not found. Check the ARN and try your request 5134// again. 5135// 5136// * InternalServerException 5137// An internal server error occurred. Retry your request. 5138// 5139// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/UntagResource 5140func (c *Comprehend) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { 5141 req, out := c.UntagResourceRequest(input) 5142 return out, req.Send() 5143} 5144 5145// UntagResourceWithContext is the same as UntagResource with the addition of 5146// the ability to pass a context and additional request options. 5147// 5148// See UntagResource for details on how to use this API operation. 5149// 5150// The context must be non-nil and will be used for request cancellation. If 5151// the context is nil a panic will occur. In the future the SDK may create 5152// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 5153// for more information on using Contexts. 5154func (c *Comprehend) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { 5155 req, out := c.UntagResourceRequest(input) 5156 req.SetContext(ctx) 5157 req.ApplyOptions(opts...) 5158 return out, req.Send() 5159} 5160 5161const opUpdateEndpoint = "UpdateEndpoint" 5162 5163// UpdateEndpointRequest generates a "aws/request.Request" representing the 5164// client's request for the UpdateEndpoint operation. The "output" return 5165// value will be populated with the request's response once the request completes 5166// successfully. 5167// 5168// Use "Send" method on the returned Request to send the API call to the service. 5169// the "output" return value is not valid until after Send returns without error. 5170// 5171// See UpdateEndpoint for more information on using the UpdateEndpoint 5172// API call, and error handling. 5173// 5174// This method is useful when you want to inject custom logic or configuration 5175// into the SDK's request lifecycle. Such as custom headers, or retry logic. 5176// 5177// 5178// // Example sending a request using the UpdateEndpointRequest method. 5179// req, resp := client.UpdateEndpointRequest(params) 5180// 5181// err := req.Send() 5182// if err == nil { // resp is now filled 5183// fmt.Println(resp) 5184// } 5185// 5186// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/UpdateEndpoint 5187func (c *Comprehend) UpdateEndpointRequest(input *UpdateEndpointInput) (req *request.Request, output *UpdateEndpointOutput) { 5188 op := &request.Operation{ 5189 Name: opUpdateEndpoint, 5190 HTTPMethod: "POST", 5191 HTTPPath: "/", 5192 } 5193 5194 if input == nil { 5195 input = &UpdateEndpointInput{} 5196 } 5197 5198 output = &UpdateEndpointOutput{} 5199 req = c.newRequest(op, input, output) 5200 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 5201 return 5202} 5203 5204// UpdateEndpoint API operation for Amazon Comprehend. 5205// 5206// Updates information about the specified endpoint. 5207// 5208// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 5209// with awserr.Error's Code and Message methods to get detailed information about 5210// the error. 5211// 5212// See the AWS API reference guide for Amazon Comprehend's 5213// API operation UpdateEndpoint for usage and error information. 5214// 5215// Returned Error Types: 5216// * InvalidRequestException 5217// The request is invalid. 5218// 5219// * TooManyRequestsException 5220// The number of requests exceeds the limit. Resubmit your request later. 5221// 5222// * ResourceInUseException 5223// The specified name is already in use. Use a different name and try your request 5224// again. 5225// 5226// * ResourceLimitExceededException 5227// The maximum number of recognizers per account has been exceeded. Review the 5228// recognizers, perform cleanup, and then try your request again. 5229// 5230// * ResourceNotFoundException 5231// The specified resource ARN was not found. Check the ARN and try your request 5232// again. 5233// 5234// * ResourceUnavailableException 5235// The specified resource is not available. Check to see if the resource is 5236// in the TRAINED state and try your request again. 5237// 5238// * InternalServerException 5239// An internal server error occurred. Retry your request. 5240// 5241// See also, https://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/UpdateEndpoint 5242func (c *Comprehend) UpdateEndpoint(input *UpdateEndpointInput) (*UpdateEndpointOutput, error) { 5243 req, out := c.UpdateEndpointRequest(input) 5244 return out, req.Send() 5245} 5246 5247// UpdateEndpointWithContext is the same as UpdateEndpoint with the addition of 5248// the ability to pass a context and additional request options. 5249// 5250// See UpdateEndpoint for details on how to use this API operation. 5251// 5252// The context must be non-nil and will be used for request cancellation. If 5253// the context is nil a panic will occur. In the future the SDK may create 5254// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 5255// for more information on using Contexts. 5256func (c *Comprehend) UpdateEndpointWithContext(ctx aws.Context, input *UpdateEndpointInput, opts ...request.Option) (*UpdateEndpointOutput, error) { 5257 req, out := c.UpdateEndpointRequest(input) 5258 req.SetContext(ctx) 5259 req.ApplyOptions(opts...) 5260 return out, req.Send() 5261} 5262 5263type BatchDetectDominantLanguageInput struct { 5264 _ struct{} `type:"structure"` 5265 5266 // A list containing the text of the input documents. The list can contain a 5267 // maximum of 25 documents. Each document should contain at least 20 characters 5268 // and must contain fewer than 5,000 bytes of UTF-8 encoded characters. 5269 // 5270 // TextList is a required field 5271 TextList []*string `type:"list" required:"true"` 5272} 5273 5274// String returns the string representation 5275func (s BatchDetectDominantLanguageInput) String() string { 5276 return awsutil.Prettify(s) 5277} 5278 5279// GoString returns the string representation 5280func (s BatchDetectDominantLanguageInput) GoString() string { 5281 return s.String() 5282} 5283 5284// Validate inspects the fields of the type to determine if they are valid. 5285func (s *BatchDetectDominantLanguageInput) Validate() error { 5286 invalidParams := request.ErrInvalidParams{Context: "BatchDetectDominantLanguageInput"} 5287 if s.TextList == nil { 5288 invalidParams.Add(request.NewErrParamRequired("TextList")) 5289 } 5290 5291 if invalidParams.Len() > 0 { 5292 return invalidParams 5293 } 5294 return nil 5295} 5296 5297// SetTextList sets the TextList field's value. 5298func (s *BatchDetectDominantLanguageInput) SetTextList(v []*string) *BatchDetectDominantLanguageInput { 5299 s.TextList = v 5300 return s 5301} 5302 5303// The result of calling the operation. The operation returns one object for 5304// each document that is successfully processed by the operation. 5305type BatchDetectDominantLanguageItemResult struct { 5306 _ struct{} `type:"structure"` 5307 5308 // The zero-based index of the document in the input list. 5309 Index *int64 `type:"integer"` 5310 5311 // One or more DominantLanguage objects describing the dominant languages in 5312 // the document. 5313 Languages []*DominantLanguage `type:"list"` 5314} 5315 5316// String returns the string representation 5317func (s BatchDetectDominantLanguageItemResult) String() string { 5318 return awsutil.Prettify(s) 5319} 5320 5321// GoString returns the string representation 5322func (s BatchDetectDominantLanguageItemResult) GoString() string { 5323 return s.String() 5324} 5325 5326// SetIndex sets the Index field's value. 5327func (s *BatchDetectDominantLanguageItemResult) SetIndex(v int64) *BatchDetectDominantLanguageItemResult { 5328 s.Index = &v 5329 return s 5330} 5331 5332// SetLanguages sets the Languages field's value. 5333func (s *BatchDetectDominantLanguageItemResult) SetLanguages(v []*DominantLanguage) *BatchDetectDominantLanguageItemResult { 5334 s.Languages = v 5335 return s 5336} 5337 5338type BatchDetectDominantLanguageOutput struct { 5339 _ struct{} `type:"structure"` 5340 5341 // A list containing one object for each document that contained an error. The 5342 // results are sorted in ascending order by the Index field and match the order 5343 // of the documents in the input list. If there are no errors in the batch, 5344 // the ErrorList is empty. 5345 // 5346 // ErrorList is a required field 5347 ErrorList []*BatchItemError `type:"list" required:"true"` 5348 5349 // A list of objects containing the results of the operation. The results are 5350 // sorted in ascending order by the Index field and match the order of the documents 5351 // in the input list. If all of the documents contain an error, the ResultList 5352 // is empty. 5353 // 5354 // ResultList is a required field 5355 ResultList []*BatchDetectDominantLanguageItemResult `type:"list" required:"true"` 5356} 5357 5358// String returns the string representation 5359func (s BatchDetectDominantLanguageOutput) String() string { 5360 return awsutil.Prettify(s) 5361} 5362 5363// GoString returns the string representation 5364func (s BatchDetectDominantLanguageOutput) GoString() string { 5365 return s.String() 5366} 5367 5368// SetErrorList sets the ErrorList field's value. 5369func (s *BatchDetectDominantLanguageOutput) SetErrorList(v []*BatchItemError) *BatchDetectDominantLanguageOutput { 5370 s.ErrorList = v 5371 return s 5372} 5373 5374// SetResultList sets the ResultList field's value. 5375func (s *BatchDetectDominantLanguageOutput) SetResultList(v []*BatchDetectDominantLanguageItemResult) *BatchDetectDominantLanguageOutput { 5376 s.ResultList = v 5377 return s 5378} 5379 5380type BatchDetectEntitiesInput struct { 5381 _ struct{} `type:"structure"` 5382 5383 // The language of the input documents. You can specify any of the primary languages 5384 // supported by Amazon Comprehend. All documents must be in the same language. 5385 // 5386 // LanguageCode is a required field 5387 LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"` 5388 5389 // A list containing the text of the input documents. The list can contain a 5390 // maximum of 25 documents. Each document must contain fewer than 5,000 bytes 5391 // of UTF-8 encoded characters. 5392 // 5393 // TextList is a required field 5394 TextList []*string `type:"list" required:"true"` 5395} 5396 5397// String returns the string representation 5398func (s BatchDetectEntitiesInput) String() string { 5399 return awsutil.Prettify(s) 5400} 5401 5402// GoString returns the string representation 5403func (s BatchDetectEntitiesInput) GoString() string { 5404 return s.String() 5405} 5406 5407// Validate inspects the fields of the type to determine if they are valid. 5408func (s *BatchDetectEntitiesInput) Validate() error { 5409 invalidParams := request.ErrInvalidParams{Context: "BatchDetectEntitiesInput"} 5410 if s.LanguageCode == nil { 5411 invalidParams.Add(request.NewErrParamRequired("LanguageCode")) 5412 } 5413 if s.TextList == nil { 5414 invalidParams.Add(request.NewErrParamRequired("TextList")) 5415 } 5416 5417 if invalidParams.Len() > 0 { 5418 return invalidParams 5419 } 5420 return nil 5421} 5422 5423// SetLanguageCode sets the LanguageCode field's value. 5424func (s *BatchDetectEntitiesInput) SetLanguageCode(v string) *BatchDetectEntitiesInput { 5425 s.LanguageCode = &v 5426 return s 5427} 5428 5429// SetTextList sets the TextList field's value. 5430func (s *BatchDetectEntitiesInput) SetTextList(v []*string) *BatchDetectEntitiesInput { 5431 s.TextList = v 5432 return s 5433} 5434 5435// The result of calling the operation. The operation returns one object for 5436// each document that is successfully processed by the operation. 5437type BatchDetectEntitiesItemResult struct { 5438 _ struct{} `type:"structure"` 5439 5440 // One or more Entity objects, one for each entity detected in the document. 5441 Entities []*Entity `type:"list"` 5442 5443 // The zero-based index of the document in the input list. 5444 Index *int64 `type:"integer"` 5445} 5446 5447// String returns the string representation 5448func (s BatchDetectEntitiesItemResult) String() string { 5449 return awsutil.Prettify(s) 5450} 5451 5452// GoString returns the string representation 5453func (s BatchDetectEntitiesItemResult) GoString() string { 5454 return s.String() 5455} 5456 5457// SetEntities sets the Entities field's value. 5458func (s *BatchDetectEntitiesItemResult) SetEntities(v []*Entity) *BatchDetectEntitiesItemResult { 5459 s.Entities = v 5460 return s 5461} 5462 5463// SetIndex sets the Index field's value. 5464func (s *BatchDetectEntitiesItemResult) SetIndex(v int64) *BatchDetectEntitiesItemResult { 5465 s.Index = &v 5466 return s 5467} 5468 5469type BatchDetectEntitiesOutput struct { 5470 _ struct{} `type:"structure"` 5471 5472 // A list containing one object for each document that contained an error. The 5473 // results are sorted in ascending order by the Index field and match the order 5474 // of the documents in the input list. If there are no errors in the batch, 5475 // the ErrorList is empty. 5476 // 5477 // ErrorList is a required field 5478 ErrorList []*BatchItemError `type:"list" required:"true"` 5479 5480 // A list of objects containing the results of the operation. The results are 5481 // sorted in ascending order by the Index field and match the order of the documents 5482 // in the input list. If all of the documents contain an error, the ResultList 5483 // is empty. 5484 // 5485 // ResultList is a required field 5486 ResultList []*BatchDetectEntitiesItemResult `type:"list" required:"true"` 5487} 5488 5489// String returns the string representation 5490func (s BatchDetectEntitiesOutput) String() string { 5491 return awsutil.Prettify(s) 5492} 5493 5494// GoString returns the string representation 5495func (s BatchDetectEntitiesOutput) GoString() string { 5496 return s.String() 5497} 5498 5499// SetErrorList sets the ErrorList field's value. 5500func (s *BatchDetectEntitiesOutput) SetErrorList(v []*BatchItemError) *BatchDetectEntitiesOutput { 5501 s.ErrorList = v 5502 return s 5503} 5504 5505// SetResultList sets the ResultList field's value. 5506func (s *BatchDetectEntitiesOutput) SetResultList(v []*BatchDetectEntitiesItemResult) *BatchDetectEntitiesOutput { 5507 s.ResultList = v 5508 return s 5509} 5510 5511type BatchDetectKeyPhrasesInput struct { 5512 _ struct{} `type:"structure"` 5513 5514 // The language of the input documents. You can specify any of the primary languages 5515 // supported by Amazon Comprehend. All documents must be in the same language. 5516 // 5517 // LanguageCode is a required field 5518 LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"` 5519 5520 // A list containing the text of the input documents. The list can contain a 5521 // maximum of 25 documents. Each document must contain fewer that 5,000 bytes 5522 // of UTF-8 encoded characters. 5523 // 5524 // TextList is a required field 5525 TextList []*string `type:"list" required:"true"` 5526} 5527 5528// String returns the string representation 5529func (s BatchDetectKeyPhrasesInput) String() string { 5530 return awsutil.Prettify(s) 5531} 5532 5533// GoString returns the string representation 5534func (s BatchDetectKeyPhrasesInput) GoString() string { 5535 return s.String() 5536} 5537 5538// Validate inspects the fields of the type to determine if they are valid. 5539func (s *BatchDetectKeyPhrasesInput) Validate() error { 5540 invalidParams := request.ErrInvalidParams{Context: "BatchDetectKeyPhrasesInput"} 5541 if s.LanguageCode == nil { 5542 invalidParams.Add(request.NewErrParamRequired("LanguageCode")) 5543 } 5544 if s.TextList == nil { 5545 invalidParams.Add(request.NewErrParamRequired("TextList")) 5546 } 5547 5548 if invalidParams.Len() > 0 { 5549 return invalidParams 5550 } 5551 return nil 5552} 5553 5554// SetLanguageCode sets the LanguageCode field's value. 5555func (s *BatchDetectKeyPhrasesInput) SetLanguageCode(v string) *BatchDetectKeyPhrasesInput { 5556 s.LanguageCode = &v 5557 return s 5558} 5559 5560// SetTextList sets the TextList field's value. 5561func (s *BatchDetectKeyPhrasesInput) SetTextList(v []*string) *BatchDetectKeyPhrasesInput { 5562 s.TextList = v 5563 return s 5564} 5565 5566// The result of calling the operation. The operation returns one object for 5567// each document that is successfully processed by the operation. 5568type BatchDetectKeyPhrasesItemResult struct { 5569 _ struct{} `type:"structure"` 5570 5571 // The zero-based index of the document in the input list. 5572 Index *int64 `type:"integer"` 5573 5574 // One or more KeyPhrase objects, one for each key phrase detected in the document. 5575 KeyPhrases []*KeyPhrase `type:"list"` 5576} 5577 5578// String returns the string representation 5579func (s BatchDetectKeyPhrasesItemResult) String() string { 5580 return awsutil.Prettify(s) 5581} 5582 5583// GoString returns the string representation 5584func (s BatchDetectKeyPhrasesItemResult) GoString() string { 5585 return s.String() 5586} 5587 5588// SetIndex sets the Index field's value. 5589func (s *BatchDetectKeyPhrasesItemResult) SetIndex(v int64) *BatchDetectKeyPhrasesItemResult { 5590 s.Index = &v 5591 return s 5592} 5593 5594// SetKeyPhrases sets the KeyPhrases field's value. 5595func (s *BatchDetectKeyPhrasesItemResult) SetKeyPhrases(v []*KeyPhrase) *BatchDetectKeyPhrasesItemResult { 5596 s.KeyPhrases = v 5597 return s 5598} 5599 5600type BatchDetectKeyPhrasesOutput struct { 5601 _ struct{} `type:"structure"` 5602 5603 // A list containing one object for each document that contained an error. The 5604 // results are sorted in ascending order by the Index field and match the order 5605 // of the documents in the input list. If there are no errors in the batch, 5606 // the ErrorList is empty. 5607 // 5608 // ErrorList is a required field 5609 ErrorList []*BatchItemError `type:"list" required:"true"` 5610 5611 // A list of objects containing the results of the operation. The results are 5612 // sorted in ascending order by the Index field and match the order of the documents 5613 // in the input list. If all of the documents contain an error, the ResultList 5614 // is empty. 5615 // 5616 // ResultList is a required field 5617 ResultList []*BatchDetectKeyPhrasesItemResult `type:"list" required:"true"` 5618} 5619 5620// String returns the string representation 5621func (s BatchDetectKeyPhrasesOutput) String() string { 5622 return awsutil.Prettify(s) 5623} 5624 5625// GoString returns the string representation 5626func (s BatchDetectKeyPhrasesOutput) GoString() string { 5627 return s.String() 5628} 5629 5630// SetErrorList sets the ErrorList field's value. 5631func (s *BatchDetectKeyPhrasesOutput) SetErrorList(v []*BatchItemError) *BatchDetectKeyPhrasesOutput { 5632 s.ErrorList = v 5633 return s 5634} 5635 5636// SetResultList sets the ResultList field's value. 5637func (s *BatchDetectKeyPhrasesOutput) SetResultList(v []*BatchDetectKeyPhrasesItemResult) *BatchDetectKeyPhrasesOutput { 5638 s.ResultList = v 5639 return s 5640} 5641 5642type BatchDetectSentimentInput struct { 5643 _ struct{} `type:"structure"` 5644 5645 // The language of the input documents. You can specify any of the primary languages 5646 // supported by Amazon Comprehend. All documents must be in the same language. 5647 // 5648 // LanguageCode is a required field 5649 LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"` 5650 5651 // A list containing the text of the input documents. The list can contain a 5652 // maximum of 25 documents. Each document must contain fewer that 5,000 bytes 5653 // of UTF-8 encoded characters. 5654 // 5655 // TextList is a required field 5656 TextList []*string `type:"list" required:"true"` 5657} 5658 5659// String returns the string representation 5660func (s BatchDetectSentimentInput) String() string { 5661 return awsutil.Prettify(s) 5662} 5663 5664// GoString returns the string representation 5665func (s BatchDetectSentimentInput) GoString() string { 5666 return s.String() 5667} 5668 5669// Validate inspects the fields of the type to determine if they are valid. 5670func (s *BatchDetectSentimentInput) Validate() error { 5671 invalidParams := request.ErrInvalidParams{Context: "BatchDetectSentimentInput"} 5672 if s.LanguageCode == nil { 5673 invalidParams.Add(request.NewErrParamRequired("LanguageCode")) 5674 } 5675 if s.TextList == nil { 5676 invalidParams.Add(request.NewErrParamRequired("TextList")) 5677 } 5678 5679 if invalidParams.Len() > 0 { 5680 return invalidParams 5681 } 5682 return nil 5683} 5684 5685// SetLanguageCode sets the LanguageCode field's value. 5686func (s *BatchDetectSentimentInput) SetLanguageCode(v string) *BatchDetectSentimentInput { 5687 s.LanguageCode = &v 5688 return s 5689} 5690 5691// SetTextList sets the TextList field's value. 5692func (s *BatchDetectSentimentInput) SetTextList(v []*string) *BatchDetectSentimentInput { 5693 s.TextList = v 5694 return s 5695} 5696 5697// The result of calling the operation. The operation returns one object for 5698// each document that is successfully processed by the operation. 5699type BatchDetectSentimentItemResult struct { 5700 _ struct{} `type:"structure"` 5701 5702 // The zero-based index of the document in the input list. 5703 Index *int64 `type:"integer"` 5704 5705 // The sentiment detected in the document. 5706 Sentiment *string `type:"string" enum:"SentimentType"` 5707 5708 // The level of confidence that Amazon Comprehend has in the accuracy of its 5709 // sentiment detection. 5710 SentimentScore *SentimentScore `type:"structure"` 5711} 5712 5713// String returns the string representation 5714func (s BatchDetectSentimentItemResult) String() string { 5715 return awsutil.Prettify(s) 5716} 5717 5718// GoString returns the string representation 5719func (s BatchDetectSentimentItemResult) GoString() string { 5720 return s.String() 5721} 5722 5723// SetIndex sets the Index field's value. 5724func (s *BatchDetectSentimentItemResult) SetIndex(v int64) *BatchDetectSentimentItemResult { 5725 s.Index = &v 5726 return s 5727} 5728 5729// SetSentiment sets the Sentiment field's value. 5730func (s *BatchDetectSentimentItemResult) SetSentiment(v string) *BatchDetectSentimentItemResult { 5731 s.Sentiment = &v 5732 return s 5733} 5734 5735// SetSentimentScore sets the SentimentScore field's value. 5736func (s *BatchDetectSentimentItemResult) SetSentimentScore(v *SentimentScore) *BatchDetectSentimentItemResult { 5737 s.SentimentScore = v 5738 return s 5739} 5740 5741type BatchDetectSentimentOutput struct { 5742 _ struct{} `type:"structure"` 5743 5744 // A list containing one object for each document that contained an error. The 5745 // results are sorted in ascending order by the Index field and match the order 5746 // of the documents in the input list. If there are no errors in the batch, 5747 // the ErrorList is empty. 5748 // 5749 // ErrorList is a required field 5750 ErrorList []*BatchItemError `type:"list" required:"true"` 5751 5752 // A list of objects containing the results of the operation. The results are 5753 // sorted in ascending order by the Index field and match the order of the documents 5754 // in the input list. If all of the documents contain an error, the ResultList 5755 // is empty. 5756 // 5757 // ResultList is a required field 5758 ResultList []*BatchDetectSentimentItemResult `type:"list" required:"true"` 5759} 5760 5761// String returns the string representation 5762func (s BatchDetectSentimentOutput) String() string { 5763 return awsutil.Prettify(s) 5764} 5765 5766// GoString returns the string representation 5767func (s BatchDetectSentimentOutput) GoString() string { 5768 return s.String() 5769} 5770 5771// SetErrorList sets the ErrorList field's value. 5772func (s *BatchDetectSentimentOutput) SetErrorList(v []*BatchItemError) *BatchDetectSentimentOutput { 5773 s.ErrorList = v 5774 return s 5775} 5776 5777// SetResultList sets the ResultList field's value. 5778func (s *BatchDetectSentimentOutput) SetResultList(v []*BatchDetectSentimentItemResult) *BatchDetectSentimentOutput { 5779 s.ResultList = v 5780 return s 5781} 5782 5783type BatchDetectSyntaxInput struct { 5784 _ struct{} `type:"structure"` 5785 5786 // The language of the input documents. You can specify any of the following 5787 // languages supported by Amazon Comprehend: German ("de"), English ("en"), 5788 // Spanish ("es"), French ("fr"), Italian ("it"), or Portuguese ("pt"). All 5789 // documents must be in the same language. 5790 // 5791 // LanguageCode is a required field 5792 LanguageCode *string `type:"string" required:"true" enum:"SyntaxLanguageCode"` 5793 5794 // A list containing the text of the input documents. The list can contain a 5795 // maximum of 25 documents. Each document must contain fewer that 5,000 bytes 5796 // of UTF-8 encoded characters. 5797 // 5798 // TextList is a required field 5799 TextList []*string `type:"list" required:"true"` 5800} 5801 5802// String returns the string representation 5803func (s BatchDetectSyntaxInput) String() string { 5804 return awsutil.Prettify(s) 5805} 5806 5807// GoString returns the string representation 5808func (s BatchDetectSyntaxInput) GoString() string { 5809 return s.String() 5810} 5811 5812// Validate inspects the fields of the type to determine if they are valid. 5813func (s *BatchDetectSyntaxInput) Validate() error { 5814 invalidParams := request.ErrInvalidParams{Context: "BatchDetectSyntaxInput"} 5815 if s.LanguageCode == nil { 5816 invalidParams.Add(request.NewErrParamRequired("LanguageCode")) 5817 } 5818 if s.TextList == nil { 5819 invalidParams.Add(request.NewErrParamRequired("TextList")) 5820 } 5821 5822 if invalidParams.Len() > 0 { 5823 return invalidParams 5824 } 5825 return nil 5826} 5827 5828// SetLanguageCode sets the LanguageCode field's value. 5829func (s *BatchDetectSyntaxInput) SetLanguageCode(v string) *BatchDetectSyntaxInput { 5830 s.LanguageCode = &v 5831 return s 5832} 5833 5834// SetTextList sets the TextList field's value. 5835func (s *BatchDetectSyntaxInput) SetTextList(v []*string) *BatchDetectSyntaxInput { 5836 s.TextList = v 5837 return s 5838} 5839 5840// The result of calling the operation. The operation returns one object that 5841// is successfully processed by the operation. 5842type BatchDetectSyntaxItemResult struct { 5843 _ struct{} `type:"structure"` 5844 5845 // The zero-based index of the document in the input list. 5846 Index *int64 `type:"integer"` 5847 5848 // The syntax tokens for the words in the document, one token for each word. 5849 SyntaxTokens []*SyntaxToken `type:"list"` 5850} 5851 5852// String returns the string representation 5853func (s BatchDetectSyntaxItemResult) String() string { 5854 return awsutil.Prettify(s) 5855} 5856 5857// GoString returns the string representation 5858func (s BatchDetectSyntaxItemResult) GoString() string { 5859 return s.String() 5860} 5861 5862// SetIndex sets the Index field's value. 5863func (s *BatchDetectSyntaxItemResult) SetIndex(v int64) *BatchDetectSyntaxItemResult { 5864 s.Index = &v 5865 return s 5866} 5867 5868// SetSyntaxTokens sets the SyntaxTokens field's value. 5869func (s *BatchDetectSyntaxItemResult) SetSyntaxTokens(v []*SyntaxToken) *BatchDetectSyntaxItemResult { 5870 s.SyntaxTokens = v 5871 return s 5872} 5873 5874type BatchDetectSyntaxOutput struct { 5875 _ struct{} `type:"structure"` 5876 5877 // A list containing one object for each document that contained an error. The 5878 // results are sorted in ascending order by the Index field and match the order 5879 // of the documents in the input list. If there are no errors in the batch, 5880 // the ErrorList is empty. 5881 // 5882 // ErrorList is a required field 5883 ErrorList []*BatchItemError `type:"list" required:"true"` 5884 5885 // A list of objects containing the results of the operation. The results are 5886 // sorted in ascending order by the Index field and match the order of the documents 5887 // in the input list. If all of the documents contain an error, the ResultList 5888 // is empty. 5889 // 5890 // ResultList is a required field 5891 ResultList []*BatchDetectSyntaxItemResult `type:"list" required:"true"` 5892} 5893 5894// String returns the string representation 5895func (s BatchDetectSyntaxOutput) String() string { 5896 return awsutil.Prettify(s) 5897} 5898 5899// GoString returns the string representation 5900func (s BatchDetectSyntaxOutput) GoString() string { 5901 return s.String() 5902} 5903 5904// SetErrorList sets the ErrorList field's value. 5905func (s *BatchDetectSyntaxOutput) SetErrorList(v []*BatchItemError) *BatchDetectSyntaxOutput { 5906 s.ErrorList = v 5907 return s 5908} 5909 5910// SetResultList sets the ResultList field's value. 5911func (s *BatchDetectSyntaxOutput) SetResultList(v []*BatchDetectSyntaxItemResult) *BatchDetectSyntaxOutput { 5912 s.ResultList = v 5913 return s 5914} 5915 5916// Describes an error that occurred while processing a document in a batch. 5917// The operation returns on BatchItemError object for each document that contained 5918// an error. 5919type BatchItemError struct { 5920 _ struct{} `type:"structure"` 5921 5922 // The numeric error code of the error. 5923 ErrorCode *string `min:"1" type:"string"` 5924 5925 // A text description of the error. 5926 ErrorMessage *string `min:"1" type:"string"` 5927 5928 // The zero-based index of the document in the input list. 5929 Index *int64 `type:"integer"` 5930} 5931 5932// String returns the string representation 5933func (s BatchItemError) String() string { 5934 return awsutil.Prettify(s) 5935} 5936 5937// GoString returns the string representation 5938func (s BatchItemError) GoString() string { 5939 return s.String() 5940} 5941 5942// SetErrorCode sets the ErrorCode field's value. 5943func (s *BatchItemError) SetErrorCode(v string) *BatchItemError { 5944 s.ErrorCode = &v 5945 return s 5946} 5947 5948// SetErrorMessage sets the ErrorMessage field's value. 5949func (s *BatchItemError) SetErrorMessage(v string) *BatchItemError { 5950 s.ErrorMessage = &v 5951 return s 5952} 5953 5954// SetIndex sets the Index field's value. 5955func (s *BatchItemError) SetIndex(v int64) *BatchItemError { 5956 s.Index = &v 5957 return s 5958} 5959 5960// The number of documents in the request exceeds the limit of 25. Try your 5961// request again with fewer documents. 5962type BatchSizeLimitExceededException struct { 5963 _ struct{} `type:"structure"` 5964 respMetadata protocol.ResponseMetadata 5965 5966 Message_ *string `locationName:"Message" min:"1" type:"string"` 5967} 5968 5969// String returns the string representation 5970func (s BatchSizeLimitExceededException) String() string { 5971 return awsutil.Prettify(s) 5972} 5973 5974// GoString returns the string representation 5975func (s BatchSizeLimitExceededException) GoString() string { 5976 return s.String() 5977} 5978 5979func newErrorBatchSizeLimitExceededException(v protocol.ResponseMetadata) error { 5980 return &BatchSizeLimitExceededException{ 5981 respMetadata: v, 5982 } 5983} 5984 5985// Code returns the exception type name. 5986func (s BatchSizeLimitExceededException) Code() string { 5987 return "BatchSizeLimitExceededException" 5988} 5989 5990// Message returns the exception's message. 5991func (s BatchSizeLimitExceededException) Message() string { 5992 if s.Message_ != nil { 5993 return *s.Message_ 5994 } 5995 return "" 5996} 5997 5998// OrigErr always returns nil, satisfies awserr.Error interface. 5999func (s BatchSizeLimitExceededException) OrigErr() error { 6000 return nil 6001} 6002 6003func (s BatchSizeLimitExceededException) Error() string { 6004 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 6005} 6006 6007// Status code returns the HTTP status code for the request's response error. 6008func (s BatchSizeLimitExceededException) StatusCode() int { 6009 return s.respMetadata.StatusCode 6010} 6011 6012// RequestID returns the service's response RequestID for request. 6013func (s BatchSizeLimitExceededException) RequestID() string { 6014 return s.respMetadata.RequestID 6015} 6016 6017// Describes the result metrics for the test data associated with an documentation 6018// classifier. 6019type ClassifierEvaluationMetrics struct { 6020 _ struct{} `type:"structure"` 6021 6022 // The fraction of the labels that were correct recognized. It is computed by 6023 // dividing the number of labels in the test documents that were correctly recognized 6024 // by the total number of labels in the test documents. 6025 Accuracy *float64 `type:"double"` 6026 6027 // A measure of how accurate the classifier results are for the test data. It 6028 // is derived from the Precision and Recall values. The F1Score is the harmonic 6029 // average of the two scores. The highest score is 1, and the worst score is 6030 // 0. 6031 F1Score *float64 `type:"double"` 6032 6033 // Indicates the fraction of labels that are incorrectly predicted. Also seen 6034 // as the fraction of wrong labels compared to the total number of labels. Scores 6035 // closer to zero are better. 6036 HammingLoss *float64 `type:"double"` 6037 6038 // A measure of how accurate the classifier results are for the test data. It 6039 // is a combination of the Micro Precision and Micro Recall values. The Micro 6040 // F1Score is the harmonic mean of the two scores. The highest score is 1, and 6041 // the worst score is 0. 6042 MicroF1Score *float64 `type:"double"` 6043 6044 // A measure of the usefulness of the recognizer results in the test data. High 6045 // precision means that the recognizer returned substantially more relevant 6046 // results than irrelevant ones. Unlike the Precision metric which comes from 6047 // averaging the precision of all available labels, this is based on the overall 6048 // score of all precision scores added together. 6049 MicroPrecision *float64 `type:"double"` 6050 6051 // A measure of how complete the classifier results are for the test data. High 6052 // recall means that the classifier returned most of the relevant results. Specifically, 6053 // this indicates how many of the correct categories in the text that the model 6054 // can predict. It is a percentage of correct categories in the text that can 6055 // found. Instead of averaging the recall scores of all labels (as with Recall), 6056 // micro Recall is based on the overall score of all recall scores added together. 6057 MicroRecall *float64 `type:"double"` 6058 6059 // A measure of the usefulness of the classifier results in the test data. High 6060 // precision means that the classifier returned substantially more relevant 6061 // results than irrelevant ones. 6062 Precision *float64 `type:"double"` 6063 6064 // A measure of how complete the classifier results are for the test data. High 6065 // recall means that the classifier returned most of the relevant results. 6066 Recall *float64 `type:"double"` 6067} 6068 6069// String returns the string representation 6070func (s ClassifierEvaluationMetrics) String() string { 6071 return awsutil.Prettify(s) 6072} 6073 6074// GoString returns the string representation 6075func (s ClassifierEvaluationMetrics) GoString() string { 6076 return s.String() 6077} 6078 6079// SetAccuracy sets the Accuracy field's value. 6080func (s *ClassifierEvaluationMetrics) SetAccuracy(v float64) *ClassifierEvaluationMetrics { 6081 s.Accuracy = &v 6082 return s 6083} 6084 6085// SetF1Score sets the F1Score field's value. 6086func (s *ClassifierEvaluationMetrics) SetF1Score(v float64) *ClassifierEvaluationMetrics { 6087 s.F1Score = &v 6088 return s 6089} 6090 6091// SetHammingLoss sets the HammingLoss field's value. 6092func (s *ClassifierEvaluationMetrics) SetHammingLoss(v float64) *ClassifierEvaluationMetrics { 6093 s.HammingLoss = &v 6094 return s 6095} 6096 6097// SetMicroF1Score sets the MicroF1Score field's value. 6098func (s *ClassifierEvaluationMetrics) SetMicroF1Score(v float64) *ClassifierEvaluationMetrics { 6099 s.MicroF1Score = &v 6100 return s 6101} 6102 6103// SetMicroPrecision sets the MicroPrecision field's value. 6104func (s *ClassifierEvaluationMetrics) SetMicroPrecision(v float64) *ClassifierEvaluationMetrics { 6105 s.MicroPrecision = &v 6106 return s 6107} 6108 6109// SetMicroRecall sets the MicroRecall field's value. 6110func (s *ClassifierEvaluationMetrics) SetMicroRecall(v float64) *ClassifierEvaluationMetrics { 6111 s.MicroRecall = &v 6112 return s 6113} 6114 6115// SetPrecision sets the Precision field's value. 6116func (s *ClassifierEvaluationMetrics) SetPrecision(v float64) *ClassifierEvaluationMetrics { 6117 s.Precision = &v 6118 return s 6119} 6120 6121// SetRecall sets the Recall field's value. 6122func (s *ClassifierEvaluationMetrics) SetRecall(v float64) *ClassifierEvaluationMetrics { 6123 s.Recall = &v 6124 return s 6125} 6126 6127// Provides information about a document classifier. 6128type ClassifierMetadata struct { 6129 _ struct{} `type:"structure"` 6130 6131 // Describes the result metrics for the test data associated with an documentation 6132 // classifier. 6133 EvaluationMetrics *ClassifierEvaluationMetrics `type:"structure"` 6134 6135 // The number of labels in the input data. 6136 NumberOfLabels *int64 `type:"integer"` 6137 6138 // The number of documents in the input data that were used to test the classifier. 6139 // Typically this is 10 to 20 percent of the input documents. 6140 NumberOfTestDocuments *int64 `type:"integer"` 6141 6142 // The number of documents in the input data that were used to train the classifier. 6143 // Typically this is 80 to 90 percent of the input documents. 6144 NumberOfTrainedDocuments *int64 `type:"integer"` 6145} 6146 6147// String returns the string representation 6148func (s ClassifierMetadata) String() string { 6149 return awsutil.Prettify(s) 6150} 6151 6152// GoString returns the string representation 6153func (s ClassifierMetadata) GoString() string { 6154 return s.String() 6155} 6156 6157// SetEvaluationMetrics sets the EvaluationMetrics field's value. 6158func (s *ClassifierMetadata) SetEvaluationMetrics(v *ClassifierEvaluationMetrics) *ClassifierMetadata { 6159 s.EvaluationMetrics = v 6160 return s 6161} 6162 6163// SetNumberOfLabels sets the NumberOfLabels field's value. 6164func (s *ClassifierMetadata) SetNumberOfLabels(v int64) *ClassifierMetadata { 6165 s.NumberOfLabels = &v 6166 return s 6167} 6168 6169// SetNumberOfTestDocuments sets the NumberOfTestDocuments field's value. 6170func (s *ClassifierMetadata) SetNumberOfTestDocuments(v int64) *ClassifierMetadata { 6171 s.NumberOfTestDocuments = &v 6172 return s 6173} 6174 6175// SetNumberOfTrainedDocuments sets the NumberOfTrainedDocuments field's value. 6176func (s *ClassifierMetadata) SetNumberOfTrainedDocuments(v int64) *ClassifierMetadata { 6177 s.NumberOfTrainedDocuments = &v 6178 return s 6179} 6180 6181type ClassifyDocumentInput struct { 6182 _ struct{} `type:"structure"` 6183 6184 // The Amazon Resource Number (ARN) of the endpoint. 6185 // 6186 // EndpointArn is a required field 6187 EndpointArn *string `type:"string" required:"true"` 6188 6189 // The document text to be analyzed. 6190 // 6191 // Text is a required field 6192 Text *string `min:"1" type:"string" required:"true"` 6193} 6194 6195// String returns the string representation 6196func (s ClassifyDocumentInput) String() string { 6197 return awsutil.Prettify(s) 6198} 6199 6200// GoString returns the string representation 6201func (s ClassifyDocumentInput) GoString() string { 6202 return s.String() 6203} 6204 6205// Validate inspects the fields of the type to determine if they are valid. 6206func (s *ClassifyDocumentInput) Validate() error { 6207 invalidParams := request.ErrInvalidParams{Context: "ClassifyDocumentInput"} 6208 if s.EndpointArn == nil { 6209 invalidParams.Add(request.NewErrParamRequired("EndpointArn")) 6210 } 6211 if s.Text == nil { 6212 invalidParams.Add(request.NewErrParamRequired("Text")) 6213 } 6214 if s.Text != nil && len(*s.Text) < 1 { 6215 invalidParams.Add(request.NewErrParamMinLen("Text", 1)) 6216 } 6217 6218 if invalidParams.Len() > 0 { 6219 return invalidParams 6220 } 6221 return nil 6222} 6223 6224// SetEndpointArn sets the EndpointArn field's value. 6225func (s *ClassifyDocumentInput) SetEndpointArn(v string) *ClassifyDocumentInput { 6226 s.EndpointArn = &v 6227 return s 6228} 6229 6230// SetText sets the Text field's value. 6231func (s *ClassifyDocumentInput) SetText(v string) *ClassifyDocumentInput { 6232 s.Text = &v 6233 return s 6234} 6235 6236type ClassifyDocumentOutput struct { 6237 _ struct{} `type:"structure"` 6238 6239 // The classes used by the document being analyzed. These are used for multi-class 6240 // trained models. Individual classes are mutually exclusive and each document 6241 // is expected to have only a single class assigned to it. For example, an animal 6242 // can be a dog or a cat, but not both at the same time. 6243 Classes []*DocumentClass `type:"list"` 6244 6245 // The labels used the document being analyzed. These are used for multi-label 6246 // trained models. Individual labels represent different categories that are 6247 // related in some manner and are not multually exclusive. For example, a movie 6248 // can be just an action movie, or it can be an action movie, a science fiction 6249 // movie, and a comedy, all at the same time. 6250 Labels []*DocumentLabel `type:"list"` 6251} 6252 6253// String returns the string representation 6254func (s ClassifyDocumentOutput) String() string { 6255 return awsutil.Prettify(s) 6256} 6257 6258// GoString returns the string representation 6259func (s ClassifyDocumentOutput) GoString() string { 6260 return s.String() 6261} 6262 6263// SetClasses sets the Classes field's value. 6264func (s *ClassifyDocumentOutput) SetClasses(v []*DocumentClass) *ClassifyDocumentOutput { 6265 s.Classes = v 6266 return s 6267} 6268 6269// SetLabels sets the Labels field's value. 6270func (s *ClassifyDocumentOutput) SetLabels(v []*DocumentLabel) *ClassifyDocumentOutput { 6271 s.Labels = v 6272 return s 6273} 6274 6275// Concurrent modification of the tags associated with an Amazon Comprehend 6276// resource is not supported. 6277type ConcurrentModificationException struct { 6278 _ struct{} `type:"structure"` 6279 respMetadata protocol.ResponseMetadata 6280 6281 Message_ *string `locationName:"Message" min:"1" type:"string"` 6282} 6283 6284// String returns the string representation 6285func (s ConcurrentModificationException) String() string { 6286 return awsutil.Prettify(s) 6287} 6288 6289// GoString returns the string representation 6290func (s ConcurrentModificationException) GoString() string { 6291 return s.String() 6292} 6293 6294func newErrorConcurrentModificationException(v protocol.ResponseMetadata) error { 6295 return &ConcurrentModificationException{ 6296 respMetadata: v, 6297 } 6298} 6299 6300// Code returns the exception type name. 6301func (s ConcurrentModificationException) Code() string { 6302 return "ConcurrentModificationException" 6303} 6304 6305// Message returns the exception's message. 6306func (s ConcurrentModificationException) Message() string { 6307 if s.Message_ != nil { 6308 return *s.Message_ 6309 } 6310 return "" 6311} 6312 6313// OrigErr always returns nil, satisfies awserr.Error interface. 6314func (s ConcurrentModificationException) OrigErr() error { 6315 return nil 6316} 6317 6318func (s ConcurrentModificationException) Error() string { 6319 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 6320} 6321 6322// Status code returns the HTTP status code for the request's response error. 6323func (s ConcurrentModificationException) StatusCode() int { 6324 return s.respMetadata.StatusCode 6325} 6326 6327// RequestID returns the service's response RequestID for request. 6328func (s ConcurrentModificationException) RequestID() string { 6329 return s.respMetadata.RequestID 6330} 6331 6332type CreateDocumentClassifierInput struct { 6333 _ struct{} `type:"structure"` 6334 6335 // A unique identifier for the request. If you don't set the client request 6336 // token, Amazon Comprehend generates one. 6337 ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` 6338 6339 // The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM) role 6340 // that grants Amazon Comprehend read access to your input data. 6341 // 6342 // DataAccessRoleArn is a required field 6343 DataAccessRoleArn *string `min:"20" type:"string" required:"true"` 6344 6345 // The name of the document classifier. 6346 // 6347 // DocumentClassifierName is a required field 6348 DocumentClassifierName *string `type:"string" required:"true"` 6349 6350 // Specifies the format and location of the input data for the job. 6351 // 6352 // InputDataConfig is a required field 6353 InputDataConfig *DocumentClassifierInputDataConfig `type:"structure" required:"true"` 6354 6355 // The language of the input documents. You can specify any of the following 6356 // languages supported by Amazon Comprehend: German ("de"), English ("en"), 6357 // Spanish ("es"), French ("fr"), Italian ("it"), or Portuguese ("pt"). All 6358 // documents must be in the same language. 6359 // 6360 // LanguageCode is a required field 6361 LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"` 6362 6363 // Indicates the mode in which the classifier will be trained. The classifier 6364 // can be trained in multi-class mode, which identifies one and only one class 6365 // for each document, or multi-label mode, which identifies one or more labels 6366 // for each document. In multi-label mode, multiple labels for an individual 6367 // document are separated by a delimiter. The default delimiter between labels 6368 // is a pipe (|). 6369 Mode *string `type:"string" enum:"DocumentClassifierMode"` 6370 6371 // Enables the addition of output results configuration parameters for custom 6372 // classifier jobs. 6373 OutputDataConfig *DocumentClassifierOutputDataConfig `type:"structure"` 6374 6375 // Tags to be associated with the document classifier being created. A tag is 6376 // a key-value pair that adds as a metadata to a resource used by Amazon Comprehend. 6377 // For example, a tag with "Sales" as the key might be added to a resource to 6378 // indicate its use by the sales department. 6379 Tags []*Tag `type:"list"` 6380 6381 // ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses 6382 // to encrypt data on the storage volume attached to the ML compute instance(s) 6383 // that process the analysis job. The VolumeKmsKeyId can be either of the following 6384 // formats: 6385 // 6386 // * KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab" 6387 // 6388 // * Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" 6389 VolumeKmsKeyId *string `type:"string"` 6390 6391 // Configuration parameters for an optional private Virtual Private Cloud (VPC) 6392 // containing the resources you are using for your custom classifier. For more 6393 // information, see Amazon VPC (https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html). 6394 VpcConfig *VpcConfig `type:"structure"` 6395} 6396 6397// String returns the string representation 6398func (s CreateDocumentClassifierInput) String() string { 6399 return awsutil.Prettify(s) 6400} 6401 6402// GoString returns the string representation 6403func (s CreateDocumentClassifierInput) GoString() string { 6404 return s.String() 6405} 6406 6407// Validate inspects the fields of the type to determine if they are valid. 6408func (s *CreateDocumentClassifierInput) Validate() error { 6409 invalidParams := request.ErrInvalidParams{Context: "CreateDocumentClassifierInput"} 6410 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { 6411 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) 6412 } 6413 if s.DataAccessRoleArn == nil { 6414 invalidParams.Add(request.NewErrParamRequired("DataAccessRoleArn")) 6415 } 6416 if s.DataAccessRoleArn != nil && len(*s.DataAccessRoleArn) < 20 { 6417 invalidParams.Add(request.NewErrParamMinLen("DataAccessRoleArn", 20)) 6418 } 6419 if s.DocumentClassifierName == nil { 6420 invalidParams.Add(request.NewErrParamRequired("DocumentClassifierName")) 6421 } 6422 if s.InputDataConfig == nil { 6423 invalidParams.Add(request.NewErrParamRequired("InputDataConfig")) 6424 } 6425 if s.LanguageCode == nil { 6426 invalidParams.Add(request.NewErrParamRequired("LanguageCode")) 6427 } 6428 if s.InputDataConfig != nil { 6429 if err := s.InputDataConfig.Validate(); err != nil { 6430 invalidParams.AddNested("InputDataConfig", err.(request.ErrInvalidParams)) 6431 } 6432 } 6433 if s.Tags != nil { 6434 for i, v := range s.Tags { 6435 if v == nil { 6436 continue 6437 } 6438 if err := v.Validate(); err != nil { 6439 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 6440 } 6441 } 6442 } 6443 if s.VpcConfig != nil { 6444 if err := s.VpcConfig.Validate(); err != nil { 6445 invalidParams.AddNested("VpcConfig", err.(request.ErrInvalidParams)) 6446 } 6447 } 6448 6449 if invalidParams.Len() > 0 { 6450 return invalidParams 6451 } 6452 return nil 6453} 6454 6455// SetClientRequestToken sets the ClientRequestToken field's value. 6456func (s *CreateDocumentClassifierInput) SetClientRequestToken(v string) *CreateDocumentClassifierInput { 6457 s.ClientRequestToken = &v 6458 return s 6459} 6460 6461// SetDataAccessRoleArn sets the DataAccessRoleArn field's value. 6462func (s *CreateDocumentClassifierInput) SetDataAccessRoleArn(v string) *CreateDocumentClassifierInput { 6463 s.DataAccessRoleArn = &v 6464 return s 6465} 6466 6467// SetDocumentClassifierName sets the DocumentClassifierName field's value. 6468func (s *CreateDocumentClassifierInput) SetDocumentClassifierName(v string) *CreateDocumentClassifierInput { 6469 s.DocumentClassifierName = &v 6470 return s 6471} 6472 6473// SetInputDataConfig sets the InputDataConfig field's value. 6474func (s *CreateDocumentClassifierInput) SetInputDataConfig(v *DocumentClassifierInputDataConfig) *CreateDocumentClassifierInput { 6475 s.InputDataConfig = v 6476 return s 6477} 6478 6479// SetLanguageCode sets the LanguageCode field's value. 6480func (s *CreateDocumentClassifierInput) SetLanguageCode(v string) *CreateDocumentClassifierInput { 6481 s.LanguageCode = &v 6482 return s 6483} 6484 6485// SetMode sets the Mode field's value. 6486func (s *CreateDocumentClassifierInput) SetMode(v string) *CreateDocumentClassifierInput { 6487 s.Mode = &v 6488 return s 6489} 6490 6491// SetOutputDataConfig sets the OutputDataConfig field's value. 6492func (s *CreateDocumentClassifierInput) SetOutputDataConfig(v *DocumentClassifierOutputDataConfig) *CreateDocumentClassifierInput { 6493 s.OutputDataConfig = v 6494 return s 6495} 6496 6497// SetTags sets the Tags field's value. 6498func (s *CreateDocumentClassifierInput) SetTags(v []*Tag) *CreateDocumentClassifierInput { 6499 s.Tags = v 6500 return s 6501} 6502 6503// SetVolumeKmsKeyId sets the VolumeKmsKeyId field's value. 6504func (s *CreateDocumentClassifierInput) SetVolumeKmsKeyId(v string) *CreateDocumentClassifierInput { 6505 s.VolumeKmsKeyId = &v 6506 return s 6507} 6508 6509// SetVpcConfig sets the VpcConfig field's value. 6510func (s *CreateDocumentClassifierInput) SetVpcConfig(v *VpcConfig) *CreateDocumentClassifierInput { 6511 s.VpcConfig = v 6512 return s 6513} 6514 6515type CreateDocumentClassifierOutput struct { 6516 _ struct{} `type:"structure"` 6517 6518 // The Amazon Resource Name (ARN) that identifies the document classifier. 6519 DocumentClassifierArn *string `type:"string"` 6520} 6521 6522// String returns the string representation 6523func (s CreateDocumentClassifierOutput) String() string { 6524 return awsutil.Prettify(s) 6525} 6526 6527// GoString returns the string representation 6528func (s CreateDocumentClassifierOutput) GoString() string { 6529 return s.String() 6530} 6531 6532// SetDocumentClassifierArn sets the DocumentClassifierArn field's value. 6533func (s *CreateDocumentClassifierOutput) SetDocumentClassifierArn(v string) *CreateDocumentClassifierOutput { 6534 s.DocumentClassifierArn = &v 6535 return s 6536} 6537 6538type CreateEndpointInput struct { 6539 _ struct{} `type:"structure"` 6540 6541 // An idempotency token provided by the customer. If this token matches a previous 6542 // endpoint creation request, Amazon Comprehend will not return a ResourceInUseException. 6543 ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` 6544 6545 // The desired number of inference units to be used by the model using this 6546 // endpoint. Each inference unit represents of a throughput of 100 characters 6547 // per second. 6548 // 6549 // DesiredInferenceUnits is a required field 6550 DesiredInferenceUnits *int64 `min:"1" type:"integer" required:"true"` 6551 6552 // This is the descriptive suffix that becomes part of the EndpointArn used 6553 // for all subsequent requests to this resource. 6554 // 6555 // EndpointName is a required field 6556 EndpointName *string `type:"string" required:"true"` 6557 6558 // The Amazon Resource Number (ARN) of the model to which the endpoint will 6559 // be attached. 6560 // 6561 // ModelArn is a required field 6562 ModelArn *string `type:"string" required:"true"` 6563 6564 // Tags associated with the endpoint being created. A tag is a key-value pair 6565 // that adds metadata to the endpoint. For example, a tag with "Sales" as the 6566 // key might be added to an endpoint to indicate its use by the sales department. 6567 Tags []*Tag `type:"list"` 6568} 6569 6570// String returns the string representation 6571func (s CreateEndpointInput) String() string { 6572 return awsutil.Prettify(s) 6573} 6574 6575// GoString returns the string representation 6576func (s CreateEndpointInput) GoString() string { 6577 return s.String() 6578} 6579 6580// Validate inspects the fields of the type to determine if they are valid. 6581func (s *CreateEndpointInput) Validate() error { 6582 invalidParams := request.ErrInvalidParams{Context: "CreateEndpointInput"} 6583 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { 6584 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) 6585 } 6586 if s.DesiredInferenceUnits == nil { 6587 invalidParams.Add(request.NewErrParamRequired("DesiredInferenceUnits")) 6588 } 6589 if s.DesiredInferenceUnits != nil && *s.DesiredInferenceUnits < 1 { 6590 invalidParams.Add(request.NewErrParamMinValue("DesiredInferenceUnits", 1)) 6591 } 6592 if s.EndpointName == nil { 6593 invalidParams.Add(request.NewErrParamRequired("EndpointName")) 6594 } 6595 if s.ModelArn == nil { 6596 invalidParams.Add(request.NewErrParamRequired("ModelArn")) 6597 } 6598 if s.Tags != nil { 6599 for i, v := range s.Tags { 6600 if v == nil { 6601 continue 6602 } 6603 if err := v.Validate(); err != nil { 6604 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 6605 } 6606 } 6607 } 6608 6609 if invalidParams.Len() > 0 { 6610 return invalidParams 6611 } 6612 return nil 6613} 6614 6615// SetClientRequestToken sets the ClientRequestToken field's value. 6616func (s *CreateEndpointInput) SetClientRequestToken(v string) *CreateEndpointInput { 6617 s.ClientRequestToken = &v 6618 return s 6619} 6620 6621// SetDesiredInferenceUnits sets the DesiredInferenceUnits field's value. 6622func (s *CreateEndpointInput) SetDesiredInferenceUnits(v int64) *CreateEndpointInput { 6623 s.DesiredInferenceUnits = &v 6624 return s 6625} 6626 6627// SetEndpointName sets the EndpointName field's value. 6628func (s *CreateEndpointInput) SetEndpointName(v string) *CreateEndpointInput { 6629 s.EndpointName = &v 6630 return s 6631} 6632 6633// SetModelArn sets the ModelArn field's value. 6634func (s *CreateEndpointInput) SetModelArn(v string) *CreateEndpointInput { 6635 s.ModelArn = &v 6636 return s 6637} 6638 6639// SetTags sets the Tags field's value. 6640func (s *CreateEndpointInput) SetTags(v []*Tag) *CreateEndpointInput { 6641 s.Tags = v 6642 return s 6643} 6644 6645type CreateEndpointOutput struct { 6646 _ struct{} `type:"structure"` 6647 6648 // The Amazon Resource Number (ARN) of the endpoint being created. 6649 EndpointArn *string `type:"string"` 6650} 6651 6652// String returns the string representation 6653func (s CreateEndpointOutput) String() string { 6654 return awsutil.Prettify(s) 6655} 6656 6657// GoString returns the string representation 6658func (s CreateEndpointOutput) GoString() string { 6659 return s.String() 6660} 6661 6662// SetEndpointArn sets the EndpointArn field's value. 6663func (s *CreateEndpointOutput) SetEndpointArn(v string) *CreateEndpointOutput { 6664 s.EndpointArn = &v 6665 return s 6666} 6667 6668type CreateEntityRecognizerInput struct { 6669 _ struct{} `type:"structure"` 6670 6671 // A unique identifier for the request. If you don't set the client request 6672 // token, Amazon Comprehend generates one. 6673 ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` 6674 6675 // The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM) role 6676 // that grants Amazon Comprehend read access to your input data. 6677 // 6678 // DataAccessRoleArn is a required field 6679 DataAccessRoleArn *string `min:"20" type:"string" required:"true"` 6680 6681 // Specifies the format and location of the input data. The S3 bucket containing 6682 // the input data must be located in the same region as the entity recognizer 6683 // being created. 6684 // 6685 // InputDataConfig is a required field 6686 InputDataConfig *EntityRecognizerInputDataConfig `type:"structure" required:"true"` 6687 6688 // The language of the input documents. All documents must be in the same language. 6689 // Only English ("en") is currently supported. 6690 // 6691 // LanguageCode is a required field 6692 LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"` 6693 6694 // The name given to the newly created recognizer. Recognizer names can be a 6695 // maximum of 256 characters. Alphanumeric characters, hyphens (-) and underscores 6696 // (_) are allowed. The name must be unique in the account/region. 6697 // 6698 // RecognizerName is a required field 6699 RecognizerName *string `type:"string" required:"true"` 6700 6701 // Tags to be associated with the entity recognizer being created. A tag is 6702 // a key-value pair that adds as a metadata to a resource used by Amazon Comprehend. 6703 // For example, a tag with "Sales" as the key might be added to a resource to 6704 // indicate its use by the sales department. 6705 Tags []*Tag `type:"list"` 6706 6707 // ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses 6708 // to encrypt data on the storage volume attached to the ML compute instance(s) 6709 // that process the analysis job. The VolumeKmsKeyId can be either of the following 6710 // formats: 6711 // 6712 // * KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab" 6713 // 6714 // * Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" 6715 VolumeKmsKeyId *string `type:"string"` 6716 6717 // Configuration parameters for an optional private Virtual Private Cloud (VPC) 6718 // containing the resources you are using for your custom entity recognizer. 6719 // For more information, see Amazon VPC (https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html). 6720 VpcConfig *VpcConfig `type:"structure"` 6721} 6722 6723// String returns the string representation 6724func (s CreateEntityRecognizerInput) String() string { 6725 return awsutil.Prettify(s) 6726} 6727 6728// GoString returns the string representation 6729func (s CreateEntityRecognizerInput) GoString() string { 6730 return s.String() 6731} 6732 6733// Validate inspects the fields of the type to determine if they are valid. 6734func (s *CreateEntityRecognizerInput) Validate() error { 6735 invalidParams := request.ErrInvalidParams{Context: "CreateEntityRecognizerInput"} 6736 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { 6737 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) 6738 } 6739 if s.DataAccessRoleArn == nil { 6740 invalidParams.Add(request.NewErrParamRequired("DataAccessRoleArn")) 6741 } 6742 if s.DataAccessRoleArn != nil && len(*s.DataAccessRoleArn) < 20 { 6743 invalidParams.Add(request.NewErrParamMinLen("DataAccessRoleArn", 20)) 6744 } 6745 if s.InputDataConfig == nil { 6746 invalidParams.Add(request.NewErrParamRequired("InputDataConfig")) 6747 } 6748 if s.LanguageCode == nil { 6749 invalidParams.Add(request.NewErrParamRequired("LanguageCode")) 6750 } 6751 if s.RecognizerName == nil { 6752 invalidParams.Add(request.NewErrParamRequired("RecognizerName")) 6753 } 6754 if s.InputDataConfig != nil { 6755 if err := s.InputDataConfig.Validate(); err != nil { 6756 invalidParams.AddNested("InputDataConfig", err.(request.ErrInvalidParams)) 6757 } 6758 } 6759 if s.Tags != nil { 6760 for i, v := range s.Tags { 6761 if v == nil { 6762 continue 6763 } 6764 if err := v.Validate(); err != nil { 6765 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 6766 } 6767 } 6768 } 6769 if s.VpcConfig != nil { 6770 if err := s.VpcConfig.Validate(); err != nil { 6771 invalidParams.AddNested("VpcConfig", err.(request.ErrInvalidParams)) 6772 } 6773 } 6774 6775 if invalidParams.Len() > 0 { 6776 return invalidParams 6777 } 6778 return nil 6779} 6780 6781// SetClientRequestToken sets the ClientRequestToken field's value. 6782func (s *CreateEntityRecognizerInput) SetClientRequestToken(v string) *CreateEntityRecognizerInput { 6783 s.ClientRequestToken = &v 6784 return s 6785} 6786 6787// SetDataAccessRoleArn sets the DataAccessRoleArn field's value. 6788func (s *CreateEntityRecognizerInput) SetDataAccessRoleArn(v string) *CreateEntityRecognizerInput { 6789 s.DataAccessRoleArn = &v 6790 return s 6791} 6792 6793// SetInputDataConfig sets the InputDataConfig field's value. 6794func (s *CreateEntityRecognizerInput) SetInputDataConfig(v *EntityRecognizerInputDataConfig) *CreateEntityRecognizerInput { 6795 s.InputDataConfig = v 6796 return s 6797} 6798 6799// SetLanguageCode sets the LanguageCode field's value. 6800func (s *CreateEntityRecognizerInput) SetLanguageCode(v string) *CreateEntityRecognizerInput { 6801 s.LanguageCode = &v 6802 return s 6803} 6804 6805// SetRecognizerName sets the RecognizerName field's value. 6806func (s *CreateEntityRecognizerInput) SetRecognizerName(v string) *CreateEntityRecognizerInput { 6807 s.RecognizerName = &v 6808 return s 6809} 6810 6811// SetTags sets the Tags field's value. 6812func (s *CreateEntityRecognizerInput) SetTags(v []*Tag) *CreateEntityRecognizerInput { 6813 s.Tags = v 6814 return s 6815} 6816 6817// SetVolumeKmsKeyId sets the VolumeKmsKeyId field's value. 6818func (s *CreateEntityRecognizerInput) SetVolumeKmsKeyId(v string) *CreateEntityRecognizerInput { 6819 s.VolumeKmsKeyId = &v 6820 return s 6821} 6822 6823// SetVpcConfig sets the VpcConfig field's value. 6824func (s *CreateEntityRecognizerInput) SetVpcConfig(v *VpcConfig) *CreateEntityRecognizerInput { 6825 s.VpcConfig = v 6826 return s 6827} 6828 6829type CreateEntityRecognizerOutput struct { 6830 _ struct{} `type:"structure"` 6831 6832 // The Amazon Resource Name (ARN) that identifies the entity recognizer. 6833 EntityRecognizerArn *string `type:"string"` 6834} 6835 6836// String returns the string representation 6837func (s CreateEntityRecognizerOutput) String() string { 6838 return awsutil.Prettify(s) 6839} 6840 6841// GoString returns the string representation 6842func (s CreateEntityRecognizerOutput) GoString() string { 6843 return s.String() 6844} 6845 6846// SetEntityRecognizerArn sets the EntityRecognizerArn field's value. 6847func (s *CreateEntityRecognizerOutput) SetEntityRecognizerArn(v string) *CreateEntityRecognizerOutput { 6848 s.EntityRecognizerArn = &v 6849 return s 6850} 6851 6852type DeleteDocumentClassifierInput struct { 6853 _ struct{} `type:"structure"` 6854 6855 // The Amazon Resource Name (ARN) that identifies the document classifier. 6856 // 6857 // DocumentClassifierArn is a required field 6858 DocumentClassifierArn *string `type:"string" required:"true"` 6859} 6860 6861// String returns the string representation 6862func (s DeleteDocumentClassifierInput) String() string { 6863 return awsutil.Prettify(s) 6864} 6865 6866// GoString returns the string representation 6867func (s DeleteDocumentClassifierInput) GoString() string { 6868 return s.String() 6869} 6870 6871// Validate inspects the fields of the type to determine if they are valid. 6872func (s *DeleteDocumentClassifierInput) Validate() error { 6873 invalidParams := request.ErrInvalidParams{Context: "DeleteDocumentClassifierInput"} 6874 if s.DocumentClassifierArn == nil { 6875 invalidParams.Add(request.NewErrParamRequired("DocumentClassifierArn")) 6876 } 6877 6878 if invalidParams.Len() > 0 { 6879 return invalidParams 6880 } 6881 return nil 6882} 6883 6884// SetDocumentClassifierArn sets the DocumentClassifierArn field's value. 6885func (s *DeleteDocumentClassifierInput) SetDocumentClassifierArn(v string) *DeleteDocumentClassifierInput { 6886 s.DocumentClassifierArn = &v 6887 return s 6888} 6889 6890type DeleteDocumentClassifierOutput struct { 6891 _ struct{} `type:"structure"` 6892} 6893 6894// String returns the string representation 6895func (s DeleteDocumentClassifierOutput) String() string { 6896 return awsutil.Prettify(s) 6897} 6898 6899// GoString returns the string representation 6900func (s DeleteDocumentClassifierOutput) GoString() string { 6901 return s.String() 6902} 6903 6904type DeleteEndpointInput struct { 6905 _ struct{} `type:"structure"` 6906 6907 // The Amazon Resource Number (ARN) of the endpoint being deleted. 6908 // 6909 // EndpointArn is a required field 6910 EndpointArn *string `type:"string" required:"true"` 6911} 6912 6913// String returns the string representation 6914func (s DeleteEndpointInput) String() string { 6915 return awsutil.Prettify(s) 6916} 6917 6918// GoString returns the string representation 6919func (s DeleteEndpointInput) GoString() string { 6920 return s.String() 6921} 6922 6923// Validate inspects the fields of the type to determine if they are valid. 6924func (s *DeleteEndpointInput) Validate() error { 6925 invalidParams := request.ErrInvalidParams{Context: "DeleteEndpointInput"} 6926 if s.EndpointArn == nil { 6927 invalidParams.Add(request.NewErrParamRequired("EndpointArn")) 6928 } 6929 6930 if invalidParams.Len() > 0 { 6931 return invalidParams 6932 } 6933 return nil 6934} 6935 6936// SetEndpointArn sets the EndpointArn field's value. 6937func (s *DeleteEndpointInput) SetEndpointArn(v string) *DeleteEndpointInput { 6938 s.EndpointArn = &v 6939 return s 6940} 6941 6942type DeleteEndpointOutput struct { 6943 _ struct{} `type:"structure"` 6944} 6945 6946// String returns the string representation 6947func (s DeleteEndpointOutput) String() string { 6948 return awsutil.Prettify(s) 6949} 6950 6951// GoString returns the string representation 6952func (s DeleteEndpointOutput) GoString() string { 6953 return s.String() 6954} 6955 6956type DeleteEntityRecognizerInput struct { 6957 _ struct{} `type:"structure"` 6958 6959 // The Amazon Resource Name (ARN) that identifies the entity recognizer. 6960 // 6961 // EntityRecognizerArn is a required field 6962 EntityRecognizerArn *string `type:"string" required:"true"` 6963} 6964 6965// String returns the string representation 6966func (s DeleteEntityRecognizerInput) String() string { 6967 return awsutil.Prettify(s) 6968} 6969 6970// GoString returns the string representation 6971func (s DeleteEntityRecognizerInput) GoString() string { 6972 return s.String() 6973} 6974 6975// Validate inspects the fields of the type to determine if they are valid. 6976func (s *DeleteEntityRecognizerInput) Validate() error { 6977 invalidParams := request.ErrInvalidParams{Context: "DeleteEntityRecognizerInput"} 6978 if s.EntityRecognizerArn == nil { 6979 invalidParams.Add(request.NewErrParamRequired("EntityRecognizerArn")) 6980 } 6981 6982 if invalidParams.Len() > 0 { 6983 return invalidParams 6984 } 6985 return nil 6986} 6987 6988// SetEntityRecognizerArn sets the EntityRecognizerArn field's value. 6989func (s *DeleteEntityRecognizerInput) SetEntityRecognizerArn(v string) *DeleteEntityRecognizerInput { 6990 s.EntityRecognizerArn = &v 6991 return s 6992} 6993 6994type DeleteEntityRecognizerOutput struct { 6995 _ struct{} `type:"structure"` 6996} 6997 6998// String returns the string representation 6999func (s DeleteEntityRecognizerOutput) String() string { 7000 return awsutil.Prettify(s) 7001} 7002 7003// GoString returns the string representation 7004func (s DeleteEntityRecognizerOutput) GoString() string { 7005 return s.String() 7006} 7007 7008type DescribeDocumentClassificationJobInput struct { 7009 _ struct{} `type:"structure"` 7010 7011 // The identifier that Amazon Comprehend generated for the job. The operation 7012 // returns this identifier in its response. 7013 // 7014 // JobId is a required field 7015 JobId *string `min:"1" type:"string" required:"true"` 7016} 7017 7018// String returns the string representation 7019func (s DescribeDocumentClassificationJobInput) String() string { 7020 return awsutil.Prettify(s) 7021} 7022 7023// GoString returns the string representation 7024func (s DescribeDocumentClassificationJobInput) GoString() string { 7025 return s.String() 7026} 7027 7028// Validate inspects the fields of the type to determine if they are valid. 7029func (s *DescribeDocumentClassificationJobInput) Validate() error { 7030 invalidParams := request.ErrInvalidParams{Context: "DescribeDocumentClassificationJobInput"} 7031 if s.JobId == nil { 7032 invalidParams.Add(request.NewErrParamRequired("JobId")) 7033 } 7034 if s.JobId != nil && len(*s.JobId) < 1 { 7035 invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) 7036 } 7037 7038 if invalidParams.Len() > 0 { 7039 return invalidParams 7040 } 7041 return nil 7042} 7043 7044// SetJobId sets the JobId field's value. 7045func (s *DescribeDocumentClassificationJobInput) SetJobId(v string) *DescribeDocumentClassificationJobInput { 7046 s.JobId = &v 7047 return s 7048} 7049 7050type DescribeDocumentClassificationJobOutput struct { 7051 _ struct{} `type:"structure"` 7052 7053 // An object that describes the properties associated with the document classification 7054 // job. 7055 DocumentClassificationJobProperties *DocumentClassificationJobProperties `type:"structure"` 7056} 7057 7058// String returns the string representation 7059func (s DescribeDocumentClassificationJobOutput) String() string { 7060 return awsutil.Prettify(s) 7061} 7062 7063// GoString returns the string representation 7064func (s DescribeDocumentClassificationJobOutput) GoString() string { 7065 return s.String() 7066} 7067 7068// SetDocumentClassificationJobProperties sets the DocumentClassificationJobProperties field's value. 7069func (s *DescribeDocumentClassificationJobOutput) SetDocumentClassificationJobProperties(v *DocumentClassificationJobProperties) *DescribeDocumentClassificationJobOutput { 7070 s.DocumentClassificationJobProperties = v 7071 return s 7072} 7073 7074type DescribeDocumentClassifierInput struct { 7075 _ struct{} `type:"structure"` 7076 7077 // The Amazon Resource Name (ARN) that identifies the document classifier. The 7078 // operation returns this identifier in its response. 7079 // 7080 // DocumentClassifierArn is a required field 7081 DocumentClassifierArn *string `type:"string" required:"true"` 7082} 7083 7084// String returns the string representation 7085func (s DescribeDocumentClassifierInput) String() string { 7086 return awsutil.Prettify(s) 7087} 7088 7089// GoString returns the string representation 7090func (s DescribeDocumentClassifierInput) GoString() string { 7091 return s.String() 7092} 7093 7094// Validate inspects the fields of the type to determine if they are valid. 7095func (s *DescribeDocumentClassifierInput) Validate() error { 7096 invalidParams := request.ErrInvalidParams{Context: "DescribeDocumentClassifierInput"} 7097 if s.DocumentClassifierArn == nil { 7098 invalidParams.Add(request.NewErrParamRequired("DocumentClassifierArn")) 7099 } 7100 7101 if invalidParams.Len() > 0 { 7102 return invalidParams 7103 } 7104 return nil 7105} 7106 7107// SetDocumentClassifierArn sets the DocumentClassifierArn field's value. 7108func (s *DescribeDocumentClassifierInput) SetDocumentClassifierArn(v string) *DescribeDocumentClassifierInput { 7109 s.DocumentClassifierArn = &v 7110 return s 7111} 7112 7113type DescribeDocumentClassifierOutput struct { 7114 _ struct{} `type:"structure"` 7115 7116 // An object that contains the properties associated with a document classifier. 7117 DocumentClassifierProperties *DocumentClassifierProperties `type:"structure"` 7118} 7119 7120// String returns the string representation 7121func (s DescribeDocumentClassifierOutput) String() string { 7122 return awsutil.Prettify(s) 7123} 7124 7125// GoString returns the string representation 7126func (s DescribeDocumentClassifierOutput) GoString() string { 7127 return s.String() 7128} 7129 7130// SetDocumentClassifierProperties sets the DocumentClassifierProperties field's value. 7131func (s *DescribeDocumentClassifierOutput) SetDocumentClassifierProperties(v *DocumentClassifierProperties) *DescribeDocumentClassifierOutput { 7132 s.DocumentClassifierProperties = v 7133 return s 7134} 7135 7136type DescribeDominantLanguageDetectionJobInput struct { 7137 _ struct{} `type:"structure"` 7138 7139 // The identifier that Amazon Comprehend generated for the job. The operation 7140 // returns this identifier in its response. 7141 // 7142 // JobId is a required field 7143 JobId *string `min:"1" type:"string" required:"true"` 7144} 7145 7146// String returns the string representation 7147func (s DescribeDominantLanguageDetectionJobInput) String() string { 7148 return awsutil.Prettify(s) 7149} 7150 7151// GoString returns the string representation 7152func (s DescribeDominantLanguageDetectionJobInput) GoString() string { 7153 return s.String() 7154} 7155 7156// Validate inspects the fields of the type to determine if they are valid. 7157func (s *DescribeDominantLanguageDetectionJobInput) Validate() error { 7158 invalidParams := request.ErrInvalidParams{Context: "DescribeDominantLanguageDetectionJobInput"} 7159 if s.JobId == nil { 7160 invalidParams.Add(request.NewErrParamRequired("JobId")) 7161 } 7162 if s.JobId != nil && len(*s.JobId) < 1 { 7163 invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) 7164 } 7165 7166 if invalidParams.Len() > 0 { 7167 return invalidParams 7168 } 7169 return nil 7170} 7171 7172// SetJobId sets the JobId field's value. 7173func (s *DescribeDominantLanguageDetectionJobInput) SetJobId(v string) *DescribeDominantLanguageDetectionJobInput { 7174 s.JobId = &v 7175 return s 7176} 7177 7178type DescribeDominantLanguageDetectionJobOutput struct { 7179 _ struct{} `type:"structure"` 7180 7181 // An object that contains the properties associated with a dominant language 7182 // detection job. 7183 DominantLanguageDetectionJobProperties *DominantLanguageDetectionJobProperties `type:"structure"` 7184} 7185 7186// String returns the string representation 7187func (s DescribeDominantLanguageDetectionJobOutput) String() string { 7188 return awsutil.Prettify(s) 7189} 7190 7191// GoString returns the string representation 7192func (s DescribeDominantLanguageDetectionJobOutput) GoString() string { 7193 return s.String() 7194} 7195 7196// SetDominantLanguageDetectionJobProperties sets the DominantLanguageDetectionJobProperties field's value. 7197func (s *DescribeDominantLanguageDetectionJobOutput) SetDominantLanguageDetectionJobProperties(v *DominantLanguageDetectionJobProperties) *DescribeDominantLanguageDetectionJobOutput { 7198 s.DominantLanguageDetectionJobProperties = v 7199 return s 7200} 7201 7202type DescribeEndpointInput struct { 7203 _ struct{} `type:"structure"` 7204 7205 // The Amazon Resource Number (ARN) of the endpoint being described. 7206 // 7207 // EndpointArn is a required field 7208 EndpointArn *string `type:"string" required:"true"` 7209} 7210 7211// String returns the string representation 7212func (s DescribeEndpointInput) String() string { 7213 return awsutil.Prettify(s) 7214} 7215 7216// GoString returns the string representation 7217func (s DescribeEndpointInput) GoString() string { 7218 return s.String() 7219} 7220 7221// Validate inspects the fields of the type to determine if they are valid. 7222func (s *DescribeEndpointInput) Validate() error { 7223 invalidParams := request.ErrInvalidParams{Context: "DescribeEndpointInput"} 7224 if s.EndpointArn == nil { 7225 invalidParams.Add(request.NewErrParamRequired("EndpointArn")) 7226 } 7227 7228 if invalidParams.Len() > 0 { 7229 return invalidParams 7230 } 7231 return nil 7232} 7233 7234// SetEndpointArn sets the EndpointArn field's value. 7235func (s *DescribeEndpointInput) SetEndpointArn(v string) *DescribeEndpointInput { 7236 s.EndpointArn = &v 7237 return s 7238} 7239 7240type DescribeEndpointOutput struct { 7241 _ struct{} `type:"structure"` 7242 7243 // Describes information associated with the specific endpoint. 7244 EndpointProperties *EndpointProperties `type:"structure"` 7245} 7246 7247// String returns the string representation 7248func (s DescribeEndpointOutput) String() string { 7249 return awsutil.Prettify(s) 7250} 7251 7252// GoString returns the string representation 7253func (s DescribeEndpointOutput) GoString() string { 7254 return s.String() 7255} 7256 7257// SetEndpointProperties sets the EndpointProperties field's value. 7258func (s *DescribeEndpointOutput) SetEndpointProperties(v *EndpointProperties) *DescribeEndpointOutput { 7259 s.EndpointProperties = v 7260 return s 7261} 7262 7263type DescribeEntitiesDetectionJobInput struct { 7264 _ struct{} `type:"structure"` 7265 7266 // The identifier that Amazon Comprehend generated for the job. The operation 7267 // returns this identifier in its response. 7268 // 7269 // JobId is a required field 7270 JobId *string `min:"1" type:"string" required:"true"` 7271} 7272 7273// String returns the string representation 7274func (s DescribeEntitiesDetectionJobInput) String() string { 7275 return awsutil.Prettify(s) 7276} 7277 7278// GoString returns the string representation 7279func (s DescribeEntitiesDetectionJobInput) GoString() string { 7280 return s.String() 7281} 7282 7283// Validate inspects the fields of the type to determine if they are valid. 7284func (s *DescribeEntitiesDetectionJobInput) Validate() error { 7285 invalidParams := request.ErrInvalidParams{Context: "DescribeEntitiesDetectionJobInput"} 7286 if s.JobId == nil { 7287 invalidParams.Add(request.NewErrParamRequired("JobId")) 7288 } 7289 if s.JobId != nil && len(*s.JobId) < 1 { 7290 invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) 7291 } 7292 7293 if invalidParams.Len() > 0 { 7294 return invalidParams 7295 } 7296 return nil 7297} 7298 7299// SetJobId sets the JobId field's value. 7300func (s *DescribeEntitiesDetectionJobInput) SetJobId(v string) *DescribeEntitiesDetectionJobInput { 7301 s.JobId = &v 7302 return s 7303} 7304 7305type DescribeEntitiesDetectionJobOutput struct { 7306 _ struct{} `type:"structure"` 7307 7308 // An object that contains the properties associated with an entities detection 7309 // job. 7310 EntitiesDetectionJobProperties *EntitiesDetectionJobProperties `type:"structure"` 7311} 7312 7313// String returns the string representation 7314func (s DescribeEntitiesDetectionJobOutput) String() string { 7315 return awsutil.Prettify(s) 7316} 7317 7318// GoString returns the string representation 7319func (s DescribeEntitiesDetectionJobOutput) GoString() string { 7320 return s.String() 7321} 7322 7323// SetEntitiesDetectionJobProperties sets the EntitiesDetectionJobProperties field's value. 7324func (s *DescribeEntitiesDetectionJobOutput) SetEntitiesDetectionJobProperties(v *EntitiesDetectionJobProperties) *DescribeEntitiesDetectionJobOutput { 7325 s.EntitiesDetectionJobProperties = v 7326 return s 7327} 7328 7329type DescribeEntityRecognizerInput struct { 7330 _ struct{} `type:"structure"` 7331 7332 // The Amazon Resource Name (ARN) that identifies the entity recognizer. 7333 // 7334 // EntityRecognizerArn is a required field 7335 EntityRecognizerArn *string `type:"string" required:"true"` 7336} 7337 7338// String returns the string representation 7339func (s DescribeEntityRecognizerInput) String() string { 7340 return awsutil.Prettify(s) 7341} 7342 7343// GoString returns the string representation 7344func (s DescribeEntityRecognizerInput) GoString() string { 7345 return s.String() 7346} 7347 7348// Validate inspects the fields of the type to determine if they are valid. 7349func (s *DescribeEntityRecognizerInput) Validate() error { 7350 invalidParams := request.ErrInvalidParams{Context: "DescribeEntityRecognizerInput"} 7351 if s.EntityRecognizerArn == nil { 7352 invalidParams.Add(request.NewErrParamRequired("EntityRecognizerArn")) 7353 } 7354 7355 if invalidParams.Len() > 0 { 7356 return invalidParams 7357 } 7358 return nil 7359} 7360 7361// SetEntityRecognizerArn sets the EntityRecognizerArn field's value. 7362func (s *DescribeEntityRecognizerInput) SetEntityRecognizerArn(v string) *DescribeEntityRecognizerInput { 7363 s.EntityRecognizerArn = &v 7364 return s 7365} 7366 7367type DescribeEntityRecognizerOutput struct { 7368 _ struct{} `type:"structure"` 7369 7370 // Describes information associated with an entity recognizer. 7371 EntityRecognizerProperties *EntityRecognizerProperties `type:"structure"` 7372} 7373 7374// String returns the string representation 7375func (s DescribeEntityRecognizerOutput) String() string { 7376 return awsutil.Prettify(s) 7377} 7378 7379// GoString returns the string representation 7380func (s DescribeEntityRecognizerOutput) GoString() string { 7381 return s.String() 7382} 7383 7384// SetEntityRecognizerProperties sets the EntityRecognizerProperties field's value. 7385func (s *DescribeEntityRecognizerOutput) SetEntityRecognizerProperties(v *EntityRecognizerProperties) *DescribeEntityRecognizerOutput { 7386 s.EntityRecognizerProperties = v 7387 return s 7388} 7389 7390type DescribeKeyPhrasesDetectionJobInput struct { 7391 _ struct{} `type:"structure"` 7392 7393 // The identifier that Amazon Comprehend generated for the job. The operation 7394 // returns this identifier in its response. 7395 // 7396 // JobId is a required field 7397 JobId *string `min:"1" type:"string" required:"true"` 7398} 7399 7400// String returns the string representation 7401func (s DescribeKeyPhrasesDetectionJobInput) String() string { 7402 return awsutil.Prettify(s) 7403} 7404 7405// GoString returns the string representation 7406func (s DescribeKeyPhrasesDetectionJobInput) GoString() string { 7407 return s.String() 7408} 7409 7410// Validate inspects the fields of the type to determine if they are valid. 7411func (s *DescribeKeyPhrasesDetectionJobInput) Validate() error { 7412 invalidParams := request.ErrInvalidParams{Context: "DescribeKeyPhrasesDetectionJobInput"} 7413 if s.JobId == nil { 7414 invalidParams.Add(request.NewErrParamRequired("JobId")) 7415 } 7416 if s.JobId != nil && len(*s.JobId) < 1 { 7417 invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) 7418 } 7419 7420 if invalidParams.Len() > 0 { 7421 return invalidParams 7422 } 7423 return nil 7424} 7425 7426// SetJobId sets the JobId field's value. 7427func (s *DescribeKeyPhrasesDetectionJobInput) SetJobId(v string) *DescribeKeyPhrasesDetectionJobInput { 7428 s.JobId = &v 7429 return s 7430} 7431 7432type DescribeKeyPhrasesDetectionJobOutput struct { 7433 _ struct{} `type:"structure"` 7434 7435 // An object that contains the properties associated with a key phrases detection 7436 // job. 7437 KeyPhrasesDetectionJobProperties *KeyPhrasesDetectionJobProperties `type:"structure"` 7438} 7439 7440// String returns the string representation 7441func (s DescribeKeyPhrasesDetectionJobOutput) String() string { 7442 return awsutil.Prettify(s) 7443} 7444 7445// GoString returns the string representation 7446func (s DescribeKeyPhrasesDetectionJobOutput) GoString() string { 7447 return s.String() 7448} 7449 7450// SetKeyPhrasesDetectionJobProperties sets the KeyPhrasesDetectionJobProperties field's value. 7451func (s *DescribeKeyPhrasesDetectionJobOutput) SetKeyPhrasesDetectionJobProperties(v *KeyPhrasesDetectionJobProperties) *DescribeKeyPhrasesDetectionJobOutput { 7452 s.KeyPhrasesDetectionJobProperties = v 7453 return s 7454} 7455 7456type DescribeSentimentDetectionJobInput struct { 7457 _ struct{} `type:"structure"` 7458 7459 // The identifier that Amazon Comprehend generated for the job. The operation 7460 // returns this identifier in its response. 7461 // 7462 // JobId is a required field 7463 JobId *string `min:"1" type:"string" required:"true"` 7464} 7465 7466// String returns the string representation 7467func (s DescribeSentimentDetectionJobInput) String() string { 7468 return awsutil.Prettify(s) 7469} 7470 7471// GoString returns the string representation 7472func (s DescribeSentimentDetectionJobInput) GoString() string { 7473 return s.String() 7474} 7475 7476// Validate inspects the fields of the type to determine if they are valid. 7477func (s *DescribeSentimentDetectionJobInput) Validate() error { 7478 invalidParams := request.ErrInvalidParams{Context: "DescribeSentimentDetectionJobInput"} 7479 if s.JobId == nil { 7480 invalidParams.Add(request.NewErrParamRequired("JobId")) 7481 } 7482 if s.JobId != nil && len(*s.JobId) < 1 { 7483 invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) 7484 } 7485 7486 if invalidParams.Len() > 0 { 7487 return invalidParams 7488 } 7489 return nil 7490} 7491 7492// SetJobId sets the JobId field's value. 7493func (s *DescribeSentimentDetectionJobInput) SetJobId(v string) *DescribeSentimentDetectionJobInput { 7494 s.JobId = &v 7495 return s 7496} 7497 7498type DescribeSentimentDetectionJobOutput struct { 7499 _ struct{} `type:"structure"` 7500 7501 // An object that contains the properties associated with a sentiment detection 7502 // job. 7503 SentimentDetectionJobProperties *SentimentDetectionJobProperties `type:"structure"` 7504} 7505 7506// String returns the string representation 7507func (s DescribeSentimentDetectionJobOutput) String() string { 7508 return awsutil.Prettify(s) 7509} 7510 7511// GoString returns the string representation 7512func (s DescribeSentimentDetectionJobOutput) GoString() string { 7513 return s.String() 7514} 7515 7516// SetSentimentDetectionJobProperties sets the SentimentDetectionJobProperties field's value. 7517func (s *DescribeSentimentDetectionJobOutput) SetSentimentDetectionJobProperties(v *SentimentDetectionJobProperties) *DescribeSentimentDetectionJobOutput { 7518 s.SentimentDetectionJobProperties = v 7519 return s 7520} 7521 7522type DescribeTopicsDetectionJobInput struct { 7523 _ struct{} `type:"structure"` 7524 7525 // The identifier assigned by the user to the detection job. 7526 // 7527 // JobId is a required field 7528 JobId *string `min:"1" type:"string" required:"true"` 7529} 7530 7531// String returns the string representation 7532func (s DescribeTopicsDetectionJobInput) String() string { 7533 return awsutil.Prettify(s) 7534} 7535 7536// GoString returns the string representation 7537func (s DescribeTopicsDetectionJobInput) GoString() string { 7538 return s.String() 7539} 7540 7541// Validate inspects the fields of the type to determine if they are valid. 7542func (s *DescribeTopicsDetectionJobInput) Validate() error { 7543 invalidParams := request.ErrInvalidParams{Context: "DescribeTopicsDetectionJobInput"} 7544 if s.JobId == nil { 7545 invalidParams.Add(request.NewErrParamRequired("JobId")) 7546 } 7547 if s.JobId != nil && len(*s.JobId) < 1 { 7548 invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) 7549 } 7550 7551 if invalidParams.Len() > 0 { 7552 return invalidParams 7553 } 7554 return nil 7555} 7556 7557// SetJobId sets the JobId field's value. 7558func (s *DescribeTopicsDetectionJobInput) SetJobId(v string) *DescribeTopicsDetectionJobInput { 7559 s.JobId = &v 7560 return s 7561} 7562 7563type DescribeTopicsDetectionJobOutput struct { 7564 _ struct{} `type:"structure"` 7565 7566 // The list of properties for the requested job. 7567 TopicsDetectionJobProperties *TopicsDetectionJobProperties `type:"structure"` 7568} 7569 7570// String returns the string representation 7571func (s DescribeTopicsDetectionJobOutput) String() string { 7572 return awsutil.Prettify(s) 7573} 7574 7575// GoString returns the string representation 7576func (s DescribeTopicsDetectionJobOutput) GoString() string { 7577 return s.String() 7578} 7579 7580// SetTopicsDetectionJobProperties sets the TopicsDetectionJobProperties field's value. 7581func (s *DescribeTopicsDetectionJobOutput) SetTopicsDetectionJobProperties(v *TopicsDetectionJobProperties) *DescribeTopicsDetectionJobOutput { 7582 s.TopicsDetectionJobProperties = v 7583 return s 7584} 7585 7586type DetectDominantLanguageInput struct { 7587 _ struct{} `type:"structure"` 7588 7589 // A UTF-8 text string. Each string should contain at least 20 characters and 7590 // must contain fewer that 5,000 bytes of UTF-8 encoded characters. 7591 // 7592 // Text is a required field 7593 Text *string `min:"1" type:"string" required:"true"` 7594} 7595 7596// String returns the string representation 7597func (s DetectDominantLanguageInput) String() string { 7598 return awsutil.Prettify(s) 7599} 7600 7601// GoString returns the string representation 7602func (s DetectDominantLanguageInput) GoString() string { 7603 return s.String() 7604} 7605 7606// Validate inspects the fields of the type to determine if they are valid. 7607func (s *DetectDominantLanguageInput) Validate() error { 7608 invalidParams := request.ErrInvalidParams{Context: "DetectDominantLanguageInput"} 7609 if s.Text == nil { 7610 invalidParams.Add(request.NewErrParamRequired("Text")) 7611 } 7612 if s.Text != nil && len(*s.Text) < 1 { 7613 invalidParams.Add(request.NewErrParamMinLen("Text", 1)) 7614 } 7615 7616 if invalidParams.Len() > 0 { 7617 return invalidParams 7618 } 7619 return nil 7620} 7621 7622// SetText sets the Text field's value. 7623func (s *DetectDominantLanguageInput) SetText(v string) *DetectDominantLanguageInput { 7624 s.Text = &v 7625 return s 7626} 7627 7628type DetectDominantLanguageOutput struct { 7629 _ struct{} `type:"structure"` 7630 7631 // The languages that Amazon Comprehend detected in the input text. For each 7632 // language, the response returns the RFC 5646 language code and the level of 7633 // confidence that Amazon Comprehend has in the accuracy of its inference. For 7634 // more information about RFC 5646, see Tags for Identifying Languages (https://tools.ietf.org/html/rfc5646) 7635 // on the IETF Tools web site. 7636 Languages []*DominantLanguage `type:"list"` 7637} 7638 7639// String returns the string representation 7640func (s DetectDominantLanguageOutput) String() string { 7641 return awsutil.Prettify(s) 7642} 7643 7644// GoString returns the string representation 7645func (s DetectDominantLanguageOutput) GoString() string { 7646 return s.String() 7647} 7648 7649// SetLanguages sets the Languages field's value. 7650func (s *DetectDominantLanguageOutput) SetLanguages(v []*DominantLanguage) *DetectDominantLanguageOutput { 7651 s.Languages = v 7652 return s 7653} 7654 7655type DetectEntitiesInput struct { 7656 _ struct{} `type:"structure"` 7657 7658 // The language of the input documents. You can specify any of the primary languages 7659 // supported by Amazon Comprehend. All documents must be in the same language. 7660 // 7661 // LanguageCode is a required field 7662 LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"` 7663 7664 // A UTF-8 text string. Each string must contain fewer that 5,000 bytes of UTF-8 7665 // encoded characters. 7666 // 7667 // Text is a required field 7668 Text *string `min:"1" type:"string" required:"true"` 7669} 7670 7671// String returns the string representation 7672func (s DetectEntitiesInput) String() string { 7673 return awsutil.Prettify(s) 7674} 7675 7676// GoString returns the string representation 7677func (s DetectEntitiesInput) GoString() string { 7678 return s.String() 7679} 7680 7681// Validate inspects the fields of the type to determine if they are valid. 7682func (s *DetectEntitiesInput) Validate() error { 7683 invalidParams := request.ErrInvalidParams{Context: "DetectEntitiesInput"} 7684 if s.LanguageCode == nil { 7685 invalidParams.Add(request.NewErrParamRequired("LanguageCode")) 7686 } 7687 if s.Text == nil { 7688 invalidParams.Add(request.NewErrParamRequired("Text")) 7689 } 7690 if s.Text != nil && len(*s.Text) < 1 { 7691 invalidParams.Add(request.NewErrParamMinLen("Text", 1)) 7692 } 7693 7694 if invalidParams.Len() > 0 { 7695 return invalidParams 7696 } 7697 return nil 7698} 7699 7700// SetLanguageCode sets the LanguageCode field's value. 7701func (s *DetectEntitiesInput) SetLanguageCode(v string) *DetectEntitiesInput { 7702 s.LanguageCode = &v 7703 return s 7704} 7705 7706// SetText sets the Text field's value. 7707func (s *DetectEntitiesInput) SetText(v string) *DetectEntitiesInput { 7708 s.Text = &v 7709 return s 7710} 7711 7712type DetectEntitiesOutput struct { 7713 _ struct{} `type:"structure"` 7714 7715 // A collection of entities identified in the input text. For each entity, the 7716 // response provides the entity text, entity type, where the entity text begins 7717 // and ends, and the level of confidence that Amazon Comprehend has in the detection. 7718 // For a list of entity types, see how-entities. 7719 Entities []*Entity `type:"list"` 7720} 7721 7722// String returns the string representation 7723func (s DetectEntitiesOutput) String() string { 7724 return awsutil.Prettify(s) 7725} 7726 7727// GoString returns the string representation 7728func (s DetectEntitiesOutput) GoString() string { 7729 return s.String() 7730} 7731 7732// SetEntities sets the Entities field's value. 7733func (s *DetectEntitiesOutput) SetEntities(v []*Entity) *DetectEntitiesOutput { 7734 s.Entities = v 7735 return s 7736} 7737 7738type DetectKeyPhrasesInput struct { 7739 _ struct{} `type:"structure"` 7740 7741 // The language of the input documents. You can specify any of the primary languages 7742 // supported by Amazon Comprehend. All documents must be in the same language. 7743 // 7744 // LanguageCode is a required field 7745 LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"` 7746 7747 // A UTF-8 text string. Each string must contain fewer that 5,000 bytes of UTF-8 7748 // encoded characters. 7749 // 7750 // Text is a required field 7751 Text *string `min:"1" type:"string" required:"true"` 7752} 7753 7754// String returns the string representation 7755func (s DetectKeyPhrasesInput) String() string { 7756 return awsutil.Prettify(s) 7757} 7758 7759// GoString returns the string representation 7760func (s DetectKeyPhrasesInput) GoString() string { 7761 return s.String() 7762} 7763 7764// Validate inspects the fields of the type to determine if they are valid. 7765func (s *DetectKeyPhrasesInput) Validate() error { 7766 invalidParams := request.ErrInvalidParams{Context: "DetectKeyPhrasesInput"} 7767 if s.LanguageCode == nil { 7768 invalidParams.Add(request.NewErrParamRequired("LanguageCode")) 7769 } 7770 if s.Text == nil { 7771 invalidParams.Add(request.NewErrParamRequired("Text")) 7772 } 7773 if s.Text != nil && len(*s.Text) < 1 { 7774 invalidParams.Add(request.NewErrParamMinLen("Text", 1)) 7775 } 7776 7777 if invalidParams.Len() > 0 { 7778 return invalidParams 7779 } 7780 return nil 7781} 7782 7783// SetLanguageCode sets the LanguageCode field's value. 7784func (s *DetectKeyPhrasesInput) SetLanguageCode(v string) *DetectKeyPhrasesInput { 7785 s.LanguageCode = &v 7786 return s 7787} 7788 7789// SetText sets the Text field's value. 7790func (s *DetectKeyPhrasesInput) SetText(v string) *DetectKeyPhrasesInput { 7791 s.Text = &v 7792 return s 7793} 7794 7795type DetectKeyPhrasesOutput struct { 7796 _ struct{} `type:"structure"` 7797 7798 // A collection of key phrases that Amazon Comprehend identified in the input 7799 // text. For each key phrase, the response provides the text of the key phrase, 7800 // where the key phrase begins and ends, and the level of confidence that Amazon 7801 // Comprehend has in the accuracy of the detection. 7802 KeyPhrases []*KeyPhrase `type:"list"` 7803} 7804 7805// String returns the string representation 7806func (s DetectKeyPhrasesOutput) String() string { 7807 return awsutil.Prettify(s) 7808} 7809 7810// GoString returns the string representation 7811func (s DetectKeyPhrasesOutput) GoString() string { 7812 return s.String() 7813} 7814 7815// SetKeyPhrases sets the KeyPhrases field's value. 7816func (s *DetectKeyPhrasesOutput) SetKeyPhrases(v []*KeyPhrase) *DetectKeyPhrasesOutput { 7817 s.KeyPhrases = v 7818 return s 7819} 7820 7821type DetectSentimentInput struct { 7822 _ struct{} `type:"structure"` 7823 7824 // The language of the input documents. You can specify any of the primary languages 7825 // supported by Amazon Comprehend. All documents must be in the same language. 7826 // 7827 // LanguageCode is a required field 7828 LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"` 7829 7830 // A UTF-8 text string. Each string must contain fewer that 5,000 bytes of UTF-8 7831 // encoded characters. 7832 // 7833 // Text is a required field 7834 Text *string `min:"1" type:"string" required:"true"` 7835} 7836 7837// String returns the string representation 7838func (s DetectSentimentInput) String() string { 7839 return awsutil.Prettify(s) 7840} 7841 7842// GoString returns the string representation 7843func (s DetectSentimentInput) GoString() string { 7844 return s.String() 7845} 7846 7847// Validate inspects the fields of the type to determine if they are valid. 7848func (s *DetectSentimentInput) Validate() error { 7849 invalidParams := request.ErrInvalidParams{Context: "DetectSentimentInput"} 7850 if s.LanguageCode == nil { 7851 invalidParams.Add(request.NewErrParamRequired("LanguageCode")) 7852 } 7853 if s.Text == nil { 7854 invalidParams.Add(request.NewErrParamRequired("Text")) 7855 } 7856 if s.Text != nil && len(*s.Text) < 1 { 7857 invalidParams.Add(request.NewErrParamMinLen("Text", 1)) 7858 } 7859 7860 if invalidParams.Len() > 0 { 7861 return invalidParams 7862 } 7863 return nil 7864} 7865 7866// SetLanguageCode sets the LanguageCode field's value. 7867func (s *DetectSentimentInput) SetLanguageCode(v string) *DetectSentimentInput { 7868 s.LanguageCode = &v 7869 return s 7870} 7871 7872// SetText sets the Text field's value. 7873func (s *DetectSentimentInput) SetText(v string) *DetectSentimentInput { 7874 s.Text = &v 7875 return s 7876} 7877 7878type DetectSentimentOutput struct { 7879 _ struct{} `type:"structure"` 7880 7881 // The inferred sentiment that Amazon Comprehend has the highest level of confidence 7882 // in. 7883 Sentiment *string `type:"string" enum:"SentimentType"` 7884 7885 // An object that lists the sentiments, and their corresponding confidence levels. 7886 SentimentScore *SentimentScore `type:"structure"` 7887} 7888 7889// String returns the string representation 7890func (s DetectSentimentOutput) String() string { 7891 return awsutil.Prettify(s) 7892} 7893 7894// GoString returns the string representation 7895func (s DetectSentimentOutput) GoString() string { 7896 return s.String() 7897} 7898 7899// SetSentiment sets the Sentiment field's value. 7900func (s *DetectSentimentOutput) SetSentiment(v string) *DetectSentimentOutput { 7901 s.Sentiment = &v 7902 return s 7903} 7904 7905// SetSentimentScore sets the SentimentScore field's value. 7906func (s *DetectSentimentOutput) SetSentimentScore(v *SentimentScore) *DetectSentimentOutput { 7907 s.SentimentScore = v 7908 return s 7909} 7910 7911type DetectSyntaxInput struct { 7912 _ struct{} `type:"structure"` 7913 7914 // The language code of the input documents. You can specify any of the following 7915 // languages supported by Amazon Comprehend: German ("de"), English ("en"), 7916 // Spanish ("es"), French ("fr"), Italian ("it"), or Portuguese ("pt"). 7917 // 7918 // LanguageCode is a required field 7919 LanguageCode *string `type:"string" required:"true" enum:"SyntaxLanguageCode"` 7920 7921 // A UTF-8 string. Each string must contain fewer that 5,000 bytes of UTF encoded 7922 // characters. 7923 // 7924 // Text is a required field 7925 Text *string `min:"1" type:"string" required:"true"` 7926} 7927 7928// String returns the string representation 7929func (s DetectSyntaxInput) String() string { 7930 return awsutil.Prettify(s) 7931} 7932 7933// GoString returns the string representation 7934func (s DetectSyntaxInput) GoString() string { 7935 return s.String() 7936} 7937 7938// Validate inspects the fields of the type to determine if they are valid. 7939func (s *DetectSyntaxInput) Validate() error { 7940 invalidParams := request.ErrInvalidParams{Context: "DetectSyntaxInput"} 7941 if s.LanguageCode == nil { 7942 invalidParams.Add(request.NewErrParamRequired("LanguageCode")) 7943 } 7944 if s.Text == nil { 7945 invalidParams.Add(request.NewErrParamRequired("Text")) 7946 } 7947 if s.Text != nil && len(*s.Text) < 1 { 7948 invalidParams.Add(request.NewErrParamMinLen("Text", 1)) 7949 } 7950 7951 if invalidParams.Len() > 0 { 7952 return invalidParams 7953 } 7954 return nil 7955} 7956 7957// SetLanguageCode sets the LanguageCode field's value. 7958func (s *DetectSyntaxInput) SetLanguageCode(v string) *DetectSyntaxInput { 7959 s.LanguageCode = &v 7960 return s 7961} 7962 7963// SetText sets the Text field's value. 7964func (s *DetectSyntaxInput) SetText(v string) *DetectSyntaxInput { 7965 s.Text = &v 7966 return s 7967} 7968 7969type DetectSyntaxOutput struct { 7970 _ struct{} `type:"structure"` 7971 7972 // A collection of syntax tokens describing the text. For each token, the response 7973 // provides the text, the token type, where the text begins and ends, and the 7974 // level of confidence that Amazon Comprehend has that the token is correct. 7975 // For a list of token types, see how-syntax. 7976 SyntaxTokens []*SyntaxToken `type:"list"` 7977} 7978 7979// String returns the string representation 7980func (s DetectSyntaxOutput) String() string { 7981 return awsutil.Prettify(s) 7982} 7983 7984// GoString returns the string representation 7985func (s DetectSyntaxOutput) GoString() string { 7986 return s.String() 7987} 7988 7989// SetSyntaxTokens sets the SyntaxTokens field's value. 7990func (s *DetectSyntaxOutput) SetSyntaxTokens(v []*SyntaxToken) *DetectSyntaxOutput { 7991 s.SyntaxTokens = v 7992 return s 7993} 7994 7995// Specifies the class that categorizes the document being analyzed 7996type DocumentClass struct { 7997 _ struct{} `type:"structure"` 7998 7999 // The name of the class. 8000 Name *string `min:"1" type:"string"` 8001 8002 // The confidence score that Amazon Comprehend has this class correctly attributed. 8003 Score *float64 `type:"float"` 8004} 8005 8006// String returns the string representation 8007func (s DocumentClass) String() string { 8008 return awsutil.Prettify(s) 8009} 8010 8011// GoString returns the string representation 8012func (s DocumentClass) GoString() string { 8013 return s.String() 8014} 8015 8016// SetName sets the Name field's value. 8017func (s *DocumentClass) SetName(v string) *DocumentClass { 8018 s.Name = &v 8019 return s 8020} 8021 8022// SetScore sets the Score field's value. 8023func (s *DocumentClass) SetScore(v float64) *DocumentClass { 8024 s.Score = &v 8025 return s 8026} 8027 8028// Provides information for filtering a list of document classification jobs. 8029// For more information, see the operation. You can provide only one filter 8030// parameter in each request. 8031type DocumentClassificationJobFilter struct { 8032 _ struct{} `type:"structure"` 8033 8034 // Filters on the name of the job. 8035 JobName *string `min:"1" type:"string"` 8036 8037 // Filters the list based on job status. Returns only jobs with the specified 8038 // status. 8039 JobStatus *string `type:"string" enum:"JobStatus"` 8040 8041 // Filters the list of jobs based on the time that the job was submitted for 8042 // processing. Returns only jobs submitted before the specified time. Jobs are 8043 // returned in descending order, newest to oldest. 8044 SubmitTimeAfter *time.Time `type:"timestamp"` 8045 8046 // Filters the list of jobs based on the time that the job was submitted for 8047 // processing. Returns only jobs submitted after the specified time. Jobs are 8048 // returned in ascending order, oldest to newest. 8049 SubmitTimeBefore *time.Time `type:"timestamp"` 8050} 8051 8052// String returns the string representation 8053func (s DocumentClassificationJobFilter) String() string { 8054 return awsutil.Prettify(s) 8055} 8056 8057// GoString returns the string representation 8058func (s DocumentClassificationJobFilter) GoString() string { 8059 return s.String() 8060} 8061 8062// Validate inspects the fields of the type to determine if they are valid. 8063func (s *DocumentClassificationJobFilter) Validate() error { 8064 invalidParams := request.ErrInvalidParams{Context: "DocumentClassificationJobFilter"} 8065 if s.JobName != nil && len(*s.JobName) < 1 { 8066 invalidParams.Add(request.NewErrParamMinLen("JobName", 1)) 8067 } 8068 8069 if invalidParams.Len() > 0 { 8070 return invalidParams 8071 } 8072 return nil 8073} 8074 8075// SetJobName sets the JobName field's value. 8076func (s *DocumentClassificationJobFilter) SetJobName(v string) *DocumentClassificationJobFilter { 8077 s.JobName = &v 8078 return s 8079} 8080 8081// SetJobStatus sets the JobStatus field's value. 8082func (s *DocumentClassificationJobFilter) SetJobStatus(v string) *DocumentClassificationJobFilter { 8083 s.JobStatus = &v 8084 return s 8085} 8086 8087// SetSubmitTimeAfter sets the SubmitTimeAfter field's value. 8088func (s *DocumentClassificationJobFilter) SetSubmitTimeAfter(v time.Time) *DocumentClassificationJobFilter { 8089 s.SubmitTimeAfter = &v 8090 return s 8091} 8092 8093// SetSubmitTimeBefore sets the SubmitTimeBefore field's value. 8094func (s *DocumentClassificationJobFilter) SetSubmitTimeBefore(v time.Time) *DocumentClassificationJobFilter { 8095 s.SubmitTimeBefore = &v 8096 return s 8097} 8098 8099// Provides information about a document classification job. 8100type DocumentClassificationJobProperties struct { 8101 _ struct{} `type:"structure"` 8102 8103 // The Amazon Resource Name (ARN) of the AWS identity and Access Management 8104 // (IAM) role that grants Amazon Comprehend read access to your input data. 8105 DataAccessRoleArn *string `min:"20" type:"string"` 8106 8107 // The Amazon Resource Name (ARN) that identifies the document classifier. 8108 DocumentClassifierArn *string `type:"string"` 8109 8110 // The time that the document classification job completed. 8111 EndTime *time.Time `type:"timestamp"` 8112 8113 // The input data configuration that you supplied when you created the document 8114 // classification job. 8115 InputDataConfig *InputDataConfig `type:"structure"` 8116 8117 // The identifier assigned to the document classification job. 8118 JobId *string `min:"1" type:"string"` 8119 8120 // The name that you assigned to the document classification job. 8121 JobName *string `min:"1" type:"string"` 8122 8123 // The current status of the document classification job. If the status is FAILED, 8124 // the Message field shows the reason for the failure. 8125 JobStatus *string `type:"string" enum:"JobStatus"` 8126 8127 // A description of the status of the job. 8128 Message *string `type:"string"` 8129 8130 // The output data configuration that you supplied when you created the document 8131 // classification job. 8132 OutputDataConfig *OutputDataConfig `type:"structure"` 8133 8134 // The time that the document classification job was submitted for processing. 8135 SubmitTime *time.Time `type:"timestamp"` 8136 8137 // ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses 8138 // to encrypt data on the storage volume attached to the ML compute instance(s) 8139 // that process the analysis job. The VolumeKmsKeyId can be either of the following 8140 // formats: 8141 // 8142 // * KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab" 8143 // 8144 // * Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" 8145 VolumeKmsKeyId *string `type:"string"` 8146 8147 // Configuration parameters for a private Virtual Private Cloud (VPC) containing 8148 // the resources you are using for your document classification job. For more 8149 // information, see Amazon VPC (https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html). 8150 VpcConfig *VpcConfig `type:"structure"` 8151} 8152 8153// String returns the string representation 8154func (s DocumentClassificationJobProperties) String() string { 8155 return awsutil.Prettify(s) 8156} 8157 8158// GoString returns the string representation 8159func (s DocumentClassificationJobProperties) GoString() string { 8160 return s.String() 8161} 8162 8163// SetDataAccessRoleArn sets the DataAccessRoleArn field's value. 8164func (s *DocumentClassificationJobProperties) SetDataAccessRoleArn(v string) *DocumentClassificationJobProperties { 8165 s.DataAccessRoleArn = &v 8166 return s 8167} 8168 8169// SetDocumentClassifierArn sets the DocumentClassifierArn field's value. 8170func (s *DocumentClassificationJobProperties) SetDocumentClassifierArn(v string) *DocumentClassificationJobProperties { 8171 s.DocumentClassifierArn = &v 8172 return s 8173} 8174 8175// SetEndTime sets the EndTime field's value. 8176func (s *DocumentClassificationJobProperties) SetEndTime(v time.Time) *DocumentClassificationJobProperties { 8177 s.EndTime = &v 8178 return s 8179} 8180 8181// SetInputDataConfig sets the InputDataConfig field's value. 8182func (s *DocumentClassificationJobProperties) SetInputDataConfig(v *InputDataConfig) *DocumentClassificationJobProperties { 8183 s.InputDataConfig = v 8184 return s 8185} 8186 8187// SetJobId sets the JobId field's value. 8188func (s *DocumentClassificationJobProperties) SetJobId(v string) *DocumentClassificationJobProperties { 8189 s.JobId = &v 8190 return s 8191} 8192 8193// SetJobName sets the JobName field's value. 8194func (s *DocumentClassificationJobProperties) SetJobName(v string) *DocumentClassificationJobProperties { 8195 s.JobName = &v 8196 return s 8197} 8198 8199// SetJobStatus sets the JobStatus field's value. 8200func (s *DocumentClassificationJobProperties) SetJobStatus(v string) *DocumentClassificationJobProperties { 8201 s.JobStatus = &v 8202 return s 8203} 8204 8205// SetMessage sets the Message field's value. 8206func (s *DocumentClassificationJobProperties) SetMessage(v string) *DocumentClassificationJobProperties { 8207 s.Message = &v 8208 return s 8209} 8210 8211// SetOutputDataConfig sets the OutputDataConfig field's value. 8212func (s *DocumentClassificationJobProperties) SetOutputDataConfig(v *OutputDataConfig) *DocumentClassificationJobProperties { 8213 s.OutputDataConfig = v 8214 return s 8215} 8216 8217// SetSubmitTime sets the SubmitTime field's value. 8218func (s *DocumentClassificationJobProperties) SetSubmitTime(v time.Time) *DocumentClassificationJobProperties { 8219 s.SubmitTime = &v 8220 return s 8221} 8222 8223// SetVolumeKmsKeyId sets the VolumeKmsKeyId field's value. 8224func (s *DocumentClassificationJobProperties) SetVolumeKmsKeyId(v string) *DocumentClassificationJobProperties { 8225 s.VolumeKmsKeyId = &v 8226 return s 8227} 8228 8229// SetVpcConfig sets the VpcConfig field's value. 8230func (s *DocumentClassificationJobProperties) SetVpcConfig(v *VpcConfig) *DocumentClassificationJobProperties { 8231 s.VpcConfig = v 8232 return s 8233} 8234 8235// Provides information for filtering a list of document classifiers. You can 8236// only specify one filtering parameter in a request. For more information, 8237// see the operation. 8238type DocumentClassifierFilter struct { 8239 _ struct{} `type:"structure"` 8240 8241 // Filters the list of classifiers based on status. 8242 Status *string `type:"string" enum:"ModelStatus"` 8243 8244 // Filters the list of classifiers based on the time that the classifier was 8245 // submitted for processing. Returns only classifiers submitted after the specified 8246 // time. Classifiers are returned in descending order, newest to oldest. 8247 SubmitTimeAfter *time.Time `type:"timestamp"` 8248 8249 // Filters the list of classifiers based on the time that the classifier was 8250 // submitted for processing. Returns only classifiers submitted before the specified 8251 // time. Classifiers are returned in ascending order, oldest to newest. 8252 SubmitTimeBefore *time.Time `type:"timestamp"` 8253} 8254 8255// String returns the string representation 8256func (s DocumentClassifierFilter) String() string { 8257 return awsutil.Prettify(s) 8258} 8259 8260// GoString returns the string representation 8261func (s DocumentClassifierFilter) GoString() string { 8262 return s.String() 8263} 8264 8265// SetStatus sets the Status field's value. 8266func (s *DocumentClassifierFilter) SetStatus(v string) *DocumentClassifierFilter { 8267 s.Status = &v 8268 return s 8269} 8270 8271// SetSubmitTimeAfter sets the SubmitTimeAfter field's value. 8272func (s *DocumentClassifierFilter) SetSubmitTimeAfter(v time.Time) *DocumentClassifierFilter { 8273 s.SubmitTimeAfter = &v 8274 return s 8275} 8276 8277// SetSubmitTimeBefore sets the SubmitTimeBefore field's value. 8278func (s *DocumentClassifierFilter) SetSubmitTimeBefore(v time.Time) *DocumentClassifierFilter { 8279 s.SubmitTimeBefore = &v 8280 return s 8281} 8282 8283// The input properties for training a document classifier. 8284// 8285// For more information on how the input file is formatted, see how-document-classification-training-data. 8286type DocumentClassifierInputDataConfig struct { 8287 _ struct{} `type:"structure"` 8288 8289 // Indicates the delimiter used to separate each label for training a multi-label 8290 // classifier. The default delimiter between labels is a pipe (|). You can use 8291 // a different character as a delimiter (if it's an allowed character) by specifying 8292 // it under Delimiter for labels. If the training documents use a delimiter 8293 // other than the default or the delimiter you specify, the labels on that line 8294 // will be combined to make a single unique label, such as LABELLABELLABEL. 8295 LabelDelimiter *string `min:"1" type:"string"` 8296 8297 // The Amazon S3 URI for the input data. The S3 bucket must be in the same region 8298 // as the API endpoint that you are calling. The URI can point to a single input 8299 // file or it can provide the prefix for a collection of input files. 8300 // 8301 // For example, if you use the URI S3://bucketName/prefix, if the prefix is 8302 // a single file, Amazon Comprehend uses that file as input. If more than one 8303 // file begins with the prefix, Amazon Comprehend uses all of them as input. 8304 // 8305 // S3Uri is a required field 8306 S3Uri *string `type:"string" required:"true"` 8307} 8308 8309// String returns the string representation 8310func (s DocumentClassifierInputDataConfig) String() string { 8311 return awsutil.Prettify(s) 8312} 8313 8314// GoString returns the string representation 8315func (s DocumentClassifierInputDataConfig) GoString() string { 8316 return s.String() 8317} 8318 8319// Validate inspects the fields of the type to determine if they are valid. 8320func (s *DocumentClassifierInputDataConfig) Validate() error { 8321 invalidParams := request.ErrInvalidParams{Context: "DocumentClassifierInputDataConfig"} 8322 if s.LabelDelimiter != nil && len(*s.LabelDelimiter) < 1 { 8323 invalidParams.Add(request.NewErrParamMinLen("LabelDelimiter", 1)) 8324 } 8325 if s.S3Uri == nil { 8326 invalidParams.Add(request.NewErrParamRequired("S3Uri")) 8327 } 8328 8329 if invalidParams.Len() > 0 { 8330 return invalidParams 8331 } 8332 return nil 8333} 8334 8335// SetLabelDelimiter sets the LabelDelimiter field's value. 8336func (s *DocumentClassifierInputDataConfig) SetLabelDelimiter(v string) *DocumentClassifierInputDataConfig { 8337 s.LabelDelimiter = &v 8338 return s 8339} 8340 8341// SetS3Uri sets the S3Uri field's value. 8342func (s *DocumentClassifierInputDataConfig) SetS3Uri(v string) *DocumentClassifierInputDataConfig { 8343 s.S3Uri = &v 8344 return s 8345} 8346 8347// Provides output results configuration parameters for custom classifier jobs. 8348type DocumentClassifierOutputDataConfig struct { 8349 _ struct{} `type:"structure"` 8350 8351 // ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses 8352 // to encrypt the output results from an analysis job. The KmsKeyId can be one 8353 // of the following formats: 8354 // 8355 // * KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab" 8356 // 8357 // * Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" 8358 // 8359 // * KMS Key Alias: "alias/ExampleAlias" 8360 // 8361 // * ARN of a KMS Key Alias: "arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias" 8362 KmsKeyId *string `type:"string"` 8363 8364 // When you use the OutputDataConfig object while creating a custom classifier, 8365 // you specify the Amazon S3 location where you want to write the confusion 8366 // matrix. The URI must be in the same region as the API endpoint that you are 8367 // calling. The location is used as the prefix for the actual location of this 8368 // output file. 8369 // 8370 // When the custom classifier job is finished, the service creates the output 8371 // file in a directory specific to the job. The S3Uri field contains the location 8372 // of the output file, called output.tar.gz. It is a compressed archive that 8373 // contains the confusion matrix. 8374 S3Uri *string `type:"string"` 8375} 8376 8377// String returns the string representation 8378func (s DocumentClassifierOutputDataConfig) String() string { 8379 return awsutil.Prettify(s) 8380} 8381 8382// GoString returns the string representation 8383func (s DocumentClassifierOutputDataConfig) GoString() string { 8384 return s.String() 8385} 8386 8387// SetKmsKeyId sets the KmsKeyId field's value. 8388func (s *DocumentClassifierOutputDataConfig) SetKmsKeyId(v string) *DocumentClassifierOutputDataConfig { 8389 s.KmsKeyId = &v 8390 return s 8391} 8392 8393// SetS3Uri sets the S3Uri field's value. 8394func (s *DocumentClassifierOutputDataConfig) SetS3Uri(v string) *DocumentClassifierOutputDataConfig { 8395 s.S3Uri = &v 8396 return s 8397} 8398 8399// Provides information about a document classifier. 8400type DocumentClassifierProperties struct { 8401 _ struct{} `type:"structure"` 8402 8403 // Information about the document classifier, including the number of documents 8404 // used for training the classifier, the number of documents used for test the 8405 // classifier, and an accuracy rating. 8406 ClassifierMetadata *ClassifierMetadata `type:"structure"` 8407 8408 // The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM) role 8409 // that grants Amazon Comprehend read access to your input data. 8410 DataAccessRoleArn *string `min:"20" type:"string"` 8411 8412 // The Amazon Resource Name (ARN) that identifies the document classifier. 8413 DocumentClassifierArn *string `type:"string"` 8414 8415 // The time that training the document classifier completed. 8416 EndTime *time.Time `type:"timestamp"` 8417 8418 // The input data configuration that you supplied when you created the document 8419 // classifier for training. 8420 InputDataConfig *DocumentClassifierInputDataConfig `type:"structure"` 8421 8422 // The language code for the language of the documents that the classifier was 8423 // trained on. 8424 LanguageCode *string `type:"string" enum:"LanguageCode"` 8425 8426 // Additional information about the status of the classifier. 8427 Message *string `type:"string"` 8428 8429 // Indicates the mode in which the specific classifier was trained. This also 8430 // indicates the format of input documents and the format of the confusion matrix. 8431 // Each classifier can only be trained in one mode and this cannot be changed 8432 // once the classifier is trained. 8433 Mode *string `type:"string" enum:"DocumentClassifierMode"` 8434 8435 // Provides output results configuration parameters for custom classifier jobs. 8436 OutputDataConfig *DocumentClassifierOutputDataConfig `type:"structure"` 8437 8438 // The status of the document classifier. If the status is TRAINED the classifier 8439 // is ready to use. If the status is FAILED you can see additional information 8440 // about why the classifier wasn't trained in the Message field. 8441 Status *string `type:"string" enum:"ModelStatus"` 8442 8443 // The time that the document classifier was submitted for training. 8444 SubmitTime *time.Time `type:"timestamp"` 8445 8446 // The time that training of the document classifier was completed. Indicates 8447 // the time when the training completes on documentation classifiers. You are 8448 // billed for the time interval between this time and the value of TrainingStartTime. 8449 TrainingEndTime *time.Time `type:"timestamp"` 8450 8451 // Indicates the time when the training starts on documentation classifiers. 8452 // You are billed for the time interval between this time and the value of TrainingEndTime. 8453 TrainingStartTime *time.Time `type:"timestamp"` 8454 8455 // ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses 8456 // to encrypt data on the storage volume attached to the ML compute instance(s) 8457 // that process the analysis job. The VolumeKmsKeyId can be either of the following 8458 // formats: 8459 // 8460 // * KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab" 8461 // 8462 // * Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" 8463 VolumeKmsKeyId *string `type:"string"` 8464 8465 // Configuration parameters for a private Virtual Private Cloud (VPC) containing 8466 // the resources you are using for your custom classifier. For more information, 8467 // see Amazon VPC (https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html). 8468 VpcConfig *VpcConfig `type:"structure"` 8469} 8470 8471// String returns the string representation 8472func (s DocumentClassifierProperties) String() string { 8473 return awsutil.Prettify(s) 8474} 8475 8476// GoString returns the string representation 8477func (s DocumentClassifierProperties) GoString() string { 8478 return s.String() 8479} 8480 8481// SetClassifierMetadata sets the ClassifierMetadata field's value. 8482func (s *DocumentClassifierProperties) SetClassifierMetadata(v *ClassifierMetadata) *DocumentClassifierProperties { 8483 s.ClassifierMetadata = v 8484 return s 8485} 8486 8487// SetDataAccessRoleArn sets the DataAccessRoleArn field's value. 8488func (s *DocumentClassifierProperties) SetDataAccessRoleArn(v string) *DocumentClassifierProperties { 8489 s.DataAccessRoleArn = &v 8490 return s 8491} 8492 8493// SetDocumentClassifierArn sets the DocumentClassifierArn field's value. 8494func (s *DocumentClassifierProperties) SetDocumentClassifierArn(v string) *DocumentClassifierProperties { 8495 s.DocumentClassifierArn = &v 8496 return s 8497} 8498 8499// SetEndTime sets the EndTime field's value. 8500func (s *DocumentClassifierProperties) SetEndTime(v time.Time) *DocumentClassifierProperties { 8501 s.EndTime = &v 8502 return s 8503} 8504 8505// SetInputDataConfig sets the InputDataConfig field's value. 8506func (s *DocumentClassifierProperties) SetInputDataConfig(v *DocumentClassifierInputDataConfig) *DocumentClassifierProperties { 8507 s.InputDataConfig = v 8508 return s 8509} 8510 8511// SetLanguageCode sets the LanguageCode field's value. 8512func (s *DocumentClassifierProperties) SetLanguageCode(v string) *DocumentClassifierProperties { 8513 s.LanguageCode = &v 8514 return s 8515} 8516 8517// SetMessage sets the Message field's value. 8518func (s *DocumentClassifierProperties) SetMessage(v string) *DocumentClassifierProperties { 8519 s.Message = &v 8520 return s 8521} 8522 8523// SetMode sets the Mode field's value. 8524func (s *DocumentClassifierProperties) SetMode(v string) *DocumentClassifierProperties { 8525 s.Mode = &v 8526 return s 8527} 8528 8529// SetOutputDataConfig sets the OutputDataConfig field's value. 8530func (s *DocumentClassifierProperties) SetOutputDataConfig(v *DocumentClassifierOutputDataConfig) *DocumentClassifierProperties { 8531 s.OutputDataConfig = v 8532 return s 8533} 8534 8535// SetStatus sets the Status field's value. 8536func (s *DocumentClassifierProperties) SetStatus(v string) *DocumentClassifierProperties { 8537 s.Status = &v 8538 return s 8539} 8540 8541// SetSubmitTime sets the SubmitTime field's value. 8542func (s *DocumentClassifierProperties) SetSubmitTime(v time.Time) *DocumentClassifierProperties { 8543 s.SubmitTime = &v 8544 return s 8545} 8546 8547// SetTrainingEndTime sets the TrainingEndTime field's value. 8548func (s *DocumentClassifierProperties) SetTrainingEndTime(v time.Time) *DocumentClassifierProperties { 8549 s.TrainingEndTime = &v 8550 return s 8551} 8552 8553// SetTrainingStartTime sets the TrainingStartTime field's value. 8554func (s *DocumentClassifierProperties) SetTrainingStartTime(v time.Time) *DocumentClassifierProperties { 8555 s.TrainingStartTime = &v 8556 return s 8557} 8558 8559// SetVolumeKmsKeyId sets the VolumeKmsKeyId field's value. 8560func (s *DocumentClassifierProperties) SetVolumeKmsKeyId(v string) *DocumentClassifierProperties { 8561 s.VolumeKmsKeyId = &v 8562 return s 8563} 8564 8565// SetVpcConfig sets the VpcConfig field's value. 8566func (s *DocumentClassifierProperties) SetVpcConfig(v *VpcConfig) *DocumentClassifierProperties { 8567 s.VpcConfig = v 8568 return s 8569} 8570 8571// Specifies one of the label or labels that categorize the document being analyzed. 8572type DocumentLabel struct { 8573 _ struct{} `type:"structure"` 8574 8575 // The name of the label. 8576 Name *string `min:"1" type:"string"` 8577 8578 // The confidence score that Amazon Comprehend has this label correctly attributed. 8579 Score *float64 `type:"float"` 8580} 8581 8582// String returns the string representation 8583func (s DocumentLabel) String() string { 8584 return awsutil.Prettify(s) 8585} 8586 8587// GoString returns the string representation 8588func (s DocumentLabel) GoString() string { 8589 return s.String() 8590} 8591 8592// SetName sets the Name field's value. 8593func (s *DocumentLabel) SetName(v string) *DocumentLabel { 8594 s.Name = &v 8595 return s 8596} 8597 8598// SetScore sets the Score field's value. 8599func (s *DocumentLabel) SetScore(v float64) *DocumentLabel { 8600 s.Score = &v 8601 return s 8602} 8603 8604// Returns the code for the dominant language in the input text and the level 8605// of confidence that Amazon Comprehend has in the accuracy of the detection. 8606type DominantLanguage struct { 8607 _ struct{} `type:"structure"` 8608 8609 // The RFC 5646 language code for the dominant language. For more information 8610 // about RFC 5646, see Tags for Identifying Languages (https://tools.ietf.org/html/rfc5646) 8611 // on the IETF Tools web site. 8612 LanguageCode *string `min:"1" type:"string"` 8613 8614 // The level of confidence that Amazon Comprehend has in the accuracy of the 8615 // detection. 8616 Score *float64 `type:"float"` 8617} 8618 8619// String returns the string representation 8620func (s DominantLanguage) String() string { 8621 return awsutil.Prettify(s) 8622} 8623 8624// GoString returns the string representation 8625func (s DominantLanguage) GoString() string { 8626 return s.String() 8627} 8628 8629// SetLanguageCode sets the LanguageCode field's value. 8630func (s *DominantLanguage) SetLanguageCode(v string) *DominantLanguage { 8631 s.LanguageCode = &v 8632 return s 8633} 8634 8635// SetScore sets the Score field's value. 8636func (s *DominantLanguage) SetScore(v float64) *DominantLanguage { 8637 s.Score = &v 8638 return s 8639} 8640 8641// Provides information for filtering a list of dominant language detection 8642// jobs. For more information, see the operation. 8643type DominantLanguageDetectionJobFilter struct { 8644 _ struct{} `type:"structure"` 8645 8646 // Filters on the name of the job. 8647 JobName *string `min:"1" type:"string"` 8648 8649 // Filters the list of jobs based on job status. Returns only jobs with the 8650 // specified status. 8651 JobStatus *string `type:"string" enum:"JobStatus"` 8652 8653 // Filters the list of jobs based on the time that the job was submitted for 8654 // processing. Returns only jobs submitted after the specified time. Jobs are 8655 // returned in descending order, newest to oldest. 8656 SubmitTimeAfter *time.Time `type:"timestamp"` 8657 8658 // Filters the list of jobs based on the time that the job was submitted for 8659 // processing. Returns only jobs submitted before the specified time. Jobs are 8660 // returned in ascending order, oldest to newest. 8661 SubmitTimeBefore *time.Time `type:"timestamp"` 8662} 8663 8664// String returns the string representation 8665func (s DominantLanguageDetectionJobFilter) String() string { 8666 return awsutil.Prettify(s) 8667} 8668 8669// GoString returns the string representation 8670func (s DominantLanguageDetectionJobFilter) GoString() string { 8671 return s.String() 8672} 8673 8674// Validate inspects the fields of the type to determine if they are valid. 8675func (s *DominantLanguageDetectionJobFilter) Validate() error { 8676 invalidParams := request.ErrInvalidParams{Context: "DominantLanguageDetectionJobFilter"} 8677 if s.JobName != nil && len(*s.JobName) < 1 { 8678 invalidParams.Add(request.NewErrParamMinLen("JobName", 1)) 8679 } 8680 8681 if invalidParams.Len() > 0 { 8682 return invalidParams 8683 } 8684 return nil 8685} 8686 8687// SetJobName sets the JobName field's value. 8688func (s *DominantLanguageDetectionJobFilter) SetJobName(v string) *DominantLanguageDetectionJobFilter { 8689 s.JobName = &v 8690 return s 8691} 8692 8693// SetJobStatus sets the JobStatus field's value. 8694func (s *DominantLanguageDetectionJobFilter) SetJobStatus(v string) *DominantLanguageDetectionJobFilter { 8695 s.JobStatus = &v 8696 return s 8697} 8698 8699// SetSubmitTimeAfter sets the SubmitTimeAfter field's value. 8700func (s *DominantLanguageDetectionJobFilter) SetSubmitTimeAfter(v time.Time) *DominantLanguageDetectionJobFilter { 8701 s.SubmitTimeAfter = &v 8702 return s 8703} 8704 8705// SetSubmitTimeBefore sets the SubmitTimeBefore field's value. 8706func (s *DominantLanguageDetectionJobFilter) SetSubmitTimeBefore(v time.Time) *DominantLanguageDetectionJobFilter { 8707 s.SubmitTimeBefore = &v 8708 return s 8709} 8710 8711// Provides information about a dominant language detection job. 8712type DominantLanguageDetectionJobProperties struct { 8713 _ struct{} `type:"structure"` 8714 8715 // The Amazon Resource Name (ARN) that gives Amazon Comprehend read access to 8716 // your input data. 8717 DataAccessRoleArn *string `min:"20" type:"string"` 8718 8719 // The time that the dominant language detection job completed. 8720 EndTime *time.Time `type:"timestamp"` 8721 8722 // The input data configuration that you supplied when you created the dominant 8723 // language detection job. 8724 InputDataConfig *InputDataConfig `type:"structure"` 8725 8726 // The identifier assigned to the dominant language detection job. 8727 JobId *string `min:"1" type:"string"` 8728 8729 // The name that you assigned to the dominant language detection job. 8730 JobName *string `min:"1" type:"string"` 8731 8732 // The current status of the dominant language detection job. If the status 8733 // is FAILED, the Message field shows the reason for the failure. 8734 JobStatus *string `type:"string" enum:"JobStatus"` 8735 8736 // A description for the status of a job. 8737 Message *string `type:"string"` 8738 8739 // The output data configuration that you supplied when you created the dominant 8740 // language detection job. 8741 OutputDataConfig *OutputDataConfig `type:"structure"` 8742 8743 // The time that the dominant language detection job was submitted for processing. 8744 SubmitTime *time.Time `type:"timestamp"` 8745 8746 // ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses 8747 // to encrypt data on the storage volume attached to the ML compute instance(s) 8748 // that process the analysis job. The VolumeKmsKeyId can be either of the following 8749 // formats: 8750 // 8751 // * KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab" 8752 // 8753 // * Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" 8754 VolumeKmsKeyId *string `type:"string"` 8755 8756 // Configuration parameters for a private Virtual Private Cloud (VPC) containing 8757 // the resources you are using for your dominant language detection job. For 8758 // more information, see Amazon VPC (https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html). 8759 VpcConfig *VpcConfig `type:"structure"` 8760} 8761 8762// String returns the string representation 8763func (s DominantLanguageDetectionJobProperties) String() string { 8764 return awsutil.Prettify(s) 8765} 8766 8767// GoString returns the string representation 8768func (s DominantLanguageDetectionJobProperties) GoString() string { 8769 return s.String() 8770} 8771 8772// SetDataAccessRoleArn sets the DataAccessRoleArn field's value. 8773func (s *DominantLanguageDetectionJobProperties) SetDataAccessRoleArn(v string) *DominantLanguageDetectionJobProperties { 8774 s.DataAccessRoleArn = &v 8775 return s 8776} 8777 8778// SetEndTime sets the EndTime field's value. 8779func (s *DominantLanguageDetectionJobProperties) SetEndTime(v time.Time) *DominantLanguageDetectionJobProperties { 8780 s.EndTime = &v 8781 return s 8782} 8783 8784// SetInputDataConfig sets the InputDataConfig field's value. 8785func (s *DominantLanguageDetectionJobProperties) SetInputDataConfig(v *InputDataConfig) *DominantLanguageDetectionJobProperties { 8786 s.InputDataConfig = v 8787 return s 8788} 8789 8790// SetJobId sets the JobId field's value. 8791func (s *DominantLanguageDetectionJobProperties) SetJobId(v string) *DominantLanguageDetectionJobProperties { 8792 s.JobId = &v 8793 return s 8794} 8795 8796// SetJobName sets the JobName field's value. 8797func (s *DominantLanguageDetectionJobProperties) SetJobName(v string) *DominantLanguageDetectionJobProperties { 8798 s.JobName = &v 8799 return s 8800} 8801 8802// SetJobStatus sets the JobStatus field's value. 8803func (s *DominantLanguageDetectionJobProperties) SetJobStatus(v string) *DominantLanguageDetectionJobProperties { 8804 s.JobStatus = &v 8805 return s 8806} 8807 8808// SetMessage sets the Message field's value. 8809func (s *DominantLanguageDetectionJobProperties) SetMessage(v string) *DominantLanguageDetectionJobProperties { 8810 s.Message = &v 8811 return s 8812} 8813 8814// SetOutputDataConfig sets the OutputDataConfig field's value. 8815func (s *DominantLanguageDetectionJobProperties) SetOutputDataConfig(v *OutputDataConfig) *DominantLanguageDetectionJobProperties { 8816 s.OutputDataConfig = v 8817 return s 8818} 8819 8820// SetSubmitTime sets the SubmitTime field's value. 8821func (s *DominantLanguageDetectionJobProperties) SetSubmitTime(v time.Time) *DominantLanguageDetectionJobProperties { 8822 s.SubmitTime = &v 8823 return s 8824} 8825 8826// SetVolumeKmsKeyId sets the VolumeKmsKeyId field's value. 8827func (s *DominantLanguageDetectionJobProperties) SetVolumeKmsKeyId(v string) *DominantLanguageDetectionJobProperties { 8828 s.VolumeKmsKeyId = &v 8829 return s 8830} 8831 8832// SetVpcConfig sets the VpcConfig field's value. 8833func (s *DominantLanguageDetectionJobProperties) SetVpcConfig(v *VpcConfig) *DominantLanguageDetectionJobProperties { 8834 s.VpcConfig = v 8835 return s 8836} 8837 8838// The filter used to determine which endpoints are are returned. You can filter 8839// jobs on their name, model, status, or the date and time that they were created. 8840// You can only set one filter at a time. 8841type EndpointFilter struct { 8842 _ struct{} `type:"structure"` 8843 8844 // Specifies a date after which the returned endpoint or endpoints were created. 8845 CreationTimeAfter *time.Time `type:"timestamp"` 8846 8847 // Specifies a date before which the returned endpoint or endpoints were created. 8848 CreationTimeBefore *time.Time `type:"timestamp"` 8849 8850 // The Amazon Resource Number (ARN) of the model to which the endpoint is attached. 8851 ModelArn *string `type:"string"` 8852 8853 // Specifies the status of the endpoint being returned. Possible values are: 8854 // Creating, Ready, Updating, Deleting, Failed. 8855 Status *string `type:"string" enum:"EndpointStatus"` 8856} 8857 8858// String returns the string representation 8859func (s EndpointFilter) String() string { 8860 return awsutil.Prettify(s) 8861} 8862 8863// GoString returns the string representation 8864func (s EndpointFilter) GoString() string { 8865 return s.String() 8866} 8867 8868// SetCreationTimeAfter sets the CreationTimeAfter field's value. 8869func (s *EndpointFilter) SetCreationTimeAfter(v time.Time) *EndpointFilter { 8870 s.CreationTimeAfter = &v 8871 return s 8872} 8873 8874// SetCreationTimeBefore sets the CreationTimeBefore field's value. 8875func (s *EndpointFilter) SetCreationTimeBefore(v time.Time) *EndpointFilter { 8876 s.CreationTimeBefore = &v 8877 return s 8878} 8879 8880// SetModelArn sets the ModelArn field's value. 8881func (s *EndpointFilter) SetModelArn(v string) *EndpointFilter { 8882 s.ModelArn = &v 8883 return s 8884} 8885 8886// SetStatus sets the Status field's value. 8887func (s *EndpointFilter) SetStatus(v string) *EndpointFilter { 8888 s.Status = &v 8889 return s 8890} 8891 8892// Specifies information about the specified endpoint. 8893type EndpointProperties struct { 8894 _ struct{} `type:"structure"` 8895 8896 // The creation date and time of the endpoint. 8897 CreationTime *time.Time `type:"timestamp"` 8898 8899 // The number of inference units currently used by the model using this endpoint. 8900 CurrentInferenceUnits *int64 `min:"1" type:"integer"` 8901 8902 // The desired number of inference units to be used by the model using this 8903 // endpoint. Each inference unit represents of a throughput of 100 characters 8904 // per second. 8905 DesiredInferenceUnits *int64 `min:"1" type:"integer"` 8906 8907 // The Amazon Resource Number (ARN) of the endpoint. 8908 EndpointArn *string `type:"string"` 8909 8910 // The date and time that the endpoint was last modified. 8911 LastModifiedTime *time.Time `type:"timestamp"` 8912 8913 // Specifies a reason for failure in cases of Failed status. 8914 Message *string `type:"string"` 8915 8916 // The Amazon Resource Number (ARN) of the model to which the endpoint is attached. 8917 ModelArn *string `type:"string"` 8918 8919 // Specifies the status of the endpoint. Because the endpoint updates and creation 8920 // are asynchronous, so customers will need to wait for the endpoint to be Ready 8921 // status before making inference requests. 8922 Status *string `type:"string" enum:"EndpointStatus"` 8923} 8924 8925// String returns the string representation 8926func (s EndpointProperties) String() string { 8927 return awsutil.Prettify(s) 8928} 8929 8930// GoString returns the string representation 8931func (s EndpointProperties) GoString() string { 8932 return s.String() 8933} 8934 8935// SetCreationTime sets the CreationTime field's value. 8936func (s *EndpointProperties) SetCreationTime(v time.Time) *EndpointProperties { 8937 s.CreationTime = &v 8938 return s 8939} 8940 8941// SetCurrentInferenceUnits sets the CurrentInferenceUnits field's value. 8942func (s *EndpointProperties) SetCurrentInferenceUnits(v int64) *EndpointProperties { 8943 s.CurrentInferenceUnits = &v 8944 return s 8945} 8946 8947// SetDesiredInferenceUnits sets the DesiredInferenceUnits field's value. 8948func (s *EndpointProperties) SetDesiredInferenceUnits(v int64) *EndpointProperties { 8949 s.DesiredInferenceUnits = &v 8950 return s 8951} 8952 8953// SetEndpointArn sets the EndpointArn field's value. 8954func (s *EndpointProperties) SetEndpointArn(v string) *EndpointProperties { 8955 s.EndpointArn = &v 8956 return s 8957} 8958 8959// SetLastModifiedTime sets the LastModifiedTime field's value. 8960func (s *EndpointProperties) SetLastModifiedTime(v time.Time) *EndpointProperties { 8961 s.LastModifiedTime = &v 8962 return s 8963} 8964 8965// SetMessage sets the Message field's value. 8966func (s *EndpointProperties) SetMessage(v string) *EndpointProperties { 8967 s.Message = &v 8968 return s 8969} 8970 8971// SetModelArn sets the ModelArn field's value. 8972func (s *EndpointProperties) SetModelArn(v string) *EndpointProperties { 8973 s.ModelArn = &v 8974 return s 8975} 8976 8977// SetStatus sets the Status field's value. 8978func (s *EndpointProperties) SetStatus(v string) *EndpointProperties { 8979 s.Status = &v 8980 return s 8981} 8982 8983// Provides information for filtering a list of dominant language detection 8984// jobs. For more information, see the operation. 8985type EntitiesDetectionJobFilter struct { 8986 _ struct{} `type:"structure"` 8987 8988 // Filters on the name of the job. 8989 JobName *string `min:"1" type:"string"` 8990 8991 // Filters the list of jobs based on job status. Returns only jobs with the 8992 // specified status. 8993 JobStatus *string `type:"string" enum:"JobStatus"` 8994 8995 // Filters the list of jobs based on the time that the job was submitted for 8996 // processing. Returns only jobs submitted after the specified time. Jobs are 8997 // returned in descending order, newest to oldest. 8998 SubmitTimeAfter *time.Time `type:"timestamp"` 8999 9000 // Filters the list of jobs based on the time that the job was submitted for 9001 // processing. Returns only jobs submitted before the specified time. Jobs are 9002 // returned in ascending order, oldest to newest. 9003 SubmitTimeBefore *time.Time `type:"timestamp"` 9004} 9005 9006// String returns the string representation 9007func (s EntitiesDetectionJobFilter) String() string { 9008 return awsutil.Prettify(s) 9009} 9010 9011// GoString returns the string representation 9012func (s EntitiesDetectionJobFilter) GoString() string { 9013 return s.String() 9014} 9015 9016// Validate inspects the fields of the type to determine if they are valid. 9017func (s *EntitiesDetectionJobFilter) Validate() error { 9018 invalidParams := request.ErrInvalidParams{Context: "EntitiesDetectionJobFilter"} 9019 if s.JobName != nil && len(*s.JobName) < 1 { 9020 invalidParams.Add(request.NewErrParamMinLen("JobName", 1)) 9021 } 9022 9023 if invalidParams.Len() > 0 { 9024 return invalidParams 9025 } 9026 return nil 9027} 9028 9029// SetJobName sets the JobName field's value. 9030func (s *EntitiesDetectionJobFilter) SetJobName(v string) *EntitiesDetectionJobFilter { 9031 s.JobName = &v 9032 return s 9033} 9034 9035// SetJobStatus sets the JobStatus field's value. 9036func (s *EntitiesDetectionJobFilter) SetJobStatus(v string) *EntitiesDetectionJobFilter { 9037 s.JobStatus = &v 9038 return s 9039} 9040 9041// SetSubmitTimeAfter sets the SubmitTimeAfter field's value. 9042func (s *EntitiesDetectionJobFilter) SetSubmitTimeAfter(v time.Time) *EntitiesDetectionJobFilter { 9043 s.SubmitTimeAfter = &v 9044 return s 9045} 9046 9047// SetSubmitTimeBefore sets the SubmitTimeBefore field's value. 9048func (s *EntitiesDetectionJobFilter) SetSubmitTimeBefore(v time.Time) *EntitiesDetectionJobFilter { 9049 s.SubmitTimeBefore = &v 9050 return s 9051} 9052 9053// Provides information about an entities detection job. 9054type EntitiesDetectionJobProperties struct { 9055 _ struct{} `type:"structure"` 9056 9057 // The Amazon Resource Name (ARN) that gives Amazon Comprehend read access to 9058 // your input data. 9059 DataAccessRoleArn *string `min:"20" type:"string"` 9060 9061 // The time that the entities detection job completed 9062 EndTime *time.Time `type:"timestamp"` 9063 9064 // The Amazon Resource Name (ARN) that identifies the entity recognizer. 9065 EntityRecognizerArn *string `type:"string"` 9066 9067 // The input data configuration that you supplied when you created the entities 9068 // detection job. 9069 InputDataConfig *InputDataConfig `type:"structure"` 9070 9071 // The identifier assigned to the entities detection job. 9072 JobId *string `min:"1" type:"string"` 9073 9074 // The name that you assigned the entities detection job. 9075 JobName *string `min:"1" type:"string"` 9076 9077 // The current status of the entities detection job. If the status is FAILED, 9078 // the Message field shows the reason for the failure. 9079 JobStatus *string `type:"string" enum:"JobStatus"` 9080 9081 // The language code of the input documents. 9082 LanguageCode *string `type:"string" enum:"LanguageCode"` 9083 9084 // A description of the status of a job. 9085 Message *string `type:"string"` 9086 9087 // The output data configuration that you supplied when you created the entities 9088 // detection job. 9089 OutputDataConfig *OutputDataConfig `type:"structure"` 9090 9091 // The time that the entities detection job was submitted for processing. 9092 SubmitTime *time.Time `type:"timestamp"` 9093 9094 // ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses 9095 // to encrypt data on the storage volume attached to the ML compute instance(s) 9096 // that process the analysis job. The VolumeKmsKeyId can be either of the following 9097 // formats: 9098 // 9099 // * KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab" 9100 // 9101 // * Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" 9102 VolumeKmsKeyId *string `type:"string"` 9103 9104 // Configuration parameters for a private Virtual Private Cloud (VPC) containing 9105 // the resources you are using for your entity detection job. For more information, 9106 // see Amazon VPC (https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html). 9107 VpcConfig *VpcConfig `type:"structure"` 9108} 9109 9110// String returns the string representation 9111func (s EntitiesDetectionJobProperties) String() string { 9112 return awsutil.Prettify(s) 9113} 9114 9115// GoString returns the string representation 9116func (s EntitiesDetectionJobProperties) GoString() string { 9117 return s.String() 9118} 9119 9120// SetDataAccessRoleArn sets the DataAccessRoleArn field's value. 9121func (s *EntitiesDetectionJobProperties) SetDataAccessRoleArn(v string) *EntitiesDetectionJobProperties { 9122 s.DataAccessRoleArn = &v 9123 return s 9124} 9125 9126// SetEndTime sets the EndTime field's value. 9127func (s *EntitiesDetectionJobProperties) SetEndTime(v time.Time) *EntitiesDetectionJobProperties { 9128 s.EndTime = &v 9129 return s 9130} 9131 9132// SetEntityRecognizerArn sets the EntityRecognizerArn field's value. 9133func (s *EntitiesDetectionJobProperties) SetEntityRecognizerArn(v string) *EntitiesDetectionJobProperties { 9134 s.EntityRecognizerArn = &v 9135 return s 9136} 9137 9138// SetInputDataConfig sets the InputDataConfig field's value. 9139func (s *EntitiesDetectionJobProperties) SetInputDataConfig(v *InputDataConfig) *EntitiesDetectionJobProperties { 9140 s.InputDataConfig = v 9141 return s 9142} 9143 9144// SetJobId sets the JobId field's value. 9145func (s *EntitiesDetectionJobProperties) SetJobId(v string) *EntitiesDetectionJobProperties { 9146 s.JobId = &v 9147 return s 9148} 9149 9150// SetJobName sets the JobName field's value. 9151func (s *EntitiesDetectionJobProperties) SetJobName(v string) *EntitiesDetectionJobProperties { 9152 s.JobName = &v 9153 return s 9154} 9155 9156// SetJobStatus sets the JobStatus field's value. 9157func (s *EntitiesDetectionJobProperties) SetJobStatus(v string) *EntitiesDetectionJobProperties { 9158 s.JobStatus = &v 9159 return s 9160} 9161 9162// SetLanguageCode sets the LanguageCode field's value. 9163func (s *EntitiesDetectionJobProperties) SetLanguageCode(v string) *EntitiesDetectionJobProperties { 9164 s.LanguageCode = &v 9165 return s 9166} 9167 9168// SetMessage sets the Message field's value. 9169func (s *EntitiesDetectionJobProperties) SetMessage(v string) *EntitiesDetectionJobProperties { 9170 s.Message = &v 9171 return s 9172} 9173 9174// SetOutputDataConfig sets the OutputDataConfig field's value. 9175func (s *EntitiesDetectionJobProperties) SetOutputDataConfig(v *OutputDataConfig) *EntitiesDetectionJobProperties { 9176 s.OutputDataConfig = v 9177 return s 9178} 9179 9180// SetSubmitTime sets the SubmitTime field's value. 9181func (s *EntitiesDetectionJobProperties) SetSubmitTime(v time.Time) *EntitiesDetectionJobProperties { 9182 s.SubmitTime = &v 9183 return s 9184} 9185 9186// SetVolumeKmsKeyId sets the VolumeKmsKeyId field's value. 9187func (s *EntitiesDetectionJobProperties) SetVolumeKmsKeyId(v string) *EntitiesDetectionJobProperties { 9188 s.VolumeKmsKeyId = &v 9189 return s 9190} 9191 9192// SetVpcConfig sets the VpcConfig field's value. 9193func (s *EntitiesDetectionJobProperties) SetVpcConfig(v *VpcConfig) *EntitiesDetectionJobProperties { 9194 s.VpcConfig = v 9195 return s 9196} 9197 9198// Provides information about an entity. 9199type Entity struct { 9200 _ struct{} `type:"structure"` 9201 9202 // A character offset in the input text that shows where the entity begins (the 9203 // first character is at position 0). The offset returns the position of each 9204 // UTF-8 code point in the string. A code point is the abstract character from 9205 // a particular graphical representation. For example, a multi-byte UTF-8 character 9206 // maps to a single code point. 9207 BeginOffset *int64 `type:"integer"` 9208 9209 // A character offset in the input text that shows where the entity ends. The 9210 // offset returns the position of each UTF-8 code point in the string. A code 9211 // point is the abstract character from a particular graphical representation. 9212 // For example, a multi-byte UTF-8 character maps to a single code point. 9213 EndOffset *int64 `type:"integer"` 9214 9215 // The level of confidence that Amazon Comprehend has in the accuracy of the 9216 // detection. 9217 Score *float64 `type:"float"` 9218 9219 // The text of the entity. 9220 Text *string `min:"1" type:"string"` 9221 9222 // The entity's type. 9223 Type *string `type:"string" enum:"EntityType"` 9224} 9225 9226// String returns the string representation 9227func (s Entity) String() string { 9228 return awsutil.Prettify(s) 9229} 9230 9231// GoString returns the string representation 9232func (s Entity) GoString() string { 9233 return s.String() 9234} 9235 9236// SetBeginOffset sets the BeginOffset field's value. 9237func (s *Entity) SetBeginOffset(v int64) *Entity { 9238 s.BeginOffset = &v 9239 return s 9240} 9241 9242// SetEndOffset sets the EndOffset field's value. 9243func (s *Entity) SetEndOffset(v int64) *Entity { 9244 s.EndOffset = &v 9245 return s 9246} 9247 9248// SetScore sets the Score field's value. 9249func (s *Entity) SetScore(v float64) *Entity { 9250 s.Score = &v 9251 return s 9252} 9253 9254// SetText sets the Text field's value. 9255func (s *Entity) SetText(v string) *Entity { 9256 s.Text = &v 9257 return s 9258} 9259 9260// SetType sets the Type field's value. 9261func (s *Entity) SetType(v string) *Entity { 9262 s.Type = &v 9263 return s 9264} 9265 9266// Describes the annotations associated with a entity recognizer. 9267type EntityRecognizerAnnotations struct { 9268 _ struct{} `type:"structure"` 9269 9270 // Specifies the Amazon S3 location where the annotations for an entity recognizer 9271 // are located. The URI must be in the same region as the API endpoint that 9272 // you are calling. 9273 // 9274 // S3Uri is a required field 9275 S3Uri *string `type:"string" required:"true"` 9276} 9277 9278// String returns the string representation 9279func (s EntityRecognizerAnnotations) String() string { 9280 return awsutil.Prettify(s) 9281} 9282 9283// GoString returns the string representation 9284func (s EntityRecognizerAnnotations) GoString() string { 9285 return s.String() 9286} 9287 9288// Validate inspects the fields of the type to determine if they are valid. 9289func (s *EntityRecognizerAnnotations) Validate() error { 9290 invalidParams := request.ErrInvalidParams{Context: "EntityRecognizerAnnotations"} 9291 if s.S3Uri == nil { 9292 invalidParams.Add(request.NewErrParamRequired("S3Uri")) 9293 } 9294 9295 if invalidParams.Len() > 0 { 9296 return invalidParams 9297 } 9298 return nil 9299} 9300 9301// SetS3Uri sets the S3Uri field's value. 9302func (s *EntityRecognizerAnnotations) SetS3Uri(v string) *EntityRecognizerAnnotations { 9303 s.S3Uri = &v 9304 return s 9305} 9306 9307// Describes the training documents submitted with an entity recognizer. 9308type EntityRecognizerDocuments struct { 9309 _ struct{} `type:"structure"` 9310 9311 // Specifies the Amazon S3 location where the training documents for an entity 9312 // recognizer are located. The URI must be in the same region as the API endpoint 9313 // that you are calling. 9314 // 9315 // S3Uri is a required field 9316 S3Uri *string `type:"string" required:"true"` 9317} 9318 9319// String returns the string representation 9320func (s EntityRecognizerDocuments) String() string { 9321 return awsutil.Prettify(s) 9322} 9323 9324// GoString returns the string representation 9325func (s EntityRecognizerDocuments) GoString() string { 9326 return s.String() 9327} 9328 9329// Validate inspects the fields of the type to determine if they are valid. 9330func (s *EntityRecognizerDocuments) Validate() error { 9331 invalidParams := request.ErrInvalidParams{Context: "EntityRecognizerDocuments"} 9332 if s.S3Uri == nil { 9333 invalidParams.Add(request.NewErrParamRequired("S3Uri")) 9334 } 9335 9336 if invalidParams.Len() > 0 { 9337 return invalidParams 9338 } 9339 return nil 9340} 9341 9342// SetS3Uri sets the S3Uri field's value. 9343func (s *EntityRecognizerDocuments) SetS3Uri(v string) *EntityRecognizerDocuments { 9344 s.S3Uri = &v 9345 return s 9346} 9347 9348// Describes the entity recognizer submitted with an entity recognizer. 9349type EntityRecognizerEntityList struct { 9350 _ struct{} `type:"structure"` 9351 9352 // Specifies the Amazon S3 location where the entity list is located. The URI 9353 // must be in the same region as the API endpoint that you are calling. 9354 // 9355 // S3Uri is a required field 9356 S3Uri *string `type:"string" required:"true"` 9357} 9358 9359// String returns the string representation 9360func (s EntityRecognizerEntityList) String() string { 9361 return awsutil.Prettify(s) 9362} 9363 9364// GoString returns the string representation 9365func (s EntityRecognizerEntityList) GoString() string { 9366 return s.String() 9367} 9368 9369// Validate inspects the fields of the type to determine if they are valid. 9370func (s *EntityRecognizerEntityList) Validate() error { 9371 invalidParams := request.ErrInvalidParams{Context: "EntityRecognizerEntityList"} 9372 if s.S3Uri == nil { 9373 invalidParams.Add(request.NewErrParamRequired("S3Uri")) 9374 } 9375 9376 if invalidParams.Len() > 0 { 9377 return invalidParams 9378 } 9379 return nil 9380} 9381 9382// SetS3Uri sets the S3Uri field's value. 9383func (s *EntityRecognizerEntityList) SetS3Uri(v string) *EntityRecognizerEntityList { 9384 s.S3Uri = &v 9385 return s 9386} 9387 9388// Detailed information about the accuracy of an entity recognizer. 9389type EntityRecognizerEvaluationMetrics struct { 9390 _ struct{} `type:"structure"` 9391 9392 // A measure of how accurate the recognizer results are for the test data. It 9393 // is derived from the Precision and Recall values. The F1Score is the harmonic 9394 // average of the two scores. The highest score is 1, and the worst score is 9395 // 0. 9396 F1Score *float64 `type:"double"` 9397 9398 // A measure of the usefulness of the recognizer results in the test data. High 9399 // precision means that the recognizer returned substantially more relevant 9400 // results than irrelevant ones. 9401 Precision *float64 `type:"double"` 9402 9403 // A measure of how complete the recognizer results are for the test data. High 9404 // recall means that the recognizer returned most of the relevant results. 9405 Recall *float64 `type:"double"` 9406} 9407 9408// String returns the string representation 9409func (s EntityRecognizerEvaluationMetrics) String() string { 9410 return awsutil.Prettify(s) 9411} 9412 9413// GoString returns the string representation 9414func (s EntityRecognizerEvaluationMetrics) GoString() string { 9415 return s.String() 9416} 9417 9418// SetF1Score sets the F1Score field's value. 9419func (s *EntityRecognizerEvaluationMetrics) SetF1Score(v float64) *EntityRecognizerEvaluationMetrics { 9420 s.F1Score = &v 9421 return s 9422} 9423 9424// SetPrecision sets the Precision field's value. 9425func (s *EntityRecognizerEvaluationMetrics) SetPrecision(v float64) *EntityRecognizerEvaluationMetrics { 9426 s.Precision = &v 9427 return s 9428} 9429 9430// SetRecall sets the Recall field's value. 9431func (s *EntityRecognizerEvaluationMetrics) SetRecall(v float64) *EntityRecognizerEvaluationMetrics { 9432 s.Recall = &v 9433 return s 9434} 9435 9436// Provides information for filtering a list of entity recognizers. You can 9437// only specify one filtering parameter in a request. For more information, 9438// see the operation./> 9439type EntityRecognizerFilter struct { 9440 _ struct{} `type:"structure"` 9441 9442 // The status of an entity recognizer. 9443 Status *string `type:"string" enum:"ModelStatus"` 9444 9445 // Filters the list of entities based on the time that the list was submitted 9446 // for processing. Returns only jobs submitted after the specified time. Jobs 9447 // are returned in ascending order, oldest to newest. 9448 SubmitTimeAfter *time.Time `type:"timestamp"` 9449 9450 // Filters the list of entities based on the time that the list was submitted 9451 // for processing. Returns only jobs submitted before the specified time. Jobs 9452 // are returned in descending order, newest to oldest. 9453 SubmitTimeBefore *time.Time `type:"timestamp"` 9454} 9455 9456// String returns the string representation 9457func (s EntityRecognizerFilter) String() string { 9458 return awsutil.Prettify(s) 9459} 9460 9461// GoString returns the string representation 9462func (s EntityRecognizerFilter) GoString() string { 9463 return s.String() 9464} 9465 9466// SetStatus sets the Status field's value. 9467func (s *EntityRecognizerFilter) SetStatus(v string) *EntityRecognizerFilter { 9468 s.Status = &v 9469 return s 9470} 9471 9472// SetSubmitTimeAfter sets the SubmitTimeAfter field's value. 9473func (s *EntityRecognizerFilter) SetSubmitTimeAfter(v time.Time) *EntityRecognizerFilter { 9474 s.SubmitTimeAfter = &v 9475 return s 9476} 9477 9478// SetSubmitTimeBefore sets the SubmitTimeBefore field's value. 9479func (s *EntityRecognizerFilter) SetSubmitTimeBefore(v time.Time) *EntityRecognizerFilter { 9480 s.SubmitTimeBefore = &v 9481 return s 9482} 9483 9484// Specifies the format and location of the input data. 9485type EntityRecognizerInputDataConfig struct { 9486 _ struct{} `type:"structure"` 9487 9488 // S3 location of the annotations file for an entity recognizer. 9489 Annotations *EntityRecognizerAnnotations `type:"structure"` 9490 9491 // S3 location of the documents folder for an entity recognizer 9492 // 9493 // Documents is a required field 9494 Documents *EntityRecognizerDocuments `type:"structure" required:"true"` 9495 9496 // S3 location of the entity list for an entity recognizer. 9497 EntityList *EntityRecognizerEntityList `type:"structure"` 9498 9499 // The entity types in the input data for an entity recognizer. A maximum of 9500 // 12 entity types can be used at one time to train an entity recognizer. 9501 // 9502 // EntityTypes is a required field 9503 EntityTypes []*EntityTypesListItem `type:"list" required:"true"` 9504} 9505 9506// String returns the string representation 9507func (s EntityRecognizerInputDataConfig) String() string { 9508 return awsutil.Prettify(s) 9509} 9510 9511// GoString returns the string representation 9512func (s EntityRecognizerInputDataConfig) GoString() string { 9513 return s.String() 9514} 9515 9516// Validate inspects the fields of the type to determine if they are valid. 9517func (s *EntityRecognizerInputDataConfig) Validate() error { 9518 invalidParams := request.ErrInvalidParams{Context: "EntityRecognizerInputDataConfig"} 9519 if s.Documents == nil { 9520 invalidParams.Add(request.NewErrParamRequired("Documents")) 9521 } 9522 if s.EntityTypes == nil { 9523 invalidParams.Add(request.NewErrParamRequired("EntityTypes")) 9524 } 9525 if s.Annotations != nil { 9526 if err := s.Annotations.Validate(); err != nil { 9527 invalidParams.AddNested("Annotations", err.(request.ErrInvalidParams)) 9528 } 9529 } 9530 if s.Documents != nil { 9531 if err := s.Documents.Validate(); err != nil { 9532 invalidParams.AddNested("Documents", err.(request.ErrInvalidParams)) 9533 } 9534 } 9535 if s.EntityList != nil { 9536 if err := s.EntityList.Validate(); err != nil { 9537 invalidParams.AddNested("EntityList", err.(request.ErrInvalidParams)) 9538 } 9539 } 9540 if s.EntityTypes != nil { 9541 for i, v := range s.EntityTypes { 9542 if v == nil { 9543 continue 9544 } 9545 if err := v.Validate(); err != nil { 9546 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "EntityTypes", i), err.(request.ErrInvalidParams)) 9547 } 9548 } 9549 } 9550 9551 if invalidParams.Len() > 0 { 9552 return invalidParams 9553 } 9554 return nil 9555} 9556 9557// SetAnnotations sets the Annotations field's value. 9558func (s *EntityRecognizerInputDataConfig) SetAnnotations(v *EntityRecognizerAnnotations) *EntityRecognizerInputDataConfig { 9559 s.Annotations = v 9560 return s 9561} 9562 9563// SetDocuments sets the Documents field's value. 9564func (s *EntityRecognizerInputDataConfig) SetDocuments(v *EntityRecognizerDocuments) *EntityRecognizerInputDataConfig { 9565 s.Documents = v 9566 return s 9567} 9568 9569// SetEntityList sets the EntityList field's value. 9570func (s *EntityRecognizerInputDataConfig) SetEntityList(v *EntityRecognizerEntityList) *EntityRecognizerInputDataConfig { 9571 s.EntityList = v 9572 return s 9573} 9574 9575// SetEntityTypes sets the EntityTypes field's value. 9576func (s *EntityRecognizerInputDataConfig) SetEntityTypes(v []*EntityTypesListItem) *EntityRecognizerInputDataConfig { 9577 s.EntityTypes = v 9578 return s 9579} 9580 9581// Detailed information about an entity recognizer. 9582type EntityRecognizerMetadata struct { 9583 _ struct{} `type:"structure"` 9584 9585 // Entity types from the metadata of an entity recognizer. 9586 EntityTypes []*EntityRecognizerMetadataEntityTypesListItem `type:"list"` 9587 9588 // Detailed information about the accuracy of an entity recognizer. 9589 EvaluationMetrics *EntityRecognizerEvaluationMetrics `type:"structure"` 9590 9591 // The number of documents in the input data that were used to test the entity 9592 // recognizer. Typically this is 10 to 20 percent of the input documents. 9593 NumberOfTestDocuments *int64 `type:"integer"` 9594 9595 // The number of documents in the input data that were used to train the entity 9596 // recognizer. Typically this is 80 to 90 percent of the input documents. 9597 NumberOfTrainedDocuments *int64 `type:"integer"` 9598} 9599 9600// String returns the string representation 9601func (s EntityRecognizerMetadata) String() string { 9602 return awsutil.Prettify(s) 9603} 9604 9605// GoString returns the string representation 9606func (s EntityRecognizerMetadata) GoString() string { 9607 return s.String() 9608} 9609 9610// SetEntityTypes sets the EntityTypes field's value. 9611func (s *EntityRecognizerMetadata) SetEntityTypes(v []*EntityRecognizerMetadataEntityTypesListItem) *EntityRecognizerMetadata { 9612 s.EntityTypes = v 9613 return s 9614} 9615 9616// SetEvaluationMetrics sets the EvaluationMetrics field's value. 9617func (s *EntityRecognizerMetadata) SetEvaluationMetrics(v *EntityRecognizerEvaluationMetrics) *EntityRecognizerMetadata { 9618 s.EvaluationMetrics = v 9619 return s 9620} 9621 9622// SetNumberOfTestDocuments sets the NumberOfTestDocuments field's value. 9623func (s *EntityRecognizerMetadata) SetNumberOfTestDocuments(v int64) *EntityRecognizerMetadata { 9624 s.NumberOfTestDocuments = &v 9625 return s 9626} 9627 9628// SetNumberOfTrainedDocuments sets the NumberOfTrainedDocuments field's value. 9629func (s *EntityRecognizerMetadata) SetNumberOfTrainedDocuments(v int64) *EntityRecognizerMetadata { 9630 s.NumberOfTrainedDocuments = &v 9631 return s 9632} 9633 9634// Individual item from the list of entity types in the metadata of an entity 9635// recognizer. 9636type EntityRecognizerMetadataEntityTypesListItem struct { 9637 _ struct{} `type:"structure"` 9638 9639 // Detailed information about the accuracy of the entity recognizer for a specific 9640 // item on the list of entity types. 9641 EvaluationMetrics *EntityTypesEvaluationMetrics `type:"structure"` 9642 9643 // Indicates the number of times the given entity type was seen in the training 9644 // data. 9645 NumberOfTrainMentions *int64 `type:"integer"` 9646 9647 // Type of entity from the list of entity types in the metadata of an entity 9648 // recognizer. 9649 Type *string `type:"string"` 9650} 9651 9652// String returns the string representation 9653func (s EntityRecognizerMetadataEntityTypesListItem) String() string { 9654 return awsutil.Prettify(s) 9655} 9656 9657// GoString returns the string representation 9658func (s EntityRecognizerMetadataEntityTypesListItem) GoString() string { 9659 return s.String() 9660} 9661 9662// SetEvaluationMetrics sets the EvaluationMetrics field's value. 9663func (s *EntityRecognizerMetadataEntityTypesListItem) SetEvaluationMetrics(v *EntityTypesEvaluationMetrics) *EntityRecognizerMetadataEntityTypesListItem { 9664 s.EvaluationMetrics = v 9665 return s 9666} 9667 9668// SetNumberOfTrainMentions sets the NumberOfTrainMentions field's value. 9669func (s *EntityRecognizerMetadataEntityTypesListItem) SetNumberOfTrainMentions(v int64) *EntityRecognizerMetadataEntityTypesListItem { 9670 s.NumberOfTrainMentions = &v 9671 return s 9672} 9673 9674// SetType sets the Type field's value. 9675func (s *EntityRecognizerMetadataEntityTypesListItem) SetType(v string) *EntityRecognizerMetadataEntityTypesListItem { 9676 s.Type = &v 9677 return s 9678} 9679 9680// Describes information about an entity recognizer. 9681type EntityRecognizerProperties struct { 9682 _ struct{} `type:"structure"` 9683 9684 // The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM) role 9685 // that grants Amazon Comprehend read access to your input data. 9686 DataAccessRoleArn *string `min:"20" type:"string"` 9687 9688 // The time that the recognizer creation completed. 9689 EndTime *time.Time `type:"timestamp"` 9690 9691 // The Amazon Resource Name (ARN) that identifies the entity recognizer. 9692 EntityRecognizerArn *string `type:"string"` 9693 9694 // The input data properties of an entity recognizer. 9695 InputDataConfig *EntityRecognizerInputDataConfig `type:"structure"` 9696 9697 // The language of the input documents. All documents must be in the same language. 9698 // Only English ("en") is currently supported. 9699 LanguageCode *string `type:"string" enum:"LanguageCode"` 9700 9701 // A description of the status of the recognizer. 9702 Message *string `type:"string"` 9703 9704 // Provides information about an entity recognizer. 9705 RecognizerMetadata *EntityRecognizerMetadata `type:"structure"` 9706 9707 // Provides the status of the entity recognizer. 9708 Status *string `type:"string" enum:"ModelStatus"` 9709 9710 // The time that the recognizer was submitted for processing. 9711 SubmitTime *time.Time `type:"timestamp"` 9712 9713 // The time that training of the entity recognizer was completed. 9714 TrainingEndTime *time.Time `type:"timestamp"` 9715 9716 // The time that training of the entity recognizer started. 9717 TrainingStartTime *time.Time `type:"timestamp"` 9718 9719 // ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses 9720 // to encrypt data on the storage volume attached to the ML compute instance(s) 9721 // that process the analysis job. The VolumeKmsKeyId can be either of the following 9722 // formats: 9723 // 9724 // * KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab" 9725 // 9726 // * Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" 9727 VolumeKmsKeyId *string `type:"string"` 9728 9729 // Configuration parameters for a private Virtual Private Cloud (VPC) containing 9730 // the resources you are using for your custom entity recognizer. For more information, 9731 // see Amazon VPC (https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html). 9732 VpcConfig *VpcConfig `type:"structure"` 9733} 9734 9735// String returns the string representation 9736func (s EntityRecognizerProperties) String() string { 9737 return awsutil.Prettify(s) 9738} 9739 9740// GoString returns the string representation 9741func (s EntityRecognizerProperties) GoString() string { 9742 return s.String() 9743} 9744 9745// SetDataAccessRoleArn sets the DataAccessRoleArn field's value. 9746func (s *EntityRecognizerProperties) SetDataAccessRoleArn(v string) *EntityRecognizerProperties { 9747 s.DataAccessRoleArn = &v 9748 return s 9749} 9750 9751// SetEndTime sets the EndTime field's value. 9752func (s *EntityRecognizerProperties) SetEndTime(v time.Time) *EntityRecognizerProperties { 9753 s.EndTime = &v 9754 return s 9755} 9756 9757// SetEntityRecognizerArn sets the EntityRecognizerArn field's value. 9758func (s *EntityRecognizerProperties) SetEntityRecognizerArn(v string) *EntityRecognizerProperties { 9759 s.EntityRecognizerArn = &v 9760 return s 9761} 9762 9763// SetInputDataConfig sets the InputDataConfig field's value. 9764func (s *EntityRecognizerProperties) SetInputDataConfig(v *EntityRecognizerInputDataConfig) *EntityRecognizerProperties { 9765 s.InputDataConfig = v 9766 return s 9767} 9768 9769// SetLanguageCode sets the LanguageCode field's value. 9770func (s *EntityRecognizerProperties) SetLanguageCode(v string) *EntityRecognizerProperties { 9771 s.LanguageCode = &v 9772 return s 9773} 9774 9775// SetMessage sets the Message field's value. 9776func (s *EntityRecognizerProperties) SetMessage(v string) *EntityRecognizerProperties { 9777 s.Message = &v 9778 return s 9779} 9780 9781// SetRecognizerMetadata sets the RecognizerMetadata field's value. 9782func (s *EntityRecognizerProperties) SetRecognizerMetadata(v *EntityRecognizerMetadata) *EntityRecognizerProperties { 9783 s.RecognizerMetadata = v 9784 return s 9785} 9786 9787// SetStatus sets the Status field's value. 9788func (s *EntityRecognizerProperties) SetStatus(v string) *EntityRecognizerProperties { 9789 s.Status = &v 9790 return s 9791} 9792 9793// SetSubmitTime sets the SubmitTime field's value. 9794func (s *EntityRecognizerProperties) SetSubmitTime(v time.Time) *EntityRecognizerProperties { 9795 s.SubmitTime = &v 9796 return s 9797} 9798 9799// SetTrainingEndTime sets the TrainingEndTime field's value. 9800func (s *EntityRecognizerProperties) SetTrainingEndTime(v time.Time) *EntityRecognizerProperties { 9801 s.TrainingEndTime = &v 9802 return s 9803} 9804 9805// SetTrainingStartTime sets the TrainingStartTime field's value. 9806func (s *EntityRecognizerProperties) SetTrainingStartTime(v time.Time) *EntityRecognizerProperties { 9807 s.TrainingStartTime = &v 9808 return s 9809} 9810 9811// SetVolumeKmsKeyId sets the VolumeKmsKeyId field's value. 9812func (s *EntityRecognizerProperties) SetVolumeKmsKeyId(v string) *EntityRecognizerProperties { 9813 s.VolumeKmsKeyId = &v 9814 return s 9815} 9816 9817// SetVpcConfig sets the VpcConfig field's value. 9818func (s *EntityRecognizerProperties) SetVpcConfig(v *VpcConfig) *EntityRecognizerProperties { 9819 s.VpcConfig = v 9820 return s 9821} 9822 9823// Detailed information about the accuracy of an entity recognizer for a specific 9824// entity type. 9825type EntityTypesEvaluationMetrics struct { 9826 _ struct{} `type:"structure"` 9827 9828 // A measure of how accurate the recognizer results are for for a specific entity 9829 // type in the test data. It is derived from the Precision and Recall values. 9830 // The F1Score is the harmonic average of the two scores. The highest score 9831 // is 1, and the worst score is 0. 9832 F1Score *float64 `type:"double"` 9833 9834 // A measure of the usefulness of the recognizer results for a specific entity 9835 // type in the test data. High precision means that the recognizer returned 9836 // substantially more relevant results than irrelevant ones. 9837 Precision *float64 `type:"double"` 9838 9839 // A measure of how complete the recognizer results are for a specific entity 9840 // type in the test data. High recall means that the recognizer returned most 9841 // of the relevant results. 9842 Recall *float64 `type:"double"` 9843} 9844 9845// String returns the string representation 9846func (s EntityTypesEvaluationMetrics) String() string { 9847 return awsutil.Prettify(s) 9848} 9849 9850// GoString returns the string representation 9851func (s EntityTypesEvaluationMetrics) GoString() string { 9852 return s.String() 9853} 9854 9855// SetF1Score sets the F1Score field's value. 9856func (s *EntityTypesEvaluationMetrics) SetF1Score(v float64) *EntityTypesEvaluationMetrics { 9857 s.F1Score = &v 9858 return s 9859} 9860 9861// SetPrecision sets the Precision field's value. 9862func (s *EntityTypesEvaluationMetrics) SetPrecision(v float64) *EntityTypesEvaluationMetrics { 9863 s.Precision = &v 9864 return s 9865} 9866 9867// SetRecall sets the Recall field's value. 9868func (s *EntityTypesEvaluationMetrics) SetRecall(v float64) *EntityTypesEvaluationMetrics { 9869 s.Recall = &v 9870 return s 9871} 9872 9873// Information about an individual item on a list of entity types. 9874type EntityTypesListItem struct { 9875 _ struct{} `type:"structure"` 9876 9877 // Entity type of an item on an entity type list. 9878 // 9879 // Type is a required field 9880 Type *string `type:"string" required:"true"` 9881} 9882 9883// String returns the string representation 9884func (s EntityTypesListItem) String() string { 9885 return awsutil.Prettify(s) 9886} 9887 9888// GoString returns the string representation 9889func (s EntityTypesListItem) GoString() string { 9890 return s.String() 9891} 9892 9893// Validate inspects the fields of the type to determine if they are valid. 9894func (s *EntityTypesListItem) Validate() error { 9895 invalidParams := request.ErrInvalidParams{Context: "EntityTypesListItem"} 9896 if s.Type == nil { 9897 invalidParams.Add(request.NewErrParamRequired("Type")) 9898 } 9899 9900 if invalidParams.Len() > 0 { 9901 return invalidParams 9902 } 9903 return nil 9904} 9905 9906// SetType sets the Type field's value. 9907func (s *EntityTypesListItem) SetType(v string) *EntityTypesListItem { 9908 s.Type = &v 9909 return s 9910} 9911 9912// The input properties for a topic detection job. 9913type InputDataConfig struct { 9914 _ struct{} `type:"structure"` 9915 9916 // Specifies how the text in an input file should be processed: 9917 // 9918 // * ONE_DOC_PER_FILE - Each file is considered a separate document. Use 9919 // this option when you are processing large documents, such as newspaper 9920 // articles or scientific papers. 9921 // 9922 // * ONE_DOC_PER_LINE - Each line in a file is considered a separate document. 9923 // Use this option when you are processing many short documents, such as 9924 // text messages. 9925 InputFormat *string `type:"string" enum:"InputFormat"` 9926 9927 // The Amazon S3 URI for the input data. The URI must be in same region as the 9928 // API endpoint that you are calling. The URI can point to a single input file 9929 // or it can provide the prefix for a collection of data files. 9930 // 9931 // For example, if you use the URI S3://bucketName/prefix, if the prefix is 9932 // a single file, Amazon Comprehend uses that file as input. If more than one 9933 // file begins with the prefix, Amazon Comprehend uses all of them as input. 9934 // 9935 // S3Uri is a required field 9936 S3Uri *string `type:"string" required:"true"` 9937} 9938 9939// String returns the string representation 9940func (s InputDataConfig) String() string { 9941 return awsutil.Prettify(s) 9942} 9943 9944// GoString returns the string representation 9945func (s InputDataConfig) GoString() string { 9946 return s.String() 9947} 9948 9949// Validate inspects the fields of the type to determine if they are valid. 9950func (s *InputDataConfig) Validate() error { 9951 invalidParams := request.ErrInvalidParams{Context: "InputDataConfig"} 9952 if s.S3Uri == nil { 9953 invalidParams.Add(request.NewErrParamRequired("S3Uri")) 9954 } 9955 9956 if invalidParams.Len() > 0 { 9957 return invalidParams 9958 } 9959 return nil 9960} 9961 9962// SetInputFormat sets the InputFormat field's value. 9963func (s *InputDataConfig) SetInputFormat(v string) *InputDataConfig { 9964 s.InputFormat = &v 9965 return s 9966} 9967 9968// SetS3Uri sets the S3Uri field's value. 9969func (s *InputDataConfig) SetS3Uri(v string) *InputDataConfig { 9970 s.S3Uri = &v 9971 return s 9972} 9973 9974// An internal server error occurred. Retry your request. 9975type InternalServerException struct { 9976 _ struct{} `type:"structure"` 9977 respMetadata protocol.ResponseMetadata 9978 9979 Message_ *string `locationName:"Message" min:"1" type:"string"` 9980} 9981 9982// String returns the string representation 9983func (s InternalServerException) String() string { 9984 return awsutil.Prettify(s) 9985} 9986 9987// GoString returns the string representation 9988func (s InternalServerException) GoString() string { 9989 return s.String() 9990} 9991 9992func newErrorInternalServerException(v protocol.ResponseMetadata) error { 9993 return &InternalServerException{ 9994 respMetadata: v, 9995 } 9996} 9997 9998// Code returns the exception type name. 9999func (s InternalServerException) Code() string { 10000 return "InternalServerException" 10001} 10002 10003// Message returns the exception's message. 10004func (s InternalServerException) Message() string { 10005 if s.Message_ != nil { 10006 return *s.Message_ 10007 } 10008 return "" 10009} 10010 10011// OrigErr always returns nil, satisfies awserr.Error interface. 10012func (s InternalServerException) OrigErr() error { 10013 return nil 10014} 10015 10016func (s InternalServerException) Error() string { 10017 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 10018} 10019 10020// Status code returns the HTTP status code for the request's response error. 10021func (s InternalServerException) StatusCode() int { 10022 return s.respMetadata.StatusCode 10023} 10024 10025// RequestID returns the service's response RequestID for request. 10026func (s InternalServerException) RequestID() string { 10027 return s.respMetadata.RequestID 10028} 10029 10030// The filter specified for the operation is invalid. Specify a different filter. 10031type InvalidFilterException struct { 10032 _ struct{} `type:"structure"` 10033 respMetadata protocol.ResponseMetadata 10034 10035 Message_ *string `locationName:"Message" min:"1" type:"string"` 10036} 10037 10038// String returns the string representation 10039func (s InvalidFilterException) String() string { 10040 return awsutil.Prettify(s) 10041} 10042 10043// GoString returns the string representation 10044func (s InvalidFilterException) GoString() string { 10045 return s.String() 10046} 10047 10048func newErrorInvalidFilterException(v protocol.ResponseMetadata) error { 10049 return &InvalidFilterException{ 10050 respMetadata: v, 10051 } 10052} 10053 10054// Code returns the exception type name. 10055func (s InvalidFilterException) Code() string { 10056 return "InvalidFilterException" 10057} 10058 10059// Message returns the exception's message. 10060func (s InvalidFilterException) Message() string { 10061 if s.Message_ != nil { 10062 return *s.Message_ 10063 } 10064 return "" 10065} 10066 10067// OrigErr always returns nil, satisfies awserr.Error interface. 10068func (s InvalidFilterException) OrigErr() error { 10069 return nil 10070} 10071 10072func (s InvalidFilterException) Error() string { 10073 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 10074} 10075 10076// Status code returns the HTTP status code for the request's response error. 10077func (s InvalidFilterException) StatusCode() int { 10078 return s.respMetadata.StatusCode 10079} 10080 10081// RequestID returns the service's response RequestID for request. 10082func (s InvalidFilterException) RequestID() string { 10083 return s.respMetadata.RequestID 10084} 10085 10086// The request is invalid. 10087type InvalidRequestException struct { 10088 _ struct{} `type:"structure"` 10089 respMetadata protocol.ResponseMetadata 10090 10091 Message_ *string `locationName:"Message" min:"1" type:"string"` 10092} 10093 10094// String returns the string representation 10095func (s InvalidRequestException) String() string { 10096 return awsutil.Prettify(s) 10097} 10098 10099// GoString returns the string representation 10100func (s InvalidRequestException) GoString() string { 10101 return s.String() 10102} 10103 10104func newErrorInvalidRequestException(v protocol.ResponseMetadata) error { 10105 return &InvalidRequestException{ 10106 respMetadata: v, 10107 } 10108} 10109 10110// Code returns the exception type name. 10111func (s InvalidRequestException) Code() string { 10112 return "InvalidRequestException" 10113} 10114 10115// Message returns the exception's message. 10116func (s InvalidRequestException) Message() string { 10117 if s.Message_ != nil { 10118 return *s.Message_ 10119 } 10120 return "" 10121} 10122 10123// OrigErr always returns nil, satisfies awserr.Error interface. 10124func (s InvalidRequestException) OrigErr() error { 10125 return nil 10126} 10127 10128func (s InvalidRequestException) Error() string { 10129 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 10130} 10131 10132// Status code returns the HTTP status code for the request's response error. 10133func (s InvalidRequestException) StatusCode() int { 10134 return s.respMetadata.StatusCode 10135} 10136 10137// RequestID returns the service's response RequestID for request. 10138func (s InvalidRequestException) RequestID() string { 10139 return s.respMetadata.RequestID 10140} 10141 10142// The specified job was not found. Check the job ID and try again. 10143type JobNotFoundException struct { 10144 _ struct{} `type:"structure"` 10145 respMetadata protocol.ResponseMetadata 10146 10147 Message_ *string `locationName:"Message" min:"1" type:"string"` 10148} 10149 10150// String returns the string representation 10151func (s JobNotFoundException) String() string { 10152 return awsutil.Prettify(s) 10153} 10154 10155// GoString returns the string representation 10156func (s JobNotFoundException) GoString() string { 10157 return s.String() 10158} 10159 10160func newErrorJobNotFoundException(v protocol.ResponseMetadata) error { 10161 return &JobNotFoundException{ 10162 respMetadata: v, 10163 } 10164} 10165 10166// Code returns the exception type name. 10167func (s JobNotFoundException) Code() string { 10168 return "JobNotFoundException" 10169} 10170 10171// Message returns the exception's message. 10172func (s JobNotFoundException) Message() string { 10173 if s.Message_ != nil { 10174 return *s.Message_ 10175 } 10176 return "" 10177} 10178 10179// OrigErr always returns nil, satisfies awserr.Error interface. 10180func (s JobNotFoundException) OrigErr() error { 10181 return nil 10182} 10183 10184func (s JobNotFoundException) Error() string { 10185 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 10186} 10187 10188// Status code returns the HTTP status code for the request's response error. 10189func (s JobNotFoundException) StatusCode() int { 10190 return s.respMetadata.StatusCode 10191} 10192 10193// RequestID returns the service's response RequestID for request. 10194func (s JobNotFoundException) RequestID() string { 10195 return s.respMetadata.RequestID 10196} 10197 10198// Describes a key noun phrase. 10199type KeyPhrase struct { 10200 _ struct{} `type:"structure"` 10201 10202 // A character offset in the input text that shows where the key phrase begins 10203 // (the first character is at position 0). The offset returns the position of 10204 // each UTF-8 code point in the string. A code point is the abstract character 10205 // from a particular graphical representation. For example, a multi-byte UTF-8 10206 // character maps to a single code point. 10207 BeginOffset *int64 `type:"integer"` 10208 10209 // A character offset in the input text where the key phrase ends. The offset 10210 // returns the position of each UTF-8 code point in the string. A code point 10211 // is the abstract character from a particular graphical representation. For 10212 // example, a multi-byte UTF-8 character maps to a single code point. 10213 EndOffset *int64 `type:"integer"` 10214 10215 // The level of confidence that Amazon Comprehend has in the accuracy of the 10216 // detection. 10217 Score *float64 `type:"float"` 10218 10219 // The text of a key noun phrase. 10220 Text *string `min:"1" type:"string"` 10221} 10222 10223// String returns the string representation 10224func (s KeyPhrase) String() string { 10225 return awsutil.Prettify(s) 10226} 10227 10228// GoString returns the string representation 10229func (s KeyPhrase) GoString() string { 10230 return s.String() 10231} 10232 10233// SetBeginOffset sets the BeginOffset field's value. 10234func (s *KeyPhrase) SetBeginOffset(v int64) *KeyPhrase { 10235 s.BeginOffset = &v 10236 return s 10237} 10238 10239// SetEndOffset sets the EndOffset field's value. 10240func (s *KeyPhrase) SetEndOffset(v int64) *KeyPhrase { 10241 s.EndOffset = &v 10242 return s 10243} 10244 10245// SetScore sets the Score field's value. 10246func (s *KeyPhrase) SetScore(v float64) *KeyPhrase { 10247 s.Score = &v 10248 return s 10249} 10250 10251// SetText sets the Text field's value. 10252func (s *KeyPhrase) SetText(v string) *KeyPhrase { 10253 s.Text = &v 10254 return s 10255} 10256 10257// Provides information for filtering a list of dominant language detection 10258// jobs. For more information, see the operation. 10259type KeyPhrasesDetectionJobFilter struct { 10260 _ struct{} `type:"structure"` 10261 10262 // Filters on the name of the job. 10263 JobName *string `min:"1" type:"string"` 10264 10265 // Filters the list of jobs based on job status. Returns only jobs with the 10266 // specified status. 10267 JobStatus *string `type:"string" enum:"JobStatus"` 10268 10269 // Filters the list of jobs based on the time that the job was submitted for 10270 // processing. Returns only jobs submitted after the specified time. Jobs are 10271 // returned in descending order, newest to oldest. 10272 SubmitTimeAfter *time.Time `type:"timestamp"` 10273 10274 // Filters the list of jobs based on the time that the job was submitted for 10275 // processing. Returns only jobs submitted before the specified time. Jobs are 10276 // returned in ascending order, oldest to newest. 10277 SubmitTimeBefore *time.Time `type:"timestamp"` 10278} 10279 10280// String returns the string representation 10281func (s KeyPhrasesDetectionJobFilter) String() string { 10282 return awsutil.Prettify(s) 10283} 10284 10285// GoString returns the string representation 10286func (s KeyPhrasesDetectionJobFilter) GoString() string { 10287 return s.String() 10288} 10289 10290// Validate inspects the fields of the type to determine if they are valid. 10291func (s *KeyPhrasesDetectionJobFilter) Validate() error { 10292 invalidParams := request.ErrInvalidParams{Context: "KeyPhrasesDetectionJobFilter"} 10293 if s.JobName != nil && len(*s.JobName) < 1 { 10294 invalidParams.Add(request.NewErrParamMinLen("JobName", 1)) 10295 } 10296 10297 if invalidParams.Len() > 0 { 10298 return invalidParams 10299 } 10300 return nil 10301} 10302 10303// SetJobName sets the JobName field's value. 10304func (s *KeyPhrasesDetectionJobFilter) SetJobName(v string) *KeyPhrasesDetectionJobFilter { 10305 s.JobName = &v 10306 return s 10307} 10308 10309// SetJobStatus sets the JobStatus field's value. 10310func (s *KeyPhrasesDetectionJobFilter) SetJobStatus(v string) *KeyPhrasesDetectionJobFilter { 10311 s.JobStatus = &v 10312 return s 10313} 10314 10315// SetSubmitTimeAfter sets the SubmitTimeAfter field's value. 10316func (s *KeyPhrasesDetectionJobFilter) SetSubmitTimeAfter(v time.Time) *KeyPhrasesDetectionJobFilter { 10317 s.SubmitTimeAfter = &v 10318 return s 10319} 10320 10321// SetSubmitTimeBefore sets the SubmitTimeBefore field's value. 10322func (s *KeyPhrasesDetectionJobFilter) SetSubmitTimeBefore(v time.Time) *KeyPhrasesDetectionJobFilter { 10323 s.SubmitTimeBefore = &v 10324 return s 10325} 10326 10327// Provides information about a key phrases detection job. 10328type KeyPhrasesDetectionJobProperties struct { 10329 _ struct{} `type:"structure"` 10330 10331 // The Amazon Resource Name (ARN) that gives Amazon Comprehend read access to 10332 // your input data. 10333 DataAccessRoleArn *string `min:"20" type:"string"` 10334 10335 // The time that the key phrases detection job completed. 10336 EndTime *time.Time `type:"timestamp"` 10337 10338 // The input data configuration that you supplied when you created the key phrases 10339 // detection job. 10340 InputDataConfig *InputDataConfig `type:"structure"` 10341 10342 // The identifier assigned to the key phrases detection job. 10343 JobId *string `min:"1" type:"string"` 10344 10345 // The name that you assigned the key phrases detection job. 10346 JobName *string `min:"1" type:"string"` 10347 10348 // The current status of the key phrases detection job. If the status is FAILED, 10349 // the Message field shows the reason for the failure. 10350 JobStatus *string `type:"string" enum:"JobStatus"` 10351 10352 // The language code of the input documents. 10353 LanguageCode *string `type:"string" enum:"LanguageCode"` 10354 10355 // A description of the status of a job. 10356 Message *string `type:"string"` 10357 10358 // The output data configuration that you supplied when you created the key 10359 // phrases detection job. 10360 OutputDataConfig *OutputDataConfig `type:"structure"` 10361 10362 // The time that the key phrases detection job was submitted for processing. 10363 SubmitTime *time.Time `type:"timestamp"` 10364 10365 // ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses 10366 // to encrypt data on the storage volume attached to the ML compute instance(s) 10367 // that process the analysis job. The VolumeKmsKeyId can be either of the following 10368 // formats: 10369 // 10370 // * KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab" 10371 // 10372 // * Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" 10373 VolumeKmsKeyId *string `type:"string"` 10374 10375 // Configuration parameters for a private Virtual Private Cloud (VPC) containing 10376 // the resources you are using for your key phrases detection job. For more 10377 // information, see Amazon VPC (https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html). 10378 VpcConfig *VpcConfig `type:"structure"` 10379} 10380 10381// String returns the string representation 10382func (s KeyPhrasesDetectionJobProperties) String() string { 10383 return awsutil.Prettify(s) 10384} 10385 10386// GoString returns the string representation 10387func (s KeyPhrasesDetectionJobProperties) GoString() string { 10388 return s.String() 10389} 10390 10391// SetDataAccessRoleArn sets the DataAccessRoleArn field's value. 10392func (s *KeyPhrasesDetectionJobProperties) SetDataAccessRoleArn(v string) *KeyPhrasesDetectionJobProperties { 10393 s.DataAccessRoleArn = &v 10394 return s 10395} 10396 10397// SetEndTime sets the EndTime field's value. 10398func (s *KeyPhrasesDetectionJobProperties) SetEndTime(v time.Time) *KeyPhrasesDetectionJobProperties { 10399 s.EndTime = &v 10400 return s 10401} 10402 10403// SetInputDataConfig sets the InputDataConfig field's value. 10404func (s *KeyPhrasesDetectionJobProperties) SetInputDataConfig(v *InputDataConfig) *KeyPhrasesDetectionJobProperties { 10405 s.InputDataConfig = v 10406 return s 10407} 10408 10409// SetJobId sets the JobId field's value. 10410func (s *KeyPhrasesDetectionJobProperties) SetJobId(v string) *KeyPhrasesDetectionJobProperties { 10411 s.JobId = &v 10412 return s 10413} 10414 10415// SetJobName sets the JobName field's value. 10416func (s *KeyPhrasesDetectionJobProperties) SetJobName(v string) *KeyPhrasesDetectionJobProperties { 10417 s.JobName = &v 10418 return s 10419} 10420 10421// SetJobStatus sets the JobStatus field's value. 10422func (s *KeyPhrasesDetectionJobProperties) SetJobStatus(v string) *KeyPhrasesDetectionJobProperties { 10423 s.JobStatus = &v 10424 return s 10425} 10426 10427// SetLanguageCode sets the LanguageCode field's value. 10428func (s *KeyPhrasesDetectionJobProperties) SetLanguageCode(v string) *KeyPhrasesDetectionJobProperties { 10429 s.LanguageCode = &v 10430 return s 10431} 10432 10433// SetMessage sets the Message field's value. 10434func (s *KeyPhrasesDetectionJobProperties) SetMessage(v string) *KeyPhrasesDetectionJobProperties { 10435 s.Message = &v 10436 return s 10437} 10438 10439// SetOutputDataConfig sets the OutputDataConfig field's value. 10440func (s *KeyPhrasesDetectionJobProperties) SetOutputDataConfig(v *OutputDataConfig) *KeyPhrasesDetectionJobProperties { 10441 s.OutputDataConfig = v 10442 return s 10443} 10444 10445// SetSubmitTime sets the SubmitTime field's value. 10446func (s *KeyPhrasesDetectionJobProperties) SetSubmitTime(v time.Time) *KeyPhrasesDetectionJobProperties { 10447 s.SubmitTime = &v 10448 return s 10449} 10450 10451// SetVolumeKmsKeyId sets the VolumeKmsKeyId field's value. 10452func (s *KeyPhrasesDetectionJobProperties) SetVolumeKmsKeyId(v string) *KeyPhrasesDetectionJobProperties { 10453 s.VolumeKmsKeyId = &v 10454 return s 10455} 10456 10457// SetVpcConfig sets the VpcConfig field's value. 10458func (s *KeyPhrasesDetectionJobProperties) SetVpcConfig(v *VpcConfig) *KeyPhrasesDetectionJobProperties { 10459 s.VpcConfig = v 10460 return s 10461} 10462 10463// The KMS customer managed key (CMK) entered cannot be validated. Verify the 10464// key and re-enter it. 10465type KmsKeyValidationException struct { 10466 _ struct{} `type:"structure"` 10467 respMetadata protocol.ResponseMetadata 10468 10469 Message_ *string `locationName:"Message" min:"1" type:"string"` 10470} 10471 10472// String returns the string representation 10473func (s KmsKeyValidationException) String() string { 10474 return awsutil.Prettify(s) 10475} 10476 10477// GoString returns the string representation 10478func (s KmsKeyValidationException) GoString() string { 10479 return s.String() 10480} 10481 10482func newErrorKmsKeyValidationException(v protocol.ResponseMetadata) error { 10483 return &KmsKeyValidationException{ 10484 respMetadata: v, 10485 } 10486} 10487 10488// Code returns the exception type name. 10489func (s KmsKeyValidationException) Code() string { 10490 return "KmsKeyValidationException" 10491} 10492 10493// Message returns the exception's message. 10494func (s KmsKeyValidationException) Message() string { 10495 if s.Message_ != nil { 10496 return *s.Message_ 10497 } 10498 return "" 10499} 10500 10501// OrigErr always returns nil, satisfies awserr.Error interface. 10502func (s KmsKeyValidationException) OrigErr() error { 10503 return nil 10504} 10505 10506func (s KmsKeyValidationException) Error() string { 10507 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 10508} 10509 10510// Status code returns the HTTP status code for the request's response error. 10511func (s KmsKeyValidationException) StatusCode() int { 10512 return s.respMetadata.StatusCode 10513} 10514 10515// RequestID returns the service's response RequestID for request. 10516func (s KmsKeyValidationException) RequestID() string { 10517 return s.respMetadata.RequestID 10518} 10519 10520type ListDocumentClassificationJobsInput struct { 10521 _ struct{} `type:"structure"` 10522 10523 // Filters the jobs that are returned. You can filter jobs on their names, status, 10524 // or the date and time that they were submitted. You can only set one filter 10525 // at a time. 10526 Filter *DocumentClassificationJobFilter `type:"structure"` 10527 10528 // The maximum number of results to return in each page. The default is 100. 10529 MaxResults *int64 `min:"1" type:"integer"` 10530 10531 // Identifies the next page of results to return. 10532 NextToken *string `min:"1" type:"string"` 10533} 10534 10535// String returns the string representation 10536func (s ListDocumentClassificationJobsInput) String() string { 10537 return awsutil.Prettify(s) 10538} 10539 10540// GoString returns the string representation 10541func (s ListDocumentClassificationJobsInput) GoString() string { 10542 return s.String() 10543} 10544 10545// Validate inspects the fields of the type to determine if they are valid. 10546func (s *ListDocumentClassificationJobsInput) Validate() error { 10547 invalidParams := request.ErrInvalidParams{Context: "ListDocumentClassificationJobsInput"} 10548 if s.MaxResults != nil && *s.MaxResults < 1 { 10549 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 10550 } 10551 if s.NextToken != nil && len(*s.NextToken) < 1 { 10552 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 10553 } 10554 if s.Filter != nil { 10555 if err := s.Filter.Validate(); err != nil { 10556 invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) 10557 } 10558 } 10559 10560 if invalidParams.Len() > 0 { 10561 return invalidParams 10562 } 10563 return nil 10564} 10565 10566// SetFilter sets the Filter field's value. 10567func (s *ListDocumentClassificationJobsInput) SetFilter(v *DocumentClassificationJobFilter) *ListDocumentClassificationJobsInput { 10568 s.Filter = v 10569 return s 10570} 10571 10572// SetMaxResults sets the MaxResults field's value. 10573func (s *ListDocumentClassificationJobsInput) SetMaxResults(v int64) *ListDocumentClassificationJobsInput { 10574 s.MaxResults = &v 10575 return s 10576} 10577 10578// SetNextToken sets the NextToken field's value. 10579func (s *ListDocumentClassificationJobsInput) SetNextToken(v string) *ListDocumentClassificationJobsInput { 10580 s.NextToken = &v 10581 return s 10582} 10583 10584type ListDocumentClassificationJobsOutput struct { 10585 _ struct{} `type:"structure"` 10586 10587 // A list containing the properties of each job returned. 10588 DocumentClassificationJobPropertiesList []*DocumentClassificationJobProperties `type:"list"` 10589 10590 // Identifies the next page of results to return. 10591 NextToken *string `min:"1" type:"string"` 10592} 10593 10594// String returns the string representation 10595func (s ListDocumentClassificationJobsOutput) String() string { 10596 return awsutil.Prettify(s) 10597} 10598 10599// GoString returns the string representation 10600func (s ListDocumentClassificationJobsOutput) GoString() string { 10601 return s.String() 10602} 10603 10604// SetDocumentClassificationJobPropertiesList sets the DocumentClassificationJobPropertiesList field's value. 10605func (s *ListDocumentClassificationJobsOutput) SetDocumentClassificationJobPropertiesList(v []*DocumentClassificationJobProperties) *ListDocumentClassificationJobsOutput { 10606 s.DocumentClassificationJobPropertiesList = v 10607 return s 10608} 10609 10610// SetNextToken sets the NextToken field's value. 10611func (s *ListDocumentClassificationJobsOutput) SetNextToken(v string) *ListDocumentClassificationJobsOutput { 10612 s.NextToken = &v 10613 return s 10614} 10615 10616type ListDocumentClassifiersInput struct { 10617 _ struct{} `type:"structure"` 10618 10619 // Filters the jobs that are returned. You can filter jobs on their name, status, 10620 // or the date and time that they were submitted. You can only set one filter 10621 // at a time. 10622 Filter *DocumentClassifierFilter `type:"structure"` 10623 10624 // The maximum number of results to return in each page. The default is 100. 10625 MaxResults *int64 `min:"1" type:"integer"` 10626 10627 // Identifies the next page of results to return. 10628 NextToken *string `min:"1" type:"string"` 10629} 10630 10631// String returns the string representation 10632func (s ListDocumentClassifiersInput) String() string { 10633 return awsutil.Prettify(s) 10634} 10635 10636// GoString returns the string representation 10637func (s ListDocumentClassifiersInput) GoString() string { 10638 return s.String() 10639} 10640 10641// Validate inspects the fields of the type to determine if they are valid. 10642func (s *ListDocumentClassifiersInput) Validate() error { 10643 invalidParams := request.ErrInvalidParams{Context: "ListDocumentClassifiersInput"} 10644 if s.MaxResults != nil && *s.MaxResults < 1 { 10645 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 10646 } 10647 if s.NextToken != nil && len(*s.NextToken) < 1 { 10648 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 10649 } 10650 10651 if invalidParams.Len() > 0 { 10652 return invalidParams 10653 } 10654 return nil 10655} 10656 10657// SetFilter sets the Filter field's value. 10658func (s *ListDocumentClassifiersInput) SetFilter(v *DocumentClassifierFilter) *ListDocumentClassifiersInput { 10659 s.Filter = v 10660 return s 10661} 10662 10663// SetMaxResults sets the MaxResults field's value. 10664func (s *ListDocumentClassifiersInput) SetMaxResults(v int64) *ListDocumentClassifiersInput { 10665 s.MaxResults = &v 10666 return s 10667} 10668 10669// SetNextToken sets the NextToken field's value. 10670func (s *ListDocumentClassifiersInput) SetNextToken(v string) *ListDocumentClassifiersInput { 10671 s.NextToken = &v 10672 return s 10673} 10674 10675type ListDocumentClassifiersOutput struct { 10676 _ struct{} `type:"structure"` 10677 10678 // A list containing the properties of each job returned. 10679 DocumentClassifierPropertiesList []*DocumentClassifierProperties `type:"list"` 10680 10681 // Identifies the next page of results to return. 10682 NextToken *string `min:"1" type:"string"` 10683} 10684 10685// String returns the string representation 10686func (s ListDocumentClassifiersOutput) String() string { 10687 return awsutil.Prettify(s) 10688} 10689 10690// GoString returns the string representation 10691func (s ListDocumentClassifiersOutput) GoString() string { 10692 return s.String() 10693} 10694 10695// SetDocumentClassifierPropertiesList sets the DocumentClassifierPropertiesList field's value. 10696func (s *ListDocumentClassifiersOutput) SetDocumentClassifierPropertiesList(v []*DocumentClassifierProperties) *ListDocumentClassifiersOutput { 10697 s.DocumentClassifierPropertiesList = v 10698 return s 10699} 10700 10701// SetNextToken sets the NextToken field's value. 10702func (s *ListDocumentClassifiersOutput) SetNextToken(v string) *ListDocumentClassifiersOutput { 10703 s.NextToken = &v 10704 return s 10705} 10706 10707type ListDominantLanguageDetectionJobsInput struct { 10708 _ struct{} `type:"structure"` 10709 10710 // Filters that jobs that are returned. You can filter jobs on their name, status, 10711 // or the date and time that they were submitted. You can only set one filter 10712 // at a time. 10713 Filter *DominantLanguageDetectionJobFilter `type:"structure"` 10714 10715 // The maximum number of results to return in each page. The default is 100. 10716 MaxResults *int64 `min:"1" type:"integer"` 10717 10718 // Identifies the next page of results to return. 10719 NextToken *string `min:"1" type:"string"` 10720} 10721 10722// String returns the string representation 10723func (s ListDominantLanguageDetectionJobsInput) String() string { 10724 return awsutil.Prettify(s) 10725} 10726 10727// GoString returns the string representation 10728func (s ListDominantLanguageDetectionJobsInput) GoString() string { 10729 return s.String() 10730} 10731 10732// Validate inspects the fields of the type to determine if they are valid. 10733func (s *ListDominantLanguageDetectionJobsInput) Validate() error { 10734 invalidParams := request.ErrInvalidParams{Context: "ListDominantLanguageDetectionJobsInput"} 10735 if s.MaxResults != nil && *s.MaxResults < 1 { 10736 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 10737 } 10738 if s.NextToken != nil && len(*s.NextToken) < 1 { 10739 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 10740 } 10741 if s.Filter != nil { 10742 if err := s.Filter.Validate(); err != nil { 10743 invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) 10744 } 10745 } 10746 10747 if invalidParams.Len() > 0 { 10748 return invalidParams 10749 } 10750 return nil 10751} 10752 10753// SetFilter sets the Filter field's value. 10754func (s *ListDominantLanguageDetectionJobsInput) SetFilter(v *DominantLanguageDetectionJobFilter) *ListDominantLanguageDetectionJobsInput { 10755 s.Filter = v 10756 return s 10757} 10758 10759// SetMaxResults sets the MaxResults field's value. 10760func (s *ListDominantLanguageDetectionJobsInput) SetMaxResults(v int64) *ListDominantLanguageDetectionJobsInput { 10761 s.MaxResults = &v 10762 return s 10763} 10764 10765// SetNextToken sets the NextToken field's value. 10766func (s *ListDominantLanguageDetectionJobsInput) SetNextToken(v string) *ListDominantLanguageDetectionJobsInput { 10767 s.NextToken = &v 10768 return s 10769} 10770 10771type ListDominantLanguageDetectionJobsOutput struct { 10772 _ struct{} `type:"structure"` 10773 10774 // A list containing the properties of each job that is returned. 10775 DominantLanguageDetectionJobPropertiesList []*DominantLanguageDetectionJobProperties `type:"list"` 10776 10777 // Identifies the next page of results to return. 10778 NextToken *string `min:"1" type:"string"` 10779} 10780 10781// String returns the string representation 10782func (s ListDominantLanguageDetectionJobsOutput) String() string { 10783 return awsutil.Prettify(s) 10784} 10785 10786// GoString returns the string representation 10787func (s ListDominantLanguageDetectionJobsOutput) GoString() string { 10788 return s.String() 10789} 10790 10791// SetDominantLanguageDetectionJobPropertiesList sets the DominantLanguageDetectionJobPropertiesList field's value. 10792func (s *ListDominantLanguageDetectionJobsOutput) SetDominantLanguageDetectionJobPropertiesList(v []*DominantLanguageDetectionJobProperties) *ListDominantLanguageDetectionJobsOutput { 10793 s.DominantLanguageDetectionJobPropertiesList = v 10794 return s 10795} 10796 10797// SetNextToken sets the NextToken field's value. 10798func (s *ListDominantLanguageDetectionJobsOutput) SetNextToken(v string) *ListDominantLanguageDetectionJobsOutput { 10799 s.NextToken = &v 10800 return s 10801} 10802 10803type ListEndpointsInput struct { 10804 _ struct{} `type:"structure"` 10805 10806 // Filters the endpoints that are returned. You can filter endpoints on their 10807 // name, model, status, or the date and time that they were created. You can 10808 // only set one filter at a time. 10809 Filter *EndpointFilter `type:"structure"` 10810 10811 // The maximum number of results to return in each page. The default is 100. 10812 MaxResults *int64 `min:"1" type:"integer"` 10813 10814 // Identifies the next page of results to return. 10815 NextToken *string `min:"1" type:"string"` 10816} 10817 10818// String returns the string representation 10819func (s ListEndpointsInput) String() string { 10820 return awsutil.Prettify(s) 10821} 10822 10823// GoString returns the string representation 10824func (s ListEndpointsInput) GoString() string { 10825 return s.String() 10826} 10827 10828// Validate inspects the fields of the type to determine if they are valid. 10829func (s *ListEndpointsInput) Validate() error { 10830 invalidParams := request.ErrInvalidParams{Context: "ListEndpointsInput"} 10831 if s.MaxResults != nil && *s.MaxResults < 1 { 10832 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 10833 } 10834 if s.NextToken != nil && len(*s.NextToken) < 1 { 10835 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 10836 } 10837 10838 if invalidParams.Len() > 0 { 10839 return invalidParams 10840 } 10841 return nil 10842} 10843 10844// SetFilter sets the Filter field's value. 10845func (s *ListEndpointsInput) SetFilter(v *EndpointFilter) *ListEndpointsInput { 10846 s.Filter = v 10847 return s 10848} 10849 10850// SetMaxResults sets the MaxResults field's value. 10851func (s *ListEndpointsInput) SetMaxResults(v int64) *ListEndpointsInput { 10852 s.MaxResults = &v 10853 return s 10854} 10855 10856// SetNextToken sets the NextToken field's value. 10857func (s *ListEndpointsInput) SetNextToken(v string) *ListEndpointsInput { 10858 s.NextToken = &v 10859 return s 10860} 10861 10862type ListEndpointsOutput struct { 10863 _ struct{} `type:"structure"` 10864 10865 // Displays a list of endpoint properties being retrieved by the service in 10866 // response to the request. 10867 EndpointPropertiesList []*EndpointProperties `type:"list"` 10868 10869 // Identifies the next page of results to return. 10870 NextToken *string `min:"1" type:"string"` 10871} 10872 10873// String returns the string representation 10874func (s ListEndpointsOutput) String() string { 10875 return awsutil.Prettify(s) 10876} 10877 10878// GoString returns the string representation 10879func (s ListEndpointsOutput) GoString() string { 10880 return s.String() 10881} 10882 10883// SetEndpointPropertiesList sets the EndpointPropertiesList field's value. 10884func (s *ListEndpointsOutput) SetEndpointPropertiesList(v []*EndpointProperties) *ListEndpointsOutput { 10885 s.EndpointPropertiesList = v 10886 return s 10887} 10888 10889// SetNextToken sets the NextToken field's value. 10890func (s *ListEndpointsOutput) SetNextToken(v string) *ListEndpointsOutput { 10891 s.NextToken = &v 10892 return s 10893} 10894 10895type ListEntitiesDetectionJobsInput struct { 10896 _ struct{} `type:"structure"` 10897 10898 // Filters the jobs that are returned. You can filter jobs on their name, status, 10899 // or the date and time that they were submitted. You can only set one filter 10900 // at a time. 10901 Filter *EntitiesDetectionJobFilter `type:"structure"` 10902 10903 // The maximum number of results to return in each page. The default is 100. 10904 MaxResults *int64 `min:"1" type:"integer"` 10905 10906 // Identifies the next page of results to return. 10907 NextToken *string `min:"1" type:"string"` 10908} 10909 10910// String returns the string representation 10911func (s ListEntitiesDetectionJobsInput) String() string { 10912 return awsutil.Prettify(s) 10913} 10914 10915// GoString returns the string representation 10916func (s ListEntitiesDetectionJobsInput) GoString() string { 10917 return s.String() 10918} 10919 10920// Validate inspects the fields of the type to determine if they are valid. 10921func (s *ListEntitiesDetectionJobsInput) Validate() error { 10922 invalidParams := request.ErrInvalidParams{Context: "ListEntitiesDetectionJobsInput"} 10923 if s.MaxResults != nil && *s.MaxResults < 1 { 10924 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 10925 } 10926 if s.NextToken != nil && len(*s.NextToken) < 1 { 10927 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 10928 } 10929 if s.Filter != nil { 10930 if err := s.Filter.Validate(); err != nil { 10931 invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) 10932 } 10933 } 10934 10935 if invalidParams.Len() > 0 { 10936 return invalidParams 10937 } 10938 return nil 10939} 10940 10941// SetFilter sets the Filter field's value. 10942func (s *ListEntitiesDetectionJobsInput) SetFilter(v *EntitiesDetectionJobFilter) *ListEntitiesDetectionJobsInput { 10943 s.Filter = v 10944 return s 10945} 10946 10947// SetMaxResults sets the MaxResults field's value. 10948func (s *ListEntitiesDetectionJobsInput) SetMaxResults(v int64) *ListEntitiesDetectionJobsInput { 10949 s.MaxResults = &v 10950 return s 10951} 10952 10953// SetNextToken sets the NextToken field's value. 10954func (s *ListEntitiesDetectionJobsInput) SetNextToken(v string) *ListEntitiesDetectionJobsInput { 10955 s.NextToken = &v 10956 return s 10957} 10958 10959type ListEntitiesDetectionJobsOutput struct { 10960 _ struct{} `type:"structure"` 10961 10962 // A list containing the properties of each job that is returned. 10963 EntitiesDetectionJobPropertiesList []*EntitiesDetectionJobProperties `type:"list"` 10964 10965 // Identifies the next page of results to return. 10966 NextToken *string `min:"1" type:"string"` 10967} 10968 10969// String returns the string representation 10970func (s ListEntitiesDetectionJobsOutput) String() string { 10971 return awsutil.Prettify(s) 10972} 10973 10974// GoString returns the string representation 10975func (s ListEntitiesDetectionJobsOutput) GoString() string { 10976 return s.String() 10977} 10978 10979// SetEntitiesDetectionJobPropertiesList sets the EntitiesDetectionJobPropertiesList field's value. 10980func (s *ListEntitiesDetectionJobsOutput) SetEntitiesDetectionJobPropertiesList(v []*EntitiesDetectionJobProperties) *ListEntitiesDetectionJobsOutput { 10981 s.EntitiesDetectionJobPropertiesList = v 10982 return s 10983} 10984 10985// SetNextToken sets the NextToken field's value. 10986func (s *ListEntitiesDetectionJobsOutput) SetNextToken(v string) *ListEntitiesDetectionJobsOutput { 10987 s.NextToken = &v 10988 return s 10989} 10990 10991type ListEntityRecognizersInput struct { 10992 _ struct{} `type:"structure"` 10993 10994 // Filters the list of entities returned. You can filter on Status, SubmitTimeBefore, 10995 // or SubmitTimeAfter. You can only set one filter at a time. 10996 Filter *EntityRecognizerFilter `type:"structure"` 10997 10998 // The maximum number of results to return on each page. The default is 100. 10999 MaxResults *int64 `min:"1" type:"integer"` 11000 11001 // Identifies the next page of results to return. 11002 NextToken *string `min:"1" type:"string"` 11003} 11004 11005// String returns the string representation 11006func (s ListEntityRecognizersInput) String() string { 11007 return awsutil.Prettify(s) 11008} 11009 11010// GoString returns the string representation 11011func (s ListEntityRecognizersInput) GoString() string { 11012 return s.String() 11013} 11014 11015// Validate inspects the fields of the type to determine if they are valid. 11016func (s *ListEntityRecognizersInput) Validate() error { 11017 invalidParams := request.ErrInvalidParams{Context: "ListEntityRecognizersInput"} 11018 if s.MaxResults != nil && *s.MaxResults < 1 { 11019 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 11020 } 11021 if s.NextToken != nil && len(*s.NextToken) < 1 { 11022 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 11023 } 11024 11025 if invalidParams.Len() > 0 { 11026 return invalidParams 11027 } 11028 return nil 11029} 11030 11031// SetFilter sets the Filter field's value. 11032func (s *ListEntityRecognizersInput) SetFilter(v *EntityRecognizerFilter) *ListEntityRecognizersInput { 11033 s.Filter = v 11034 return s 11035} 11036 11037// SetMaxResults sets the MaxResults field's value. 11038func (s *ListEntityRecognizersInput) SetMaxResults(v int64) *ListEntityRecognizersInput { 11039 s.MaxResults = &v 11040 return s 11041} 11042 11043// SetNextToken sets the NextToken field's value. 11044func (s *ListEntityRecognizersInput) SetNextToken(v string) *ListEntityRecognizersInput { 11045 s.NextToken = &v 11046 return s 11047} 11048 11049type ListEntityRecognizersOutput struct { 11050 _ struct{} `type:"structure"` 11051 11052 // The list of properties of an entity recognizer. 11053 EntityRecognizerPropertiesList []*EntityRecognizerProperties `type:"list"` 11054 11055 // Identifies the next page of results to return. 11056 NextToken *string `min:"1" type:"string"` 11057} 11058 11059// String returns the string representation 11060func (s ListEntityRecognizersOutput) String() string { 11061 return awsutil.Prettify(s) 11062} 11063 11064// GoString returns the string representation 11065func (s ListEntityRecognizersOutput) GoString() string { 11066 return s.String() 11067} 11068 11069// SetEntityRecognizerPropertiesList sets the EntityRecognizerPropertiesList field's value. 11070func (s *ListEntityRecognizersOutput) SetEntityRecognizerPropertiesList(v []*EntityRecognizerProperties) *ListEntityRecognizersOutput { 11071 s.EntityRecognizerPropertiesList = v 11072 return s 11073} 11074 11075// SetNextToken sets the NextToken field's value. 11076func (s *ListEntityRecognizersOutput) SetNextToken(v string) *ListEntityRecognizersOutput { 11077 s.NextToken = &v 11078 return s 11079} 11080 11081type ListKeyPhrasesDetectionJobsInput struct { 11082 _ struct{} `type:"structure"` 11083 11084 // Filters the jobs that are returned. You can filter jobs on their name, status, 11085 // or the date and time that they were submitted. You can only set one filter 11086 // at a time. 11087 Filter *KeyPhrasesDetectionJobFilter `type:"structure"` 11088 11089 // The maximum number of results to return in each page. The default is 100. 11090 MaxResults *int64 `min:"1" type:"integer"` 11091 11092 // Identifies the next page of results to return. 11093 NextToken *string `min:"1" type:"string"` 11094} 11095 11096// String returns the string representation 11097func (s ListKeyPhrasesDetectionJobsInput) String() string { 11098 return awsutil.Prettify(s) 11099} 11100 11101// GoString returns the string representation 11102func (s ListKeyPhrasesDetectionJobsInput) GoString() string { 11103 return s.String() 11104} 11105 11106// Validate inspects the fields of the type to determine if they are valid. 11107func (s *ListKeyPhrasesDetectionJobsInput) Validate() error { 11108 invalidParams := request.ErrInvalidParams{Context: "ListKeyPhrasesDetectionJobsInput"} 11109 if s.MaxResults != nil && *s.MaxResults < 1 { 11110 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 11111 } 11112 if s.NextToken != nil && len(*s.NextToken) < 1 { 11113 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 11114 } 11115 if s.Filter != nil { 11116 if err := s.Filter.Validate(); err != nil { 11117 invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) 11118 } 11119 } 11120 11121 if invalidParams.Len() > 0 { 11122 return invalidParams 11123 } 11124 return nil 11125} 11126 11127// SetFilter sets the Filter field's value. 11128func (s *ListKeyPhrasesDetectionJobsInput) SetFilter(v *KeyPhrasesDetectionJobFilter) *ListKeyPhrasesDetectionJobsInput { 11129 s.Filter = v 11130 return s 11131} 11132 11133// SetMaxResults sets the MaxResults field's value. 11134func (s *ListKeyPhrasesDetectionJobsInput) SetMaxResults(v int64) *ListKeyPhrasesDetectionJobsInput { 11135 s.MaxResults = &v 11136 return s 11137} 11138 11139// SetNextToken sets the NextToken field's value. 11140func (s *ListKeyPhrasesDetectionJobsInput) SetNextToken(v string) *ListKeyPhrasesDetectionJobsInput { 11141 s.NextToken = &v 11142 return s 11143} 11144 11145type ListKeyPhrasesDetectionJobsOutput struct { 11146 _ struct{} `type:"structure"` 11147 11148 // A list containing the properties of each job that is returned. 11149 KeyPhrasesDetectionJobPropertiesList []*KeyPhrasesDetectionJobProperties `type:"list"` 11150 11151 // Identifies the next page of results to return. 11152 NextToken *string `min:"1" type:"string"` 11153} 11154 11155// String returns the string representation 11156func (s ListKeyPhrasesDetectionJobsOutput) String() string { 11157 return awsutil.Prettify(s) 11158} 11159 11160// GoString returns the string representation 11161func (s ListKeyPhrasesDetectionJobsOutput) GoString() string { 11162 return s.String() 11163} 11164 11165// SetKeyPhrasesDetectionJobPropertiesList sets the KeyPhrasesDetectionJobPropertiesList field's value. 11166func (s *ListKeyPhrasesDetectionJobsOutput) SetKeyPhrasesDetectionJobPropertiesList(v []*KeyPhrasesDetectionJobProperties) *ListKeyPhrasesDetectionJobsOutput { 11167 s.KeyPhrasesDetectionJobPropertiesList = v 11168 return s 11169} 11170 11171// SetNextToken sets the NextToken field's value. 11172func (s *ListKeyPhrasesDetectionJobsOutput) SetNextToken(v string) *ListKeyPhrasesDetectionJobsOutput { 11173 s.NextToken = &v 11174 return s 11175} 11176 11177type ListSentimentDetectionJobsInput struct { 11178 _ struct{} `type:"structure"` 11179 11180 // Filters the jobs that are returned. You can filter jobs on their name, status, 11181 // or the date and time that they were submitted. You can only set one filter 11182 // at a time. 11183 Filter *SentimentDetectionJobFilter `type:"structure"` 11184 11185 // The maximum number of results to return in each page. The default is 100. 11186 MaxResults *int64 `min:"1" type:"integer"` 11187 11188 // Identifies the next page of results to return. 11189 NextToken *string `min:"1" type:"string"` 11190} 11191 11192// String returns the string representation 11193func (s ListSentimentDetectionJobsInput) String() string { 11194 return awsutil.Prettify(s) 11195} 11196 11197// GoString returns the string representation 11198func (s ListSentimentDetectionJobsInput) GoString() string { 11199 return s.String() 11200} 11201 11202// Validate inspects the fields of the type to determine if they are valid. 11203func (s *ListSentimentDetectionJobsInput) Validate() error { 11204 invalidParams := request.ErrInvalidParams{Context: "ListSentimentDetectionJobsInput"} 11205 if s.MaxResults != nil && *s.MaxResults < 1 { 11206 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 11207 } 11208 if s.NextToken != nil && len(*s.NextToken) < 1 { 11209 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 11210 } 11211 if s.Filter != nil { 11212 if err := s.Filter.Validate(); err != nil { 11213 invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) 11214 } 11215 } 11216 11217 if invalidParams.Len() > 0 { 11218 return invalidParams 11219 } 11220 return nil 11221} 11222 11223// SetFilter sets the Filter field's value. 11224func (s *ListSentimentDetectionJobsInput) SetFilter(v *SentimentDetectionJobFilter) *ListSentimentDetectionJobsInput { 11225 s.Filter = v 11226 return s 11227} 11228 11229// SetMaxResults sets the MaxResults field's value. 11230func (s *ListSentimentDetectionJobsInput) SetMaxResults(v int64) *ListSentimentDetectionJobsInput { 11231 s.MaxResults = &v 11232 return s 11233} 11234 11235// SetNextToken sets the NextToken field's value. 11236func (s *ListSentimentDetectionJobsInput) SetNextToken(v string) *ListSentimentDetectionJobsInput { 11237 s.NextToken = &v 11238 return s 11239} 11240 11241type ListSentimentDetectionJobsOutput struct { 11242 _ struct{} `type:"structure"` 11243 11244 // Identifies the next page of results to return. 11245 NextToken *string `min:"1" type:"string"` 11246 11247 // A list containing the properties of each job that is returned. 11248 SentimentDetectionJobPropertiesList []*SentimentDetectionJobProperties `type:"list"` 11249} 11250 11251// String returns the string representation 11252func (s ListSentimentDetectionJobsOutput) String() string { 11253 return awsutil.Prettify(s) 11254} 11255 11256// GoString returns the string representation 11257func (s ListSentimentDetectionJobsOutput) GoString() string { 11258 return s.String() 11259} 11260 11261// SetNextToken sets the NextToken field's value. 11262func (s *ListSentimentDetectionJobsOutput) SetNextToken(v string) *ListSentimentDetectionJobsOutput { 11263 s.NextToken = &v 11264 return s 11265} 11266 11267// SetSentimentDetectionJobPropertiesList sets the SentimentDetectionJobPropertiesList field's value. 11268func (s *ListSentimentDetectionJobsOutput) SetSentimentDetectionJobPropertiesList(v []*SentimentDetectionJobProperties) *ListSentimentDetectionJobsOutput { 11269 s.SentimentDetectionJobPropertiesList = v 11270 return s 11271} 11272 11273type ListTagsForResourceInput struct { 11274 _ struct{} `type:"structure"` 11275 11276 // The Amazon Resource Name (ARN) of the given Amazon Comprehend resource you 11277 // are querying. 11278 // 11279 // ResourceArn is a required field 11280 ResourceArn *string `type:"string" required:"true"` 11281} 11282 11283// String returns the string representation 11284func (s ListTagsForResourceInput) String() string { 11285 return awsutil.Prettify(s) 11286} 11287 11288// GoString returns the string representation 11289func (s ListTagsForResourceInput) GoString() string { 11290 return s.String() 11291} 11292 11293// Validate inspects the fields of the type to determine if they are valid. 11294func (s *ListTagsForResourceInput) Validate() error { 11295 invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} 11296 if s.ResourceArn == nil { 11297 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 11298 } 11299 11300 if invalidParams.Len() > 0 { 11301 return invalidParams 11302 } 11303 return nil 11304} 11305 11306// SetResourceArn sets the ResourceArn field's value. 11307func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { 11308 s.ResourceArn = &v 11309 return s 11310} 11311 11312type ListTagsForResourceOutput struct { 11313 _ struct{} `type:"structure"` 11314 11315 // The Amazon Resource Name (ARN) of the given Amazon Comprehend resource you 11316 // are querying. 11317 ResourceArn *string `type:"string"` 11318 11319 // Tags associated with the Amazon Comprehend resource being queried. A tag 11320 // is a key-value pair that adds as a metadata to a resource used by Amazon 11321 // Comprehend. For example, a tag with "Sales" as the key might be added to 11322 // a resource to indicate its use by the sales department. 11323 Tags []*Tag `type:"list"` 11324} 11325 11326// String returns the string representation 11327func (s ListTagsForResourceOutput) String() string { 11328 return awsutil.Prettify(s) 11329} 11330 11331// GoString returns the string representation 11332func (s ListTagsForResourceOutput) GoString() string { 11333 return s.String() 11334} 11335 11336// SetResourceArn sets the ResourceArn field's value. 11337func (s *ListTagsForResourceOutput) SetResourceArn(v string) *ListTagsForResourceOutput { 11338 s.ResourceArn = &v 11339 return s 11340} 11341 11342// SetTags sets the Tags field's value. 11343func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { 11344 s.Tags = v 11345 return s 11346} 11347 11348type ListTopicsDetectionJobsInput struct { 11349 _ struct{} `type:"structure"` 11350 11351 // Filters the jobs that are returned. Jobs can be filtered on their name, status, 11352 // or the date and time that they were submitted. You can set only one filter 11353 // at a time. 11354 Filter *TopicsDetectionJobFilter `type:"structure"` 11355 11356 // The maximum number of results to return in each page. The default is 100. 11357 MaxResults *int64 `min:"1" type:"integer"` 11358 11359 // Identifies the next page of results to return. 11360 NextToken *string `min:"1" type:"string"` 11361} 11362 11363// String returns the string representation 11364func (s ListTopicsDetectionJobsInput) String() string { 11365 return awsutil.Prettify(s) 11366} 11367 11368// GoString returns the string representation 11369func (s ListTopicsDetectionJobsInput) GoString() string { 11370 return s.String() 11371} 11372 11373// Validate inspects the fields of the type to determine if they are valid. 11374func (s *ListTopicsDetectionJobsInput) Validate() error { 11375 invalidParams := request.ErrInvalidParams{Context: "ListTopicsDetectionJobsInput"} 11376 if s.MaxResults != nil && *s.MaxResults < 1 { 11377 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 11378 } 11379 if s.NextToken != nil && len(*s.NextToken) < 1 { 11380 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 11381 } 11382 if s.Filter != nil { 11383 if err := s.Filter.Validate(); err != nil { 11384 invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) 11385 } 11386 } 11387 11388 if invalidParams.Len() > 0 { 11389 return invalidParams 11390 } 11391 return nil 11392} 11393 11394// SetFilter sets the Filter field's value. 11395func (s *ListTopicsDetectionJobsInput) SetFilter(v *TopicsDetectionJobFilter) *ListTopicsDetectionJobsInput { 11396 s.Filter = v 11397 return s 11398} 11399 11400// SetMaxResults sets the MaxResults field's value. 11401func (s *ListTopicsDetectionJobsInput) SetMaxResults(v int64) *ListTopicsDetectionJobsInput { 11402 s.MaxResults = &v 11403 return s 11404} 11405 11406// SetNextToken sets the NextToken field's value. 11407func (s *ListTopicsDetectionJobsInput) SetNextToken(v string) *ListTopicsDetectionJobsInput { 11408 s.NextToken = &v 11409 return s 11410} 11411 11412type ListTopicsDetectionJobsOutput struct { 11413 _ struct{} `type:"structure"` 11414 11415 // Identifies the next page of results to return. 11416 NextToken *string `min:"1" type:"string"` 11417 11418 // A list containing the properties of each job that is returned. 11419 TopicsDetectionJobPropertiesList []*TopicsDetectionJobProperties `type:"list"` 11420} 11421 11422// String returns the string representation 11423func (s ListTopicsDetectionJobsOutput) String() string { 11424 return awsutil.Prettify(s) 11425} 11426 11427// GoString returns the string representation 11428func (s ListTopicsDetectionJobsOutput) GoString() string { 11429 return s.String() 11430} 11431 11432// SetNextToken sets the NextToken field's value. 11433func (s *ListTopicsDetectionJobsOutput) SetNextToken(v string) *ListTopicsDetectionJobsOutput { 11434 s.NextToken = &v 11435 return s 11436} 11437 11438// SetTopicsDetectionJobPropertiesList sets the TopicsDetectionJobPropertiesList field's value. 11439func (s *ListTopicsDetectionJobsOutput) SetTopicsDetectionJobPropertiesList(v []*TopicsDetectionJobProperties) *ListTopicsDetectionJobsOutput { 11440 s.TopicsDetectionJobPropertiesList = v 11441 return s 11442} 11443 11444// Provides configuration parameters for the output of topic detection jobs. 11445type OutputDataConfig struct { 11446 _ struct{} `type:"structure"` 11447 11448 // ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses 11449 // to encrypt the output results from an analysis job. The KmsKeyId can be one 11450 // of the following formats: 11451 // 11452 // * KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab" 11453 // 11454 // * Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" 11455 // 11456 // * KMS Key Alias: "alias/ExampleAlias" 11457 // 11458 // * ARN of a KMS Key Alias: "arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias" 11459 KmsKeyId *string `type:"string"` 11460 11461 // When you use the OutputDataConfig object with asynchronous operations, you 11462 // specify the Amazon S3 location where you want to write the output data. The 11463 // URI must be in the same region as the API endpoint that you are calling. 11464 // The location is used as the prefix for the actual location of the output 11465 // file. 11466 // 11467 // When the topic detection job is finished, the service creates an output file 11468 // in a directory specific to the job. The S3Uri field contains the location 11469 // of the output file, called output.tar.gz. It is a compressed archive that 11470 // contains the ouput of the operation. 11471 // 11472 // S3Uri is a required field 11473 S3Uri *string `type:"string" required:"true"` 11474} 11475 11476// String returns the string representation 11477func (s OutputDataConfig) String() string { 11478 return awsutil.Prettify(s) 11479} 11480 11481// GoString returns the string representation 11482func (s OutputDataConfig) GoString() string { 11483 return s.String() 11484} 11485 11486// Validate inspects the fields of the type to determine if they are valid. 11487func (s *OutputDataConfig) Validate() error { 11488 invalidParams := request.ErrInvalidParams{Context: "OutputDataConfig"} 11489 if s.S3Uri == nil { 11490 invalidParams.Add(request.NewErrParamRequired("S3Uri")) 11491 } 11492 11493 if invalidParams.Len() > 0 { 11494 return invalidParams 11495 } 11496 return nil 11497} 11498 11499// SetKmsKeyId sets the KmsKeyId field's value. 11500func (s *OutputDataConfig) SetKmsKeyId(v string) *OutputDataConfig { 11501 s.KmsKeyId = &v 11502 return s 11503} 11504 11505// SetS3Uri sets the S3Uri field's value. 11506func (s *OutputDataConfig) SetS3Uri(v string) *OutputDataConfig { 11507 s.S3Uri = &v 11508 return s 11509} 11510 11511// Identifies the part of speech represented by the token and gives the confidence 11512// that Amazon Comprehend has that the part of speech was correctly identified. 11513// For more information about the parts of speech that Amazon Comprehend can 11514// identify, see how-syntax. 11515type PartOfSpeechTag struct { 11516 _ struct{} `type:"structure"` 11517 11518 // The confidence that Amazon Comprehend has that the part of speech was correctly 11519 // identified. 11520 Score *float64 `type:"float"` 11521 11522 // Identifies the part of speech that the token represents. 11523 Tag *string `type:"string" enum:"PartOfSpeechTagType"` 11524} 11525 11526// String returns the string representation 11527func (s PartOfSpeechTag) String() string { 11528 return awsutil.Prettify(s) 11529} 11530 11531// GoString returns the string representation 11532func (s PartOfSpeechTag) GoString() string { 11533 return s.String() 11534} 11535 11536// SetScore sets the Score field's value. 11537func (s *PartOfSpeechTag) SetScore(v float64) *PartOfSpeechTag { 11538 s.Score = &v 11539 return s 11540} 11541 11542// SetTag sets the Tag field's value. 11543func (s *PartOfSpeechTag) SetTag(v string) *PartOfSpeechTag { 11544 s.Tag = &v 11545 return s 11546} 11547 11548// The specified name is already in use. Use a different name and try your request 11549// again. 11550type ResourceInUseException struct { 11551 _ struct{} `type:"structure"` 11552 respMetadata protocol.ResponseMetadata 11553 11554 Message_ *string `locationName:"Message" min:"1" type:"string"` 11555} 11556 11557// String returns the string representation 11558func (s ResourceInUseException) String() string { 11559 return awsutil.Prettify(s) 11560} 11561 11562// GoString returns the string representation 11563func (s ResourceInUseException) GoString() string { 11564 return s.String() 11565} 11566 11567func newErrorResourceInUseException(v protocol.ResponseMetadata) error { 11568 return &ResourceInUseException{ 11569 respMetadata: v, 11570 } 11571} 11572 11573// Code returns the exception type name. 11574func (s ResourceInUseException) Code() string { 11575 return "ResourceInUseException" 11576} 11577 11578// Message returns the exception's message. 11579func (s ResourceInUseException) Message() string { 11580 if s.Message_ != nil { 11581 return *s.Message_ 11582 } 11583 return "" 11584} 11585 11586// OrigErr always returns nil, satisfies awserr.Error interface. 11587func (s ResourceInUseException) OrigErr() error { 11588 return nil 11589} 11590 11591func (s ResourceInUseException) Error() string { 11592 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 11593} 11594 11595// Status code returns the HTTP status code for the request's response error. 11596func (s ResourceInUseException) StatusCode() int { 11597 return s.respMetadata.StatusCode 11598} 11599 11600// RequestID returns the service's response RequestID for request. 11601func (s ResourceInUseException) RequestID() string { 11602 return s.respMetadata.RequestID 11603} 11604 11605// The maximum number of recognizers per account has been exceeded. Review the 11606// recognizers, perform cleanup, and then try your request again. 11607type ResourceLimitExceededException struct { 11608 _ struct{} `type:"structure"` 11609 respMetadata protocol.ResponseMetadata 11610 11611 Message_ *string `locationName:"Message" min:"1" type:"string"` 11612} 11613 11614// String returns the string representation 11615func (s ResourceLimitExceededException) String() string { 11616 return awsutil.Prettify(s) 11617} 11618 11619// GoString returns the string representation 11620func (s ResourceLimitExceededException) GoString() string { 11621 return s.String() 11622} 11623 11624func newErrorResourceLimitExceededException(v protocol.ResponseMetadata) error { 11625 return &ResourceLimitExceededException{ 11626 respMetadata: v, 11627 } 11628} 11629 11630// Code returns the exception type name. 11631func (s ResourceLimitExceededException) Code() string { 11632 return "ResourceLimitExceededException" 11633} 11634 11635// Message returns the exception's message. 11636func (s ResourceLimitExceededException) Message() string { 11637 if s.Message_ != nil { 11638 return *s.Message_ 11639 } 11640 return "" 11641} 11642 11643// OrigErr always returns nil, satisfies awserr.Error interface. 11644func (s ResourceLimitExceededException) OrigErr() error { 11645 return nil 11646} 11647 11648func (s ResourceLimitExceededException) Error() string { 11649 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 11650} 11651 11652// Status code returns the HTTP status code for the request's response error. 11653func (s ResourceLimitExceededException) StatusCode() int { 11654 return s.respMetadata.StatusCode 11655} 11656 11657// RequestID returns the service's response RequestID for request. 11658func (s ResourceLimitExceededException) RequestID() string { 11659 return s.respMetadata.RequestID 11660} 11661 11662// The specified resource ARN was not found. Check the ARN and try your request 11663// again. 11664type ResourceNotFoundException struct { 11665 _ struct{} `type:"structure"` 11666 respMetadata protocol.ResponseMetadata 11667 11668 Message_ *string `locationName:"Message" min:"1" type:"string"` 11669} 11670 11671// String returns the string representation 11672func (s ResourceNotFoundException) String() string { 11673 return awsutil.Prettify(s) 11674} 11675 11676// GoString returns the string representation 11677func (s ResourceNotFoundException) GoString() string { 11678 return s.String() 11679} 11680 11681func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 11682 return &ResourceNotFoundException{ 11683 respMetadata: v, 11684 } 11685} 11686 11687// Code returns the exception type name. 11688func (s ResourceNotFoundException) Code() string { 11689 return "ResourceNotFoundException" 11690} 11691 11692// Message returns the exception's message. 11693func (s ResourceNotFoundException) Message() string { 11694 if s.Message_ != nil { 11695 return *s.Message_ 11696 } 11697 return "" 11698} 11699 11700// OrigErr always returns nil, satisfies awserr.Error interface. 11701func (s ResourceNotFoundException) OrigErr() error { 11702 return nil 11703} 11704 11705func (s ResourceNotFoundException) Error() string { 11706 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 11707} 11708 11709// Status code returns the HTTP status code for the request's response error. 11710func (s ResourceNotFoundException) StatusCode() int { 11711 return s.respMetadata.StatusCode 11712} 11713 11714// RequestID returns the service's response RequestID for request. 11715func (s ResourceNotFoundException) RequestID() string { 11716 return s.respMetadata.RequestID 11717} 11718 11719// The specified resource is not available. Check to see if the resource is 11720// in the TRAINED state and try your request again. 11721type ResourceUnavailableException struct { 11722 _ struct{} `type:"structure"` 11723 respMetadata protocol.ResponseMetadata 11724 11725 Message_ *string `locationName:"Message" min:"1" type:"string"` 11726} 11727 11728// String returns the string representation 11729func (s ResourceUnavailableException) String() string { 11730 return awsutil.Prettify(s) 11731} 11732 11733// GoString returns the string representation 11734func (s ResourceUnavailableException) GoString() string { 11735 return s.String() 11736} 11737 11738func newErrorResourceUnavailableException(v protocol.ResponseMetadata) error { 11739 return &ResourceUnavailableException{ 11740 respMetadata: v, 11741 } 11742} 11743 11744// Code returns the exception type name. 11745func (s ResourceUnavailableException) Code() string { 11746 return "ResourceUnavailableException" 11747} 11748 11749// Message returns the exception's message. 11750func (s ResourceUnavailableException) Message() string { 11751 if s.Message_ != nil { 11752 return *s.Message_ 11753 } 11754 return "" 11755} 11756 11757// OrigErr always returns nil, satisfies awserr.Error interface. 11758func (s ResourceUnavailableException) OrigErr() error { 11759 return nil 11760} 11761 11762func (s ResourceUnavailableException) Error() string { 11763 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 11764} 11765 11766// Status code returns the HTTP status code for the request's response error. 11767func (s ResourceUnavailableException) StatusCode() int { 11768 return s.respMetadata.StatusCode 11769} 11770 11771// RequestID returns the service's response RequestID for request. 11772func (s ResourceUnavailableException) RequestID() string { 11773 return s.respMetadata.RequestID 11774} 11775 11776// Provides information for filtering a list of dominant language detection 11777// jobs. For more information, see the operation. 11778type SentimentDetectionJobFilter struct { 11779 _ struct{} `type:"structure"` 11780 11781 // Filters on the name of the job. 11782 JobName *string `min:"1" type:"string"` 11783 11784 // Filters the list of jobs based on job status. Returns only jobs with the 11785 // specified status. 11786 JobStatus *string `type:"string" enum:"JobStatus"` 11787 11788 // Filters the list of jobs based on the time that the job was submitted for 11789 // processing. Returns only jobs submitted after the specified time. Jobs are 11790 // returned in descending order, newest to oldest. 11791 SubmitTimeAfter *time.Time `type:"timestamp"` 11792 11793 // Filters the list of jobs based on the time that the job was submitted for 11794 // processing. Returns only jobs submitted before the specified time. Jobs are 11795 // returned in ascending order, oldest to newest. 11796 SubmitTimeBefore *time.Time `type:"timestamp"` 11797} 11798 11799// String returns the string representation 11800func (s SentimentDetectionJobFilter) String() string { 11801 return awsutil.Prettify(s) 11802} 11803 11804// GoString returns the string representation 11805func (s SentimentDetectionJobFilter) GoString() string { 11806 return s.String() 11807} 11808 11809// Validate inspects the fields of the type to determine if they are valid. 11810func (s *SentimentDetectionJobFilter) Validate() error { 11811 invalidParams := request.ErrInvalidParams{Context: "SentimentDetectionJobFilter"} 11812 if s.JobName != nil && len(*s.JobName) < 1 { 11813 invalidParams.Add(request.NewErrParamMinLen("JobName", 1)) 11814 } 11815 11816 if invalidParams.Len() > 0 { 11817 return invalidParams 11818 } 11819 return nil 11820} 11821 11822// SetJobName sets the JobName field's value. 11823func (s *SentimentDetectionJobFilter) SetJobName(v string) *SentimentDetectionJobFilter { 11824 s.JobName = &v 11825 return s 11826} 11827 11828// SetJobStatus sets the JobStatus field's value. 11829func (s *SentimentDetectionJobFilter) SetJobStatus(v string) *SentimentDetectionJobFilter { 11830 s.JobStatus = &v 11831 return s 11832} 11833 11834// SetSubmitTimeAfter sets the SubmitTimeAfter field's value. 11835func (s *SentimentDetectionJobFilter) SetSubmitTimeAfter(v time.Time) *SentimentDetectionJobFilter { 11836 s.SubmitTimeAfter = &v 11837 return s 11838} 11839 11840// SetSubmitTimeBefore sets the SubmitTimeBefore field's value. 11841func (s *SentimentDetectionJobFilter) SetSubmitTimeBefore(v time.Time) *SentimentDetectionJobFilter { 11842 s.SubmitTimeBefore = &v 11843 return s 11844} 11845 11846// Provides information about a sentiment detection job. 11847type SentimentDetectionJobProperties struct { 11848 _ struct{} `type:"structure"` 11849 11850 // The Amazon Resource Name (ARN) that gives Amazon Comprehend read access to 11851 // your input data. 11852 DataAccessRoleArn *string `min:"20" type:"string"` 11853 11854 // The time that the sentiment detection job ended. 11855 EndTime *time.Time `type:"timestamp"` 11856 11857 // The input data configuration that you supplied when you created the sentiment 11858 // detection job. 11859 InputDataConfig *InputDataConfig `type:"structure"` 11860 11861 // The identifier assigned to the sentiment detection job. 11862 JobId *string `min:"1" type:"string"` 11863 11864 // The name that you assigned to the sentiment detection job 11865 JobName *string `min:"1" type:"string"` 11866 11867 // The current status of the sentiment detection job. If the status is FAILED, 11868 // the Messages field shows the reason for the failure. 11869 JobStatus *string `type:"string" enum:"JobStatus"` 11870 11871 // The language code of the input documents. 11872 LanguageCode *string `type:"string" enum:"LanguageCode"` 11873 11874 // A description of the status of a job. 11875 Message *string `type:"string"` 11876 11877 // The output data configuration that you supplied when you created the sentiment 11878 // detection job. 11879 OutputDataConfig *OutputDataConfig `type:"structure"` 11880 11881 // The time that the sentiment detection job was submitted for processing. 11882 SubmitTime *time.Time `type:"timestamp"` 11883 11884 // ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses 11885 // to encrypt data on the storage volume attached to the ML compute instance(s) 11886 // that process the analysis job. The VolumeKmsKeyId can be either of the following 11887 // formats: 11888 // 11889 // * KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab" 11890 // 11891 // * Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" 11892 VolumeKmsKeyId *string `type:"string"` 11893 11894 // Configuration parameters for a private Virtual Private Cloud (VPC) containing 11895 // the resources you are using for your sentiment detection job. For more information, 11896 // see Amazon VPC (https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html). 11897 VpcConfig *VpcConfig `type:"structure"` 11898} 11899 11900// String returns the string representation 11901func (s SentimentDetectionJobProperties) String() string { 11902 return awsutil.Prettify(s) 11903} 11904 11905// GoString returns the string representation 11906func (s SentimentDetectionJobProperties) GoString() string { 11907 return s.String() 11908} 11909 11910// SetDataAccessRoleArn sets the DataAccessRoleArn field's value. 11911func (s *SentimentDetectionJobProperties) SetDataAccessRoleArn(v string) *SentimentDetectionJobProperties { 11912 s.DataAccessRoleArn = &v 11913 return s 11914} 11915 11916// SetEndTime sets the EndTime field's value. 11917func (s *SentimentDetectionJobProperties) SetEndTime(v time.Time) *SentimentDetectionJobProperties { 11918 s.EndTime = &v 11919 return s 11920} 11921 11922// SetInputDataConfig sets the InputDataConfig field's value. 11923func (s *SentimentDetectionJobProperties) SetInputDataConfig(v *InputDataConfig) *SentimentDetectionJobProperties { 11924 s.InputDataConfig = v 11925 return s 11926} 11927 11928// SetJobId sets the JobId field's value. 11929func (s *SentimentDetectionJobProperties) SetJobId(v string) *SentimentDetectionJobProperties { 11930 s.JobId = &v 11931 return s 11932} 11933 11934// SetJobName sets the JobName field's value. 11935func (s *SentimentDetectionJobProperties) SetJobName(v string) *SentimentDetectionJobProperties { 11936 s.JobName = &v 11937 return s 11938} 11939 11940// SetJobStatus sets the JobStatus field's value. 11941func (s *SentimentDetectionJobProperties) SetJobStatus(v string) *SentimentDetectionJobProperties { 11942 s.JobStatus = &v 11943 return s 11944} 11945 11946// SetLanguageCode sets the LanguageCode field's value. 11947func (s *SentimentDetectionJobProperties) SetLanguageCode(v string) *SentimentDetectionJobProperties { 11948 s.LanguageCode = &v 11949 return s 11950} 11951 11952// SetMessage sets the Message field's value. 11953func (s *SentimentDetectionJobProperties) SetMessage(v string) *SentimentDetectionJobProperties { 11954 s.Message = &v 11955 return s 11956} 11957 11958// SetOutputDataConfig sets the OutputDataConfig field's value. 11959func (s *SentimentDetectionJobProperties) SetOutputDataConfig(v *OutputDataConfig) *SentimentDetectionJobProperties { 11960 s.OutputDataConfig = v 11961 return s 11962} 11963 11964// SetSubmitTime sets the SubmitTime field's value. 11965func (s *SentimentDetectionJobProperties) SetSubmitTime(v time.Time) *SentimentDetectionJobProperties { 11966 s.SubmitTime = &v 11967 return s 11968} 11969 11970// SetVolumeKmsKeyId sets the VolumeKmsKeyId field's value. 11971func (s *SentimentDetectionJobProperties) SetVolumeKmsKeyId(v string) *SentimentDetectionJobProperties { 11972 s.VolumeKmsKeyId = &v 11973 return s 11974} 11975 11976// SetVpcConfig sets the VpcConfig field's value. 11977func (s *SentimentDetectionJobProperties) SetVpcConfig(v *VpcConfig) *SentimentDetectionJobProperties { 11978 s.VpcConfig = v 11979 return s 11980} 11981 11982// Describes the level of confidence that Amazon Comprehend has in the accuracy 11983// of its detection of sentiments. 11984type SentimentScore struct { 11985 _ struct{} `type:"structure"` 11986 11987 // The level of confidence that Amazon Comprehend has in the accuracy of its 11988 // detection of the MIXED sentiment. 11989 Mixed *float64 `type:"float"` 11990 11991 // The level of confidence that Amazon Comprehend has in the accuracy of its 11992 // detection of the NEGATIVE sentiment. 11993 Negative *float64 `type:"float"` 11994 11995 // The level of confidence that Amazon Comprehend has in the accuracy of its 11996 // detection of the NEUTRAL sentiment. 11997 Neutral *float64 `type:"float"` 11998 11999 // The level of confidence that Amazon Comprehend has in the accuracy of its 12000 // detection of the POSITIVE sentiment. 12001 Positive *float64 `type:"float"` 12002} 12003 12004// String returns the string representation 12005func (s SentimentScore) String() string { 12006 return awsutil.Prettify(s) 12007} 12008 12009// GoString returns the string representation 12010func (s SentimentScore) GoString() string { 12011 return s.String() 12012} 12013 12014// SetMixed sets the Mixed field's value. 12015func (s *SentimentScore) SetMixed(v float64) *SentimentScore { 12016 s.Mixed = &v 12017 return s 12018} 12019 12020// SetNegative sets the Negative field's value. 12021func (s *SentimentScore) SetNegative(v float64) *SentimentScore { 12022 s.Negative = &v 12023 return s 12024} 12025 12026// SetNeutral sets the Neutral field's value. 12027func (s *SentimentScore) SetNeutral(v float64) *SentimentScore { 12028 s.Neutral = &v 12029 return s 12030} 12031 12032// SetPositive sets the Positive field's value. 12033func (s *SentimentScore) SetPositive(v float64) *SentimentScore { 12034 s.Positive = &v 12035 return s 12036} 12037 12038type StartDocumentClassificationJobInput struct { 12039 _ struct{} `type:"structure"` 12040 12041 // A unique identifier for the request. If you do not set the client request 12042 // token, Amazon Comprehend generates one. 12043 ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` 12044 12045 // The Amazon Resource Name (ARN) of the AWS Identity and Access Management 12046 // (IAM) role that grants Amazon Comprehend read access to your input data. 12047 // 12048 // DataAccessRoleArn is a required field 12049 DataAccessRoleArn *string `min:"20" type:"string" required:"true"` 12050 12051 // The Amazon Resource Name (ARN) of the document classifier to use to process 12052 // the job. 12053 // 12054 // DocumentClassifierArn is a required field 12055 DocumentClassifierArn *string `type:"string" required:"true"` 12056 12057 // Specifies the format and location of the input data for the job. 12058 // 12059 // InputDataConfig is a required field 12060 InputDataConfig *InputDataConfig `type:"structure" required:"true"` 12061 12062 // The identifier of the job. 12063 JobName *string `min:"1" type:"string"` 12064 12065 // Specifies where to send the output files. 12066 // 12067 // OutputDataConfig is a required field 12068 OutputDataConfig *OutputDataConfig `type:"structure" required:"true"` 12069 12070 // ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses 12071 // to encrypt data on the storage volume attached to the ML compute instance(s) 12072 // that process the analysis job. The VolumeKmsKeyId can be either of the following 12073 // formats: 12074 // 12075 // * KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab" 12076 // 12077 // * Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" 12078 VolumeKmsKeyId *string `type:"string"` 12079 12080 // Configuration parameters for an optional private Virtual Private Cloud (VPC) 12081 // containing the resources you are using for your document classification job. 12082 // For more information, see Amazon VPC (https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html). 12083 VpcConfig *VpcConfig `type:"structure"` 12084} 12085 12086// String returns the string representation 12087func (s StartDocumentClassificationJobInput) String() string { 12088 return awsutil.Prettify(s) 12089} 12090 12091// GoString returns the string representation 12092func (s StartDocumentClassificationJobInput) GoString() string { 12093 return s.String() 12094} 12095 12096// Validate inspects the fields of the type to determine if they are valid. 12097func (s *StartDocumentClassificationJobInput) Validate() error { 12098 invalidParams := request.ErrInvalidParams{Context: "StartDocumentClassificationJobInput"} 12099 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { 12100 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) 12101 } 12102 if s.DataAccessRoleArn == nil { 12103 invalidParams.Add(request.NewErrParamRequired("DataAccessRoleArn")) 12104 } 12105 if s.DataAccessRoleArn != nil && len(*s.DataAccessRoleArn) < 20 { 12106 invalidParams.Add(request.NewErrParamMinLen("DataAccessRoleArn", 20)) 12107 } 12108 if s.DocumentClassifierArn == nil { 12109 invalidParams.Add(request.NewErrParamRequired("DocumentClassifierArn")) 12110 } 12111 if s.InputDataConfig == nil { 12112 invalidParams.Add(request.NewErrParamRequired("InputDataConfig")) 12113 } 12114 if s.JobName != nil && len(*s.JobName) < 1 { 12115 invalidParams.Add(request.NewErrParamMinLen("JobName", 1)) 12116 } 12117 if s.OutputDataConfig == nil { 12118 invalidParams.Add(request.NewErrParamRequired("OutputDataConfig")) 12119 } 12120 if s.InputDataConfig != nil { 12121 if err := s.InputDataConfig.Validate(); err != nil { 12122 invalidParams.AddNested("InputDataConfig", err.(request.ErrInvalidParams)) 12123 } 12124 } 12125 if s.OutputDataConfig != nil { 12126 if err := s.OutputDataConfig.Validate(); err != nil { 12127 invalidParams.AddNested("OutputDataConfig", err.(request.ErrInvalidParams)) 12128 } 12129 } 12130 if s.VpcConfig != nil { 12131 if err := s.VpcConfig.Validate(); err != nil { 12132 invalidParams.AddNested("VpcConfig", err.(request.ErrInvalidParams)) 12133 } 12134 } 12135 12136 if invalidParams.Len() > 0 { 12137 return invalidParams 12138 } 12139 return nil 12140} 12141 12142// SetClientRequestToken sets the ClientRequestToken field's value. 12143func (s *StartDocumentClassificationJobInput) SetClientRequestToken(v string) *StartDocumentClassificationJobInput { 12144 s.ClientRequestToken = &v 12145 return s 12146} 12147 12148// SetDataAccessRoleArn sets the DataAccessRoleArn field's value. 12149func (s *StartDocumentClassificationJobInput) SetDataAccessRoleArn(v string) *StartDocumentClassificationJobInput { 12150 s.DataAccessRoleArn = &v 12151 return s 12152} 12153 12154// SetDocumentClassifierArn sets the DocumentClassifierArn field's value. 12155func (s *StartDocumentClassificationJobInput) SetDocumentClassifierArn(v string) *StartDocumentClassificationJobInput { 12156 s.DocumentClassifierArn = &v 12157 return s 12158} 12159 12160// SetInputDataConfig sets the InputDataConfig field's value. 12161func (s *StartDocumentClassificationJobInput) SetInputDataConfig(v *InputDataConfig) *StartDocumentClassificationJobInput { 12162 s.InputDataConfig = v 12163 return s 12164} 12165 12166// SetJobName sets the JobName field's value. 12167func (s *StartDocumentClassificationJobInput) SetJobName(v string) *StartDocumentClassificationJobInput { 12168 s.JobName = &v 12169 return s 12170} 12171 12172// SetOutputDataConfig sets the OutputDataConfig field's value. 12173func (s *StartDocumentClassificationJobInput) SetOutputDataConfig(v *OutputDataConfig) *StartDocumentClassificationJobInput { 12174 s.OutputDataConfig = v 12175 return s 12176} 12177 12178// SetVolumeKmsKeyId sets the VolumeKmsKeyId field's value. 12179func (s *StartDocumentClassificationJobInput) SetVolumeKmsKeyId(v string) *StartDocumentClassificationJobInput { 12180 s.VolumeKmsKeyId = &v 12181 return s 12182} 12183 12184// SetVpcConfig sets the VpcConfig field's value. 12185func (s *StartDocumentClassificationJobInput) SetVpcConfig(v *VpcConfig) *StartDocumentClassificationJobInput { 12186 s.VpcConfig = v 12187 return s 12188} 12189 12190type StartDocumentClassificationJobOutput struct { 12191 _ struct{} `type:"structure"` 12192 12193 // The identifier generated for the job. To get the status of the job, use this 12194 // identifier with the operation. 12195 JobId *string `min:"1" type:"string"` 12196 12197 // The status of the job: 12198 // 12199 // * SUBMITTED - The job has been received and queued for processing. 12200 // 12201 // * IN_PROGRESS - Amazon Comprehend is processing the job. 12202 // 12203 // * COMPLETED - The job was successfully completed and the output is available. 12204 // 12205 // * FAILED - The job did not complete. For details, use the operation. 12206 // 12207 // * STOP_REQUESTED - Amazon Comprehend has received a stop request for the 12208 // job and is processing the request. 12209 // 12210 // * STOPPED - The job was successfully stopped without completing. 12211 JobStatus *string `type:"string" enum:"JobStatus"` 12212} 12213 12214// String returns the string representation 12215func (s StartDocumentClassificationJobOutput) String() string { 12216 return awsutil.Prettify(s) 12217} 12218 12219// GoString returns the string representation 12220func (s StartDocumentClassificationJobOutput) GoString() string { 12221 return s.String() 12222} 12223 12224// SetJobId sets the JobId field's value. 12225func (s *StartDocumentClassificationJobOutput) SetJobId(v string) *StartDocumentClassificationJobOutput { 12226 s.JobId = &v 12227 return s 12228} 12229 12230// SetJobStatus sets the JobStatus field's value. 12231func (s *StartDocumentClassificationJobOutput) SetJobStatus(v string) *StartDocumentClassificationJobOutput { 12232 s.JobStatus = &v 12233 return s 12234} 12235 12236type StartDominantLanguageDetectionJobInput struct { 12237 _ struct{} `type:"structure"` 12238 12239 // A unique identifier for the request. If you do not set the client request 12240 // token, Amazon Comprehend generates one. 12241 ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` 12242 12243 // The Amazon Resource Name (ARN) of the AWS Identity and Access Management 12244 // (IAM) role that grants Amazon Comprehend read access to your input data. 12245 // For more information, see https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions 12246 // (https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions). 12247 // 12248 // DataAccessRoleArn is a required field 12249 DataAccessRoleArn *string `min:"20" type:"string" required:"true"` 12250 12251 // Specifies the format and location of the input data for the job. 12252 // 12253 // InputDataConfig is a required field 12254 InputDataConfig *InputDataConfig `type:"structure" required:"true"` 12255 12256 // An identifier for the job. 12257 JobName *string `min:"1" type:"string"` 12258 12259 // Specifies where to send the output files. 12260 // 12261 // OutputDataConfig is a required field 12262 OutputDataConfig *OutputDataConfig `type:"structure" required:"true"` 12263 12264 // ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses 12265 // to encrypt data on the storage volume attached to the ML compute instance(s) 12266 // that process the analysis job. The VolumeKmsKeyId can be either of the following 12267 // formats: 12268 // 12269 // * KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab" 12270 // 12271 // * Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" 12272 VolumeKmsKeyId *string `type:"string"` 12273 12274 // Configuration parameters for an optional private Virtual Private Cloud (VPC) 12275 // containing the resources you are using for your dominant language detection 12276 // job. For more information, see Amazon VPC (https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html). 12277 VpcConfig *VpcConfig `type:"structure"` 12278} 12279 12280// String returns the string representation 12281func (s StartDominantLanguageDetectionJobInput) String() string { 12282 return awsutil.Prettify(s) 12283} 12284 12285// GoString returns the string representation 12286func (s StartDominantLanguageDetectionJobInput) GoString() string { 12287 return s.String() 12288} 12289 12290// Validate inspects the fields of the type to determine if they are valid. 12291func (s *StartDominantLanguageDetectionJobInput) Validate() error { 12292 invalidParams := request.ErrInvalidParams{Context: "StartDominantLanguageDetectionJobInput"} 12293 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { 12294 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) 12295 } 12296 if s.DataAccessRoleArn == nil { 12297 invalidParams.Add(request.NewErrParamRequired("DataAccessRoleArn")) 12298 } 12299 if s.DataAccessRoleArn != nil && len(*s.DataAccessRoleArn) < 20 { 12300 invalidParams.Add(request.NewErrParamMinLen("DataAccessRoleArn", 20)) 12301 } 12302 if s.InputDataConfig == nil { 12303 invalidParams.Add(request.NewErrParamRequired("InputDataConfig")) 12304 } 12305 if s.JobName != nil && len(*s.JobName) < 1 { 12306 invalidParams.Add(request.NewErrParamMinLen("JobName", 1)) 12307 } 12308 if s.OutputDataConfig == nil { 12309 invalidParams.Add(request.NewErrParamRequired("OutputDataConfig")) 12310 } 12311 if s.InputDataConfig != nil { 12312 if err := s.InputDataConfig.Validate(); err != nil { 12313 invalidParams.AddNested("InputDataConfig", err.(request.ErrInvalidParams)) 12314 } 12315 } 12316 if s.OutputDataConfig != nil { 12317 if err := s.OutputDataConfig.Validate(); err != nil { 12318 invalidParams.AddNested("OutputDataConfig", err.(request.ErrInvalidParams)) 12319 } 12320 } 12321 if s.VpcConfig != nil { 12322 if err := s.VpcConfig.Validate(); err != nil { 12323 invalidParams.AddNested("VpcConfig", err.(request.ErrInvalidParams)) 12324 } 12325 } 12326 12327 if invalidParams.Len() > 0 { 12328 return invalidParams 12329 } 12330 return nil 12331} 12332 12333// SetClientRequestToken sets the ClientRequestToken field's value. 12334func (s *StartDominantLanguageDetectionJobInput) SetClientRequestToken(v string) *StartDominantLanguageDetectionJobInput { 12335 s.ClientRequestToken = &v 12336 return s 12337} 12338 12339// SetDataAccessRoleArn sets the DataAccessRoleArn field's value. 12340func (s *StartDominantLanguageDetectionJobInput) SetDataAccessRoleArn(v string) *StartDominantLanguageDetectionJobInput { 12341 s.DataAccessRoleArn = &v 12342 return s 12343} 12344 12345// SetInputDataConfig sets the InputDataConfig field's value. 12346func (s *StartDominantLanguageDetectionJobInput) SetInputDataConfig(v *InputDataConfig) *StartDominantLanguageDetectionJobInput { 12347 s.InputDataConfig = v 12348 return s 12349} 12350 12351// SetJobName sets the JobName field's value. 12352func (s *StartDominantLanguageDetectionJobInput) SetJobName(v string) *StartDominantLanguageDetectionJobInput { 12353 s.JobName = &v 12354 return s 12355} 12356 12357// SetOutputDataConfig sets the OutputDataConfig field's value. 12358func (s *StartDominantLanguageDetectionJobInput) SetOutputDataConfig(v *OutputDataConfig) *StartDominantLanguageDetectionJobInput { 12359 s.OutputDataConfig = v 12360 return s 12361} 12362 12363// SetVolumeKmsKeyId sets the VolumeKmsKeyId field's value. 12364func (s *StartDominantLanguageDetectionJobInput) SetVolumeKmsKeyId(v string) *StartDominantLanguageDetectionJobInput { 12365 s.VolumeKmsKeyId = &v 12366 return s 12367} 12368 12369// SetVpcConfig sets the VpcConfig field's value. 12370func (s *StartDominantLanguageDetectionJobInput) SetVpcConfig(v *VpcConfig) *StartDominantLanguageDetectionJobInput { 12371 s.VpcConfig = v 12372 return s 12373} 12374 12375type StartDominantLanguageDetectionJobOutput struct { 12376 _ struct{} `type:"structure"` 12377 12378 // The identifier generated for the job. To get the status of a job, use this 12379 // identifier with the operation. 12380 JobId *string `min:"1" type:"string"` 12381 12382 // The status of the job. 12383 // 12384 // * SUBMITTED - The job has been received and is queued for processing. 12385 // 12386 // * IN_PROGRESS - Amazon Comprehend is processing the job. 12387 // 12388 // * COMPLETED - The job was successfully completed and the output is available. 12389 // 12390 // * FAILED - The job did not complete. To get details, use the operation. 12391 JobStatus *string `type:"string" enum:"JobStatus"` 12392} 12393 12394// String returns the string representation 12395func (s StartDominantLanguageDetectionJobOutput) String() string { 12396 return awsutil.Prettify(s) 12397} 12398 12399// GoString returns the string representation 12400func (s StartDominantLanguageDetectionJobOutput) GoString() string { 12401 return s.String() 12402} 12403 12404// SetJobId sets the JobId field's value. 12405func (s *StartDominantLanguageDetectionJobOutput) SetJobId(v string) *StartDominantLanguageDetectionJobOutput { 12406 s.JobId = &v 12407 return s 12408} 12409 12410// SetJobStatus sets the JobStatus field's value. 12411func (s *StartDominantLanguageDetectionJobOutput) SetJobStatus(v string) *StartDominantLanguageDetectionJobOutput { 12412 s.JobStatus = &v 12413 return s 12414} 12415 12416type StartEntitiesDetectionJobInput struct { 12417 _ struct{} `type:"structure"` 12418 12419 // A unique identifier for the request. If you don't set the client request 12420 // token, Amazon Comprehend generates one. 12421 ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` 12422 12423 // The Amazon Resource Name (ARN) of the AWS Identity and Access Management 12424 // (IAM) role that grants Amazon Comprehend read access to your input data. 12425 // For more information, see https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions 12426 // (https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions). 12427 // 12428 // DataAccessRoleArn is a required field 12429 DataAccessRoleArn *string `min:"20" type:"string" required:"true"` 12430 12431 // The Amazon Resource Name (ARN) that identifies the specific entity recognizer 12432 // to be used by the StartEntitiesDetectionJob. This ARN is optional and is 12433 // only used for a custom entity recognition job. 12434 EntityRecognizerArn *string `type:"string"` 12435 12436 // Specifies the format and location of the input data for the job. 12437 // 12438 // InputDataConfig is a required field 12439 InputDataConfig *InputDataConfig `type:"structure" required:"true"` 12440 12441 // The identifier of the job. 12442 JobName *string `min:"1" type:"string"` 12443 12444 // The language of the input documents. All documents must be in the same language. 12445 // You can specify any of the languages supported by Amazon Comprehend. If custom 12446 // entities recognition is used, this parameter is ignored and the language 12447 // used for training the model is used instead. 12448 // 12449 // LanguageCode is a required field 12450 LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"` 12451 12452 // Specifies where to send the output files. 12453 // 12454 // OutputDataConfig is a required field 12455 OutputDataConfig *OutputDataConfig `type:"structure" required:"true"` 12456 12457 // ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses 12458 // to encrypt data on the storage volume attached to the ML compute instance(s) 12459 // that process the analysis job. The VolumeKmsKeyId can be either of the following 12460 // formats: 12461 // 12462 // * KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab" 12463 // 12464 // * Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" 12465 VolumeKmsKeyId *string `type:"string"` 12466 12467 // Configuration parameters for an optional private Virtual Private Cloud (VPC) 12468 // containing the resources you are using for your entity detection job. For 12469 // more information, see Amazon VPC (https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html). 12470 VpcConfig *VpcConfig `type:"structure"` 12471} 12472 12473// String returns the string representation 12474func (s StartEntitiesDetectionJobInput) String() string { 12475 return awsutil.Prettify(s) 12476} 12477 12478// GoString returns the string representation 12479func (s StartEntitiesDetectionJobInput) GoString() string { 12480 return s.String() 12481} 12482 12483// Validate inspects the fields of the type to determine if they are valid. 12484func (s *StartEntitiesDetectionJobInput) Validate() error { 12485 invalidParams := request.ErrInvalidParams{Context: "StartEntitiesDetectionJobInput"} 12486 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { 12487 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) 12488 } 12489 if s.DataAccessRoleArn == nil { 12490 invalidParams.Add(request.NewErrParamRequired("DataAccessRoleArn")) 12491 } 12492 if s.DataAccessRoleArn != nil && len(*s.DataAccessRoleArn) < 20 { 12493 invalidParams.Add(request.NewErrParamMinLen("DataAccessRoleArn", 20)) 12494 } 12495 if s.InputDataConfig == nil { 12496 invalidParams.Add(request.NewErrParamRequired("InputDataConfig")) 12497 } 12498 if s.JobName != nil && len(*s.JobName) < 1 { 12499 invalidParams.Add(request.NewErrParamMinLen("JobName", 1)) 12500 } 12501 if s.LanguageCode == nil { 12502 invalidParams.Add(request.NewErrParamRequired("LanguageCode")) 12503 } 12504 if s.OutputDataConfig == nil { 12505 invalidParams.Add(request.NewErrParamRequired("OutputDataConfig")) 12506 } 12507 if s.InputDataConfig != nil { 12508 if err := s.InputDataConfig.Validate(); err != nil { 12509 invalidParams.AddNested("InputDataConfig", err.(request.ErrInvalidParams)) 12510 } 12511 } 12512 if s.OutputDataConfig != nil { 12513 if err := s.OutputDataConfig.Validate(); err != nil { 12514 invalidParams.AddNested("OutputDataConfig", err.(request.ErrInvalidParams)) 12515 } 12516 } 12517 if s.VpcConfig != nil { 12518 if err := s.VpcConfig.Validate(); err != nil { 12519 invalidParams.AddNested("VpcConfig", err.(request.ErrInvalidParams)) 12520 } 12521 } 12522 12523 if invalidParams.Len() > 0 { 12524 return invalidParams 12525 } 12526 return nil 12527} 12528 12529// SetClientRequestToken sets the ClientRequestToken field's value. 12530func (s *StartEntitiesDetectionJobInput) SetClientRequestToken(v string) *StartEntitiesDetectionJobInput { 12531 s.ClientRequestToken = &v 12532 return s 12533} 12534 12535// SetDataAccessRoleArn sets the DataAccessRoleArn field's value. 12536func (s *StartEntitiesDetectionJobInput) SetDataAccessRoleArn(v string) *StartEntitiesDetectionJobInput { 12537 s.DataAccessRoleArn = &v 12538 return s 12539} 12540 12541// SetEntityRecognizerArn sets the EntityRecognizerArn field's value. 12542func (s *StartEntitiesDetectionJobInput) SetEntityRecognizerArn(v string) *StartEntitiesDetectionJobInput { 12543 s.EntityRecognizerArn = &v 12544 return s 12545} 12546 12547// SetInputDataConfig sets the InputDataConfig field's value. 12548func (s *StartEntitiesDetectionJobInput) SetInputDataConfig(v *InputDataConfig) *StartEntitiesDetectionJobInput { 12549 s.InputDataConfig = v 12550 return s 12551} 12552 12553// SetJobName sets the JobName field's value. 12554func (s *StartEntitiesDetectionJobInput) SetJobName(v string) *StartEntitiesDetectionJobInput { 12555 s.JobName = &v 12556 return s 12557} 12558 12559// SetLanguageCode sets the LanguageCode field's value. 12560func (s *StartEntitiesDetectionJobInput) SetLanguageCode(v string) *StartEntitiesDetectionJobInput { 12561 s.LanguageCode = &v 12562 return s 12563} 12564 12565// SetOutputDataConfig sets the OutputDataConfig field's value. 12566func (s *StartEntitiesDetectionJobInput) SetOutputDataConfig(v *OutputDataConfig) *StartEntitiesDetectionJobInput { 12567 s.OutputDataConfig = v 12568 return s 12569} 12570 12571// SetVolumeKmsKeyId sets the VolumeKmsKeyId field's value. 12572func (s *StartEntitiesDetectionJobInput) SetVolumeKmsKeyId(v string) *StartEntitiesDetectionJobInput { 12573 s.VolumeKmsKeyId = &v 12574 return s 12575} 12576 12577// SetVpcConfig sets the VpcConfig field's value. 12578func (s *StartEntitiesDetectionJobInput) SetVpcConfig(v *VpcConfig) *StartEntitiesDetectionJobInput { 12579 s.VpcConfig = v 12580 return s 12581} 12582 12583type StartEntitiesDetectionJobOutput struct { 12584 _ struct{} `type:"structure"` 12585 12586 // The identifier generated for the job. To get the status of job, use this 12587 // identifier with the operation. 12588 JobId *string `min:"1" type:"string"` 12589 12590 // The status of the job. 12591 // 12592 // * SUBMITTED - The job has been received and is queued for processing. 12593 // 12594 // * IN_PROGRESS - Amazon Comprehend is processing the job. 12595 // 12596 // * COMPLETED - The job was successfully completed and the output is available. 12597 // 12598 // * FAILED - The job did not complete. To get details, use the operation. 12599 // 12600 // * STOP_REQUESTED - Amazon Comprehend has received a stop request for the 12601 // job and is processing the request. 12602 // 12603 // * STOPPED - The job was successfully stopped without completing. 12604 JobStatus *string `type:"string" enum:"JobStatus"` 12605} 12606 12607// String returns the string representation 12608func (s StartEntitiesDetectionJobOutput) String() string { 12609 return awsutil.Prettify(s) 12610} 12611 12612// GoString returns the string representation 12613func (s StartEntitiesDetectionJobOutput) GoString() string { 12614 return s.String() 12615} 12616 12617// SetJobId sets the JobId field's value. 12618func (s *StartEntitiesDetectionJobOutput) SetJobId(v string) *StartEntitiesDetectionJobOutput { 12619 s.JobId = &v 12620 return s 12621} 12622 12623// SetJobStatus sets the JobStatus field's value. 12624func (s *StartEntitiesDetectionJobOutput) SetJobStatus(v string) *StartEntitiesDetectionJobOutput { 12625 s.JobStatus = &v 12626 return s 12627} 12628 12629type StartKeyPhrasesDetectionJobInput struct { 12630 _ struct{} `type:"structure"` 12631 12632 // A unique identifier for the request. If you don't set the client request 12633 // token, Amazon Comprehend generates one. 12634 ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` 12635 12636 // The Amazon Resource Name (ARN) of the AWS Identity and Access Management 12637 // (IAM) role that grants Amazon Comprehend read access to your input data. 12638 // For more information, see https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions 12639 // (https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions). 12640 // 12641 // DataAccessRoleArn is a required field 12642 DataAccessRoleArn *string `min:"20" type:"string" required:"true"` 12643 12644 // Specifies the format and location of the input data for the job. 12645 // 12646 // InputDataConfig is a required field 12647 InputDataConfig *InputDataConfig `type:"structure" required:"true"` 12648 12649 // The identifier of the job. 12650 JobName *string `min:"1" type:"string"` 12651 12652 // The language of the input documents. You can specify any of the primary languages 12653 // supported by Amazon Comprehend. All documents must be in the same language. 12654 // 12655 // LanguageCode is a required field 12656 LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"` 12657 12658 // Specifies where to send the output files. 12659 // 12660 // OutputDataConfig is a required field 12661 OutputDataConfig *OutputDataConfig `type:"structure" required:"true"` 12662 12663 // ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses 12664 // to encrypt data on the storage volume attached to the ML compute instance(s) 12665 // that process the analysis job. The VolumeKmsKeyId can be either of the following 12666 // formats: 12667 // 12668 // * KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab" 12669 // 12670 // * Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" 12671 VolumeKmsKeyId *string `type:"string"` 12672 12673 // Configuration parameters for an optional private Virtual Private Cloud (VPC) 12674 // containing the resources you are using for your key phrases detection job. 12675 // For more information, see Amazon VPC (https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html). 12676 VpcConfig *VpcConfig `type:"structure"` 12677} 12678 12679// String returns the string representation 12680func (s StartKeyPhrasesDetectionJobInput) String() string { 12681 return awsutil.Prettify(s) 12682} 12683 12684// GoString returns the string representation 12685func (s StartKeyPhrasesDetectionJobInput) GoString() string { 12686 return s.String() 12687} 12688 12689// Validate inspects the fields of the type to determine if they are valid. 12690func (s *StartKeyPhrasesDetectionJobInput) Validate() error { 12691 invalidParams := request.ErrInvalidParams{Context: "StartKeyPhrasesDetectionJobInput"} 12692 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { 12693 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) 12694 } 12695 if s.DataAccessRoleArn == nil { 12696 invalidParams.Add(request.NewErrParamRequired("DataAccessRoleArn")) 12697 } 12698 if s.DataAccessRoleArn != nil && len(*s.DataAccessRoleArn) < 20 { 12699 invalidParams.Add(request.NewErrParamMinLen("DataAccessRoleArn", 20)) 12700 } 12701 if s.InputDataConfig == nil { 12702 invalidParams.Add(request.NewErrParamRequired("InputDataConfig")) 12703 } 12704 if s.JobName != nil && len(*s.JobName) < 1 { 12705 invalidParams.Add(request.NewErrParamMinLen("JobName", 1)) 12706 } 12707 if s.LanguageCode == nil { 12708 invalidParams.Add(request.NewErrParamRequired("LanguageCode")) 12709 } 12710 if s.OutputDataConfig == nil { 12711 invalidParams.Add(request.NewErrParamRequired("OutputDataConfig")) 12712 } 12713 if s.InputDataConfig != nil { 12714 if err := s.InputDataConfig.Validate(); err != nil { 12715 invalidParams.AddNested("InputDataConfig", err.(request.ErrInvalidParams)) 12716 } 12717 } 12718 if s.OutputDataConfig != nil { 12719 if err := s.OutputDataConfig.Validate(); err != nil { 12720 invalidParams.AddNested("OutputDataConfig", err.(request.ErrInvalidParams)) 12721 } 12722 } 12723 if s.VpcConfig != nil { 12724 if err := s.VpcConfig.Validate(); err != nil { 12725 invalidParams.AddNested("VpcConfig", err.(request.ErrInvalidParams)) 12726 } 12727 } 12728 12729 if invalidParams.Len() > 0 { 12730 return invalidParams 12731 } 12732 return nil 12733} 12734 12735// SetClientRequestToken sets the ClientRequestToken field's value. 12736func (s *StartKeyPhrasesDetectionJobInput) SetClientRequestToken(v string) *StartKeyPhrasesDetectionJobInput { 12737 s.ClientRequestToken = &v 12738 return s 12739} 12740 12741// SetDataAccessRoleArn sets the DataAccessRoleArn field's value. 12742func (s *StartKeyPhrasesDetectionJobInput) SetDataAccessRoleArn(v string) *StartKeyPhrasesDetectionJobInput { 12743 s.DataAccessRoleArn = &v 12744 return s 12745} 12746 12747// SetInputDataConfig sets the InputDataConfig field's value. 12748func (s *StartKeyPhrasesDetectionJobInput) SetInputDataConfig(v *InputDataConfig) *StartKeyPhrasesDetectionJobInput { 12749 s.InputDataConfig = v 12750 return s 12751} 12752 12753// SetJobName sets the JobName field's value. 12754func (s *StartKeyPhrasesDetectionJobInput) SetJobName(v string) *StartKeyPhrasesDetectionJobInput { 12755 s.JobName = &v 12756 return s 12757} 12758 12759// SetLanguageCode sets the LanguageCode field's value. 12760func (s *StartKeyPhrasesDetectionJobInput) SetLanguageCode(v string) *StartKeyPhrasesDetectionJobInput { 12761 s.LanguageCode = &v 12762 return s 12763} 12764 12765// SetOutputDataConfig sets the OutputDataConfig field's value. 12766func (s *StartKeyPhrasesDetectionJobInput) SetOutputDataConfig(v *OutputDataConfig) *StartKeyPhrasesDetectionJobInput { 12767 s.OutputDataConfig = v 12768 return s 12769} 12770 12771// SetVolumeKmsKeyId sets the VolumeKmsKeyId field's value. 12772func (s *StartKeyPhrasesDetectionJobInput) SetVolumeKmsKeyId(v string) *StartKeyPhrasesDetectionJobInput { 12773 s.VolumeKmsKeyId = &v 12774 return s 12775} 12776 12777// SetVpcConfig sets the VpcConfig field's value. 12778func (s *StartKeyPhrasesDetectionJobInput) SetVpcConfig(v *VpcConfig) *StartKeyPhrasesDetectionJobInput { 12779 s.VpcConfig = v 12780 return s 12781} 12782 12783type StartKeyPhrasesDetectionJobOutput struct { 12784 _ struct{} `type:"structure"` 12785 12786 // The identifier generated for the job. To get the status of a job, use this 12787 // identifier with the operation. 12788 JobId *string `min:"1" type:"string"` 12789 12790 // The status of the job. 12791 // 12792 // * SUBMITTED - The job has been received and is queued for processing. 12793 // 12794 // * IN_PROGRESS - Amazon Comprehend is processing the job. 12795 // 12796 // * COMPLETED - The job was successfully completed and the output is available. 12797 // 12798 // * FAILED - The job did not complete. To get details, use the operation. 12799 JobStatus *string `type:"string" enum:"JobStatus"` 12800} 12801 12802// String returns the string representation 12803func (s StartKeyPhrasesDetectionJobOutput) String() string { 12804 return awsutil.Prettify(s) 12805} 12806 12807// GoString returns the string representation 12808func (s StartKeyPhrasesDetectionJobOutput) GoString() string { 12809 return s.String() 12810} 12811 12812// SetJobId sets the JobId field's value. 12813func (s *StartKeyPhrasesDetectionJobOutput) SetJobId(v string) *StartKeyPhrasesDetectionJobOutput { 12814 s.JobId = &v 12815 return s 12816} 12817 12818// SetJobStatus sets the JobStatus field's value. 12819func (s *StartKeyPhrasesDetectionJobOutput) SetJobStatus(v string) *StartKeyPhrasesDetectionJobOutput { 12820 s.JobStatus = &v 12821 return s 12822} 12823 12824type StartSentimentDetectionJobInput struct { 12825 _ struct{} `type:"structure"` 12826 12827 // A unique identifier for the request. If you don't set the client request 12828 // token, Amazon Comprehend generates one. 12829 ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` 12830 12831 // The Amazon Resource Name (ARN) of the AWS Identity and Access Management 12832 // (IAM) role that grants Amazon Comprehend read access to your input data. 12833 // For more information, see https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions 12834 // (https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions). 12835 // 12836 // DataAccessRoleArn is a required field 12837 DataAccessRoleArn *string `min:"20" type:"string" required:"true"` 12838 12839 // Specifies the format and location of the input data for the job. 12840 // 12841 // InputDataConfig is a required field 12842 InputDataConfig *InputDataConfig `type:"structure" required:"true"` 12843 12844 // The identifier of the job. 12845 JobName *string `min:"1" type:"string"` 12846 12847 // The language of the input documents. You can specify any of the primary languages 12848 // supported by Amazon Comprehend. All documents must be in the same language. 12849 // 12850 // LanguageCode is a required field 12851 LanguageCode *string `type:"string" required:"true" enum:"LanguageCode"` 12852 12853 // Specifies where to send the output files. 12854 // 12855 // OutputDataConfig is a required field 12856 OutputDataConfig *OutputDataConfig `type:"structure" required:"true"` 12857 12858 // ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses 12859 // to encrypt data on the storage volume attached to the ML compute instance(s) 12860 // that process the analysis job. The VolumeKmsKeyId can be either of the following 12861 // formats: 12862 // 12863 // * KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab" 12864 // 12865 // * Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" 12866 VolumeKmsKeyId *string `type:"string"` 12867 12868 // Configuration parameters for an optional private Virtual Private Cloud (VPC) 12869 // containing the resources you are using for your sentiment detection job. 12870 // For more information, see Amazon VPC (https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html). 12871 VpcConfig *VpcConfig `type:"structure"` 12872} 12873 12874// String returns the string representation 12875func (s StartSentimentDetectionJobInput) String() string { 12876 return awsutil.Prettify(s) 12877} 12878 12879// GoString returns the string representation 12880func (s StartSentimentDetectionJobInput) GoString() string { 12881 return s.String() 12882} 12883 12884// Validate inspects the fields of the type to determine if they are valid. 12885func (s *StartSentimentDetectionJobInput) Validate() error { 12886 invalidParams := request.ErrInvalidParams{Context: "StartSentimentDetectionJobInput"} 12887 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { 12888 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) 12889 } 12890 if s.DataAccessRoleArn == nil { 12891 invalidParams.Add(request.NewErrParamRequired("DataAccessRoleArn")) 12892 } 12893 if s.DataAccessRoleArn != nil && len(*s.DataAccessRoleArn) < 20 { 12894 invalidParams.Add(request.NewErrParamMinLen("DataAccessRoleArn", 20)) 12895 } 12896 if s.InputDataConfig == nil { 12897 invalidParams.Add(request.NewErrParamRequired("InputDataConfig")) 12898 } 12899 if s.JobName != nil && len(*s.JobName) < 1 { 12900 invalidParams.Add(request.NewErrParamMinLen("JobName", 1)) 12901 } 12902 if s.LanguageCode == nil { 12903 invalidParams.Add(request.NewErrParamRequired("LanguageCode")) 12904 } 12905 if s.OutputDataConfig == nil { 12906 invalidParams.Add(request.NewErrParamRequired("OutputDataConfig")) 12907 } 12908 if s.InputDataConfig != nil { 12909 if err := s.InputDataConfig.Validate(); err != nil { 12910 invalidParams.AddNested("InputDataConfig", err.(request.ErrInvalidParams)) 12911 } 12912 } 12913 if s.OutputDataConfig != nil { 12914 if err := s.OutputDataConfig.Validate(); err != nil { 12915 invalidParams.AddNested("OutputDataConfig", err.(request.ErrInvalidParams)) 12916 } 12917 } 12918 if s.VpcConfig != nil { 12919 if err := s.VpcConfig.Validate(); err != nil { 12920 invalidParams.AddNested("VpcConfig", err.(request.ErrInvalidParams)) 12921 } 12922 } 12923 12924 if invalidParams.Len() > 0 { 12925 return invalidParams 12926 } 12927 return nil 12928} 12929 12930// SetClientRequestToken sets the ClientRequestToken field's value. 12931func (s *StartSentimentDetectionJobInput) SetClientRequestToken(v string) *StartSentimentDetectionJobInput { 12932 s.ClientRequestToken = &v 12933 return s 12934} 12935 12936// SetDataAccessRoleArn sets the DataAccessRoleArn field's value. 12937func (s *StartSentimentDetectionJobInput) SetDataAccessRoleArn(v string) *StartSentimentDetectionJobInput { 12938 s.DataAccessRoleArn = &v 12939 return s 12940} 12941 12942// SetInputDataConfig sets the InputDataConfig field's value. 12943func (s *StartSentimentDetectionJobInput) SetInputDataConfig(v *InputDataConfig) *StartSentimentDetectionJobInput { 12944 s.InputDataConfig = v 12945 return s 12946} 12947 12948// SetJobName sets the JobName field's value. 12949func (s *StartSentimentDetectionJobInput) SetJobName(v string) *StartSentimentDetectionJobInput { 12950 s.JobName = &v 12951 return s 12952} 12953 12954// SetLanguageCode sets the LanguageCode field's value. 12955func (s *StartSentimentDetectionJobInput) SetLanguageCode(v string) *StartSentimentDetectionJobInput { 12956 s.LanguageCode = &v 12957 return s 12958} 12959 12960// SetOutputDataConfig sets the OutputDataConfig field's value. 12961func (s *StartSentimentDetectionJobInput) SetOutputDataConfig(v *OutputDataConfig) *StartSentimentDetectionJobInput { 12962 s.OutputDataConfig = v 12963 return s 12964} 12965 12966// SetVolumeKmsKeyId sets the VolumeKmsKeyId field's value. 12967func (s *StartSentimentDetectionJobInput) SetVolumeKmsKeyId(v string) *StartSentimentDetectionJobInput { 12968 s.VolumeKmsKeyId = &v 12969 return s 12970} 12971 12972// SetVpcConfig sets the VpcConfig field's value. 12973func (s *StartSentimentDetectionJobInput) SetVpcConfig(v *VpcConfig) *StartSentimentDetectionJobInput { 12974 s.VpcConfig = v 12975 return s 12976} 12977 12978type StartSentimentDetectionJobOutput struct { 12979 _ struct{} `type:"structure"` 12980 12981 // The identifier generated for the job. To get the status of a job, use this 12982 // identifier with the operation. 12983 JobId *string `min:"1" type:"string"` 12984 12985 // The status of the job. 12986 // 12987 // * SUBMITTED - The job has been received and is queued for processing. 12988 // 12989 // * IN_PROGRESS - Amazon Comprehend is processing the job. 12990 // 12991 // * COMPLETED - The job was successfully completed and the output is available. 12992 // 12993 // * FAILED - The job did not complete. To get details, use the operation. 12994 JobStatus *string `type:"string" enum:"JobStatus"` 12995} 12996 12997// String returns the string representation 12998func (s StartSentimentDetectionJobOutput) String() string { 12999 return awsutil.Prettify(s) 13000} 13001 13002// GoString returns the string representation 13003func (s StartSentimentDetectionJobOutput) GoString() string { 13004 return s.String() 13005} 13006 13007// SetJobId sets the JobId field's value. 13008func (s *StartSentimentDetectionJobOutput) SetJobId(v string) *StartSentimentDetectionJobOutput { 13009 s.JobId = &v 13010 return s 13011} 13012 13013// SetJobStatus sets the JobStatus field's value. 13014func (s *StartSentimentDetectionJobOutput) SetJobStatus(v string) *StartSentimentDetectionJobOutput { 13015 s.JobStatus = &v 13016 return s 13017} 13018 13019type StartTopicsDetectionJobInput struct { 13020 _ struct{} `type:"structure"` 13021 13022 // A unique identifier for the request. If you do not set the client request 13023 // token, Amazon Comprehend generates one. 13024 ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` 13025 13026 // The Amazon Resource Name (ARN) of the AWS Identity and Access Management 13027 // (IAM) role that grants Amazon Comprehend read access to your input data. 13028 // For more information, see https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions 13029 // (https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions). 13030 // 13031 // DataAccessRoleArn is a required field 13032 DataAccessRoleArn *string `min:"20" type:"string" required:"true"` 13033 13034 // Specifies the format and location of the input data for the job. 13035 // 13036 // InputDataConfig is a required field 13037 InputDataConfig *InputDataConfig `type:"structure" required:"true"` 13038 13039 // The identifier of the job. 13040 JobName *string `min:"1" type:"string"` 13041 13042 // The number of topics to detect. 13043 NumberOfTopics *int64 `min:"1" type:"integer"` 13044 13045 // Specifies where to send the output files. The output is a compressed archive 13046 // with two files, topic-terms.csv that lists the terms associated with each 13047 // topic, and doc-topics.csv that lists the documents associated with each topic 13048 // 13049 // OutputDataConfig is a required field 13050 OutputDataConfig *OutputDataConfig `type:"structure" required:"true"` 13051 13052 // ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses 13053 // to encrypt data on the storage volume attached to the ML compute instance(s) 13054 // that process the analysis job. The VolumeKmsKeyId can be either of the following 13055 // formats: 13056 // 13057 // * KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab" 13058 // 13059 // * Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" 13060 VolumeKmsKeyId *string `type:"string"` 13061 13062 // Configuration parameters for an optional private Virtual Private Cloud (VPC) 13063 // containing the resources you are using for your topic detection job. For 13064 // more information, see Amazon VPC (https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html). 13065 VpcConfig *VpcConfig `type:"structure"` 13066} 13067 13068// String returns the string representation 13069func (s StartTopicsDetectionJobInput) String() string { 13070 return awsutil.Prettify(s) 13071} 13072 13073// GoString returns the string representation 13074func (s StartTopicsDetectionJobInput) GoString() string { 13075 return s.String() 13076} 13077 13078// Validate inspects the fields of the type to determine if they are valid. 13079func (s *StartTopicsDetectionJobInput) Validate() error { 13080 invalidParams := request.ErrInvalidParams{Context: "StartTopicsDetectionJobInput"} 13081 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { 13082 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) 13083 } 13084 if s.DataAccessRoleArn == nil { 13085 invalidParams.Add(request.NewErrParamRequired("DataAccessRoleArn")) 13086 } 13087 if s.DataAccessRoleArn != nil && len(*s.DataAccessRoleArn) < 20 { 13088 invalidParams.Add(request.NewErrParamMinLen("DataAccessRoleArn", 20)) 13089 } 13090 if s.InputDataConfig == nil { 13091 invalidParams.Add(request.NewErrParamRequired("InputDataConfig")) 13092 } 13093 if s.JobName != nil && len(*s.JobName) < 1 { 13094 invalidParams.Add(request.NewErrParamMinLen("JobName", 1)) 13095 } 13096 if s.NumberOfTopics != nil && *s.NumberOfTopics < 1 { 13097 invalidParams.Add(request.NewErrParamMinValue("NumberOfTopics", 1)) 13098 } 13099 if s.OutputDataConfig == nil { 13100 invalidParams.Add(request.NewErrParamRequired("OutputDataConfig")) 13101 } 13102 if s.InputDataConfig != nil { 13103 if err := s.InputDataConfig.Validate(); err != nil { 13104 invalidParams.AddNested("InputDataConfig", err.(request.ErrInvalidParams)) 13105 } 13106 } 13107 if s.OutputDataConfig != nil { 13108 if err := s.OutputDataConfig.Validate(); err != nil { 13109 invalidParams.AddNested("OutputDataConfig", err.(request.ErrInvalidParams)) 13110 } 13111 } 13112 if s.VpcConfig != nil { 13113 if err := s.VpcConfig.Validate(); err != nil { 13114 invalidParams.AddNested("VpcConfig", err.(request.ErrInvalidParams)) 13115 } 13116 } 13117 13118 if invalidParams.Len() > 0 { 13119 return invalidParams 13120 } 13121 return nil 13122} 13123 13124// SetClientRequestToken sets the ClientRequestToken field's value. 13125func (s *StartTopicsDetectionJobInput) SetClientRequestToken(v string) *StartTopicsDetectionJobInput { 13126 s.ClientRequestToken = &v 13127 return s 13128} 13129 13130// SetDataAccessRoleArn sets the DataAccessRoleArn field's value. 13131func (s *StartTopicsDetectionJobInput) SetDataAccessRoleArn(v string) *StartTopicsDetectionJobInput { 13132 s.DataAccessRoleArn = &v 13133 return s 13134} 13135 13136// SetInputDataConfig sets the InputDataConfig field's value. 13137func (s *StartTopicsDetectionJobInput) SetInputDataConfig(v *InputDataConfig) *StartTopicsDetectionJobInput { 13138 s.InputDataConfig = v 13139 return s 13140} 13141 13142// SetJobName sets the JobName field's value. 13143func (s *StartTopicsDetectionJobInput) SetJobName(v string) *StartTopicsDetectionJobInput { 13144 s.JobName = &v 13145 return s 13146} 13147 13148// SetNumberOfTopics sets the NumberOfTopics field's value. 13149func (s *StartTopicsDetectionJobInput) SetNumberOfTopics(v int64) *StartTopicsDetectionJobInput { 13150 s.NumberOfTopics = &v 13151 return s 13152} 13153 13154// SetOutputDataConfig sets the OutputDataConfig field's value. 13155func (s *StartTopicsDetectionJobInput) SetOutputDataConfig(v *OutputDataConfig) *StartTopicsDetectionJobInput { 13156 s.OutputDataConfig = v 13157 return s 13158} 13159 13160// SetVolumeKmsKeyId sets the VolumeKmsKeyId field's value. 13161func (s *StartTopicsDetectionJobInput) SetVolumeKmsKeyId(v string) *StartTopicsDetectionJobInput { 13162 s.VolumeKmsKeyId = &v 13163 return s 13164} 13165 13166// SetVpcConfig sets the VpcConfig field's value. 13167func (s *StartTopicsDetectionJobInput) SetVpcConfig(v *VpcConfig) *StartTopicsDetectionJobInput { 13168 s.VpcConfig = v 13169 return s 13170} 13171 13172type StartTopicsDetectionJobOutput struct { 13173 _ struct{} `type:"structure"` 13174 13175 // The identifier generated for the job. To get the status of the job, use this 13176 // identifier with the DescribeTopicDetectionJob operation. 13177 JobId *string `min:"1" type:"string"` 13178 13179 // The status of the job: 13180 // 13181 // * SUBMITTED - The job has been received and is queued for processing. 13182 // 13183 // * IN_PROGRESS - Amazon Comprehend is processing the job. 13184 // 13185 // * COMPLETED - The job was successfully completed and the output is available. 13186 // 13187 // * FAILED - The job did not complete. To get details, use the DescribeTopicDetectionJob 13188 // operation. 13189 JobStatus *string `type:"string" enum:"JobStatus"` 13190} 13191 13192// String returns the string representation 13193func (s StartTopicsDetectionJobOutput) String() string { 13194 return awsutil.Prettify(s) 13195} 13196 13197// GoString returns the string representation 13198func (s StartTopicsDetectionJobOutput) GoString() string { 13199 return s.String() 13200} 13201 13202// SetJobId sets the JobId field's value. 13203func (s *StartTopicsDetectionJobOutput) SetJobId(v string) *StartTopicsDetectionJobOutput { 13204 s.JobId = &v 13205 return s 13206} 13207 13208// SetJobStatus sets the JobStatus field's value. 13209func (s *StartTopicsDetectionJobOutput) SetJobStatus(v string) *StartTopicsDetectionJobOutput { 13210 s.JobStatus = &v 13211 return s 13212} 13213 13214type StopDominantLanguageDetectionJobInput struct { 13215 _ struct{} `type:"structure"` 13216 13217 // The identifier of the dominant language detection job to stop. 13218 // 13219 // JobId is a required field 13220 JobId *string `min:"1" type:"string" required:"true"` 13221} 13222 13223// String returns the string representation 13224func (s StopDominantLanguageDetectionJobInput) String() string { 13225 return awsutil.Prettify(s) 13226} 13227 13228// GoString returns the string representation 13229func (s StopDominantLanguageDetectionJobInput) GoString() string { 13230 return s.String() 13231} 13232 13233// Validate inspects the fields of the type to determine if they are valid. 13234func (s *StopDominantLanguageDetectionJobInput) Validate() error { 13235 invalidParams := request.ErrInvalidParams{Context: "StopDominantLanguageDetectionJobInput"} 13236 if s.JobId == nil { 13237 invalidParams.Add(request.NewErrParamRequired("JobId")) 13238 } 13239 if s.JobId != nil && len(*s.JobId) < 1 { 13240 invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) 13241 } 13242 13243 if invalidParams.Len() > 0 { 13244 return invalidParams 13245 } 13246 return nil 13247} 13248 13249// SetJobId sets the JobId field's value. 13250func (s *StopDominantLanguageDetectionJobInput) SetJobId(v string) *StopDominantLanguageDetectionJobInput { 13251 s.JobId = &v 13252 return s 13253} 13254 13255type StopDominantLanguageDetectionJobOutput struct { 13256 _ struct{} `type:"structure"` 13257 13258 // The identifier of the dominant language detection job to stop. 13259 JobId *string `min:"1" type:"string"` 13260 13261 // Either STOP_REQUESTED if the job is currently running, or STOPPED if the 13262 // job was previously stopped with the StopDominantLanguageDetectionJob operation. 13263 JobStatus *string `type:"string" enum:"JobStatus"` 13264} 13265 13266// String returns the string representation 13267func (s StopDominantLanguageDetectionJobOutput) String() string { 13268 return awsutil.Prettify(s) 13269} 13270 13271// GoString returns the string representation 13272func (s StopDominantLanguageDetectionJobOutput) GoString() string { 13273 return s.String() 13274} 13275 13276// SetJobId sets the JobId field's value. 13277func (s *StopDominantLanguageDetectionJobOutput) SetJobId(v string) *StopDominantLanguageDetectionJobOutput { 13278 s.JobId = &v 13279 return s 13280} 13281 13282// SetJobStatus sets the JobStatus field's value. 13283func (s *StopDominantLanguageDetectionJobOutput) SetJobStatus(v string) *StopDominantLanguageDetectionJobOutput { 13284 s.JobStatus = &v 13285 return s 13286} 13287 13288type StopEntitiesDetectionJobInput struct { 13289 _ struct{} `type:"structure"` 13290 13291 // The identifier of the entities detection job to stop. 13292 // 13293 // JobId is a required field 13294 JobId *string `min:"1" type:"string" required:"true"` 13295} 13296 13297// String returns the string representation 13298func (s StopEntitiesDetectionJobInput) String() string { 13299 return awsutil.Prettify(s) 13300} 13301 13302// GoString returns the string representation 13303func (s StopEntitiesDetectionJobInput) GoString() string { 13304 return s.String() 13305} 13306 13307// Validate inspects the fields of the type to determine if they are valid. 13308func (s *StopEntitiesDetectionJobInput) Validate() error { 13309 invalidParams := request.ErrInvalidParams{Context: "StopEntitiesDetectionJobInput"} 13310 if s.JobId == nil { 13311 invalidParams.Add(request.NewErrParamRequired("JobId")) 13312 } 13313 if s.JobId != nil && len(*s.JobId) < 1 { 13314 invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) 13315 } 13316 13317 if invalidParams.Len() > 0 { 13318 return invalidParams 13319 } 13320 return nil 13321} 13322 13323// SetJobId sets the JobId field's value. 13324func (s *StopEntitiesDetectionJobInput) SetJobId(v string) *StopEntitiesDetectionJobInput { 13325 s.JobId = &v 13326 return s 13327} 13328 13329type StopEntitiesDetectionJobOutput struct { 13330 _ struct{} `type:"structure"` 13331 13332 // The identifier of the entities detection job to stop. 13333 JobId *string `min:"1" type:"string"` 13334 13335 // Either STOP_REQUESTED if the job is currently running, or STOPPED if the 13336 // job was previously stopped with the StopEntitiesDetectionJob operation. 13337 JobStatus *string `type:"string" enum:"JobStatus"` 13338} 13339 13340// String returns the string representation 13341func (s StopEntitiesDetectionJobOutput) String() string { 13342 return awsutil.Prettify(s) 13343} 13344 13345// GoString returns the string representation 13346func (s StopEntitiesDetectionJobOutput) GoString() string { 13347 return s.String() 13348} 13349 13350// SetJobId sets the JobId field's value. 13351func (s *StopEntitiesDetectionJobOutput) SetJobId(v string) *StopEntitiesDetectionJobOutput { 13352 s.JobId = &v 13353 return s 13354} 13355 13356// SetJobStatus sets the JobStatus field's value. 13357func (s *StopEntitiesDetectionJobOutput) SetJobStatus(v string) *StopEntitiesDetectionJobOutput { 13358 s.JobStatus = &v 13359 return s 13360} 13361 13362type StopKeyPhrasesDetectionJobInput struct { 13363 _ struct{} `type:"structure"` 13364 13365 // The identifier of the key phrases detection job to stop. 13366 // 13367 // JobId is a required field 13368 JobId *string `min:"1" type:"string" required:"true"` 13369} 13370 13371// String returns the string representation 13372func (s StopKeyPhrasesDetectionJobInput) String() string { 13373 return awsutil.Prettify(s) 13374} 13375 13376// GoString returns the string representation 13377func (s StopKeyPhrasesDetectionJobInput) GoString() string { 13378 return s.String() 13379} 13380 13381// Validate inspects the fields of the type to determine if they are valid. 13382func (s *StopKeyPhrasesDetectionJobInput) Validate() error { 13383 invalidParams := request.ErrInvalidParams{Context: "StopKeyPhrasesDetectionJobInput"} 13384 if s.JobId == nil { 13385 invalidParams.Add(request.NewErrParamRequired("JobId")) 13386 } 13387 if s.JobId != nil && len(*s.JobId) < 1 { 13388 invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) 13389 } 13390 13391 if invalidParams.Len() > 0 { 13392 return invalidParams 13393 } 13394 return nil 13395} 13396 13397// SetJobId sets the JobId field's value. 13398func (s *StopKeyPhrasesDetectionJobInput) SetJobId(v string) *StopKeyPhrasesDetectionJobInput { 13399 s.JobId = &v 13400 return s 13401} 13402 13403type StopKeyPhrasesDetectionJobOutput struct { 13404 _ struct{} `type:"structure"` 13405 13406 // The identifier of the key phrases detection job to stop. 13407 JobId *string `min:"1" type:"string"` 13408 13409 // Either STOP_REQUESTED if the job is currently running, or STOPPED if the 13410 // job was previously stopped with the StopKeyPhrasesDetectionJob operation. 13411 JobStatus *string `type:"string" enum:"JobStatus"` 13412} 13413 13414// String returns the string representation 13415func (s StopKeyPhrasesDetectionJobOutput) String() string { 13416 return awsutil.Prettify(s) 13417} 13418 13419// GoString returns the string representation 13420func (s StopKeyPhrasesDetectionJobOutput) GoString() string { 13421 return s.String() 13422} 13423 13424// SetJobId sets the JobId field's value. 13425func (s *StopKeyPhrasesDetectionJobOutput) SetJobId(v string) *StopKeyPhrasesDetectionJobOutput { 13426 s.JobId = &v 13427 return s 13428} 13429 13430// SetJobStatus sets the JobStatus field's value. 13431func (s *StopKeyPhrasesDetectionJobOutput) SetJobStatus(v string) *StopKeyPhrasesDetectionJobOutput { 13432 s.JobStatus = &v 13433 return s 13434} 13435 13436type StopSentimentDetectionJobInput struct { 13437 _ struct{} `type:"structure"` 13438 13439 // The identifier of the sentiment detection job to stop. 13440 // 13441 // JobId is a required field 13442 JobId *string `min:"1" type:"string" required:"true"` 13443} 13444 13445// String returns the string representation 13446func (s StopSentimentDetectionJobInput) String() string { 13447 return awsutil.Prettify(s) 13448} 13449 13450// GoString returns the string representation 13451func (s StopSentimentDetectionJobInput) GoString() string { 13452 return s.String() 13453} 13454 13455// Validate inspects the fields of the type to determine if they are valid. 13456func (s *StopSentimentDetectionJobInput) Validate() error { 13457 invalidParams := request.ErrInvalidParams{Context: "StopSentimentDetectionJobInput"} 13458 if s.JobId == nil { 13459 invalidParams.Add(request.NewErrParamRequired("JobId")) 13460 } 13461 if s.JobId != nil && len(*s.JobId) < 1 { 13462 invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) 13463 } 13464 13465 if invalidParams.Len() > 0 { 13466 return invalidParams 13467 } 13468 return nil 13469} 13470 13471// SetJobId sets the JobId field's value. 13472func (s *StopSentimentDetectionJobInput) SetJobId(v string) *StopSentimentDetectionJobInput { 13473 s.JobId = &v 13474 return s 13475} 13476 13477type StopSentimentDetectionJobOutput struct { 13478 _ struct{} `type:"structure"` 13479 13480 // The identifier of the sentiment detection job to stop. 13481 JobId *string `min:"1" type:"string"` 13482 13483 // Either STOP_REQUESTED if the job is currently running, or STOPPED if the 13484 // job was previously stopped with the StopSentimentDetectionJob operation. 13485 JobStatus *string `type:"string" enum:"JobStatus"` 13486} 13487 13488// String returns the string representation 13489func (s StopSentimentDetectionJobOutput) String() string { 13490 return awsutil.Prettify(s) 13491} 13492 13493// GoString returns the string representation 13494func (s StopSentimentDetectionJobOutput) GoString() string { 13495 return s.String() 13496} 13497 13498// SetJobId sets the JobId field's value. 13499func (s *StopSentimentDetectionJobOutput) SetJobId(v string) *StopSentimentDetectionJobOutput { 13500 s.JobId = &v 13501 return s 13502} 13503 13504// SetJobStatus sets the JobStatus field's value. 13505func (s *StopSentimentDetectionJobOutput) SetJobStatus(v string) *StopSentimentDetectionJobOutput { 13506 s.JobStatus = &v 13507 return s 13508} 13509 13510type StopTrainingDocumentClassifierInput struct { 13511 _ struct{} `type:"structure"` 13512 13513 // The Amazon Resource Name (ARN) that identifies the document classifier currently 13514 // being trained. 13515 // 13516 // DocumentClassifierArn is a required field 13517 DocumentClassifierArn *string `type:"string" required:"true"` 13518} 13519 13520// String returns the string representation 13521func (s StopTrainingDocumentClassifierInput) String() string { 13522 return awsutil.Prettify(s) 13523} 13524 13525// GoString returns the string representation 13526func (s StopTrainingDocumentClassifierInput) GoString() string { 13527 return s.String() 13528} 13529 13530// Validate inspects the fields of the type to determine if they are valid. 13531func (s *StopTrainingDocumentClassifierInput) Validate() error { 13532 invalidParams := request.ErrInvalidParams{Context: "StopTrainingDocumentClassifierInput"} 13533 if s.DocumentClassifierArn == nil { 13534 invalidParams.Add(request.NewErrParamRequired("DocumentClassifierArn")) 13535 } 13536 13537 if invalidParams.Len() > 0 { 13538 return invalidParams 13539 } 13540 return nil 13541} 13542 13543// SetDocumentClassifierArn sets the DocumentClassifierArn field's value. 13544func (s *StopTrainingDocumentClassifierInput) SetDocumentClassifierArn(v string) *StopTrainingDocumentClassifierInput { 13545 s.DocumentClassifierArn = &v 13546 return s 13547} 13548 13549type StopTrainingDocumentClassifierOutput struct { 13550 _ struct{} `type:"structure"` 13551} 13552 13553// String returns the string representation 13554func (s StopTrainingDocumentClassifierOutput) String() string { 13555 return awsutil.Prettify(s) 13556} 13557 13558// GoString returns the string representation 13559func (s StopTrainingDocumentClassifierOutput) GoString() string { 13560 return s.String() 13561} 13562 13563type StopTrainingEntityRecognizerInput struct { 13564 _ struct{} `type:"structure"` 13565 13566 // The Amazon Resource Name (ARN) that identifies the entity recognizer currently 13567 // being trained. 13568 // 13569 // EntityRecognizerArn is a required field 13570 EntityRecognizerArn *string `type:"string" required:"true"` 13571} 13572 13573// String returns the string representation 13574func (s StopTrainingEntityRecognizerInput) String() string { 13575 return awsutil.Prettify(s) 13576} 13577 13578// GoString returns the string representation 13579func (s StopTrainingEntityRecognizerInput) GoString() string { 13580 return s.String() 13581} 13582 13583// Validate inspects the fields of the type to determine if they are valid. 13584func (s *StopTrainingEntityRecognizerInput) Validate() error { 13585 invalidParams := request.ErrInvalidParams{Context: "StopTrainingEntityRecognizerInput"} 13586 if s.EntityRecognizerArn == nil { 13587 invalidParams.Add(request.NewErrParamRequired("EntityRecognizerArn")) 13588 } 13589 13590 if invalidParams.Len() > 0 { 13591 return invalidParams 13592 } 13593 return nil 13594} 13595 13596// SetEntityRecognizerArn sets the EntityRecognizerArn field's value. 13597func (s *StopTrainingEntityRecognizerInput) SetEntityRecognizerArn(v string) *StopTrainingEntityRecognizerInput { 13598 s.EntityRecognizerArn = &v 13599 return s 13600} 13601 13602type StopTrainingEntityRecognizerOutput struct { 13603 _ struct{} `type:"structure"` 13604} 13605 13606// String returns the string representation 13607func (s StopTrainingEntityRecognizerOutput) String() string { 13608 return awsutil.Prettify(s) 13609} 13610 13611// GoString returns the string representation 13612func (s StopTrainingEntityRecognizerOutput) GoString() string { 13613 return s.String() 13614} 13615 13616// Represents a work in the input text that was recognized and assigned a part 13617// of speech. There is one syntax token record for each word in the source text. 13618type SyntaxToken struct { 13619 _ struct{} `type:"structure"` 13620 13621 // The zero-based offset from the beginning of the source text to the first 13622 // character in the word. 13623 BeginOffset *int64 `type:"integer"` 13624 13625 // The zero-based offset from the beginning of the source text to the last character 13626 // in the word. 13627 EndOffset *int64 `type:"integer"` 13628 13629 // Provides the part of speech label and the confidence level that Amazon Comprehend 13630 // has that the part of speech was correctly identified. For more information, 13631 // see how-syntax. 13632 PartOfSpeech *PartOfSpeechTag `type:"structure"` 13633 13634 // The word that was recognized in the source text. 13635 Text *string `min:"1" type:"string"` 13636 13637 // A unique identifier for a token. 13638 TokenId *int64 `type:"integer"` 13639} 13640 13641// String returns the string representation 13642func (s SyntaxToken) String() string { 13643 return awsutil.Prettify(s) 13644} 13645 13646// GoString returns the string representation 13647func (s SyntaxToken) GoString() string { 13648 return s.String() 13649} 13650 13651// SetBeginOffset sets the BeginOffset field's value. 13652func (s *SyntaxToken) SetBeginOffset(v int64) *SyntaxToken { 13653 s.BeginOffset = &v 13654 return s 13655} 13656 13657// SetEndOffset sets the EndOffset field's value. 13658func (s *SyntaxToken) SetEndOffset(v int64) *SyntaxToken { 13659 s.EndOffset = &v 13660 return s 13661} 13662 13663// SetPartOfSpeech sets the PartOfSpeech field's value. 13664func (s *SyntaxToken) SetPartOfSpeech(v *PartOfSpeechTag) *SyntaxToken { 13665 s.PartOfSpeech = v 13666 return s 13667} 13668 13669// SetText sets the Text field's value. 13670func (s *SyntaxToken) SetText(v string) *SyntaxToken { 13671 s.Text = &v 13672 return s 13673} 13674 13675// SetTokenId sets the TokenId field's value. 13676func (s *SyntaxToken) SetTokenId(v int64) *SyntaxToken { 13677 s.TokenId = &v 13678 return s 13679} 13680 13681// A key-value pair that adds as a metadata to a resource used by Amazon Comprehend. 13682// For example, a tag with the key-value pair ‘Department’:’Sales’ might 13683// be added to a resource to indicate its use by a particular department. 13684type Tag struct { 13685 _ struct{} `type:"structure"` 13686 13687 // The initial part of a key-value pair that forms a tag associated with a given 13688 // resource. For instance, if you want to show which resources are used by which 13689 // departments, you might use “Department” as the key portion of the pair, 13690 // with multiple possible values such as “sales,” “legal,” and “administration.” 13691 // 13692 // Key is a required field 13693 Key *string `min:"1" type:"string" required:"true"` 13694 13695 // The second part of a key-value pair that forms a tag associated with a given 13696 // resource. For instance, if you want to show which resources are used by which 13697 // departments, you might use “Department” as the initial (key) portion 13698 // of the pair, with a value of “sales” to indicate the sales department. 13699 Value *string `type:"string"` 13700} 13701 13702// String returns the string representation 13703func (s Tag) String() string { 13704 return awsutil.Prettify(s) 13705} 13706 13707// GoString returns the string representation 13708func (s Tag) GoString() string { 13709 return s.String() 13710} 13711 13712// Validate inspects the fields of the type to determine if they are valid. 13713func (s *Tag) Validate() error { 13714 invalidParams := request.ErrInvalidParams{Context: "Tag"} 13715 if s.Key == nil { 13716 invalidParams.Add(request.NewErrParamRequired("Key")) 13717 } 13718 if s.Key != nil && len(*s.Key) < 1 { 13719 invalidParams.Add(request.NewErrParamMinLen("Key", 1)) 13720 } 13721 13722 if invalidParams.Len() > 0 { 13723 return invalidParams 13724 } 13725 return nil 13726} 13727 13728// SetKey sets the Key field's value. 13729func (s *Tag) SetKey(v string) *Tag { 13730 s.Key = &v 13731 return s 13732} 13733 13734// SetValue sets the Value field's value. 13735func (s *Tag) SetValue(v string) *Tag { 13736 s.Value = &v 13737 return s 13738} 13739 13740type TagResourceInput struct { 13741 _ struct{} `type:"structure"` 13742 13743 // The Amazon Resource Name (ARN) of the given Amazon Comprehend resource to 13744 // which you want to associate the tags. 13745 // 13746 // ResourceArn is a required field 13747 ResourceArn *string `type:"string" required:"true"` 13748 13749 // Tags being associated with a specific Amazon Comprehend resource. There can 13750 // be a maximum of 50 tags (both existing and pending) associated with a specific 13751 // resource. 13752 // 13753 // Tags is a required field 13754 Tags []*Tag `type:"list" required:"true"` 13755} 13756 13757// String returns the string representation 13758func (s TagResourceInput) String() string { 13759 return awsutil.Prettify(s) 13760} 13761 13762// GoString returns the string representation 13763func (s TagResourceInput) GoString() string { 13764 return s.String() 13765} 13766 13767// Validate inspects the fields of the type to determine if they are valid. 13768func (s *TagResourceInput) Validate() error { 13769 invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} 13770 if s.ResourceArn == nil { 13771 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 13772 } 13773 if s.Tags == nil { 13774 invalidParams.Add(request.NewErrParamRequired("Tags")) 13775 } 13776 if s.Tags != nil { 13777 for i, v := range s.Tags { 13778 if v == nil { 13779 continue 13780 } 13781 if err := v.Validate(); err != nil { 13782 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 13783 } 13784 } 13785 } 13786 13787 if invalidParams.Len() > 0 { 13788 return invalidParams 13789 } 13790 return nil 13791} 13792 13793// SetResourceArn sets the ResourceArn field's value. 13794func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { 13795 s.ResourceArn = &v 13796 return s 13797} 13798 13799// SetTags sets the Tags field's value. 13800func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { 13801 s.Tags = v 13802 return s 13803} 13804 13805type TagResourceOutput struct { 13806 _ struct{} `type:"structure"` 13807} 13808 13809// String returns the string representation 13810func (s TagResourceOutput) String() string { 13811 return awsutil.Prettify(s) 13812} 13813 13814// GoString returns the string representation 13815func (s TagResourceOutput) GoString() string { 13816 return s.String() 13817} 13818 13819// The size of the input text exceeds the limit. Use a smaller document. 13820type TextSizeLimitExceededException struct { 13821 _ struct{} `type:"structure"` 13822 respMetadata protocol.ResponseMetadata 13823 13824 Message_ *string `locationName:"Message" min:"1" type:"string"` 13825} 13826 13827// String returns the string representation 13828func (s TextSizeLimitExceededException) String() string { 13829 return awsutil.Prettify(s) 13830} 13831 13832// GoString returns the string representation 13833func (s TextSizeLimitExceededException) GoString() string { 13834 return s.String() 13835} 13836 13837func newErrorTextSizeLimitExceededException(v protocol.ResponseMetadata) error { 13838 return &TextSizeLimitExceededException{ 13839 respMetadata: v, 13840 } 13841} 13842 13843// Code returns the exception type name. 13844func (s TextSizeLimitExceededException) Code() string { 13845 return "TextSizeLimitExceededException" 13846} 13847 13848// Message returns the exception's message. 13849func (s TextSizeLimitExceededException) Message() string { 13850 if s.Message_ != nil { 13851 return *s.Message_ 13852 } 13853 return "" 13854} 13855 13856// OrigErr always returns nil, satisfies awserr.Error interface. 13857func (s TextSizeLimitExceededException) OrigErr() error { 13858 return nil 13859} 13860 13861func (s TextSizeLimitExceededException) Error() string { 13862 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 13863} 13864 13865// Status code returns the HTTP status code for the request's response error. 13866func (s TextSizeLimitExceededException) StatusCode() int { 13867 return s.respMetadata.StatusCode 13868} 13869 13870// RequestID returns the service's response RequestID for request. 13871func (s TextSizeLimitExceededException) RequestID() string { 13872 return s.respMetadata.RequestID 13873} 13874 13875// The number of requests exceeds the limit. Resubmit your request later. 13876type TooManyRequestsException struct { 13877 _ struct{} `type:"structure"` 13878 respMetadata protocol.ResponseMetadata 13879 13880 Message_ *string `locationName:"Message" min:"1" type:"string"` 13881} 13882 13883// String returns the string representation 13884func (s TooManyRequestsException) String() string { 13885 return awsutil.Prettify(s) 13886} 13887 13888// GoString returns the string representation 13889func (s TooManyRequestsException) GoString() string { 13890 return s.String() 13891} 13892 13893func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error { 13894 return &TooManyRequestsException{ 13895 respMetadata: v, 13896 } 13897} 13898 13899// Code returns the exception type name. 13900func (s TooManyRequestsException) Code() string { 13901 return "TooManyRequestsException" 13902} 13903 13904// Message returns the exception's message. 13905func (s TooManyRequestsException) Message() string { 13906 if s.Message_ != nil { 13907 return *s.Message_ 13908 } 13909 return "" 13910} 13911 13912// OrigErr always returns nil, satisfies awserr.Error interface. 13913func (s TooManyRequestsException) OrigErr() error { 13914 return nil 13915} 13916 13917func (s TooManyRequestsException) Error() string { 13918 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 13919} 13920 13921// Status code returns the HTTP status code for the request's response error. 13922func (s TooManyRequestsException) StatusCode() int { 13923 return s.respMetadata.StatusCode 13924} 13925 13926// RequestID returns the service's response RequestID for request. 13927func (s TooManyRequestsException) RequestID() string { 13928 return s.respMetadata.RequestID 13929} 13930 13931// The request contains more tag keys than can be associated with a resource 13932// (50 tag keys per resource). 13933type TooManyTagKeysException struct { 13934 _ struct{} `type:"structure"` 13935 respMetadata protocol.ResponseMetadata 13936 13937 Message_ *string `locationName:"Message" min:"1" type:"string"` 13938} 13939 13940// String returns the string representation 13941func (s TooManyTagKeysException) String() string { 13942 return awsutil.Prettify(s) 13943} 13944 13945// GoString returns the string representation 13946func (s TooManyTagKeysException) GoString() string { 13947 return s.String() 13948} 13949 13950func newErrorTooManyTagKeysException(v protocol.ResponseMetadata) error { 13951 return &TooManyTagKeysException{ 13952 respMetadata: v, 13953 } 13954} 13955 13956// Code returns the exception type name. 13957func (s TooManyTagKeysException) Code() string { 13958 return "TooManyTagKeysException" 13959} 13960 13961// Message returns the exception's message. 13962func (s TooManyTagKeysException) Message() string { 13963 if s.Message_ != nil { 13964 return *s.Message_ 13965 } 13966 return "" 13967} 13968 13969// OrigErr always returns nil, satisfies awserr.Error interface. 13970func (s TooManyTagKeysException) OrigErr() error { 13971 return nil 13972} 13973 13974func (s TooManyTagKeysException) Error() string { 13975 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 13976} 13977 13978// Status code returns the HTTP status code for the request's response error. 13979func (s TooManyTagKeysException) StatusCode() int { 13980 return s.respMetadata.StatusCode 13981} 13982 13983// RequestID returns the service's response RequestID for request. 13984func (s TooManyTagKeysException) RequestID() string { 13985 return s.respMetadata.RequestID 13986} 13987 13988// The request contains more tags than can be associated with a resource (50 13989// tags per resource). The maximum number of tags includes both existing tags 13990// and those included in your current request. 13991type TooManyTagsException struct { 13992 _ struct{} `type:"structure"` 13993 respMetadata protocol.ResponseMetadata 13994 13995 Message_ *string `locationName:"Message" min:"1" type:"string"` 13996} 13997 13998// String returns the string representation 13999func (s TooManyTagsException) String() string { 14000 return awsutil.Prettify(s) 14001} 14002 14003// GoString returns the string representation 14004func (s TooManyTagsException) GoString() string { 14005 return s.String() 14006} 14007 14008func newErrorTooManyTagsException(v protocol.ResponseMetadata) error { 14009 return &TooManyTagsException{ 14010 respMetadata: v, 14011 } 14012} 14013 14014// Code returns the exception type name. 14015func (s TooManyTagsException) Code() string { 14016 return "TooManyTagsException" 14017} 14018 14019// Message returns the exception's message. 14020func (s TooManyTagsException) Message() string { 14021 if s.Message_ != nil { 14022 return *s.Message_ 14023 } 14024 return "" 14025} 14026 14027// OrigErr always returns nil, satisfies awserr.Error interface. 14028func (s TooManyTagsException) OrigErr() error { 14029 return nil 14030} 14031 14032func (s TooManyTagsException) Error() string { 14033 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 14034} 14035 14036// Status code returns the HTTP status code for the request's response error. 14037func (s TooManyTagsException) StatusCode() int { 14038 return s.respMetadata.StatusCode 14039} 14040 14041// RequestID returns the service's response RequestID for request. 14042func (s TooManyTagsException) RequestID() string { 14043 return s.respMetadata.RequestID 14044} 14045 14046// Provides information for filtering topic detection jobs. For more information, 14047// see . 14048type TopicsDetectionJobFilter struct { 14049 _ struct{} `type:"structure"` 14050 14051 JobName *string `min:"1" type:"string"` 14052 14053 // Filters the list of topic detection jobs based on job status. Returns only 14054 // jobs with the specified status. 14055 JobStatus *string `type:"string" enum:"JobStatus"` 14056 14057 // Filters the list of jobs based on the time that the job was submitted for 14058 // processing. Only returns jobs submitted after the specified time. Jobs are 14059 // returned in ascending order, oldest to newest. 14060 SubmitTimeAfter *time.Time `type:"timestamp"` 14061 14062 // Filters the list of jobs based on the time that the job was submitted for 14063 // processing. Only returns jobs submitted before the specified time. Jobs are 14064 // returned in descending order, newest to oldest. 14065 SubmitTimeBefore *time.Time `type:"timestamp"` 14066} 14067 14068// String returns the string representation 14069func (s TopicsDetectionJobFilter) String() string { 14070 return awsutil.Prettify(s) 14071} 14072 14073// GoString returns the string representation 14074func (s TopicsDetectionJobFilter) GoString() string { 14075 return s.String() 14076} 14077 14078// Validate inspects the fields of the type to determine if they are valid. 14079func (s *TopicsDetectionJobFilter) Validate() error { 14080 invalidParams := request.ErrInvalidParams{Context: "TopicsDetectionJobFilter"} 14081 if s.JobName != nil && len(*s.JobName) < 1 { 14082 invalidParams.Add(request.NewErrParamMinLen("JobName", 1)) 14083 } 14084 14085 if invalidParams.Len() > 0 { 14086 return invalidParams 14087 } 14088 return nil 14089} 14090 14091// SetJobName sets the JobName field's value. 14092func (s *TopicsDetectionJobFilter) SetJobName(v string) *TopicsDetectionJobFilter { 14093 s.JobName = &v 14094 return s 14095} 14096 14097// SetJobStatus sets the JobStatus field's value. 14098func (s *TopicsDetectionJobFilter) SetJobStatus(v string) *TopicsDetectionJobFilter { 14099 s.JobStatus = &v 14100 return s 14101} 14102 14103// SetSubmitTimeAfter sets the SubmitTimeAfter field's value. 14104func (s *TopicsDetectionJobFilter) SetSubmitTimeAfter(v time.Time) *TopicsDetectionJobFilter { 14105 s.SubmitTimeAfter = &v 14106 return s 14107} 14108 14109// SetSubmitTimeBefore sets the SubmitTimeBefore field's value. 14110func (s *TopicsDetectionJobFilter) SetSubmitTimeBefore(v time.Time) *TopicsDetectionJobFilter { 14111 s.SubmitTimeBefore = &v 14112 return s 14113} 14114 14115// Provides information about a topic detection job. 14116type TopicsDetectionJobProperties struct { 14117 _ struct{} `type:"structure"` 14118 14119 // The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM) role 14120 // that grants Amazon Comprehend read access to your job data. 14121 DataAccessRoleArn *string `min:"20" type:"string"` 14122 14123 // The time that the topic detection job was completed. 14124 EndTime *time.Time `type:"timestamp"` 14125 14126 // The input data configuration supplied when you created the topic detection 14127 // job. 14128 InputDataConfig *InputDataConfig `type:"structure"` 14129 14130 // The identifier assigned to the topic detection job. 14131 JobId *string `min:"1" type:"string"` 14132 14133 // The name of the topic detection job. 14134 JobName *string `min:"1" type:"string"` 14135 14136 // The current status of the topic detection job. If the status is Failed, the 14137 // reason for the failure is shown in the Message field. 14138 JobStatus *string `type:"string" enum:"JobStatus"` 14139 14140 // A description for the status of a job. 14141 Message *string `type:"string"` 14142 14143 // The number of topics to detect supplied when you created the topic detection 14144 // job. The default is 10. 14145 NumberOfTopics *int64 `type:"integer"` 14146 14147 // The output data configuration supplied when you created the topic detection 14148 // job. 14149 OutputDataConfig *OutputDataConfig `type:"structure"` 14150 14151 // The time that the topic detection job was submitted for processing. 14152 SubmitTime *time.Time `type:"timestamp"` 14153 14154 // ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses 14155 // to encrypt data on the storage volume attached to the ML compute instance(s) 14156 // that process the analysis job. The VolumeKmsKeyId can be either of the following 14157 // formats: 14158 // 14159 // * KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab" 14160 // 14161 // * Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" 14162 VolumeKmsKeyId *string `type:"string"` 14163 14164 // Configuration parameters for a private Virtual Private Cloud (VPC) containing 14165 // the resources you are using for your topic detection job. For more information, 14166 // see Amazon VPC (https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html). 14167 VpcConfig *VpcConfig `type:"structure"` 14168} 14169 14170// String returns the string representation 14171func (s TopicsDetectionJobProperties) String() string { 14172 return awsutil.Prettify(s) 14173} 14174 14175// GoString returns the string representation 14176func (s TopicsDetectionJobProperties) GoString() string { 14177 return s.String() 14178} 14179 14180// SetDataAccessRoleArn sets the DataAccessRoleArn field's value. 14181func (s *TopicsDetectionJobProperties) SetDataAccessRoleArn(v string) *TopicsDetectionJobProperties { 14182 s.DataAccessRoleArn = &v 14183 return s 14184} 14185 14186// SetEndTime sets the EndTime field's value. 14187func (s *TopicsDetectionJobProperties) SetEndTime(v time.Time) *TopicsDetectionJobProperties { 14188 s.EndTime = &v 14189 return s 14190} 14191 14192// SetInputDataConfig sets the InputDataConfig field's value. 14193func (s *TopicsDetectionJobProperties) SetInputDataConfig(v *InputDataConfig) *TopicsDetectionJobProperties { 14194 s.InputDataConfig = v 14195 return s 14196} 14197 14198// SetJobId sets the JobId field's value. 14199func (s *TopicsDetectionJobProperties) SetJobId(v string) *TopicsDetectionJobProperties { 14200 s.JobId = &v 14201 return s 14202} 14203 14204// SetJobName sets the JobName field's value. 14205func (s *TopicsDetectionJobProperties) SetJobName(v string) *TopicsDetectionJobProperties { 14206 s.JobName = &v 14207 return s 14208} 14209 14210// SetJobStatus sets the JobStatus field's value. 14211func (s *TopicsDetectionJobProperties) SetJobStatus(v string) *TopicsDetectionJobProperties { 14212 s.JobStatus = &v 14213 return s 14214} 14215 14216// SetMessage sets the Message field's value. 14217func (s *TopicsDetectionJobProperties) SetMessage(v string) *TopicsDetectionJobProperties { 14218 s.Message = &v 14219 return s 14220} 14221 14222// SetNumberOfTopics sets the NumberOfTopics field's value. 14223func (s *TopicsDetectionJobProperties) SetNumberOfTopics(v int64) *TopicsDetectionJobProperties { 14224 s.NumberOfTopics = &v 14225 return s 14226} 14227 14228// SetOutputDataConfig sets the OutputDataConfig field's value. 14229func (s *TopicsDetectionJobProperties) SetOutputDataConfig(v *OutputDataConfig) *TopicsDetectionJobProperties { 14230 s.OutputDataConfig = v 14231 return s 14232} 14233 14234// SetSubmitTime sets the SubmitTime field's value. 14235func (s *TopicsDetectionJobProperties) SetSubmitTime(v time.Time) *TopicsDetectionJobProperties { 14236 s.SubmitTime = &v 14237 return s 14238} 14239 14240// SetVolumeKmsKeyId sets the VolumeKmsKeyId field's value. 14241func (s *TopicsDetectionJobProperties) SetVolumeKmsKeyId(v string) *TopicsDetectionJobProperties { 14242 s.VolumeKmsKeyId = &v 14243 return s 14244} 14245 14246// SetVpcConfig sets the VpcConfig field's value. 14247func (s *TopicsDetectionJobProperties) SetVpcConfig(v *VpcConfig) *TopicsDetectionJobProperties { 14248 s.VpcConfig = v 14249 return s 14250} 14251 14252// Amazon Comprehend can't process the language of the input text. For all custom 14253// entity recognition APIs (such as CreateEntityRecognizer), only English is 14254// accepted. For most other APIs, such as those for Custom Classification, Amazon 14255// Comprehend accepts text in all supported languages. For a list of supported 14256// languages, see supported-languages. 14257type UnsupportedLanguageException struct { 14258 _ struct{} `type:"structure"` 14259 respMetadata protocol.ResponseMetadata 14260 14261 Message_ *string `locationName:"Message" min:"1" type:"string"` 14262} 14263 14264// String returns the string representation 14265func (s UnsupportedLanguageException) String() string { 14266 return awsutil.Prettify(s) 14267} 14268 14269// GoString returns the string representation 14270func (s UnsupportedLanguageException) GoString() string { 14271 return s.String() 14272} 14273 14274func newErrorUnsupportedLanguageException(v protocol.ResponseMetadata) error { 14275 return &UnsupportedLanguageException{ 14276 respMetadata: v, 14277 } 14278} 14279 14280// Code returns the exception type name. 14281func (s UnsupportedLanguageException) Code() string { 14282 return "UnsupportedLanguageException" 14283} 14284 14285// Message returns the exception's message. 14286func (s UnsupportedLanguageException) Message() string { 14287 if s.Message_ != nil { 14288 return *s.Message_ 14289 } 14290 return "" 14291} 14292 14293// OrigErr always returns nil, satisfies awserr.Error interface. 14294func (s UnsupportedLanguageException) OrigErr() error { 14295 return nil 14296} 14297 14298func (s UnsupportedLanguageException) Error() string { 14299 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 14300} 14301 14302// Status code returns the HTTP status code for the request's response error. 14303func (s UnsupportedLanguageException) StatusCode() int { 14304 return s.respMetadata.StatusCode 14305} 14306 14307// RequestID returns the service's response RequestID for request. 14308func (s UnsupportedLanguageException) RequestID() string { 14309 return s.respMetadata.RequestID 14310} 14311 14312type UntagResourceInput struct { 14313 _ struct{} `type:"structure"` 14314 14315 // The Amazon Resource Name (ARN) of the given Amazon Comprehend resource from 14316 // which you want to remove the tags. 14317 // 14318 // ResourceArn is a required field 14319 ResourceArn *string `type:"string" required:"true"` 14320 14321 // The initial part of a key-value pair that forms a tag being removed from 14322 // a given resource. For example, a tag with "Sales" as the key might be added 14323 // to a resource to indicate its use by the sales department. Keys must be unique 14324 // and cannot be duplicated for a particular resource. 14325 // 14326 // TagKeys is a required field 14327 TagKeys []*string `type:"list" required:"true"` 14328} 14329 14330// String returns the string representation 14331func (s UntagResourceInput) String() string { 14332 return awsutil.Prettify(s) 14333} 14334 14335// GoString returns the string representation 14336func (s UntagResourceInput) GoString() string { 14337 return s.String() 14338} 14339 14340// Validate inspects the fields of the type to determine if they are valid. 14341func (s *UntagResourceInput) Validate() error { 14342 invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} 14343 if s.ResourceArn == nil { 14344 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 14345 } 14346 if s.TagKeys == nil { 14347 invalidParams.Add(request.NewErrParamRequired("TagKeys")) 14348 } 14349 14350 if invalidParams.Len() > 0 { 14351 return invalidParams 14352 } 14353 return nil 14354} 14355 14356// SetResourceArn sets the ResourceArn field's value. 14357func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { 14358 s.ResourceArn = &v 14359 return s 14360} 14361 14362// SetTagKeys sets the TagKeys field's value. 14363func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { 14364 s.TagKeys = v 14365 return s 14366} 14367 14368type UntagResourceOutput struct { 14369 _ struct{} `type:"structure"` 14370} 14371 14372// String returns the string representation 14373func (s UntagResourceOutput) String() string { 14374 return awsutil.Prettify(s) 14375} 14376 14377// GoString returns the string representation 14378func (s UntagResourceOutput) GoString() string { 14379 return s.String() 14380} 14381 14382type UpdateEndpointInput struct { 14383 _ struct{} `type:"structure"` 14384 14385 // The desired number of inference units to be used by the model using this 14386 // endpoint. Each inference unit represents of a throughput of 100 characters 14387 // per second. 14388 // 14389 // DesiredInferenceUnits is a required field 14390 DesiredInferenceUnits *int64 `min:"1" type:"integer" required:"true"` 14391 14392 // The Amazon Resource Number (ARN) of the endpoint being updated. 14393 // 14394 // EndpointArn is a required field 14395 EndpointArn *string `type:"string" required:"true"` 14396} 14397 14398// String returns the string representation 14399func (s UpdateEndpointInput) String() string { 14400 return awsutil.Prettify(s) 14401} 14402 14403// GoString returns the string representation 14404func (s UpdateEndpointInput) GoString() string { 14405 return s.String() 14406} 14407 14408// Validate inspects the fields of the type to determine if they are valid. 14409func (s *UpdateEndpointInput) Validate() error { 14410 invalidParams := request.ErrInvalidParams{Context: "UpdateEndpointInput"} 14411 if s.DesiredInferenceUnits == nil { 14412 invalidParams.Add(request.NewErrParamRequired("DesiredInferenceUnits")) 14413 } 14414 if s.DesiredInferenceUnits != nil && *s.DesiredInferenceUnits < 1 { 14415 invalidParams.Add(request.NewErrParamMinValue("DesiredInferenceUnits", 1)) 14416 } 14417 if s.EndpointArn == nil { 14418 invalidParams.Add(request.NewErrParamRequired("EndpointArn")) 14419 } 14420 14421 if invalidParams.Len() > 0 { 14422 return invalidParams 14423 } 14424 return nil 14425} 14426 14427// SetDesiredInferenceUnits sets the DesiredInferenceUnits field's value. 14428func (s *UpdateEndpointInput) SetDesiredInferenceUnits(v int64) *UpdateEndpointInput { 14429 s.DesiredInferenceUnits = &v 14430 return s 14431} 14432 14433// SetEndpointArn sets the EndpointArn field's value. 14434func (s *UpdateEndpointInput) SetEndpointArn(v string) *UpdateEndpointInput { 14435 s.EndpointArn = &v 14436 return s 14437} 14438 14439type UpdateEndpointOutput struct { 14440 _ struct{} `type:"structure"` 14441} 14442 14443// String returns the string representation 14444func (s UpdateEndpointOutput) String() string { 14445 return awsutil.Prettify(s) 14446} 14447 14448// GoString returns the string representation 14449func (s UpdateEndpointOutput) GoString() string { 14450 return s.String() 14451} 14452 14453// Configuration parameters for an optional private Virtual Private Cloud (VPC) 14454// containing the resources you are using for the job. For For more information, 14455// see Amazon VPC (https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html). 14456type VpcConfig struct { 14457 _ struct{} `type:"structure"` 14458 14459 // The ID number for a security group on an instance of your private VPC. Security 14460 // groups on your VPC function serve as a virtual firewall to control inbound 14461 // and outbound traffic and provides security for the resources that you’ll 14462 // be accessing on the VPC. This ID number is preceded by "sg-", for instance: 14463 // "sg-03b388029b0a285ea". For more information, see Security Groups for your 14464 // VPC (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html). 14465 // 14466 // SecurityGroupIds is a required field 14467 SecurityGroupIds []*string `min:"1" type:"list" required:"true"` 14468 14469 // The ID for each subnet being used in your private VPC. This subnet is a subset 14470 // of the a range of IPv4 addresses used by the VPC and is specific to a given 14471 // availability zone in the VPC’s region. This ID number is preceded by "subnet-", 14472 // for instance: "subnet-04ccf456919e69055". For more information, see VPCs 14473 // and Subnets (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html). 14474 // 14475 // Subnets is a required field 14476 Subnets []*string `min:"1" type:"list" required:"true"` 14477} 14478 14479// String returns the string representation 14480func (s VpcConfig) String() string { 14481 return awsutil.Prettify(s) 14482} 14483 14484// GoString returns the string representation 14485func (s VpcConfig) GoString() string { 14486 return s.String() 14487} 14488 14489// Validate inspects the fields of the type to determine if they are valid. 14490func (s *VpcConfig) Validate() error { 14491 invalidParams := request.ErrInvalidParams{Context: "VpcConfig"} 14492 if s.SecurityGroupIds == nil { 14493 invalidParams.Add(request.NewErrParamRequired("SecurityGroupIds")) 14494 } 14495 if s.SecurityGroupIds != nil && len(s.SecurityGroupIds) < 1 { 14496 invalidParams.Add(request.NewErrParamMinLen("SecurityGroupIds", 1)) 14497 } 14498 if s.Subnets == nil { 14499 invalidParams.Add(request.NewErrParamRequired("Subnets")) 14500 } 14501 if s.Subnets != nil && len(s.Subnets) < 1 { 14502 invalidParams.Add(request.NewErrParamMinLen("Subnets", 1)) 14503 } 14504 14505 if invalidParams.Len() > 0 { 14506 return invalidParams 14507 } 14508 return nil 14509} 14510 14511// SetSecurityGroupIds sets the SecurityGroupIds field's value. 14512func (s *VpcConfig) SetSecurityGroupIds(v []*string) *VpcConfig { 14513 s.SecurityGroupIds = v 14514 return s 14515} 14516 14517// SetSubnets sets the Subnets field's value. 14518func (s *VpcConfig) SetSubnets(v []*string) *VpcConfig { 14519 s.Subnets = v 14520 return s 14521} 14522 14523const ( 14524 // DocumentClassifierModeMultiClass is a DocumentClassifierMode enum value 14525 DocumentClassifierModeMultiClass = "MULTI_CLASS" 14526 14527 // DocumentClassifierModeMultiLabel is a DocumentClassifierMode enum value 14528 DocumentClassifierModeMultiLabel = "MULTI_LABEL" 14529) 14530 14531const ( 14532 // EndpointStatusCreating is a EndpointStatus enum value 14533 EndpointStatusCreating = "CREATING" 14534 14535 // EndpointStatusDeleting is a EndpointStatus enum value 14536 EndpointStatusDeleting = "DELETING" 14537 14538 // EndpointStatusFailed is a EndpointStatus enum value 14539 EndpointStatusFailed = "FAILED" 14540 14541 // EndpointStatusInService is a EndpointStatus enum value 14542 EndpointStatusInService = "IN_SERVICE" 14543 14544 // EndpointStatusUpdating is a EndpointStatus enum value 14545 EndpointStatusUpdating = "UPDATING" 14546) 14547 14548const ( 14549 // EntityTypePerson is a EntityType enum value 14550 EntityTypePerson = "PERSON" 14551 14552 // EntityTypeLocation is a EntityType enum value 14553 EntityTypeLocation = "LOCATION" 14554 14555 // EntityTypeOrganization is a EntityType enum value 14556 EntityTypeOrganization = "ORGANIZATION" 14557 14558 // EntityTypeCommercialItem is a EntityType enum value 14559 EntityTypeCommercialItem = "COMMERCIAL_ITEM" 14560 14561 // EntityTypeEvent is a EntityType enum value 14562 EntityTypeEvent = "EVENT" 14563 14564 // EntityTypeDate is a EntityType enum value 14565 EntityTypeDate = "DATE" 14566 14567 // EntityTypeQuantity is a EntityType enum value 14568 EntityTypeQuantity = "QUANTITY" 14569 14570 // EntityTypeTitle is a EntityType enum value 14571 EntityTypeTitle = "TITLE" 14572 14573 // EntityTypeOther is a EntityType enum value 14574 EntityTypeOther = "OTHER" 14575) 14576 14577const ( 14578 // InputFormatOneDocPerFile is a InputFormat enum value 14579 InputFormatOneDocPerFile = "ONE_DOC_PER_FILE" 14580 14581 // InputFormatOneDocPerLine is a InputFormat enum value 14582 InputFormatOneDocPerLine = "ONE_DOC_PER_LINE" 14583) 14584 14585const ( 14586 // JobStatusSubmitted is a JobStatus enum value 14587 JobStatusSubmitted = "SUBMITTED" 14588 14589 // JobStatusInProgress is a JobStatus enum value 14590 JobStatusInProgress = "IN_PROGRESS" 14591 14592 // JobStatusCompleted is a JobStatus enum value 14593 JobStatusCompleted = "COMPLETED" 14594 14595 // JobStatusFailed is a JobStatus enum value 14596 JobStatusFailed = "FAILED" 14597 14598 // JobStatusStopRequested is a JobStatus enum value 14599 JobStatusStopRequested = "STOP_REQUESTED" 14600 14601 // JobStatusStopped is a JobStatus enum value 14602 JobStatusStopped = "STOPPED" 14603) 14604 14605const ( 14606 // LanguageCodeEn is a LanguageCode enum value 14607 LanguageCodeEn = "en" 14608 14609 // LanguageCodeEs is a LanguageCode enum value 14610 LanguageCodeEs = "es" 14611 14612 // LanguageCodeFr is a LanguageCode enum value 14613 LanguageCodeFr = "fr" 14614 14615 // LanguageCodeDe is a LanguageCode enum value 14616 LanguageCodeDe = "de" 14617 14618 // LanguageCodeIt is a LanguageCode enum value 14619 LanguageCodeIt = "it" 14620 14621 // LanguageCodePt is a LanguageCode enum value 14622 LanguageCodePt = "pt" 14623 14624 // LanguageCodeAr is a LanguageCode enum value 14625 LanguageCodeAr = "ar" 14626 14627 // LanguageCodeHi is a LanguageCode enum value 14628 LanguageCodeHi = "hi" 14629 14630 // LanguageCodeJa is a LanguageCode enum value 14631 LanguageCodeJa = "ja" 14632 14633 // LanguageCodeKo is a LanguageCode enum value 14634 LanguageCodeKo = "ko" 14635 14636 // LanguageCodeZh is a LanguageCode enum value 14637 LanguageCodeZh = "zh" 14638 14639 // LanguageCodeZhTw is a LanguageCode enum value 14640 LanguageCodeZhTw = "zh-TW" 14641) 14642 14643const ( 14644 // ModelStatusSubmitted is a ModelStatus enum value 14645 ModelStatusSubmitted = "SUBMITTED" 14646 14647 // ModelStatusTraining is a ModelStatus enum value 14648 ModelStatusTraining = "TRAINING" 14649 14650 // ModelStatusDeleting is a ModelStatus enum value 14651 ModelStatusDeleting = "DELETING" 14652 14653 // ModelStatusStopRequested is a ModelStatus enum value 14654 ModelStatusStopRequested = "STOP_REQUESTED" 14655 14656 // ModelStatusStopped is a ModelStatus enum value 14657 ModelStatusStopped = "STOPPED" 14658 14659 // ModelStatusInError is a ModelStatus enum value 14660 ModelStatusInError = "IN_ERROR" 14661 14662 // ModelStatusTrained is a ModelStatus enum value 14663 ModelStatusTrained = "TRAINED" 14664) 14665 14666const ( 14667 // PartOfSpeechTagTypeAdj is a PartOfSpeechTagType enum value 14668 PartOfSpeechTagTypeAdj = "ADJ" 14669 14670 // PartOfSpeechTagTypeAdp is a PartOfSpeechTagType enum value 14671 PartOfSpeechTagTypeAdp = "ADP" 14672 14673 // PartOfSpeechTagTypeAdv is a PartOfSpeechTagType enum value 14674 PartOfSpeechTagTypeAdv = "ADV" 14675 14676 // PartOfSpeechTagTypeAux is a PartOfSpeechTagType enum value 14677 PartOfSpeechTagTypeAux = "AUX" 14678 14679 // PartOfSpeechTagTypeConj is a PartOfSpeechTagType enum value 14680 PartOfSpeechTagTypeConj = "CONJ" 14681 14682 // PartOfSpeechTagTypeCconj is a PartOfSpeechTagType enum value 14683 PartOfSpeechTagTypeCconj = "CCONJ" 14684 14685 // PartOfSpeechTagTypeDet is a PartOfSpeechTagType enum value 14686 PartOfSpeechTagTypeDet = "DET" 14687 14688 // PartOfSpeechTagTypeIntj is a PartOfSpeechTagType enum value 14689 PartOfSpeechTagTypeIntj = "INTJ" 14690 14691 // PartOfSpeechTagTypeNoun is a PartOfSpeechTagType enum value 14692 PartOfSpeechTagTypeNoun = "NOUN" 14693 14694 // PartOfSpeechTagTypeNum is a PartOfSpeechTagType enum value 14695 PartOfSpeechTagTypeNum = "NUM" 14696 14697 // PartOfSpeechTagTypeO is a PartOfSpeechTagType enum value 14698 PartOfSpeechTagTypeO = "O" 14699 14700 // PartOfSpeechTagTypePart is a PartOfSpeechTagType enum value 14701 PartOfSpeechTagTypePart = "PART" 14702 14703 // PartOfSpeechTagTypePron is a PartOfSpeechTagType enum value 14704 PartOfSpeechTagTypePron = "PRON" 14705 14706 // PartOfSpeechTagTypePropn is a PartOfSpeechTagType enum value 14707 PartOfSpeechTagTypePropn = "PROPN" 14708 14709 // PartOfSpeechTagTypePunct is a PartOfSpeechTagType enum value 14710 PartOfSpeechTagTypePunct = "PUNCT" 14711 14712 // PartOfSpeechTagTypeSconj is a PartOfSpeechTagType enum value 14713 PartOfSpeechTagTypeSconj = "SCONJ" 14714 14715 // PartOfSpeechTagTypeSym is a PartOfSpeechTagType enum value 14716 PartOfSpeechTagTypeSym = "SYM" 14717 14718 // PartOfSpeechTagTypeVerb is a PartOfSpeechTagType enum value 14719 PartOfSpeechTagTypeVerb = "VERB" 14720) 14721 14722const ( 14723 // SentimentTypePositive is a SentimentType enum value 14724 SentimentTypePositive = "POSITIVE" 14725 14726 // SentimentTypeNegative is a SentimentType enum value 14727 SentimentTypeNegative = "NEGATIVE" 14728 14729 // SentimentTypeNeutral is a SentimentType enum value 14730 SentimentTypeNeutral = "NEUTRAL" 14731 14732 // SentimentTypeMixed is a SentimentType enum value 14733 SentimentTypeMixed = "MIXED" 14734) 14735 14736const ( 14737 // SyntaxLanguageCodeEn is a SyntaxLanguageCode enum value 14738 SyntaxLanguageCodeEn = "en" 14739 14740 // SyntaxLanguageCodeEs is a SyntaxLanguageCode enum value 14741 SyntaxLanguageCodeEs = "es" 14742 14743 // SyntaxLanguageCodeFr is a SyntaxLanguageCode enum value 14744 SyntaxLanguageCodeFr = "fr" 14745 14746 // SyntaxLanguageCodeDe is a SyntaxLanguageCode enum value 14747 SyntaxLanguageCodeDe = "de" 14748 14749 // SyntaxLanguageCodeIt is a SyntaxLanguageCode enum value 14750 SyntaxLanguageCodeIt = "it" 14751 14752 // SyntaxLanguageCodePt is a SyntaxLanguageCode enum value 14753 SyntaxLanguageCodePt = "pt" 14754) 14755