google-cloud-vision-v1 0.6.2 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -143,6 +143,27 @@ module Google
143
143
  #
144
144
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
145
145
  #
146
+ # @example Basic example
147
+ # require "google/longrunning"
148
+ #
149
+ # # Create a client object. The client can be reused for multiple calls.
150
+ # client = Google::Longrunning::Operations::Client.new
151
+ #
152
+ # # Create a request. To set request fields, pass in keyword arguments.
153
+ # request = Google::Longrunning::ListOperationsRequest.new
154
+ #
155
+ # # Call the list_operations method.
156
+ # result = client.list_operations request
157
+ #
158
+ # # The returned object is of type Gapic::PagedEnumerable. You can
159
+ # # iterate over all elements by calling #each, and the enumerable
160
+ # # will lazily make API calls to fetch subsequent pages. Other
161
+ # # methods are also available for managing paging directly.
162
+ # result.each do |response|
163
+ # # Each element is of type ::Google::Longrunning::Operation.
164
+ # p response
165
+ # end
166
+ #
146
167
  def list_operations request, options = nil
147
168
  raise ::ArgumentError, "request must be provided" if request.nil?
148
169
 
@@ -169,7 +190,9 @@ module Google
169
190
  options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
170
191
  metadata: metadata,
171
192
  retry_policy: @config.rpcs.list_operations.retry_policy
172
- options.apply_defaults metadata: @config.metadata,
193
+
194
+ options.apply_defaults timeout: @config.timeout,
195
+ metadata: @config.metadata,
173
196
  retry_policy: @config.retry_policy
174
197
 
175
198
  @operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
@@ -213,6 +236,28 @@ module Google
213
236
  #
214
237
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
215
238
  #
239
+ # @example Basic example
240
+ # require "google/longrunning"
241
+ #
242
+ # # Create a client object. The client can be reused for multiple calls.
243
+ # client = Google::Longrunning::Operations::Client.new
244
+ #
245
+ # # Create a request. To set request fields, pass in keyword arguments.
246
+ # request = Google::Longrunning::GetOperationRequest.new
247
+ #
248
+ # # Call the get_operation method.
249
+ # result = client.get_operation request
250
+ #
251
+ # # The returned object is of type Gapic::Operation. You can use this
252
+ # # object to check the status of an operation, cancel it, or wait
253
+ # # for results. Here is how to block until completion:
254
+ # result.wait_until_done! timeout: 60
255
+ # if result.response?
256
+ # p result.response
257
+ # else
258
+ # puts "Error!"
259
+ # end
260
+ #
216
261
  def get_operation request, options = nil
217
262
  raise ::ArgumentError, "request must be provided" if request.nil?
218
263
 
@@ -239,7 +284,9 @@ module Google
239
284
  options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
240
285
  metadata: metadata,
241
286
  retry_policy: @config.rpcs.get_operation.retry_policy
242
- options.apply_defaults metadata: @config.metadata,
287
+
288
+ options.apply_defaults timeout: @config.timeout,
289
+ metadata: @config.metadata,
243
290
  retry_policy: @config.retry_policy
244
291
 
245
292
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
@@ -283,6 +330,21 @@ module Google
283
330
  #
284
331
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
285
332
  #
333
+ # @example Basic example
334
+ # require "google/longrunning"
335
+ #
336
+ # # Create a client object. The client can be reused for multiple calls.
337
+ # client = Google::Longrunning::Operations::Client.new
338
+ #
339
+ # # Create a request. To set request fields, pass in keyword arguments.
340
+ # request = Google::Longrunning::DeleteOperationRequest.new
341
+ #
342
+ # # Call the delete_operation method.
343
+ # result = client.delete_operation request
344
+ #
345
+ # # The returned object is of type Google::Protobuf::Empty.
346
+ # p result
347
+ #
286
348
  def delete_operation request, options = nil
287
349
  raise ::ArgumentError, "request must be provided" if request.nil?
288
350
 
@@ -309,7 +371,9 @@ module Google
309
371
  options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
310
372
  metadata: metadata,
311
373
  retry_policy: @config.rpcs.delete_operation.retry_policy
312
- options.apply_defaults metadata: @config.metadata,
374
+
375
+ options.apply_defaults timeout: @config.timeout,
376
+ metadata: @config.metadata,
313
377
  retry_policy: @config.retry_policy
314
378
 
315
379
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
@@ -358,6 +422,21 @@ module Google
358
422
  #
359
423
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
360
424
  #
