aws-sdk-translate 1.18.0 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dc8c49b3df0deeedf36ce900a726ff527bc5b4b1
4
- data.tar.gz: a4b706c2b6c58ff30df5c12386c75b3b71890c55
3
+ metadata.gz: 6c12d94183f648f8ee932376f72999f90629a263
4
+ data.tar.gz: 815e6ab6934528de7b236b41a7d99af6396f387f
5
5
  SHA512:
6
- metadata.gz: c3210d69304020f711e2ae2e2caf3380eca6e9abfa7bd44db54925f0ee2930b47383ed56ec52d02ee3d4cbe2681d42006ee32c61ba0bb64c4bfbc9188ab7fe7b
7
- data.tar.gz: 70c28a0bf5b34bfec4c768e599aae39972a85e6354faa45e30fbf9e7e3728d5ff26d178a8320a55be862ad3e094e552c16d6c5b7b64d15ee7b54b4b0c932f81a
6
+ metadata.gz: 6c04a106ceb8e93586f1b3ac25f6e66ac34f9d9366392d0bc1d3658ba6b6ae04e9c998a79d57e42091f3ac099e90c1559651795c6eb6d547359ce26fa705eeb5
7
+ data.tar.gz: e5a10077c76b47f5368a451df9dc4469ac6f49310c0fb752092c33f9170ad258ba8b8375f31c91f95c345739804221f27afc6f4ad46740368f9a1bc5fa3a83c4
@@ -42,6 +42,6 @@ require_relative 'aws-sdk-translate/customizations'
42
42
  # @service
43
43
  module Aws::Translate
44
44
 
45
- GEM_VERSION = '1.18.0'
45
+ GEM_VERSION = '1.19.0'
46
46
 
47
47
  end
@@ -286,6 +286,55 @@ module Aws::Translate
286
286
  req.send_request(options)
287
287
  end
288
288
 
289
+ # Gets the properties associated with an asycnhronous batch translation
290
+ # job including name, ID, status, source and target languages,
291
+ # input/output S3 buckets, and so on.
292
+ #
293
+ # @option params [required, String] :job_id
294
+ # The identifier that Amazon Translate generated for the job. The
295
+ # StartTextTranslationJob operation returns this identifier in its
296
+ # response.
297
+ #
298
+ # @return [Types::DescribeTextTranslationJobResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
299
+ #
300
+ # * {Types::DescribeTextTranslationJobResponse#text_translation_job_properties #text_translation_job_properties} => Types::TextTranslationJobProperties
301
+ #
302
+ # @example Request syntax with placeholder values
303
+ #
304
+ # resp = client.describe_text_translation_job({
305
+ # job_id: "JobId", # required
306
+ # })
307
+ #
308
+ # @example Response structure
309
+ #
310
+ # resp.text_translation_job_properties.job_id #=> String
311
+ # resp.text_translation_job_properties.job_name #=> String
312
+ # resp.text_translation_job_properties.job_status #=> String, one of "SUBMITTED", "IN_PROGRESS", "COMPLETED", "COMPLETED_WITH_ERROR", "FAILED", "STOP_REQUESTED", "STOPPED"
313
+ # resp.text_translation_job_properties.job_details.translated_documents_count #=> Integer
314
+ # resp.text_translation_job_properties.job_details.documents_with_errors_count #=> Integer
315
+ # resp.text_translation_job_properties.job_details.input_documents_count #=> Integer
316
+ # resp.text_translation_job_properties.source_language_code #=> String
317
+ # resp.text_translation_job_properties.target_language_codes #=> Array
318
+ # resp.text_translation_job_properties.target_language_codes[0] #=> String
319
+ # resp.text_translation_job_properties.terminology_names #=> Array
320
+ # resp.text_translation_job_properties.terminology_names[0] #=> String
321
+ # resp.text_translation_job_properties.message #=> String
322
+ # resp.text_translation_job_properties.submitted_time #=> Time
323
+ # resp.text_translation_job_properties.end_time #=> Time
324
+ # resp.text_translation_job_properties.input_data_config.s3_uri #=> String
325
+ # resp.text_translation_job_properties.input_data_config.content_type #=> String
326
+ # resp.text_translation_job_properties.output_data_config.s3_uri #=> String
327
+ # resp.text_translation_job_properties.data_access_role_arn #=> String
328
+ #
329
+ # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/DescribeTextTranslationJob AWS API Documentation
330
+ #
331
+ # @overload describe_text_translation_job(params = {})
332
+ # @param [Hash] params ({})
333
+ def describe_text_translation_job(params = {}, options = {})
334
+ req = build_request(:describe_text_translation_job, params)
335
+ req.send_request(options)
336
+ end
337
+
289
338
  # Retrieves a custom terminology.
290
339
  #
291
340
  # @option params [required, String] :name
@@ -454,62 +503,206 @@ module Aws::Translate
454
503
  req.send_request(options)
455
504
  end
456
505
 
457
- # Translates input text from the source language to the target language.
458
- # It is not necessary to use English (en) as either the source or the
459
- # target language but not all language combinations are supported by
460
- # Amazon Translate. For more information, see [Supported Language
461
- # Pairs][1].
506
+ # Gets a list of the batch translation jobs that you have submitted.
507
+ #
508
+ # @option params [Types::TextTranslationJobFilter] :filter
509
+ # The parameters that specify which batch translation jobs to retrieve.
510
+ # Filters include job name, job status, and submission time. You can
511
+ # only set one filter at a time.
512
+ #
513
+ # @option params [String] :next_token
514
+ # The token to request the next page of results.
515
+ #
516
+ # @option params [Integer] :max_results
517
+ # The maximum number of results to return in each page. The default
518
+ # value is 100.
519
+ #
520
+ # @return [Types::ListTextTranslationJobsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
521
+ #
522
+ # * {Types::ListTextTranslationJobsResponse#text_translation_job_properties_list #text_translation_job_properties_list} => Array<Types::TextTranslationJobProperties>
523
+ # * {Types::ListTextTranslationJobsResponse#next_token #next_token} => String
524
+ #
525
+ # @example Request syntax with placeholder values
526
+ #
527
+ # resp = client.list_text_translation_jobs({
528
+ # filter: {
529
+ # job_name: "JobName",
530
+ # job_status: "SUBMITTED", # accepts SUBMITTED, IN_PROGRESS, COMPLETED, COMPLETED_WITH_ERROR, FAILED, STOP_REQUESTED, STOPPED
531
+ # submitted_before_time: Time.now,
532
+ # submitted_after_time: Time.now,
533
+ # },
534
+ # next_token: "NextToken",
535
+ # max_results: 1,
536
+ # })
537
+ #
538
+ # @example Response structure
539
+ #
540
+ # resp.text_translation_job_properties_list #=> Array
541
+ # resp.text_translation_job_properties_list[0].job_id #=> String
542
+ # resp.text_translation_job_properties_list[0].job_name #=> String
543
+ # resp.text_translation_job_properties_list[0].job_status #=> String, one of "SUBMITTED", "IN_PROGRESS", "COMPLETED", "COMPLETED_WITH_ERROR", "FAILED", "STOP_REQUESTED", "STOPPED"
544
+ # resp.text_translation_job_properties_list[0].job_details.translated_documents_count #=> Integer
545
+ # resp.text_translation_job_properties_list[0].job_details.documents_with_errors_count #=> Integer
546
+ # resp.text_translation_job_properties_list[0].job_details.input_documents_count #=> Integer
547
+ # resp.text_translation_job_properties_list[0].source_language_code #=> String
548
+ # resp.text_translation_job_properties_list[0].target_language_codes #=> Array
549
+ # resp.text_translation_job_properties_list[0].target_language_codes[0] #=> String
550
+ # resp.text_translation_job_properties_list[0].terminology_names #=> Array
551
+ # resp.text_translation_job_properties_list[0].terminology_names[0] #=> String
552
+ # resp.text_translation_job_properties_list[0].message #=> String
553
+ # resp.text_translation_job_properties_list[0].submitted_time #=> Time
554
+ # resp.text_translation_job_properties_list[0].end_time #=> Time
555
+ # resp.text_translation_job_properties_list[0].input_data_config.s3_uri #=> String
556
+ # resp.text_translation_job_properties_list[0].input_data_config.content_type #=> String
557
+ # resp.text_translation_job_properties_list[0].output_data_config.s3_uri #=> String
558
+ # resp.text_translation_job_properties_list[0].data_access_role_arn #=> String
559
+ # resp.next_token #=> String
560
+ #
561
+ # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/ListTextTranslationJobs AWS API Documentation
562
+ #
563
+ # @overload list_text_translation_jobs(params = {})
564
+ # @param [Hash] params ({})
565
+ def list_text_translation_jobs(params = {}, options = {})
566
+ req = build_request(:list_text_translation_jobs, params)
567
+ req.send_request(options)
568
+ end
569
+
570
+ # Starts an asynchronous batch translation job. Batch translation jobs
571
+ # can be used to translate large volumes of text across multiple
572
+ # documents at once. For more information, see async.
462
573
  #
