google-cloud-translate-v3 0.8.0 → 0.9.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: 7df8b408ded79f10aab9099c9d14c62cc0f1e50f9a0d4ccae82304cc5779f206
4
- data.tar.gz: ce3569f0c4a9e41e2def437cc1e22acb970cf5c68ed65709cce2a6b17daa7378
3
+ metadata.gz: 03c9083cad0998ed1d15bc0e723f853e905e3855f68c228002b000cf75337cbc
4
+ data.tar.gz: f58c74d13d39c6f4a08e4fd03fc68a3ca6954d148b35c260e51bedad8a82e1a8
5
5
  SHA512:
6
- metadata.gz: 3285982e4266de7f9faaa1e884ed85b20b4e75b89b4b054b0f5b5490ea53f1a6b4b3b9adc9ec4b2ad69f2714d26526f03a7c10eb86b4f665e144e566860606e6
7
- data.tar.gz: 58bbcf77df309c1f67fb94a478866bbbcada4af6b7b4493bc302f0110ba143156cbb3dbece02f1a44ab634fb12d95a91701fa206b48e78e1f1f41d3fcb08de25
6
+ metadata.gz: '03689b0ef2b3d9d275250289daf635b5282c846b3e71009bf37855fc28e4c7778ff38222f22d1892743928713fcfa37b3cf846ab741f31c694359507f4beb926'
7
+ data.tar.gz: f2bd6f3fe81e9e25d415f92f1267545e2edf017573bc5ba525abf6e6468472cc59d825766d386754fb45573187da99d393050d18acbeb487df7cdc214e5abf5c
@@ -176,7 +176,8 @@ module Google
176
176
  credentials: credentials,
177
177
  endpoint: @config.endpoint,
178
178
  channel_args: @config.channel_args,
179
- interceptors: @config.interceptors
179
+ interceptors: @config.interceptors,
180
+ channel_pool_config: @config.channel_pool
180
181
  )
181
182
  end
182
183
 
@@ -1552,6 +1553,14 @@ module Google
1552
1553
  end
1553
1554
  end
1554
1555
 
1556
+ ##
1557
+ # Configuration for the channel pool
1558
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
1559
+ #
1560
+ def channel_pool
1561
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
1562
+ end
1563
+
1555
1564
  ##
1556
1565
  # Configuration RPC class for the TranslationService API.
1557
1566
  #
@@ -93,7 +93,8 @@ module Google
93
93
  credentials: credentials,
94
94
  endpoint: @config.endpoint,
95
95
  channel_args: @config.channel_args,
96
- interceptors: @config.interceptors
96
+ interceptors: @config.interceptors,
97
+ channel_pool_config: @config.channel_pool
97
98
  )
98
99
 
99
100
  # Used by an LRO wrapper for some methods of this service
@@ -709,6 +710,14 @@ module Google
709
710
  end
710
711
  end
711
712
 
713
+ ##
714
+ # Configuration for the channel pool
715
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
716
+ #
717
+ def channel_pool
718
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
719
+ end
720
+
712
721
  ##
713
722
  # Configuration RPC class for the Operations API.
714
723
  #
@@ -267,6 +267,22 @@ module Google
267
267
  # @return [::Google::Cloud::Translate::V3::TranslateTextResponse]
268
268
  #
269
269
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
270
+ #
271
+ # @example Basic example
272
+ # require "google/cloud/translate/v3"
273
+ #
274
+ # # Create a client object. The client can be reused for multiple calls.
275
+ # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new
276
+ #
277
+ # # Create a request. To set request fields, pass in keyword arguments.
278
+ # request = Google::Cloud::Translate::V3::TranslateTextRequest.new
279
+ #
280
+ # # Call the translate_text method.
281
+ # result = client.translate_text request
282
+ #
283
+ # # The returned object is of type Google::Cloud::Translate::V3::TranslateTextResponse.
284
+ # p result
285
+ #
270
286
  def translate_text request, options = nil
271
287
  raise ::ArgumentError, "request must be provided" if request.nil?
272
288
 
