google-cloud-translate-v3 0.5.2 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8ef235e837f5215349b30969748a291103abc5ebb3155577daf2bc6e580464e
4
- data.tar.gz: fef3eb56aee6d13fa6f670cf9b11a397ec40a726231e3cafe0ce1efba9eff5e2
3
+ metadata.gz: 33372dd6501c9fe6e451d60c565c8bcd64344f2f1df8e9f405d90cf9f176e102
4
+ data.tar.gz: 42824b612fa260da46291defafe29d98d845b4d620344fc30c9019223549c5e1
5
5
  SHA512:
6
- metadata.gz: f0cc7816eb5bc6203f76ecac7f6e6046793349bf67a76442d61633865302dae8257497428cf9cf3f4d443b62a86e5a4b5de27d4ae954a11a07f22f52de0add2e
7
- data.tar.gz: 93d6e02df36bab362b12df679718e27da50e3d35cfcf1846795b1e1cfbb9a647efb9ae486a3ebb44ce268a35882ded8b9238ec9cc3ac9962c30c5c9c9618ee20
6
+ metadata.gz: 38a8b216b0a9d3ae29f704b05fa2135b1cd483411030d565fc52481c55c8ddf5072efed968efb83e909f1cd6932de5df7c5530d7200fac3354ff780cb4ddaf3e
7
+ data.tar.gz: '075179c740268f59965a56883090c1e6bbe7eccbdc1b184ef93c75fa115d42ee96810677812c4b6f418bbcc6a9c4f6374537e4360fc3a37a009e174495f6fa39'
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/translate/v3/translation_service/rest"
20
+ require "google/cloud/translate/v3/version"
21
+
22
+ module Google
23
+ module Cloud
24
+ module Translate
25
+ ##
26
+ # To load just the REST part of this package, including all its services, and instantiate a REST client:
27
+ #
28
+ # @example
29
+ #
30
+ # require "google/cloud/translate/v3/rest"
31
+ # client = ::Google::Cloud::Translate::V3::TranslationService::Rest::Client.new
32
+ #
33
+ module V3
34
+ end
35
+ end
36
+ end
37
+ end
@@ -209,20 +209,19 @@ module Google
209
209
  #
210
210
  # @param contents [::Array<::String>]
211
211
  # Required. The content of the input in string format.
212
- # We recommend the total content be less than 30k codepoints. The max length
213
- # of this field is 1024.
214
- # Use BatchTranslateText for larger text.
212
+ # We recommend the total content be less than 30,000 codepoints. The max
213
+ # length of this field is 1024. Use BatchTranslateText for larger text.
215
214
  # @param mime_type [::String]
216
215
  # Optional. The format of the source text, for example, "text/html",
217
216
  # "text/plain". If left blank, the MIME type defaults to "text/html".
218
217
  # @param source_language_code [::String]
219
- # Optional. The BCP-47 language code of the input text if
218
+ # Optional. The ISO-639 language code of the input text if
220
219
  # known, for example, "en-US" or "sr-Latn". Supported language codes are
221
220
  # listed in Language Support. If the source language isn't specified, the API
222
221
  # attempts to identify the source language automatically and returns the
223
222
  # source language within the response.
224
223
  # @param target_language_code [::String]
225
- # Required. The BCP-47 language code to use for translation of the input
224
+ # Required. The ISO-639 language code to use for translation of the input
226
225
  # text, set to one of the language codes listed in Language Support.
227
226
  # @param parent [::String]
228
227
  # Required. Project or location to make a call. Must refer to a caller's
@@ -583,7 +582,7 @@ module Google
583
582
  # @param options [::Gapic::CallOptions, ::Hash]
584
583
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
585
584
  #
586
- # @overload translate_document(parent: nil, source_language_code: nil, target_language_code: nil, document_input_config: nil, document_output_config: nil, model: nil, glossary_config: nil, labels: nil)
585
+ # @overload translate_document(parent: nil, source_language_code: nil, target_language_code: nil, document_input_config: nil, document_output_config: nil, model: nil, glossary_config: nil, labels: nil, customized_attribution: nil, is_translate_native_pdf_only: nil, enable_shadow_removal_native_pdf: nil)
587
586
  # Pass arguments to `translate_document` via keyword arguments. Note that at
588
587
  # least one keyword argument is required. To specify no parameters, or to keep all
589
588
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -602,14 +601,14 @@ module Google
602
601
  # Models and glossaries must be within the same region (have the same
