google-cloud-translate-v3 0.5.2 → 0.7.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: 18dc76bc75c474fe8cc70cc9dee0d3cf77addd41537cfe4077ca8425a44eb056
4
+ data.tar.gz: ee253237e5a14f65bc9de241685b096336477625bae6e90f7e1e82f9352f9e60
5
5
  SHA512:
6
- metadata.gz: f0cc7816eb5bc6203f76ecac7f6e6046793349bf67a76442d61633865302dae8257497428cf9cf3f4d443b62a86e5a4b5de27d4ae954a11a07f22f52de0add2e
7
- data.tar.gz: 93d6e02df36bab362b12df679718e27da50e3d35cfcf1846795b1e1cfbb9a647efb9ae486a3ebb44ce268a35882ded8b9238ec9cc3ac9962c30c5c9c9618ee20
6
+ metadata.gz: f8c95c169cbea4e67bfa27d8574e2d698adfbea3aaadcd4fd8ca6133272aa61daafa73c4bf5f1ab1d1b728fd359ac63b4a127e1fc19c3b37c5b4d4cdcfcf2706
7
+ data.tar.gz: 9c29ed87e3c76fcd61fa34ce40e83290686a0b19d78668a0e4c305ebf576edc6e75bebd0f6ac197a29529449734abcfed123e1ae7f1666496ba1abf8cda5d85a
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ruby Client for the Cloud Translation V3 API
2
2
 
3
- API Client library for the Cloud Translation V3 API
3
+ Integrates text translation into your website or application.
4
4
 
5
5
  Cloud Translation can dynamically translate text between thousands of language pairs. Translation lets websites and programs programmatically integrate with the translation service.
6
6
 
@@ -47,7 +47,7 @@ for general usage information.
47
47
 
48
48
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
49
  The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
50
+ or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
51
51
  that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
52
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
53
53
 
@@ -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]
@@ -1444,9 +1461,9 @@ module Google
1444
1461
  # * (`String`) The path to a service account key file in JSON format
1445
1462
  # * (`Hash`) A service account key as a Hash
1446
1463
  # * (`Google::Auth::Credentials`) A googleauth credentials object
1447
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
1464
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1448
1465
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1449
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
1466
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1450
1467
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1451
1468
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1452
1469
  # * (`nil`) indicating no credentials
@@ -628,9 +628,9 @@ module Google
628
628
  # * (`String`) The path to a service account key file in JSON format
629
629
  # * (`Hash`) A service account key as a Hash
630
630
  # * (`Google::Auth::Credentials`) A googleauth credentials object
631
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
631
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
632
632
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
633
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
633
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
634
634
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
635
635
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
636
636
  # * (`nil`) indicating no credentials