@@ -364,6 +380,22 @@ module Google
364
380
  # @return [::Google::Cloud::Translate::V3::DetectLanguageResponse]
365
381
  #
366
382
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
383
+ #
384
+ # @example Basic example
385
+ # require "google/cloud/translate/v3"
386
+ #
387
+ # # Create a client object. The client can be reused for multiple calls.
388
+ # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new
389
+ #
390
+ # # Create a request. To set request fields, pass in keyword arguments.
391
+ # request = Google::Cloud::Translate::V3::DetectLanguageRequest.new
392
+ #
393
+ # # Call the detect_language method.
394
+ # result = client.detect_language request
395
+ #
396
+ # # The returned object is of type Google::Cloud::Translate::V3::DetectLanguageResponse.
397
+ # p result
398
+ #
367
399
  def detect_language request, options = nil
368
400
  raise ::ArgumentError, "request must be provided" if request.nil?
369
401
 
@@ -456,6 +488,22 @@ module Google
456
488
  # @return [::Google::Cloud::Translate::V3::SupportedLanguages]
457
489
  #
458
490
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
491
+ #
492
+ # @example Basic example
493
+ # require "google/cloud/translate/v3"
494
+ #
495
+ # # Create a client object. The client can be reused for multiple calls.
496
+ # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new
497
+ #
498
+ # # Create a request. To set request fields, pass in keyword arguments.
499
+ # request = Google::Cloud::Translate::V3::GetSupportedLanguagesRequest.new
500
+ #
501
+ # # Call the get_supported_languages method.
502
+ # result = client.get_supported_languages request
503
+ #
504
+ # # The returned object is of type Google::Cloud::Translate::V3::SupportedLanguages.
505
+ # p result
506
+ #
459
507
  def get_supported_languages request, options = nil
460
508
  raise ::ArgumentError, "request must be provided" if request.nil?
461
509
 
@@ -591,6 +639,22 @@ module Google
591
639
  # @return [::Google::Cloud::Translate::V3::TranslateDocumentResponse]
592
640
  #
593
641
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
642
+ #
643
+ # @example Basic example
644
+ # require "google/cloud/translate/v3"
645
+ #
646
+ # # Create a client object. The client can be reused for multiple calls.
647
+ # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new
648
+ #
649
+ # # Create a request. To set request fields, pass in keyword arguments.
650
+ # request = Google::Cloud::Translate::V3::TranslateDocumentRequest.new
651
+ #
652
+ # # Call the translate_document method.
653
+ # result = client.translate_document request
654
+ #
655
+ # # The returned object is of type Google::Cloud::Translate::V3::TranslateDocumentResponse.
656
+ # p result
657
+ #
594
658
  def translate_document request, options = nil
595
659
  raise ::ArgumentError, "request must be provided" if request.nil?
596
660
 
@@ -709,6 +773,29 @@ module Google
709
773
  # @return [::Gapic::Operation]
710
774
  #
711
775
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
776
+ #
777
+ # @example Basic example
778
+ # require "google/cloud/translate/v3"
779
+ #
780
+ # # Create a client object. The client can be reused for multiple calls.
781
+ # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new
782
+ #
783
+ # # Create a request. To set request fields, pass in keyword arguments.
784
+ # request = Google::Cloud::Translate::V3::BatchTranslateTextRequest.new
785
+ #
786
+ # # Call the batch_translate_text method.
787
+ # result = client.batch_translate_text request
788
+ #
789
+ # # The returned object is of type Gapic::Operation. You can use it to
790
+ # # check the status of an operation, cancel it, or wait for results.
791
+ # # Here is how to wait for a response.
792
+ # result.wait_until_done! timeout: 60
793
+ # if result.response?
794
+ # p result.response
795
+ # else
796
+ # puts "No response received."
797
+ # end
798
+ #
712
799
  def batch_translate_text request, options = nil
713
800
  raise ::ArgumentError, "request must be provided" if request.nil?
714
801
 
@@ -843,6 +930,29 @@ module Google
843
930
  # @return [::Gapic::Operation]
844
931
  #