603
602
  # location-id), otherwise an INVALID_ARGUMENT (400) error is returned.
604
603
  # @param source_language_code [::String]
605
- # Optional. The BCP-47 language code of the input document if known, for
604
+ # Optional. The ISO-639 language code of the input document if known, for
606
605
  # example, "en-US" or "sr-Latn". Supported language codes are listed in
607
606
  # Language Support. If the source language isn't specified, the API attempts
608
607
  # to identify the source language automatically and returns the source
609
608
  # language within the response. Source language must be specified if the
610
609
  # request contains a glossary or a custom model.
611
610
  # @param target_language_code [::String]
612
- # Required. The BCP-47 language code to use for translation of the input
611
+ # Required. The ISO-639 language code to use for translation of the input
613
612
  # document, set to one of the language codes listed in Language Support.
614
613
  # @param document_input_config [::Google::Cloud::Translate::V3::DocumentInputConfig, ::Hash]
615
614
  # Required. Input configurations.
@@ -647,6 +646,19 @@ module Google
647
646
  #
648
647
  # See https://cloud.google.com/translate/docs/advanced/labels for more
649
648
  # information.
649
+ # @param customized_attribution [::String]
650
+ # Optional. This flag is to support user customized attribution.
651
+ # If not provided, the default is `Machine Translated by Google`.
652
+ # Customized attribution should follow rules in
653
+ # https://cloud.google.com/translate/attribution#attribution_and_logos
654
+ # @param is_translate_native_pdf_only [::Boolean]
655
+ # Optional. If true, the page limit of online native pdf translation is 300
656
+ # and only native pdf pages will be translated.
657
+ # @param enable_shadow_removal_native_pdf [::Boolean]
658
+ # Optional. If true, use the text removal to remove the shadow text on
659
+ # background image for native pdf translation.
660
+ # Shadow removal feature can only be enabled when
661
+ # is_translate_native_pdf_only is false
650
662
  #
651
663
  # @yield [response, operation] Access the result along with the RPC operation
652
664
  # @yieldparam response [::Google::Cloud::Translate::V3::TranslateDocumentResponse]
@@ -880,7 +892,7 @@ module Google
880
892
  # @param options [::Gapic::CallOptions, ::Hash]
881
893
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
882
894
  #
883
- # @overload batch_translate_document(parent: nil, source_language_code: nil, target_language_codes: nil, input_configs: nil, output_config: nil, models: nil, glossaries: nil, format_conversions: nil)
895
+ # @overload batch_translate_document(parent: nil, source_language_code: nil, target_language_codes: nil, input_configs: nil, output_config: nil, models: nil, glossaries: nil, format_conversions: nil, customized_attribution: nil)
884
896
  # Pass arguments to `batch_translate_document` via keyword arguments. Note that at
885
897
  # least one keyword argument is required. To specify no parameters, or to keep all
886
898
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -896,11 +908,11 @@ module Google
896
908
  # the same location-id) can be used, otherwise an INVALID_ARGUMENT (400)
897
909
  # error is returned.
898
910
  # @param source_language_code [::String]
899
- # Required. The BCP-47 language code of the input document if known, for
911
+ # Required. The ISO-639 language code of the input document if known, for
900
912
  # example, "en-US" or "sr-Latn". Supported language codes are listed in
901
- # Language Support (https://cloud.google.com/translate/docs/languages).
913
+ # [Language Support](https://cloud.google.com/translate/docs/languages).
902
914
  # @param target_language_codes [::Array<::String>]
903
- # Required. The BCP-47 language code to use for translation of the input
915
+ # Required. The ISO-639 language code to use for translation of the input
904
916
  # document. Specify up to 10 language codes here.
905
917
  # @param input_configs [::Array<::Google::Cloud::Translate::V3::BatchDocumentInputConfig, ::Hash>]
906
918
  # Required. Input configurations.
@@ -940,6 +952,11 @@ module Google
940
952
  #
941
953
  # If nothing specified, output files will be in the same format as the
942
954
  # original file.
955
+ # @param customized_attribution [::String]
956
+ # Optional. This flag is to support user customized attribution.
957
+ # If not provided, the default is `Machine Translated by Google`.
958
+ # Customized attribution should follow rules in
959
+ # https://cloud.google.com/translate/attribution#attribution_and_logos
943
960
  #
944
961
  # @yield [response, operation] Access the result along with the RPC operation
945
962
  # @yieldparam response [::Gapic::Operation]