463
- # * Arabic (ar)
574
+ # Batch translation jobs can be described with the
575
+ # DescribeTextTranslationJob operation, listed with the
576
+ # ListTextTranslationJobs operation, and stopped with the
577
+ # StopTextTranslationJob operation.
464
578
  #
465
- # * Chinese (Simplified) (zh)
579
+ # <note markdown="1"> Amazon Translate does not support batch translation of multiple source
580
+ # languages at once.
466
581
  #
467
- # * Chinese (Traditional) (zh-TW)
582
+ # </note>
468
583
  #
469
- # * Czech (cs)
584
+ # @option params [String] :job_name
585
+ # The name of the batch translation job to be performed.
470
586
  #
471
- # * Danish (da)
587
+ # @option params [required, Types::InputDataConfig] :input_data_config
588
+ # Specifies the format and S3 location of the input documents for the
589
+ # translation job.
472
590
  #
473
- # * Dutch (nl)
591
+ # @option params [required, Types::OutputDataConfig] :output_data_config
592
+ # Specifies the S3 folder to which your job output will be saved.
474
593
  #
475
- # * English (en)
594
+ # @option params [required, String] :data_access_role_arn
595
+ # The Amazon Resource Name (ARN) of an AWS Identity Access and
596
+ # Management (IAM) role that grants Amazon Translate read access to your
597
+ # input data. For more nformation, see identity-and-access-management.
476
598
  #
477
- # * Finnish (fi)
599
+ # @option params [required, String] :source_language_code
600
+ # The language code of the input language. For a list of language codes,
601
+ # see what-is-languages.
478
602
  #
479
- # * French (fr)
603
+ # Amazon Translate does not automatically detect a source language
604
+ # during batch translation jobs.
480
605
  #
481
- # * German (de)
606
+ # @option params [required, Array<String>] :target_language_codes
607
+ # The language code of the output language.
482
608
  #
483
- # * Hebrew (he)
609
+ # @option params [Array<String>] :terminology_names
610
+ # The name of the terminology to use in the batch translation job. For a
611
+ # list of available terminologies, use the ListTerminologies operation.
612
+ #
613
+ # @option params [required, String] :client_token
614
+ # The client token of the EC2 instance calling the request. This token
615
+ # is auto-generated when using the Amazon Translate SDK. Otherwise, use
616
+ # the
617
+ # [DescribeInstances](docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html)
618
+ # EC2 operation to retreive an instance's client token. For more
619
+ # information, see [Client
620
+ # Tokens](docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html#client-tokens)
621
+ # in the EC2 User Guide.
484
622
  #
485
- # * Indonesian (id)
623
+ # **A suitable default value is auto-generated.** You should normally
624
+ # not need to pass this option.**
486
625
  #
487
- # * Italian (it)
626
+ # @return [Types::StartTextTranslationJobResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
488
627
  #
489
- # * Japanese (ja)
628
+ # * {Types::StartTextTranslationJobResponse#job_id #job_id} => String
629
+ # * {Types::StartTextTranslationJobResponse#job_status #job_status} => String
490
630
  #
491
- # * Korean (ko)
631
+ # @example Request syntax with placeholder values
492
632
  #
493
- # * Polish (pl)
633
+ # resp = client.start_text_translation_job({
634
+ # job_name: "JobName",
635
+ # input_data_config: { # required
636
+ # s3_uri: "S3Uri", # required
637
+ # content_type: "ContentType", # required
638
+ # },
639
+ # output_data_config: { # required
640
+ # s3_uri: "S3Uri", # required
641
+ # },
642
+ # data_access_role_arn: "IamRoleArn", # required
643
+ # source_language_code: "LanguageCodeString", # required
644
+ # target_language_codes: ["LanguageCodeString"], # required
645
+ # terminology_names: ["ResourceName"],
646
+ # client_token: "ClientTokenString", # required
647
+ # })
494
648
  #
495
- # * Portuguese (pt)
649
+ # @example Response structure
496
650
  #
497
- # * Russian (ru)
651
+ # resp.job_id #=> String
652
+ # resp.job_status #=> String, one of "SUBMITTED", "IN_PROGRESS", "COMPLETED", "COMPLETED_WITH_ERROR", "FAILED", "STOP_REQUESTED", "STOPPED"
498
653
  #
499
- # * Spanish (es)
654
+ # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/StartTextTranslationJob AWS API Documentation
500
655
  #
501
- # * Swedish (sv)
656
+ # @overload start_text_translation_job(params = {})
657
+ # @param [Hash] params ({})
658
+ def start_text_translation_job(params = {}, options = {})
659
+ req = build_request(:start_text_translation_job, params)
660
+ req.send_request(options)
661
+ end
662
+
663
+ # Stops an asynchronous batch translation job that is in progress.
502
664
  #
503
- # * Turkish (tr)
665
+ # If the job's state is `IN_PROGRESS`, the job will be marked for
666
+ # termination and put into the `STOP_REQUESTED` state. If the job
667
+ # completes before it can be stopped, it is put into the `COMPLETED`
668
+ # state. Otherwise, the job is put into the `STOPPED` state.
504
669
  #
505
- # To have Amazon Translate determine the source language of your text,
506
- # you can specify `auto` in the `SourceLanguageCode` field. If you
507
- # specify `auto`, Amazon Translate will call Amazon Comprehend to
508
- # determine the source language.
670
+ # Asynchronous batch translation jobs are started with the
671
+ # StartTextTranslationJob operation. You can use the
672
+ # DescribeTextTranslationJob or ListTextTranslationJobs operations to
673
+ # get a batch translation job's `JobId`.
509
674
  #
675
+ # @option params [required, String] :job_id
676
+ # The job ID of the job to be stopped.
510
677
  #
678
+ # @return [Types::StopTextTranslationJobResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
511
679
  #