845
932
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
933
+ #
934
+ # @example Basic example
935
+ # require "google/cloud/translate/v3"
936
+ #
937
+ # # Create a client object. The client can be reused for multiple calls.
938
+ # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new
939
+ #
940
+ # # Create a request. To set request fields, pass in keyword arguments.
941
+ # request = Google::Cloud::Translate::V3::BatchTranslateDocumentRequest.new
942
+ #
943
+ # # Call the batch_translate_document method.
944
+ # result = client.batch_translate_document request
945
+ #
946
+ # # The returned object is of type Gapic::Operation. You can use it to
947
+ # # check the status of an operation, cancel it, or wait for results.
948
+ # # Here is how to wait for a response.
949
+ # result.wait_until_done! timeout: 60
950
+ # if result.response?
951
+ # p result.response
952
+ # else
953
+ # puts "No response received."
954
+ # end
955
+ #
846
956
  def batch_translate_document request, options = nil
847
957
  raise ::ArgumentError, "request must be provided" if request.nil?
848
958
 
@@ -909,6 +1019,29 @@ module Google
909
1019
  # @return [::Gapic::Operation]
910
1020
  #
911
1021
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1022
+ #
1023
+ # @example Basic example
1024
+ # require "google/cloud/translate/v3"
1025
+ #
1026
+ # # Create a client object. The client can be reused for multiple calls.
1027
+ # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new
1028
+ #
1029
+ # # Create a request. To set request fields, pass in keyword arguments.
1030
+ # request = Google::Cloud::Translate::V3::CreateGlossaryRequest.new
1031
+ #
1032
+ # # Call the create_glossary method.
1033
+ # result = client.create_glossary request
1034
+ #
1035
+ # # The returned object is of type Gapic::Operation. You can use it to
1036
+ # # check the status of an operation, cancel it, or wait for results.
1037
+ # # Here is how to wait for a response.
1038
+ # result.wait_until_done! timeout: 60
1039
+ # if result.response?
1040
+ # p result.response
1041
+ # else
1042
+ # puts "No response received."
1043
+ # end
1044
+ #
912
1045
  def create_glossary request, options = nil
913
1046
  raise ::ArgumentError, "request must be provided" if request.nil?
914
1047
 
@@ -998,6 +1131,26 @@ module Google
998
1131
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Translate::V3::Glossary>]
999
1132
  #
1000
1133
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1134
+ #
1135
+ # @example Basic example
1136
+ # require "google/cloud/translate/v3"
1137
+ #
1138
+ # # Create a client object. The client can be reused for multiple calls.
1139
+ # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new
1140
+ #
1141
+ # # Create a request. To set request fields, pass in keyword arguments.
1142
+ # request = Google::Cloud::Translate::V3::ListGlossariesRequest.new
1143
+ #
1144
+ # # Call the list_glossaries method.
1145
+ # result = client.list_glossaries request
1146
+ #
1147
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1148
+ # # over elements, and API calls will be issued to fetch pages as needed.
1149
+ # result.each do |item|
1150
+ # # Each element is of type ::Google::Cloud::Translate::V3::Glossary.
1151
+ # p item
1152
+ # end
1153
+ #
1001
1154
  def list_glossaries request, options = nil
1002
1155
  raise ::ArgumentError, "request must be provided" if request.nil?
1003
1156
 
@@ -1062,6 +1215,22 @@ module Google
1062
1215
  # @return [::Google::Cloud::Translate::V3::Glossary]
1063
1216
  #
1064
1217
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1218
+ #
1219
+ # @example Basic example
1220
+ # require "google/cloud/translate/v3"
1221
+ #
1222
+ # # Create a client object. The client can be reused for multiple calls.
1223
+ # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new
1224
+ #
1225
+ # # Create a request. To set request fields, pass in keyword arguments.
1226
+ # request = Google::Cloud::Translate::V3::GetGlossaryRequest.new
1227
+ #
1228
+ # # Call the get_glossary method.
1229
+ # result = client.get_glossary request
1230
+ #
1231
+ # # The returned object is of type Google::Cloud::Translate::V3::Glossary.
1232
+ # p result
1233
+ #
1065
1234
  def get_glossary request, options = nil
