1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package translate 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 opCreateParallelData = "CreateParallelData" 17 18// CreateParallelDataRequest generates a "aws/request.Request" representing the 19// client's request for the CreateParallelData 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 CreateParallelData for more information on using the CreateParallelData 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 CreateParallelDataRequest method. 34// req, resp := client.CreateParallelDataRequest(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/translate-2017-07-01/CreateParallelData 42func (c *Translate) CreateParallelDataRequest(input *CreateParallelDataInput) (req *request.Request, output *CreateParallelDataOutput) { 43 op := &request.Operation{ 44 Name: opCreateParallelData, 45 HTTPMethod: "POST", 46 HTTPPath: "/", 47 } 48 49 if input == nil { 50 input = &CreateParallelDataInput{} 51 } 52 53 output = &CreateParallelDataOutput{} 54 req = c.newRequest(op, input, output) 55 return 56} 57 58// CreateParallelData API operation for Amazon Translate. 59// 60// Creates a parallel data resource in Amazon Translate by importing an input 61// file from Amazon S3. Parallel data files contain examples of source phrases 62// and their translations from your translation memory. By adding parallel data, 63// you can influence the style, tone, and word choice in your translation output. 64// 65// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 66// with awserr.Error's Code and Message methods to get detailed information about 67// the error. 68// 69// See the AWS API reference guide for Amazon Translate's 70// API operation CreateParallelData for usage and error information. 71// 72// Returned Error Types: 73// * InvalidParameterValueException 74// The value of the parameter is invalid. Review the value of the parameter 75// you are using to correct it, and then retry your operation. 76// 77// * InvalidRequestException 78// The request that you made is invalid. Check your request to determine why 79// it's invalid and then retry the request. 80// 81// * LimitExceededException 82// The specified limit has been exceeded. Review your request and retry it with 83// a quantity below the stated limit. 84// 85// * TooManyRequestsException 86// You have made too many requests within a short period of time. Wait for a 87// short time and then try your request again. 88// 89// * ConflictException 90// There was a conflict processing the request. Try your request again. 91// 92// * InternalServerException 93// An internal server error occurred. Retry your request. 94// 95// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/CreateParallelData 96func (c *Translate) CreateParallelData(input *CreateParallelDataInput) (*CreateParallelDataOutput, error) { 97 req, out := c.CreateParallelDataRequest(input) 98 return out, req.Send() 99} 100 101// CreateParallelDataWithContext is the same as CreateParallelData with the addition of 102// the ability to pass a context and additional request options. 103// 104// See CreateParallelData for details on how to use this API operation. 105// 106// The context must be non-nil and will be used for request cancellation. If 107// the context is nil a panic will occur. In the future the SDK may create 108// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 109// for more information on using Contexts. 110func (c *Translate) CreateParallelDataWithContext(ctx aws.Context, input *CreateParallelDataInput, opts ...request.Option) (*CreateParallelDataOutput, error) { 111 req, out := c.CreateParallelDataRequest(input) 112 req.SetContext(ctx) 113 req.ApplyOptions(opts...) 114 return out, req.Send() 115} 116 117const opDeleteParallelData = "DeleteParallelData" 118 119// DeleteParallelDataRequest generates a "aws/request.Request" representing the 120// client's request for the DeleteParallelData operation. The "output" return 121// value will be populated with the request's response once the request completes 122// successfully. 123// 124// Use "Send" method on the returned Request to send the API call to the service. 125// the "output" return value is not valid until after Send returns without error. 126// 127// See DeleteParallelData for more information on using the DeleteParallelData 128// API call, and error handling. 129// 130// This method is useful when you want to inject custom logic or configuration 131// into the SDK's request lifecycle. Such as custom headers, or retry logic. 132// 133// 134// // Example sending a request using the DeleteParallelDataRequest method. 135// req, resp := client.DeleteParallelDataRequest(params) 136// 137// err := req.Send() 138// if err == nil { // resp is now filled 139// fmt.Println(resp) 140// } 141// 142// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/DeleteParallelData 143func (c *Translate) DeleteParallelDataRequest(input *DeleteParallelDataInput) (req *request.Request, output *DeleteParallelDataOutput) { 144 op := &request.Operation{ 145 Name: opDeleteParallelData, 146 HTTPMethod: "POST", 147 HTTPPath: "/", 148 } 149 150 if input == nil { 151 input = &DeleteParallelDataInput{} 152 } 153 154 output = &DeleteParallelDataOutput{} 155 req = c.newRequest(op, input, output) 156 return 157} 158 159// DeleteParallelData API operation for Amazon Translate. 160// 161// Deletes a parallel data resource in Amazon Translate. 162// 163// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 164// with awserr.Error's Code and Message methods to get detailed information about 165// the error. 166// 167// See the AWS API reference guide for Amazon Translate's 168// API operation DeleteParallelData for usage and error information. 169// 170// Returned Error Types: 171// * ConcurrentModificationException 172// Another modification is being made. That modification must complete before 173// you can make your change. 174// 175// * ResourceNotFoundException 176// The resource you are looking for has not been found. Review the resource 177// you're looking for and see if a different resource will accomplish your needs 178// before retrying the revised request. 179// 180// * TooManyRequestsException 181// You have made too many requests within a short period of time. Wait for a 182// short time and then try your request again. 183// 184// * InternalServerException 185// An internal server error occurred. Retry your request. 186// 187// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/DeleteParallelData 188func (c *Translate) DeleteParallelData(input *DeleteParallelDataInput) (*DeleteParallelDataOutput, error) { 189 req, out := c.DeleteParallelDataRequest(input) 190 return out, req.Send() 191} 192 193// DeleteParallelDataWithContext is the same as DeleteParallelData with the addition of 194// the ability to pass a context and additional request options. 195// 196// See DeleteParallelData for details on how to use this API operation. 197// 198// The context must be non-nil and will be used for request cancellation. If 199// the context is nil a panic will occur. In the future the SDK may create 200// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 201// for more information on using Contexts. 202func (c *Translate) DeleteParallelDataWithContext(ctx aws.Context, input *DeleteParallelDataInput, opts ...request.Option) (*DeleteParallelDataOutput, error) { 203 req, out := c.DeleteParallelDataRequest(input) 204 req.SetContext(ctx) 205 req.ApplyOptions(opts...) 206 return out, req.Send() 207} 208 209const opDeleteTerminology = "DeleteTerminology" 210 211// DeleteTerminologyRequest generates a "aws/request.Request" representing the 212// client's request for the DeleteTerminology operation. The "output" return 213// value will be populated with the request's response once the request completes 214// successfully. 215// 216// Use "Send" method on the returned Request to send the API call to the service. 217// the "output" return value is not valid until after Send returns without error. 218// 219// See DeleteTerminology for more information on using the DeleteTerminology 220// API call, and error handling. 221// 222// This method is useful when you want to inject custom logic or configuration 223// into the SDK's request lifecycle. Such as custom headers, or retry logic. 224// 225// 226// // Example sending a request using the DeleteTerminologyRequest method. 227// req, resp := client.DeleteTerminologyRequest(params) 228// 229// err := req.Send() 230// if err == nil { // resp is now filled 231// fmt.Println(resp) 232// } 233// 234// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/DeleteTerminology 235func (c *Translate) DeleteTerminologyRequest(input *DeleteTerminologyInput) (req *request.Request, output *DeleteTerminologyOutput) { 236 op := &request.Operation{ 237 Name: opDeleteTerminology, 238 HTTPMethod: "POST", 239 HTTPPath: "/", 240 } 241 242 if input == nil { 243 input = &DeleteTerminologyInput{} 244 } 245 246 output = &DeleteTerminologyOutput{} 247 req = c.newRequest(op, input, output) 248 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 249 return 250} 251 252// DeleteTerminology API operation for Amazon Translate. 253// 254// A synchronous action that deletes a custom terminology. 255// 256// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 257// with awserr.Error's Code and Message methods to get detailed information about 258// the error. 259// 260// See the AWS API reference guide for Amazon Translate's 261// API operation DeleteTerminology for usage and error information. 262// 263// Returned Error Types: 264// * ResourceNotFoundException 265// The resource you are looking for has not been found. Review the resource 266// you're looking for and see if a different resource will accomplish your needs 267// before retrying the revised request. 268// 269// * TooManyRequestsException 270// You have made too many requests within a short period of time. Wait for a 271// short time and then try your request again. 272// 273// * InvalidParameterValueException 274// The value of the parameter is invalid. Review the value of the parameter 275// you are using to correct it, and then retry your operation. 276// 277// * InternalServerException 278// An internal server error occurred. Retry your request. 279// 280// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/DeleteTerminology 281func (c *Translate) DeleteTerminology(input *DeleteTerminologyInput) (*DeleteTerminologyOutput, error) { 282 req, out := c.DeleteTerminologyRequest(input) 283 return out, req.Send() 284} 285 286// DeleteTerminologyWithContext is the same as DeleteTerminology with the addition of 287// the ability to pass a context and additional request options. 288// 289// See DeleteTerminology for details on how to use this API operation. 290// 291// The context must be non-nil and will be used for request cancellation. If 292// the context is nil a panic will occur. In the future the SDK may create 293// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 294// for more information on using Contexts. 295func (c *Translate) DeleteTerminologyWithContext(ctx aws.Context, input *DeleteTerminologyInput, opts ...request.Option) (*DeleteTerminologyOutput, error) { 296 req, out := c.DeleteTerminologyRequest(input) 297 req.SetContext(ctx) 298 req.ApplyOptions(opts...) 299 return out, req.Send() 300} 301 302const opDescribeTextTranslationJob = "DescribeTextTranslationJob" 303 304// DescribeTextTranslationJobRequest generates a "aws/request.Request" representing the 305// client's request for the DescribeTextTranslationJob operation. The "output" return 306// value will be populated with the request's response once the request completes 307// successfully. 308// 309// Use "Send" method on the returned Request to send the API call to the service. 310// the "output" return value is not valid until after Send returns without error. 311// 312// See DescribeTextTranslationJob for more information on using the DescribeTextTranslationJob 313// API call, and error handling. 314// 315// This method is useful when you want to inject custom logic or configuration 316// into the SDK's request lifecycle. Such as custom headers, or retry logic. 317// 318// 319// // Example sending a request using the DescribeTextTranslationJobRequest method. 320// req, resp := client.DescribeTextTranslationJobRequest(params) 321// 322// err := req.Send() 323// if err == nil { // resp is now filled 324// fmt.Println(resp) 325// } 326// 327// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/DescribeTextTranslationJob 328func (c *Translate) DescribeTextTranslationJobRequest(input *DescribeTextTranslationJobInput) (req *request.Request, output *DescribeTextTranslationJobOutput) { 329 op := &request.Operation{ 330 Name: opDescribeTextTranslationJob, 331 HTTPMethod: "POST", 332 HTTPPath: "/", 333 } 334 335 if input == nil { 336 input = &DescribeTextTranslationJobInput{} 337 } 338 339 output = &DescribeTextTranslationJobOutput{} 340 req = c.newRequest(op, input, output) 341 return 342} 343 344// DescribeTextTranslationJob API operation for Amazon Translate. 345// 346// Gets the properties associated with an asycnhronous batch translation job 347// including name, ID, status, source and target languages, input/output S3 348// buckets, and so on. 349// 350// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 351// with awserr.Error's Code and Message methods to get detailed information about 352// the error. 353// 354// See the AWS API reference guide for Amazon Translate's 355// API operation DescribeTextTranslationJob for usage and error information. 356// 357// Returned Error Types: 358// * ResourceNotFoundException 359// The resource you are looking for has not been found. Review the resource 360// you're looking for and see if a different resource will accomplish your needs 361// before retrying the revised request. 362// 363// * TooManyRequestsException 364// You have made too many requests within a short period of time. Wait for a 365// short time and then try your request again. 366// 367// * InternalServerException 368// An internal server error occurred. Retry your request. 369// 370// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/DescribeTextTranslationJob 371func (c *Translate) DescribeTextTranslationJob(input *DescribeTextTranslationJobInput) (*DescribeTextTranslationJobOutput, error) { 372 req, out := c.DescribeTextTranslationJobRequest(input) 373 return out, req.Send() 374} 375 376// DescribeTextTranslationJobWithContext is the same as DescribeTextTranslationJob with the addition of 377// the ability to pass a context and additional request options. 378// 379// See DescribeTextTranslationJob for details on how to use this API operation. 380// 381// The context must be non-nil and will be used for request cancellation. If 382// the context is nil a panic will occur. In the future the SDK may create 383// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 384// for more information on using Contexts. 385func (c *Translate) DescribeTextTranslationJobWithContext(ctx aws.Context, input *DescribeTextTranslationJobInput, opts ...request.Option) (*DescribeTextTranslationJobOutput, error) { 386 req, out := c.DescribeTextTranslationJobRequest(input) 387 req.SetContext(ctx) 388 req.ApplyOptions(opts...) 389 return out, req.Send() 390} 391 392const opGetParallelData = "GetParallelData" 393 394// GetParallelDataRequest generates a "aws/request.Request" representing the 395// client's request for the GetParallelData operation. The "output" return 396// value will be populated with the request's response once the request completes 397// successfully. 398// 399// Use "Send" method on the returned Request to send the API call to the service. 400// the "output" return value is not valid until after Send returns without error. 401// 402// See GetParallelData for more information on using the GetParallelData 403// API call, and error handling. 404// 405// This method is useful when you want to inject custom logic or configuration 406// into the SDK's request lifecycle. Such as custom headers, or retry logic. 407// 408// 409// // Example sending a request using the GetParallelDataRequest method. 410// req, resp := client.GetParallelDataRequest(params) 411// 412// err := req.Send() 413// if err == nil { // resp is now filled 414// fmt.Println(resp) 415// } 416// 417// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/GetParallelData 418func (c *Translate) GetParallelDataRequest(input *GetParallelDataInput) (req *request.Request, output *GetParallelDataOutput) { 419 op := &request.Operation{ 420 Name: opGetParallelData, 421 HTTPMethod: "POST", 422 HTTPPath: "/", 423 } 424 425 if input == nil { 426 input = &GetParallelDataInput{} 427 } 428 429 output = &GetParallelDataOutput{} 430 req = c.newRequest(op, input, output) 431 return 432} 433 434// GetParallelData API operation for Amazon Translate. 435// 436// Provides information about a parallel data resource. 437// 438// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 439// with awserr.Error's Code and Message methods to get detailed information about 440// the error. 441// 442// See the AWS API reference guide for Amazon Translate's 443// API operation GetParallelData for usage and error information. 444// 445// Returned Error Types: 446// * ResourceNotFoundException 447// The resource you are looking for has not been found. Review the resource 448// you're looking for and see if a different resource will accomplish your needs 449// before retrying the revised request. 450// 451// * InvalidParameterValueException 452// The value of the parameter is invalid. Review the value of the parameter 453// you are using to correct it, and then retry your operation. 454// 455// * TooManyRequestsException 456// You have made too many requests within a short period of time. Wait for a 457// short time and then try your request again. 458// 459// * InternalServerException 460// An internal server error occurred. Retry your request. 461// 462// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/GetParallelData 463func (c *Translate) GetParallelData(input *GetParallelDataInput) (*GetParallelDataOutput, error) { 464 req, out := c.GetParallelDataRequest(input) 465 return out, req.Send() 466} 467 468// GetParallelDataWithContext is the same as GetParallelData with the addition of 469// the ability to pass a context and additional request options. 470// 471// See GetParallelData for details on how to use this API operation. 472// 473// The context must be non-nil and will be used for request cancellation. If 474// the context is nil a panic will occur. In the future the SDK may create 475// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 476// for more information on using Contexts. 477func (c *Translate) GetParallelDataWithContext(ctx aws.Context, input *GetParallelDataInput, opts ...request.Option) (*GetParallelDataOutput, error) { 478 req, out := c.GetParallelDataRequest(input) 479 req.SetContext(ctx) 480 req.ApplyOptions(opts...) 481 return out, req.Send() 482} 483 484const opGetTerminology = "GetTerminology" 485 486// GetTerminologyRequest generates a "aws/request.Request" representing the 487// client's request for the GetTerminology operation. The "output" return 488// value will be populated with the request's response once the request completes 489// successfully. 490// 491// Use "Send" method on the returned Request to send the API call to the service. 492// the "output" return value is not valid until after Send returns without error. 493// 494// See GetTerminology for more information on using the GetTerminology 495// API call, and error handling. 496// 497// This method is useful when you want to inject custom logic or configuration 498// into the SDK's request lifecycle. Such as custom headers, or retry logic. 499// 500// 501// // Example sending a request using the GetTerminologyRequest method. 502// req, resp := client.GetTerminologyRequest(params) 503// 504// err := req.Send() 505// if err == nil { // resp is now filled 506// fmt.Println(resp) 507// } 508// 509// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/GetTerminology 510func (c *Translate) GetTerminologyRequest(input *GetTerminologyInput) (req *request.Request, output *GetTerminologyOutput) { 511 op := &request.Operation{ 512 Name: opGetTerminology, 513 HTTPMethod: "POST", 514 HTTPPath: "/", 515 } 516 517 if input == nil { 518 input = &GetTerminologyInput{} 519 } 520 521 output = &GetTerminologyOutput{} 522 req = c.newRequest(op, input, output) 523 return 524} 525 526// GetTerminology API operation for Amazon Translate. 527// 528// Retrieves a custom terminology. 529// 530// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 531// with awserr.Error's Code and Message methods to get detailed information about 532// the error. 533// 534// See the AWS API reference guide for Amazon Translate's 535// API operation GetTerminology for usage and error information. 536// 537// Returned Error Types: 538// * ResourceNotFoundException 539// The resource you are looking for has not been found. Review the resource 540// you're looking for and see if a different resource will accomplish your needs 541// before retrying the revised request. 542// 543// * InvalidParameterValueException 544// The value of the parameter is invalid. Review the value of the parameter 545// you are using to correct it, and then retry your operation. 546// 547// * TooManyRequestsException 548// You have made too many requests within a short period of time. Wait for a 549// short time and then try your request again. 550// 551// * InternalServerException 552// An internal server error occurred. Retry your request. 553// 554// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/GetTerminology 555func (c *Translate) GetTerminology(input *GetTerminologyInput) (*GetTerminologyOutput, error) { 556 req, out := c.GetTerminologyRequest(input) 557 return out, req.Send() 558} 559 560// GetTerminologyWithContext is the same as GetTerminology with the addition of 561// the ability to pass a context and additional request options. 562// 563// See GetTerminology for details on how to use this API operation. 564// 565// The context must be non-nil and will be used for request cancellation. If 566// the context is nil a panic will occur. In the future the SDK may create 567// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 568// for more information on using Contexts. 569func (c *Translate) GetTerminologyWithContext(ctx aws.Context, input *GetTerminologyInput, opts ...request.Option) (*GetTerminologyOutput, error) { 570 req, out := c.GetTerminologyRequest(input) 571 req.SetContext(ctx) 572 req.ApplyOptions(opts...) 573 return out, req.Send() 574} 575 576const opImportTerminology = "ImportTerminology" 577 578// ImportTerminologyRequest generates a "aws/request.Request" representing the 579// client's request for the ImportTerminology operation. The "output" return 580// value will be populated with the request's response once the request completes 581// successfully. 582// 583// Use "Send" method on the returned Request to send the API call to the service. 584// the "output" return value is not valid until after Send returns without error. 585// 586// See ImportTerminology for more information on using the ImportTerminology 587// API call, and error handling. 588// 589// This method is useful when you want to inject custom logic or configuration 590// into the SDK's request lifecycle. Such as custom headers, or retry logic. 591// 592// 593// // Example sending a request using the ImportTerminologyRequest method. 594// req, resp := client.ImportTerminologyRequest(params) 595// 596// err := req.Send() 597// if err == nil { // resp is now filled 598// fmt.Println(resp) 599// } 600// 601// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/ImportTerminology 602func (c *Translate) ImportTerminologyRequest(input *ImportTerminologyInput) (req *request.Request, output *ImportTerminologyOutput) { 603 op := &request.Operation{ 604 Name: opImportTerminology, 605 HTTPMethod: "POST", 606 HTTPPath: "/", 607 } 608 609 if input == nil { 610 input = &ImportTerminologyInput{} 611 } 612 613 output = &ImportTerminologyOutput{} 614 req = c.newRequest(op, input, output) 615 return 616} 617 618// ImportTerminology API operation for Amazon Translate. 619// 620// Creates or updates a custom terminology, depending on whether or not one 621// already exists for the given terminology name. Importing a terminology with 622// the same name as an existing one will merge the terminologies based on the 623// chosen merge strategy. Currently, the only supported merge strategy is OVERWRITE, 624// and so the imported terminology will overwrite an existing terminology of 625// the same name. 626// 627// If you import a terminology that overwrites an existing one, the new terminology 628// take up to 10 minutes to fully propagate and be available for use in a translation 629// due to cache policies with the DataPlane service that performs the translations. 630// 631// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 632// with awserr.Error's Code and Message methods to get detailed information about 633// the error. 634// 635// See the AWS API reference guide for Amazon Translate's 636// API operation ImportTerminology for usage and error information. 637// 638// Returned Error Types: 639// * InvalidParameterValueException 640// The value of the parameter is invalid. Review the value of the parameter 641// you are using to correct it, and then retry your operation. 642// 643// * LimitExceededException 644// The specified limit has been exceeded. Review your request and retry it with 645// a quantity below the stated limit. 646// 647// * TooManyRequestsException 648// You have made too many requests within a short period of time. Wait for a 649// short time and then try your request again. 650// 651// * InternalServerException 652// An internal server error occurred. Retry your request. 653// 654// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/ImportTerminology 655func (c *Translate) ImportTerminology(input *ImportTerminologyInput) (*ImportTerminologyOutput, error) { 656 req, out := c.ImportTerminologyRequest(input) 657 return out, req.Send() 658} 659 660// ImportTerminologyWithContext is the same as ImportTerminology with the addition of 661// the ability to pass a context and additional request options. 662// 663// See ImportTerminology for details on how to use this API operation. 664// 665// The context must be non-nil and will be used for request cancellation. If 666// the context is nil a panic will occur. In the future the SDK may create 667// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 668// for more information on using Contexts. 669func (c *Translate) ImportTerminologyWithContext(ctx aws.Context, input *ImportTerminologyInput, opts ...request.Option) (*ImportTerminologyOutput, error) { 670 req, out := c.ImportTerminologyRequest(input) 671 req.SetContext(ctx) 672 req.ApplyOptions(opts...) 673 return out, req.Send() 674} 675 676const opListParallelData = "ListParallelData" 677 678// ListParallelDataRequest generates a "aws/request.Request" representing the 679// client's request for the ListParallelData operation. The "output" return 680// value will be populated with the request's response once the request completes 681// successfully. 682// 683// Use "Send" method on the returned Request to send the API call to the service. 684// the "output" return value is not valid until after Send returns without error. 685// 686// See ListParallelData for more information on using the ListParallelData 687// API call, and error handling. 688// 689// This method is useful when you want to inject custom logic or configuration 690// into the SDK's request lifecycle. Such as custom headers, or retry logic. 691// 692// 693// // Example sending a request using the ListParallelDataRequest method. 694// req, resp := client.ListParallelDataRequest(params) 695// 696// err := req.Send() 697// if err == nil { // resp is now filled 698// fmt.Println(resp) 699// } 700// 701// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/ListParallelData 702func (c *Translate) ListParallelDataRequest(input *ListParallelDataInput) (req *request.Request, output *ListParallelDataOutput) { 703 op := &request.Operation{ 704 Name: opListParallelData, 705 HTTPMethod: "POST", 706 HTTPPath: "/", 707 Paginator: &request.Paginator{ 708 InputTokens: []string{"NextToken"}, 709 OutputTokens: []string{"NextToken"}, 710 LimitToken: "MaxResults", 711 TruncationToken: "", 712 }, 713 } 714 715 if input == nil { 716 input = &ListParallelDataInput{} 717 } 718 719 output = &ListParallelDataOutput{} 720 req = c.newRequest(op, input, output) 721 return 722} 723 724// ListParallelData API operation for Amazon Translate. 725// 726// Provides a list of your parallel data resources in Amazon Translate. 727// 728// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 729// with awserr.Error's Code and Message methods to get detailed information about 730// the error. 731// 732// See the AWS API reference guide for Amazon Translate's 733// API operation ListParallelData for usage and error information. 734// 735// Returned Error Types: 736// * InvalidParameterValueException 737// The value of the parameter is invalid. Review the value of the parameter 738// you are using to correct it, and then retry your operation. 739// 740// * TooManyRequestsException 741// You have made too many requests within a short period of time. Wait for a 742// short time and then try your request again. 743// 744// * InternalServerException 745// An internal server error occurred. Retry your request. 746// 747// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/ListParallelData 748func (c *Translate) ListParallelData(input *ListParallelDataInput) (*ListParallelDataOutput, error) { 749 req, out := c.ListParallelDataRequest(input) 750 return out, req.Send() 751} 752 753// ListParallelDataWithContext is the same as ListParallelData with the addition of 754// the ability to pass a context and additional request options. 755// 756// See ListParallelData for details on how to use this API operation. 757// 758// The context must be non-nil and will be used for request cancellation. If 759// the context is nil a panic will occur. In the future the SDK may create 760// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 761// for more information on using Contexts. 762func (c *Translate) ListParallelDataWithContext(ctx aws.Context, input *ListParallelDataInput, opts ...request.Option) (*ListParallelDataOutput, error) { 763 req, out := c.ListParallelDataRequest(input) 764 req.SetContext(ctx) 765 req.ApplyOptions(opts...) 766 return out, req.Send() 767} 768 769// ListParallelDataPages iterates over the pages of a ListParallelData operation, 770// calling the "fn" function with the response data for each page. To stop 771// iterating, return false from the fn function. 772// 773// See ListParallelData method for more information on how to use this operation. 774// 775// Note: This operation can generate multiple requests to a service. 776// 777// // Example iterating over at most 3 pages of a ListParallelData operation. 778// pageNum := 0 779// err := client.ListParallelDataPages(params, 780// func(page *translate.ListParallelDataOutput, lastPage bool) bool { 781// pageNum++ 782// fmt.Println(page) 783// return pageNum <= 3 784// }) 785// 786func (c *Translate) ListParallelDataPages(input *ListParallelDataInput, fn func(*ListParallelDataOutput, bool) bool) error { 787 return c.ListParallelDataPagesWithContext(aws.BackgroundContext(), input, fn) 788} 789 790// ListParallelDataPagesWithContext same as ListParallelDataPages except 791// it takes a Context and allows setting request options on the pages. 792// 793// The context must be non-nil and will be used for request cancellation. If 794// the context is nil a panic will occur. In the future the SDK may create 795// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 796// for more information on using Contexts. 797func (c *Translate) ListParallelDataPagesWithContext(ctx aws.Context, input *ListParallelDataInput, fn func(*ListParallelDataOutput, bool) bool, opts ...request.Option) error { 798 p := request.Pagination{ 799 NewRequest: func() (*request.Request, error) { 800 var inCpy *ListParallelDataInput 801 if input != nil { 802 tmp := *input 803 inCpy = &tmp 804 } 805 req, _ := c.ListParallelDataRequest(inCpy) 806 req.SetContext(ctx) 807 req.ApplyOptions(opts...) 808 return req, nil 809 }, 810 } 811 812 for p.Next() { 813 if !fn(p.Page().(*ListParallelDataOutput), !p.HasNextPage()) { 814 break 815 } 816 } 817 818 return p.Err() 819} 820 821const opListTerminologies = "ListTerminologies" 822 823// ListTerminologiesRequest generates a "aws/request.Request" representing the 824// client's request for the ListTerminologies operation. The "output" return 825// value will be populated with the request's response once the request completes 826// successfully. 827// 828// Use "Send" method on the returned Request to send the API call to the service. 829// the "output" return value is not valid until after Send returns without error. 830// 831// See ListTerminologies for more information on using the ListTerminologies 832// API call, and error handling. 833// 834// This method is useful when you want to inject custom logic or configuration 835// into the SDK's request lifecycle. Such as custom headers, or retry logic. 836// 837// 838// // Example sending a request using the ListTerminologiesRequest method. 839// req, resp := client.ListTerminologiesRequest(params) 840// 841// err := req.Send() 842// if err == nil { // resp is now filled 843// fmt.Println(resp) 844// } 845// 846// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/ListTerminologies 847func (c *Translate) ListTerminologiesRequest(input *ListTerminologiesInput) (req *request.Request, output *ListTerminologiesOutput) { 848 op := &request.Operation{ 849 Name: opListTerminologies, 850 HTTPMethod: "POST", 851 HTTPPath: "/", 852 Paginator: &request.Paginator{ 853 InputTokens: []string{"NextToken"}, 854 OutputTokens: []string{"NextToken"}, 855 LimitToken: "MaxResults", 856 TruncationToken: "", 857 }, 858 } 859 860 if input == nil { 861 input = &ListTerminologiesInput{} 862 } 863 864 output = &ListTerminologiesOutput{} 865 req = c.newRequest(op, input, output) 866 return 867} 868 869// ListTerminologies API operation for Amazon Translate. 870// 871// Provides a list of custom terminologies associated with your account. 872// 873// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 874// with awserr.Error's Code and Message methods to get detailed information about 875// the error. 876// 877// See the AWS API reference guide for Amazon Translate's 878// API operation ListTerminologies for usage and error information. 879// 880// Returned Error Types: 881// * InvalidParameterValueException 882// The value of the parameter is invalid. Review the value of the parameter 883// you are using to correct it, and then retry your operation. 884// 885// * TooManyRequestsException 886// You have made too many requests within a short period of time. Wait for a 887// short time and then try your request again. 888// 889// * InternalServerException 890// An internal server error occurred. Retry your request. 891// 892// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/ListTerminologies 893func (c *Translate) ListTerminologies(input *ListTerminologiesInput) (*ListTerminologiesOutput, error) { 894 req, out := c.ListTerminologiesRequest(input) 895 return out, req.Send() 896} 897 898// ListTerminologiesWithContext is the same as ListTerminologies with the addition of 899// the ability to pass a context and additional request options. 900// 901// See ListTerminologies for details on how to use this API operation. 902// 903// The context must be non-nil and will be used for request cancellation. If 904// the context is nil a panic will occur. In the future the SDK may create 905// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 906// for more information on using Contexts. 907func (c *Translate) ListTerminologiesWithContext(ctx aws.Context, input *ListTerminologiesInput, opts ...request.Option) (*ListTerminologiesOutput, error) { 908 req, out := c.ListTerminologiesRequest(input) 909 req.SetContext(ctx) 910 req.ApplyOptions(opts...) 911 return out, req.Send() 912} 913 914// ListTerminologiesPages iterates over the pages of a ListTerminologies operation, 915// calling the "fn" function with the response data for each page. To stop 916// iterating, return false from the fn function. 917// 918// See ListTerminologies method for more information on how to use this operation. 919// 920// Note: This operation can generate multiple requests to a service. 921// 922// // Example iterating over at most 3 pages of a ListTerminologies operation. 923// pageNum := 0 924// err := client.ListTerminologiesPages(params, 925// func(page *translate.ListTerminologiesOutput, lastPage bool) bool { 926// pageNum++ 927// fmt.Println(page) 928// return pageNum <= 3 929// }) 930// 931func (c *Translate) ListTerminologiesPages(input *ListTerminologiesInput, fn func(*ListTerminologiesOutput, bool) bool) error { 932 return c.ListTerminologiesPagesWithContext(aws.BackgroundContext(), input, fn) 933} 934 935// ListTerminologiesPagesWithContext same as ListTerminologiesPages except 936// it takes a Context and allows setting request options on the pages. 937// 938// The context must be non-nil and will be used for request cancellation. If 939// the context is nil a panic will occur. In the future the SDK may create 940// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 941// for more information on using Contexts. 942func (c *Translate) ListTerminologiesPagesWithContext(ctx aws.Context, input *ListTerminologiesInput, fn func(*ListTerminologiesOutput, bool) bool, opts ...request.Option) error { 943 p := request.Pagination{ 944 NewRequest: func() (*request.Request, error) { 945 var inCpy *ListTerminologiesInput 946 if input != nil { 947 tmp := *input 948 inCpy = &tmp 949 } 950 req, _ := c.ListTerminologiesRequest(inCpy) 951 req.SetContext(ctx) 952 req.ApplyOptions(opts...) 953 return req, nil 954 }, 955 } 956 957 for p.Next() { 958 if !fn(p.Page().(*ListTerminologiesOutput), !p.HasNextPage()) { 959 break 960 } 961 } 962 963 return p.Err() 964} 965 966const opListTextTranslationJobs = "ListTextTranslationJobs" 967 968// ListTextTranslationJobsRequest generates a "aws/request.Request" representing the 969// client's request for the ListTextTranslationJobs operation. The "output" return 970// value will be populated with the request's response once the request completes 971// successfully. 972// 973// Use "Send" method on the returned Request to send the API call to the service. 974// the "output" return value is not valid until after Send returns without error. 975// 976// See ListTextTranslationJobs for more information on using the ListTextTranslationJobs 977// API call, and error handling. 978// 979// This method is useful when you want to inject custom logic or configuration 980// into the SDK's request lifecycle. Such as custom headers, or retry logic. 981// 982// 983// // Example sending a request using the ListTextTranslationJobsRequest method. 984// req, resp := client.ListTextTranslationJobsRequest(params) 985// 986// err := req.Send() 987// if err == nil { // resp is now filled 988// fmt.Println(resp) 989// } 990// 991// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/ListTextTranslationJobs 992func (c *Translate) ListTextTranslationJobsRequest(input *ListTextTranslationJobsInput) (req *request.Request, output *ListTextTranslationJobsOutput) { 993 op := &request.Operation{ 994 Name: opListTextTranslationJobs, 995 HTTPMethod: "POST", 996 HTTPPath: "/", 997 Paginator: &request.Paginator{ 998 InputTokens: []string{"NextToken"}, 999 OutputTokens: []string{"NextToken"}, 1000 LimitToken: "MaxResults", 1001 TruncationToken: "", 1002 }, 1003 } 1004 1005 if input == nil { 1006 input = &ListTextTranslationJobsInput{} 1007 } 1008 1009 output = &ListTextTranslationJobsOutput{} 1010 req = c.newRequest(op, input, output) 1011 return 1012} 1013 1014// ListTextTranslationJobs API operation for Amazon Translate. 1015// 1016// Gets a list of the batch translation jobs that you have submitted. 1017// 1018// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1019// with awserr.Error's Code and Message methods to get detailed information about 1020// the error. 1021// 1022// See the AWS API reference guide for Amazon Translate's 1023// API operation ListTextTranslationJobs for usage and error information. 1024// 1025// Returned Error Types: 1026// * InvalidRequestException 1027// The request that you made is invalid. Check your request to determine why 1028// it's invalid and then retry the request. 1029// 1030// * TooManyRequestsException 1031// You have made too many requests within a short period of time. Wait for a 1032// short time and then try your request again. 1033// 1034// * InvalidFilterException 1035// The filter specified for the operation is invalid. Specify a different filter. 1036// 1037// * InternalServerException 1038// An internal server error occurred. Retry your request. 1039// 1040// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/ListTextTranslationJobs 1041func (c *Translate) ListTextTranslationJobs(input *ListTextTranslationJobsInput) (*ListTextTranslationJobsOutput, error) { 1042 req, out := c.ListTextTranslationJobsRequest(input) 1043 return out, req.Send() 1044} 1045 1046// ListTextTranslationJobsWithContext is the same as ListTextTranslationJobs with the addition of 1047// the ability to pass a context and additional request options. 1048// 1049// See ListTextTranslationJobs for details on how to use this API operation. 1050// 1051// The context must be non-nil and will be used for request cancellation. If 1052// the context is nil a panic will occur. In the future the SDK may create 1053// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1054// for more information on using Contexts. 1055func (c *Translate) ListTextTranslationJobsWithContext(ctx aws.Context, input *ListTextTranslationJobsInput, opts ...request.Option) (*ListTextTranslationJobsOutput, error) { 1056 req, out := c.ListTextTranslationJobsRequest(input) 1057 req.SetContext(ctx) 1058 req.ApplyOptions(opts...) 1059 return out, req.Send() 1060} 1061 1062// ListTextTranslationJobsPages iterates over the pages of a ListTextTranslationJobs operation, 1063// calling the "fn" function with the response data for each page. To stop 1064// iterating, return false from the fn function. 1065// 1066// See ListTextTranslationJobs method for more information on how to use this operation. 1067// 1068// Note: This operation can generate multiple requests to a service. 1069// 1070// // Example iterating over at most 3 pages of a ListTextTranslationJobs operation. 1071// pageNum := 0 1072// err := client.ListTextTranslationJobsPages(params, 1073// func(page *translate.ListTextTranslationJobsOutput, lastPage bool) bool { 1074// pageNum++ 1075// fmt.Println(page) 1076// return pageNum <= 3 1077// }) 1078// 1079func (c *Translate) ListTextTranslationJobsPages(input *ListTextTranslationJobsInput, fn func(*ListTextTranslationJobsOutput, bool) bool) error { 1080 return c.ListTextTranslationJobsPagesWithContext(aws.BackgroundContext(), input, fn) 1081} 1082 1083// ListTextTranslationJobsPagesWithContext same as ListTextTranslationJobsPages except 1084// it takes a Context and allows setting request options on the pages. 1085// 1086// The context must be non-nil and will be used for request cancellation. If 1087// the context is nil a panic will occur. In the future the SDK may create 1088// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1089// for more information on using Contexts. 1090func (c *Translate) ListTextTranslationJobsPagesWithContext(ctx aws.Context, input *ListTextTranslationJobsInput, fn func(*ListTextTranslationJobsOutput, bool) bool, opts ...request.Option) error { 1091 p := request.Pagination{ 1092 NewRequest: func() (*request.Request, error) { 1093 var inCpy *ListTextTranslationJobsInput 1094 if input != nil { 1095 tmp := *input 1096 inCpy = &tmp 1097 } 1098 req, _ := c.ListTextTranslationJobsRequest(inCpy) 1099 req.SetContext(ctx) 1100 req.ApplyOptions(opts...) 1101 return req, nil 1102 }, 1103 } 1104 1105 for p.Next() { 1106 if !fn(p.Page().(*ListTextTranslationJobsOutput), !p.HasNextPage()) { 1107 break 1108 } 1109 } 1110 1111 return p.Err() 1112} 1113 1114const opStartTextTranslationJob = "StartTextTranslationJob" 1115 1116// StartTextTranslationJobRequest generates a "aws/request.Request" representing the 1117// client's request for the StartTextTranslationJob operation. The "output" return 1118// value will be populated with the request's response once the request completes 1119// successfully. 1120// 1121// Use "Send" method on the returned Request to send the API call to the service. 1122// the "output" return value is not valid until after Send returns without error. 1123// 1124// See StartTextTranslationJob for more information on using the StartTextTranslationJob 1125// API call, and error handling. 1126// 1127// This method is useful when you want to inject custom logic or configuration 1128// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1129// 1130// 1131// // Example sending a request using the StartTextTranslationJobRequest method. 1132// req, resp := client.StartTextTranslationJobRequest(params) 1133// 1134// err := req.Send() 1135// if err == nil { // resp is now filled 1136// fmt.Println(resp) 1137// } 1138// 1139// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/StartTextTranslationJob 1140func (c *Translate) StartTextTranslationJobRequest(input *StartTextTranslationJobInput) (req *request.Request, output *StartTextTranslationJobOutput) { 1141 op := &request.Operation{ 1142 Name: opStartTextTranslationJob, 1143 HTTPMethod: "POST", 1144 HTTPPath: "/", 1145 } 1146 1147 if input == nil { 1148 input = &StartTextTranslationJobInput{} 1149 } 1150 1151 output = &StartTextTranslationJobOutput{} 1152 req = c.newRequest(op, input, output) 1153 return 1154} 1155 1156// StartTextTranslationJob API operation for Amazon Translate. 1157// 1158// Starts an asynchronous batch translation job. Batch translation jobs can 1159// be used to translate large volumes of text across multiple documents at once. 1160// For more information, see async. 1161// 1162// Batch translation jobs can be described with the DescribeTextTranslationJob 1163// operation, listed with the ListTextTranslationJobs operation, and stopped 1164// with the StopTextTranslationJob operation. 1165// 1166// Amazon Translate does not support batch translation of multiple source languages 1167// at once. 1168// 1169// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1170// with awserr.Error's Code and Message methods to get detailed information about 1171// the error. 1172// 1173// See the AWS API reference guide for Amazon Translate's 1174// API operation StartTextTranslationJob for usage and error information. 1175// 1176// Returned Error Types: 1177// * TooManyRequestsException 1178// You have made too many requests within a short period of time. Wait for a 1179// short time and then try your request again. 1180// 1181// * UnsupportedLanguagePairException 1182// Amazon Translate does not support translation from the language of the source 1183// text into the requested target language. For more information, see how-to-error-msg. 1184// 1185// * InvalidRequestException 1186// The request that you made is invalid. Check your request to determine why 1187// it's invalid and then retry the request. 1188// 1189// * ResourceNotFoundException 1190// The resource you are looking for has not been found. Review the resource 1191// you're looking for and see if a different resource will accomplish your needs 1192// before retrying the revised request. 1193// 1194// * InternalServerException 1195// An internal server error occurred. Retry your request. 1196// 1197// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/StartTextTranslationJob 1198func (c *Translate) StartTextTranslationJob(input *StartTextTranslationJobInput) (*StartTextTranslationJobOutput, error) { 1199 req, out := c.StartTextTranslationJobRequest(input) 1200 return out, req.Send() 1201} 1202 1203// StartTextTranslationJobWithContext is the same as StartTextTranslationJob with the addition of 1204// the ability to pass a context and additional request options. 1205// 1206// See StartTextTranslationJob for details on how to use this API operation. 1207// 1208// The context must be non-nil and will be used for request cancellation. If 1209// the context is nil a panic will occur. In the future the SDK may create 1210// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1211// for more information on using Contexts. 1212func (c *Translate) StartTextTranslationJobWithContext(ctx aws.Context, input *StartTextTranslationJobInput, opts ...request.Option) (*StartTextTranslationJobOutput, error) { 1213 req, out := c.StartTextTranslationJobRequest(input) 1214 req.SetContext(ctx) 1215 req.ApplyOptions(opts...) 1216 return out, req.Send() 1217} 1218 1219const opStopTextTranslationJob = "StopTextTranslationJob" 1220 1221// StopTextTranslationJobRequest generates a "aws/request.Request" representing the 1222// client's request for the StopTextTranslationJob operation. The "output" return 1223// value will be populated with the request's response once the request completes 1224// successfully. 1225// 1226// Use "Send" method on the returned Request to send the API call to the service. 1227// the "output" return value is not valid until after Send returns without error. 1228// 1229// See StopTextTranslationJob for more information on using the StopTextTranslationJob 1230// API call, and error handling. 1231// 1232// This method is useful when you want to inject custom logic or configuration 1233// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1234// 1235// 1236// // Example sending a request using the StopTextTranslationJobRequest method. 1237// req, resp := client.StopTextTranslationJobRequest(params) 1238// 1239// err := req.Send() 1240// if err == nil { // resp is now filled 1241// fmt.Println(resp) 1242// } 1243// 1244// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/StopTextTranslationJob 1245func (c *Translate) StopTextTranslationJobRequest(input *StopTextTranslationJobInput) (req *request.Request, output *StopTextTranslationJobOutput) { 1246 op := &request.Operation{ 1247 Name: opStopTextTranslationJob, 1248 HTTPMethod: "POST", 1249 HTTPPath: "/", 1250 } 1251 1252 if input == nil { 1253 input = &StopTextTranslationJobInput{} 1254 } 1255 1256 output = &StopTextTranslationJobOutput{} 1257 req = c.newRequest(op, input, output) 1258 return 1259} 1260 1261// StopTextTranslationJob API operation for Amazon Translate. 1262// 1263// Stops an asynchronous batch translation job that is in progress. 1264// 1265// If the job's state is IN_PROGRESS, the job will be marked for termination 1266// and put into the STOP_REQUESTED state. If the job completes before it can 1267// be stopped, it is put into the COMPLETED state. Otherwise, the job is put 1268// into the STOPPED state. 1269// 1270// Asynchronous batch translation jobs are started with the StartTextTranslationJob 1271// operation. You can use the DescribeTextTranslationJob or ListTextTranslationJobs 1272// operations to get a batch translation job's JobId. 1273// 1274// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1275// with awserr.Error's Code and Message methods to get detailed information about 1276// the error. 1277// 1278// See the AWS API reference guide for Amazon Translate's 1279// API operation StopTextTranslationJob for usage and error information. 1280// 1281// Returned Error Types: 1282// * ResourceNotFoundException 1283// The resource you are looking for has not been found. Review the resource 1284// you're looking for and see if a different resource will accomplish your needs 1285// before retrying the revised request. 1286// 1287// * TooManyRequestsException 1288// You have made too many requests within a short period of time. Wait for a 1289// short time and then try your request again. 1290// 1291// * InternalServerException 1292// An internal server error occurred. Retry your request. 1293// 1294// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/StopTextTranslationJob 1295func (c *Translate) StopTextTranslationJob(input *StopTextTranslationJobInput) (*StopTextTranslationJobOutput, error) { 1296 req, out := c.StopTextTranslationJobRequest(input) 1297 return out, req.Send() 1298} 1299 1300// StopTextTranslationJobWithContext is the same as StopTextTranslationJob with the addition of 1301// the ability to pass a context and additional request options. 1302// 1303// See StopTextTranslationJob for details on how to use this API operation. 1304// 1305// The context must be non-nil and will be used for request cancellation. If 1306// the context is nil a panic will occur. In the future the SDK may create 1307// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1308// for more information on using Contexts. 1309func (c *Translate) StopTextTranslationJobWithContext(ctx aws.Context, input *StopTextTranslationJobInput, opts ...request.Option) (*StopTextTranslationJobOutput, error) { 1310 req, out := c.StopTextTranslationJobRequest(input) 1311 req.SetContext(ctx) 1312 req.ApplyOptions(opts...) 1313 return out, req.Send() 1314} 1315 1316const opText = "TranslateText" 1317 1318// TextRequest generates a "aws/request.Request" representing the 1319// client's request for the Text operation. The "output" return 1320// value will be populated with the request's response once the request completes 1321// successfully. 1322// 1323// Use "Send" method on the returned Request to send the API call to the service. 1324// the "output" return value is not valid until after Send returns without error. 1325// 1326// See Text for more information on using the Text 1327// API call, and error handling. 1328// 1329// This method is useful when you want to inject custom logic or configuration 1330// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1331// 1332// 1333// // Example sending a request using the TextRequest method. 1334// req, resp := client.TextRequest(params) 1335// 1336// err := req.Send() 1337// if err == nil { // resp is now filled 1338// fmt.Println(resp) 1339// } 1340// 1341// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/Text 1342func (c *Translate) TextRequest(input *TextInput) (req *request.Request, output *TextOutput) { 1343 op := &request.Operation{ 1344 Name: opText, 1345 HTTPMethod: "POST", 1346 HTTPPath: "/", 1347 } 1348 1349 if input == nil { 1350 input = &TextInput{} 1351 } 1352 1353 output = &TextOutput{} 1354 req = c.newRequest(op, input, output) 1355 return 1356} 1357 1358// Text API operation for Amazon Translate. 1359// 1360// Translates input text from the source language to the target language. For 1361// a list of available languages and language codes, see what-is-languages. 1362// 1363// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1364// with awserr.Error's Code and Message methods to get detailed information about 1365// the error. 1366// 1367// See the AWS API reference guide for Amazon Translate's 1368// API operation Text for usage and error information. 1369// 1370// Returned Error Types: 1371// * InvalidRequestException 1372// The request that you made is invalid. Check your request to determine why 1373// it's invalid and then retry the request. 1374// 1375// * TextSizeLimitExceededException 1376// The size of the text you submitted exceeds the size limit. Reduce the size 1377// of the text or use a smaller document and then retry your request. 1378// 1379// * TooManyRequestsException 1380// You have made too many requests within a short period of time. Wait for a 1381// short time and then try your request again. 1382// 1383// * UnsupportedLanguagePairException 1384// Amazon Translate does not support translation from the language of the source 1385// text into the requested target language. For more information, see how-to-error-msg. 1386// 1387// * DetectedLanguageLowConfidenceException 1388// The confidence that Amazon Comprehend accurately detected the source language 1389// is low. If a low confidence level is acceptable for your application, you 1390// can use the language in the exception to call Amazon Translate again. For 1391// more information, see the DetectDominantLanguage (https://docs.aws.amazon.com/comprehend/latest/dg/API_DetectDominantLanguage.html) 1392// operation in the Amazon Comprehend Developer Guide. 1393// 1394// * ResourceNotFoundException 1395// The resource you are looking for has not been found. Review the resource 1396// you're looking for and see if a different resource will accomplish your needs 1397// before retrying the revised request. 1398// 1399// * InternalServerException 1400// An internal server error occurred. Retry your request. 1401// 1402// * ServiceUnavailableException 1403// The Amazon Translate service is temporarily unavailable. Please wait a bit 1404// and then retry your request. 1405// 1406// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/Text 1407func (c *Translate) Text(input *TextInput) (*TextOutput, error) { 1408 req, out := c.TextRequest(input) 1409 return out, req.Send() 1410} 1411 1412// TextWithContext is the same as Text with the addition of 1413// the ability to pass a context and additional request options. 1414// 1415// See Text for details on how to use this API operation. 1416// 1417// The context must be non-nil and will be used for request cancellation. If 1418// the context is nil a panic will occur. In the future the SDK may create 1419// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1420// for more information on using Contexts. 1421func (c *Translate) TextWithContext(ctx aws.Context, input *TextInput, opts ...request.Option) (*TextOutput, error) { 1422 req, out := c.TextRequest(input) 1423 req.SetContext(ctx) 1424 req.ApplyOptions(opts...) 1425 return out, req.Send() 1426} 1427 1428const opUpdateParallelData = "UpdateParallelData" 1429 1430// UpdateParallelDataRequest generates a "aws/request.Request" representing the 1431// client's request for the UpdateParallelData operation. The "output" return 1432// value will be populated with the request's response once the request completes 1433// successfully. 1434// 1435// Use "Send" method on the returned Request to send the API call to the service. 1436// the "output" return value is not valid until after Send returns without error. 1437// 1438// See UpdateParallelData for more information on using the UpdateParallelData 1439// API call, and error handling. 1440// 1441// This method is useful when you want to inject custom logic or configuration 1442// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1443// 1444// 1445// // Example sending a request using the UpdateParallelDataRequest method. 1446// req, resp := client.UpdateParallelDataRequest(params) 1447// 1448// err := req.Send() 1449// if err == nil { // resp is now filled 1450// fmt.Println(resp) 1451// } 1452// 1453// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/UpdateParallelData 1454func (c *Translate) UpdateParallelDataRequest(input *UpdateParallelDataInput) (req *request.Request, output *UpdateParallelDataOutput) { 1455 op := &request.Operation{ 1456 Name: opUpdateParallelData, 1457 HTTPMethod: "POST", 1458 HTTPPath: "/", 1459 } 1460 1461 if input == nil { 1462 input = &UpdateParallelDataInput{} 1463 } 1464 1465 output = &UpdateParallelDataOutput{} 1466 req = c.newRequest(op, input, output) 1467 return 1468} 1469 1470// UpdateParallelData API operation for Amazon Translate. 1471// 1472// Updates a previously created parallel data resource by importing a new input 1473// file from Amazon S3. 1474// 1475// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1476// with awserr.Error's Code and Message methods to get detailed information about 1477// the error. 1478// 1479// See the AWS API reference guide for Amazon Translate's 1480// API operation UpdateParallelData for usage and error information. 1481// 1482// Returned Error Types: 1483// * ConcurrentModificationException 1484// Another modification is being made. That modification must complete before 1485// you can make your change. 1486// 1487// * InvalidParameterValueException 1488// The value of the parameter is invalid. Review the value of the parameter 1489// you are using to correct it, and then retry your operation. 1490// 1491// * InvalidRequestException 1492// The request that you made is invalid. Check your request to determine why 1493// it's invalid and then retry the request. 1494// 1495// * LimitExceededException 1496// The specified limit has been exceeded. Review your request and retry it with 1497// a quantity below the stated limit. 1498// 1499// * TooManyRequestsException 1500// You have made too many requests within a short period of time. Wait for a 1501// short time and then try your request again. 1502// 1503// * ConflictException 1504// There was a conflict processing the request. Try your request again. 1505// 1506// * ResourceNotFoundException 1507// The resource you are looking for has not been found. Review the resource 1508// you're looking for and see if a different resource will accomplish your needs 1509// before retrying the revised request. 1510// 1511// * InternalServerException 1512// An internal server error occurred. Retry your request. 1513// 1514// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/UpdateParallelData 1515func (c *Translate) UpdateParallelData(input *UpdateParallelDataInput) (*UpdateParallelDataOutput, error) { 1516 req, out := c.UpdateParallelDataRequest(input) 1517 return out, req.Send() 1518} 1519 1520// UpdateParallelDataWithContext is the same as UpdateParallelData with the addition of 1521// the ability to pass a context and additional request options. 1522// 1523// See UpdateParallelData for details on how to use this API operation. 1524// 1525// The context must be non-nil and will be used for request cancellation. If 1526// the context is nil a panic will occur. In the future the SDK may create 1527// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1528// for more information on using Contexts. 1529func (c *Translate) UpdateParallelDataWithContext(ctx aws.Context, input *UpdateParallelDataInput, opts ...request.Option) (*UpdateParallelDataOutput, error) { 1530 req, out := c.UpdateParallelDataRequest(input) 1531 req.SetContext(ctx) 1532 req.ApplyOptions(opts...) 1533 return out, req.Send() 1534} 1535 1536// The custom terminology applied to the input text by Amazon Translate for 1537// the translated text response. This is optional in the response and will only 1538// be present if you specified terminology input in the request. Currently, 1539// only one terminology can be applied per TranslateText request. 1540type AppliedTerminology struct { 1541 _ struct{} `type:"structure"` 1542 1543 // The name of the custom terminology applied to the input text by Amazon Translate 1544 // for the translated text response. 1545 Name *string `min:"1" type:"string"` 1546 1547 // The specific terms of the custom terminology applied to the input text by 1548 // Amazon Translate for the translated text response. A maximum of 250 terms 1549 // will be returned, and the specific terms applied will be the first 250 terms 1550 // in the source text. 1551 Terms []*Term `type:"list"` 1552} 1553 1554// String returns the string representation 1555func (s AppliedTerminology) String() string { 1556 return awsutil.Prettify(s) 1557} 1558 1559// GoString returns the string representation 1560func (s AppliedTerminology) GoString() string { 1561 return s.String() 1562} 1563 1564// SetName sets the Name field's value. 1565func (s *AppliedTerminology) SetName(v string) *AppliedTerminology { 1566 s.Name = &v 1567 return s 1568} 1569 1570// SetTerms sets the Terms field's value. 1571func (s *AppliedTerminology) SetTerms(v []*Term) *AppliedTerminology { 1572 s.Terms = v 1573 return s 1574} 1575 1576// Another modification is being made. That modification must complete before 1577// you can make your change. 1578type ConcurrentModificationException struct { 1579 _ struct{} `type:"structure"` 1580 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1581 1582 Message_ *string `locationName:"Message" type:"string"` 1583} 1584 1585// String returns the string representation 1586func (s ConcurrentModificationException) String() string { 1587 return awsutil.Prettify(s) 1588} 1589 1590// GoString returns the string representation 1591func (s ConcurrentModificationException) GoString() string { 1592 return s.String() 1593} 1594 1595func newErrorConcurrentModificationException(v protocol.ResponseMetadata) error { 1596 return &ConcurrentModificationException{ 1597 RespMetadata: v, 1598 } 1599} 1600 1601// Code returns the exception type name. 1602func (s *ConcurrentModificationException) Code() string { 1603 return "ConcurrentModificationException" 1604} 1605 1606// Message returns the exception's message. 1607func (s *ConcurrentModificationException) Message() string { 1608 if s.Message_ != nil { 1609 return *s.Message_ 1610 } 1611 return "" 1612} 1613 1614// OrigErr always returns nil, satisfies awserr.Error interface. 1615func (s *ConcurrentModificationException) OrigErr() error { 1616 return nil 1617} 1618 1619func (s *ConcurrentModificationException) Error() string { 1620 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1621} 1622 1623// Status code returns the HTTP status code for the request's response error. 1624func (s *ConcurrentModificationException) StatusCode() int { 1625 return s.RespMetadata.StatusCode 1626} 1627 1628// RequestID returns the service's response RequestID for request. 1629func (s *ConcurrentModificationException) RequestID() string { 1630 return s.RespMetadata.RequestID 1631} 1632 1633// There was a conflict processing the request. Try your request again. 1634type ConflictException struct { 1635 _ struct{} `type:"structure"` 1636 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1637 1638 Message_ *string `locationName:"Message" type:"string"` 1639} 1640 1641// String returns the string representation 1642func (s ConflictException) String() string { 1643 return awsutil.Prettify(s) 1644} 1645 1646// GoString returns the string representation 1647func (s ConflictException) GoString() string { 1648 return s.String() 1649} 1650 1651func newErrorConflictException(v protocol.ResponseMetadata) error { 1652 return &ConflictException{ 1653 RespMetadata: v, 1654 } 1655} 1656 1657// Code returns the exception type name. 1658func (s *ConflictException) Code() string { 1659 return "ConflictException" 1660} 1661 1662// Message returns the exception's message. 1663func (s *ConflictException) Message() string { 1664 if s.Message_ != nil { 1665 return *s.Message_ 1666 } 1667 return "" 1668} 1669 1670// OrigErr always returns nil, satisfies awserr.Error interface. 1671func (s *ConflictException) OrigErr() error { 1672 return nil 1673} 1674 1675func (s *ConflictException) Error() string { 1676 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1677} 1678 1679// Status code returns the HTTP status code for the request's response error. 1680func (s *ConflictException) StatusCode() int { 1681 return s.RespMetadata.StatusCode 1682} 1683 1684// RequestID returns the service's response RequestID for request. 1685func (s *ConflictException) RequestID() string { 1686 return s.RespMetadata.RequestID 1687} 1688 1689type CreateParallelDataInput struct { 1690 _ struct{} `type:"structure"` 1691 1692 // A unique identifier for the request. This token is automatically generated 1693 // when you use Amazon Translate through an AWS SDK. 1694 ClientToken *string `min:"1" type:"string" idempotencyToken:"true"` 1695 1696 // A custom description for the parallel data resource in Amazon Translate. 1697 Description *string `type:"string"` 1698 1699 // The encryption key used to encrypt this object. 1700 EncryptionKey *EncryptionKey `type:"structure"` 1701 1702 // A custom name for the parallel data resource in Amazon Translate. You must 1703 // assign a name that is unique in the account and region. 1704 // 1705 // Name is a required field 1706 Name *string `min:"1" type:"string" required:"true"` 1707 1708 // Specifies the format and S3 location of the parallel data input file. 1709 // 1710 // ParallelDataConfig is a required field 1711 ParallelDataConfig *ParallelDataConfig `type:"structure" required:"true"` 1712} 1713 1714// String returns the string representation 1715func (s CreateParallelDataInput) String() string { 1716 return awsutil.Prettify(s) 1717} 1718 1719// GoString returns the string representation 1720func (s CreateParallelDataInput) GoString() string { 1721 return s.String() 1722} 1723 1724// Validate inspects the fields of the type to determine if they are valid. 1725func (s *CreateParallelDataInput) Validate() error { 1726 invalidParams := request.ErrInvalidParams{Context: "CreateParallelDataInput"} 1727 if s.ClientToken != nil && len(*s.ClientToken) < 1 { 1728 invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) 1729 } 1730 if s.Name == nil { 1731 invalidParams.Add(request.NewErrParamRequired("Name")) 1732 } 1733 if s.Name != nil && len(*s.Name) < 1 { 1734 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 1735 } 1736 if s.ParallelDataConfig == nil { 1737 invalidParams.Add(request.NewErrParamRequired("ParallelDataConfig")) 1738 } 1739 if s.EncryptionKey != nil { 1740 if err := s.EncryptionKey.Validate(); err != nil { 1741 invalidParams.AddNested("EncryptionKey", err.(request.ErrInvalidParams)) 1742 } 1743 } 1744 if s.ParallelDataConfig != nil { 1745 if err := s.ParallelDataConfig.Validate(); err != nil { 1746 invalidParams.AddNested("ParallelDataConfig", err.(request.ErrInvalidParams)) 1747 } 1748 } 1749 1750 if invalidParams.Len() > 0 { 1751 return invalidParams 1752 } 1753 return nil 1754} 1755 1756// SetClientToken sets the ClientToken field's value. 1757func (s *CreateParallelDataInput) SetClientToken(v string) *CreateParallelDataInput { 1758 s.ClientToken = &v 1759 return s 1760} 1761 1762// SetDescription sets the Description field's value. 1763func (s *CreateParallelDataInput) SetDescription(v string) *CreateParallelDataInput { 1764 s.Description = &v 1765 return s 1766} 1767 1768// SetEncryptionKey sets the EncryptionKey field's value. 1769func (s *CreateParallelDataInput) SetEncryptionKey(v *EncryptionKey) *CreateParallelDataInput { 1770 s.EncryptionKey = v 1771 return s 1772} 1773 1774// SetName sets the Name field's value. 1775func (s *CreateParallelDataInput) SetName(v string) *CreateParallelDataInput { 1776 s.Name = &v 1777 return s 1778} 1779 1780// SetParallelDataConfig sets the ParallelDataConfig field's value. 1781func (s *CreateParallelDataInput) SetParallelDataConfig(v *ParallelDataConfig) *CreateParallelDataInput { 1782 s.ParallelDataConfig = v 1783 return s 1784} 1785 1786type CreateParallelDataOutput struct { 1787 _ struct{} `type:"structure"` 1788 1789 // The custom name that you assigned to the parallel data resource. 1790 Name *string `min:"1" type:"string"` 1791 1792 // The status of the parallel data resource. When the resource is ready for 1793 // you to use, the status is ACTIVE. 1794 Status *string `type:"string" enum:"ParallelDataStatus"` 1795} 1796 1797// String returns the string representation 1798func (s CreateParallelDataOutput) String() string { 1799 return awsutil.Prettify(s) 1800} 1801 1802// GoString returns the string representation 1803func (s CreateParallelDataOutput) GoString() string { 1804 return s.String() 1805} 1806 1807// SetName sets the Name field's value. 1808func (s *CreateParallelDataOutput) SetName(v string) *CreateParallelDataOutput { 1809 s.Name = &v 1810 return s 1811} 1812 1813// SetStatus sets the Status field's value. 1814func (s *CreateParallelDataOutput) SetStatus(v string) *CreateParallelDataOutput { 1815 s.Status = &v 1816 return s 1817} 1818 1819type DeleteParallelDataInput struct { 1820 _ struct{} `type:"structure"` 1821 1822 // The name of the parallel data resource that is being deleted. 1823 // 1824 // Name is a required field 1825 Name *string `min:"1" type:"string" required:"true"` 1826} 1827 1828// String returns the string representation 1829func (s DeleteParallelDataInput) String() string { 1830 return awsutil.Prettify(s) 1831} 1832 1833// GoString returns the string representation 1834func (s DeleteParallelDataInput) GoString() string { 1835 return s.String() 1836} 1837 1838// Validate inspects the fields of the type to determine if they are valid. 1839func (s *DeleteParallelDataInput) Validate() error { 1840 invalidParams := request.ErrInvalidParams{Context: "DeleteParallelDataInput"} 1841 if s.Name == nil { 1842 invalidParams.Add(request.NewErrParamRequired("Name")) 1843 } 1844 if s.Name != nil && len(*s.Name) < 1 { 1845 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 1846 } 1847 1848 if invalidParams.Len() > 0 { 1849 return invalidParams 1850 } 1851 return nil 1852} 1853 1854// SetName sets the Name field's value. 1855func (s *DeleteParallelDataInput) SetName(v string) *DeleteParallelDataInput { 1856 s.Name = &v 1857 return s 1858} 1859 1860type DeleteParallelDataOutput struct { 1861 _ struct{} `type:"structure"` 1862 1863 // The name of the parallel data resource that is being deleted. 1864 Name *string `min:"1" type:"string"` 1865 1866 // The status of the parallel data deletion. 1867 Status *string `type:"string" enum:"ParallelDataStatus"` 1868} 1869 1870// String returns the string representation 1871func (s DeleteParallelDataOutput) String() string { 1872 return awsutil.Prettify(s) 1873} 1874 1875// GoString returns the string representation 1876func (s DeleteParallelDataOutput) GoString() string { 1877 return s.String() 1878} 1879 1880// SetName sets the Name field's value. 1881func (s *DeleteParallelDataOutput) SetName(v string) *DeleteParallelDataOutput { 1882 s.Name = &v 1883 return s 1884} 1885 1886// SetStatus sets the Status field's value. 1887func (s *DeleteParallelDataOutput) SetStatus(v string) *DeleteParallelDataOutput { 1888 s.Status = &v 1889 return s 1890} 1891 1892type DeleteTerminologyInput struct { 1893 _ struct{} `type:"structure"` 1894 1895 // The name of the custom terminology being deleted. 1896 // 1897 // Name is a required field 1898 Name *string `min:"1" type:"string" required:"true"` 1899} 1900 1901// String returns the string representation 1902func (s DeleteTerminologyInput) String() string { 1903 return awsutil.Prettify(s) 1904} 1905 1906// GoString returns the string representation 1907func (s DeleteTerminologyInput) GoString() string { 1908 return s.String() 1909} 1910 1911// Validate inspects the fields of the type to determine if they are valid. 1912func (s *DeleteTerminologyInput) Validate() error { 1913 invalidParams := request.ErrInvalidParams{Context: "DeleteTerminologyInput"} 1914 if s.Name == nil { 1915 invalidParams.Add(request.NewErrParamRequired("Name")) 1916 } 1917 if s.Name != nil && len(*s.Name) < 1 { 1918 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 1919 } 1920 1921 if invalidParams.Len() > 0 { 1922 return invalidParams 1923 } 1924 return nil 1925} 1926 1927// SetName sets the Name field's value. 1928func (s *DeleteTerminologyInput) SetName(v string) *DeleteTerminologyInput { 1929 s.Name = &v 1930 return s 1931} 1932 1933type DeleteTerminologyOutput struct { 1934 _ struct{} `type:"structure"` 1935} 1936 1937// String returns the string representation 1938func (s DeleteTerminologyOutput) String() string { 1939 return awsutil.Prettify(s) 1940} 1941 1942// GoString returns the string representation 1943func (s DeleteTerminologyOutput) GoString() string { 1944 return s.String() 1945} 1946 1947type DescribeTextTranslationJobInput struct { 1948 _ struct{} `type:"structure"` 1949 1950 // The identifier that Amazon Translate generated for the job. The StartTextTranslationJob 1951 // operation returns this identifier in its response. 1952 // 1953 // JobId is a required field 1954 JobId *string `min:"1" type:"string" required:"true"` 1955} 1956 1957// String returns the string representation 1958func (s DescribeTextTranslationJobInput) String() string { 1959 return awsutil.Prettify(s) 1960} 1961 1962// GoString returns the string representation 1963func (s DescribeTextTranslationJobInput) GoString() string { 1964 return s.String() 1965} 1966 1967// Validate inspects the fields of the type to determine if they are valid. 1968func (s *DescribeTextTranslationJobInput) Validate() error { 1969 invalidParams := request.ErrInvalidParams{Context: "DescribeTextTranslationJobInput"} 1970 if s.JobId == nil { 1971 invalidParams.Add(request.NewErrParamRequired("JobId")) 1972 } 1973 if s.JobId != nil && len(*s.JobId) < 1 { 1974 invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) 1975 } 1976 1977 if invalidParams.Len() > 0 { 1978 return invalidParams 1979 } 1980 return nil 1981} 1982 1983// SetJobId sets the JobId field's value. 1984func (s *DescribeTextTranslationJobInput) SetJobId(v string) *DescribeTextTranslationJobInput { 1985 s.JobId = &v 1986 return s 1987} 1988 1989type DescribeTextTranslationJobOutput struct { 1990 _ struct{} `type:"structure"` 1991 1992 // An object that contains the properties associated with an asynchronous batch 1993 // translation job. 1994 TextTranslationJobProperties *TextTranslationJobProperties `type:"structure"` 1995} 1996 1997// String returns the string representation 1998func (s DescribeTextTranslationJobOutput) String() string { 1999 return awsutil.Prettify(s) 2000} 2001 2002// GoString returns the string representation 2003func (s DescribeTextTranslationJobOutput) GoString() string { 2004 return s.String() 2005} 2006 2007// SetTextTranslationJobProperties sets the TextTranslationJobProperties field's value. 2008func (s *DescribeTextTranslationJobOutput) SetTextTranslationJobProperties(v *TextTranslationJobProperties) *DescribeTextTranslationJobOutput { 2009 s.TextTranslationJobProperties = v 2010 return s 2011} 2012 2013// The confidence that Amazon Comprehend accurately detected the source language 2014// is low. If a low confidence level is acceptable for your application, you 2015// can use the language in the exception to call Amazon Translate again. For 2016// more information, see the DetectDominantLanguage (https://docs.aws.amazon.com/comprehend/latest/dg/API_DetectDominantLanguage.html) 2017// operation in the Amazon Comprehend Developer Guide. 2018type DetectedLanguageLowConfidenceException struct { 2019 _ struct{} `type:"structure"` 2020 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2021 2022 // The language code of the auto-detected language from Amazon Comprehend. 2023 DetectedLanguageCode *string `min:"2" type:"string"` 2024 2025 Message_ *string `locationName:"Message" type:"string"` 2026} 2027 2028// String returns the string representation 2029func (s DetectedLanguageLowConfidenceException) String() string { 2030 return awsutil.Prettify(s) 2031} 2032 2033// GoString returns the string representation 2034func (s DetectedLanguageLowConfidenceException) GoString() string { 2035 return s.String() 2036} 2037 2038func newErrorDetectedLanguageLowConfidenceException(v protocol.ResponseMetadata) error { 2039 return &DetectedLanguageLowConfidenceException{ 2040 RespMetadata: v, 2041 } 2042} 2043 2044// Code returns the exception type name. 2045func (s *DetectedLanguageLowConfidenceException) Code() string { 2046 return "DetectedLanguageLowConfidenceException" 2047} 2048 2049// Message returns the exception's message. 2050func (s *DetectedLanguageLowConfidenceException) Message() string { 2051 if s.Message_ != nil { 2052 return *s.Message_ 2053 } 2054 return "" 2055} 2056 2057// OrigErr always returns nil, satisfies awserr.Error interface. 2058func (s *DetectedLanguageLowConfidenceException) OrigErr() error { 2059 return nil 2060} 2061 2062func (s *DetectedLanguageLowConfidenceException) Error() string { 2063 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 2064} 2065 2066// Status code returns the HTTP status code for the request's response error. 2067func (s *DetectedLanguageLowConfidenceException) StatusCode() int { 2068 return s.RespMetadata.StatusCode 2069} 2070 2071// RequestID returns the service's response RequestID for request. 2072func (s *DetectedLanguageLowConfidenceException) RequestID() string { 2073 return s.RespMetadata.RequestID 2074} 2075 2076// The encryption key used to encrypt this object. 2077type EncryptionKey struct { 2078 _ struct{} `type:"structure"` 2079 2080 // The Amazon Resource Name (ARN) of the encryption key being used to encrypt 2081 // the custom terminology. 2082 // 2083 // Id is a required field 2084 Id *string `min:"1" type:"string" required:"true"` 2085 2086 // The type of encryption key used by Amazon Translate to encrypt custom terminologies. 2087 // 2088 // Type is a required field 2089 Type *string `type:"string" required:"true" enum:"EncryptionKeyType"` 2090} 2091 2092// String returns the string representation 2093func (s EncryptionKey) String() string { 2094 return awsutil.Prettify(s) 2095} 2096 2097// GoString returns the string representation 2098func (s EncryptionKey) GoString() string { 2099 return s.String() 2100} 2101 2102// Validate inspects the fields of the type to determine if they are valid. 2103func (s *EncryptionKey) Validate() error { 2104 invalidParams := request.ErrInvalidParams{Context: "EncryptionKey"} 2105 if s.Id == nil { 2106 invalidParams.Add(request.NewErrParamRequired("Id")) 2107 } 2108 if s.Id != nil && len(*s.Id) < 1 { 2109 invalidParams.Add(request.NewErrParamMinLen("Id", 1)) 2110 } 2111 if s.Type == nil { 2112 invalidParams.Add(request.NewErrParamRequired("Type")) 2113 } 2114 2115 if invalidParams.Len() > 0 { 2116 return invalidParams 2117 } 2118 return nil 2119} 2120 2121// SetId sets the Id field's value. 2122func (s *EncryptionKey) SetId(v string) *EncryptionKey { 2123 s.Id = &v 2124 return s 2125} 2126 2127// SetType sets the Type field's value. 2128func (s *EncryptionKey) SetType(v string) *EncryptionKey { 2129 s.Type = &v 2130 return s 2131} 2132 2133type GetParallelDataInput struct { 2134 _ struct{} `type:"structure"` 2135 2136 // The name of the parallel data resource that is being retrieved. 2137 // 2138 // Name is a required field 2139 Name *string `min:"1" type:"string" required:"true"` 2140} 2141 2142// String returns the string representation 2143func (s GetParallelDataInput) String() string { 2144 return awsutil.Prettify(s) 2145} 2146 2147// GoString returns the string representation 2148func (s GetParallelDataInput) GoString() string { 2149 return s.String() 2150} 2151 2152// Validate inspects the fields of the type to determine if they are valid. 2153func (s *GetParallelDataInput) Validate() error { 2154 invalidParams := request.ErrInvalidParams{Context: "GetParallelDataInput"} 2155 if s.Name == nil { 2156 invalidParams.Add(request.NewErrParamRequired("Name")) 2157 } 2158 if s.Name != nil && len(*s.Name) < 1 { 2159 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 2160 } 2161 2162 if invalidParams.Len() > 0 { 2163 return invalidParams 2164 } 2165 return nil 2166} 2167 2168// SetName sets the Name field's value. 2169func (s *GetParallelDataInput) SetName(v string) *GetParallelDataInput { 2170 s.Name = &v 2171 return s 2172} 2173 2174type GetParallelDataOutput struct { 2175 _ struct{} `type:"structure"` 2176 2177 // The Amazon S3 location of a file that provides any errors or warnings that 2178 // were produced by your input file. This file was created when Amazon Translate 2179 // attempted to create a parallel data resource. The location is returned as 2180 // a presigned URL to that has a 30 minute expiration. 2181 AuxiliaryDataLocation *ParallelDataDataLocation `type:"structure"` 2182 2183 // The location of the most recent parallel data input file that was successfully 2184 // imported into Amazon Translate. The location is returned as a presigned URL 2185 // that has a 30 minute expiration. 2186 DataLocation *ParallelDataDataLocation `type:"structure"` 2187 2188 // The Amazon S3 location of a file that provides any errors or warnings that 2189 // were produced by your input file. This file was created when Amazon Translate 2190 // attempted to update a parallel data resource. The location is returned as 2191 // a presigned URL to that has a 30 minute expiration. 2192 LatestUpdateAttemptAuxiliaryDataLocation *ParallelDataDataLocation `type:"structure"` 2193 2194 // The properties of the parallel data resource that is being retrieved. 2195 ParallelDataProperties *ParallelDataProperties `type:"structure"` 2196} 2197 2198// String returns the string representation 2199func (s GetParallelDataOutput) String() string { 2200 return awsutil.Prettify(s) 2201} 2202 2203// GoString returns the string representation 2204func (s GetParallelDataOutput) GoString() string { 2205 return s.String() 2206} 2207 2208// SetAuxiliaryDataLocation sets the AuxiliaryDataLocation field's value. 2209func (s *GetParallelDataOutput) SetAuxiliaryDataLocation(v *ParallelDataDataLocation) *GetParallelDataOutput { 2210 s.AuxiliaryDataLocation = v 2211 return s 2212} 2213 2214// SetDataLocation sets the DataLocation field's value. 2215func (s *GetParallelDataOutput) SetDataLocation(v *ParallelDataDataLocation) *GetParallelDataOutput { 2216 s.DataLocation = v 2217 return s 2218} 2219 2220// SetLatestUpdateAttemptAuxiliaryDataLocation sets the LatestUpdateAttemptAuxiliaryDataLocation field's value. 2221func (s *GetParallelDataOutput) SetLatestUpdateAttemptAuxiliaryDataLocation(v *ParallelDataDataLocation) *GetParallelDataOutput { 2222 s.LatestUpdateAttemptAuxiliaryDataLocation = v 2223 return s 2224} 2225 2226// SetParallelDataProperties sets the ParallelDataProperties field's value. 2227func (s *GetParallelDataOutput) SetParallelDataProperties(v *ParallelDataProperties) *GetParallelDataOutput { 2228 s.ParallelDataProperties = v 2229 return s 2230} 2231 2232type GetTerminologyInput struct { 2233 _ struct{} `type:"structure"` 2234 2235 // The name of the custom terminology being retrieved. 2236 // 2237 // Name is a required field 2238 Name *string `min:"1" type:"string" required:"true"` 2239 2240 // The data format of the custom terminology being retrieved, either CSV or 2241 // TMX. 2242 // 2243 // TerminologyDataFormat is a required field 2244 TerminologyDataFormat *string `type:"string" required:"true" enum:"TerminologyDataFormat"` 2245} 2246 2247// String returns the string representation 2248func (s GetTerminologyInput) String() string { 2249 return awsutil.Prettify(s) 2250} 2251 2252// GoString returns the string representation 2253func (s GetTerminologyInput) GoString() string { 2254 return s.String() 2255} 2256 2257// Validate inspects the fields of the type to determine if they are valid. 2258func (s *GetTerminologyInput) Validate() error { 2259 invalidParams := request.ErrInvalidParams{Context: "GetTerminologyInput"} 2260 if s.Name == nil { 2261 invalidParams.Add(request.NewErrParamRequired("Name")) 2262 } 2263 if s.Name != nil && len(*s.Name) < 1 { 2264 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 2265 } 2266 if s.TerminologyDataFormat == nil { 2267 invalidParams.Add(request.NewErrParamRequired("TerminologyDataFormat")) 2268 } 2269 2270 if invalidParams.Len() > 0 { 2271 return invalidParams 2272 } 2273 return nil 2274} 2275 2276// SetName sets the Name field's value. 2277func (s *GetTerminologyInput) SetName(v string) *GetTerminologyInput { 2278 s.Name = &v 2279 return s 2280} 2281 2282// SetTerminologyDataFormat sets the TerminologyDataFormat field's value. 2283func (s *GetTerminologyInput) SetTerminologyDataFormat(v string) *GetTerminologyInput { 2284 s.TerminologyDataFormat = &v 2285 return s 2286} 2287 2288type GetTerminologyOutput struct { 2289 _ struct{} `type:"structure"` 2290 2291 // The data location of the custom terminology being retrieved. The custom terminology 2292 // file is returned in a presigned url that has a 30 minute expiration. 2293 TerminologyDataLocation *TerminologyDataLocation `type:"structure"` 2294 2295 // The properties of the custom terminology being retrieved. 2296 TerminologyProperties *TerminologyProperties `type:"structure"` 2297} 2298 2299// String returns the string representation 2300func (s GetTerminologyOutput) String() string { 2301 return awsutil.Prettify(s) 2302} 2303 2304// GoString returns the string representation 2305func (s GetTerminologyOutput) GoString() string { 2306 return s.String() 2307} 2308 2309// SetTerminologyDataLocation sets the TerminologyDataLocation field's value. 2310func (s *GetTerminologyOutput) SetTerminologyDataLocation(v *TerminologyDataLocation) *GetTerminologyOutput { 2311 s.TerminologyDataLocation = v 2312 return s 2313} 2314 2315// SetTerminologyProperties sets the TerminologyProperties field's value. 2316func (s *GetTerminologyOutput) SetTerminologyProperties(v *TerminologyProperties) *GetTerminologyOutput { 2317 s.TerminologyProperties = v 2318 return s 2319} 2320 2321type ImportTerminologyInput struct { 2322 _ struct{} `type:"structure"` 2323 2324 // The description of the custom terminology being imported. 2325 Description *string `type:"string"` 2326 2327 // The encryption key for the custom terminology being imported. 2328 EncryptionKey *EncryptionKey `type:"structure"` 2329 2330 // The merge strategy of the custom terminology being imported. Currently, only 2331 // the OVERWRITE merge strategy is supported. In this case, the imported terminology 2332 // will overwrite an existing terminology of the same name. 2333 // 2334 // MergeStrategy is a required field 2335 MergeStrategy *string `type:"string" required:"true" enum:"MergeStrategy"` 2336 2337 // The name of the custom terminology being imported. 2338 // 2339 // Name is a required field 2340 Name *string `min:"1" type:"string" required:"true"` 2341 2342 // The terminology data for the custom terminology being imported. 2343 // 2344 // TerminologyData is a required field 2345 TerminologyData *TerminologyData `type:"structure" required:"true"` 2346} 2347 2348// String returns the string representation 2349func (s ImportTerminologyInput) String() string { 2350 return awsutil.Prettify(s) 2351} 2352 2353// GoString returns the string representation 2354func (s ImportTerminologyInput) GoString() string { 2355 return s.String() 2356} 2357 2358// Validate inspects the fields of the type to determine if they are valid. 2359func (s *ImportTerminologyInput) Validate() error { 2360 invalidParams := request.ErrInvalidParams{Context: "ImportTerminologyInput"} 2361 if s.MergeStrategy == nil { 2362 invalidParams.Add(request.NewErrParamRequired("MergeStrategy")) 2363 } 2364 if s.Name == nil { 2365 invalidParams.Add(request.NewErrParamRequired("Name")) 2366 } 2367 if s.Name != nil && len(*s.Name) < 1 { 2368 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 2369 } 2370 if s.TerminologyData == nil { 2371 invalidParams.Add(request.NewErrParamRequired("TerminologyData")) 2372 } 2373 if s.EncryptionKey != nil { 2374 if err := s.EncryptionKey.Validate(); err != nil { 2375 invalidParams.AddNested("EncryptionKey", err.(request.ErrInvalidParams)) 2376 } 2377 } 2378 if s.TerminologyData != nil { 2379 if err := s.TerminologyData.Validate(); err != nil { 2380 invalidParams.AddNested("TerminologyData", err.(request.ErrInvalidParams)) 2381 } 2382 } 2383 2384 if invalidParams.Len() > 0 { 2385 return invalidParams 2386 } 2387 return nil 2388} 2389 2390// SetDescription sets the Description field's value. 2391func (s *ImportTerminologyInput) SetDescription(v string) *ImportTerminologyInput { 2392 s.Description = &v 2393 return s 2394} 2395 2396// SetEncryptionKey sets the EncryptionKey field's value. 2397func (s *ImportTerminologyInput) SetEncryptionKey(v *EncryptionKey) *ImportTerminologyInput { 2398 s.EncryptionKey = v 2399 return s 2400} 2401 2402// SetMergeStrategy sets the MergeStrategy field's value. 2403func (s *ImportTerminologyInput) SetMergeStrategy(v string) *ImportTerminologyInput { 2404 s.MergeStrategy = &v 2405 return s 2406} 2407 2408// SetName sets the Name field's value. 2409func (s *ImportTerminologyInput) SetName(v string) *ImportTerminologyInput { 2410 s.Name = &v 2411 return s 2412} 2413 2414// SetTerminologyData sets the TerminologyData field's value. 2415func (s *ImportTerminologyInput) SetTerminologyData(v *TerminologyData) *ImportTerminologyInput { 2416 s.TerminologyData = v 2417 return s 2418} 2419 2420type ImportTerminologyOutput struct { 2421 _ struct{} `type:"structure"` 2422 2423 // The properties of the custom terminology being imported. 2424 TerminologyProperties *TerminologyProperties `type:"structure"` 2425} 2426 2427// String returns the string representation 2428func (s ImportTerminologyOutput) String() string { 2429 return awsutil.Prettify(s) 2430} 2431 2432// GoString returns the string representation 2433func (s ImportTerminologyOutput) GoString() string { 2434 return s.String() 2435} 2436 2437// SetTerminologyProperties sets the TerminologyProperties field's value. 2438func (s *ImportTerminologyOutput) SetTerminologyProperties(v *TerminologyProperties) *ImportTerminologyOutput { 2439 s.TerminologyProperties = v 2440 return s 2441} 2442 2443// The input configuration properties for requesting a batch translation job. 2444type InputDataConfig struct { 2445 _ struct{} `type:"structure"` 2446 2447 // Describes the format of the data that you submit to Amazon Translate as input. 2448 // You can specify one of the following multipurpose internet mail extension 2449 // (MIME) types: 2450 // 2451 // * text/html: The input data consists of one or more HTML files. Amazon 2452 // Translate translates only the text that resides in the html element in 2453 // each file. 2454 // 2455 // * text/plain: The input data consists of one or more unformatted text 2456 // files. Amazon Translate translates every character in this type of input. 2457 // 2458 // * application/vnd.openxmlformats-officedocument.wordprocessingml.document: 2459 // The input data consists of one or more Word documents (.docx). 2460 // 2461 // * application/vnd.openxmlformats-officedocument.presentationml.presentation: 2462 // The input data consists of one or more PowerPoint Presentation files (.pptx). 2463 // 2464 // * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: The 2465 // input data consists of one or more Excel Workbook files (.xlsx). 2466 // 2467 // If you structure your input data as HTML, ensure that you set this parameter 2468 // to text/html. By doing so, you cut costs by limiting the translation to the 2469 // contents of the html element in each file. Otherwise, if you set this parameter 2470 // to text/plain, your costs will cover the translation of every character. 2471 // 2472 // ContentType is a required field 2473 ContentType *string `type:"string" required:"true"` 2474 2475 // The URI of the AWS S3 folder that contains the input file. The folder must 2476 // be in the same Region as the API endpoint you are calling. 2477 // 2478 // S3Uri is a required field 2479 S3Uri *string `type:"string" required:"true"` 2480} 2481 2482// String returns the string representation 2483func (s InputDataConfig) String() string { 2484 return awsutil.Prettify(s) 2485} 2486 2487// GoString returns the string representation 2488func (s InputDataConfig) GoString() string { 2489 return s.String() 2490} 2491 2492// Validate inspects the fields of the type to determine if they are valid. 2493func (s *InputDataConfig) Validate() error { 2494 invalidParams := request.ErrInvalidParams{Context: "InputDataConfig"} 2495 if s.ContentType == nil { 2496 invalidParams.Add(request.NewErrParamRequired("ContentType")) 2497 } 2498 if s.S3Uri == nil { 2499 invalidParams.Add(request.NewErrParamRequired("S3Uri")) 2500 } 2501 2502 if invalidParams.Len() > 0 { 2503 return invalidParams 2504 } 2505 return nil 2506} 2507 2508// SetContentType sets the ContentType field's value. 2509func (s *InputDataConfig) SetContentType(v string) *InputDataConfig { 2510 s.ContentType = &v 2511 return s 2512} 2513 2514// SetS3Uri sets the S3Uri field's value. 2515func (s *InputDataConfig) SetS3Uri(v string) *InputDataConfig { 2516 s.S3Uri = &v 2517 return s 2518} 2519 2520// An internal server error occurred. Retry your request. 2521type InternalServerException struct { 2522 _ struct{} `type:"structure"` 2523 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2524 2525 Message_ *string `locationName:"Message" type:"string"` 2526} 2527 2528// String returns the string representation 2529func (s InternalServerException) String() string { 2530 return awsutil.Prettify(s) 2531} 2532 2533// GoString returns the string representation 2534func (s InternalServerException) GoString() string { 2535 return s.String() 2536} 2537 2538func newErrorInternalServerException(v protocol.ResponseMetadata) error { 2539 return &InternalServerException{ 2540 RespMetadata: v, 2541 } 2542} 2543 2544// Code returns the exception type name. 2545func (s *InternalServerException) Code() string { 2546 return "InternalServerException" 2547} 2548 2549// Message returns the exception's message. 2550func (s *InternalServerException) Message() string { 2551 if s.Message_ != nil { 2552 return *s.Message_ 2553 } 2554 return "" 2555} 2556 2557// OrigErr always returns nil, satisfies awserr.Error interface. 2558func (s *InternalServerException) OrigErr() error { 2559 return nil 2560} 2561 2562func (s *InternalServerException) Error() string { 2563 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2564} 2565 2566// Status code returns the HTTP status code for the request's response error. 2567func (s *InternalServerException) StatusCode() int { 2568 return s.RespMetadata.StatusCode 2569} 2570 2571// RequestID returns the service's response RequestID for request. 2572func (s *InternalServerException) RequestID() string { 2573 return s.RespMetadata.RequestID 2574} 2575 2576// The filter specified for the operation is invalid. Specify a different filter. 2577type InvalidFilterException struct { 2578 _ struct{} `type:"structure"` 2579 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2580 2581 Message_ *string `locationName:"Message" type:"string"` 2582} 2583 2584// String returns the string representation 2585func (s InvalidFilterException) String() string { 2586 return awsutil.Prettify(s) 2587} 2588 2589// GoString returns the string representation 2590func (s InvalidFilterException) GoString() string { 2591 return s.String() 2592} 2593 2594func newErrorInvalidFilterException(v protocol.ResponseMetadata) error { 2595 return &InvalidFilterException{ 2596 RespMetadata: v, 2597 } 2598} 2599 2600// Code returns the exception type name. 2601func (s *InvalidFilterException) Code() string { 2602 return "InvalidFilterException" 2603} 2604 2605// Message returns the exception's message. 2606func (s *InvalidFilterException) Message() string { 2607 if s.Message_ != nil { 2608 return *s.Message_ 2609 } 2610 return "" 2611} 2612 2613// OrigErr always returns nil, satisfies awserr.Error interface. 2614func (s *InvalidFilterException) OrigErr() error { 2615 return nil 2616} 2617 2618func (s *InvalidFilterException) Error() string { 2619 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2620} 2621 2622// Status code returns the HTTP status code for the request's response error. 2623func (s *InvalidFilterException) StatusCode() int { 2624 return s.RespMetadata.StatusCode 2625} 2626 2627// RequestID returns the service's response RequestID for request. 2628func (s *InvalidFilterException) RequestID() string { 2629 return s.RespMetadata.RequestID 2630} 2631 2632// The value of the parameter is invalid. Review the value of the parameter 2633// you are using to correct it, and then retry your operation. 2634type InvalidParameterValueException struct { 2635 _ struct{} `type:"structure"` 2636 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2637 2638 Message_ *string `locationName:"Message" type:"string"` 2639} 2640 2641// String returns the string representation 2642func (s InvalidParameterValueException) String() string { 2643 return awsutil.Prettify(s) 2644} 2645 2646// GoString returns the string representation 2647func (s InvalidParameterValueException) GoString() string { 2648 return s.String() 2649} 2650 2651func newErrorInvalidParameterValueException(v protocol.ResponseMetadata) error { 2652 return &InvalidParameterValueException{ 2653 RespMetadata: v, 2654 } 2655} 2656 2657// Code returns the exception type name. 2658func (s *InvalidParameterValueException) Code() string { 2659 return "InvalidParameterValueException" 2660} 2661 2662// Message returns the exception's message. 2663func (s *InvalidParameterValueException) Message() string { 2664 if s.Message_ != nil { 2665 return *s.Message_ 2666 } 2667 return "" 2668} 2669 2670// OrigErr always returns nil, satisfies awserr.Error interface. 2671func (s *InvalidParameterValueException) OrigErr() error { 2672 return nil 2673} 2674 2675func (s *InvalidParameterValueException) Error() string { 2676 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2677} 2678 2679// Status code returns the HTTP status code for the request's response error. 2680func (s *InvalidParameterValueException) StatusCode() int { 2681 return s.RespMetadata.StatusCode 2682} 2683 2684// RequestID returns the service's response RequestID for request. 2685func (s *InvalidParameterValueException) RequestID() string { 2686 return s.RespMetadata.RequestID 2687} 2688 2689// The request that you made is invalid. Check your request to determine why 2690// it's invalid and then retry the request. 2691type InvalidRequestException struct { 2692 _ struct{} `type:"structure"` 2693 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2694 2695 Message_ *string `locationName:"Message" type:"string"` 2696} 2697 2698// String returns the string representation 2699func (s InvalidRequestException) String() string { 2700 return awsutil.Prettify(s) 2701} 2702 2703// GoString returns the string representation 2704func (s InvalidRequestException) GoString() string { 2705 return s.String() 2706} 2707 2708func newErrorInvalidRequestException(v protocol.ResponseMetadata) error { 2709 return &InvalidRequestException{ 2710 RespMetadata: v, 2711 } 2712} 2713 2714// Code returns the exception type name. 2715func (s *InvalidRequestException) Code() string { 2716 return "InvalidRequestException" 2717} 2718 2719// Message returns the exception's message. 2720func (s *InvalidRequestException) Message() string { 2721 if s.Message_ != nil { 2722 return *s.Message_ 2723 } 2724 return "" 2725} 2726 2727// OrigErr always returns nil, satisfies awserr.Error interface. 2728func (s *InvalidRequestException) OrigErr() error { 2729 return nil 2730} 2731 2732func (s *InvalidRequestException) Error() string { 2733 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2734} 2735 2736// Status code returns the HTTP status code for the request's response error. 2737func (s *InvalidRequestException) StatusCode() int { 2738 return s.RespMetadata.StatusCode 2739} 2740 2741// RequestID returns the service's response RequestID for request. 2742func (s *InvalidRequestException) RequestID() string { 2743 return s.RespMetadata.RequestID 2744} 2745 2746// The number of documents successfully and unsuccessfully processed during 2747// a translation job. 2748type JobDetails struct { 2749 _ struct{} `type:"structure"` 2750 2751 // The number of documents that could not be processed during a translation 2752 // job. 2753 DocumentsWithErrorsCount *int64 `type:"integer"` 2754 2755 // The number of documents used as input in a translation job. 2756 InputDocumentsCount *int64 `type:"integer"` 2757 2758 // The number of documents successfully processed during a translation job. 2759 TranslatedDocumentsCount *int64 `type:"integer"` 2760} 2761 2762// String returns the string representation 2763func (s JobDetails) String() string { 2764 return awsutil.Prettify(s) 2765} 2766 2767// GoString returns the string representation 2768func (s JobDetails) GoString() string { 2769 return s.String() 2770} 2771 2772// SetDocumentsWithErrorsCount sets the DocumentsWithErrorsCount field's value. 2773func (s *JobDetails) SetDocumentsWithErrorsCount(v int64) *JobDetails { 2774 s.DocumentsWithErrorsCount = &v 2775 return s 2776} 2777 2778// SetInputDocumentsCount sets the InputDocumentsCount field's value. 2779func (s *JobDetails) SetInputDocumentsCount(v int64) *JobDetails { 2780 s.InputDocumentsCount = &v 2781 return s 2782} 2783 2784// SetTranslatedDocumentsCount sets the TranslatedDocumentsCount field's value. 2785func (s *JobDetails) SetTranslatedDocumentsCount(v int64) *JobDetails { 2786 s.TranslatedDocumentsCount = &v 2787 return s 2788} 2789 2790// The specified limit has been exceeded. Review your request and retry it with 2791// a quantity below the stated limit. 2792type LimitExceededException struct { 2793 _ struct{} `type:"structure"` 2794 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2795 2796 Message_ *string `locationName:"Message" type:"string"` 2797} 2798 2799// String returns the string representation 2800func (s LimitExceededException) String() string { 2801 return awsutil.Prettify(s) 2802} 2803 2804// GoString returns the string representation 2805func (s LimitExceededException) GoString() string { 2806 return s.String() 2807} 2808 2809func newErrorLimitExceededException(v protocol.ResponseMetadata) error { 2810 return &LimitExceededException{ 2811 RespMetadata: v, 2812 } 2813} 2814 2815// Code returns the exception type name. 2816func (s *LimitExceededException) Code() string { 2817 return "LimitExceededException" 2818} 2819 2820// Message returns the exception's message. 2821func (s *LimitExceededException) Message() string { 2822 if s.Message_ != nil { 2823 return *s.Message_ 2824 } 2825 return "" 2826} 2827 2828// OrigErr always returns nil, satisfies awserr.Error interface. 2829func (s *LimitExceededException) OrigErr() error { 2830 return nil 2831} 2832 2833func (s *LimitExceededException) Error() string { 2834 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2835} 2836 2837// Status code returns the HTTP status code for the request's response error. 2838func (s *LimitExceededException) StatusCode() int { 2839 return s.RespMetadata.StatusCode 2840} 2841 2842// RequestID returns the service's response RequestID for request. 2843func (s *LimitExceededException) RequestID() string { 2844 return s.RespMetadata.RequestID 2845} 2846 2847type ListParallelDataInput struct { 2848 _ struct{} `type:"structure"` 2849 2850 // The maximum number of parallel data resources returned for each request. 2851 MaxResults *int64 `min:"1" type:"integer"` 2852 2853 // A string that specifies the next page of results to return in a paginated 2854 // response. 2855 NextToken *string `type:"string"` 2856} 2857 2858// String returns the string representation 2859func (s ListParallelDataInput) String() string { 2860 return awsutil.Prettify(s) 2861} 2862 2863// GoString returns the string representation 2864func (s ListParallelDataInput) GoString() string { 2865 return s.String() 2866} 2867 2868// Validate inspects the fields of the type to determine if they are valid. 2869func (s *ListParallelDataInput) Validate() error { 2870 invalidParams := request.ErrInvalidParams{Context: "ListParallelDataInput"} 2871 if s.MaxResults != nil && *s.MaxResults < 1 { 2872 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 2873 } 2874 2875 if invalidParams.Len() > 0 { 2876 return invalidParams 2877 } 2878 return nil 2879} 2880 2881// SetMaxResults sets the MaxResults field's value. 2882func (s *ListParallelDataInput) SetMaxResults(v int64) *ListParallelDataInput { 2883 s.MaxResults = &v 2884 return s 2885} 2886 2887// SetNextToken sets the NextToken field's value. 2888func (s *ListParallelDataInput) SetNextToken(v string) *ListParallelDataInput { 2889 s.NextToken = &v 2890 return s 2891} 2892 2893type ListParallelDataOutput struct { 2894 _ struct{} `type:"structure"` 2895 2896 // The string to use in a subsequent request to get the next page of results 2897 // in a paginated response. This value is null if there are no additional pages. 2898 NextToken *string `type:"string"` 2899 2900 // The properties of the parallel data resources returned by this request. 2901 ParallelDataPropertiesList []*ParallelDataProperties `type:"list"` 2902} 2903 2904// String returns the string representation 2905func (s ListParallelDataOutput) String() string { 2906 return awsutil.Prettify(s) 2907} 2908 2909// GoString returns the string representation 2910func (s ListParallelDataOutput) GoString() string { 2911 return s.String() 2912} 2913 2914// SetNextToken sets the NextToken field's value. 2915func (s *ListParallelDataOutput) SetNextToken(v string) *ListParallelDataOutput { 2916 s.NextToken = &v 2917 return s 2918} 2919 2920// SetParallelDataPropertiesList sets the ParallelDataPropertiesList field's value. 2921func (s *ListParallelDataOutput) SetParallelDataPropertiesList(v []*ParallelDataProperties) *ListParallelDataOutput { 2922 s.ParallelDataPropertiesList = v 2923 return s 2924} 2925 2926type ListTerminologiesInput struct { 2927 _ struct{} `type:"structure"` 2928 2929 // The maximum number of custom terminologies returned per list request. 2930 MaxResults *int64 `min:"1" type:"integer"` 2931 2932 // If the result of the request to ListTerminologies was truncated, include 2933 // the NextToken to fetch the next group of custom terminologies. 2934 NextToken *string `type:"string"` 2935} 2936 2937// String returns the string representation 2938func (s ListTerminologiesInput) String() string { 2939 return awsutil.Prettify(s) 2940} 2941 2942// GoString returns the string representation 2943func (s ListTerminologiesInput) GoString() string { 2944 return s.String() 2945} 2946 2947// Validate inspects the fields of the type to determine if they are valid. 2948func (s *ListTerminologiesInput) Validate() error { 2949 invalidParams := request.ErrInvalidParams{Context: "ListTerminologiesInput"} 2950 if s.MaxResults != nil && *s.MaxResults < 1 { 2951 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 2952 } 2953 2954 if invalidParams.Len() > 0 { 2955 return invalidParams 2956 } 2957 return nil 2958} 2959 2960// SetMaxResults sets the MaxResults field's value. 2961func (s *ListTerminologiesInput) SetMaxResults(v int64) *ListTerminologiesInput { 2962 s.MaxResults = &v 2963 return s 2964} 2965 2966// SetNextToken sets the NextToken field's value. 2967func (s *ListTerminologiesInput) SetNextToken(v string) *ListTerminologiesInput { 2968 s.NextToken = &v 2969 return s 2970} 2971 2972type ListTerminologiesOutput struct { 2973 _ struct{} `type:"structure"` 2974 2975 // If the response to the ListTerminologies was truncated, the NextToken fetches 2976 // the next group of custom terminologies. 2977 NextToken *string `type:"string"` 2978 2979 // The properties list of the custom terminologies returned on the list request. 2980 TerminologyPropertiesList []*TerminologyProperties `type:"list"` 2981} 2982 2983// String returns the string representation 2984func (s ListTerminologiesOutput) String() string { 2985 return awsutil.Prettify(s) 2986} 2987 2988// GoString returns the string representation 2989func (s ListTerminologiesOutput) GoString() string { 2990 return s.String() 2991} 2992 2993// SetNextToken sets the NextToken field's value. 2994func (s *ListTerminologiesOutput) SetNextToken(v string) *ListTerminologiesOutput { 2995 s.NextToken = &v 2996 return s 2997} 2998 2999// SetTerminologyPropertiesList sets the TerminologyPropertiesList field's value. 3000func (s *ListTerminologiesOutput) SetTerminologyPropertiesList(v []*TerminologyProperties) *ListTerminologiesOutput { 3001 s.TerminologyPropertiesList = v 3002 return s 3003} 3004 3005type ListTextTranslationJobsInput struct { 3006 _ struct{} `type:"structure"` 3007 3008 // The parameters that specify which batch translation jobs to retrieve. Filters 3009 // include job name, job status, and submission time. You can only set one filter 3010 // at a time. 3011 Filter *TextTranslationJobFilter `type:"structure"` 3012 3013 // The maximum number of results to return in each page. The default value is 3014 // 100. 3015 MaxResults *int64 `min:"1" type:"integer"` 3016 3017 // The token to request the next page of results. 3018 NextToken *string `type:"string"` 3019} 3020 3021// String returns the string representation 3022func (s ListTextTranslationJobsInput) String() string { 3023 return awsutil.Prettify(s) 3024} 3025 3026// GoString returns the string representation 3027func (s ListTextTranslationJobsInput) GoString() string { 3028 return s.String() 3029} 3030 3031// Validate inspects the fields of the type to determine if they are valid. 3032func (s *ListTextTranslationJobsInput) Validate() error { 3033 invalidParams := request.ErrInvalidParams{Context: "ListTextTranslationJobsInput"} 3034 if s.MaxResults != nil && *s.MaxResults < 1 { 3035 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3036 } 3037 if s.Filter != nil { 3038 if err := s.Filter.Validate(); err != nil { 3039 invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) 3040 } 3041 } 3042 3043 if invalidParams.Len() > 0 { 3044 return invalidParams 3045 } 3046 return nil 3047} 3048 3049// SetFilter sets the Filter field's value. 3050func (s *ListTextTranslationJobsInput) SetFilter(v *TextTranslationJobFilter) *ListTextTranslationJobsInput { 3051 s.Filter = v 3052 return s 3053} 3054 3055// SetMaxResults sets the MaxResults field's value. 3056func (s *ListTextTranslationJobsInput) SetMaxResults(v int64) *ListTextTranslationJobsInput { 3057 s.MaxResults = &v 3058 return s 3059} 3060 3061// SetNextToken sets the NextToken field's value. 3062func (s *ListTextTranslationJobsInput) SetNextToken(v string) *ListTextTranslationJobsInput { 3063 s.NextToken = &v 3064 return s 3065} 3066 3067type ListTextTranslationJobsOutput struct { 3068 _ struct{} `type:"structure"` 3069 3070 // The token to use to retreive the next page of results. This value is null 3071 // when there are no more results to return. 3072 NextToken *string `type:"string"` 3073 3074 // A list containing the properties of each job that is returned. 3075 TextTranslationJobPropertiesList []*TextTranslationJobProperties `type:"list"` 3076} 3077 3078// String returns the string representation 3079func (s ListTextTranslationJobsOutput) String() string { 3080 return awsutil.Prettify(s) 3081} 3082 3083// GoString returns the string representation 3084func (s ListTextTranslationJobsOutput) GoString() string { 3085 return s.String() 3086} 3087 3088// SetNextToken sets the NextToken field's value. 3089func (s *ListTextTranslationJobsOutput) SetNextToken(v string) *ListTextTranslationJobsOutput { 3090 s.NextToken = &v 3091 return s 3092} 3093 3094// SetTextTranslationJobPropertiesList sets the TextTranslationJobPropertiesList field's value. 3095func (s *ListTextTranslationJobsOutput) SetTextTranslationJobPropertiesList(v []*TextTranslationJobProperties) *ListTextTranslationJobsOutput { 3096 s.TextTranslationJobPropertiesList = v 3097 return s 3098} 3099 3100// The output configuration properties for a batch translation job. 3101type OutputDataConfig struct { 3102 _ struct{} `type:"structure"` 3103 3104 // The URI of the S3 folder that contains a translation job's output file. The 3105 // folder must be in the same Region as the API endpoint that you are calling. 3106 // 3107 // S3Uri is a required field 3108 S3Uri *string `type:"string" required:"true"` 3109} 3110 3111// String returns the string representation 3112func (s OutputDataConfig) String() string { 3113 return awsutil.Prettify(s) 3114} 3115 3116// GoString returns the string representation 3117func (s OutputDataConfig) GoString() string { 3118 return s.String() 3119} 3120 3121// Validate inspects the fields of the type to determine if they are valid. 3122func (s *OutputDataConfig) Validate() error { 3123 invalidParams := request.ErrInvalidParams{Context: "OutputDataConfig"} 3124 if s.S3Uri == nil { 3125 invalidParams.Add(request.NewErrParamRequired("S3Uri")) 3126 } 3127 3128 if invalidParams.Len() > 0 { 3129 return invalidParams 3130 } 3131 return nil 3132} 3133 3134// SetS3Uri sets the S3Uri field's value. 3135func (s *OutputDataConfig) SetS3Uri(v string) *OutputDataConfig { 3136 s.S3Uri = &v 3137 return s 3138} 3139 3140// Specifies the format and S3 location of the parallel data input file. 3141type ParallelDataConfig struct { 3142 _ struct{} `type:"structure"` 3143 3144 // The format of the parallel data input file. 3145 // 3146 // Format is a required field 3147 Format *string `type:"string" required:"true" enum:"ParallelDataFormat"` 3148 3149 // The URI of the Amazon S3 folder that contains the parallel data input file. 3150 // The folder must be in the same Region as the API endpoint you are calling. 3151 // 3152 // S3Uri is a required field 3153 S3Uri *string `type:"string" required:"true"` 3154} 3155 3156// String returns the string representation 3157func (s ParallelDataConfig) String() string { 3158 return awsutil.Prettify(s) 3159} 3160 3161// GoString returns the string representation 3162func (s ParallelDataConfig) GoString() string { 3163 return s.String() 3164} 3165 3166// Validate inspects the fields of the type to determine if they are valid. 3167func (s *ParallelDataConfig) Validate() error { 3168 invalidParams := request.ErrInvalidParams{Context: "ParallelDataConfig"} 3169 if s.Format == nil { 3170 invalidParams.Add(request.NewErrParamRequired("Format")) 3171 } 3172 if s.S3Uri == nil { 3173 invalidParams.Add(request.NewErrParamRequired("S3Uri")) 3174 } 3175 3176 if invalidParams.Len() > 0 { 3177 return invalidParams 3178 } 3179 return nil 3180} 3181 3182// SetFormat sets the Format field's value. 3183func (s *ParallelDataConfig) SetFormat(v string) *ParallelDataConfig { 3184 s.Format = &v 3185 return s 3186} 3187 3188// SetS3Uri sets the S3Uri field's value. 3189func (s *ParallelDataConfig) SetS3Uri(v string) *ParallelDataConfig { 3190 s.S3Uri = &v 3191 return s 3192} 3193 3194// The location of the most recent parallel data input file that was successfully 3195// imported into Amazon Translate. 3196type ParallelDataDataLocation struct { 3197 _ struct{} `type:"structure"` 3198 3199 // The Amazon S3 location of the parallel data input file. The location is returned 3200 // as a presigned URL to that has a 30 minute expiration. 3201 // 3202 // Location is a required field 3203 Location *string `type:"string" required:"true"` 3204 3205 // Describes the repository that contains the parallel data input file. 3206 // 3207 // RepositoryType is a required field 3208 RepositoryType *string `type:"string" required:"true"` 3209} 3210 3211// String returns the string representation 3212func (s ParallelDataDataLocation) String() string { 3213 return awsutil.Prettify(s) 3214} 3215 3216// GoString returns the string representation 3217func (s ParallelDataDataLocation) GoString() string { 3218 return s.String() 3219} 3220 3221// SetLocation sets the Location field's value. 3222func (s *ParallelDataDataLocation) SetLocation(v string) *ParallelDataDataLocation { 3223 s.Location = &v 3224 return s 3225} 3226 3227// SetRepositoryType sets the RepositoryType field's value. 3228func (s *ParallelDataDataLocation) SetRepositoryType(v string) *ParallelDataDataLocation { 3229 s.RepositoryType = &v 3230 return s 3231} 3232 3233// The properties of a parallel data resource. 3234type ParallelDataProperties struct { 3235 _ struct{} `type:"structure"` 3236 3237 // The Amazon Resource Name (ARN) of the parallel data resource. 3238 Arn *string `min:"1" type:"string"` 3239 3240 // The time at which the parallel data resource was created. 3241 CreatedAt *time.Time `type:"timestamp"` 3242 3243 // The description assigned to the parallel data resource. 3244 Description *string `type:"string"` 3245 3246 // The encryption key used to encrypt this object. 3247 EncryptionKey *EncryptionKey `type:"structure"` 3248 3249 // The number of records unsuccessfully imported from the parallel data input 3250 // file. 3251 FailedRecordCount *int64 `type:"long"` 3252 3253 // The number of UTF-8 characters that Amazon Translate imported from the parallel 3254 // data input file. This number includes only the characters in your translation 3255 // examples. It does not include characters that are used to format your file. 3256 // For example, if you provided a Translation Memory Exchange (.tmx) file, this 3257 // number does not include the tags. 3258 ImportedDataSize *int64 `type:"long"` 3259 3260 // The number of records successfully imported from the parallel data input 3261 // file. 3262 ImportedRecordCount *int64 `type:"long"` 3263 3264 // The time at which the parallel data resource was last updated. 3265 LastUpdatedAt *time.Time `type:"timestamp"` 3266 3267 // The time that the most recent update was attempted. 3268 LatestUpdateAttemptAt *time.Time `type:"timestamp"` 3269 3270 // The status of the most recent update attempt for the parallel data resource. 3271 LatestUpdateAttemptStatus *string `type:"string" enum:"ParallelDataStatus"` 3272 3273 // Additional information from Amazon Translate about the parallel data resource. 3274 Message *string `type:"string"` 3275 3276 // The custom name assigned to the parallel data resource. 3277 Name *string `min:"1" type:"string"` 3278 3279 // Specifies the format and S3 location of the parallel data input file. 3280 ParallelDataConfig *ParallelDataConfig `type:"structure"` 3281 3282 // The number of items in the input file that Amazon Translate skipped when 3283 // you created or updated the parallel data resource. For example, Amazon Translate 3284 // skips empty records, empty target texts, and empty lines. 3285 SkippedRecordCount *int64 `type:"long"` 3286 3287 // The source language of the translations in the parallel data file. 3288 SourceLanguageCode *string `min:"2" type:"string"` 3289 3290 // The status of the parallel data resource. When the parallel data is ready 3291 // for you to use, the status is ACTIVE. 3292 Status *string `type:"string" enum:"ParallelDataStatus"` 3293 3294 // The language codes for the target languages available in the parallel data 3295 // file. All possible target languages are returned as an array. 3296 TargetLanguageCodes []*string `type:"list"` 3297} 3298 3299// String returns the string representation 3300func (s ParallelDataProperties) String() string { 3301 return awsutil.Prettify(s) 3302} 3303 3304// GoString returns the string representation 3305func (s ParallelDataProperties) GoString() string { 3306 return s.String() 3307} 3308 3309// SetArn sets the Arn field's value. 3310func (s *ParallelDataProperties) SetArn(v string) *ParallelDataProperties { 3311 s.Arn = &v 3312 return s 3313} 3314 3315// SetCreatedAt sets the CreatedAt field's value. 3316func (s *ParallelDataProperties) SetCreatedAt(v time.Time) *ParallelDataProperties { 3317 s.CreatedAt = &v 3318 return s 3319} 3320 3321// SetDescription sets the Description field's value. 3322func (s *ParallelDataProperties) SetDescription(v string) *ParallelDataProperties { 3323 s.Description = &v 3324 return s 3325} 3326 3327// SetEncryptionKey sets the EncryptionKey field's value. 3328func (s *ParallelDataProperties) SetEncryptionKey(v *EncryptionKey) *ParallelDataProperties { 3329 s.EncryptionKey = v 3330 return s 3331} 3332 3333// SetFailedRecordCount sets the FailedRecordCount field's value. 3334func (s *ParallelDataProperties) SetFailedRecordCount(v int64) *ParallelDataProperties { 3335 s.FailedRecordCount = &v 3336 return s 3337} 3338 3339// SetImportedDataSize sets the ImportedDataSize field's value. 3340func (s *ParallelDataProperties) SetImportedDataSize(v int64) *ParallelDataProperties { 3341 s.ImportedDataSize = &v 3342 return s 3343} 3344 3345// SetImportedRecordCount sets the ImportedRecordCount field's value. 3346func (s *ParallelDataProperties) SetImportedRecordCount(v int64) *ParallelDataProperties { 3347 s.ImportedRecordCount = &v 3348 return s 3349} 3350 3351// SetLastUpdatedAt sets the LastUpdatedAt field's value. 3352func (s *ParallelDataProperties) SetLastUpdatedAt(v time.Time) *ParallelDataProperties { 3353 s.LastUpdatedAt = &v 3354 return s 3355} 3356 3357// SetLatestUpdateAttemptAt sets the LatestUpdateAttemptAt field's value. 3358func (s *ParallelDataProperties) SetLatestUpdateAttemptAt(v time.Time) *ParallelDataProperties { 3359 s.LatestUpdateAttemptAt = &v 3360 return s 3361} 3362 3363// SetLatestUpdateAttemptStatus sets the LatestUpdateAttemptStatus field's value. 3364func (s *ParallelDataProperties) SetLatestUpdateAttemptStatus(v string) *ParallelDataProperties { 3365 s.LatestUpdateAttemptStatus = &v 3366 return s 3367} 3368 3369// SetMessage sets the Message field's value. 3370func (s *ParallelDataProperties) SetMessage(v string) *ParallelDataProperties { 3371 s.Message = &v 3372 return s 3373} 3374 3375// SetName sets the Name field's value. 3376func (s *ParallelDataProperties) SetName(v string) *ParallelDataProperties { 3377 s.Name = &v 3378 return s 3379} 3380 3381// SetParallelDataConfig sets the ParallelDataConfig field's value. 3382func (s *ParallelDataProperties) SetParallelDataConfig(v *ParallelDataConfig) *ParallelDataProperties { 3383 s.ParallelDataConfig = v 3384 return s 3385} 3386 3387// SetSkippedRecordCount sets the SkippedRecordCount field's value. 3388func (s *ParallelDataProperties) SetSkippedRecordCount(v int64) *ParallelDataProperties { 3389 s.SkippedRecordCount = &v 3390 return s 3391} 3392 3393// SetSourceLanguageCode sets the SourceLanguageCode field's value. 3394func (s *ParallelDataProperties) SetSourceLanguageCode(v string) *ParallelDataProperties { 3395 s.SourceLanguageCode = &v 3396 return s 3397} 3398 3399// SetStatus sets the Status field's value. 3400func (s *ParallelDataProperties) SetStatus(v string) *ParallelDataProperties { 3401 s.Status = &v 3402 return s 3403} 3404 3405// SetTargetLanguageCodes sets the TargetLanguageCodes field's value. 3406func (s *ParallelDataProperties) SetTargetLanguageCodes(v []*string) *ParallelDataProperties { 3407 s.TargetLanguageCodes = v 3408 return s 3409} 3410 3411// The resource you are looking for has not been found. Review the resource 3412// you're looking for and see if a different resource will accomplish your needs 3413// before retrying the revised request. 3414type ResourceNotFoundException struct { 3415 _ struct{} `type:"structure"` 3416 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3417 3418 Message_ *string `locationName:"Message" type:"string"` 3419} 3420 3421// String returns the string representation 3422func (s ResourceNotFoundException) String() string { 3423 return awsutil.Prettify(s) 3424} 3425 3426// GoString returns the string representation 3427func (s ResourceNotFoundException) GoString() string { 3428 return s.String() 3429} 3430 3431func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 3432 return &ResourceNotFoundException{ 3433 RespMetadata: v, 3434 } 3435} 3436 3437// Code returns the exception type name. 3438func (s *ResourceNotFoundException) Code() string { 3439 return "ResourceNotFoundException" 3440} 3441 3442// Message returns the exception's message. 3443func (s *ResourceNotFoundException) Message() string { 3444 if s.Message_ != nil { 3445 return *s.Message_ 3446 } 3447 return "" 3448} 3449 3450// OrigErr always returns nil, satisfies awserr.Error interface. 3451func (s *ResourceNotFoundException) OrigErr() error { 3452 return nil 3453} 3454 3455func (s *ResourceNotFoundException) Error() string { 3456 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3457} 3458 3459// Status code returns the HTTP status code for the request's response error. 3460func (s *ResourceNotFoundException) StatusCode() int { 3461 return s.RespMetadata.StatusCode 3462} 3463 3464// RequestID returns the service's response RequestID for request. 3465func (s *ResourceNotFoundException) RequestID() string { 3466 return s.RespMetadata.RequestID 3467} 3468 3469// The Amazon Translate service is temporarily unavailable. Please wait a bit 3470// and then retry your request. 3471type ServiceUnavailableException struct { 3472 _ struct{} `type:"structure"` 3473 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3474 3475 Message_ *string `locationName:"Message" type:"string"` 3476} 3477 3478// String returns the string representation 3479func (s ServiceUnavailableException) String() string { 3480 return awsutil.Prettify(s) 3481} 3482 3483// GoString returns the string representation 3484func (s ServiceUnavailableException) GoString() string { 3485 return s.String() 3486} 3487 3488func newErrorServiceUnavailableException(v protocol.ResponseMetadata) error { 3489 return &ServiceUnavailableException{ 3490 RespMetadata: v, 3491 } 3492} 3493 3494// Code returns the exception type name. 3495func (s *ServiceUnavailableException) Code() string { 3496 return "ServiceUnavailableException" 3497} 3498 3499// Message returns the exception's message. 3500func (s *ServiceUnavailableException) Message() string { 3501 if s.Message_ != nil { 3502 return *s.Message_ 3503 } 3504 return "" 3505} 3506 3507// OrigErr always returns nil, satisfies awserr.Error interface. 3508func (s *ServiceUnavailableException) OrigErr() error { 3509 return nil 3510} 3511 3512func (s *ServiceUnavailableException) Error() string { 3513 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3514} 3515 3516// Status code returns the HTTP status code for the request's response error. 3517func (s *ServiceUnavailableException) StatusCode() int { 3518 return s.RespMetadata.StatusCode 3519} 3520 3521// RequestID returns the service's response RequestID for request. 3522func (s *ServiceUnavailableException) RequestID() string { 3523 return s.RespMetadata.RequestID 3524} 3525 3526type StartTextTranslationJobInput struct { 3527 _ struct{} `type:"structure"` 3528 3529 // A unique identifier for the request. This token is auto-generated when using 3530 // the Amazon Translate SDK. 3531 ClientToken *string `min:"1" type:"string" idempotencyToken:"true"` 3532 3533 // The Amazon Resource Name (ARN) of an AWS Identity Access and Management (IAM) 3534 // role that grants Amazon Translate read access to your input data. For more 3535 // nformation, see identity-and-access-management. 3536 // 3537 // DataAccessRoleArn is a required field 3538 DataAccessRoleArn *string `min:"20" type:"string" required:"true"` 3539 3540 // Specifies the format and S3 location of the input documents for the translation 3541 // job. 3542 // 3543 // InputDataConfig is a required field 3544 InputDataConfig *InputDataConfig `type:"structure" required:"true"` 3545 3546 // The name of the batch translation job to be performed. 3547 JobName *string `min:"1" type:"string"` 3548 3549 // Specifies the S3 folder to which your job output will be saved. 3550 // 3551 // OutputDataConfig is a required field 3552 OutputDataConfig *OutputDataConfig `type:"structure" required:"true"` 3553 3554 // The names of the parallel data resources to use in the batch translation 3555 // job. For a list of available parallel data resources, use the ListParallelData 3556 // operation. 3557 ParallelDataNames []*string `type:"list"` 3558 3559 // The language code of the input language. For a list of language codes, see 3560 // what-is-languages. 3561 // 3562 // Amazon Translate does not automatically detect a source language during batch 3563 // translation jobs. 3564 // 3565 // SourceLanguageCode is a required field 3566 SourceLanguageCode *string `min:"2" type:"string" required:"true"` 3567 3568 // The language code of the output language. 3569 // 3570 // TargetLanguageCodes is a required field 3571 TargetLanguageCodes []*string `min:"1" type:"list" required:"true"` 3572 3573 // The name of the terminology to use in the batch translation job. For a list 3574 // of available terminologies, use the ListTerminologies operation. 3575 TerminologyNames []*string `type:"list"` 3576} 3577 3578// String returns the string representation 3579func (s StartTextTranslationJobInput) String() string { 3580 return awsutil.Prettify(s) 3581} 3582 3583// GoString returns the string representation 3584func (s StartTextTranslationJobInput) GoString() string { 3585 return s.String() 3586} 3587 3588// Validate inspects the fields of the type to determine if they are valid. 3589func (s *StartTextTranslationJobInput) Validate() error { 3590 invalidParams := request.ErrInvalidParams{Context: "StartTextTranslationJobInput"} 3591 if s.ClientToken != nil && len(*s.ClientToken) < 1 { 3592 invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) 3593 } 3594 if s.DataAccessRoleArn == nil { 3595 invalidParams.Add(request.NewErrParamRequired("DataAccessRoleArn")) 3596 } 3597 if s.DataAccessRoleArn != nil && len(*s.DataAccessRoleArn) < 20 { 3598 invalidParams.Add(request.NewErrParamMinLen("DataAccessRoleArn", 20)) 3599 } 3600 if s.InputDataConfig == nil { 3601 invalidParams.Add(request.NewErrParamRequired("InputDataConfig")) 3602 } 3603 if s.JobName != nil && len(*s.JobName) < 1 { 3604 invalidParams.Add(request.NewErrParamMinLen("JobName", 1)) 3605 } 3606 if s.OutputDataConfig == nil { 3607 invalidParams.Add(request.NewErrParamRequired("OutputDataConfig")) 3608 } 3609 if s.SourceLanguageCode == nil { 3610 invalidParams.Add(request.NewErrParamRequired("SourceLanguageCode")) 3611 } 3612 if s.SourceLanguageCode != nil && len(*s.SourceLanguageCode) < 2 { 3613 invalidParams.Add(request.NewErrParamMinLen("SourceLanguageCode", 2)) 3614 } 3615 if s.TargetLanguageCodes == nil { 3616 invalidParams.Add(request.NewErrParamRequired("TargetLanguageCodes")) 3617 } 3618 if s.TargetLanguageCodes != nil && len(s.TargetLanguageCodes) < 1 { 3619 invalidParams.Add(request.NewErrParamMinLen("TargetLanguageCodes", 1)) 3620 } 3621 if s.InputDataConfig != nil { 3622 if err := s.InputDataConfig.Validate(); err != nil { 3623 invalidParams.AddNested("InputDataConfig", err.(request.ErrInvalidParams)) 3624 } 3625 } 3626 if s.OutputDataConfig != nil { 3627 if err := s.OutputDataConfig.Validate(); err != nil { 3628 invalidParams.AddNested("OutputDataConfig", err.(request.ErrInvalidParams)) 3629 } 3630 } 3631 3632 if invalidParams.Len() > 0 { 3633 return invalidParams 3634 } 3635 return nil 3636} 3637 3638// SetClientToken sets the ClientToken field's value. 3639func (s *StartTextTranslationJobInput) SetClientToken(v string) *StartTextTranslationJobInput { 3640 s.ClientToken = &v 3641 return s 3642} 3643 3644// SetDataAccessRoleArn sets the DataAccessRoleArn field's value. 3645func (s *StartTextTranslationJobInput) SetDataAccessRoleArn(v string) *StartTextTranslationJobInput { 3646 s.DataAccessRoleArn = &v 3647 return s 3648} 3649 3650// SetInputDataConfig sets the InputDataConfig field's value. 3651func (s *StartTextTranslationJobInput) SetInputDataConfig(v *InputDataConfig) *StartTextTranslationJobInput { 3652 s.InputDataConfig = v 3653 return s 3654} 3655 3656// SetJobName sets the JobName field's value. 3657func (s *StartTextTranslationJobInput) SetJobName(v string) *StartTextTranslationJobInput { 3658 s.JobName = &v 3659 return s 3660} 3661 3662// SetOutputDataConfig sets the OutputDataConfig field's value. 3663func (s *StartTextTranslationJobInput) SetOutputDataConfig(v *OutputDataConfig) *StartTextTranslationJobInput { 3664 s.OutputDataConfig = v 3665 return s 3666} 3667 3668// SetParallelDataNames sets the ParallelDataNames field's value. 3669func (s *StartTextTranslationJobInput) SetParallelDataNames(v []*string) *StartTextTranslationJobInput { 3670 s.ParallelDataNames = v 3671 return s 3672} 3673 3674// SetSourceLanguageCode sets the SourceLanguageCode field's value. 3675func (s *StartTextTranslationJobInput) SetSourceLanguageCode(v string) *StartTextTranslationJobInput { 3676 s.SourceLanguageCode = &v 3677 return s 3678} 3679 3680// SetTargetLanguageCodes sets the TargetLanguageCodes field's value. 3681func (s *StartTextTranslationJobInput) SetTargetLanguageCodes(v []*string) *StartTextTranslationJobInput { 3682 s.TargetLanguageCodes = v 3683 return s 3684} 3685 3686// SetTerminologyNames sets the TerminologyNames field's value. 3687func (s *StartTextTranslationJobInput) SetTerminologyNames(v []*string) *StartTextTranslationJobInput { 3688 s.TerminologyNames = v 3689 return s 3690} 3691 3692type StartTextTranslationJobOutput struct { 3693 _ struct{} `type:"structure"` 3694 3695 // The identifier generated for the job. To get the status of a job, use this 3696 // ID with the DescribeTextTranslationJob operation. 3697 JobId *string `min:"1" type:"string"` 3698 3699 // The status of the job. Possible values include: 3700 // 3701 // * SUBMITTED - The job has been received and is queued for processing. 3702 // 3703 // * IN_PROGRESS - Amazon Translate is processing the job. 3704 // 3705 // * COMPLETED - The job was successfully completed and the output is available. 3706 // 3707 // * COMPLETED_WITH_ERROR - The job was completed with errors. The errors 3708 // can be analyzed in the job's output. 3709 // 3710 // * FAILED - The job did not complete. To get details, use the DescribeTextTranslationJob 3711 // operation. 3712 // 3713 // * STOP_REQUESTED - The user who started the job has requested that it 3714 // be stopped. 3715 // 3716 // * STOPPED - The job has been stopped. 3717 JobStatus *string `type:"string" enum:"JobStatus"` 3718} 3719 3720// String returns the string representation 3721func (s StartTextTranslationJobOutput) String() string { 3722 return awsutil.Prettify(s) 3723} 3724 3725// GoString returns the string representation 3726func (s StartTextTranslationJobOutput) GoString() string { 3727 return s.String() 3728} 3729 3730// SetJobId sets the JobId field's value. 3731func (s *StartTextTranslationJobOutput) SetJobId(v string) *StartTextTranslationJobOutput { 3732 s.JobId = &v 3733 return s 3734} 3735 3736// SetJobStatus sets the JobStatus field's value. 3737func (s *StartTextTranslationJobOutput) SetJobStatus(v string) *StartTextTranslationJobOutput { 3738 s.JobStatus = &v 3739 return s 3740} 3741 3742type StopTextTranslationJobInput struct { 3743 _ struct{} `type:"structure"` 3744 3745 // The job ID of the job to be stopped. 3746 // 3747 // JobId is a required field 3748 JobId *string `min:"1" type:"string" required:"true"` 3749} 3750 3751// String returns the string representation 3752func (s StopTextTranslationJobInput) String() string { 3753 return awsutil.Prettify(s) 3754} 3755 3756// GoString returns the string representation 3757func (s StopTextTranslationJobInput) GoString() string { 3758 return s.String() 3759} 3760 3761// Validate inspects the fields of the type to determine if they are valid. 3762func (s *StopTextTranslationJobInput) Validate() error { 3763 invalidParams := request.ErrInvalidParams{Context: "StopTextTranslationJobInput"} 3764 if s.JobId == nil { 3765 invalidParams.Add(request.NewErrParamRequired("JobId")) 3766 } 3767 if s.JobId != nil && len(*s.JobId) < 1 { 3768 invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) 3769 } 3770 3771 if invalidParams.Len() > 0 { 3772 return invalidParams 3773 } 3774 return nil 3775} 3776 3777// SetJobId sets the JobId field's value. 3778func (s *StopTextTranslationJobInput) SetJobId(v string) *StopTextTranslationJobInput { 3779 s.JobId = &v 3780 return s 3781} 3782 3783type StopTextTranslationJobOutput struct { 3784 _ struct{} `type:"structure"` 3785 3786 // The job ID of the stopped batch translation job. 3787 JobId *string `min:"1" type:"string"` 3788 3789 // The status of the designated job. Upon successful completion, the job's status 3790 // will be STOPPED. 3791 JobStatus *string `type:"string" enum:"JobStatus"` 3792} 3793 3794// String returns the string representation 3795func (s StopTextTranslationJobOutput) String() string { 3796 return awsutil.Prettify(s) 3797} 3798 3799// GoString returns the string representation 3800func (s StopTextTranslationJobOutput) GoString() string { 3801 return s.String() 3802} 3803 3804// SetJobId sets the JobId field's value. 3805func (s *StopTextTranslationJobOutput) SetJobId(v string) *StopTextTranslationJobOutput { 3806 s.JobId = &v 3807 return s 3808} 3809 3810// SetJobStatus sets the JobStatus field's value. 3811func (s *StopTextTranslationJobOutput) SetJobStatus(v string) *StopTextTranslationJobOutput { 3812 s.JobStatus = &v 3813 return s 3814} 3815 3816// The term being translated by the custom terminology. 3817type Term struct { 3818 _ struct{} `type:"structure"` 3819 3820 // The source text of the term being translated by the custom terminology. 3821 SourceText *string `type:"string"` 3822 3823 // The target text of the term being translated by the custom terminology. 3824 TargetText *string `type:"string"` 3825} 3826 3827// String returns the string representation 3828func (s Term) String() string { 3829 return awsutil.Prettify(s) 3830} 3831 3832// GoString returns the string representation 3833func (s Term) GoString() string { 3834 return s.String() 3835} 3836 3837// SetSourceText sets the SourceText field's value. 3838func (s *Term) SetSourceText(v string) *Term { 3839 s.SourceText = &v 3840 return s 3841} 3842 3843// SetTargetText sets the TargetText field's value. 3844func (s *Term) SetTargetText(v string) *Term { 3845 s.TargetText = &v 3846 return s 3847} 3848 3849// The data associated with the custom terminology. 3850type TerminologyData struct { 3851 _ struct{} `type:"structure"` 3852 3853 // The file containing the custom terminology data. Your version of the AWS 3854 // SDK performs a Base64-encoding on this field before sending a request to 3855 // the AWS service. Users of the SDK should not perform Base64-encoding themselves. 3856 // 3857 // File is automatically base64 encoded/decoded by the SDK. 3858 // 3859 // File is a required field 3860 File []byte `type:"blob" required:"true" sensitive:"true"` 3861 3862 // The data format of the custom terminology. Either CSV or TMX. 3863 // 3864 // Format is a required field 3865 Format *string `type:"string" required:"true" enum:"TerminologyDataFormat"` 3866} 3867 3868// String returns the string representation 3869func (s TerminologyData) String() string { 3870 return awsutil.Prettify(s) 3871} 3872 3873// GoString returns the string representation 3874func (s TerminologyData) GoString() string { 3875 return s.String() 3876} 3877 3878// Validate inspects the fields of the type to determine if they are valid. 3879func (s *TerminologyData) Validate() error { 3880 invalidParams := request.ErrInvalidParams{Context: "TerminologyData"} 3881 if s.File == nil { 3882 invalidParams.Add(request.NewErrParamRequired("File")) 3883 } 3884 if s.Format == nil { 3885 invalidParams.Add(request.NewErrParamRequired("Format")) 3886 } 3887 3888 if invalidParams.Len() > 0 { 3889 return invalidParams 3890 } 3891 return nil 3892} 3893 3894// SetFile sets the File field's value. 3895func (s *TerminologyData) SetFile(v []byte) *TerminologyData { 3896 s.File = v 3897 return s 3898} 3899 3900// SetFormat sets the Format field's value. 3901func (s *TerminologyData) SetFormat(v string) *TerminologyData { 3902 s.Format = &v 3903 return s 3904} 3905 3906// The location of the custom terminology data. 3907type TerminologyDataLocation struct { 3908 _ struct{} `type:"structure"` 3909 3910 // The location of the custom terminology data. 3911 // 3912 // Location is a required field 3913 Location *string `type:"string" required:"true"` 3914 3915 // The repository type for the custom terminology data. 3916 // 3917 // RepositoryType is a required field 3918 RepositoryType *string `type:"string" required:"true"` 3919} 3920 3921// String returns the string representation 3922func (s TerminologyDataLocation) String() string { 3923 return awsutil.Prettify(s) 3924} 3925 3926// GoString returns the string representation 3927func (s TerminologyDataLocation) GoString() string { 3928 return s.String() 3929} 3930 3931// SetLocation sets the Location field's value. 3932func (s *TerminologyDataLocation) SetLocation(v string) *TerminologyDataLocation { 3933 s.Location = &v 3934 return s 3935} 3936 3937// SetRepositoryType sets the RepositoryType field's value. 3938func (s *TerminologyDataLocation) SetRepositoryType(v string) *TerminologyDataLocation { 3939 s.RepositoryType = &v 3940 return s 3941} 3942 3943// The properties of the custom terminology. 3944type TerminologyProperties struct { 3945 _ struct{} `type:"structure"` 3946 3947 // The Amazon Resource Name (ARN) of the custom terminology. 3948 Arn *string `min:"1" type:"string"` 3949 3950 // The time at which the custom terminology was created, based on the timestamp. 3951 CreatedAt *time.Time `type:"timestamp"` 3952 3953 // The description of the custom terminology properties. 3954 Description *string `type:"string"` 3955 3956 // The encryption key for the custom terminology. 3957 EncryptionKey *EncryptionKey `type:"structure"` 3958 3959 // The time at which the custom terminology was last update, based on the timestamp. 3960 LastUpdatedAt *time.Time `type:"timestamp"` 3961 3962 // The name of the custom terminology. 3963 Name *string `min:"1" type:"string"` 3964 3965 // The size of the file used when importing a custom terminology. 3966 SizeBytes *int64 `type:"integer"` 3967 3968 // The language code for the source text of the translation request for which 3969 // the custom terminology is being used. 3970 SourceLanguageCode *string `min:"2" type:"string"` 3971 3972 // The language codes for the target languages available with the custom terminology 3973 // file. All possible target languages are returned in array. 3974 TargetLanguageCodes []*string `type:"list"` 3975 3976 // The number of terms included in the custom terminology. 3977 TermCount *int64 `type:"integer"` 3978} 3979 3980// String returns the string representation 3981func (s TerminologyProperties) String() string { 3982 return awsutil.Prettify(s) 3983} 3984 3985// GoString returns the string representation 3986func (s TerminologyProperties) GoString() string { 3987 return s.String() 3988} 3989 3990// SetArn sets the Arn field's value. 3991func (s *TerminologyProperties) SetArn(v string) *TerminologyProperties { 3992 s.Arn = &v 3993 return s 3994} 3995 3996// SetCreatedAt sets the CreatedAt field's value. 3997func (s *TerminologyProperties) SetCreatedAt(v time.Time) *TerminologyProperties { 3998 s.CreatedAt = &v 3999 return s 4000} 4001 4002// SetDescription sets the Description field's value. 4003func (s *TerminologyProperties) SetDescription(v string) *TerminologyProperties { 4004 s.Description = &v 4005 return s 4006} 4007 4008// SetEncryptionKey sets the EncryptionKey field's value. 4009func (s *TerminologyProperties) SetEncryptionKey(v *EncryptionKey) *TerminologyProperties { 4010 s.EncryptionKey = v 4011 return s 4012} 4013 4014// SetLastUpdatedAt sets the LastUpdatedAt field's value. 4015func (s *TerminologyProperties) SetLastUpdatedAt(v time.Time) *TerminologyProperties { 4016 s.LastUpdatedAt = &v 4017 return s 4018} 4019 4020// SetName sets the Name field's value. 4021func (s *TerminologyProperties) SetName(v string) *TerminologyProperties { 4022 s.Name = &v 4023 return s 4024} 4025 4026// SetSizeBytes sets the SizeBytes field's value. 4027func (s *TerminologyProperties) SetSizeBytes(v int64) *TerminologyProperties { 4028 s.SizeBytes = &v 4029 return s 4030} 4031 4032// SetSourceLanguageCode sets the SourceLanguageCode field's value. 4033func (s *TerminologyProperties) SetSourceLanguageCode(v string) *TerminologyProperties { 4034 s.SourceLanguageCode = &v 4035 return s 4036} 4037 4038// SetTargetLanguageCodes sets the TargetLanguageCodes field's value. 4039func (s *TerminologyProperties) SetTargetLanguageCodes(v []*string) *TerminologyProperties { 4040 s.TargetLanguageCodes = v 4041 return s 4042} 4043 4044// SetTermCount sets the TermCount field's value. 4045func (s *TerminologyProperties) SetTermCount(v int64) *TerminologyProperties { 4046 s.TermCount = &v 4047 return s 4048} 4049 4050type TextInput struct { 4051 _ struct{} `type:"structure"` 4052 4053 // The language code for the language of the source text. The language must 4054 // be a language supported by Amazon Translate. For a list of language codes, 4055 // see what-is-languages. 4056 // 4057 // To have Amazon Translate determine the source language of your text, you 4058 // can specify auto in the SourceLanguageCode field. If you specify auto, Amazon 4059 // Translate will call Amazon Comprehend (https://docs.aws.amazon.com/comprehend/latest/dg/comprehend-general.html) 4060 // to determine the source language. 4061 // 4062 // SourceLanguageCode is a required field 4063 SourceLanguageCode *string `min:"2" type:"string" required:"true"` 4064 4065 // The language code requested for the language of the target text. The language 4066 // must be a language supported by Amazon Translate. 4067 // 4068 // TargetLanguageCode is a required field 4069 TargetLanguageCode *string `min:"2" type:"string" required:"true"` 4070 4071 // The name of the terminology list file to be used in the TranslateText request. 4072 // You can use 1 terminology list at most in a TranslateText request. Terminology 4073 // lists can contain a maximum of 256 terms. 4074 TerminologyNames []*string `type:"list"` 4075 4076 // The text to translate. The text string can be a maximum of 5,000 bytes long. 4077 // Depending on your character set, this may be fewer than 5,000 characters. 4078 // 4079 // Text is a required field 4080 Text *string `min:"1" type:"string" required:"true"` 4081} 4082 4083// String returns the string representation 4084func (s TextInput) String() string { 4085 return awsutil.Prettify(s) 4086} 4087 4088// GoString returns the string representation 4089func (s TextInput) GoString() string { 4090 return s.String() 4091} 4092 4093// Validate inspects the fields of the type to determine if they are valid. 4094func (s *TextInput) Validate() error { 4095 invalidParams := request.ErrInvalidParams{Context: "TextInput"} 4096 if s.SourceLanguageCode == nil { 4097 invalidParams.Add(request.NewErrParamRequired("SourceLanguageCode")) 4098 } 4099 if s.SourceLanguageCode != nil && len(*s.SourceLanguageCode) < 2 { 4100 invalidParams.Add(request.NewErrParamMinLen("SourceLanguageCode", 2)) 4101 } 4102 if s.TargetLanguageCode == nil { 4103 invalidParams.Add(request.NewErrParamRequired("TargetLanguageCode")) 4104 } 4105 if s.TargetLanguageCode != nil && len(*s.TargetLanguageCode) < 2 { 4106 invalidParams.Add(request.NewErrParamMinLen("TargetLanguageCode", 2)) 4107 } 4108 if s.Text == nil { 4109 invalidParams.Add(request.NewErrParamRequired("Text")) 4110 } 4111 if s.Text != nil && len(*s.Text) < 1 { 4112 invalidParams.Add(request.NewErrParamMinLen("Text", 1)) 4113 } 4114 4115 if invalidParams.Len() > 0 { 4116 return invalidParams 4117 } 4118 return nil 4119} 4120 4121// SetSourceLanguageCode sets the SourceLanguageCode field's value. 4122func (s *TextInput) SetSourceLanguageCode(v string) *TextInput { 4123 s.SourceLanguageCode = &v 4124 return s 4125} 4126 4127// SetTargetLanguageCode sets the TargetLanguageCode field's value. 4128func (s *TextInput) SetTargetLanguageCode(v string) *TextInput { 4129 s.TargetLanguageCode = &v 4130 return s 4131} 4132 4133// SetTerminologyNames sets the TerminologyNames field's value. 4134func (s *TextInput) SetTerminologyNames(v []*string) *TextInput { 4135 s.TerminologyNames = v 4136 return s 4137} 4138 4139// SetText sets the Text field's value. 4140func (s *TextInput) SetText(v string) *TextInput { 4141 s.Text = &v 4142 return s 4143} 4144 4145type TextOutput struct { 4146 _ struct{} `type:"structure"` 4147 4148 // The names of the custom terminologies applied to the input text by Amazon 4149 // Translate for the translated text response. 4150 AppliedTerminologies []*AppliedTerminology `type:"list"` 4151 4152 // The language code for the language of the source text. 4153 // 4154 // SourceLanguageCode is a required field 4155 SourceLanguageCode *string `min:"2" type:"string" required:"true"` 4156 4157 // The language code for the language of the target text. 4158 // 4159 // TargetLanguageCode is a required field 4160 TargetLanguageCode *string `min:"2" type:"string" required:"true"` 4161 4162 // The translated text. 4163 // 4164 // TranslatedText is a required field 4165 TranslatedText *string `type:"string" required:"true"` 4166} 4167 4168// String returns the string representation 4169func (s TextOutput) String() string { 4170 return awsutil.Prettify(s) 4171} 4172 4173// GoString returns the string representation 4174func (s TextOutput) GoString() string { 4175 return s.String() 4176} 4177 4178// SetAppliedTerminologies sets the AppliedTerminologies field's value. 4179func (s *TextOutput) SetAppliedTerminologies(v []*AppliedTerminology) *TextOutput { 4180 s.AppliedTerminologies = v 4181 return s 4182} 4183 4184// SetSourceLanguageCode sets the SourceLanguageCode field's value. 4185func (s *TextOutput) SetSourceLanguageCode(v string) *TextOutput { 4186 s.SourceLanguageCode = &v 4187 return s 4188} 4189 4190// SetTargetLanguageCode sets the TargetLanguageCode field's value. 4191func (s *TextOutput) SetTargetLanguageCode(v string) *TextOutput { 4192 s.TargetLanguageCode = &v 4193 return s 4194} 4195 4196// SetTranslatedText sets the TranslatedText field's value. 4197func (s *TextOutput) SetTranslatedText(v string) *TextOutput { 4198 s.TranslatedText = &v 4199 return s 4200} 4201 4202// The size of the text you submitted exceeds the size limit. Reduce the size 4203// of the text or use a smaller document and then retry your request. 4204type TextSizeLimitExceededException struct { 4205 _ struct{} `type:"structure"` 4206 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4207 4208 Message_ *string `locationName:"Message" type:"string"` 4209} 4210 4211// String returns the string representation 4212func (s TextSizeLimitExceededException) String() string { 4213 return awsutil.Prettify(s) 4214} 4215 4216// GoString returns the string representation 4217func (s TextSizeLimitExceededException) GoString() string { 4218 return s.String() 4219} 4220 4221func newErrorTextSizeLimitExceededException(v protocol.ResponseMetadata) error { 4222 return &TextSizeLimitExceededException{ 4223 RespMetadata: v, 4224 } 4225} 4226 4227// Code returns the exception type name. 4228func (s *TextSizeLimitExceededException) Code() string { 4229 return "TextSizeLimitExceededException" 4230} 4231 4232// Message returns the exception's message. 4233func (s *TextSizeLimitExceededException) Message() string { 4234 if s.Message_ != nil { 4235 return *s.Message_ 4236 } 4237 return "" 4238} 4239 4240// OrigErr always returns nil, satisfies awserr.Error interface. 4241func (s *TextSizeLimitExceededException) OrigErr() error { 4242 return nil 4243} 4244 4245func (s *TextSizeLimitExceededException) Error() string { 4246 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4247} 4248 4249// Status code returns the HTTP status code for the request's response error. 4250func (s *TextSizeLimitExceededException) StatusCode() int { 4251 return s.RespMetadata.StatusCode 4252} 4253 4254// RequestID returns the service's response RequestID for request. 4255func (s *TextSizeLimitExceededException) RequestID() string { 4256 return s.RespMetadata.RequestID 4257} 4258 4259// Provides information for filtering a list of translation jobs. For more information, 4260// see ListTextTranslationJobs. 4261type TextTranslationJobFilter struct { 4262 _ struct{} `type:"structure"` 4263 4264 // Filters the list of jobs by name. 4265 JobName *string `min:"1" type:"string"` 4266 4267 // Filters the list of jobs based by job status. 4268 JobStatus *string `type:"string" enum:"JobStatus"` 4269 4270 // Filters the list of jobs based on the time that the job was submitted for 4271 // processing and returns only the jobs submitted after the specified time. 4272 // Jobs are returned in descending order, newest to oldest. 4273 SubmittedAfterTime *time.Time `type:"timestamp"` 4274 4275 // Filters the list of jobs based on the time that the job was submitted for 4276 // processing and returns only the jobs submitted before the specified time. 4277 // Jobs are returned in ascending order, oldest to newest. 4278 SubmittedBeforeTime *time.Time `type:"timestamp"` 4279} 4280 4281// String returns the string representation 4282func (s TextTranslationJobFilter) String() string { 4283 return awsutil.Prettify(s) 4284} 4285 4286// GoString returns the string representation 4287func (s TextTranslationJobFilter) GoString() string { 4288 return s.String() 4289} 4290 4291// Validate inspects the fields of the type to determine if they are valid. 4292func (s *TextTranslationJobFilter) Validate() error { 4293 invalidParams := request.ErrInvalidParams{Context: "TextTranslationJobFilter"} 4294 if s.JobName != nil && len(*s.JobName) < 1 { 4295 invalidParams.Add(request.NewErrParamMinLen("JobName", 1)) 4296 } 4297 4298 if invalidParams.Len() > 0 { 4299 return invalidParams 4300 } 4301 return nil 4302} 4303 4304// SetJobName sets the JobName field's value. 4305func (s *TextTranslationJobFilter) SetJobName(v string) *TextTranslationJobFilter { 4306 s.JobName = &v 4307 return s 4308} 4309 4310// SetJobStatus sets the JobStatus field's value. 4311func (s *TextTranslationJobFilter) SetJobStatus(v string) *TextTranslationJobFilter { 4312 s.JobStatus = &v 4313 return s 4314} 4315 4316// SetSubmittedAfterTime sets the SubmittedAfterTime field's value. 4317func (s *TextTranslationJobFilter) SetSubmittedAfterTime(v time.Time) *TextTranslationJobFilter { 4318 s.SubmittedAfterTime = &v 4319 return s 4320} 4321 4322// SetSubmittedBeforeTime sets the SubmittedBeforeTime field's value. 4323func (s *TextTranslationJobFilter) SetSubmittedBeforeTime(v time.Time) *TextTranslationJobFilter { 4324 s.SubmittedBeforeTime = &v 4325 return s 4326} 4327 4328// Provides information about a translation job. 4329type TextTranslationJobProperties struct { 4330 _ struct{} `type:"structure"` 4331 4332 // The Amazon Resource Name (ARN) of an AWS Identity Access and Management (IAM) 4333 // role that granted Amazon Translate read access to the job's input data. 4334 DataAccessRoleArn *string `min:"20" type:"string"` 4335 4336 // The time at which the translation job ended. 4337 EndTime *time.Time `type:"timestamp"` 4338 4339 // The input configuration properties that were specified when the job was requested. 4340 InputDataConfig *InputDataConfig `type:"structure"` 4341 4342 // The number of documents successfully and unsuccessfully processed during 4343 // the translation job. 4344 JobDetails *JobDetails `type:"structure"` 4345 4346 // The ID of the translation job. 4347 JobId *string `min:"1" type:"string"` 4348 4349 // The user-defined name of the translation job. 4350 JobName *string `min:"1" type:"string"` 4351 4352 // The status of the translation job. 4353 JobStatus *string `type:"string" enum:"JobStatus"` 4354 4355 // An explanation of any errors that may have occured during the translation 4356 // job. 4357 Message *string `type:"string"` 4358 4359 // The output configuration properties that were specified when the job was 4360 // requested. 4361 OutputDataConfig *OutputDataConfig `type:"structure"` 4362 4363 // A list containing the names of the parallel data resources applied to the 4364 // translation job. 4365 ParallelDataNames []*string `type:"list"` 4366 4367 // The language code of the language of the source text. The language must be 4368 // a language supported by Amazon Translate. 4369 SourceLanguageCode *string `min:"2" type:"string"` 4370 4371 // The time at which the translation job was submitted. 4372 SubmittedTime *time.Time `type:"timestamp"` 4373 4374 // The language code of the language of the target text. The language must be 4375 // a language supported by Amazon Translate. 4376 TargetLanguageCodes []*string `min:"1" type:"list"` 4377 4378 // A list containing the names of the terminologies applied to a translation 4379 // job. Only one terminology can be applied per StartTextTranslationJob request 4380 // at this time. 4381 TerminologyNames []*string `type:"list"` 4382} 4383 4384// String returns the string representation 4385func (s TextTranslationJobProperties) String() string { 4386 return awsutil.Prettify(s) 4387} 4388 4389// GoString returns the string representation 4390func (s TextTranslationJobProperties) GoString() string { 4391 return s.String() 4392} 4393 4394// SetDataAccessRoleArn sets the DataAccessRoleArn field's value. 4395func (s *TextTranslationJobProperties) SetDataAccessRoleArn(v string) *TextTranslationJobProperties { 4396 s.DataAccessRoleArn = &v 4397 return s 4398} 4399 4400// SetEndTime sets the EndTime field's value. 4401func (s *TextTranslationJobProperties) SetEndTime(v time.Time) *TextTranslationJobProperties { 4402 s.EndTime = &v 4403 return s 4404} 4405 4406// SetInputDataConfig sets the InputDataConfig field's value. 4407func (s *TextTranslationJobProperties) SetInputDataConfig(v *InputDataConfig) *TextTranslationJobProperties { 4408 s.InputDataConfig = v 4409 return s 4410} 4411 4412// SetJobDetails sets the JobDetails field's value. 4413func (s *TextTranslationJobProperties) SetJobDetails(v *JobDetails) *TextTranslationJobProperties { 4414 s.JobDetails = v 4415 return s 4416} 4417 4418// SetJobId sets the JobId field's value. 4419func (s *TextTranslationJobProperties) SetJobId(v string) *TextTranslationJobProperties { 4420 s.JobId = &v 4421 return s 4422} 4423 4424// SetJobName sets the JobName field's value. 4425func (s *TextTranslationJobProperties) SetJobName(v string) *TextTranslationJobProperties { 4426 s.JobName = &v 4427 return s 4428} 4429 4430// SetJobStatus sets the JobStatus field's value. 4431func (s *TextTranslationJobProperties) SetJobStatus(v string) *TextTranslationJobProperties { 4432 s.JobStatus = &v 4433 return s 4434} 4435 4436// SetMessage sets the Message field's value. 4437func (s *TextTranslationJobProperties) SetMessage(v string) *TextTranslationJobProperties { 4438 s.Message = &v 4439 return s 4440} 4441 4442// SetOutputDataConfig sets the OutputDataConfig field's value. 4443func (s *TextTranslationJobProperties) SetOutputDataConfig(v *OutputDataConfig) *TextTranslationJobProperties { 4444 s.OutputDataConfig = v 4445 return s 4446} 4447 4448// SetParallelDataNames sets the ParallelDataNames field's value. 4449func (s *TextTranslationJobProperties) SetParallelDataNames(v []*string) *TextTranslationJobProperties { 4450 s.ParallelDataNames = v 4451 return s 4452} 4453 4454// SetSourceLanguageCode sets the SourceLanguageCode field's value. 4455func (s *TextTranslationJobProperties) SetSourceLanguageCode(v string) *TextTranslationJobProperties { 4456 s.SourceLanguageCode = &v 4457 return s 4458} 4459 4460// SetSubmittedTime sets the SubmittedTime field's value. 4461func (s *TextTranslationJobProperties) SetSubmittedTime(v time.Time) *TextTranslationJobProperties { 4462 s.SubmittedTime = &v 4463 return s 4464} 4465 4466// SetTargetLanguageCodes sets the TargetLanguageCodes field's value. 4467func (s *TextTranslationJobProperties) SetTargetLanguageCodes(v []*string) *TextTranslationJobProperties { 4468 s.TargetLanguageCodes = v 4469 return s 4470} 4471 4472// SetTerminologyNames sets the TerminologyNames field's value. 4473func (s *TextTranslationJobProperties) SetTerminologyNames(v []*string) *TextTranslationJobProperties { 4474 s.TerminologyNames = v 4475 return s 4476} 4477 4478// You have made too many requests within a short period of time. Wait for a 4479// short time and then try your request again. 4480type TooManyRequestsException struct { 4481 _ struct{} `type:"structure"` 4482 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4483 4484 Message_ *string `locationName:"Message" type:"string"` 4485} 4486 4487// String returns the string representation 4488func (s TooManyRequestsException) String() string { 4489 return awsutil.Prettify(s) 4490} 4491 4492// GoString returns the string representation 4493func (s TooManyRequestsException) GoString() string { 4494 return s.String() 4495} 4496 4497func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error { 4498 return &TooManyRequestsException{ 4499 RespMetadata: v, 4500 } 4501} 4502 4503// Code returns the exception type name. 4504func (s *TooManyRequestsException) Code() string { 4505 return "TooManyRequestsException" 4506} 4507 4508// Message returns the exception's message. 4509func (s *TooManyRequestsException) Message() string { 4510 if s.Message_ != nil { 4511 return *s.Message_ 4512 } 4513 return "" 4514} 4515 4516// OrigErr always returns nil, satisfies awserr.Error interface. 4517func (s *TooManyRequestsException) OrigErr() error { 4518 return nil 4519} 4520 4521func (s *TooManyRequestsException) Error() string { 4522 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4523} 4524 4525// Status code returns the HTTP status code for the request's response error. 4526func (s *TooManyRequestsException) StatusCode() int { 4527 return s.RespMetadata.StatusCode 4528} 4529 4530// RequestID returns the service's response RequestID for request. 4531func (s *TooManyRequestsException) RequestID() string { 4532 return s.RespMetadata.RequestID 4533} 4534 4535// Amazon Translate does not support translation from the language of the source 4536// text into the requested target language. For more information, see how-to-error-msg. 4537type UnsupportedLanguagePairException struct { 4538 _ struct{} `type:"structure"` 4539 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4540 4541 Message_ *string `locationName:"Message" type:"string"` 4542 4543 // The language code for the language of the input text. 4544 SourceLanguageCode *string `min:"2" type:"string"` 4545 4546 // The language code for the language of the translated text. 4547 TargetLanguageCode *string `min:"2" type:"string"` 4548} 4549 4550// String returns the string representation 4551func (s UnsupportedLanguagePairException) String() string { 4552 return awsutil.Prettify(s) 4553} 4554 4555// GoString returns the string representation 4556func (s UnsupportedLanguagePairException) GoString() string { 4557 return s.String() 4558} 4559 4560func newErrorUnsupportedLanguagePairException(v protocol.ResponseMetadata) error { 4561 return &UnsupportedLanguagePairException{ 4562 RespMetadata: v, 4563 } 4564} 4565 4566// Code returns the exception type name. 4567func (s *UnsupportedLanguagePairException) Code() string { 4568 return "UnsupportedLanguagePairException" 4569} 4570 4571// Message returns the exception's message. 4572func (s *UnsupportedLanguagePairException) Message() string { 4573 if s.Message_ != nil { 4574 return *s.Message_ 4575 } 4576 return "" 4577} 4578 4579// OrigErr always returns nil, satisfies awserr.Error interface. 4580func (s *UnsupportedLanguagePairException) OrigErr() error { 4581 return nil 4582} 4583 4584func (s *UnsupportedLanguagePairException) Error() string { 4585 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 4586} 4587 4588// Status code returns the HTTP status code for the request's response error. 4589func (s *UnsupportedLanguagePairException) StatusCode() int { 4590 return s.RespMetadata.StatusCode 4591} 4592 4593// RequestID returns the service's response RequestID for request. 4594func (s *UnsupportedLanguagePairException) RequestID() string { 4595 return s.RespMetadata.RequestID 4596} 4597 4598type UpdateParallelDataInput struct { 4599 _ struct{} `type:"structure"` 4600 4601 // A unique identifier for the request. This token is automatically generated 4602 // when you use Amazon Translate through an AWS SDK. 4603 ClientToken *string `min:"1" type:"string" idempotencyToken:"true"` 4604 4605 // A custom description for the parallel data resource in Amazon Translate. 4606 Description *string `type:"string"` 4607 4608 // The name of the parallel data resource being updated. 4609 // 4610 // Name is a required field 4611 Name *string `min:"1" type:"string" required:"true"` 4612 4613 // Specifies the format and S3 location of the parallel data input file. 4614 // 4615 // ParallelDataConfig is a required field 4616 ParallelDataConfig *ParallelDataConfig `type:"structure" required:"true"` 4617} 4618 4619// String returns the string representation 4620func (s UpdateParallelDataInput) String() string { 4621 return awsutil.Prettify(s) 4622} 4623 4624// GoString returns the string representation 4625func (s UpdateParallelDataInput) GoString() string { 4626 return s.String() 4627} 4628 4629// Validate inspects the fields of the type to determine if they are valid. 4630func (s *UpdateParallelDataInput) Validate() error { 4631 invalidParams := request.ErrInvalidParams{Context: "UpdateParallelDataInput"} 4632 if s.ClientToken != nil && len(*s.ClientToken) < 1 { 4633 invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) 4634 } 4635 if s.Name == nil { 4636 invalidParams.Add(request.NewErrParamRequired("Name")) 4637 } 4638 if s.Name != nil && len(*s.Name) < 1 { 4639 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 4640 } 4641 if s.ParallelDataConfig == nil { 4642 invalidParams.Add(request.NewErrParamRequired("ParallelDataConfig")) 4643 } 4644 if s.ParallelDataConfig != nil { 4645 if err := s.ParallelDataConfig.Validate(); err != nil { 4646 invalidParams.AddNested("ParallelDataConfig", err.(request.ErrInvalidParams)) 4647 } 4648 } 4649 4650 if invalidParams.Len() > 0 { 4651 return invalidParams 4652 } 4653 return nil 4654} 4655 4656// SetClientToken sets the ClientToken field's value. 4657func (s *UpdateParallelDataInput) SetClientToken(v string) *UpdateParallelDataInput { 4658 s.ClientToken = &v 4659 return s 4660} 4661 4662// SetDescription sets the Description field's value. 4663func (s *UpdateParallelDataInput) SetDescription(v string) *UpdateParallelDataInput { 4664 s.Description = &v 4665 return s 4666} 4667 4668// SetName sets the Name field's value. 4669func (s *UpdateParallelDataInput) SetName(v string) *UpdateParallelDataInput { 4670 s.Name = &v 4671 return s 4672} 4673 4674// SetParallelDataConfig sets the ParallelDataConfig field's value. 4675func (s *UpdateParallelDataInput) SetParallelDataConfig(v *ParallelDataConfig) *UpdateParallelDataInput { 4676 s.ParallelDataConfig = v 4677 return s 4678} 4679 4680type UpdateParallelDataOutput struct { 4681 _ struct{} `type:"structure"` 4682 4683 // The time that the most recent update was attempted. 4684 LatestUpdateAttemptAt *time.Time `type:"timestamp"` 4685 4686 // The status of the parallel data update attempt. When the updated parallel 4687 // data resource is ready for you to use, the status is ACTIVE. 4688 LatestUpdateAttemptStatus *string `type:"string" enum:"ParallelDataStatus"` 4689 4690 // The name of the parallel data resource being updated. 4691 Name *string `min:"1" type:"string"` 4692 4693 // The status of the parallel data resource that you are attempting to update. 4694 // Your update request is accepted only if this status is either ACTIVE or FAILED. 4695 Status *string `type:"string" enum:"ParallelDataStatus"` 4696} 4697 4698// String returns the string representation 4699func (s UpdateParallelDataOutput) String() string { 4700 return awsutil.Prettify(s) 4701} 4702 4703// GoString returns the string representation 4704func (s UpdateParallelDataOutput) GoString() string { 4705 return s.String() 4706} 4707 4708// SetLatestUpdateAttemptAt sets the LatestUpdateAttemptAt field's value. 4709func (s *UpdateParallelDataOutput) SetLatestUpdateAttemptAt(v time.Time) *UpdateParallelDataOutput { 4710 s.LatestUpdateAttemptAt = &v 4711 return s 4712} 4713 4714// SetLatestUpdateAttemptStatus sets the LatestUpdateAttemptStatus field's value. 4715func (s *UpdateParallelDataOutput) SetLatestUpdateAttemptStatus(v string) *UpdateParallelDataOutput { 4716 s.LatestUpdateAttemptStatus = &v 4717 return s 4718} 4719 4720// SetName sets the Name field's value. 4721func (s *UpdateParallelDataOutput) SetName(v string) *UpdateParallelDataOutput { 4722 s.Name = &v 4723 return s 4724} 4725 4726// SetStatus sets the Status field's value. 4727func (s *UpdateParallelDataOutput) SetStatus(v string) *UpdateParallelDataOutput { 4728 s.Status = &v 4729 return s 4730} 4731 4732const ( 4733 // EncryptionKeyTypeKms is a EncryptionKeyType enum value 4734 EncryptionKeyTypeKms = "KMS" 4735) 4736 4737// EncryptionKeyType_Values returns all elements of the EncryptionKeyType enum 4738func EncryptionKeyType_Values() []string { 4739 return []string{ 4740 EncryptionKeyTypeKms, 4741 } 4742} 4743 4744const ( 4745 // JobStatusSubmitted is a JobStatus enum value 4746 JobStatusSubmitted = "SUBMITTED" 4747 4748 // JobStatusInProgress is a JobStatus enum value 4749 JobStatusInProgress = "IN_PROGRESS" 4750 4751 // JobStatusCompleted is a JobStatus enum value 4752 JobStatusCompleted = "COMPLETED" 4753 4754 // JobStatusCompletedWithError is a JobStatus enum value 4755 JobStatusCompletedWithError = "COMPLETED_WITH_ERROR" 4756 4757 // JobStatusFailed is a JobStatus enum value 4758 JobStatusFailed = "FAILED" 4759 4760 // JobStatusStopRequested is a JobStatus enum value 4761 JobStatusStopRequested = "STOP_REQUESTED" 4762 4763 // JobStatusStopped is a JobStatus enum value 4764 JobStatusStopped = "STOPPED" 4765) 4766 4767// JobStatus_Values returns all elements of the JobStatus enum 4768func JobStatus_Values() []string { 4769 return []string{ 4770 JobStatusSubmitted, 4771 JobStatusInProgress, 4772 JobStatusCompleted, 4773 JobStatusCompletedWithError, 4774 JobStatusFailed, 4775 JobStatusStopRequested, 4776 JobStatusStopped, 4777 } 4778} 4779 4780const ( 4781 // MergeStrategyOverwrite is a MergeStrategy enum value 4782 MergeStrategyOverwrite = "OVERWRITE" 4783) 4784 4785// MergeStrategy_Values returns all elements of the MergeStrategy enum 4786func MergeStrategy_Values() []string { 4787 return []string{ 4788 MergeStrategyOverwrite, 4789 } 4790} 4791 4792const ( 4793 // ParallelDataFormatTsv is a ParallelDataFormat enum value 4794 ParallelDataFormatTsv = "TSV" 4795 4796 // ParallelDataFormatCsv is a ParallelDataFormat enum value 4797 ParallelDataFormatCsv = "CSV" 4798 4799 // ParallelDataFormatTmx is a ParallelDataFormat enum value 4800 ParallelDataFormatTmx = "TMX" 4801) 4802 4803// ParallelDataFormat_Values returns all elements of the ParallelDataFormat enum 4804func ParallelDataFormat_Values() []string { 4805 return []string{ 4806 ParallelDataFormatTsv, 4807 ParallelDataFormatCsv, 4808 ParallelDataFormatTmx, 4809 } 4810} 4811 4812const ( 4813 // ParallelDataStatusCreating is a ParallelDataStatus enum value 4814 ParallelDataStatusCreating = "CREATING" 4815 4816 // ParallelDataStatusUpdating is a ParallelDataStatus enum value 4817 ParallelDataStatusUpdating = "UPDATING" 4818 4819 // ParallelDataStatusActive is a ParallelDataStatus enum value 4820 ParallelDataStatusActive = "ACTIVE" 4821 4822 // ParallelDataStatusDeleting is a ParallelDataStatus enum value 4823 ParallelDataStatusDeleting = "DELETING" 4824 4825 // ParallelDataStatusFailed is a ParallelDataStatus enum value 4826 ParallelDataStatusFailed = "FAILED" 4827) 4828 4829// ParallelDataStatus_Values returns all elements of the ParallelDataStatus enum 4830func ParallelDataStatus_Values() []string { 4831 return []string{ 4832 ParallelDataStatusCreating, 4833 ParallelDataStatusUpdating, 4834 ParallelDataStatusActive, 4835 ParallelDataStatusDeleting, 4836 ParallelDataStatusFailed, 4837 } 4838} 4839 4840const ( 4841 // TerminologyDataFormatCsv is a TerminologyDataFormat enum value 4842 TerminologyDataFormatCsv = "CSV" 4843 4844 // TerminologyDataFormatTmx is a TerminologyDataFormat enum value 4845 TerminologyDataFormatTmx = "TMX" 4846) 4847 4848// TerminologyDataFormat_Values returns all elements of the TerminologyDataFormat enum 4849func TerminologyDataFormat_Values() []string { 4850 return []string{ 4851 TerminologyDataFormatCsv, 4852 TerminologyDataFormatTmx, 4853 } 4854} 4855