512
- # [1]: http://docs.aws.amazon.com/translate/latest/dg/pairs.html
680
+ # * {Types::StopTextTranslationJobResponse#job_id #job_id} => String
681
+ # * {Types::StopTextTranslationJobResponse#job_status #job_status} => String
682
+ #
683
+ # @example Request syntax with placeholder values
684
+ #
685
+ # resp = client.stop_text_translation_job({
686
+ # job_id: "JobId", # required
687
+ # })
688
+ #
689
+ # @example Response structure
690
+ #
691
+ # resp.job_id #=> String
692
+ # resp.job_status #=> String, one of "SUBMITTED", "IN_PROGRESS", "COMPLETED", "COMPLETED_WITH_ERROR", "FAILED", "STOP_REQUESTED", "STOPPED"
693
+ #
694
+ # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/StopTextTranslationJob AWS API Documentation
695
+ #
696
+ # @overload stop_text_translation_job(params = {})
697
+ # @param [Hash] params ({})
698
+ def stop_text_translation_job(params = {}, options = {})
699
+ req = build_request(:stop_text_translation_job, params)
700
+ req.send_request(options)
701
+ end
702
+
703
+ # Translates input text from the source language to the target language.
704
+ # For a list of available languages and language codes, see
705
+ # what-is-languages.
513
706
  #
514
707
  # @option params [required, String] :text
515
708
  # The text to translate. The text string can be a maximum of 5,000 bytes
@@ -517,18 +710,24 @@ module Aws::Translate
517
710
  # characters.
518
711
  #
519
712
  # @option params [Array<String>] :terminology_names
520
- # The TerminologyNames list that is taken as input to the TranslateText
521
- # request. This has a minimum length of 0 and a maximum length of 1.
713
+ # The name of the terminology list file to be used in the TranslateText
714
+ # request. You can use 1 terminology list at most in a `TranslateText`
715
+ # request. Terminology lists can contain a maximum of 256 terms.
522
716
  #
523
717
  # @option params [required, String] :source_language_code
524
718
  # The language code for the language of the source text. The language
525
- # must be a language supported by Amazon Translate.
719
+ # must be a language supported by Amazon Translate. For a list of
720
+ # language codes, see what-is-languages.
526
721
  #
527
722
  # To have Amazon Translate determine the source language of your text,
528
723
  # you can specify `auto` in the `SourceLanguageCode` field. If you
529
- # specify `auto`, Amazon Translate will call Amazon Comprehend to
724
+ # specify `auto`, Amazon Translate will call [Amazon Comprehend][1] to
530
725
  # determine the source language.
531
726
  #
727
+ #
728
+ #
729
+ # [1]: https://docs.aws.amazon.com/comprehend/latest/dg/comprehend-general.html
730
+ #
532
731
  # @option params [required, String] :target_language_code
533
732
  # The language code requested for the language of the target text. The
534
733
  # language must be a language supported by Amazon Translate.
@@ -582,7 +781,7 @@ module Aws::Translate
582
781
  params: params,
583
782
  config: config)
584
783
  context[:gem_name] = 'aws-sdk-translate'
585
- context[:gem_version] = '1.18.0'
784
+ context[:gem_version] = '1.19.0'
586
785
  Seahorse::Client::Request.new(handlers, context)
587
786
  end
588
787
 
@@ -14,7 +14,11 @@ module Aws::Translate
14
14
  AppliedTerminology = Shapes::StructureShape.new(name: 'AppliedTerminology')
15
15
  AppliedTerminologyList = Shapes::ListShape.new(name: 'AppliedTerminologyList')
16
16
  BoundedLengthString = Shapes::StringShape.new(name: 'BoundedLengthString')
17
+ ClientTokenString = Shapes::StringShape.new(name: 'ClientTokenString')
18
+ ContentType = Shapes::StringShape.new(name: 'ContentType')
17
19
  DeleteTerminologyRequest = Shapes::StructureShape.new(name: 'DeleteTerminologyRequest')
20
+ DescribeTextTranslationJobRequest = Shapes::StructureShape.new(name: 'DescribeTextTranslationJobRequest')
21
+ DescribeTextTranslationJobResponse = Shapes::StructureShape.new(name: 'DescribeTextTranslationJobResponse')
18
22
  Description = Shapes::StringShape.new(name: 'Description')
19
23
  DetectedLanguageLowConfidenceException = Shapes::StructureShape.new(name: 'DetectedLanguageLowConfidenceException')
20
24
  EncryptionKey = Shapes::StructureShape.new(name: 'EncryptionKey')
@@ -22,25 +26,41 @@ module Aws::Translate
22
26
  EncryptionKeyType = Shapes::StringShape.new(name: 'EncryptionKeyType')
23
27
  GetTerminologyRequest = Shapes::StructureShape.new(name: 'GetTerminologyRequest')
24
28
  GetTerminologyResponse = Shapes::StructureShape.new(name: 'GetTerminologyResponse')
29
+ IamRoleArn = Shapes::StringShape.new(name: 'IamRoleArn')
25
30
  ImportTerminologyRequest = Shapes::StructureShape.new(name: 'ImportTerminologyRequest')
26
31
  ImportTerminologyResponse = Shapes::StructureShape.new(name: 'ImportTerminologyResponse')
32
+ InputDataConfig = Shapes::StructureShape.new(name: 'InputDataConfig')
27
33
  Integer = Shapes::IntegerShape.new(name: 'Integer')
28
34
  InternalServerException = Shapes::StructureShape.new(name: 'InternalServerException')
35
+ InvalidFilterException = Shapes::StructureShape.new(name: 'InvalidFilterException')
29
36
  InvalidParameterValueException = Shapes::StructureShape.new(name: 'InvalidParameterValueException')
30
37
  InvalidRequestException = Shapes::StructureShape.new(name: 'InvalidRequestException')
38
+ JobDetails = Shapes::StructureShape.new(name: 'JobDetails')
39
+ JobId = Shapes::StringShape.new(name: 'JobId')
40
+ JobName = Shapes::StringShape.new(name: 'JobName')
41
+ JobStatus = Shapes::StringShape.new(name: 'JobStatus')
31
42
  LanguageCodeString = Shapes::StringShape.new(name: 'LanguageCodeString')
32
43
  LanguageCodeStringList = Shapes::ListShape.new(name: 'LanguageCodeStringList')
33
44
  LimitExceededException = Shapes::StructureShape.new(name: 'LimitExceededException')
34
45
  ListTerminologiesRequest = Shapes::StructureShape.new(name: 'ListTerminologiesRequest')
35
46
  ListTerminologiesResponse = Shapes::StructureShape.new(name: 'ListTerminologiesResponse')
47
+ ListTextTranslationJobsRequest = Shapes::StructureShape.new(name: 'ListTextTranslationJobsRequest')
48
+ ListTextTranslationJobsResponse = Shapes::StructureShape.new(name: 'ListTextTranslationJobsResponse')
36
49
  MaxResultsInteger = Shapes::IntegerShape.new(name: 'MaxResultsInteger')
37
50
  MergeStrategy = Shapes::StringShape.new(name: 'MergeStrategy')
38
51
  NextToken = Shapes::StringShape.new(name: 'NextToken')
52
+ OutputDataConfig = Shapes::StructureShape.new(name: 'OutputDataConfig')
39
53
  ResourceName = Shapes::StringShape.new(name: 'ResourceName')
40
54
  ResourceNameList = Shapes::ListShape.new(name: 'ResourceNameList')
41
55
  ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
56
+ S3Uri = Shapes::StringShape.new(name: 'S3Uri')
42
57
  ServiceUnavailableException = Shapes::StructureShape.new(name: 'ServiceUnavailableException')
58
+ StartTextTranslationJobRequest = Shapes::StructureShape.new(name: 'StartTextTranslationJobRequest')
59
+ StartTextTranslationJobResponse = Shapes::StructureShape.new(name: 'StartTextTranslationJobResponse')
60
+ StopTextTranslationJobRequest = Shapes::StructureShape.new(name: 'StopTextTranslationJobRequest')
61
+ StopTextTranslationJobResponse = Shapes::StructureShape.new(name: 'StopTextTranslationJobResponse')
43
62
  String = Shapes::StringShape.new(name: 'String')
