google-cloud-translate-v3 0.3.2 → 0.3.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33b5ded66eaa89aef73de6f4ce667bc0b10a442cf75703d6e584f39f3000da2d
|
4
|
+
data.tar.gz: 073231f51bf86a56672997467dfeda8e361918afa71780cc96148081824fa911
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a17f3ee6160b3964308c49d4072830c86e310318e9ace799311ee6d4db979c4437cbabe44c40f691d482e040121f4c2680f10e3d5abe7b831d905190de895f0
|
7
|
+
data.tar.gz: 5f15e24b3d89d9b197851d72d7f1409394b74842aa58787143172bd4c7f358b236379f7d77a6aaf97d546b524f32e39f3d4381a7021825a4e3fb81f032f45782
|
@@ -41,13 +41,12 @@ module Google
|
|
41
41
|
# See {::Google::Cloud::Translate::V3::TranslationService::Client::Configuration}
|
42
42
|
# for a description of the configuration fields.
|
43
43
|
#
|
44
|
-
#
|
44
|
+
# @example
|
45
45
|
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
# end
|
46
|
+
# # Modify the configuration for all TranslationService clients
|
47
|
+
# ::Google::Cloud::Translate::V3::TranslationService::Client.configure do |config|
|
48
|
+
# config.timeout = 10.0
|
49
|
+
# end
|
51
50
|
#
|
52
51
|
# @yield [config] Configure the Client client.
|
53
52
|
# @yieldparam config [Client::Configuration]
|
@@ -122,19 +121,15 @@ module Google
|
|
122
121
|
##
|
123
122
|
# Create a new TranslationService client object.
|
124
123
|
#
|
125
|
-
#
|
126
|
-
#
|
127
|
-
# To create a new TranslationService client with the default
|
128
|
-
# configuration:
|
124
|
+
# @example
|
129
125
|
#
|
130
|
-
#
|
126
|
+
# # Create a client using the default configuration
|
127
|
+
# client = ::Google::Cloud::Translate::V3::TranslationService::Client.new
|
131
128
|
#
|
132
|
-
#
|
133
|
-
#
|
134
|
-
#
|
135
|
-
#
|
136
|
-
# config.timeout = 10.0
|
137
|
-
# end
|
129
|
+
# # Create a client using a custom configuration
|
130
|
+
# client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config|
|
131
|
+
# config.timeout = 10.0
|
132
|
+
# end
|
138
133
|
#
|
139
134
|
# @yield [config] Configure the TranslationService client.
|
140
135
|
# @yieldparam config [Client::Configuration]
|
@@ -154,10 +149,9 @@ module Google
|
|
154
149
|
|
155
150
|
# Create credentials
|
156
151
|
credentials = @config.credentials
|
157
|
-
# Use self-signed JWT if the
|
152
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
158
153
|
# but only if the default endpoint does not have a region prefix.
|
159
|
-
enable_self_signed_jwt = @config.
|
160
|
-
@config.endpoint == Client.configure.endpoint &&
|
154
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
161
155
|
!@config.endpoint.split(".").first.include?("-")
|
162
156
|
credentials ||= Credentials.default scope: @config.scope,
|
163
157
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -305,7 +299,9 @@ module Google
|
|
305
299
|
options.apply_defaults timeout: @config.rpcs.translate_text.timeout,
|
306
300
|
metadata: metadata,
|
307
301
|
retry_policy: @config.rpcs.translate_text.retry_policy
|
308
|
-
|
302
|
+
|
303
|
+
options.apply_defaults timeout: @config.timeout,
|
304
|
+
metadata: @config.metadata,
|
309
305
|
retry_policy: @config.retry_policy
|
310
306
|
|
311
307
|
@translation_service_stub.call_rpc :translate_text, request, options: options do |response, operation|
|
@@ -405,7 +401,9 @@ module Google
|
|
405
401
|
options.apply_defaults timeout: @config.rpcs.detect_language.timeout,
|
406
402
|
metadata: metadata,
|
407
403
|
retry_policy: @config.rpcs.detect_language.retry_policy
|
408
|
-
|
404
|
+
|
405
|
+
options.apply_defaults timeout: @config.timeout,
|
406
|
+
metadata: @config.metadata,
|
409
407
|
retry_policy: @config.retry_policy
|
410
408
|
|
411
409
|
@translation_service_stub.call_rpc :detect_language, request, options: options do |response, operation|
|
@@ -502,7 +500,9 @@ module Google
|
|
502
500
|
options.apply_defaults timeout: @config.rpcs.get_supported_languages.timeout,
|
503
501
|
metadata: metadata,
|
504
502
|
retry_policy: @config.rpcs.get_supported_languages.retry_policy
|
505
|
-
|
503
|
+
|
504
|
+
options.apply_defaults timeout: @config.timeout,
|
505
|
+
metadata: @config.metadata,
|
506
506
|
retry_policy: @config.retry_policy
|
507
507
|
|
508
508
|
@translation_service_stub.call_rpc :get_supported_languages, request, options: options do |response, operation|
|
@@ -624,7 +624,9 @@ module Google
|
|
624
624
|
options.apply_defaults timeout: @config.rpcs.batch_translate_text.timeout,
|
625
625
|
metadata: metadata,
|
626
626
|
retry_policy: @config.rpcs.batch_translate_text.retry_policy
|
627
|
-
|
627
|
+
|
628
|
+
options.apply_defaults timeout: @config.timeout,
|
629
|
+
metadata: @config.metadata,
|
628
630
|
retry_policy: @config.retry_policy
|
629
631
|
|
630
632
|
@translation_service_stub.call_rpc :batch_translate_text, request, options: options do |response, operation|
|
@@ -694,7 +696,9 @@ module Google
|
|
694
696
|
options.apply_defaults timeout: @config.rpcs.create_glossary.timeout,
|
695
697
|
metadata: metadata,
|
696
698
|
retry_policy: @config.rpcs.create_glossary.retry_policy
|
697
|
-
|
699
|
+
|
700
|
+
options.apply_defaults timeout: @config.timeout,
|
701
|
+
metadata: @config.metadata,
|
698
702
|
retry_policy: @config.retry_policy
|
699
703
|
|
700
704
|
@translation_service_stub.call_rpc :create_glossary, request, options: options do |response, operation|
|
@@ -774,7 +778,9 @@ module Google
|
|
774
778
|
options.apply_defaults timeout: @config.rpcs.list_glossaries.timeout,
|
775
779
|
metadata: metadata,
|
776
780
|
retry_policy: @config.rpcs.list_glossaries.retry_policy
|
777
|
-
|
781
|
+
|
782
|
+
options.apply_defaults timeout: @config.timeout,
|
783
|
+
metadata: @config.metadata,
|
778
784
|
retry_policy: @config.retry_policy
|
779
785
|
|
780
786
|
@translation_service_stub.call_rpc :list_glossaries, request, options: options do |response, operation|
|
@@ -842,7 +848,9 @@ module Google
|
|
842
848
|
options.apply_defaults timeout: @config.rpcs.get_glossary.timeout,
|
843
849
|
metadata: metadata,
|
844
850
|
retry_policy: @config.rpcs.get_glossary.retry_policy
|
845
|
-
|
851
|
+
|
852
|
+
options.apply_defaults timeout: @config.timeout,
|
853
|
+
metadata: @config.metadata,
|
846
854
|
retry_policy: @config.retry_policy
|
847
855
|
|
848
856
|
@translation_service_stub.call_rpc :get_glossary, request, options: options do |response, operation|
|
@@ -910,7 +918,9 @@ module Google
|
|
910
918
|
options.apply_defaults timeout: @config.rpcs.delete_glossary.timeout,
|
911
919
|
metadata: metadata,
|
912
920
|
retry_policy: @config.rpcs.delete_glossary.retry_policy
|
913
|
-
|
921
|
+
|
922
|
+
options.apply_defaults timeout: @config.timeout,
|
923
|
+
metadata: @config.metadata,
|
914
924
|
retry_policy: @config.retry_policy
|
915
925
|
|
916
926
|
@translation_service_stub.call_rpc :delete_glossary, request, options: options do |response, operation|
|
@@ -935,22 +945,21 @@ module Google
|
|
935
945
|
# Configuration can be applied globally to all clients, or to a single client
|
936
946
|
# on construction.
|
937
947
|
#
|
938
|
-
#
|
939
|
-
#
|
940
|
-
#
|
941
|
-
# to 20 seconds,
|
942
|
-
#
|
943
|
-
#
|
944
|
-
#
|
945
|
-
#
|
946
|
-
#
|
947
|
-
#
|
948
|
-
#
|
949
|
-
#
|
950
|
-
#
|
951
|
-
#
|
952
|
-
#
|
953
|
-
# end
|
948
|
+
# @example
|
949
|
+
#
|
950
|
+
# # Modify the global config, setting the timeout for
|
951
|
+
# # translate_text to 20 seconds,
|
952
|
+
# # and all remaining timeouts to 10 seconds.
|
953
|
+
# ::Google::Cloud::Translate::V3::TranslationService::Client.configure do |config|
|
954
|
+
# config.timeout = 10.0
|
955
|
+
# config.rpcs.translate_text.timeout = 20.0
|
956
|
+
# end
|
957
|
+
#
|
958
|
+
# # Apply the above configuration only to a new client.
|
959
|
+
# client = ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config|
|
960
|
+
# config.timeout = 10.0
|
961
|
+
# config.rpcs.translate_text.timeout = 20.0
|
962
|
+
# end
|
954
963
|
#
|
955
964
|
# @!attribute [rw] endpoint
|
956
965
|
# The hostname or hostname:port of the service endpoint.
|
@@ -169,7 +169,9 @@ module Google
|
|
169
169
|
options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
|
170
170
|
metadata: metadata,
|
171
171
|
retry_policy: @config.rpcs.list_operations.retry_policy
|
172
|
-
|
172
|
+
|
173
|
+
options.apply_defaults timeout: @config.timeout,
|
174
|
+
metadata: @config.metadata,
|
173
175
|
retry_policy: @config.retry_policy
|
174
176
|
|
175
177
|
@operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
|
@@ -239,7 +241,9 @@ module Google
|
|
239
241
|
options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
|
240
242
|
metadata: metadata,
|
241
243
|
retry_policy: @config.rpcs.get_operation.retry_policy
|
242
|
-
|
244
|
+
|
245
|
+
options.apply_defaults timeout: @config.timeout,
|
246
|
+
metadata: @config.metadata,
|
243
247
|
retry_policy: @config.retry_policy
|
244
248
|
|
245
249
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
@@ -309,7 +313,9 @@ module Google
|
|
309
313
|
options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
|
310
314
|
metadata: metadata,
|
311
315
|
retry_policy: @config.rpcs.delete_operation.retry_policy
|
312
|
-
|
316
|
+
|
317
|
+
options.apply_defaults timeout: @config.timeout,
|
318
|
+
metadata: @config.metadata,
|
313
319
|
retry_policy: @config.retry_policy
|
314
320
|
|
315
321
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
@@ -384,7 +390,9 @@ module Google
|
|
384
390
|
options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
|
385
391
|
metadata: metadata,
|
386
392
|
retry_policy: @config.rpcs.cancel_operation.retry_policy
|
387
|
-
|
393
|
+
|
394
|
+
options.apply_defaults timeout: @config.timeout,
|
395
|
+
metadata: @config.metadata,
|
388
396
|
retry_policy: @config.retry_policy
|
389
397
|
|
390
398
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
@@ -456,7 +464,9 @@ module Google
|
|
456
464
|
options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
|
457
465
|
metadata: metadata,
|
458
466
|
retry_policy: @config.rpcs.wait_operation.retry_policy
|
459
|
-
|
467
|
+
|
468
|
+
options.apply_defaults timeout: @config.timeout,
|
469
|
+
metadata: @config.metadata,
|
460
470
|
retry_policy: @config.retry_policy
|
461
471
|
|
462
472
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
@@ -481,22 +491,21 @@ module Google
|
|
481
491
|
# Configuration can be applied globally to all clients, or to a single client
|
482
492
|
# on construction.
|
483
493
|
#
|
484
|
-
#
|
485
|
-
#
|
486
|
-
#
|
487
|
-
# to 20 seconds,
|
488
|
-
#
|
489
|
-
#
|
490
|
-
#
|
491
|
-
#
|
492
|
-
#
|
493
|
-
#
|
494
|
-
#
|
495
|
-
#
|
496
|
-
#
|
497
|
-
#
|
498
|
-
#
|
499
|
-
# end
|
494
|
+
# @example
|
495
|
+
#
|
496
|
+
# # Modify the global config, setting the timeout for
|
497
|
+
# # list_operations to 20 seconds,
|
498
|
+
# # and all remaining timeouts to 10 seconds.
|
499
|
+
# ::Google::Longrunning::Operations::Client.configure do |config|
|
500
|
+
# config.timeout = 10.0
|
501
|
+
# config.rpcs.list_operations.timeout = 20.0
|
502
|
+
# end
|
503
|
+
#
|
504
|
+
# # Apply the above configuration only to a new client.
|
505
|
+
# client = ::Google::Longrunning::Operations::Client.new do |config|
|
506
|
+
# config.timeout = 10.0
|
507
|
+
# config.rpcs.list_operations.timeout = 20.0
|
508
|
+
# end
|
500
509
|
#
|
501
510
|
# @!attribute [rw] endpoint
|
502
511
|
# The hostname or hostname:port of the service endpoint.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-translate-v3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.7'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.7'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|