425
+ # @example Basic example
426
+ # require "google/longrunning"
427
+ #
428
+ # # Create a client object. The client can be reused for multiple calls.
429
+ # client = Google::Longrunning::Operations::Client.new
430
+ #
431
+ # # Create a request. To set request fields, pass in keyword arguments.
432
+ # request = Google::Longrunning::CancelOperationRequest.new
433
+ #
434
+ # # Call the cancel_operation method.
435
+ # result = client.cancel_operation request
436
+ #
437
+ # # The returned object is of type Google::Protobuf::Empty.
438
+ # p result
439
+ #
361
440
  def cancel_operation request, options = nil
362
441
  raise ::ArgumentError, "request must be provided" if request.nil?
363
442
 
@@ -384,7 +463,9 @@ module Google
384
463
  options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
385
464
  metadata: metadata,
386
465
  retry_policy: @config.rpcs.cancel_operation.retry_policy
387
- options.apply_defaults metadata: @config.metadata,
466
+
467
+ options.apply_defaults timeout: @config.timeout,
468
+ metadata: @config.metadata,
388
469
  retry_policy: @config.retry_policy
389
470
 
390
471
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
@@ -436,6 +517,28 @@ module Google
436
517
  #
437
518
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
438
519
  #
520
+ # @example Basic example
521
+ # require "google/longrunning"
522
+ #
523
+ # # Create a client object. The client can be reused for multiple calls.
524
+ # client = Google::Longrunning::Operations::Client.new
525
+ #
526
+ # # Create a request. To set request fields, pass in keyword arguments.
527
+ # request = Google::Longrunning::WaitOperationRequest.new
528
+ #
529
+ # # Call the wait_operation method.
530
+ # result = client.wait_operation request
531
+ #
532
+ # # The returned object is of type Gapic::Operation. You can use this
533
+ # # object to check the status of an operation, cancel it, or wait
534
+ # # for results. Here is how to block until completion:
535
+ # result.wait_until_done! timeout: 60
536
+ # if result.response?
537
+ # p result.response
538
+ # else
539
+ # puts "Error!"
540
+ # end
541
+ #
439
542
  def wait_operation request, options = nil
440
543
  raise ::ArgumentError, "request must be provided" if request.nil?
441
544
 
@@ -456,7 +559,9 @@ module Google
456
559
  options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
457
560
  metadata: metadata,
458
561
  retry_policy: @config.rpcs.wait_operation.retry_policy
459
- options.apply_defaults metadata: @config.metadata,
562
+
563
+ options.apply_defaults timeout: @config.timeout,
564
+ metadata: @config.metadata,
460
565
  retry_policy: @config.retry_policy
461
566
 
462
567
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
@@ -481,22 +586,21 @@ module Google
481
586
  # Configuration can be applied globally to all clients, or to a single client
482
587
  # on construction.
483
588
  #
484
- # # Examples
485
- #
486
- # To modify the global config, setting the timeout for list_operations
487
- # to 20 seconds, and all remaining timeouts to 10 seconds:
488
- #
489
- # ::Google::Longrunning::Operations::Client.configure do |config|
490
- # config.timeout = 10.0
491
- # config.rpcs.list_operations.timeout = 20.0
492
- # end
493
- #
494
- # To apply the above configuration only to a new client:
495
- #
496
- # client = ::Google::Longrunning::Operations::Client.new do |config|
497
- # config.timeout = 10.0
498
- # config.rpcs.list_operations.timeout = 20.0
499
- # end
589
+ # @example
590
+ #
591
+ # # Modify the global config, setting the timeout for
592
+ # # list_operations to 20 seconds,
593
+ # # and all remaining timeouts to 10 seconds.
594
+ # ::Google::Longrunning::Operations::Client.configure do |config|
595
+ # config.timeout = 10.0
596
+ # config.rpcs.list_operations.timeout = 20.0
597
+ # end
598
+ #
599
+ # # Apply the above configuration only to a new client.
600
+ # client = ::Google::Longrunning::Operations::Client.new do |config|
601
+ # config.timeout = 10.0
602
+ # config.rpcs.list_operations.timeout = 20.0
603
+ # end
500
604
  #
501
605
  # @!attribute [rw] endpoint
502
606
  # The hostname or hostname:port of the service endpoint.
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Vision
23
23
  module V1
24
- VERSION = "0.6.2"
24
+ VERSION = "0.6.3"
25
25
  end
26
26
  end
27
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-vision-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.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-07-12 00:00:00.000000000 Z
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.5'
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.5'
29
+ version: '0.7'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a