63
+ TargetLanguageCodeStringList = Shapes::ListShape.new(name: 'TargetLanguageCodeStringList')
44
64
  Term = Shapes::StructureShape.new(name: 'Term')
45
65
  TermList = Shapes::ListShape.new(name: 'TermList')
46
66
  TerminologyArn = Shapes::StringShape.new(name: 'TerminologyArn')
@@ -51,10 +71,14 @@ module Aws::Translate
51
71
  TerminologyProperties = Shapes::StructureShape.new(name: 'TerminologyProperties')
52
72
  TerminologyPropertiesList = Shapes::ListShape.new(name: 'TerminologyPropertiesList')
53
73
  TextSizeLimitExceededException = Shapes::StructureShape.new(name: 'TextSizeLimitExceededException')
74
+ TextTranslationJobFilter = Shapes::StructureShape.new(name: 'TextTranslationJobFilter')
75
+ TextTranslationJobProperties = Shapes::StructureShape.new(name: 'TextTranslationJobProperties')
76
+ TextTranslationJobPropertiesList = Shapes::ListShape.new(name: 'TextTranslationJobPropertiesList')
54
77
  Timestamp = Shapes::TimestampShape.new(name: 'Timestamp')
55
78
  TooManyRequestsException = Shapes::StructureShape.new(name: 'TooManyRequestsException')
56
79
  TranslateTextRequest = Shapes::StructureShape.new(name: 'TranslateTextRequest')
57
80
  TranslateTextResponse = Shapes::StructureShape.new(name: 'TranslateTextResponse')
81
+ UnboundedLengthString = Shapes::StringShape.new(name: 'UnboundedLengthString')
58
82
  UnsupportedLanguagePairException = Shapes::StructureShape.new(name: 'UnsupportedLanguagePairException')
59
83
 
60
84
  AppliedTerminology.add_member(:name, Shapes::ShapeRef.new(shape: ResourceName, location_name: "Name"))
@@ -66,6 +90,12 @@ module Aws::Translate
66
90
  DeleteTerminologyRequest.add_member(:name, Shapes::ShapeRef.new(shape: ResourceName, required: true, location_name: "Name"))
67
91
  DeleteTerminologyRequest.struct_class = Types::DeleteTerminologyRequest
68
92
 
93
+ DescribeTextTranslationJobRequest.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, required: true, location_name: "JobId"))
94
+ DescribeTextTranslationJobRequest.struct_class = Types::DescribeTextTranslationJobRequest
95
+
96
+ DescribeTextTranslationJobResponse.add_member(:text_translation_job_properties, Shapes::ShapeRef.new(shape: TextTranslationJobProperties, location_name: "TextTranslationJobProperties"))
97
+ DescribeTextTranslationJobResponse.struct_class = Types::DescribeTextTranslationJobResponse
98
+
69
99
  DetectedLanguageLowConfidenceException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
70
100
  DetectedLanguageLowConfidenceException.add_member(:detected_language_code, Shapes::ShapeRef.new(shape: LanguageCodeString, location_name: "DetectedLanguageCode"))
71
101
  DetectedLanguageLowConfidenceException.struct_class = Types::DetectedLanguageLowConfidenceException
@@ -92,15 +122,27 @@ module Aws::Translate
92
122
  ImportTerminologyResponse.add_member(:terminology_properties, Shapes::ShapeRef.new(shape: TerminologyProperties, location_name: "TerminologyProperties"))
93
123
  ImportTerminologyResponse.struct_class = Types::ImportTerminologyResponse
94
124
 
125
+ InputDataConfig.add_member(:s3_uri, Shapes::ShapeRef.new(shape: S3Uri, required: true, location_name: "S3Uri"))
126
+ InputDataConfig.add_member(:content_type, Shapes::ShapeRef.new(shape: ContentType, required: true, location_name: "ContentType"))
127
+ InputDataConfig.struct_class = Types::InputDataConfig
128
+
95
129
  InternalServerException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
96
130
  InternalServerException.struct_class = Types::InternalServerException
97
131
 
132
+ InvalidFilterException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
133
+ InvalidFilterException.struct_class = Types::InvalidFilterException
134
+
98
135
  InvalidParameterValueException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
99
136
  InvalidParameterValueException.struct_class = Types::InvalidParameterValueException
100
137
 
101
138
  InvalidRequestException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
102
139
  InvalidRequestException.struct_class = Types::InvalidRequestException
103
140
 
141
+ JobDetails.add_member(:translated_documents_count, Shapes::ShapeRef.new(shape: Integer, location_name: "TranslatedDocumentsCount"))
142
+ JobDetails.add_member(:documents_with_errors_count, Shapes::ShapeRef.new(shape: Integer, location_name: "DocumentsWithErrorsCount"))
143
+ JobDetails.add_member(:input_documents_count, Shapes::ShapeRef.new(shape: Integer, location_name: "InputDocumentsCount"))
144
+ JobDetails.struct_class = Types::JobDetails
145
+
104
146
  LanguageCodeStringList.member = Shapes::ShapeRef.new(shape: LanguageCodeString)
105
147
 
106
148
  LimitExceededException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
@@ -114,6 +156,18 @@ module Aws::Translate
114
156
  ListTerminologiesResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "NextToken"))
115
157
  ListTerminologiesResponse.struct_class = Types::ListTerminologiesResponse
116
158
 
159
+ ListTextTranslationJobsRequest.add_member(:filter, Shapes::ShapeRef.new(shape: TextTranslationJobFilter, location_name: "Filter"))
160
+ ListTextTranslationJobsRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "NextToken"))
161
+ ListTextTranslationJobsRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxResultsInteger, location_name: "MaxResults"))
162
+ ListTextTranslationJobsRequest.struct_class = Types::ListTextTranslationJobsRequest
163
+
164
+ ListTextTranslationJobsResponse.add_member(:text_translation_job_properties_list, Shapes::ShapeRef.new(shape: TextTranslationJobPropertiesList, location_name: "TextTranslationJobPropertiesList"))
165
+ ListTextTranslationJobsResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "NextToken"))
166
+ ListTextTranslationJobsResponse.struct_class = Types::ListTextTranslationJobsResponse
167
+
168
+ OutputDataConfig.add_member(:s3_uri, Shapes::ShapeRef.new(shape: S3Uri, required: true, location_name: "S3Uri"))
169
+ OutputDataConfig.struct_class = Types::OutputDataConfig
170
+
117
171
  ResourceNameList.member = Shapes::ShapeRef.new(shape: ResourceName)
118
172
 
119
173
  ResourceNotFoundException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
@@ -122,6 +176,29 @@ module Aws::Translate
122
176
  ServiceUnavailableException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
123
177
  ServiceUnavailableException.struct_class = Types::ServiceUnavailableException
124
178
 
