google-cloud-translate-v3 0.8.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/translate/v3/adaptive_mt_pb.rb +67 -0
- data/lib/google/cloud/translate/v3/common_pb.rb +46 -0
- data/lib/google/cloud/translate/v3/translation_service/client.rb +1004 -4
- data/lib/google/cloud/translate/v3/translation_service/operations.rb +10 -1
- data/lib/google/cloud/translate/v3/translation_service/paths.rb +40 -0
- data/lib/google/cloud/translate/v3/translation_service/rest/client.rb +1219 -106
- data/lib/google/cloud/translate/v3/translation_service/rest/operations.rb +98 -0
- data/lib/google/cloud/translate/v3/translation_service/rest/service_stub.rb +600 -0
- data/lib/google/cloud/translate/v3/translation_service_pb.rb +2 -1
- data/lib/google/cloud/translate/v3/translation_service_services_pb.rb +22 -0
- data/lib/google/cloud/translate/v3/version.rb +1 -1
- data/proto_docs/google/api/client.rb +13 -0
- data/proto_docs/google/api/field_behavior.rb +14 -0
- data/proto_docs/google/cloud/translate/v3/adaptive_mt.rb +327 -0
- data/proto_docs/google/cloud/translate/v3/common.rb +61 -0
- data/proto_docs/google/cloud/translate/v3/translation_service.rb +3 -3
- metadata +9 -5
@@ -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
|
|