1066
1235
  raise ::ArgumentError, "request must be provided" if request.nil?
1067
1236
 
@@ -1126,6 +1295,29 @@ module Google
1126
1295
  # @return [::Gapic::Operation]
1127
1296
  #
1128
1297
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1298
+ #
1299
+ # @example Basic example
1300
+ # require "google/cloud/translate/v3"
1301
+ #
1302
+ # # Create a client object. The client can be reused for multiple calls.
1303
+ # client = Google::Cloud::Translate::V3::TranslationService::Rest::Client.new
1304
+ #
1305
+ # # Create a request. To set request fields, pass in keyword arguments.
1306
+ # request = Google::Cloud::Translate::V3::DeleteGlossaryRequest.new
1307
+ #
1308
+ # # Call the delete_glossary method.
1309
+ # result = client.delete_glossary request
1310
+ #
1311
+ # # The returned object is of type Gapic::Operation. You can use it to
1312
+ # # check the status of an operation, cancel it, or wait for results.
1313
+ # # Here is how to wait for a response.
1314
+ # result.wait_until_done! timeout: 60
1315
+ # if result.response?
1316
+ # p result.response
1317
+ # else
1318
+ # puts "No response received."
1319
+ # end
1320
+ #
1129
1321
  def delete_glossary request, options = nil
1130
1322
  raise ::ArgumentError, "request must be provided" if request.nil?
1131
1323
 
@@ -136,6 +136,26 @@ module Google
136
136
  # @return [::Gapic::Operation]
137
137
  #
138
138
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
139
+ #
140
+ # @example Basic example
141
+ # require "google/longrunning"
142
+ #
143
+ # # Create a client object. The client can be reused for multiple calls.
144
+ # client = Google::Longrunning::Operations::Rest::Client.new
145
+ #
146
+ # # Create a request. To set request fields, pass in keyword arguments.
147
+ # request = Google::Longrunning::ListOperationsRequest.new
148
+ #
149
+ # # Call the list_operations method.
150
+ # result = client.list_operations request
151
+ #
152
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
153
+ # # over elements, and API calls will be issued to fetch pages as needed.
154
+ # result.each do |item|
155
+ # # Each element is of type ::Google::Longrunning::Operation.
156
+ # p item
157
+ # end
158
+ #
139
159
  def list_operations request, options = nil
140
160
  raise ::ArgumentError, "request must be provided" if request.nil?
141
161
 
@@ -201,6 +221,29 @@ module Google
201
221
  # @return [::Gapic::Operation]
202
222
  #
203
223
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
224
+ #
225
+ # @example Basic example
226
+ # require "google/longrunning"
227
+ #
228
+ # # Create a client object. The client can be reused for multiple calls.
229
+ # client = Google::Longrunning::Operations::Rest::Client.new
230
+ #
231
+ # # Create a request. To set request fields, pass in keyword arguments.
232
+ # request = Google::Longrunning::GetOperationRequest.new
233
+ #
234
+ # # Call the get_operation method.
235
+ # result = client.get_operation request
236
+ #
237
+ # # The returned object is of type Gapic::Operation. You can use it to
238
+ # # check the status of an operation, cancel it, or wait for results.
239
+ # # Here is how to wait for a response.
240
+ # result.wait_until_done! timeout: 60
241
+ # if result.response?
242
+ # p result.response
243
+ # else
244
+ # puts "No response received."
245
+ # end
246
+ #
204
247
  def get_operation request, options = nil
205
248
  raise ::ArgumentError, "request must be provided" if request.nil?
206
249
 
@@ -267,6 +310,22 @@ module Google
267
310
  # @return [::Google::Protobuf::Empty]
268
311
  #
269
312
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
313
+ #
314
+ # @example Basic example
315
+ # require "google/longrunning"
316
+ #
317
+ # # Create a client object. The client can be reused for multiple calls.
318
+ # client = Google::Longrunning::Operations::Rest::Client.new
319
+ #
320
+ # # Create a request. To set request fields, pass in keyword arguments.
321
+ # request = Google::Longrunning::DeleteOperationRequest.new
322
+ #
323
+ # # Call the delete_operation method.
324
+ # result = client.delete_operation request
325
+ #
326
+ # # The returned object is of type Google::Protobuf::Empty.
327
+ # p result
328
+ #
270
329
  def delete_operation request, options = nil