179
+ StartTextTranslationJobRequest.add_member(:job_name, Shapes::ShapeRef.new(shape: JobName, location_name: "JobName"))
180
+ StartTextTranslationJobRequest.add_member(:input_data_config, Shapes::ShapeRef.new(shape: InputDataConfig, required: true, location_name: "InputDataConfig"))
181
+ StartTextTranslationJobRequest.add_member(:output_data_config, Shapes::ShapeRef.new(shape: OutputDataConfig, required: true, location_name: "OutputDataConfig"))
182
+ StartTextTranslationJobRequest.add_member(:data_access_role_arn, Shapes::ShapeRef.new(shape: IamRoleArn, required: true, location_name: "DataAccessRoleArn"))
183
+ StartTextTranslationJobRequest.add_member(:source_language_code, Shapes::ShapeRef.new(shape: LanguageCodeString, required: true, location_name: "SourceLanguageCode"))
184
+ StartTextTranslationJobRequest.add_member(:target_language_codes, Shapes::ShapeRef.new(shape: TargetLanguageCodeStringList, required: true, location_name: "TargetLanguageCodes"))
185
+ StartTextTranslationJobRequest.add_member(:terminology_names, Shapes::ShapeRef.new(shape: ResourceNameList, location_name: "TerminologyNames"))
186
+ StartTextTranslationJobRequest.add_member(:client_token, Shapes::ShapeRef.new(shape: ClientTokenString, required: true, location_name: "ClientToken", metadata: {"idempotencyToken"=>true}))
187
+ StartTextTranslationJobRequest.struct_class = Types::StartTextTranslationJobRequest
188
+
189
+ StartTextTranslationJobResponse.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, location_name: "JobId"))
190
+ StartTextTranslationJobResponse.add_member(:job_status, Shapes::ShapeRef.new(shape: JobStatus, location_name: "JobStatus"))
191
+ StartTextTranslationJobResponse.struct_class = Types::StartTextTranslationJobResponse
192
+
193
+ StopTextTranslationJobRequest.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, required: true, location_name: "JobId"))
194
+ StopTextTranslationJobRequest.struct_class = Types::StopTextTranslationJobRequest
195
+
196
+ StopTextTranslationJobResponse.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, location_name: "JobId"))
197
+ StopTextTranslationJobResponse.add_member(:job_status, Shapes::ShapeRef.new(shape: JobStatus, location_name: "JobStatus"))
198
+ StopTextTranslationJobResponse.struct_class = Types::StopTextTranslationJobResponse
199
+
200
+ TargetLanguageCodeStringList.member = Shapes::ShapeRef.new(shape: LanguageCodeString)
201
+
125
202
  Term.add_member(:source_text, Shapes::ShapeRef.new(shape: String, location_name: "SourceText"))
126
203
  Term.add_member(:target_text, Shapes::ShapeRef.new(shape: String, location_name: "TargetText"))
127
204
  Term.struct_class = Types::Term
@@ -153,6 +230,29 @@ module Aws::Translate
153
230
  TextSizeLimitExceededException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
154
231
  TextSizeLimitExceededException.struct_class = Types::TextSizeLimitExceededException
155
232
 
233
+ TextTranslationJobFilter.add_member(:job_name, Shapes::ShapeRef.new(shape: JobName, location_name: "JobName"))
234
+ TextTranslationJobFilter.add_member(:job_status, Shapes::ShapeRef.new(shape: JobStatus, location_name: "JobStatus"))
235
+ TextTranslationJobFilter.add_member(:submitted_before_time, Shapes::ShapeRef.new(shape: Timestamp, location_name: "SubmittedBeforeTime"))
236
+ TextTranslationJobFilter.add_member(:submitted_after_time, Shapes::ShapeRef.new(shape: Timestamp, location_name: "SubmittedAfterTime"))
237
+ TextTranslationJobFilter.struct_class = Types::TextTranslationJobFilter
238
+
239
+ TextTranslationJobProperties.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, location_name: "JobId"))
240
+ TextTranslationJobProperties.add_member(:job_name, Shapes::ShapeRef.new(shape: JobName, location_name: "JobName"))
241
+ TextTranslationJobProperties.add_member(:job_status, Shapes::ShapeRef.new(shape: JobStatus, location_name: "JobStatus"))
242
+ TextTranslationJobProperties.add_member(:job_details, Shapes::ShapeRef.new(shape: JobDetails, location_name: "JobDetails"))
243
+ TextTranslationJobProperties.add_member(:source_language_code, Shapes::ShapeRef.new(shape: LanguageCodeString, location_name: "SourceLanguageCode"))
244
+ TextTranslationJobProperties.add_member(:target_language_codes, Shapes::ShapeRef.new(shape: TargetLanguageCodeStringList, location_name: "TargetLanguageCodes"))
245
+ TextTranslationJobProperties.add_member(:terminology_names, Shapes::ShapeRef.new(shape: ResourceNameList, location_name: "TerminologyNames"))
246
+ TextTranslationJobProperties.add_member(:message, Shapes::ShapeRef.new(shape: UnboundedLengthString, location_name: "Message"))
247
+ TextTranslationJobProperties.add_member(:submitted_time, Shapes::ShapeRef.new(shape: Timestamp, location_name: "SubmittedTime"))
248
+ TextTranslationJobProperties.add_member(:end_time, Shapes::ShapeRef.new(shape: Timestamp, location_name: "EndTime"))
249
+ TextTranslationJobProperties.add_member(:input_data_config, Shapes::ShapeRef.new(shape: InputDataConfig, location_name: "InputDataConfig"))
250
+ TextTranslationJobProperties.add_member(:output_data_config, Shapes::ShapeRef.new(shape: OutputDataConfig, location_name: "OutputDataConfig"))
251
+ TextTranslationJobProperties.add_member(:data_access_role_arn, Shapes::ShapeRef.new(shape: IamRoleArn, location_name: "DataAccessRoleArn"))
252
+ TextTranslationJobProperties.struct_class = Types::TextTranslationJobProperties
253
+
254
+ TextTranslationJobPropertiesList.member = Shapes::ShapeRef.new(shape: TextTranslationJobProperties)
255
+
156
256
  TooManyRequestsException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
157
257
  TooManyRequestsException.struct_class = Types::TooManyRequestsException
158
258
 
@@ -203,6 +303,17 @@ module Aws::Translate
203
303
  o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
204
304
  end)
205
305
 
306
+ api.add_operation(:describe_text_translation_job, Seahorse::Model::Operation.new.tap do |o|
307
+ o.name = "DescribeTextTranslationJob"
308
+ o.http_method = "POST"
309
+ o.http_request_uri = "/"
310
+ o.input = Shapes::ShapeRef.new(shape: DescribeTextTranslationJobRequest)
311
+ o.output = Shapes::ShapeRef.new(shape: DescribeTextTranslationJobResponse)
312
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
313
+ o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
314
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
315
+ end)
316
+
206
317
  api.add_operation(:get_terminology, Seahorse::Model::Operation.new.tap do |o|
207
318
  o.name = "GetTerminology"
208
319
  o.http_method = "POST"
@@ -236,6 +347,54 @@ module Aws::Translate
236
347
  o.errors << Shapes::ShapeRef.new(shape: InvalidParameterValueException)
237
348
  o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
238
349
  o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
350
+ o[:pager] = Aws::Pager.new(
351
+ limit_key: "max_results",
352
+ tokens: {
353
+ "next_token" => "next_token"
354
+ }
355
+ )
356
+ end)
357
+
358
+ api.add_operation(:list_text_translation_jobs, Seahorse::Model::Operation.new.tap do |o|
359
+ o.name = "ListTextTranslationJobs"
360
+ o.http_method = "POST"
361
+ o.http_request_uri = "/"
362
+ o.input = Shapes::ShapeRef.new(shape: ListTextTranslationJobsRequest)
363
+ o.output = Shapes::ShapeRef.new(shape: ListTextTranslationJobsResponse)
364
+ o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
365
+ o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
366
+ o.errors << Shapes::ShapeRef.new(shape: InvalidFilterException)
367
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
368
+ o[:pager] = Aws::Pager.new(
369
+ limit_key: "max_results",
370
+ tokens: {
371
+ "next_token" => "next_token"
372
+ }
373
+ )
374
+ end)
375
+
376
+ api.add_operation(:start_text_translation_job, Seahorse::Model::Operation.new.tap do |o|
377
+ o.name = "StartTextTranslationJob"
378
+ o.http_method = "POST"
379
+ o.http_request_uri = "/"
380
+ o.input = Shapes::ShapeRef.new(shape: StartTextTranslationJobRequest)
381
+ o.output = Shapes::ShapeRef.new(shape: StartTextTranslationJobResponse)
382
+ o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
383
+ o.errors << Shapes::ShapeRef.new(shape: UnsupportedLanguagePairException)
384
+ o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
385
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
386
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
387
+ end)
388
+
389
+ api.add_operation(:stop_text_translation_job, Seahorse::Model::Operation.new.tap do |o|
390
+ o.name = "StopTextTranslationJob"
391
+ o.http_method = "POST"
392
+ o.http_request_uri = "/"
393
+ o.input = Shapes::ShapeRef.new(shape: StopTextTranslationJobRequest)
394
+ o.output = Shapes::ShapeRef.new(shape: StopTextTranslationJobResponse)
395
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
396
+ o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
397
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
239
398
  end)
