github.com/aavshr/aws-sdk-go@v1.41.3/service/translate/api.go (about) 1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3 package translate 4 5 import ( 6 "fmt" 7 "time" 8 9 "github.com/aavshr/aws-sdk-go/aws" 10 "github.com/aavshr/aws-sdk-go/aws/awsutil" 11 "github.com/aavshr/aws-sdk-go/aws/request" 12 "github.com/aavshr/aws-sdk-go/private/protocol" 13 "github.com/aavshr/aws-sdk-go/private/protocol/jsonrpc" 14 ) 15 16 const 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 42 func (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 96 func (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. 110 func (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 117 const 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 143 func (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 188 func (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. 202 func (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 209 const 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 235 func (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 281 func (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. 295 func (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 302 const 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 328 func (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 371 func (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. 385 func (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 392 const 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 418 func (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 463 func (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. 477 func (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 484 const 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 510 func (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 555 func (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. 569 func (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 576 const 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 602 func (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 655 func (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. 669 func (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 676 const 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 702 func (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 748 func (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. 762 func (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 // 786 func (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. 797 func (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 821 const 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 847 func (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 893 func (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. 907 func (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 // 931 func (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. 942 func (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 966 const 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 992 func (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 1041 func (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. 1055 func (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 // 1079 func (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. 1090 func (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 1114 const 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 1140 func (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 1198 func (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. 1212 func (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 1219 const 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 1245 func (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 1295 func (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. 1309 func (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 1316 const 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 1342 func (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 1407 func (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. 1421 func (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 1428 const 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 1454 func (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 1515 func (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. 1529 func (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. 1540 type 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. 1555 // 1556 // API parameter values that are decorated as "sensitive" in the API will not 1557 // be included in the string output. The member name will be present, but the 1558 // value will be replaced with "sensitive". 1559 func (s AppliedTerminology) String() string { 1560 return awsutil.Prettify(s) 1561 } 1562 1563 // GoString returns the string representation. 1564 // 1565 // API parameter values that are decorated as "sensitive" in the API will not 1566 // be included in the string output. The member name will be present, but the 1567 // value will be replaced with "sensitive". 1568 func (s AppliedTerminology) GoString() string { 1569 return s.String() 1570 } 1571 1572 // SetName sets the Name field's value. 1573 func (s *AppliedTerminology) SetName(v string) *AppliedTerminology { 1574 s.Name = &v 1575 return s 1576 } 1577 1578 // SetTerms sets the Terms field's value. 1579 func (s *AppliedTerminology) SetTerms(v []*Term) *AppliedTerminology { 1580 s.Terms = v 1581 return s 1582 } 1583 1584 // Another modification is being made. That modification must complete before 1585 // you can make your change. 1586 type ConcurrentModificationException struct { 1587 _ struct{} `type:"structure"` 1588 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1589 1590 Message_ *string `locationName:"Message" type:"string"` 1591 } 1592 1593 // String returns the string representation. 1594 // 1595 // API parameter values that are decorated as "sensitive" in the API will not 1596 // be included in the string output. The member name will be present, but the 1597 // value will be replaced with "sensitive". 1598 func (s ConcurrentModificationException) String() string { 1599 return awsutil.Prettify(s) 1600 } 1601 1602 // GoString returns the string representation. 1603 // 1604 // API parameter values that are decorated as "sensitive" in the API will not 1605 // be included in the string output. The member name will be present, but the 1606 // value will be replaced with "sensitive". 1607 func (s ConcurrentModificationException) GoString() string { 1608 return s.String() 1609 } 1610 1611 func newErrorConcurrentModificationException(v protocol.ResponseMetadata) error { 1612 return &ConcurrentModificationException{ 1613 RespMetadata: v, 1614 } 1615 } 1616 1617 // Code returns the exception type name. 1618 func (s *ConcurrentModificationException) Code() string { 1619 return "ConcurrentModificationException" 1620 } 1621 1622 // Message returns the exception's message. 1623 func (s *ConcurrentModificationException) Message() string { 1624 if s.Message_ != nil { 1625 return *s.Message_ 1626 } 1627 return "" 1628 } 1629 1630 // OrigErr always returns nil, satisfies awserr.Error interface. 1631 func (s *ConcurrentModificationException) OrigErr() error { 1632 return nil 1633 } 1634 1635 func (s *ConcurrentModificationException) Error() string { 1636 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1637 } 1638 1639 // Status code returns the HTTP status code for the request's response error. 1640 func (s *ConcurrentModificationException) StatusCode() int { 1641 return s.RespMetadata.StatusCode 1642 } 1643 1644 // RequestID returns the service's response RequestID for request. 1645 func (s *ConcurrentModificationException) RequestID() string { 1646 return s.RespMetadata.RequestID 1647 } 1648 1649 // There was a conflict processing the request. Try your request again. 1650 type ConflictException struct { 1651 _ struct{} `type:"structure"` 1652 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1653 1654 Message_ *string `locationName:"Message" type:"string"` 1655 } 1656 1657 // String returns the string representation. 1658 // 1659 // API parameter values that are decorated as "sensitive" in the API will not 1660 // be included in the string output. The member name will be present, but the 1661 // value will be replaced with "sensitive". 1662 func (s ConflictException) String() string { 1663 return awsutil.Prettify(s) 1664 } 1665 1666 // GoString returns the string representation. 1667 // 1668 // API parameter values that are decorated as "sensitive" in the API will not 1669 // be included in the string output. The member name will be present, but the 1670 // value will be replaced with "sensitive". 1671 func (s ConflictException) GoString() string { 1672 return s.String() 1673 } 1674 1675 func newErrorConflictException(v protocol.ResponseMetadata) error { 1676 return &ConflictException{ 1677 RespMetadata: v, 1678 } 1679 } 1680 1681 // Code returns the exception type name. 1682 func (s *ConflictException) Code() string { 1683 return "ConflictException" 1684 } 1685 1686 // Message returns the exception's message. 1687 func (s *ConflictException) Message() string { 1688 if s.Message_ != nil { 1689 return *s.Message_ 1690 } 1691 return "" 1692 } 1693 1694 // OrigErr always returns nil, satisfies awserr.Error interface. 1695 func (s *ConflictException) OrigErr() error { 1696 return nil 1697 } 1698 1699 func (s *ConflictException) Error() string { 1700 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1701 } 1702 1703 // Status code returns the HTTP status code for the request's response error. 1704 func (s *ConflictException) StatusCode() int { 1705 return s.RespMetadata.StatusCode 1706 } 1707 1708 // RequestID returns the service's response RequestID for request. 1709 func (s *ConflictException) RequestID() string { 1710 return s.RespMetadata.RequestID 1711 } 1712 1713 type CreateParallelDataInput struct { 1714 _ struct{} `type:"structure"` 1715 1716 // A unique identifier for the request. This token is automatically generated 1717 // when you use Amazon Translate through an AWS SDK. 1718 ClientToken *string `min:"1" type:"string" idempotencyToken:"true"` 1719 1720 // A custom description for the parallel data resource in Amazon Translate. 1721 Description *string `type:"string"` 1722 1723 // The encryption key used to encrypt this object. 1724 EncryptionKey *EncryptionKey `type:"structure"` 1725 1726 // A custom name for the parallel data resource in Amazon Translate. You must 1727 // assign a name that is unique in the account and region. 1728 // 1729 // Name is a required field 1730 Name *string `min:"1" type:"string" required:"true"` 1731 1732 // Specifies the format and S3 location of the parallel data input file. 1733 // 1734 // ParallelDataConfig is a required field 1735 ParallelDataConfig *ParallelDataConfig `type:"structure" required:"true"` 1736 } 1737 1738 // String returns the string representation. 1739 // 1740 // API parameter values that are decorated as "sensitive" in the API will not 1741 // be included in the string output. The member name will be present, but the 1742 // value will be replaced with "sensitive". 1743 func (s CreateParallelDataInput) String() string { 1744 return awsutil.Prettify(s) 1745 } 1746 1747 // GoString returns the string representation. 1748 // 1749 // API parameter values that are decorated as "sensitive" in the API will not 1750 // be included in the string output. The member name will be present, but the 1751 // value will be replaced with "sensitive". 1752 func (s CreateParallelDataInput) GoString() string { 1753 return s.String() 1754 } 1755 1756 // Validate inspects the fields of the type to determine if they are valid. 1757 func (s *CreateParallelDataInput) Validate() error { 1758 invalidParams := request.ErrInvalidParams{Context: "CreateParallelDataInput"} 1759 if s.ClientToken != nil && len(*s.ClientToken) < 1 { 1760 invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) 1761 } 1762 if s.Name == nil { 1763 invalidParams.Add(request.NewErrParamRequired("Name")) 1764 } 1765 if s.Name != nil && len(*s.Name) < 1 { 1766 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 1767 } 1768 if s.ParallelDataConfig == nil { 1769 invalidParams.Add(request.NewErrParamRequired("ParallelDataConfig")) 1770 } 1771 if s.EncryptionKey != nil { 1772 if err := s.EncryptionKey.Validate(); err != nil { 1773 invalidParams.AddNested("EncryptionKey", err.(request.ErrInvalidParams)) 1774 } 1775 } 1776 if s.ParallelDataConfig != nil { 1777 if err := s.ParallelDataConfig.Validate(); err != nil { 1778 invalidParams.AddNested("ParallelDataConfig", err.(request.ErrInvalidParams)) 1779 } 1780 } 1781 1782 if invalidParams.Len() > 0 { 1783 return invalidParams 1784 } 1785 return nil 1786 } 1787 1788 // SetClientToken sets the ClientToken field's value. 1789 func (s *CreateParallelDataInput) SetClientToken(v string) *CreateParallelDataInput { 1790 s.ClientToken = &v 1791 return s 1792 } 1793 1794 // SetDescription sets the Description field's value. 1795 func (s *CreateParallelDataInput) SetDescription(v string) *CreateParallelDataInput { 1796 s.Description = &v 1797 return s 1798 } 1799 1800 // SetEncryptionKey sets the EncryptionKey field's value. 1801 func (s *CreateParallelDataInput) SetEncryptionKey(v *EncryptionKey) *CreateParallelDataInput { 1802 s.EncryptionKey = v 1803 return s 1804 } 1805 1806 // SetName sets the Name field's value. 1807 func (s *CreateParallelDataInput) SetName(v string) *CreateParallelDataInput { 1808 s.Name = &v 1809 return s 1810 } 1811 1812 // SetParallelDataConfig sets the ParallelDataConfig field's value. 1813 func (s *CreateParallelDataInput) SetParallelDataConfig(v *ParallelDataConfig) *CreateParallelDataInput { 1814 s.ParallelDataConfig = v 1815 return s 1816 } 1817 1818 type CreateParallelDataOutput struct { 1819 _ struct{} `type:"structure"` 1820 1821 // The custom name that you assigned to the parallel data resource. 1822 Name *string `min:"1" type:"string"` 1823 1824 // The status of the parallel data resource. When the resource is ready for 1825 // you to use, the status is ACTIVE. 1826 Status *string `type:"string" enum:"ParallelDataStatus"` 1827 } 1828 1829 // String returns the string representation. 1830 // 1831 // API parameter values that are decorated as "sensitive" in the API will not 1832 // be included in the string output. The member name will be present, but the 1833 // value will be replaced with "sensitive". 1834 func (s CreateParallelDataOutput) String() string { 1835 return awsutil.Prettify(s) 1836 } 1837 1838 // GoString returns the string representation. 1839 // 1840 // API parameter values that are decorated as "sensitive" in the API will not 1841 // be included in the string output. The member name will be present, but the 1842 // value will be replaced with "sensitive". 1843 func (s CreateParallelDataOutput) GoString() string { 1844 return s.String() 1845 } 1846 1847 // SetName sets the Name field's value. 1848 func (s *CreateParallelDataOutput) SetName(v string) *CreateParallelDataOutput { 1849 s.Name = &v 1850 return s 1851 } 1852 1853 // SetStatus sets the Status field's value. 1854 func (s *CreateParallelDataOutput) SetStatus(v string) *CreateParallelDataOutput { 1855 s.Status = &v 1856 return s 1857 } 1858 1859 type DeleteParallelDataInput struct { 1860 _ struct{} `type:"structure"` 1861 1862 // The name of the parallel data resource that is being deleted. 1863 // 1864 // Name is a required field 1865 Name *string `min:"1" type:"string" required:"true"` 1866 } 1867 1868 // String returns the string representation. 1869 // 1870 // API parameter values that are decorated as "sensitive" in the API will not 1871 // be included in the string output. The member name will be present, but the 1872 // value will be replaced with "sensitive". 1873 func (s DeleteParallelDataInput) String() string { 1874 return awsutil.Prettify(s) 1875 } 1876 1877 // GoString returns the string representation. 1878 // 1879 // API parameter values that are decorated as "sensitive" in the API will not 1880 // be included in the string output. The member name will be present, but the 1881 // value will be replaced with "sensitive". 1882 func (s DeleteParallelDataInput) GoString() string { 1883 return s.String() 1884 } 1885 1886 // Validate inspects the fields of the type to determine if they are valid. 1887 func (s *DeleteParallelDataInput) Validate() error { 1888 invalidParams := request.ErrInvalidParams{Context: "DeleteParallelDataInput"} 1889 if s.Name == nil { 1890 invalidParams.Add(request.NewErrParamRequired("Name")) 1891 } 1892 if s.Name != nil && len(*s.Name) < 1 { 1893 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 1894 } 1895 1896 if invalidParams.Len() > 0 { 1897 return invalidParams 1898 } 1899 return nil 1900 } 1901 1902 // SetName sets the Name field's value. 1903 func (s *DeleteParallelDataInput) SetName(v string) *DeleteParallelDataInput { 1904 s.Name = &v 1905 return s 1906 } 1907 1908 type DeleteParallelDataOutput struct { 1909 _ struct{} `type:"structure"` 1910 1911 // The name of the parallel data resource that is being deleted. 1912 Name *string `min:"1" type:"string"` 1913 1914 // The status of the parallel data deletion. 1915 Status *string `type:"string" enum:"ParallelDataStatus"` 1916 } 1917 1918 // String returns the string representation. 1919 // 1920 // API parameter values that are decorated as "sensitive" in the API will not 1921 // be included in the string output. The member name will be present, but the 1922 // value will be replaced with "sensitive". 1923 func (s DeleteParallelDataOutput) String() string { 1924 return awsutil.Prettify(s) 1925 } 1926 1927 // GoString returns the string representation. 1928 // 1929 // API parameter values that are decorated as "sensitive" in the API will not 1930 // be included in the string output. The member name will be present, but the 1931 // value will be replaced with "sensitive". 1932 func (s DeleteParallelDataOutput) GoString() string { 1933 return s.String() 1934 } 1935 1936 // SetName sets the Name field's value. 1937 func (s *DeleteParallelDataOutput) SetName(v string) *DeleteParallelDataOutput { 1938 s.Name = &v 1939 return s 1940 } 1941 1942 // SetStatus sets the Status field's value. 1943 func (s *DeleteParallelDataOutput) SetStatus(v string) *DeleteParallelDataOutput { 1944 s.Status = &v 1945 return s 1946 } 1947 1948 type DeleteTerminologyInput struct { 1949 _ struct{} `type:"structure"` 1950 1951 // The name of the custom terminology being deleted. 1952 // 1953 // Name is a required field 1954 Name *string `min:"1" type:"string" required:"true"` 1955 } 1956 1957 // String returns the string representation. 1958 // 1959 // API parameter values that are decorated as "sensitive" in the API will not 1960 // be included in the string output. The member name will be present, but the 1961 // value will be replaced with "sensitive". 1962 func (s DeleteTerminologyInput) String() string { 1963 return awsutil.Prettify(s) 1964 } 1965 1966 // GoString returns the string representation. 1967 // 1968 // API parameter values that are decorated as "sensitive" in the API will not 1969 // be included in the string output. The member name will be present, but the 1970 // value will be replaced with "sensitive". 1971 func (s DeleteTerminologyInput) GoString() string { 1972 return s.String() 1973 } 1974 1975 // Validate inspects the fields of the type to determine if they are valid. 1976 func (s *DeleteTerminologyInput) Validate() error { 1977 invalidParams := request.ErrInvalidParams{Context: "DeleteTerminologyInput"} 1978 if s.Name == nil { 1979 invalidParams.Add(request.NewErrParamRequired("Name")) 1980 } 1981 if s.Name != nil && len(*s.Name) < 1 { 1982 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 1983 } 1984 1985 if invalidParams.Len() > 0 { 1986 return invalidParams 1987 } 1988 return nil 1989 } 1990 1991 // SetName sets the Name field's value. 1992 func (s *DeleteTerminologyInput) SetName(v string) *DeleteTerminologyInput { 1993 s.Name = &v 1994 return s 1995 } 1996 1997 type DeleteTerminologyOutput struct { 1998 _ struct{} `type:"structure"` 1999 } 2000 2001 // String returns the string representation. 2002 // 2003 // API parameter values that are decorated as "sensitive" in the API will not 2004 // be included in the string output. The member name will be present, but the 2005 // value will be replaced with "sensitive". 2006 func (s DeleteTerminologyOutput) String() string { 2007 return awsutil.Prettify(s) 2008 } 2009 2010 // GoString returns the string representation. 2011 // 2012 // API parameter values that are decorated as "sensitive" in the API will not 2013 // be included in the string output. The member name will be present, but the 2014 // value will be replaced with "sensitive". 2015 func (s DeleteTerminologyOutput) GoString() string { 2016 return s.String() 2017 } 2018 2019 type DescribeTextTranslationJobInput struct { 2020 _ struct{} `type:"structure"` 2021 2022 // The identifier that Amazon Translate generated for the job. The StartTextTranslationJob 2023 // operation returns this identifier in its response. 2024 // 2025 // JobId is a required field 2026 JobId *string `min:"1" type:"string" required:"true"` 2027 } 2028 2029 // String returns the string representation. 2030 // 2031 // API parameter values that are decorated as "sensitive" in the API will not 2032 // be included in the string output. The member name will be present, but the 2033 // value will be replaced with "sensitive". 2034 func (s DescribeTextTranslationJobInput) String() string { 2035 return awsutil.Prettify(s) 2036 } 2037 2038 // GoString returns the string representation. 2039 // 2040 // API parameter values that are decorated as "sensitive" in the API will not 2041 // be included in the string output. The member name will be present, but the 2042 // value will be replaced with "sensitive". 2043 func (s DescribeTextTranslationJobInput) GoString() string { 2044 return s.String() 2045 } 2046 2047 // Validate inspects the fields of the type to determine if they are valid. 2048 func (s *DescribeTextTranslationJobInput) Validate() error { 2049 invalidParams := request.ErrInvalidParams{Context: "DescribeTextTranslationJobInput"} 2050 if s.JobId == nil { 2051 invalidParams.Add(request.NewErrParamRequired("JobId")) 2052 } 2053 if s.JobId != nil && len(*s.JobId) < 1 { 2054 invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) 2055 } 2056 2057 if invalidParams.Len() > 0 { 2058 return invalidParams 2059 } 2060 return nil 2061 } 2062 2063 // SetJobId sets the JobId field's value. 2064 func (s *DescribeTextTranslationJobInput) SetJobId(v string) *DescribeTextTranslationJobInput { 2065 s.JobId = &v 2066 return s 2067 } 2068 2069 type DescribeTextTranslationJobOutput struct { 2070 _ struct{} `type:"structure"` 2071 2072 // An object that contains the properties associated with an asynchronous batch 2073 // translation job. 2074 TextTranslationJobProperties *TextTranslationJobProperties `type:"structure"` 2075 } 2076 2077 // String returns the string representation. 2078 // 2079 // API parameter values that are decorated as "sensitive" in the API will not 2080 // be included in the string output. The member name will be present, but the 2081 // value will be replaced with "sensitive". 2082 func (s DescribeTextTranslationJobOutput) String() string { 2083 return awsutil.Prettify(s) 2084 } 2085 2086 // GoString returns the string representation. 2087 // 2088 // API parameter values that are decorated as "sensitive" in the API will not 2089 // be included in the string output. The member name will be present, but the 2090 // value will be replaced with "sensitive". 2091 func (s DescribeTextTranslationJobOutput) GoString() string { 2092 return s.String() 2093 } 2094 2095 // SetTextTranslationJobProperties sets the TextTranslationJobProperties field's value. 2096 func (s *DescribeTextTranslationJobOutput) SetTextTranslationJobProperties(v *TextTranslationJobProperties) *DescribeTextTranslationJobOutput { 2097 s.TextTranslationJobProperties = v 2098 return s 2099 } 2100 2101 // The confidence that Amazon Comprehend accurately detected the source language 2102 // is low. If a low confidence level is acceptable for your application, you 2103 // can use the language in the exception to call Amazon Translate again. For 2104 // more information, see the DetectDominantLanguage (https://docs.aws.amazon.com/comprehend/latest/dg/API_DetectDominantLanguage.html) 2105 // operation in the Amazon Comprehend Developer Guide. 2106 type DetectedLanguageLowConfidenceException struct { 2107 _ struct{} `type:"structure"` 2108 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2109 2110 // The language code of the auto-detected language from Amazon Comprehend. 2111 DetectedLanguageCode *string `min:"2" type:"string"` 2112 2113 Message_ *string `locationName:"Message" type:"string"` 2114 } 2115 2116 // String returns the string representation. 2117 // 2118 // API parameter values that are decorated as "sensitive" in the API will not 2119 // be included in the string output. The member name will be present, but the 2120 // value will be replaced with "sensitive". 2121 func (s DetectedLanguageLowConfidenceException) String() string { 2122 return awsutil.Prettify(s) 2123 } 2124 2125 // GoString returns the string representation. 2126 // 2127 // API parameter values that are decorated as "sensitive" in the API will not 2128 // be included in the string output. The member name will be present, but the 2129 // value will be replaced with "sensitive". 2130 func (s DetectedLanguageLowConfidenceException) GoString() string { 2131 return s.String() 2132 } 2133 2134 func newErrorDetectedLanguageLowConfidenceException(v protocol.ResponseMetadata) error { 2135 return &DetectedLanguageLowConfidenceException{ 2136 RespMetadata: v, 2137 } 2138 } 2139 2140 // Code returns the exception type name. 2141 func (s *DetectedLanguageLowConfidenceException) Code() string { 2142 return "DetectedLanguageLowConfidenceException" 2143 } 2144 2145 // Message returns the exception's message. 2146 func (s *DetectedLanguageLowConfidenceException) Message() string { 2147 if s.Message_ != nil { 2148 return *s.Message_ 2149 } 2150 return "" 2151 } 2152 2153 // OrigErr always returns nil, satisfies awserr.Error interface. 2154 func (s *DetectedLanguageLowConfidenceException) OrigErr() error { 2155 return nil 2156 } 2157 2158 func (s *DetectedLanguageLowConfidenceException) Error() string { 2159 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 2160 } 2161 2162 // Status code returns the HTTP status code for the request's response error. 2163 func (s *DetectedLanguageLowConfidenceException) StatusCode() int { 2164 return s.RespMetadata.StatusCode 2165 } 2166 2167 // RequestID returns the service's response RequestID for request. 2168 func (s *DetectedLanguageLowConfidenceException) RequestID() string { 2169 return s.RespMetadata.RequestID 2170 } 2171 2172 // The encryption key used to encrypt this object. 2173 type EncryptionKey struct { 2174 _ struct{} `type:"structure"` 2175 2176 // The Amazon Resource Name (ARN) of the encryption key being used to encrypt 2177 // the custom terminology. 2178 // 2179 // Id is a required field 2180 Id *string `min:"1" type:"string" required:"true"` 2181 2182 // The type of encryption key used by Amazon Translate to encrypt custom terminologies. 2183 // 2184 // Type is a required field 2185 Type *string `type:"string" required:"true" enum:"EncryptionKeyType"` 2186 } 2187 2188 // String returns the string representation. 2189 // 2190 // API parameter values that are decorated as "sensitive" in the API will not 2191 // be included in the string output. The member name will be present, but the 2192 // value will be replaced with "sensitive". 2193 func (s EncryptionKey) String() string { 2194 return awsutil.Prettify(s) 2195 } 2196 2197 // GoString returns the string representation. 2198 // 2199 // API parameter values that are decorated as "sensitive" in the API will not 2200 // be included in the string output. The member name will be present, but the 2201 // value will be replaced with "sensitive". 2202 func (s EncryptionKey) GoString() string { 2203 return s.String() 2204 } 2205 2206 // Validate inspects the fields of the type to determine if they are valid. 2207 func (s *EncryptionKey) Validate() error { 2208 invalidParams := request.ErrInvalidParams{Context: "EncryptionKey"} 2209 if s.Id == nil { 2210 invalidParams.Add(request.NewErrParamRequired("Id")) 2211 } 2212 if s.Id != nil && len(*s.Id) < 1 { 2213 invalidParams.Add(request.NewErrParamMinLen("Id", 1)) 2214 } 2215 if s.Type == nil { 2216 invalidParams.Add(request.NewErrParamRequired("Type")) 2217 } 2218 2219 if invalidParams.Len() > 0 { 2220 return invalidParams 2221 } 2222 return nil 2223 } 2224 2225 // SetId sets the Id field's value. 2226 func (s *EncryptionKey) SetId(v string) *EncryptionKey { 2227 s.Id = &v 2228 return s 2229 } 2230 2231 // SetType sets the Type field's value. 2232 func (s *EncryptionKey) SetType(v string) *EncryptionKey { 2233 s.Type = &v 2234 return s 2235 } 2236 2237 type GetParallelDataInput struct { 2238 _ struct{} `type:"structure"` 2239 2240 // The name of the parallel data resource that is being retrieved. 2241 // 2242 // Name is a required field 2243 Name *string `min:"1" type:"string" required:"true"` 2244 } 2245 2246 // String returns the string representation. 2247 // 2248 // API parameter values that are decorated as "sensitive" in the API will not 2249 // be included in the string output. The member name will be present, but the 2250 // value will be replaced with "sensitive". 2251 func (s GetParallelDataInput) String() string { 2252 return awsutil.Prettify(s) 2253 } 2254 2255 // GoString returns the string representation. 2256 // 2257 // API parameter values that are decorated as "sensitive" in the API will not 2258 // be included in the string output. The member name will be present, but the 2259 // value will be replaced with "sensitive". 2260 func (s GetParallelDataInput) GoString() string { 2261 return s.String() 2262 } 2263 2264 // Validate inspects the fields of the type to determine if they are valid. 2265 func (s *GetParallelDataInput) Validate() error { 2266 invalidParams := request.ErrInvalidParams{Context: "GetParallelDataInput"} 2267 if s.Name == nil { 2268 invalidParams.Add(request.NewErrParamRequired("Name")) 2269 } 2270 if s.Name != nil && len(*s.Name) < 1 { 2271 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 2272 } 2273 2274 if invalidParams.Len() > 0 { 2275 return invalidParams 2276 } 2277 return nil 2278 } 2279 2280 // SetName sets the Name field's value. 2281 func (s *GetParallelDataInput) SetName(v string) *GetParallelDataInput { 2282 s.Name = &v 2283 return s 2284 } 2285 2286 type GetParallelDataOutput struct { 2287 _ struct{} `type:"structure"` 2288 2289 // The Amazon S3 location of a file that provides any errors or warnings that 2290 // were produced by your input file. This file was created when Amazon Translate 2291 // attempted to create a parallel data resource. The location is returned as 2292 // a presigned URL to that has a 30 minute expiration. 2293 AuxiliaryDataLocation *ParallelDataDataLocation `type:"structure"` 2294 2295 // The location of the most recent parallel data input file that was successfully 2296 // imported into Amazon Translate. The location is returned as a presigned URL 2297 // that has a 30 minute expiration. 2298 DataLocation *ParallelDataDataLocation `type:"structure"` 2299 2300 // The Amazon S3 location of a file that provides any errors or warnings that 2301 // were produced by your input file. This file was created when Amazon Translate 2302 // attempted to update a parallel data resource. The location is returned as 2303 // a presigned URL to that has a 30 minute expiration. 2304 LatestUpdateAttemptAuxiliaryDataLocation *ParallelDataDataLocation `type:"structure"` 2305 2306 // The properties of the parallel data resource that is being retrieved. 2307 ParallelDataProperties *ParallelDataProperties `type:"structure"` 2308 } 2309 2310 // String returns the string representation. 2311 // 2312 // API parameter values that are decorated as "sensitive" in the API will not 2313 // be included in the string output. The member name will be present, but the 2314 // value will be replaced with "sensitive". 2315 func (s GetParallelDataOutput) String() string { 2316 return awsutil.Prettify(s) 2317 } 2318 2319 // GoString returns the string representation. 2320 // 2321 // API parameter values that are decorated as "sensitive" in the API will not 2322 // be included in the string output. The member name will be present, but the 2323 // value will be replaced with "sensitive". 2324 func (s GetParallelDataOutput) GoString() string { 2325 return s.String() 2326 } 2327 2328 // SetAuxiliaryDataLocation sets the AuxiliaryDataLocation field's value. 2329 func (s *GetParallelDataOutput) SetAuxiliaryDataLocation(v *ParallelDataDataLocation) *GetParallelDataOutput { 2330 s.AuxiliaryDataLocation = v 2331 return s 2332 } 2333 2334 // SetDataLocation sets the DataLocation field's value. 2335 func (s *GetParallelDataOutput) SetDataLocation(v *ParallelDataDataLocation) *GetParallelDataOutput { 2336 s.DataLocation = v 2337 return s 2338 } 2339 2340 // SetLatestUpdateAttemptAuxiliaryDataLocation sets the LatestUpdateAttemptAuxiliaryDataLocation field's value. 2341 func (s *GetParallelDataOutput) SetLatestUpdateAttemptAuxiliaryDataLocation(v *ParallelDataDataLocation) *GetParallelDataOutput { 2342 s.LatestUpdateAttemptAuxiliaryDataLocation = v 2343 return s 2344 } 2345 2346 // SetParallelDataProperties sets the ParallelDataProperties field's value. 2347 func (s *GetParallelDataOutput) SetParallelDataProperties(v *ParallelDataProperties) *GetParallelDataOutput { 2348 s.ParallelDataProperties = v 2349 return s 2350 } 2351 2352 type GetTerminologyInput struct { 2353 _ struct{} `type:"structure"` 2354 2355 // The name of the custom terminology being retrieved. 2356 // 2357 // Name is a required field 2358 Name *string `min:"1" type:"string" required:"true"` 2359 2360 // The data format of the custom terminology being retrieved, either CSV or 2361 // TMX. 2362 // 2363 // TerminologyDataFormat is a required field 2364 TerminologyDataFormat *string `type:"string" required:"true" enum:"TerminologyDataFormat"` 2365 } 2366 2367 // String returns the string representation. 2368 // 2369 // API parameter values that are decorated as "sensitive" in the API will not 2370 // be included in the string output. The member name will be present, but the 2371 // value will be replaced with "sensitive". 2372 func (s GetTerminologyInput) String() string { 2373 return awsutil.Prettify(s) 2374 } 2375 2376 // GoString returns the string representation. 2377 // 2378 // API parameter values that are decorated as "sensitive" in the API will not 2379 // be included in the string output. The member name will be present, but the 2380 // value will be replaced with "sensitive". 2381 func (s GetTerminologyInput) GoString() string { 2382 return s.String() 2383 } 2384 2385 // Validate inspects the fields of the type to determine if they are valid. 2386 func (s *GetTerminologyInput) Validate() error { 2387 invalidParams := request.ErrInvalidParams{Context: "GetTerminologyInput"} 2388 if s.Name == nil { 2389 invalidParams.Add(request.NewErrParamRequired("Name")) 2390 } 2391 if s.Name != nil && len(*s.Name) < 1 { 2392 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 2393 } 2394 if s.TerminologyDataFormat == nil { 2395 invalidParams.Add(request.NewErrParamRequired("TerminologyDataFormat")) 2396 } 2397 2398 if invalidParams.Len() > 0 { 2399 return invalidParams 2400 } 2401 return nil 2402 } 2403 2404 // SetName sets the Name field's value. 2405 func (s *GetTerminologyInput) SetName(v string) *GetTerminologyInput { 2406 s.Name = &v 2407 return s 2408 } 2409 2410 // SetTerminologyDataFormat sets the TerminologyDataFormat field's value. 2411 func (s *GetTerminologyInput) SetTerminologyDataFormat(v string) *GetTerminologyInput { 2412 s.TerminologyDataFormat = &v 2413 return s 2414 } 2415 2416 type GetTerminologyOutput struct { 2417 _ struct{} `type:"structure"` 2418 2419 // The data location of the custom terminology being retrieved. The custom terminology 2420 // file is returned in a presigned url that has a 30 minute expiration. 2421 TerminologyDataLocation *TerminologyDataLocation `type:"structure"` 2422 2423 // The properties of the custom terminology being retrieved. 2424 TerminologyProperties *TerminologyProperties `type:"structure"` 2425 } 2426 2427 // String returns the string representation. 2428 // 2429 // API parameter values that are decorated as "sensitive" in the API will not 2430 // be included in the string output. The member name will be present, but the 2431 // value will be replaced with "sensitive". 2432 func (s GetTerminologyOutput) String() string { 2433 return awsutil.Prettify(s) 2434 } 2435 2436 // GoString returns the string representation. 2437 // 2438 // API parameter values that are decorated as "sensitive" in the API will not 2439 // be included in the string output. The member name will be present, but the 2440 // value will be replaced with "sensitive". 2441 func (s GetTerminologyOutput) GoString() string { 2442 return s.String() 2443 } 2444 2445 // SetTerminologyDataLocation sets the TerminologyDataLocation field's value. 2446 func (s *GetTerminologyOutput) SetTerminologyDataLocation(v *TerminologyDataLocation) *GetTerminologyOutput { 2447 s.TerminologyDataLocation = v 2448 return s 2449 } 2450 2451 // SetTerminologyProperties sets the TerminologyProperties field's value. 2452 func (s *GetTerminologyOutput) SetTerminologyProperties(v *TerminologyProperties) *GetTerminologyOutput { 2453 s.TerminologyProperties = v 2454 return s 2455 } 2456 2457 type ImportTerminologyInput struct { 2458 _ struct{} `type:"structure"` 2459 2460 // The description of the custom terminology being imported. 2461 Description *string `type:"string"` 2462 2463 // The encryption key for the custom terminology being imported. 2464 EncryptionKey *EncryptionKey `type:"structure"` 2465 2466 // The merge strategy of the custom terminology being imported. Currently, only 2467 // the OVERWRITE merge strategy is supported. In this case, the imported terminology 2468 // will overwrite an existing terminology of the same name. 2469 // 2470 // MergeStrategy is a required field 2471 MergeStrategy *string `type:"string" required:"true" enum:"MergeStrategy"` 2472 2473 // The name of the custom terminology being imported. 2474 // 2475 // Name is a required field 2476 Name *string `min:"1" type:"string" required:"true"` 2477 2478 // The terminology data for the custom terminology being imported. 2479 // 2480 // TerminologyData is a required field 2481 TerminologyData *TerminologyData `type:"structure" required:"true"` 2482 } 2483 2484 // String returns the string representation. 2485 // 2486 // API parameter values that are decorated as "sensitive" in the API will not 2487 // be included in the string output. The member name will be present, but the 2488 // value will be replaced with "sensitive". 2489 func (s ImportTerminologyInput) String() string { 2490 return awsutil.Prettify(s) 2491 } 2492 2493 // GoString returns the string representation. 2494 // 2495 // API parameter values that are decorated as "sensitive" in the API will not 2496 // be included in the string output. The member name will be present, but the 2497 // value will be replaced with "sensitive". 2498 func (s ImportTerminologyInput) GoString() string { 2499 return s.String() 2500 } 2501 2502 // Validate inspects the fields of the type to determine if they are valid. 2503 func (s *ImportTerminologyInput) Validate() error { 2504 invalidParams := request.ErrInvalidParams{Context: "ImportTerminologyInput"} 2505 if s.MergeStrategy == nil { 2506 invalidParams.Add(request.NewErrParamRequired("MergeStrategy")) 2507 } 2508 if s.Name == nil { 2509 invalidParams.Add(request.NewErrParamRequired("Name")) 2510 } 2511 if s.Name != nil && len(*s.Name) < 1 { 2512 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 2513 } 2514 if s.TerminologyData == nil { 2515 invalidParams.Add(request.NewErrParamRequired("TerminologyData")) 2516 } 2517 if s.EncryptionKey != nil { 2518 if err := s.EncryptionKey.Validate(); err != nil { 2519 invalidParams.AddNested("EncryptionKey", err.(request.ErrInvalidParams)) 2520 } 2521 } 2522 if s.TerminologyData != nil { 2523 if err := s.TerminologyData.Validate(); err != nil { 2524 invalidParams.AddNested("TerminologyData", err.(request.ErrInvalidParams)) 2525 } 2526 } 2527 2528 if invalidParams.Len() > 0 { 2529 return invalidParams 2530 } 2531 return nil 2532 } 2533 2534 // SetDescription sets the Description field's value. 2535 func (s *ImportTerminologyInput) SetDescription(v string) *ImportTerminologyInput { 2536 s.Description = &v 2537 return s 2538 } 2539 2540 // SetEncryptionKey sets the EncryptionKey field's value. 2541 func (s *ImportTerminologyInput) SetEncryptionKey(v *EncryptionKey) *ImportTerminologyInput { 2542 s.EncryptionKey = v 2543 return s 2544 } 2545 2546 // SetMergeStrategy sets the MergeStrategy field's value. 2547 func (s *ImportTerminologyInput) SetMergeStrategy(v string) *ImportTerminologyInput { 2548 s.MergeStrategy = &v 2549 return s 2550 } 2551 2552 // SetName sets the Name field's value. 2553 func (s *ImportTerminologyInput) SetName(v string) *ImportTerminologyInput { 2554 s.Name = &v 2555 return s 2556 } 2557 2558 // SetTerminologyData sets the TerminologyData field's value. 2559 func (s *ImportTerminologyInput) SetTerminologyData(v *TerminologyData) *ImportTerminologyInput { 2560 s.TerminologyData = v 2561 return s 2562 } 2563 2564 type ImportTerminologyOutput struct { 2565 _ struct{} `type:"structure"` 2566 2567 // The properties of the custom terminology being imported. 2568 TerminologyProperties *TerminologyProperties `type:"structure"` 2569 } 2570 2571 // String returns the string representation. 2572 // 2573 // API parameter values that are decorated as "sensitive" in the API will not 2574 // be included in the string output. The member name will be present, but the 2575 // value will be replaced with "sensitive". 2576 func (s ImportTerminologyOutput) String() string { 2577 return awsutil.Prettify(s) 2578 } 2579 2580 // GoString returns the string representation. 2581 // 2582 // API parameter values that are decorated as "sensitive" in the API will not 2583 // be included in the string output. The member name will be present, but the 2584 // value will be replaced with "sensitive". 2585 func (s ImportTerminologyOutput) GoString() string { 2586 return s.String() 2587 } 2588 2589 // SetTerminologyProperties sets the TerminologyProperties field's value. 2590 func (s *ImportTerminologyOutput) SetTerminologyProperties(v *TerminologyProperties) *ImportTerminologyOutput { 2591 s.TerminologyProperties = v 2592 return s 2593 } 2594 2595 // The input configuration properties for requesting a batch translation job. 2596 type InputDataConfig struct { 2597 _ struct{} `type:"structure"` 2598 2599 // Describes the format of the data that you submit to Amazon Translate as input. 2600 // You can specify one of the following multipurpose internet mail extension 2601 // (MIME) types: 2602 // 2603 // * text/html: The input data consists of one or more HTML files. Amazon 2604 // Translate translates only the text that resides in the html element in 2605 // each file. 2606 // 2607 // * text/plain: The input data consists of one or more unformatted text 2608 // files. Amazon Translate translates every character in this type of input. 2609 // 2610 // * application/vnd.openxmlformats-officedocument.wordprocessingml.document: 2611 // The input data consists of one or more Word documents (.docx). 2612 // 2613 // * application/vnd.openxmlformats-officedocument.presentationml.presentation: 2614 // The input data consists of one or more PowerPoint Presentation files (.pptx). 2615 // 2616 // * application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: The 2617 // input data consists of one or more Excel Workbook files (.xlsx). 2618 // 2619 // If you structure your input data as HTML, ensure that you set this parameter 2620 // to text/html. By doing so, you cut costs by limiting the translation to the 2621 // contents of the html element in each file. Otherwise, if you set this parameter 2622 // to text/plain, your costs will cover the translation of every character. 2623 // 2624 // ContentType is a required field 2625 ContentType *string `type:"string" required:"true"` 2626 2627 // The URI of the AWS S3 folder that contains the input file. The folder must 2628 // be in the same Region as the API endpoint you are calling. 2629 // 2630 // S3Uri is a required field 2631 S3Uri *string `type:"string" required:"true"` 2632 } 2633 2634 // String returns the string representation. 2635 // 2636 // API parameter values that are decorated as "sensitive" in the API will not 2637 // be included in the string output. The member name will be present, but the 2638 // value will be replaced with "sensitive". 2639 func (s InputDataConfig) String() string { 2640 return awsutil.Prettify(s) 2641 } 2642 2643 // GoString returns the string representation. 2644 // 2645 // API parameter values that are decorated as "sensitive" in the API will not 2646 // be included in the string output. The member name will be present, but the 2647 // value will be replaced with "sensitive". 2648 func (s InputDataConfig) GoString() string { 2649 return s.String() 2650 } 2651 2652 // Validate inspects the fields of the type to determine if they are valid. 2653 func (s *InputDataConfig) Validate() error { 2654 invalidParams := request.ErrInvalidParams{Context: "InputDataConfig"} 2655 if s.ContentType == nil { 2656 invalidParams.Add(request.NewErrParamRequired("ContentType")) 2657 } 2658 if s.S3Uri == nil { 2659 invalidParams.Add(request.NewErrParamRequired("S3Uri")) 2660 } 2661 2662 if invalidParams.Len() > 0 { 2663 return invalidParams 2664 } 2665 return nil 2666 } 2667 2668 // SetContentType sets the ContentType field's value. 2669 func (s *InputDataConfig) SetContentType(v string) *InputDataConfig { 2670 s.ContentType = &v 2671 return s 2672 } 2673 2674 // SetS3Uri sets the S3Uri field's value. 2675 func (s *InputDataConfig) SetS3Uri(v string) *InputDataConfig { 2676 s.S3Uri = &v 2677 return s 2678 } 2679 2680 // An internal server error occurred. Retry your request. 2681 type InternalServerException struct { 2682 _ struct{} `type:"structure"` 2683 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2684 2685 Message_ *string `locationName:"Message" type:"string"` 2686 } 2687 2688 // String returns the string representation. 2689 // 2690 // API parameter values that are decorated as "sensitive" in the API will not 2691 // be included in the string output. The member name will be present, but the 2692 // value will be replaced with "sensitive". 2693 func (s InternalServerException) String() string { 2694 return awsutil.Prettify(s) 2695 } 2696 2697 // GoString returns the string representation. 2698 // 2699 // API parameter values that are decorated as "sensitive" in the API will not 2700 // be included in the string output. The member name will be present, but the 2701 // value will be replaced with "sensitive". 2702 func (s InternalServerException) GoString() string { 2703 return s.String() 2704 } 2705 2706 func newErrorInternalServerException(v protocol.ResponseMetadata) error { 2707 return &InternalServerException{ 2708 RespMetadata: v, 2709 } 2710 } 2711 2712 // Code returns the exception type name. 2713 func (s *InternalServerException) Code() string { 2714 return "InternalServerException" 2715 } 2716 2717 // Message returns the exception's message. 2718 func (s *InternalServerException) Message() string { 2719 if s.Message_ != nil { 2720 return *s.Message_ 2721 } 2722 return "" 2723 } 2724 2725 // OrigErr always returns nil, satisfies awserr.Error interface. 2726 func (s *InternalServerException) OrigErr() error { 2727 return nil 2728 } 2729 2730 func (s *InternalServerException) Error() string { 2731 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2732 } 2733 2734 // Status code returns the HTTP status code for the request's response error. 2735 func (s *InternalServerException) StatusCode() int { 2736 return s.RespMetadata.StatusCode 2737 } 2738 2739 // RequestID returns the service's response RequestID for request. 2740 func (s *InternalServerException) RequestID() string { 2741 return s.RespMetadata.RequestID 2742 } 2743 2744 // The filter specified for the operation is invalid. Specify a different filter. 2745 type InvalidFilterException struct { 2746 _ struct{} `type:"structure"` 2747 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2748 2749 Message_ *string `locationName:"Message" type:"string"` 2750 } 2751 2752 // String returns the string representation. 2753 // 2754 // API parameter values that are decorated as "sensitive" in the API will not 2755 // be included in the string output. The member name will be present, but the 2756 // value will be replaced with "sensitive". 2757 func (s InvalidFilterException) String() string { 2758 return awsutil.Prettify(s) 2759 } 2760 2761 // GoString returns the string representation. 2762 // 2763 // API parameter values that are decorated as "sensitive" in the API will not 2764 // be included in the string output. The member name will be present, but the 2765 // value will be replaced with "sensitive". 2766 func (s InvalidFilterException) GoString() string { 2767 return s.String() 2768 } 2769 2770 func newErrorInvalidFilterException(v protocol.ResponseMetadata) error { 2771 return &InvalidFilterException{ 2772 RespMetadata: v, 2773 } 2774 } 2775 2776 // Code returns the exception type name. 2777 func (s *InvalidFilterException) Code() string { 2778 return "InvalidFilterException" 2779 } 2780 2781 // Message returns the exception's message. 2782 func (s *InvalidFilterException) Message() string { 2783 if s.Message_ != nil { 2784 return *s.Message_ 2785 } 2786 return "" 2787 } 2788 2789 // OrigErr always returns nil, satisfies awserr.Error interface. 2790 func (s *InvalidFilterException) OrigErr() error { 2791 return nil 2792 } 2793 2794 func (s *InvalidFilterException) Error() string { 2795 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2796 } 2797 2798 // Status code returns the HTTP status code for the request's response error. 2799 func (s *InvalidFilterException) StatusCode() int { 2800 return s.RespMetadata.StatusCode 2801 } 2802 2803 // RequestID returns the service's response RequestID for request. 2804 func (s *InvalidFilterException) RequestID() string { 2805 return s.RespMetadata.RequestID 2806 } 2807 2808 // The value of the parameter is invalid. Review the value of the parameter 2809 // you are using to correct it, and then retry your operation. 2810 type InvalidParameterValueException struct { 2811 _ struct{} `type:"structure"` 2812 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2813 2814 Message_ *string `locationName:"Message" type:"string"` 2815 } 2816 2817 // String returns the string representation. 2818 // 2819 // API parameter values that are decorated as "sensitive" in the API will not 2820 // be included in the string output. The member name will be present, but the 2821 // value will be replaced with "sensitive". 2822 func (s InvalidParameterValueException) String() string { 2823 return awsutil.Prettify(s) 2824 } 2825 2826 // GoString returns the string representation. 2827 // 2828 // API parameter values that are decorated as "sensitive" in the API will not 2829 // be included in the string output. The member name will be present, but the 2830 // value will be replaced with "sensitive". 2831 func (s InvalidParameterValueException) GoString() string { 2832 return s.String() 2833 } 2834 2835 func newErrorInvalidParameterValueException(v protocol.ResponseMetadata) error { 2836 return &InvalidParameterValueException{ 2837 RespMetadata: v, 2838 } 2839 } 2840 2841 // Code returns the exception type name. 2842 func (s *InvalidParameterValueException) Code() string { 2843 return "InvalidParameterValueException" 2844 } 2845 2846 // Message returns the exception's message. 2847 func (s *InvalidParameterValueException) Message() string { 2848 if s.Message_ != nil { 2849 return *s.Message_ 2850 } 2851 return "" 2852 } 2853 2854 // OrigErr always returns nil, satisfies awserr.Error interface. 2855 func (s *InvalidParameterValueException) OrigErr() error { 2856 return nil 2857 } 2858 2859 func (s *InvalidParameterValueException) Error() string { 2860 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2861 } 2862 2863 // Status code returns the HTTP status code for the request's response error. 2864 func (s *InvalidParameterValueException) StatusCode() int { 2865 return s.RespMetadata.StatusCode 2866 } 2867 2868 // RequestID returns the service's response RequestID for request. 2869 func (s *InvalidParameterValueException) RequestID() string { 2870 return s.RespMetadata.RequestID 2871 } 2872 2873 // The request that you made is invalid. Check your request to determine why 2874 // it's invalid and then retry the request. 2875 type InvalidRequestException struct { 2876 _ struct{} `type:"structure"` 2877 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2878 2879 Message_ *string `locationName:"Message" type:"string"` 2880 } 2881 2882 // String returns the string representation. 2883 // 2884 // API parameter values that are decorated as "sensitive" in the API will not 2885 // be included in the string output. The member name will be present, but the 2886 // value will be replaced with "sensitive". 2887 func (s InvalidRequestException) String() string { 2888 return awsutil.Prettify(s) 2889 } 2890 2891 // GoString returns the string representation. 2892 // 2893 // API parameter values that are decorated as "sensitive" in the API will not 2894 // be included in the string output. The member name will be present, but the 2895 // value will be replaced with "sensitive". 2896 func (s InvalidRequestException) GoString() string { 2897 return s.String() 2898 } 2899 2900 func newErrorInvalidRequestException(v protocol.ResponseMetadata) error { 2901 return &InvalidRequestException{ 2902 RespMetadata: v, 2903 } 2904 } 2905 2906 // Code returns the exception type name. 2907 func (s *InvalidRequestException) Code() string { 2908 return "InvalidRequestException" 2909 } 2910 2911 // Message returns the exception's message. 2912 func (s *InvalidRequestException) Message() string { 2913 if s.Message_ != nil { 2914 return *s.Message_ 2915 } 2916 return "" 2917 } 2918 2919 // OrigErr always returns nil, satisfies awserr.Error interface. 2920 func (s *InvalidRequestException) OrigErr() error { 2921 return nil 2922 } 2923 2924 func (s *InvalidRequestException) Error() string { 2925 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2926 } 2927 2928 // Status code returns the HTTP status code for the request's response error. 2929 func (s *InvalidRequestException) StatusCode() int { 2930 return s.RespMetadata.StatusCode 2931 } 2932 2933 // RequestID returns the service's response RequestID for request. 2934 func (s *InvalidRequestException) RequestID() string { 2935 return s.RespMetadata.RequestID 2936 } 2937 2938 // The number of documents successfully and unsuccessfully processed during 2939 // a translation job. 2940 type JobDetails struct { 2941 _ struct{} `type:"structure"` 2942 2943 // The number of documents that could not be processed during a translation 2944 // job. 2945 DocumentsWithErrorsCount *int64 `type:"integer"` 2946 2947 // The number of documents used as input in a translation job. 2948 InputDocumentsCount *int64 `type:"integer"` 2949 2950 // The number of documents successfully processed during a translation job. 2951 TranslatedDocumentsCount *int64 `type:"integer"` 2952 } 2953 2954 // String returns the string representation. 2955 // 2956 // API parameter values that are decorated as "sensitive" in the API will not 2957 // be included in the string output. The member name will be present, but the 2958 // value will be replaced with "sensitive". 2959 func (s JobDetails) String() string { 2960 return awsutil.Prettify(s) 2961 } 2962 2963 // GoString returns the string representation. 2964 // 2965 // API parameter values that are decorated as "sensitive" in the API will not 2966 // be included in the string output. The member name will be present, but the 2967 // value will be replaced with "sensitive". 2968 func (s JobDetails) GoString() string { 2969 return s.String() 2970 } 2971 2972 // SetDocumentsWithErrorsCount sets the DocumentsWithErrorsCount field's value. 2973 func (s *JobDetails) SetDocumentsWithErrorsCount(v int64) *JobDetails { 2974 s.DocumentsWithErrorsCount = &v 2975 return s 2976 } 2977 2978 // SetInputDocumentsCount sets the InputDocumentsCount field's value. 2979 func (s *JobDetails) SetInputDocumentsCount(v int64) *JobDetails { 2980 s.InputDocumentsCount = &v 2981 return s 2982 } 2983 2984 // SetTranslatedDocumentsCount sets the TranslatedDocumentsCount field's value. 2985 func (s *JobDetails) SetTranslatedDocumentsCount(v int64) *JobDetails { 2986 s.TranslatedDocumentsCount = &v 2987 return s 2988 } 2989 2990 // The specified limit has been exceeded. Review your request and retry it with 2991 // a quantity below the stated limit. 2992 type LimitExceededException struct { 2993 _ struct{} `type:"structure"` 2994 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2995 2996 Message_ *string `locationName:"Message" type:"string"` 2997 } 2998 2999 // String returns the string representation. 3000 // 3001 // API parameter values that are decorated as "sensitive" in the API will not 3002 // be included in the string output. The member name will be present, but the 3003 // value will be replaced with "sensitive". 3004 func (s LimitExceededException) String() string { 3005 return awsutil.Prettify(s) 3006 } 3007 3008 // GoString returns the string representation. 3009 // 3010 // API parameter values that are decorated as "sensitive" in the API will not 3011 // be included in the string output. The member name will be present, but the 3012 // value will be replaced with "sensitive". 3013 func (s LimitExceededException) GoString() string { 3014 return s.String() 3015 } 3016 3017 func newErrorLimitExceededException(v protocol.ResponseMetadata) error { 3018 return &LimitExceededException{ 3019 RespMetadata: v, 3020 } 3021 } 3022 3023 // Code returns the exception type name. 3024 func (s *LimitExceededException) Code() string { 3025 return "LimitExceededException" 3026 } 3027 3028 // Message returns the exception's message. 3029 func (s *LimitExceededException) Message() string { 3030 if s.Message_ != nil { 3031 return *s.Message_ 3032 } 3033 return "" 3034 } 3035 3036 // OrigErr always returns nil, satisfies awserr.Error interface. 3037 func (s *LimitExceededException) OrigErr() error { 3038 return nil 3039 } 3040 3041 func (s *LimitExceededException) Error() string { 3042 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3043 } 3044 3045 // Status code returns the HTTP status code for the request's response error. 3046 func (s *LimitExceededException) StatusCode() int { 3047 return s.RespMetadata.StatusCode 3048 } 3049 3050 // RequestID returns the service's response RequestID for request. 3051 func (s *LimitExceededException) RequestID() string { 3052 return s.RespMetadata.RequestID 3053 } 3054 3055 type ListParallelDataInput struct { 3056 _ struct{} `type:"structure"` 3057 3058 // The maximum number of parallel data resources returned for each request. 3059 MaxResults *int64 `min:"1" type:"integer"` 3060 3061 // A string that specifies the next page of results to return in a paginated 3062 // response. 3063 NextToken *string `type:"string"` 3064 } 3065 3066 // String returns the string representation. 3067 // 3068 // API parameter values that are decorated as "sensitive" in the API will not 3069 // be included in the string output. The member name will be present, but the 3070 // value will be replaced with "sensitive". 3071 func (s ListParallelDataInput) String() string { 3072 return awsutil.Prettify(s) 3073 } 3074 3075 // GoString returns the string representation. 3076 // 3077 // API parameter values that are decorated as "sensitive" in the API will not 3078 // be included in the string output. The member name will be present, but the 3079 // value will be replaced with "sensitive". 3080 func (s ListParallelDataInput) GoString() string { 3081 return s.String() 3082 } 3083 3084 // Validate inspects the fields of the type to determine if they are valid. 3085 func (s *ListParallelDataInput) Validate() error { 3086 invalidParams := request.ErrInvalidParams{Context: "ListParallelDataInput"} 3087 if s.MaxResults != nil && *s.MaxResults < 1 { 3088 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3089 } 3090 3091 if invalidParams.Len() > 0 { 3092 return invalidParams 3093 } 3094 return nil 3095 } 3096 3097 // SetMaxResults sets the MaxResults field's value. 3098 func (s *ListParallelDataInput) SetMaxResults(v int64) *ListParallelDataInput { 3099 s.MaxResults = &v 3100 return s 3101 } 3102 3103 // SetNextToken sets the NextToken field's value. 3104 func (s *ListParallelDataInput) SetNextToken(v string) *ListParallelDataInput { 3105 s.NextToken = &v 3106 return s 3107 } 3108 3109 type ListParallelDataOutput struct { 3110 _ struct{} `type:"structure"` 3111 3112 // The string to use in a subsequent request to get the next page of results 3113 // in a paginated response. This value is null if there are no additional pages. 3114 NextToken *string `type:"string"` 3115 3116 // The properties of the parallel data resources returned by this request. 3117 ParallelDataPropertiesList []*ParallelDataProperties `type:"list"` 3118 } 3119 3120 // String returns the string representation. 3121 // 3122 // API parameter values that are decorated as "sensitive" in the API will not 3123 // be included in the string output. The member name will be present, but the 3124 // value will be replaced with "sensitive". 3125 func (s ListParallelDataOutput) String() string { 3126 return awsutil.Prettify(s) 3127 } 3128 3129 // GoString returns the string representation. 3130 // 3131 // API parameter values that are decorated as "sensitive" in the API will not 3132 // be included in the string output. The member name will be present, but the 3133 // value will be replaced with "sensitive". 3134 func (s ListParallelDataOutput) GoString() string { 3135 return s.String() 3136 } 3137 3138 // SetNextToken sets the NextToken field's value. 3139 func (s *ListParallelDataOutput) SetNextToken(v string) *ListParallelDataOutput { 3140 s.NextToken = &v 3141 return s 3142 } 3143 3144 // SetParallelDataPropertiesList sets the ParallelDataPropertiesList field's value. 3145 func (s *ListParallelDataOutput) SetParallelDataPropertiesList(v []*ParallelDataProperties) *ListParallelDataOutput { 3146 s.ParallelDataPropertiesList = v 3147 return s 3148 } 3149 3150 type ListTerminologiesInput struct { 3151 _ struct{} `type:"structure"` 3152 3153 // The maximum number of custom terminologies returned per list request. 3154 MaxResults *int64 `min:"1" type:"integer"` 3155 3156 // If the result of the request to ListTerminologies was truncated, include 3157 // the NextToken to fetch the next group of custom terminologies. 3158 NextToken *string `type:"string"` 3159 } 3160 3161 // String returns the string representation. 3162 // 3163 // API parameter values that are decorated as "sensitive" in the API will not 3164 // be included in the string output. The member name will be present, but the 3165 // value will be replaced with "sensitive". 3166 func (s ListTerminologiesInput) String() string { 3167 return awsutil.Prettify(s) 3168 } 3169 3170 // GoString returns the string representation. 3171 // 3172 // API parameter values that are decorated as "sensitive" in the API will not 3173 // be included in the string output. The member name will be present, but the 3174 // value will be replaced with "sensitive". 3175 func (s ListTerminologiesInput) GoString() string { 3176 return s.String() 3177 } 3178 3179 // Validate inspects the fields of the type to determine if they are valid. 3180 func (s *ListTerminologiesInput) Validate() error { 3181 invalidParams := request.ErrInvalidParams{Context: "ListTerminologiesInput"} 3182 if s.MaxResults != nil && *s.MaxResults < 1 { 3183 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3184 } 3185 3186 if invalidParams.Len() > 0 { 3187 return invalidParams 3188 } 3189 return nil 3190 } 3191 3192 // SetMaxResults sets the MaxResults field's value. 3193 func (s *ListTerminologiesInput) SetMaxResults(v int64) *ListTerminologiesInput { 3194 s.MaxResults = &v 3195 return s 3196 } 3197 3198 // SetNextToken sets the NextToken field's value. 3199 func (s *ListTerminologiesInput) SetNextToken(v string) *ListTerminologiesInput { 3200 s.NextToken = &v 3201 return s 3202 } 3203 3204 type ListTerminologiesOutput struct { 3205 _ struct{} `type:"structure"` 3206 3207 // If the response to the ListTerminologies was truncated, the NextToken fetches 3208 // the next group of custom terminologies. 3209 NextToken *string `type:"string"` 3210 3211 // The properties list of the custom terminologies returned on the list request. 3212 TerminologyPropertiesList []*TerminologyProperties `type:"list"` 3213 } 3214 3215 // String returns the string representation. 3216 // 3217 // API parameter values that are decorated as "sensitive" in the API will not 3218 // be included in the string output. The member name will be present, but the 3219 // value will be replaced with "sensitive". 3220 func (s ListTerminologiesOutput) String() string { 3221 return awsutil.Prettify(s) 3222 } 3223 3224 // GoString returns the string representation. 3225 // 3226 // API parameter values that are decorated as "sensitive" in the API will not 3227 // be included in the string output. The member name will be present, but the 3228 // value will be replaced with "sensitive". 3229 func (s ListTerminologiesOutput) GoString() string { 3230 return s.String() 3231 } 3232 3233 // SetNextToken sets the NextToken field's value. 3234 func (s *ListTerminologiesOutput) SetNextToken(v string) *ListTerminologiesOutput { 3235 s.NextToken = &v 3236 return s 3237 } 3238 3239 // SetTerminologyPropertiesList sets the TerminologyPropertiesList field's value. 3240 func (s *ListTerminologiesOutput) SetTerminologyPropertiesList(v []*TerminologyProperties) *ListTerminologiesOutput { 3241 s.TerminologyPropertiesList = v 3242 return s 3243 } 3244 3245 type ListTextTranslationJobsInput struct { 3246 _ struct{} `type:"structure"` 3247 3248 // The parameters that specify which batch translation jobs to retrieve. Filters 3249 // include job name, job status, and submission time. You can only set one filter 3250 // at a time. 3251 Filter *TextTranslationJobFilter `type:"structure"` 3252 3253 // The maximum number of results to return in each page. The default value is 3254 // 100. 3255 MaxResults *int64 `min:"1" type:"integer"` 3256 3257 // The token to request the next page of results. 3258 NextToken *string `type:"string"` 3259 } 3260 3261 // String returns the string representation. 3262 // 3263 // API parameter values that are decorated as "sensitive" in the API will not 3264 // be included in the string output. The member name will be present, but the 3265 // value will be replaced with "sensitive". 3266 func (s ListTextTranslationJobsInput) String() string { 3267 return awsutil.Prettify(s) 3268 } 3269 3270 // GoString returns the string representation. 3271 // 3272 // API parameter values that are decorated as "sensitive" in the API will not 3273 // be included in the string output. The member name will be present, but the 3274 // value will be replaced with "sensitive". 3275 func (s ListTextTranslationJobsInput) GoString() string { 3276 return s.String() 3277 } 3278 3279 // Validate inspects the fields of the type to determine if they are valid. 3280 func (s *ListTextTranslationJobsInput) Validate() error { 3281 invalidParams := request.ErrInvalidParams{Context: "ListTextTranslationJobsInput"} 3282 if s.MaxResults != nil && *s.MaxResults < 1 { 3283 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3284 } 3285 if s.Filter != nil { 3286 if err := s.Filter.Validate(); err != nil { 3287 invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) 3288 } 3289 } 3290 3291 if invalidParams.Len() > 0 { 3292 return invalidParams 3293 } 3294 return nil 3295 } 3296 3297 // SetFilter sets the Filter field's value. 3298 func (s *ListTextTranslationJobsInput) SetFilter(v *TextTranslationJobFilter) *ListTextTranslationJobsInput { 3299 s.Filter = v 3300 return s 3301 } 3302 3303 // SetMaxResults sets the MaxResults field's value. 3304 func (s *ListTextTranslationJobsInput) SetMaxResults(v int64) *ListTextTranslationJobsInput { 3305 s.MaxResults = &v 3306 return s 3307 } 3308 3309 // SetNextToken sets the NextToken field's value. 3310 func (s *ListTextTranslationJobsInput) SetNextToken(v string) *ListTextTranslationJobsInput { 3311 s.NextToken = &v 3312 return s 3313 } 3314 3315 type ListTextTranslationJobsOutput struct { 3316 _ struct{} `type:"structure"` 3317 3318 // The token to use to retreive the next page of results. This value is null 3319 // when there are no more results to return. 3320 NextToken *string `type:"string"` 3321 3322 // A list containing the properties of each job that is returned. 3323 TextTranslationJobPropertiesList []*TextTranslationJobProperties `type:"list"` 3324 } 3325 3326 // String returns the string representation. 3327 // 3328 // API parameter values that are decorated as "sensitive" in the API will not 3329 // be included in the string output. The member name will be present, but the 3330 // value will be replaced with "sensitive". 3331 func (s ListTextTranslationJobsOutput) String() string { 3332 return awsutil.Prettify(s) 3333 } 3334 3335 // GoString returns the string representation. 3336 // 3337 // API parameter values that are decorated as "sensitive" in the API will not 3338 // be included in the string output. The member name will be present, but the 3339 // value will be replaced with "sensitive". 3340 func (s ListTextTranslationJobsOutput) GoString() string { 3341 return s.String() 3342 } 3343 3344 // SetNextToken sets the NextToken field's value. 3345 func (s *ListTextTranslationJobsOutput) SetNextToken(v string) *ListTextTranslationJobsOutput { 3346 s.NextToken = &v 3347 return s 3348 } 3349 3350 // SetTextTranslationJobPropertiesList sets the TextTranslationJobPropertiesList field's value. 3351 func (s *ListTextTranslationJobsOutput) SetTextTranslationJobPropertiesList(v []*TextTranslationJobProperties) *ListTextTranslationJobsOutput { 3352 s.TextTranslationJobPropertiesList = v 3353 return s 3354 } 3355 3356 // The output configuration properties for a batch translation job. 3357 type OutputDataConfig struct { 3358 _ struct{} `type:"structure"` 3359 3360 // The URI of the S3 folder that contains a translation job's output file. The 3361 // folder must be in the same Region as the API endpoint that you are calling. 3362 // 3363 // S3Uri is a required field 3364 S3Uri *string `type:"string" required:"true"` 3365 } 3366 3367 // String returns the string representation. 3368 // 3369 // API parameter values that are decorated as "sensitive" in the API will not 3370 // be included in the string output. The member name will be present, but the 3371 // value will be replaced with "sensitive". 3372 func (s OutputDataConfig) String() string { 3373 return awsutil.Prettify(s) 3374 } 3375 3376 // GoString returns the string representation. 3377 // 3378 // API parameter values that are decorated as "sensitive" in the API will not 3379 // be included in the string output. The member name will be present, but the 3380 // value will be replaced with "sensitive". 3381 func (s OutputDataConfig) GoString() string { 3382 return s.String() 3383 } 3384 3385 // Validate inspects the fields of the type to determine if they are valid. 3386 func (s *OutputDataConfig) Validate() error { 3387 invalidParams := request.ErrInvalidParams{Context: "OutputDataConfig"} 3388 if s.S3Uri == nil { 3389 invalidParams.Add(request.NewErrParamRequired("S3Uri")) 3390 } 3391 3392 if invalidParams.Len() > 0 { 3393 return invalidParams 3394 } 3395 return nil 3396 } 3397 3398 // SetS3Uri sets the S3Uri field's value. 3399 func (s *OutputDataConfig) SetS3Uri(v string) *OutputDataConfig { 3400 s.S3Uri = &v 3401 return s 3402 } 3403 3404 // Specifies the format and S3 location of the parallel data input file. 3405 type ParallelDataConfig struct { 3406 _ struct{} `type:"structure"` 3407 3408 // The format of the parallel data input file. 3409 // 3410 // Format is a required field 3411 Format *string `type:"string" required:"true" enum:"ParallelDataFormat"` 3412 3413 // The URI of the Amazon S3 folder that contains the parallel data input file. 3414 // The folder must be in the same Region as the API endpoint you are calling. 3415 // 3416 // S3Uri is a required field 3417 S3Uri *string `type:"string" required:"true"` 3418 } 3419 3420 // String returns the string representation. 3421 // 3422 // API parameter values that are decorated as "sensitive" in the API will not 3423 // be included in the string output. The member name will be present, but the 3424 // value will be replaced with "sensitive". 3425 func (s ParallelDataConfig) String() string { 3426 return awsutil.Prettify(s) 3427 } 3428 3429 // GoString returns the string representation. 3430 // 3431 // API parameter values that are decorated as "sensitive" in the API will not 3432 // be included in the string output. The member name will be present, but the 3433 // value will be replaced with "sensitive". 3434 func (s ParallelDataConfig) GoString() string { 3435 return s.String() 3436 } 3437 3438 // Validate inspects the fields of the type to determine if they are valid. 3439 func (s *ParallelDataConfig) Validate() error { 3440 invalidParams := request.ErrInvalidParams{Context: "ParallelDataConfig"} 3441 if s.Format == nil { 3442 invalidParams.Add(request.NewErrParamRequired("Format")) 3443 } 3444 if s.S3Uri == nil { 3445 invalidParams.Add(request.NewErrParamRequired("S3Uri")) 3446 } 3447 3448 if invalidParams.Len() > 0 { 3449 return invalidParams 3450 } 3451 return nil 3452 } 3453 3454 // SetFormat sets the Format field's value. 3455 func (s *ParallelDataConfig) SetFormat(v string) *ParallelDataConfig { 3456 s.Format = &v 3457 return s 3458 } 3459 3460 // SetS3Uri sets the S3Uri field's value. 3461 func (s *ParallelDataConfig) SetS3Uri(v string) *ParallelDataConfig { 3462 s.S3Uri = &v 3463 return s 3464 } 3465 3466 // The location of the most recent parallel data input file that was successfully 3467 // imported into Amazon Translate. 3468 type ParallelDataDataLocation struct { 3469 _ struct{} `type:"structure"` 3470 3471 // The Amazon S3 location of the parallel data input file. The location is returned 3472 // as a presigned URL to that has a 30 minute expiration. 3473 // 3474 // Location is a required field 3475 Location *string `type:"string" required:"true"` 3476 3477 // Describes the repository that contains the parallel data input file. 3478 // 3479 // RepositoryType is a required field 3480 RepositoryType *string `type:"string" required:"true"` 3481 } 3482 3483 // String returns the string representation. 3484 // 3485 // API parameter values that are decorated as "sensitive" in the API will not 3486 // be included in the string output. The member name will be present, but the 3487 // value will be replaced with "sensitive". 3488 func (s ParallelDataDataLocation) String() string { 3489 return awsutil.Prettify(s) 3490 } 3491 3492 // GoString returns the string representation. 3493 // 3494 // API parameter values that are decorated as "sensitive" in the API will not 3495 // be included in the string output. The member name will be present, but the 3496 // value will be replaced with "sensitive". 3497 func (s ParallelDataDataLocation) GoString() string { 3498 return s.String() 3499 } 3500 3501 // SetLocation sets the Location field's value. 3502 func (s *ParallelDataDataLocation) SetLocation(v string) *ParallelDataDataLocation { 3503 s.Location = &v 3504 return s 3505 } 3506 3507 // SetRepositoryType sets the RepositoryType field's value. 3508 func (s *ParallelDataDataLocation) SetRepositoryType(v string) *ParallelDataDataLocation { 3509 s.RepositoryType = &v 3510 return s 3511 } 3512 3513 // The properties of a parallel data resource. 3514 type ParallelDataProperties struct { 3515 _ struct{} `type:"structure"` 3516 3517 // The Amazon Resource Name (ARN) of the parallel data resource. 3518 Arn *string `min:"1" type:"string"` 3519 3520 // The time at which the parallel data resource was created. 3521 CreatedAt *time.Time `type:"timestamp"` 3522 3523 // The description assigned to the parallel data resource. 3524 Description *string `type:"string"` 3525 3526 // The encryption key used to encrypt this object. 3527 EncryptionKey *EncryptionKey `type:"structure"` 3528 3529 // The number of records unsuccessfully imported from the parallel data input 3530 // file. 3531 FailedRecordCount *int64 `type:"long"` 3532 3533 // The number of UTF-8 characters that Amazon Translate imported from the parallel 3534 // data input file. This number includes only the characters in your translation 3535 // examples. It does not include characters that are used to format your file. 3536 // For example, if you provided a Translation Memory Exchange (.tmx) file, this 3537 // number does not include the tags. 3538 ImportedDataSize *int64 `type:"long"` 3539 3540 // The number of records successfully imported from the parallel data input 3541 // file. 3542 ImportedRecordCount *int64 `type:"long"` 3543 3544 // The time at which the parallel data resource was last updated. 3545 LastUpdatedAt *time.Time `type:"timestamp"` 3546 3547 // The time that the most recent update was attempted. 3548 LatestUpdateAttemptAt *time.Time `type:"timestamp"` 3549 3550 // The status of the most recent update attempt for the parallel data resource. 3551 LatestUpdateAttemptStatus *string `type:"string" enum:"ParallelDataStatus"` 3552 3553 // Additional information from Amazon Translate about the parallel data resource. 3554 Message *string `type:"string"` 3555 3556 // The custom name assigned to the parallel data resource. 3557 Name *string `min:"1" type:"string"` 3558 3559 // Specifies the format and S3 location of the parallel data input file. 3560 ParallelDataConfig *ParallelDataConfig `type:"structure"` 3561 3562 // The number of items in the input file that Amazon Translate skipped when 3563 // you created or updated the parallel data resource. For example, Amazon Translate 3564 // skips empty records, empty target texts, and empty lines. 3565 SkippedRecordCount *int64 `type:"long"` 3566 3567 // The source language of the translations in the parallel data file. 3568 SourceLanguageCode *string `min:"2" type:"string"` 3569 3570 // The status of the parallel data resource. When the parallel data is ready 3571 // for you to use, the status is ACTIVE. 3572 Status *string `type:"string" enum:"ParallelDataStatus"` 3573 3574 // The language codes for the target languages available in the parallel data 3575 // file. All possible target languages are returned as an array. 3576 TargetLanguageCodes []*string `type:"list"` 3577 } 3578 3579 // String returns the string representation. 3580 // 3581 // API parameter values that are decorated as "sensitive" in the API will not 3582 // be included in the string output. The member name will be present, but the 3583 // value will be replaced with "sensitive". 3584 func (s ParallelDataProperties) String() string { 3585 return awsutil.Prettify(s) 3586 } 3587 3588 // GoString returns the string representation. 3589 // 3590 // API parameter values that are decorated as "sensitive" in the API will not 3591 // be included in the string output. The member name will be present, but the 3592 // value will be replaced with "sensitive". 3593 func (s ParallelDataProperties) GoString() string { 3594 return s.String() 3595 } 3596 3597 // SetArn sets the Arn field's value. 3598 func (s *ParallelDataProperties) SetArn(v string) *ParallelDataProperties { 3599 s.Arn = &v 3600 return s 3601 } 3602 3603 // SetCreatedAt sets the CreatedAt field's value. 3604 func (s *ParallelDataProperties) SetCreatedAt(v time.Time) *ParallelDataProperties { 3605 s.CreatedAt = &v 3606 return s 3607 } 3608 3609 // SetDescription sets the Description field's value. 3610 func (s *ParallelDataProperties) SetDescription(v string) *ParallelDataProperties { 3611 s.Description = &v 3612 return s 3613 } 3614 3615 // SetEncryptionKey sets the EncryptionKey field's value. 3616 func (s *ParallelDataProperties) SetEncryptionKey(v *EncryptionKey) *ParallelDataProperties { 3617 s.EncryptionKey = v 3618 return s 3619 } 3620 3621 // SetFailedRecordCount sets the FailedRecordCount field's value. 3622 func (s *ParallelDataProperties) SetFailedRecordCount(v int64) *ParallelDataProperties { 3623 s.FailedRecordCount = &v 3624 return s 3625 } 3626 3627 // SetImportedDataSize sets the ImportedDataSize field's value. 3628 func (s *ParallelDataProperties) SetImportedDataSize(v int64) *ParallelDataProperties { 3629 s.ImportedDataSize = &v 3630 return s 3631 } 3632 3633 // SetImportedRecordCount sets the ImportedRecordCount field's value. 3634 func (s *ParallelDataProperties) SetImportedRecordCount(v int64) *ParallelDataProperties { 3635 s.ImportedRecordCount = &v 3636 return s 3637 } 3638 3639 // SetLastUpdatedAt sets the LastUpdatedAt field's value. 3640 func (s *ParallelDataProperties) SetLastUpdatedAt(v time.Time) *ParallelDataProperties { 3641 s.LastUpdatedAt = &v 3642 return s 3643 } 3644 3645 // SetLatestUpdateAttemptAt sets the LatestUpdateAttemptAt field's value. 3646 func (s *ParallelDataProperties) SetLatestUpdateAttemptAt(v time.Time) *ParallelDataProperties { 3647 s.LatestUpdateAttemptAt = &v 3648 return s 3649 } 3650 3651 // SetLatestUpdateAttemptStatus sets the LatestUpdateAttemptStatus field's value. 3652 func (s *ParallelDataProperties) SetLatestUpdateAttemptStatus(v string) *ParallelDataProperties { 3653 s.LatestUpdateAttemptStatus = &v 3654 return s 3655 } 3656 3657 // SetMessage sets the Message field's value. 3658 func (s *ParallelDataProperties) SetMessage(v string) *ParallelDataProperties { 3659 s.Message = &v 3660 return s 3661 } 3662 3663 // SetName sets the Name field's value. 3664 func (s *ParallelDataProperties) SetName(v string) *ParallelDataProperties { 3665 s.Name = &v 3666 return s 3667 } 3668 3669 // SetParallelDataConfig sets the ParallelDataConfig field's value. 3670 func (s *ParallelDataProperties) SetParallelDataConfig(v *ParallelDataConfig) *ParallelDataProperties { 3671 s.ParallelDataConfig = v 3672 return s 3673 } 3674 3675 // SetSkippedRecordCount sets the SkippedRecordCount field's value. 3676 func (s *ParallelDataProperties) SetSkippedRecordCount(v int64) *ParallelDataProperties { 3677 s.SkippedRecordCount = &v 3678 return s 3679 } 3680 3681 // SetSourceLanguageCode sets the SourceLanguageCode field's value. 3682 func (s *ParallelDataProperties) SetSourceLanguageCode(v string) *ParallelDataProperties { 3683 s.SourceLanguageCode = &v 3684 return s 3685 } 3686 3687 // SetStatus sets the Status field's value. 3688 func (s *ParallelDataProperties) SetStatus(v string) *ParallelDataProperties { 3689 s.Status = &v 3690 return s 3691 } 3692 3693 // SetTargetLanguageCodes sets the TargetLanguageCodes field's value. 3694 func (s *ParallelDataProperties) SetTargetLanguageCodes(v []*string) *ParallelDataProperties { 3695 s.TargetLanguageCodes = v 3696 return s 3697 } 3698 3699 // The resource you are looking for has not been found. Review the resource 3700 // you're looking for and see if a different resource will accomplish your needs 3701 // before retrying the revised request. 3702 type ResourceNotFoundException struct { 3703 _ struct{} `type:"structure"` 3704 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3705 3706 Message_ *string `locationName:"Message" type:"string"` 3707 } 3708 3709 // String returns the string representation. 3710 // 3711 // API parameter values that are decorated as "sensitive" in the API will not 3712 // be included in the string output. The member name will be present, but the 3713 // value will be replaced with "sensitive". 3714 func (s ResourceNotFoundException) String() string { 3715 return awsutil.Prettify(s) 3716 } 3717 3718 // GoString returns the string representation. 3719 // 3720 // API parameter values that are decorated as "sensitive" in the API will not 3721 // be included in the string output. The member name will be present, but the 3722 // value will be replaced with "sensitive". 3723 func (s ResourceNotFoundException) GoString() string { 3724 return s.String() 3725 } 3726 3727 func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 3728 return &ResourceNotFoundException{ 3729 RespMetadata: v, 3730 } 3731 } 3732 3733 // Code returns the exception type name. 3734 func (s *ResourceNotFoundException) Code() string { 3735 return "ResourceNotFoundException" 3736 } 3737 3738 // Message returns the exception's message. 3739 func (s *ResourceNotFoundException) Message() string { 3740 if s.Message_ != nil { 3741 return *s.Message_ 3742 } 3743 return "" 3744 } 3745 3746 // OrigErr always returns nil, satisfies awserr.Error interface. 3747 func (s *ResourceNotFoundException) OrigErr() error { 3748 return nil 3749 } 3750 3751 func (s *ResourceNotFoundException) Error() string { 3752 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3753 } 3754 3755 // Status code returns the HTTP status code for the request's response error. 3756 func (s *ResourceNotFoundException) StatusCode() int { 3757 return s.RespMetadata.StatusCode 3758 } 3759 3760 // RequestID returns the service's response RequestID for request. 3761 func (s *ResourceNotFoundException) RequestID() string { 3762 return s.RespMetadata.RequestID 3763 } 3764 3765 // The Amazon Translate service is temporarily unavailable. Please wait a bit 3766 // and then retry your request. 3767 type ServiceUnavailableException struct { 3768 _ struct{} `type:"structure"` 3769 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3770 3771 Message_ *string `locationName:"Message" type:"string"` 3772 } 3773 3774 // String returns the string representation. 3775 // 3776 // API parameter values that are decorated as "sensitive" in the API will not 3777 // be included in the string output. The member name will be present, but the 3778 // value will be replaced with "sensitive". 3779 func (s ServiceUnavailableException) String() string { 3780 return awsutil.Prettify(s) 3781 } 3782 3783 // GoString returns the string representation. 3784 // 3785 // API parameter values that are decorated as "sensitive" in the API will not 3786 // be included in the string output. The member name will be present, but the 3787 // value will be replaced with "sensitive". 3788 func (s ServiceUnavailableException) GoString() string { 3789 return s.String() 3790 } 3791 3792 func newErrorServiceUnavailableException(v protocol.ResponseMetadata) error { 3793 return &ServiceUnavailableException{ 3794 RespMetadata: v, 3795 } 3796 } 3797 3798 // Code returns the exception type name. 3799 func (s *ServiceUnavailableException) Code() string { 3800 return "ServiceUnavailableException" 3801 } 3802 3803 // Message returns the exception's message. 3804 func (s *ServiceUnavailableException) Message() string { 3805 if s.Message_ != nil { 3806 return *s.Message_ 3807 } 3808 return "" 3809 } 3810 3811 // OrigErr always returns nil, satisfies awserr.Error interface. 3812 func (s *ServiceUnavailableException) OrigErr() error { 3813 return nil 3814 } 3815 3816 func (s *ServiceUnavailableException) Error() string { 3817 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3818 } 3819 3820 // Status code returns the HTTP status code for the request's response error. 3821 func (s *ServiceUnavailableException) StatusCode() int { 3822 return s.RespMetadata.StatusCode 3823 } 3824 3825 // RequestID returns the service's response RequestID for request. 3826 func (s *ServiceUnavailableException) RequestID() string { 3827 return s.RespMetadata.RequestID 3828 } 3829 3830 type StartTextTranslationJobInput struct { 3831 _ struct{} `type:"structure"` 3832 3833 // A unique identifier for the request. This token is auto-generated when using 3834 // the Amazon Translate SDK. 3835 ClientToken *string `min:"1" type:"string" idempotencyToken:"true"` 3836 3837 // The Amazon Resource Name (ARN) of an AWS Identity Access and Management (IAM) 3838 // role that grants Amazon Translate read access to your input data. For more 3839 // nformation, see identity-and-access-management. 3840 // 3841 // DataAccessRoleArn is a required field 3842 DataAccessRoleArn *string `min:"20" type:"string" required:"true"` 3843 3844 // Specifies the format and S3 location of the input documents for the translation 3845 // job. 3846 // 3847 // InputDataConfig is a required field 3848 InputDataConfig *InputDataConfig `type:"structure" required:"true"` 3849 3850 // The name of the batch translation job to be performed. 3851 JobName *string `min:"1" type:"string"` 3852 3853 // Specifies the S3 folder to which your job output will be saved. 3854 // 3855 // OutputDataConfig is a required field 3856 OutputDataConfig *OutputDataConfig `type:"structure" required:"true"` 3857 3858 // The names of the parallel data resources to use in the batch translation 3859 // job. For a list of available parallel data resources, use the ListParallelData 3860 // operation. 3861 ParallelDataNames []*string `type:"list"` 3862 3863 // The language code of the input language. For a list of language codes, see 3864 // what-is-languages. 3865 // 3866 // Amazon Translate does not automatically detect a source language during batch 3867 // translation jobs. 3868 // 3869 // SourceLanguageCode is a required field 3870 SourceLanguageCode *string `min:"2" type:"string" required:"true"` 3871 3872 // The language code of the output language. 3873 // 3874 // TargetLanguageCodes is a required field 3875 TargetLanguageCodes []*string `min:"1" type:"list" required:"true"` 3876 3877 // The name of the terminology to use in the batch translation job. For a list 3878 // of available terminologies, use the ListTerminologies operation. 3879 TerminologyNames []*string `type:"list"` 3880 } 3881 3882 // String returns the string representation. 3883 // 3884 // API parameter values that are decorated as "sensitive" in the API will not 3885 // be included in the string output. The member name will be present, but the 3886 // value will be replaced with "sensitive". 3887 func (s StartTextTranslationJobInput) String() string { 3888 return awsutil.Prettify(s) 3889 } 3890 3891 // GoString returns the string representation. 3892 // 3893 // API parameter values that are decorated as "sensitive" in the API will not 3894 // be included in the string output. The member name will be present, but the 3895 // value will be replaced with "sensitive". 3896 func (s StartTextTranslationJobInput) GoString() string { 3897 return s.String() 3898 } 3899 3900 // Validate inspects the fields of the type to determine if they are valid. 3901 func (s *StartTextTranslationJobInput) Validate() error { 3902 invalidParams := request.ErrInvalidParams{Context: "StartTextTranslationJobInput"} 3903 if s.ClientToken != nil && len(*s.ClientToken) < 1 { 3904 invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) 3905 } 3906 if s.DataAccessRoleArn == nil { 3907 invalidParams.Add(request.NewErrParamRequired("DataAccessRoleArn")) 3908 } 3909 if s.DataAccessRoleArn != nil && len(*s.DataAccessRoleArn) < 20 { 3910 invalidParams.Add(request.NewErrParamMinLen("DataAccessRoleArn", 20)) 3911 } 3912 if s.InputDataConfig == nil { 3913 invalidParams.Add(request.NewErrParamRequired("InputDataConfig")) 3914 } 3915 if s.JobName != nil && len(*s.JobName) < 1 { 3916 invalidParams.Add(request.NewErrParamMinLen("JobName", 1)) 3917 } 3918 if s.OutputDataConfig == nil { 3919 invalidParams.Add(request.NewErrParamRequired("OutputDataConfig")) 3920 } 3921 if s.SourceLanguageCode == nil { 3922 invalidParams.Add(request.NewErrParamRequired("SourceLanguageCode")) 3923 } 3924 if s.SourceLanguageCode != nil && len(*s.SourceLanguageCode) < 2 { 3925 invalidParams.Add(request.NewErrParamMinLen("SourceLanguageCode", 2)) 3926 } 3927 if s.TargetLanguageCodes == nil { 3928 invalidParams.Add(request.NewErrParamRequired("TargetLanguageCodes")) 3929 } 3930 if s.TargetLanguageCodes != nil && len(s.TargetLanguageCodes) < 1 { 3931 invalidParams.Add(request.NewErrParamMinLen("TargetLanguageCodes", 1)) 3932 } 3933 if s.InputDataConfig != nil { 3934 if err := s.InputDataConfig.Validate(); err != nil { 3935 invalidParams.AddNested("InputDataConfig", err.(request.ErrInvalidParams)) 3936 } 3937 } 3938 if s.OutputDataConfig != nil { 3939 if err := s.OutputDataConfig.Validate(); err != nil { 3940 invalidParams.AddNested("OutputDataConfig", err.(request.ErrInvalidParams)) 3941 } 3942 } 3943 3944 if invalidParams.Len() > 0 { 3945 return invalidParams 3946 } 3947 return nil 3948 } 3949 3950 // SetClientToken sets the ClientToken field's value. 3951 func (s *StartTextTranslationJobInput) SetClientToken(v string) *StartTextTranslationJobInput { 3952 s.ClientToken = &v 3953 return s 3954 } 3955 3956 // SetDataAccessRoleArn sets the DataAccessRoleArn field's value. 3957 func (s *StartTextTranslationJobInput) SetDataAccessRoleArn(v string) *StartTextTranslationJobInput { 3958 s.DataAccessRoleArn = &v 3959 return s 3960 } 3961 3962 // SetInputDataConfig sets the InputDataConfig field's value. 3963 func (s *StartTextTranslationJobInput) SetInputDataConfig(v *InputDataConfig) *StartTextTranslationJobInput { 3964 s.InputDataConfig = v 3965 return s 3966 } 3967 3968 // SetJobName sets the JobName field's value. 3969 func (s *StartTextTranslationJobInput) SetJobName(v string) *StartTextTranslationJobInput { 3970 s.JobName = &v 3971 return s 3972 } 3973 3974 // SetOutputDataConfig sets the OutputDataConfig field's value. 3975 func (s *StartTextTranslationJobInput) SetOutputDataConfig(v *OutputDataConfig) *StartTextTranslationJobInput { 3976 s.OutputDataConfig = v 3977 return s 3978 } 3979 3980 // SetParallelDataNames sets the ParallelDataNames field's value. 3981 func (s *StartTextTranslationJobInput) SetParallelDataNames(v []*string) *StartTextTranslationJobInput { 3982 s.ParallelDataNames = v 3983 return s 3984 } 3985 3986 // SetSourceLanguageCode sets the SourceLanguageCode field's value. 3987 func (s *StartTextTranslationJobInput) SetSourceLanguageCode(v string) *StartTextTranslationJobInput { 3988 s.SourceLanguageCode = &v 3989 return s 3990 } 3991 3992 // SetTargetLanguageCodes sets the TargetLanguageCodes field's value. 3993 func (s *StartTextTranslationJobInput) SetTargetLanguageCodes(v []*string) *StartTextTranslationJobInput { 3994 s.TargetLanguageCodes = v 3995 return s 3996 } 3997 3998 // SetTerminologyNames sets the TerminologyNames field's value. 3999 func (s *StartTextTranslationJobInput) SetTerminologyNames(v []*string) *StartTextTranslationJobInput { 4000 s.TerminologyNames = v 4001 return s 4002 } 4003 4004 type StartTextTranslationJobOutput struct { 4005 _ struct{} `type:"structure"` 4006 4007 // The identifier generated for the job. To get the status of a job, use this 4008 // ID with the DescribeTextTranslationJob operation. 4009 JobId *string `min:"1" type:"string"` 4010 4011 // The status of the job. Possible values include: 4012 // 4013 // * SUBMITTED - The job has been received and is queued for processing. 4014 // 4015 // * IN_PROGRESS - Amazon Translate is processing the job. 4016 // 4017 // * COMPLETED - The job was successfully completed and the output is available. 4018 // 4019 // * COMPLETED_WITH_ERROR - The job was completed with errors. The errors 4020 // can be analyzed in the job's output. 4021 // 4022 // * FAILED - The job did not complete. To get details, use the DescribeTextTranslationJob 4023 // operation. 4024 // 4025 // * STOP_REQUESTED - The user who started the job has requested that it 4026 // be stopped. 4027 // 4028 // * STOPPED - The job has been stopped. 4029 JobStatus *string `type:"string" enum:"JobStatus"` 4030 } 4031 4032 // String returns the string representation. 4033 // 4034 // API parameter values that are decorated as "sensitive" in the API will not 4035 // be included in the string output. The member name will be present, but the 4036 // value will be replaced with "sensitive". 4037 func (s StartTextTranslationJobOutput) String() string { 4038 return awsutil.Prettify(s) 4039 } 4040 4041 // GoString returns the string representation. 4042 // 4043 // API parameter values that are decorated as "sensitive" in the API will not 4044 // be included in the string output. The member name will be present, but the 4045 // value will be replaced with "sensitive". 4046 func (s StartTextTranslationJobOutput) GoString() string { 4047 return s.String() 4048 } 4049 4050 // SetJobId sets the JobId field's value. 4051 func (s *StartTextTranslationJobOutput) SetJobId(v string) *StartTextTranslationJobOutput { 4052 s.JobId = &v 4053 return s 4054 } 4055 4056 // SetJobStatus sets the JobStatus field's value. 4057 func (s *StartTextTranslationJobOutput) SetJobStatus(v string) *StartTextTranslationJobOutput { 4058 s.JobStatus = &v 4059 return s 4060 } 4061 4062 type StopTextTranslationJobInput struct { 4063 _ struct{} `type:"structure"` 4064 4065 // The job ID of the job to be stopped. 4066 // 4067 // JobId is a required field 4068 JobId *string `min:"1" type:"string" required:"true"` 4069 } 4070 4071 // String returns the string representation. 4072 // 4073 // API parameter values that are decorated as "sensitive" in the API will not 4074 // be included in the string output. The member name will be present, but the 4075 // value will be replaced with "sensitive". 4076 func (s StopTextTranslationJobInput) String() string { 4077 return awsutil.Prettify(s) 4078 } 4079 4080 // GoString returns the string representation. 4081 // 4082 // API parameter values that are decorated as "sensitive" in the API will not 4083 // be included in the string output. The member name will be present, but the 4084 // value will be replaced with "sensitive". 4085 func (s StopTextTranslationJobInput) GoString() string { 4086 return s.String() 4087 } 4088 4089 // Validate inspects the fields of the type to determine if they are valid. 4090 func (s *StopTextTranslationJobInput) Validate() error { 4091 invalidParams := request.ErrInvalidParams{Context: "StopTextTranslationJobInput"} 4092 if s.JobId == nil { 4093 invalidParams.Add(request.NewErrParamRequired("JobId")) 4094 } 4095 if s.JobId != nil && len(*s.JobId) < 1 { 4096 invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) 4097 } 4098 4099 if invalidParams.Len() > 0 { 4100 return invalidParams 4101 } 4102 return nil 4103 } 4104 4105 // SetJobId sets the JobId field's value. 4106 func (s *StopTextTranslationJobInput) SetJobId(v string) *StopTextTranslationJobInput { 4107 s.JobId = &v 4108 return s 4109 } 4110 4111 type StopTextTranslationJobOutput struct { 4112 _ struct{} `type:"structure"` 4113 4114 // The job ID of the stopped batch translation job. 4115 JobId *string `min:"1" type:"string"` 4116 4117 // The status of the designated job. Upon successful completion, the job's status 4118 // will be STOPPED. 4119 JobStatus *string `type:"string" enum:"JobStatus"` 4120 } 4121 4122 // String returns the string representation. 4123 // 4124 // API parameter values that are decorated as "sensitive" in the API will not 4125 // be included in the string output. The member name will be present, but the 4126 // value will be replaced with "sensitive". 4127 func (s StopTextTranslationJobOutput) String() string { 4128 return awsutil.Prettify(s) 4129 } 4130 4131 // GoString returns the string representation. 4132 // 4133 // API parameter values that are decorated as "sensitive" in the API will not 4134 // be included in the string output. The member name will be present, but the 4135 // value will be replaced with "sensitive". 4136 func (s StopTextTranslationJobOutput) GoString() string { 4137 return s.String() 4138 } 4139 4140 // SetJobId sets the JobId field's value. 4141 func (s *StopTextTranslationJobOutput) SetJobId(v string) *StopTextTranslationJobOutput { 4142 s.JobId = &v 4143 return s 4144 } 4145 4146 // SetJobStatus sets the JobStatus field's value. 4147 func (s *StopTextTranslationJobOutput) SetJobStatus(v string) *StopTextTranslationJobOutput { 4148 s.JobStatus = &v 4149 return s 4150 } 4151 4152 // The term being translated by the custom terminology. 4153 type Term struct { 4154 _ struct{} `type:"structure"` 4155 4156 // The source text of the term being translated by the custom terminology. 4157 SourceText *string `type:"string"` 4158 4159 // The target text of the term being translated by the custom terminology. 4160 TargetText *string `type:"string"` 4161 } 4162 4163 // String returns the string representation. 4164 // 4165 // API parameter values that are decorated as "sensitive" in the API will not 4166 // be included in the string output. The member name will be present, but the 4167 // value will be replaced with "sensitive". 4168 func (s Term) String() string { 4169 return awsutil.Prettify(s) 4170 } 4171 4172 // GoString returns the string representation. 4173 // 4174 // API parameter values that are decorated as "sensitive" in the API will not 4175 // be included in the string output. The member name will be present, but the 4176 // value will be replaced with "sensitive". 4177 func (s Term) GoString() string { 4178 return s.String() 4179 } 4180 4181 // SetSourceText sets the SourceText field's value. 4182 func (s *Term) SetSourceText(v string) *Term { 4183 s.SourceText = &v 4184 return s 4185 } 4186 4187 // SetTargetText sets the TargetText field's value. 4188 func (s *Term) SetTargetText(v string) *Term { 4189 s.TargetText = &v 4190 return s 4191 } 4192 4193 // The data associated with the custom terminology. 4194 type TerminologyData struct { 4195 _ struct{} `type:"structure"` 4196 4197 // The file containing the custom terminology data. Your version of the AWS 4198 // SDK performs a Base64-encoding on this field before sending a request to 4199 // the AWS service. Users of the SDK should not perform Base64-encoding themselves. 4200 // 4201 // File is a sensitive parameter and its value will be 4202 // replaced with "sensitive" in string returned by TerminologyData's 4203 // String and GoString methods. 4204 // 4205 // File is automatically base64 encoded/decoded by the SDK. 4206 // 4207 // File is a required field 4208 File []byte `type:"blob" required:"true" sensitive:"true"` 4209 4210 // The data format of the custom terminology. Either CSV or TMX. 4211 // 4212 // Format is a required field 4213 Format *string `type:"string" required:"true" enum:"TerminologyDataFormat"` 4214 } 4215 4216 // String returns the string representation. 4217 // 4218 // API parameter values that are decorated as "sensitive" in the API will not 4219 // be included in the string output. The member name will be present, but the 4220 // value will be replaced with "sensitive". 4221 func (s TerminologyData) String() string { 4222 return awsutil.Prettify(s) 4223 } 4224 4225 // GoString returns the string representation. 4226 // 4227 // API parameter values that are decorated as "sensitive" in the API will not 4228 // be included in the string output. The member name will be present, but the 4229 // value will be replaced with "sensitive". 4230 func (s TerminologyData) GoString() string { 4231 return s.String() 4232 } 4233 4234 // Validate inspects the fields of the type to determine if they are valid. 4235 func (s *TerminologyData) Validate() error { 4236 invalidParams := request.ErrInvalidParams{Context: "TerminologyData"} 4237 if s.File == nil { 4238 invalidParams.Add(request.NewErrParamRequired("File")) 4239 } 4240 if s.Format == nil { 4241 invalidParams.Add(request.NewErrParamRequired("Format")) 4242 } 4243 4244 if invalidParams.Len() > 0 { 4245 return invalidParams 4246 } 4247 return nil 4248 } 4249 4250 // SetFile sets the File field's value. 4251 func (s *TerminologyData) SetFile(v []byte) *TerminologyData { 4252 s.File = v 4253 return s 4254 } 4255 4256 // SetFormat sets the Format field's value. 4257 func (s *TerminologyData) SetFormat(v string) *TerminologyData { 4258 s.Format = &v 4259 return s 4260 } 4261 4262 // The location of the custom terminology data. 4263 type TerminologyDataLocation struct { 4264 _ struct{} `type:"structure"` 4265 4266 // The location of the custom terminology data. 4267 // 4268 // Location is a required field 4269 Location *string `type:"string" required:"true"` 4270 4271 // The repository type for the custom terminology data. 4272 // 4273 // RepositoryType is a required field 4274 RepositoryType *string `type:"string" required:"true"` 4275 } 4276 4277 // String returns the string representation. 4278 // 4279 // API parameter values that are decorated as "sensitive" in the API will not 4280 // be included in the string output. The member name will be present, but the 4281 // value will be replaced with "sensitive". 4282 func (s TerminologyDataLocation) String() string { 4283 return awsutil.Prettify(s) 4284 } 4285 4286 // GoString returns the string representation. 4287 // 4288 // API parameter values that are decorated as "sensitive" in the API will not 4289 // be included in the string output. The member name will be present, but the 4290 // value will be replaced with "sensitive". 4291 func (s TerminologyDataLocation) GoString() string { 4292 return s.String() 4293 } 4294 4295 // SetLocation sets the Location field's value. 4296 func (s *TerminologyDataLocation) SetLocation(v string) *TerminologyDataLocation { 4297 s.Location = &v 4298 return s 4299 } 4300 4301 // SetRepositoryType sets the RepositoryType field's value. 4302 func (s *TerminologyDataLocation) SetRepositoryType(v string) *TerminologyDataLocation { 4303 s.RepositoryType = &v 4304 return s 4305 } 4306 4307 // The properties of the custom terminology. 4308 type TerminologyProperties struct { 4309 _ struct{} `type:"structure"` 4310 4311 // The Amazon Resource Name (ARN) of the custom terminology. 4312 Arn *string `min:"1" type:"string"` 4313 4314 // The time at which the custom terminology was created, based on the timestamp. 4315 CreatedAt *time.Time `type:"timestamp"` 4316 4317 // The description of the custom terminology properties. 4318 Description *string `type:"string"` 4319 4320 // The encryption key for the custom terminology. 4321 EncryptionKey *EncryptionKey `type:"structure"` 4322 4323 // The time at which the custom terminology was last update, based on the timestamp. 4324 LastUpdatedAt *time.Time `type:"timestamp"` 4325 4326 // The name of the custom terminology. 4327 Name *string `min:"1" type:"string"` 4328 4329 // The size of the file used when importing a custom terminology. 4330 SizeBytes *int64 `type:"integer"` 4331 4332 // The language code for the source text of the translation request for which 4333 // the custom terminology is being used. 4334 SourceLanguageCode *string `min:"2" type:"string"` 4335 4336 // The language codes for the target languages available with the custom terminology 4337 // file. All possible target languages are returned in array. 4338 TargetLanguageCodes []*string `type:"list"` 4339 4340 // The number of terms included in the custom terminology. 4341 TermCount *int64 `type:"integer"` 4342 } 4343 4344 // String returns the string representation. 4345 // 4346 // API parameter values that are decorated as "sensitive" in the API will not 4347 // be included in the string output. The member name will be present, but the 4348 // value will be replaced with "sensitive". 4349 func (s TerminologyProperties) String() string { 4350 return awsutil.Prettify(s) 4351 } 4352 4353 // GoString returns the string representation. 4354 // 4355 // API parameter values that are decorated as "sensitive" in the API will not 4356 // be included in the string output. The member name will be present, but the 4357 // value will be replaced with "sensitive". 4358 func (s TerminologyProperties) GoString() string { 4359 return s.String() 4360 } 4361 4362 // SetArn sets the Arn field's value. 4363 func (s *TerminologyProperties) SetArn(v string) *TerminologyProperties { 4364 s.Arn = &v 4365 return s 4366 } 4367 4368 // SetCreatedAt sets the CreatedAt field's value. 4369 func (s *TerminologyProperties) SetCreatedAt(v time.Time) *TerminologyProperties { 4370 s.CreatedAt = &v 4371 return s 4372 } 4373 4374 // SetDescription sets the Description field's value. 4375 func (s *TerminologyProperties) SetDescription(v string) *TerminologyProperties { 4376 s.Description = &v 4377 return s 4378 } 4379 4380 // SetEncryptionKey sets the EncryptionKey field's value. 4381 func (s *TerminologyProperties) SetEncryptionKey(v *EncryptionKey) *TerminologyProperties { 4382 s.EncryptionKey = v 4383 return s 4384 } 4385 4386 // SetLastUpdatedAt sets the LastUpdatedAt field's value. 4387 func (s *TerminologyProperties) SetLastUpdatedAt(v time.Time) *TerminologyProperties { 4388 s.LastUpdatedAt = &v 4389 return s 4390 } 4391 4392 // SetName sets the Name field's value. 4393 func (s *TerminologyProperties) SetName(v string) *TerminologyProperties { 4394 s.Name = &v 4395 return s 4396 } 4397 4398 // SetSizeBytes sets the SizeBytes field's value. 4399 func (s *TerminologyProperties) SetSizeBytes(v int64) *TerminologyProperties { 4400 s.SizeBytes = &v 4401 return s 4402 } 4403 4404 // SetSourceLanguageCode sets the SourceLanguageCode field's value. 4405 func (s *TerminologyProperties) SetSourceLanguageCode(v string) *TerminologyProperties { 4406 s.SourceLanguageCode = &v 4407 return s 4408 } 4409 4410 // SetTargetLanguageCodes sets the TargetLanguageCodes field's value. 4411 func (s *TerminologyProperties) SetTargetLanguageCodes(v []*string) *TerminologyProperties { 4412 s.TargetLanguageCodes = v 4413 return s 4414 } 4415 4416 // SetTermCount sets the TermCount field's value. 4417 func (s *TerminologyProperties) SetTermCount(v int64) *TerminologyProperties { 4418 s.TermCount = &v 4419 return s 4420 } 4421 4422 type TextInput struct { 4423 _ struct{} `type:"structure"` 4424 4425 // The language code for the language of the source text. The language must 4426 // be a language supported by Amazon Translate. For a list of language codes, 4427 // see what-is-languages. 4428 // 4429 // To have Amazon Translate determine the source language of your text, you 4430 // can specify auto in the SourceLanguageCode field. If you specify auto, Amazon 4431 // Translate will call Amazon Comprehend (https://docs.aws.amazon.com/comprehend/latest/dg/comprehend-general.html) 4432 // to determine the source language. 4433 // 4434 // SourceLanguageCode is a required field 4435 SourceLanguageCode *string `min:"2" type:"string" required:"true"` 4436 4437 // The language code requested for the language of the target text. The language 4438 // must be a language supported by Amazon Translate. 4439 // 4440 // TargetLanguageCode is a required field 4441 TargetLanguageCode *string `min:"2" type:"string" required:"true"` 4442 4443 // The name of the terminology list file to be used in the TranslateText request. 4444 // You can use 1 terminology list at most in a TranslateText request. Terminology 4445 // lists can contain a maximum of 256 terms. 4446 TerminologyNames []*string `type:"list"` 4447 4448 // The text to translate. The text string can be a maximum of 5,000 bytes long. 4449 // Depending on your character set, this may be fewer than 5,000 characters. 4450 // 4451 // Text is a required field 4452 Text *string `min:"1" type:"string" required:"true"` 4453 } 4454 4455 // String returns the string representation. 4456 // 4457 // API parameter values that are decorated as "sensitive" in the API will not 4458 // be included in the string output. The member name will be present, but the 4459 // value will be replaced with "sensitive". 4460 func (s TextInput) String() string { 4461 return awsutil.Prettify(s) 4462 } 4463 4464 // GoString returns the string representation. 4465 // 4466 // API parameter values that are decorated as "sensitive" in the API will not 4467 // be included in the string output. The member name will be present, but the 4468 // value will be replaced with "sensitive". 4469 func (s TextInput) GoString() string { 4470 return s.String() 4471 } 4472 4473 // Validate inspects the fields of the type to determine if they are valid. 4474 func (s *TextInput) Validate() error { 4475 invalidParams := request.ErrInvalidParams{Context: "TextInput"} 4476 if s.SourceLanguageCode == nil { 4477 invalidParams.Add(request.NewErrParamRequired("SourceLanguageCode")) 4478 } 4479 if s.SourceLanguageCode != nil && len(*s.SourceLanguageCode) < 2 { 4480 invalidParams.Add(request.NewErrParamMinLen("SourceLanguageCode", 2)) 4481 } 4482 if s.TargetLanguageCode == nil { 4483 invalidParams.Add(request.NewErrParamRequired("TargetLanguageCode")) 4484 } 4485 if s.TargetLanguageCode != nil && len(*s.TargetLanguageCode) < 2 { 4486 invalidParams.Add(request.NewErrParamMinLen("TargetLanguageCode", 2)) 4487 } 4488 if s.Text == nil { 4489 invalidParams.Add(request.NewErrParamRequired("Text")) 4490 } 4491 if s.Text != nil && len(*s.Text) < 1 { 4492 invalidParams.Add(request.NewErrParamMinLen("Text", 1)) 4493 } 4494 4495 if invalidParams.Len() > 0 { 4496 return invalidParams 4497 } 4498 return nil 4499 } 4500 4501 // SetSourceLanguageCode sets the SourceLanguageCode field's value. 4502 func (s *TextInput) SetSourceLanguageCode(v string) *TextInput { 4503 s.SourceLanguageCode = &v 4504 return s 4505 } 4506 4507 // SetTargetLanguageCode sets the TargetLanguageCode field's value. 4508 func (s *TextInput) SetTargetLanguageCode(v string) *TextInput { 4509 s.TargetLanguageCode = &v 4510 return s 4511 } 4512 4513 // SetTerminologyNames sets the TerminologyNames field's value. 4514 func (s *TextInput) SetTerminologyNames(v []*string) *TextInput { 4515 s.TerminologyNames = v 4516 return s 4517 } 4518 4519 // SetText sets the Text field's value. 4520 func (s *TextInput) SetText(v string) *TextInput { 4521 s.Text = &v 4522 return s 4523 } 4524 4525 type TextOutput struct { 4526 _ struct{} `type:"structure"` 4527 4528 // The names of the custom terminologies applied to the input text by Amazon 4529 // Translate for the translated text response. 4530 AppliedTerminologies []*AppliedTerminology `type:"list"` 4531 4532 // The language code for the language of the source text. 4533 // 4534 // SourceLanguageCode is a required field 4535 SourceLanguageCode *string `min:"2" type:"string" required:"true"` 4536 4537 // The language code for the language of the target text. 4538 // 4539 // TargetLanguageCode is a required field 4540 TargetLanguageCode *string `min:"2" type:"string" required:"true"` 4541 4542 // The translated text. 4543 // 4544 // TranslatedText is a required field 4545 TranslatedText *string `type:"string" required:"true"` 4546 } 4547 4548 // String returns the string representation. 4549 // 4550 // API parameter values that are decorated as "sensitive" in the API will not 4551 // be included in the string output. The member name will be present, but the 4552 // value will be replaced with "sensitive". 4553 func (s TextOutput) String() string { 4554 return awsutil.Prettify(s) 4555 } 4556 4557 // GoString returns the string representation. 4558 // 4559 // API parameter values that are decorated as "sensitive" in the API will not 4560 // be included in the string output. The member name will be present, but the 4561 // value will be replaced with "sensitive". 4562 func (s TextOutput) GoString() string { 4563 return s.String() 4564 } 4565 4566 // SetAppliedTerminologies sets the AppliedTerminologies field's value. 4567 func (s *TextOutput) SetAppliedTerminologies(v []*AppliedTerminology) *TextOutput { 4568 s.AppliedTerminologies = v 4569 return s 4570 } 4571 4572 // SetSourceLanguageCode sets the SourceLanguageCode field's value. 4573 func (s *TextOutput) SetSourceLanguageCode(v string) *TextOutput { 4574 s.SourceLanguageCode = &v 4575 return s 4576 } 4577 4578 // SetTargetLanguageCode sets the TargetLanguageCode field's value. 4579 func (s *TextOutput) SetTargetLanguageCode(v string) *TextOutput { 4580 s.TargetLanguageCode = &v 4581 return s 4582 } 4583 4584 // SetTranslatedText sets the TranslatedText field's value. 4585 func (s *TextOutput) SetTranslatedText(v string) *TextOutput { 4586 s.TranslatedText = &v 4587 return s 4588 } 4589 4590 // The size of the text you submitted exceeds the size limit. Reduce the size 4591 // of the text or use a smaller document and then retry your request. 4592 type TextSizeLimitExceededException struct { 4593 _ struct{} `type:"structure"` 4594 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4595 4596 Message_ *string `locationName:"Message" type:"string"` 4597 } 4598 4599 // String returns the string representation. 4600 // 4601 // API parameter values that are decorated as "sensitive" in the API will not 4602 // be included in the string output. The member name will be present, but the 4603 // value will be replaced with "sensitive". 4604 func (s TextSizeLimitExceededException) String() string { 4605 return awsutil.Prettify(s) 4606 } 4607 4608 // GoString returns the string representation. 4609 // 4610 // API parameter values that are decorated as "sensitive" in the API will not 4611 // be included in the string output. The member name will be present, but the 4612 // value will be replaced with "sensitive". 4613 func (s TextSizeLimitExceededException) GoString() string { 4614 return s.String() 4615 } 4616 4617 func newErrorTextSizeLimitExceededException(v protocol.ResponseMetadata) error { 4618 return &TextSizeLimitExceededException{ 4619 RespMetadata: v, 4620 } 4621 } 4622 4623 // Code returns the exception type name. 4624 func (s *TextSizeLimitExceededException) Code() string { 4625 return "TextSizeLimitExceededException" 4626 } 4627 4628 // Message returns the exception's message. 4629 func (s *TextSizeLimitExceededException) Message() string { 4630 if s.Message_ != nil { 4631 return *s.Message_ 4632 } 4633 return "" 4634 } 4635 4636 // OrigErr always returns nil, satisfies awserr.Error interface. 4637 func (s *TextSizeLimitExceededException) OrigErr() error { 4638 return nil 4639 } 4640 4641 func (s *TextSizeLimitExceededException) Error() string { 4642 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4643 } 4644 4645 // Status code returns the HTTP status code for the request's response error. 4646 func (s *TextSizeLimitExceededException) StatusCode() int { 4647 return s.RespMetadata.StatusCode 4648 } 4649 4650 // RequestID returns the service's response RequestID for request. 4651 func (s *TextSizeLimitExceededException) RequestID() string { 4652 return s.RespMetadata.RequestID 4653 } 4654 4655 // Provides information for filtering a list of translation jobs. For more information, 4656 // see ListTextTranslationJobs. 4657 type TextTranslationJobFilter struct { 4658 _ struct{} `type:"structure"` 4659 4660 // Filters the list of jobs by name. 4661 JobName *string `min:"1" type:"string"` 4662 4663 // Filters the list of jobs based by job status. 4664 JobStatus *string `type:"string" enum:"JobStatus"` 4665 4666 // Filters the list of jobs based on the time that the job was submitted for 4667 // processing and returns only the jobs submitted after the specified time. 4668 // Jobs are returned in descending order, newest to oldest. 4669 SubmittedAfterTime *time.Time `type:"timestamp"` 4670 4671 // Filters the list of jobs based on the time that the job was submitted for 4672 // processing and returns only the jobs submitted before the specified time. 4673 // Jobs are returned in ascending order, oldest to newest. 4674 SubmittedBeforeTime *time.Time `type:"timestamp"` 4675 } 4676 4677 // String returns the string representation. 4678 // 4679 // API parameter values that are decorated as "sensitive" in the API will not 4680 // be included in the string output. The member name will be present, but the 4681 // value will be replaced with "sensitive". 4682 func (s TextTranslationJobFilter) String() string { 4683 return awsutil.Prettify(s) 4684 } 4685 4686 // GoString returns the string representation. 4687 // 4688 // API parameter values that are decorated as "sensitive" in the API will not 4689 // be included in the string output. The member name will be present, but the 4690 // value will be replaced with "sensitive". 4691 func (s TextTranslationJobFilter) GoString() string { 4692 return s.String() 4693 } 4694 4695 // Validate inspects the fields of the type to determine if they are valid. 4696 func (s *TextTranslationJobFilter) Validate() error { 4697 invalidParams := request.ErrInvalidParams{Context: "TextTranslationJobFilter"} 4698 if s.JobName != nil && len(*s.JobName) < 1 { 4699 invalidParams.Add(request.NewErrParamMinLen("JobName", 1)) 4700 } 4701 4702 if invalidParams.Len() > 0 { 4703 return invalidParams 4704 } 4705 return nil 4706 } 4707 4708 // SetJobName sets the JobName field's value. 4709 func (s *TextTranslationJobFilter) SetJobName(v string) *TextTranslationJobFilter { 4710 s.JobName = &v 4711 return s 4712 } 4713 4714 // SetJobStatus sets the JobStatus field's value. 4715 func (s *TextTranslationJobFilter) SetJobStatus(v string) *TextTranslationJobFilter { 4716 s.JobStatus = &v 4717 return s 4718 } 4719 4720 // SetSubmittedAfterTime sets the SubmittedAfterTime field's value. 4721 func (s *TextTranslationJobFilter) SetSubmittedAfterTime(v time.Time) *TextTranslationJobFilter { 4722 s.SubmittedAfterTime = &v 4723 return s 4724 } 4725 4726 // SetSubmittedBeforeTime sets the SubmittedBeforeTime field's value. 4727 func (s *TextTranslationJobFilter) SetSubmittedBeforeTime(v time.Time) *TextTranslationJobFilter { 4728 s.SubmittedBeforeTime = &v 4729 return s 4730 } 4731 4732 // Provides information about a translation job. 4733 type TextTranslationJobProperties struct { 4734 _ struct{} `type:"structure"` 4735 4736 // The Amazon Resource Name (ARN) of an AWS Identity Access and Management (IAM) 4737 // role that granted Amazon Translate read access to the job's input data. 4738 DataAccessRoleArn *string `min:"20" type:"string"` 4739 4740 // The time at which the translation job ended. 4741 EndTime *time.Time `type:"timestamp"` 4742 4743 // The input configuration properties that were specified when the job was requested. 4744 InputDataConfig *InputDataConfig `type:"structure"` 4745 4746 // The number of documents successfully and unsuccessfully processed during 4747 // the translation job. 4748 JobDetails *JobDetails `type:"structure"` 4749 4750 // The ID of the translation job. 4751 JobId *string `min:"1" type:"string"` 4752 4753 // The user-defined name of the translation job. 4754 JobName *string `min:"1" type:"string"` 4755 4756 // The status of the translation job. 4757 JobStatus *string `type:"string" enum:"JobStatus"` 4758 4759 // An explanation of any errors that may have occured during the translation 4760 // job. 4761 Message *string `type:"string"` 4762 4763 // The output configuration properties that were specified when the job was 4764 // requested. 4765 OutputDataConfig *OutputDataConfig `type:"structure"` 4766 4767 // A list containing the names of the parallel data resources applied to the 4768 // translation job. 4769 ParallelDataNames []*string `type:"list"` 4770 4771 // The language code of the language of the source text. The language must be 4772 // a language supported by Amazon Translate. 4773 SourceLanguageCode *string `min:"2" type:"string"` 4774 4775 // The time at which the translation job was submitted. 4776 SubmittedTime *time.Time `type:"timestamp"` 4777 4778 // The language code of the language of the target text. The language must be 4779 // a language supported by Amazon Translate. 4780 TargetLanguageCodes []*string `min:"1" type:"list"` 4781 4782 // A list containing the names of the terminologies applied to a translation 4783 // job. Only one terminology can be applied per StartTextTranslationJob request 4784 // at this time. 4785 TerminologyNames []*string `type:"list"` 4786 } 4787 4788 // String returns the string representation. 4789 // 4790 // API parameter values that are decorated as "sensitive" in the API will not 4791 // be included in the string output. The member name will be present, but the 4792 // value will be replaced with "sensitive". 4793 func (s TextTranslationJobProperties) String() string { 4794 return awsutil.Prettify(s) 4795 } 4796 4797 // GoString returns the string representation. 4798 // 4799 // API parameter values that are decorated as "sensitive" in the API will not 4800 // be included in the string output. The member name will be present, but the 4801 // value will be replaced with "sensitive". 4802 func (s TextTranslationJobProperties) GoString() string { 4803 return s.String() 4804 } 4805 4806 // SetDataAccessRoleArn sets the DataAccessRoleArn field's value. 4807 func (s *TextTranslationJobProperties) SetDataAccessRoleArn(v string) *TextTranslationJobProperties { 4808 s.DataAccessRoleArn = &v 4809 return s 4810 } 4811 4812 // SetEndTime sets the EndTime field's value. 4813 func (s *TextTranslationJobProperties) SetEndTime(v time.Time) *TextTranslationJobProperties { 4814 s.EndTime = &v 4815 return s 4816 } 4817 4818 // SetInputDataConfig sets the InputDataConfig field's value. 4819 func (s *TextTranslationJobProperties) SetInputDataConfig(v *InputDataConfig) *TextTranslationJobProperties { 4820 s.InputDataConfig = v 4821 return s 4822 } 4823 4824 // SetJobDetails sets the JobDetails field's value. 4825 func (s *TextTranslationJobProperties) SetJobDetails(v *JobDetails) *TextTranslationJobProperties { 4826 s.JobDetails = v 4827 return s 4828 } 4829 4830 // SetJobId sets the JobId field's value. 4831 func (s *TextTranslationJobProperties) SetJobId(v string) *TextTranslationJobProperties { 4832 s.JobId = &v 4833 return s 4834 } 4835 4836 // SetJobName sets the JobName field's value. 4837 func (s *TextTranslationJobProperties) SetJobName(v string) *TextTranslationJobProperties { 4838 s.JobName = &v 4839 return s 4840 } 4841 4842 // SetJobStatus sets the JobStatus field's value. 4843 func (s *TextTranslationJobProperties) SetJobStatus(v string) *TextTranslationJobProperties { 4844 s.JobStatus = &v 4845 return s 4846 } 4847 4848 // SetMessage sets the Message field's value. 4849 func (s *TextTranslationJobProperties) SetMessage(v string) *TextTranslationJobProperties { 4850 s.Message = &v 4851 return s 4852 } 4853 4854 // SetOutputDataConfig sets the OutputDataConfig field's value. 4855 func (s *TextTranslationJobProperties) SetOutputDataConfig(v *OutputDataConfig) *TextTranslationJobProperties { 4856 s.OutputDataConfig = v 4857 return s 4858 } 4859 4860 // SetParallelDataNames sets the ParallelDataNames field's value. 4861 func (s *TextTranslationJobProperties) SetParallelDataNames(v []*string) *TextTranslationJobProperties { 4862 s.ParallelDataNames = v 4863 return s 4864 } 4865 4866 // SetSourceLanguageCode sets the SourceLanguageCode field's value. 4867 func (s *TextTranslationJobProperties) SetSourceLanguageCode(v string) *TextTranslationJobProperties { 4868 s.SourceLanguageCode = &v 4869 return s 4870 } 4871 4872 // SetSubmittedTime sets the SubmittedTime field's value. 4873 func (s *TextTranslationJobProperties) SetSubmittedTime(v time.Time) *TextTranslationJobProperties { 4874 s.SubmittedTime = &v 4875 return s 4876 } 4877 4878 // SetTargetLanguageCodes sets the TargetLanguageCodes field's value. 4879 func (s *TextTranslationJobProperties) SetTargetLanguageCodes(v []*string) *TextTranslationJobProperties { 4880 s.TargetLanguageCodes = v 4881 return s 4882 } 4883 4884 // SetTerminologyNames sets the TerminologyNames field's value. 4885 func (s *TextTranslationJobProperties) SetTerminologyNames(v []*string) *TextTranslationJobProperties { 4886 s.TerminologyNames = v 4887 return s 4888 } 4889 4890 // You have made too many requests within a short period of time. Wait for a 4891 // short time and then try your request again. 4892 type TooManyRequestsException struct { 4893 _ struct{} `type:"structure"` 4894 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4895 4896 Message_ *string `locationName:"Message" type:"string"` 4897 } 4898 4899 // String returns the string representation. 4900 // 4901 // API parameter values that are decorated as "sensitive" in the API will not 4902 // be included in the string output. The member name will be present, but the 4903 // value will be replaced with "sensitive". 4904 func (s TooManyRequestsException) String() string { 4905 return awsutil.Prettify(s) 4906 } 4907 4908 // GoString returns the string representation. 4909 // 4910 // API parameter values that are decorated as "sensitive" in the API will not 4911 // be included in the string output. The member name will be present, but the 4912 // value will be replaced with "sensitive". 4913 func (s TooManyRequestsException) GoString() string { 4914 return s.String() 4915 } 4916 4917 func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error { 4918 return &TooManyRequestsException{ 4919 RespMetadata: v, 4920 } 4921 } 4922 4923 // Code returns the exception type name. 4924 func (s *TooManyRequestsException) Code() string { 4925 return "TooManyRequestsException" 4926 } 4927 4928 // Message returns the exception's message. 4929 func (s *TooManyRequestsException) Message() string { 4930 if s.Message_ != nil { 4931 return *s.Message_ 4932 } 4933 return "" 4934 } 4935 4936 // OrigErr always returns nil, satisfies awserr.Error interface. 4937 func (s *TooManyRequestsException) OrigErr() error { 4938 return nil 4939 } 4940 4941 func (s *TooManyRequestsException) Error() string { 4942 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4943 } 4944 4945 // Status code returns the HTTP status code for the request's response error. 4946 func (s *TooManyRequestsException) StatusCode() int { 4947 return s.RespMetadata.StatusCode 4948 } 4949 4950 // RequestID returns the service's response RequestID for request. 4951 func (s *TooManyRequestsException) RequestID() string { 4952 return s.RespMetadata.RequestID 4953 } 4954 4955 // Amazon Translate does not support translation from the language of the source 4956 // text into the requested target language. For more information, see how-to-error-msg. 4957 type UnsupportedLanguagePairException struct { 4958 _ struct{} `type:"structure"` 4959 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4960 4961 Message_ *string `locationName:"Message" type:"string"` 4962 4963 // The language code for the language of the input text. 4964 SourceLanguageCode *string `min:"2" type:"string"` 4965 4966 // The language code for the language of the translated text. 4967 TargetLanguageCode *string `min:"2" type:"string"` 4968 } 4969 4970 // String returns the string representation. 4971 // 4972 // API parameter values that are decorated as "sensitive" in the API will not 4973 // be included in the string output. The member name will be present, but the 4974 // value will be replaced with "sensitive". 4975 func (s UnsupportedLanguagePairException) String() string { 4976 return awsutil.Prettify(s) 4977 } 4978 4979 // GoString returns the string representation. 4980 // 4981 // API parameter values that are decorated as "sensitive" in the API will not 4982 // be included in the string output. The member name will be present, but the 4983 // value will be replaced with "sensitive". 4984 func (s UnsupportedLanguagePairException) GoString() string { 4985 return s.String() 4986 } 4987 4988 func newErrorUnsupportedLanguagePairException(v protocol.ResponseMetadata) error { 4989 return &UnsupportedLanguagePairException{ 4990 RespMetadata: v, 4991 } 4992 } 4993 4994 // Code returns the exception type name. 4995 func (s *UnsupportedLanguagePairException) Code() string { 4996 return "UnsupportedLanguagePairException" 4997 } 4998 4999 // Message returns the exception's message. 5000 func (s *UnsupportedLanguagePairException) Message() string { 5001 if s.Message_ != nil { 5002 return *s.Message_ 5003 } 5004 return "" 5005 } 5006 5007 // OrigErr always returns nil, satisfies awserr.Error interface. 5008 func (s *UnsupportedLanguagePairException) OrigErr() error { 5009 return nil 5010 } 5011 5012 func (s *UnsupportedLanguagePairException) Error() string { 5013 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 5014 } 5015 5016 // Status code returns the HTTP status code for the request's response error. 5017 func (s *UnsupportedLanguagePairException) StatusCode() int { 5018 return s.RespMetadata.StatusCode 5019 } 5020 5021 // RequestID returns the service's response RequestID for request. 5022 func (s *UnsupportedLanguagePairException) RequestID() string { 5023 return s.RespMetadata.RequestID 5024 } 5025 5026 type UpdateParallelDataInput struct { 5027 _ struct{} `type:"structure"` 5028 5029 // A unique identifier for the request. This token is automatically generated 5030 // when you use Amazon Translate through an AWS SDK. 5031 ClientToken *string `min:"1" type:"string" idempotencyToken:"true"` 5032 5033 // A custom description for the parallel data resource in Amazon Translate. 5034 Description *string `type:"string"` 5035 5036 // The name of the parallel data resource being updated. 5037 // 5038 // Name is a required field 5039 Name *string `min:"1" type:"string" required:"true"` 5040 5041 // Specifies the format and S3 location of the parallel data input file. 5042 // 5043 // ParallelDataConfig is a required field 5044 ParallelDataConfig *ParallelDataConfig `type:"structure" required:"true"` 5045 } 5046 5047 // String returns the string representation. 5048 // 5049 // API parameter values that are decorated as "sensitive" in the API will not 5050 // be included in the string output. The member name will be present, but the 5051 // value will be replaced with "sensitive". 5052 func (s UpdateParallelDataInput) String() string { 5053 return awsutil.Prettify(s) 5054 } 5055 5056 // GoString returns the string representation. 5057 // 5058 // API parameter values that are decorated as "sensitive" in the API will not 5059 // be included in the string output. The member name will be present, but the 5060 // value will be replaced with "sensitive". 5061 func (s UpdateParallelDataInput) GoString() string { 5062 return s.String() 5063 } 5064 5065 // Validate inspects the fields of the type to determine if they are valid. 5066 func (s *UpdateParallelDataInput) Validate() error { 5067 invalidParams := request.ErrInvalidParams{Context: "UpdateParallelDataInput"} 5068 if s.ClientToken != nil && len(*s.ClientToken) < 1 { 5069 invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) 5070 } 5071 if s.Name == nil { 5072 invalidParams.Add(request.NewErrParamRequired("Name")) 5073 } 5074 if s.Name != nil && len(*s.Name) < 1 { 5075 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 5076 } 5077 if s.ParallelDataConfig == nil { 5078 invalidParams.Add(request.NewErrParamRequired("ParallelDataConfig")) 5079 } 5080 if s.ParallelDataConfig != nil { 5081 if err := s.ParallelDataConfig.Validate(); err != nil { 5082 invalidParams.AddNested("ParallelDataConfig", err.(request.ErrInvalidParams)) 5083 } 5084 } 5085 5086 if invalidParams.Len() > 0 { 5087 return invalidParams 5088 } 5089 return nil 5090 } 5091 5092 // SetClientToken sets the ClientToken field's value. 5093 func (s *UpdateParallelDataInput) SetClientToken(v string) *UpdateParallelDataInput { 5094 s.ClientToken = &v 5095 return s 5096 } 5097 5098 // SetDescription sets the Description field's value. 5099 func (s *UpdateParallelDataInput) SetDescription(v string) *UpdateParallelDataInput { 5100 s.Description = &v 5101 return s 5102 } 5103 5104 // SetName sets the Name field's value. 5105 func (s *UpdateParallelDataInput) SetName(v string) *UpdateParallelDataInput { 5106 s.Name = &v 5107 return s 5108 } 5109 5110 // SetParallelDataConfig sets the ParallelDataConfig field's value. 5111 func (s *UpdateParallelDataInput) SetParallelDataConfig(v *ParallelDataConfig) *UpdateParallelDataInput { 5112 s.ParallelDataConfig = v 5113 return s 5114 } 5115 5116 type UpdateParallelDataOutput struct { 5117 _ struct{} `type:"structure"` 5118 5119 // The time that the most recent update was attempted. 5120 LatestUpdateAttemptAt *time.Time `type:"timestamp"` 5121 5122 // The status of the parallel data update attempt. When the updated parallel 5123 // data resource is ready for you to use, the status is ACTIVE. 5124 LatestUpdateAttemptStatus *string `type:"string" enum:"ParallelDataStatus"` 5125 5126 // The name of the parallel data resource being updated. 5127 Name *string `min:"1" type:"string"` 5128 5129 // The status of the parallel data resource that you are attempting to update. 5130 // Your update request is accepted only if this status is either ACTIVE or FAILED. 5131 Status *string `type:"string" enum:"ParallelDataStatus"` 5132 } 5133 5134 // String returns the string representation. 5135 // 5136 // API parameter values that are decorated as "sensitive" in the API will not 5137 // be included in the string output. The member name will be present, but the 5138 // value will be replaced with "sensitive". 5139 func (s UpdateParallelDataOutput) String() string { 5140 return awsutil.Prettify(s) 5141 } 5142 5143 // GoString returns the string representation. 5144 // 5145 // API parameter values that are decorated as "sensitive" in the API will not 5146 // be included in the string output. The member name will be present, but the 5147 // value will be replaced with "sensitive". 5148 func (s UpdateParallelDataOutput) GoString() string { 5149 return s.String() 5150 } 5151 5152 // SetLatestUpdateAttemptAt sets the LatestUpdateAttemptAt field's value. 5153 func (s *UpdateParallelDataOutput) SetLatestUpdateAttemptAt(v time.Time) *UpdateParallelDataOutput { 5154 s.LatestUpdateAttemptAt = &v 5155 return s 5156 } 5157 5158 // SetLatestUpdateAttemptStatus sets the LatestUpdateAttemptStatus field's value. 5159 func (s *UpdateParallelDataOutput) SetLatestUpdateAttemptStatus(v string) *UpdateParallelDataOutput { 5160 s.LatestUpdateAttemptStatus = &v 5161 return s 5162 } 5163 5164 // SetName sets the Name field's value. 5165 func (s *UpdateParallelDataOutput) SetName(v string) *UpdateParallelDataOutput { 5166 s.Name = &v 5167 return s 5168 } 5169 5170 // SetStatus sets the Status field's value. 5171 func (s *UpdateParallelDataOutput) SetStatus(v string) *UpdateParallelDataOutput { 5172 s.Status = &v 5173 return s 5174 } 5175 5176 const ( 5177 // EncryptionKeyTypeKms is a EncryptionKeyType enum value 5178 EncryptionKeyTypeKms = "KMS" 5179 ) 5180 5181 // EncryptionKeyType_Values returns all elements of the EncryptionKeyType enum 5182 func EncryptionKeyType_Values() []string { 5183 return []string{ 5184 EncryptionKeyTypeKms, 5185 } 5186 } 5187 5188 const ( 5189 // JobStatusSubmitted is a JobStatus enum value 5190 JobStatusSubmitted = "SUBMITTED" 5191 5192 // JobStatusInProgress is a JobStatus enum value 5193 JobStatusInProgress = "IN_PROGRESS" 5194 5195 // JobStatusCompleted is a JobStatus enum value 5196 JobStatusCompleted = "COMPLETED" 5197 5198 // JobStatusCompletedWithError is a JobStatus enum value 5199 JobStatusCompletedWithError = "COMPLETED_WITH_ERROR" 5200 5201 // JobStatusFailed is a JobStatus enum value 5202 JobStatusFailed = "FAILED" 5203 5204 // JobStatusStopRequested is a JobStatus enum value 5205 JobStatusStopRequested = "STOP_REQUESTED" 5206 5207 // JobStatusStopped is a JobStatus enum value 5208 JobStatusStopped = "STOPPED" 5209 ) 5210 5211 // JobStatus_Values returns all elements of the JobStatus enum 5212 func JobStatus_Values() []string { 5213 return []string{ 5214 JobStatusSubmitted, 5215 JobStatusInProgress, 5216 JobStatusCompleted, 5217 JobStatusCompletedWithError, 5218 JobStatusFailed, 5219 JobStatusStopRequested, 5220 JobStatusStopped, 5221 } 5222 } 5223 5224 const ( 5225 // MergeStrategyOverwrite is a MergeStrategy enum value 5226 MergeStrategyOverwrite = "OVERWRITE" 5227 ) 5228 5229 // MergeStrategy_Values returns all elements of the MergeStrategy enum 5230 func MergeStrategy_Values() []string { 5231 return []string{ 5232 MergeStrategyOverwrite, 5233 } 5234 } 5235 5236 const ( 5237 // ParallelDataFormatTsv is a ParallelDataFormat enum value 5238 ParallelDataFormatTsv = "TSV" 5239 5240 // ParallelDataFormatCsv is a ParallelDataFormat enum value 5241 ParallelDataFormatCsv = "CSV" 5242 5243 // ParallelDataFormatTmx is a ParallelDataFormat enum value 5244 ParallelDataFormatTmx = "TMX" 5245 ) 5246 5247 // ParallelDataFormat_Values returns all elements of the ParallelDataFormat enum 5248 func ParallelDataFormat_Values() []string { 5249 return []string{ 5250 ParallelDataFormatTsv, 5251 ParallelDataFormatCsv, 5252 ParallelDataFormatTmx, 5253 } 5254 } 5255 5256 const ( 5257 // ParallelDataStatusCreating is a ParallelDataStatus enum value 5258 ParallelDataStatusCreating = "CREATING" 5259 5260 // ParallelDataStatusUpdating is a ParallelDataStatus enum value 5261 ParallelDataStatusUpdating = "UPDATING" 5262 5263 // ParallelDataStatusActive is a ParallelDataStatus enum value 5264 ParallelDataStatusActive = "ACTIVE" 5265 5266 // ParallelDataStatusDeleting is a ParallelDataStatus enum value 5267 ParallelDataStatusDeleting = "DELETING" 5268 5269 // ParallelDataStatusFailed is a ParallelDataStatus enum value 5270 ParallelDataStatusFailed = "FAILED" 5271 ) 5272 5273 // ParallelDataStatus_Values returns all elements of the ParallelDataStatus enum 5274 func ParallelDataStatus_Values() []string { 5275 return []string{ 5276 ParallelDataStatusCreating, 5277 ParallelDataStatusUpdating, 5278 ParallelDataStatusActive, 5279 ParallelDataStatusDeleting, 5280 ParallelDataStatusFailed, 5281 } 5282 } 5283 5284 const ( 5285 // TerminologyDataFormatCsv is a TerminologyDataFormat enum value 5286 TerminologyDataFormatCsv = "CSV" 5287 5288 // TerminologyDataFormatTmx is a TerminologyDataFormat enum value 5289 TerminologyDataFormatTmx = "TMX" 5290 ) 5291 5292 // TerminologyDataFormat_Values returns all elements of the TerminologyDataFormat enum 5293 func TerminologyDataFormat_Values() []string { 5294 return []string{ 5295 TerminologyDataFormatCsv, 5296 TerminologyDataFormatTmx, 5297 } 5298 }