271
330
  raise ::ArgumentError, "request must be provided" if request.nil?
272
331
 
@@ -338,6 +397,22 @@ module Google
338
397
  # @return [::Google::Protobuf::Empty]
339
398
  #
340
399
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
400
+ #
401
+ # @example Basic example
402
+ # require "google/longrunning"
403
+ #
404
+ # # Create a client object. The client can be reused for multiple calls.
405
+ # client = Google::Longrunning::Operations::Rest::Client.new
406
+ #
407
+ # # Create a request. To set request fields, pass in keyword arguments.
408
+ # request = Google::Longrunning::CancelOperationRequest.new
409
+ #
410
+ # # Call the cancel_operation method.
411
+ # result = client.cancel_operation request
412
+ #
413
+ # # The returned object is of type Google::Protobuf::Empty.
414
+ # p result
415
+ #
341
416
  def cancel_operation request, options = nil
342
417
  raise ::ArgumentError, "request must be provided" if request.nil?
343
418
 
@@ -412,6 +487,29 @@ module Google
412
487
  # @return [::Gapic::Operation]
413
488
  #
414
489
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
490
+ #
491
+ # @example Basic example
492
+ # require "google/longrunning"
493
+ #
494
+ # # Create a client object. The client can be reused for multiple calls.
495
+ # client = Google::Longrunning::Operations::Rest::Client.new
496
+ #
497
+ # # Create a request. To set request fields, pass in keyword arguments.
498
+ # request = Google::Longrunning::WaitOperationRequest.new
499
+ #
500
+ # # Call the wait_operation method.
501
+ # result = client.wait_operation request
502
+ #
503
+ # # The returned object is of type Gapic::Operation. You can use it to
504
+ # # check the status of an operation, cancel it, or wait for results.
505
+ # # Here is how to wait for a response.
506
+ # result.wait_until_done! timeout: 60
507
+ # if result.response?
508
+ # p result.response
509
+ # else
510
+ # puts "No response received."
511
+ # end
512
+ #
415
513
  def wait_operation request, options = nil
416
514
  raise ::ArgumentError, "request must be provided" if request.nil?
417
515
 
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Translate
23
23
  module V3
24
- VERSION = "0.8.0"
24
+ VERSION = "0.9.0"
25
25
  end
26
26
  end
27
27
  end
@@ -66,6 +66,20 @@ module Google
66
66
  # a non-empty value will be returned. The user will not be aware of what
67
67
  # non-empty value to expect.
68
68
  NON_EMPTY_DEFAULT = 7
69
+
70
+ # Denotes that the field in a resource (a message annotated with
71
+ # google.api.resource) is used in the resource name to uniquely identify the
72
+ # resource. For AIP-compliant APIs, this should only be applied to the
73
+ # `name` field on the resource.
74
+ #
75
+ # This behavior should not be applied to references to other resources within
76
+ # the message.
77
+ #
78
+ # The identifier field of resources often have different field behavior
79
+ # depending on the request it is embedded in (e.g. for Create methods name
80
+ # is optional and unused, while for Update methods it is required). Instead
81
+ # of method-specific annotations, only `IDENTIFIER` is required.
82
+ IDENTIFIER = 8
69
83
  end
70
84
  end
71
85
  end
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.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-15 00:00:00.000000000 Z
11
+ date: 2023-09-12 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.1
19
+ version: 0.20.0
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.19.1
29
+ version: 0.20.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -216,7 +216,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
216
216
  - !ruby/object:Gem::Version
217
217
  version: '0'
218
218
  requirements: []
219
- rubygems_version: 3.4.2
219
+ rubygems_version: 3.4.19
220
220
  signing_key:
221
221
  specification_version: 4
222
222
  summary: Integrates text translation into your website or application.