240
399
 
241
400
  api.add_operation(:translate_text, Seahorse::Model::Operation.new.tap do |o|
@@ -47,6 +47,22 @@ module Aws::Translate
47
47
 
48
48
  end
49
49
 
50
+ class InvalidFilterException < ServiceError
51
+
52
+ # @param [Seahorse::Client::RequestContext] context
53
+ # @param [String] message
54
+ # @param [Aws::Translate::Types::InvalidFilterException] data
55
+ def initialize(context, message, data = Aws::EmptyStructure.new)
56
+ super(context, message, data)
57
+ end
58
+
59
+ # @return [String]
60
+ def message
61
+ @message || @data[:message]
62
+ end
63
+
64
+ end
65
+
50
66
  class InvalidParameterValueException < ServiceError
51
67
 
52
68
  # @param [Seahorse::Client::RequestContext] context
@@ -52,6 +52,38 @@ module Aws::Translate
52
52
  include Aws::Structure
53
53
  end
54
54
 
55
+ # @note When making an API call, you may pass DescribeTextTranslationJobRequest
56
+ # data as a hash:
57
+ #
58
+ # {
59
+ # job_id: "JobId", # required
60
+ # }
61
+ #
62
+ # @!attribute [rw] job_id
63
+ # The identifier that Amazon Translate generated for the job. The
64
+ # StartTextTranslationJob operation returns this identifier in its
65
+ # response.
66
+ # @return [String]
67
+ #
68
+ # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/DescribeTextTranslationJobRequest AWS API Documentation
69
+ #
70
+ class DescribeTextTranslationJobRequest < Struct.new(
71
+ :job_id)
72
+ include Aws::Structure
73
+ end
74
+
75
+ # @!attribute [rw] text_translation_job_properties
76
+ # An object that contains the properties associated with an
77
+ # asynchronous batch translation job.
78
+ # @return [Types::TextTranslationJobProperties]
79
+ #
80
+ # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/DescribeTextTranslationJobResponse AWS API Documentation
81
+ #
82
+ class DescribeTextTranslationJobResponse < Struct.new(
83
+ :text_translation_job_properties)
84
+ include Aws::Structure
85
+ end
86
+
55
87
  # The confidence that Amazon Comprehend accurately detected the source
56
88
  # language is low. If a low confidence level is acceptable for your
57
89
  # application, you can use the language in the exception to call Amazon
@@ -213,6 +245,37 @@ module Aws::Translate
213
245
  include Aws::Structure
214
246
  end
215
247
 
248
+ # The input configuration properties for requesting a batch translation
249
+ # job.
250
+ #
251
+ # @note When making an API call, you may pass InputDataConfig
252
+ # data as a hash:
253
+ #
254
+ # {
255
+ # s3_uri: "S3Uri", # required
256
+ # content_type: "ContentType", # required
257
+ # }
258
+ #
259
+ # @!attribute [rw] s3_uri
260
+ # The URI of the AWS S3 folder that contains the input file. The
261
+ # folder must be in the same Region as the API endpoint you are
262
+ # calling.
263
+ # @return [String]
264
+ #
265
+ # @!attribute [rw] content_type
266
+ # The multipurpose internet mail extension (MIME) type of the input
267
+ # files. Valid values are `text/plain` for plaintext files and
268
+ # `text/html` for HTML files.
269
+ # @return [String]
270
+ #
271
+ # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/InputDataConfig AWS API Documentation
272
+ #
273
+ class InputDataConfig < Struct.new(
274
+ :s3_uri,
275
+ :content_type)
276
+ include Aws::Structure
277
+ end
278
+
216
279
  # An internal server error occurred. Retry your request.
217
280
  #
218
281
  # @!attribute [rw] message
@@ -225,6 +288,19 @@ module Aws::Translate
225
288
  include Aws::Structure
226
289
  end
227
290
 
291
+ # The filter specified for the operation is invalid. Specify a different
292
+ # filter.
293
+ #
294
+ # @!attribute [rw] message
295
+ # @return [String]
296
+ #
297
+ # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/InvalidFilterException AWS API Documentation
298
+ #
299
+ class InvalidFilterException < Struct.new(
300
+ :message)
301
+ include Aws::Structure
302
+ end
303
+
228
304
  # The value of the parameter is invalid. Review the value of the
229
305
  # parameter you are using to correct it, and then retry your operation.
230
306
  #
@@ -251,6 +327,32 @@ module Aws::Translate
251
327
  include Aws::Structure
252
328
  end
253
329
 
330
+ # The number of documents successfully and unsuccessfully processed
331
+ # during a translation job.
332
+ #
333
+ # @!attribute [rw] translated_documents_count
334
+ # The number of documents successfully processed during a translation
335
+ # job.
336
+ # @return [Integer]
337
+ #
338
+ # @!attribute [rw] documents_with_errors_count
339
+ # The number of documents that could not be processed during a
340
+ # translation job.
341
+ # @return [Integer]
342
+ #
343
+ # @!attribute [rw] input_documents_count
344
+ # The number of documents used as input in a translation job.
345
+ # @return [Integer]
346
+ #
347
+ # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/JobDetails AWS API Documentation
348
+ #
349
+ class JobDetails < Struct.new(
350
+ :translated_documents_count,
351
+ :documents_with_errors_count,
352
+ :input_documents_count)
353
+ include Aws::Structure
354
+ end
355
+
254
356
  # The specified limit has been exceeded. Review your request and retry
255
357
  # it with a quantity below the stated limit.
256
358
  #
@@ -309,9 +411,86 @@ module Aws::Translate
309
411
  include Aws::Structure
310
412
  end
311
413
 
414
+ # @note When making an API call, you may pass ListTextTranslationJobsRequest
415
+ # data as a hash:
416
+ #
417
+ # {
418
+ # filter: {
419
+ # job_name: "JobName",
420
+ # job_status: "SUBMITTED", # accepts SUBMITTED, IN_PROGRESS, COMPLETED, COMPLETED_WITH_ERROR, FAILED, STOP_REQUESTED, STOPPED
421
+ # submitted_before_time: Time.now,
422
+ # submitted_after_time: Time.now,
423
+ # },
424
+ # next_token: "NextToken",
425
+ # max_results: 1,
426
+ # }
427
+ #
428
+ # @!attribute [rw] filter
429
+ # The parameters that specify which batch translation jobs to
430
+ # retrieve. Filters include job name, job status, and submission time.
431
+ # You can only set one filter at a time.
432
+ # @return [Types::TextTranslationJobFilter]
433
+ #
434
+ # @!attribute [rw] next_token
435
+ # The token to request the next page of results.
436
+ # @return [String]
437
+ #
438
+ # @!attribute [rw] max_results
439
+ # The maximum number of results to return in each page. The default
440
+ # value is 100.
441
+ # @return [Integer]
442
+ #
443
+ # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/ListTextTranslationJobsRequest AWS API Documentation
444
+ #
445
+ class ListTextTranslationJobsRequest < Struct.new(
446
+ :filter,
447
+ :next_token,
448
+ :max_results)
449
+ include Aws::Structure
450
+ end
451
+
452
+ # @!attribute [rw] text_translation_job_properties_list
453
+ # A list containing the properties of each job that is returned.
454
+ # @return [Array<Types::TextTranslationJobProperties>]
455
+ #
456
+ # @!attribute [rw] next_token
457
+ # The token to use to retreive the next page of results. This value is
458
+ # `null` when there are no more results to return.
459
+ # @return [String]
460
+ #
461
+ # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/ListTextTranslationJobsResponse AWS API Documentation
462
+ #
463
+ class ListTextTranslationJobsResponse < Struct.new(
464
+ :text_translation_job_properties_list,
465
+ :next_token)
466
+ include Aws::Structure
467
+ end
468
+
469
+ # The output configuration properties for a batch translation job.
470
+ #
471
+ # @note When making an API call, you may pass OutputDataConfig
472
+ # data as a hash:
473
+ #
474
+ # {
475
+ # s3_uri: "S3Uri", # required
476
+ # }
477
+ #
478
+ # @!attribute [rw] s3_uri
479
+ # The URI of the S3 folder that contains a translation job's output
480
+ # file. The folder must be in the same Region as the API endpoint that
481
+ # you are calling.
482
+ # @return [String]
483
+ #
484
+ # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/OutputDataConfig AWS API Documentation
485
+ #
486
+ class OutputDataConfig < Struct.new(
487
+ :s3_uri)
488
+ include Aws::Structure
489
+ end
490
+
312
491
  # The resource you are looking for has not been found. Review the
313
492
  # resource you're looking for and see if a different resource will
314
- # accomplish your needs before retrying the revised request. .
493
+ # accomplish your needs before retrying the revised request.
315
494
  #
316
495
  # @!attribute [rw] message
317
496
  # @return [String]
@@ -336,6 +515,162 @@ module Aws::Translate
336
515
  include Aws::Structure
337
516
  end
338
517
 
518
+ # @note When making an API call, you may pass StartTextTranslationJobRequest
519
+ # data as a hash:
520
+ #
521
+ # {
522
+ # job_name: "JobName",
523
+ # input_data_config: { # required
524
+ # s3_uri: "S3Uri", # required
525
+ # content_type: "ContentType", # required
526
+ # },
527
+ # output_data_config: { # required
528
+ # s3_uri: "S3Uri", # required
529
+ # },
530
+ # data_access_role_arn: "IamRoleArn", # required
531
+ # source_language_code: "LanguageCodeString", # required
532
+ # target_language_codes: ["LanguageCodeString"], # required
533
+ # terminology_names: ["ResourceName"],
534
+ # client_token: "ClientTokenString", # required
535
+ # }
536
+ #
537
+ # @!attribute [rw] job_name
538
+ # The name of the batch translation job to be performed.
539
+ # @return [String]
540
+ #
541
+ # @!attribute [rw] input_data_config
542
+ # Specifies the format and S3 location of the input documents for the
543
+ # translation job.
544
+ # @return [Types::InputDataConfig]
545
+ #
546
+ # @!attribute [rw] output_data_config
547
+ # Specifies the S3 folder to which your job output will be saved.
548
+ # @return [Types::OutputDataConfig]
549
+ #
550
+ # @!attribute [rw] data_access_role_arn
551
+ # The Amazon Resource Name (ARN) of an AWS Identity Access and
552
+ # Management (IAM) role that grants Amazon Translate read access to
553
+ # your input data. For more nformation, see
554
+ # identity-and-access-management.
555
+ # @return [String]
556
+ #
557
+ # @!attribute [rw] source_language_code
558
+ # The language code of the input language. For a list of language
559
+ # codes, see what-is-languages.
560
+ #
561
+ # Amazon Translate does not automatically detect a source language
562
+ # during batch translation jobs.
563
+ # @return [String]
564
+ #
565
+ # @!attribute [rw] target_language_codes
566
+ # The language code of the output language.
567
+ # @return [Array<String>]
568
+ #
569
+ # @!attribute [rw] terminology_names
570
+ # The name of the terminology to use in the batch translation job. For
571
+ # a list of available terminologies, use the ListTerminologies
572
+ # operation.
573
+ # @return [Array<String>]
574
+ #
575
+ # @!attribute [rw] client_token
576
+ # The client token of the EC2 instance calling the request. This token
577
+ # is auto-generated when using the Amazon Translate SDK. Otherwise,
578
+ # use the
579
+ # [DescribeInstances](docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html)
580
+ # EC2 operation to retreive an instance's client token. For more
581
+ # information, see [Client
582
+ # Tokens](docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html#client-tokens)
583
+ # in the EC2 User Guide.
584
+ #
585
+ # **A suitable default value is auto-generated.** You should normally
586
+ # not need to pass this option.
587
+ # @return [String]
588
+ #
589
+ # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/StartTextTranslationJobRequest AWS API Documentation
590
+ #
591
+ class StartTextTranslationJobRequest < Struct.new(
592
+ :job_name,
593
+ :input_data_config,
594
+ :output_data_config,
595
+ :data_access_role_arn,
596
+ :source_language_code,
597
+ :target_language_codes,
598
+ :terminology_names,
599
+ :client_token)
600
+ include Aws::Structure
601
+ end
602
+
603
+ # @!attribute [rw] job_id
604
+ # The identifier generated for the job. To get the status of a job,
605
+ # use this ID with the DescribeTextTranslationJob operation.
606
+ # @return [String]
607
+ #
608
+ # @!attribute [rw] job_status
609
+ # The status of the job. Possible values include:
610
+ #
611
+ # * `SUBMITTED` - The job has been received and is queued for
612
+ # processing.
613
+ #
614
+ # * `IN_PROGRESS` - Amazon Translate is processing the job.
615
+ #
616
+ # * `COMPLETED` - The job was successfully completed and the output is
617
+ # available.
618
+ #
619
+ # * `COMPLETED_WITH_ERRORS` - The job was completed with errors. The
620
+ # errors can be analyzed in the job's output.
621
+ #
622
+ # * `FAILED` - The job did not complete. To get details, use the
623
+ # DescribeTextTranslationJob operation.
624
+ #
625
+ # * `STOP_REQUESTED` - The user who started the job has requested that
626
+ # it be stopped.
627
+ #
628
+ # * `STOPPED` - The job has been stopped.
629
+ # @return [String]
630
+ #
631
+ # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/StartTextTranslationJobResponse AWS API Documentation
632
+ #
633
+ class StartTextTranslationJobResponse < Struct.new(
634
+ :job_id,
635
+ :job_status)
636
+ include Aws::Structure
637
+ end
638
+
639
+ # @note When making an API call, you may pass StopTextTranslationJobRequest
640
+ # data as a hash:
641
+ #
642
+ # {
643
+ # job_id: "JobId", # required
644
+ # }
645
+ #
646
+ # @!attribute [rw] job_id
647
+ # The job ID of the job to be stopped.
648
+ # @return [String]
649
+ #
650
+ # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/StopTextTranslationJobRequest AWS API Documentation
651
+ #
652
+ class StopTextTranslationJobRequest < Struct.new(
653
+ :job_id)
654
+ include Aws::Structure
655
+ end
656
+
657
+ # @!attribute [rw] job_id
658
+ # The job ID of the stopped batch translation job.
659
+ # @return [String]
660
+ #
661
+ # @!attribute [rw] job_status
662
+ # The status of the designated job. Upon successful completion, the
663
+ # job's status will be `STOPPED`.
664
+ # @return [String]
665
+ #
666
+ # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/StopTextTranslationJobResponse AWS API Documentation
667
+ #
668
+ class StopTextTranslationJobResponse < Struct.new(
669
+ :job_id,
670
+ :job_status)
671
+ include Aws::Structure
672
+ end
673
+
339
674
  # The term being translated by the custom terminology.
340
675
  #
341
676
  # @!attribute [rw] source_text
@@ -367,7 +702,10 @@ module Aws::Translate
367
702
  # }
368
703
  #
369
704
  # @!attribute [rw] file
370
- # The file containing the custom terminology data.
705
+ # The file containing the custom terminology data. Your version of the
706
+ # AWS SDK performs a Base64-encoding on this field before sending a
707
+ # request to the AWS service. Users of the SDK should not perform
708
+ # Base64-encoding themselves.
371
709
  # @return [String]
372
710
  #
373
711
  # @!attribute [rw] format
@@ -477,6 +815,134 @@ module Aws::Translate
477
815
  include Aws::Structure
478
816
  end
479
817
 
818
+ # Provides information for filtering a list of translation jobs. For
819
+ # more information, see ListTextTranslationJobs.
820
+ #
821
+ # @note When making an API call, you may pass TextTranslationJobFilter
822
+ # data as a hash:
823
+ #
824
+ # {
825
+ # job_name: "JobName",
826
+ # job_status: "SUBMITTED", # accepts SUBMITTED, IN_PROGRESS, COMPLETED, COMPLETED_WITH_ERROR, FAILED, STOP_REQUESTED, STOPPED
827
+ # submitted_before_time: Time.now,
828
+ # submitted_after_time: Time.now,
829
+ # }
830
+ #
831
+ # @!attribute [rw] job_name
832
+ # Filters the list of jobs by name.
833
+ # @return [String]
834
+ #
835
+ # @!attribute [rw] job_status
836
+ # Filters the list of jobs based by job status.
837
+ # @return [String]
838
+ #
839
+ # @!attribute [rw] submitted_before_time
840
+ # Filters the list of jobs based on the time that the job was
841
+ # submitted for processing and returns only the jobs submitted before
842
+ # the specified time. Jobs are returned in ascending order, oldest to
843
+ # newest.
844
+ # @return [Time]
845
+ #
846
+ # @!attribute [rw] submitted_after_time
847
+ # Filters the list of jobs based on the time that the job was
848
+ # submitted for processing and returns only the jobs submitted after
849
+ # the specified time. Jobs are returned in descending order, newest to
850
+ # oldest.
851
+ # @return [Time]
852
+ #
853
+ # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/TextTranslationJobFilter AWS API Documentation
854
+ #
855
+ class TextTranslationJobFilter < Struct.new(
856
+ :job_name,
857
+ :job_status,
858
+ :submitted_before_time,
859
+ :submitted_after_time)
860
+ include Aws::Structure
861
+ end
862
+
863
+ # Provides information about a translation job.
864
+ #
865
+ # @!attribute [rw] job_id
866
+ # The ID of the translation job.
867
+ # @return [String]
868
+ #
869
+ # @!attribute [rw] job_name
870
+ # The user-defined name of the translation job.
871
+ # @return [String]
872
+ #
873
+ # @!attribute [rw] job_status
874
+ # The status of the translation job.
875
+ # @return [String]
876
+ #
877
+ # @!attribute [rw] job_details
878
+ # The number of documents successfully and unsuccessfully processed
879
+ # during the translation job.
880
+ # @return [Types::JobDetails]
881
+ #
882
+ # @!attribute [rw] source_language_code
883
+ # The language code of the language of the source text. The language
884
+ # must be a language supported by Amazon Translate.
885
+ # @return [String]
886
+ #
887
+ # @!attribute [rw] target_language_codes
888
+ # The language code of the language of the target text. The language
889
+ # must be a language supported by Amazon Translate.
890
+ # @return [Array<String>]
891
+ #
892
+ # @!attribute [rw] terminology_names
893
+ # A list containing the names of the terminologies applied to a
894
+ # translation job. Only one terminology can be applied per
895
+ # StartTextTranslationJob request at this time.
896
+ # @return [Array<String>]
897
+ #
898
+ # @!attribute [rw] message
899
+ # An explanation of any errors that may have occured during the
900
+ # translation job.
901
+ # @return [String]
902
+ #
903
+ # @!attribute [rw] submitted_time
904
+ # The time at which the translation job was submitted.
905
+ # @return [Time]
906
+ #
907
+ # @!attribute [rw] end_time
908
+ # The time at which the translation job ended.
909
+ # @return [Time]
910
+ #
911
+ # @!attribute [rw] input_data_config
912
+ # The input configuration properties that were specified when the job
913
+ # was requested.
914
+ # @return [Types::InputDataConfig]
915
+ #
916
+ # @!attribute [rw] output_data_config
917
+ # The output configuration properties that were specified when the job
918
+ # was requested.
919
+ # @return [Types::OutputDataConfig]
920
+ #
921
+ # @!attribute [rw] data_access_role_arn
922
+ # The Amazon Resource Name (ARN) of an AWS Identity Access and
923
+ # Management (IAM) role that granted Amazon Translate read access to
924
+ # the job's input data.
925
+ # @return [String]
926
+ #
927
+ # @see http://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/TextTranslationJobProperties AWS API Documentation
928
+ #
929
+ class TextTranslationJobProperties < Struct.new(
930
+ :job_id,
931
+ :job_name,
932
+ :job_status,
933
+ :job_details,
934
+ :source_language_code,
935
+ :target_language_codes,
936
+ :terminology_names,
937
+ :message,
938
+ :submitted_time,
939
+ :end_time,
940
+ :input_data_config,
941
+ :output_data_config,
942
+ :data_access_role_arn)
943
+ include Aws::Structure
944
+ end
945
+
480
946
  # You have made too many requests within a short period of time. Wait
481
947
  # for a short time and then try your request again.
482
948
  #
@@ -507,19 +973,25 @@ module Aws::Translate
507
973
  # @return [String]
508
974
  #
509
975
  # @!attribute [rw] terminology_names
510
- # The TerminologyNames list that is taken as input to the
511
- # TranslateText request. This has a minimum length of 0 and a maximum
512
- # length of 1.
976
+ # The name of the terminology list file to be used in the
977
+ # TranslateText request. You can use 1 terminology list at most in a
978
+ # `TranslateText` request. Terminology lists can contain a maximum of
979
+ # 256 terms.
513
980
  # @return [Array<String>]
514
981
  #
515
982
  # @!attribute [rw] source_language_code
516
983
  # The language code for the language of the source text. The language
517
- # must be a language supported by Amazon Translate.
984
+ # must be a language supported by Amazon Translate. For a list of
985
+ # language codes, see what-is-languages.
518
986
  #
519
987
  # To have Amazon Translate determine the source language of your text,
520
988
  # you can specify `auto` in the `SourceLanguageCode` field. If you
521
- # specify `auto`, Amazon Translate will call Amazon Comprehend to
989
+ # specify `auto`, Amazon Translate will call [Amazon Comprehend][1] to
522
990
  # determine the source language.
991
+ #
992
+ #
993
+ #
994
+ # [1]: https://docs.aws.amazon.com/comprehend/latest/dg/comprehend-general.html
523
995
  # @return [String]
524
996
  #
525
997
  # @!attribute [rw] target_language_code
@@ -538,7 +1010,7 @@ module Aws::Translate
538
1010
  end
539
1011
 
540
1012
  # @!attribute [rw] translated_text
541
- # The the translated text. The maximum length of this text is 5kb.
1013
+ # The translated text.
542
1014
  # @return [String]
543
1015
  #
544
1016
  # @!attribute [rw] source_language_code
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-translate
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.18.0
4
+ version: 1.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-23 00:00:00.000000000 Z
11
+ date: 2020-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core