google-cloud-automl-v1beta1 0.11.1 → 0.13.0

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.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +31 -21
  3. data/lib/google/cloud/automl/v1beta1/automl/client.rb +52 -25
  4. data/lib/google/cloud/automl/v1beta1/automl/operations.rb +19 -15
  5. data/lib/google/cloud/automl/v1beta1/automl/rest/client.rb +52 -25
  6. data/lib/google/cloud/automl/v1beta1/automl/rest/operations.rb +59 -45
  7. data/lib/google/cloud/automl/v1beta1/automl/rest/service_stub.rb +206 -146
  8. data/lib/google/cloud/automl/v1beta1/prediction_service/client.rb +35 -3
  9. data/lib/google/cloud/automl/v1beta1/prediction_service/operations.rb +19 -15
  10. data/lib/google/cloud/automl/v1beta1/prediction_service/rest/client.rb +35 -3
  11. data/lib/google/cloud/automl/v1beta1/prediction_service/rest/operations.rb +59 -45
  12. data/lib/google/cloud/automl/v1beta1/prediction_service/rest/service_stub.rb +30 -14
  13. data/lib/google/cloud/automl/v1beta1/version.rb +1 -1
  14. data/proto_docs/google/api/client.rb +39 -0
  15. data/proto_docs/google/cloud/automl/v1beta1/annotation_payload.rb +16 -0
  16. data/proto_docs/google/cloud/automl/v1beta1/data_items.rb +12 -0
  17. data/proto_docs/google/cloud/automl/v1beta1/data_stats.rb +12 -0
  18. data/proto_docs/google/cloud/automl/v1beta1/data_types.rb +6 -0
  19. data/proto_docs/google/cloud/automl/v1beta1/dataset.rb +18 -0
  20. data/proto_docs/google/cloud/automl/v1beta1/io.rb +20 -0
  21. data/proto_docs/google/cloud/automl/v1beta1/model.rb +18 -0
  22. data/proto_docs/google/cloud/automl/v1beta1/model_evaluation.rb +14 -0
  23. data/proto_docs/google/cloud/automl/v1beta1/operations.rb +26 -0
  24. data/proto_docs/google/cloud/automl/v1beta1/service.rb +4 -0
  25. data/proto_docs/google/cloud/automl/v1beta1/tables.rb +4 -0
  26. data/proto_docs/google/longrunning/operations.rb +23 -14
  27. data/proto_docs/google/protobuf/struct.rb +12 -0
  28. metadata +6 -9
@@ -254,8 +254,19 @@ module Google
254
254
  endpoint: @config.endpoint,
255
255
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
256
256
  universe_domain: @config.universe_domain,
257
- credentials: credentials
257
+ credentials: credentials,
258
+ logger: @config.logger
258
259
  )
260
+
261
+ @auto_ml_stub.logger(stub: true)&.info do |entry|
262
+ entry.set_system_name
263
+ entry.set_service
264
+ entry.message = "Created client for #{entry.service}"
265
+ entry.set_credentials_fields credentials
266
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
267
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
268
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
269
+ end
259
270
  end
260
271
 
261
272
  ##
@@ -265,6 +276,15 @@ module Google
265
276
  #
266
277
  attr_reader :operations_client
267
278
 
279
+ ##
280
+ # The logger used for request/response debug logging.
281
+ #
282
+ # @return [Logger]
283
+ #
284
+ def logger
285
+ @auto_ml_stub.logger
286
+ end
287
+
268
288
  # Service calls
269
289
 
270
290
  ##
@@ -342,7 +362,6 @@ module Google
342
362
 
343
363
  @auto_ml_stub.create_dataset request, options do |result, operation|
344
364
  yield result, operation if block_given?
345
- return result
346
365
  end
347
366
  rescue ::Gapic::Rest::Error => e
348
367
  raise ::Google::Cloud::Error.from_error(e)
@@ -421,7 +440,6 @@ module Google
421
440
 
422
441
  @auto_ml_stub.get_dataset request, options do |result, operation|
423
442
  yield result, operation if block_given?
424
- return result
425
443
  end
426
444
  rescue ::Gapic::Rest::Error => e
427
445
  raise ::Google::Cloud::Error.from_error(e)
@@ -522,7 +540,7 @@ module Google
522
540
  @auto_ml_stub.list_datasets request, options do |result, operation|
523
541
  result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_datasets, "datasets", request, result, options
524
542
  yield result, operation if block_given?
525
- return result
543
+ throw :response, result
526
544
  end
527
545
  rescue ::Gapic::Rest::Error => e
528
546
  raise ::Google::Cloud::Error.from_error(e)
@@ -603,7 +621,6 @@ module Google
603
621
 
604
622
  @auto_ml_stub.update_dataset request, options do |result, operation|
605
623
  yield result, operation if block_given?
606
- return result
607
624
  end
608
625
  rescue ::Gapic::Rest::Error => e
609
626
  raise ::Google::Cloud::Error.from_error(e)
@@ -694,7 +711,7 @@ module Google
694
711
  @auto_ml_stub.delete_dataset request, options do |result, operation|
695
712
  result = ::Gapic::Operation.new result, @operations_client, options: options
696
713
  yield result, operation if block_given?
697
- return result
714
+ throw :response, result
698
715
  end
699
716
  rescue ::Gapic::Rest::Error => e
700
717
  raise ::Google::Cloud::Error.from_error(e)
@@ -793,7 +810,7 @@ module Google
793
810
  @auto_ml_stub.import_data request, options do |result, operation|
794
811
  result = ::Gapic::Operation.new result, @operations_client, options: options
795
812
  yield result, operation if block_given?
796
- return result
813
+ throw :response, result
797
814
  end
798
815
  rescue ::Gapic::Rest::Error => e
799
816
  raise ::Google::Cloud::Error.from_error(e)
@@ -884,7 +901,7 @@ module Google
884
901
  @auto_ml_stub.export_data request, options do |result, operation|
885
902
  result = ::Gapic::Operation.new result, @operations_client, options: options
886
903
  yield result, operation if block_given?
887
- return result
904
+ throw :response, result
888
905
  end
889
906
  rescue ::Gapic::Rest::Error => e
890
907
  raise ::Google::Cloud::Error.from_error(e)
@@ -963,7 +980,6 @@ module Google
963
980
 
964
981
  @auto_ml_stub.get_annotation_spec request, options do |result, operation|
965
982
  yield result, operation if block_given?
966
- return result
967
983
  end
968
984
  rescue ::Gapic::Rest::Error => e
969
985
  raise ::Google::Cloud::Error.from_error(e)
@@ -1044,7 +1060,6 @@ module Google
1044
1060
 
1045
1061
  @auto_ml_stub.get_table_spec request, options do |result, operation|
1046
1062
  yield result, operation if block_given?
1047
- return result
1048
1063
  end
1049
1064
  rescue ::Gapic::Rest::Error => e
1050
1065
  raise ::Google::Cloud::Error.from_error(e)
@@ -1140,7 +1155,7 @@ module Google
1140
1155
  @auto_ml_stub.list_table_specs request, options do |result, operation|
1141
1156
  result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_table_specs, "table_specs", request, result, options
1142
1157
  yield result, operation if block_given?
1143
- return result
1158
+ throw :response, result
1144
1159
  end
1145
1160
  rescue ::Gapic::Rest::Error => e
1146
1161
  raise ::Google::Cloud::Error.from_error(e)
@@ -1221,7 +1236,6 @@ module Google
1221
1236
 
1222
1237
  @auto_ml_stub.update_table_spec request, options do |result, operation|
1223
1238
  yield result, operation if block_given?
1224
- return result
1225
1239
  end
1226
1240
  rescue ::Gapic::Rest::Error => e
1227
1241
  raise ::Google::Cloud::Error.from_error(e)
@@ -1302,7 +1316,6 @@ module Google
1302
1316
 
1303
1317
  @auto_ml_stub.get_column_spec request, options do |result, operation|
1304
1318
  yield result, operation if block_given?
1305
- return result
1306
1319
  end
1307
1320
  rescue ::Gapic::Rest::Error => e
1308
1321
  raise ::Google::Cloud::Error.from_error(e)
@@ -1398,7 +1411,7 @@ module Google
1398
1411
  @auto_ml_stub.list_column_specs request, options do |result, operation|
1399
1412
  result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_column_specs, "column_specs", request, result, options
1400
1413
  yield result, operation if block_given?
1401
- return result
1414
+ throw :response, result
1402
1415
  end
1403
1416
  rescue ::Gapic::Rest::Error => e
1404
1417
  raise ::Google::Cloud::Error.from_error(e)
@@ -1479,7 +1492,6 @@ module Google
1479
1492
 
1480
1493
  @auto_ml_stub.update_column_spec request, options do |result, operation|
1481
1494
  yield result, operation if block_given?
1482
- return result
1483
1495
  end
1484
1496
  rescue ::Gapic::Rest::Error => e
1485
1497
  raise ::Google::Cloud::Error.from_error(e)
@@ -1572,7 +1584,7 @@ module Google
1572
1584
  @auto_ml_stub.create_model request, options do |result, operation|
1573
1585
  result = ::Gapic::Operation.new result, @operations_client, options: options
1574
1586
  yield result, operation if block_given?
1575
- return result
1587
+ throw :response, result
1576
1588
  end
1577
1589
  rescue ::Gapic::Rest::Error => e
1578
1590
  raise ::Google::Cloud::Error.from_error(e)
@@ -1651,7 +1663,6 @@ module Google
1651
1663
 
1652
1664
  @auto_ml_stub.get_model request, options do |result, operation|
1653
1665
  yield result, operation if block_given?
1654
- return result
1655
1666
  end
1656
1667
  rescue ::Gapic::Rest::Error => e
1657
1668
  raise ::Google::Cloud::Error.from_error(e)
@@ -1752,7 +1763,7 @@ module Google
1752
1763
  @auto_ml_stub.list_models request, options do |result, operation|
1753
1764
  result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_models, "model", request, result, options
1754
1765
  yield result, operation if block_given?
1755
- return result
1766
+ throw :response, result
1756
1767
  end
1757
1768
  rescue ::Gapic::Rest::Error => e
1758
1769
  raise ::Google::Cloud::Error.from_error(e)
@@ -1843,7 +1854,7 @@ module Google
1843
1854
  @auto_ml_stub.delete_model request, options do |result, operation|
1844
1855
  result = ::Gapic::Operation.new result, @operations_client, options: options
1845
1856
  yield result, operation if block_given?
1846
- return result
1857
+ throw :response, result
1847
1858
  end
1848
1859
  rescue ::Gapic::Rest::Error => e
1849
1860
  raise ::Google::Cloud::Error.from_error(e)
@@ -1880,8 +1891,12 @@ module Google
1880
1891
  #
1881
1892
  # @param image_object_detection_model_deployment_metadata [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionModelDeploymentMetadata, ::Hash]
1882
1893
  # Model deployment metadata specific to Image Object Detection.
1894
+ #
1895
+ # Note: The following fields are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared.
1883
1896
  # @param image_classification_model_deployment_metadata [::Google::Cloud::AutoML::V1beta1::ImageClassificationModelDeploymentMetadata, ::Hash]
1884
1897
  # Model deployment metadata specific to Image Classification.
1898
+ #
1899
+ # Note: The following fields are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared.
1885
1900
  # @param name [::String]
1886
1901
  # Required. Resource name of the model to deploy.
1887
1902
  # @yield [result, operation] Access the result along with the TransportOperation object
@@ -1945,7 +1960,7 @@ module Google
1945
1960
  @auto_ml_stub.deploy_model request, options do |result, operation|
1946
1961
  result = ::Gapic::Operation.new result, @operations_client, options: options
1947
1962
  yield result, operation if block_given?
1948
- return result
1963
+ throw :response, result
1949
1964
  end
1950
1965
  rescue ::Gapic::Rest::Error => e
1951
1966
  raise ::Google::Cloud::Error.from_error(e)
@@ -2038,7 +2053,7 @@ module Google
2038
2053
  @auto_ml_stub.undeploy_model request, options do |result, operation|
2039
2054
  result = ::Gapic::Operation.new result, @operations_client, options: options
2040
2055
  yield result, operation if block_given?
2041
- return result
2056
+ throw :response, result
2042
2057
  end
2043
2058
  rescue ::Gapic::Rest::Error => e
2044
2059
  raise ::Google::Cloud::Error.from_error(e)
@@ -2134,7 +2149,7 @@ module Google
2134
2149
  @auto_ml_stub.export_model request, options do |result, operation|
2135
2150
  result = ::Gapic::Operation.new result, @operations_client, options: options
2136
2151
  yield result, operation if block_given?
2137
- return result
2152
+ throw :response, result
2138
2153
  end
2139
2154
  rescue ::Gapic::Rest::Error => e
2140
2155
  raise ::Google::Cloud::Error.from_error(e)
@@ -2237,7 +2252,7 @@ module Google
2237
2252
  @auto_ml_stub.export_evaluated_examples request, options do |result, operation|
2238
2253
  result = ::Gapic::Operation.new result, @operations_client, options: options
2239
2254
  yield result, operation if block_given?
2240
- return result
2255
+ throw :response, result
2241
2256
  end
2242
2257
  rescue ::Gapic::Rest::Error => e
2243
2258
  raise ::Google::Cloud::Error.from_error(e)
@@ -2316,7 +2331,6 @@ module Google
2316
2331
 
2317
2332
  @auto_ml_stub.get_model_evaluation request, options do |result, operation|
2318
2333
  yield result, operation if block_given?
2319
- return result
2320
2334
  end
2321
2335
  rescue ::Gapic::Rest::Error => e
2322
2336
  raise ::Google::Cloud::Error.from_error(e)
@@ -2421,7 +2435,7 @@ module Google
2421
2435
  @auto_ml_stub.list_model_evaluations request, options do |result, operation|
2422
2436
  result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_model_evaluations, "model_evaluation", request, result, options
2423
2437
  yield result, operation if block_given?
2424
- return result
2438
+ throw :response, result
2425
2439
  end
2426
2440
  rescue ::Gapic::Rest::Error => e
2427
2441
  raise ::Google::Cloud::Error.from_error(e)
@@ -2469,6 +2483,13 @@ module Google
2469
2483
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
2470
2484
  # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
2471
2485
  # * (`nil`) indicating no credentials
2486
+ #
2487
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
2488
+ # external source for authentication to Google Cloud, you must validate it before
2489
+ # providing it to a Google API client library. Providing an unvalidated credential
2490
+ # configuration to Google APIs can compromise the security of your systems and data.
2491
+ # For more information, refer to [Validate credential configurations from external
2492
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
2472
2493
  # @return [::Object]
2473
2494
  # @!attribute [rw] scope
2474
2495
  # The OAuth scopes
@@ -2501,6 +2522,11 @@ module Google
2501
2522
  # default endpoint URL. The default value of nil uses the environment
2502
2523
  # universe (usually the default "googleapis.com" universe).
2503
2524
  # @return [::String,nil]
2525
+ # @!attribute [rw] logger
2526
+ # A custom logger to use for request/response debug logging, or the value
2527
+ # `:default` (the default) to construct a default logger, or `nil` to
2528
+ # explicitly disable logging.
2529
+ # @return [::Logger,:default,nil]
2504
2530
  #
2505
2531
  class Configuration
2506
2532
  extend ::Gapic::Config
@@ -2522,6 +2548,7 @@ module Google
2522
2548
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2523
2549
  config_attr :quota_project, nil, ::String, nil
2524
2550
  config_attr :universe_domain, nil, ::String, nil
2551
+ config_attr :logger, :default, ::Logger, nil, :default
2525
2552
 
2526
2553
  # @private
2527
2554
  def initialize parent_config = nil
@@ -115,14 +115,6 @@ module Google
115
115
  # Lists operations that match the specified filter in the request. If the
116
116
  # server doesn't support this method, it returns `UNIMPLEMENTED`.
117
117
  #
118
- # NOTE: the `name` binding allows API services to override the binding
119
- # to use different resource name schemes, such as `users/*/operations`. To
120
- # override the binding, API services can add a binding such as
121
- # `"/v1/{name=users/*}/operations"` to their service configuration.
122
- # For backwards compatibility, the default name includes the operations
123
- # collection id, however overriding users must ensure the name binding
124
- # is the parent resource, without the operations collection id.
125
- #
126
118
  # @overload list_operations(request, options = nil)
127
119
  # Pass arguments to `list_operations` via a request object, either of type
128
120
  # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
@@ -204,7 +196,7 @@ module Google
204
196
  @operations_stub.list_operations request, options do |result, operation|
205
197
  result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options
206
198
  yield result, operation if block_given?
207
- return result
199
+ throw :response, result
208
200
  end
209
201
  rescue ::Gapic::Rest::Error => e
210
202
  raise ::Google::Cloud::Error.from_error(e)
@@ -293,7 +285,7 @@ module Google
293
285
  @operations_stub.get_operation request, options do |result, operation|
294
286
  result = ::Gapic::Operation.new result, @operations_client, options: options
295
287
  yield result, operation if block_given?
296
- return result
288
+ throw :response, result
297
289
  end
298
290
  rescue ::Gapic::Rest::Error => e
299
291
  raise ::Google::Cloud::Error.from_error(e)
@@ -375,7 +367,6 @@ module Google
375
367
 
376
368
  @operations_stub.delete_operation request, options do |result, operation|
377
369
  yield result, operation if block_given?
378
- return result
379
370
  end
380
371
  rescue ::Gapic::Rest::Error => e
381
372
  raise ::Google::Cloud::Error.from_error(e)
@@ -390,8 +381,9 @@ module Google
390
381
  # other methods to check whether the cancellation succeeded or whether the
391
382
  # operation completed despite cancellation. On successful cancellation,
392
383
  # the operation is not deleted; instead, it becomes an operation with
393
- # an {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
394
- # corresponding to `Code.CANCELLED`.
384
+ # an {::Google::Longrunning::Operation#error Operation.error} value with a
385
+ # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
386
+ # `Code.CANCELLED`.
395
387
  #
396
388
  # @overload cancel_operation(request, options = nil)
397
389
  # Pass arguments to `cancel_operation` via a request object, either of type
@@ -463,7 +455,6 @@ module Google
463
455
 
464
456
  @operations_stub.cancel_operation request, options do |result, operation|
465
457
  yield result, operation if block_given?
466
- return result
467
458
  end
468
459
  rescue ::Gapic::Rest::Error => e
469
460
  raise ::Google::Cloud::Error.from_error(e)
@@ -562,7 +553,7 @@ module Google
562
553
  @operations_stub.wait_operation request, options do |result, operation|
563
554
  result = ::Gapic::Operation.new result, @operations_client, options: options
564
555
  yield result, operation if block_given?
565
- return result
556
+ throw :response, result
566
557
  end
567
558
  rescue ::Gapic::Rest::Error => e
568
559
  raise ::Google::Cloud::Error.from_error(e)
@@ -610,6 +601,13 @@ module Google
610
601
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
611
602
  # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
612
603
  # * (`nil`) indicating no credentials
604
+ #
605
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
606
+ # external source for authentication to Google Cloud, you must validate it before
607
+ # providing it to a Google API client library. Providing an unvalidated credential
608
+ # configuration to Google APIs can compromise the security of your systems and data.
609
+ # For more information, refer to [Validate credential configurations from external
610
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
613
611
  # @return [::Object]
614
612
  # @!attribute [rw] scope
615
613
  # The OAuth scopes
@@ -642,6 +640,11 @@ module Google
642
640
  # default endpoint URL. The default value of nil uses the environment
643
641
  # universe (usually the default "googleapis.com" universe).
644
642
  # @return [::String,nil]
643
+ # @!attribute [rw] logger
644
+ # A custom logger to use for request/response debug logging, or the value
645
+ # `:default` (the default) to construct a default logger, or `nil` to
646
+ # explicitly disable logging.
647
+ # @return [::Logger,:default,nil]
645
648
  #
646
649
  class Configuration
647
650
  extend ::Gapic::Config
@@ -663,6 +666,7 @@ module Google
663
666
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
664
667
  config_attr :quota_project, nil, ::String, nil
665
668
  config_attr :universe_domain, nil, ::String, nil
669
+ config_attr :logger, :default, ::Logger, nil, :default
666
670
 
667
671
  # @private
668
672
  def initialize parent_config = nil
@@ -789,16 +793,18 @@ module Google
789
793
 
790
794
  response = @client_stub.make_http_request(
791
795
  verb,
792
- uri: uri,
793
- body: body || "",
794
- params: query_string_params,
796
+ uri: uri,
797
+ body: body || "",
798
+ params: query_string_params,
799
+ method_name: "list_operations",
795
800
  options: options
796
801
  )
797
802
  operation = ::Gapic::Rest::TransportOperation.new response
798
803
  result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true
799
-
800
- yield result, operation if block_given?
801
- result
804
+ catch :response do
805
+ yield result, operation if block_given?
806
+ result
807
+ end
802
808
  end
803
809
 
804
810
  ##
@@ -827,16 +833,18 @@ module Google
827
833
 
828
834
  response = @client_stub.make_http_request(
829
835
  verb,
830
- uri: uri,
831
- body: body || "",
832
- params: query_string_params,
836
+ uri: uri,
837
+ body: body || "",
838
+ params: query_string_params,
839
+ method_name: "get_operation",
833
840
  options: options
834
841
  )
835
842
  operation = ::Gapic::Rest::TransportOperation.new response
836
843
  result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
837
-
838
- yield result, operation if block_given?
839
- result
844
+ catch :response do
845
+ yield result, operation if block_given?
846
+ result
847
+ end
840
848
  end
841
849
 
842
850
  ##
@@ -865,16 +873,18 @@ module Google
865
873
 
866
874
  response = @client_stub.make_http_request(
867
875
  verb,
868
- uri: uri,
869
- body: body || "",
870
- params: query_string_params,
876
+ uri: uri,
877
+ body: body || "",
878
+ params: query_string_params,
879
+ method_name: "delete_operation",
871
880
  options: options
872
881
  )
873
882
  operation = ::Gapic::Rest::TransportOperation.new response
874
883
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
875
-
876
- yield result, operation if block_given?
877
- result
884
+ catch :response do
885
+ yield result, operation if block_given?
886
+ result
887
+ end
878
888
  end
879
889
 
880
890
  ##
@@ -903,16 +913,18 @@ module Google
903
913
 
904
914
  response = @client_stub.make_http_request(
905
915
  verb,
906
- uri: uri,
907
- body: body || "",
908
- params: query_string_params,
916
+ uri: uri,
917
+ body: body || "",
918
+ params: query_string_params,
919
+ method_name: "cancel_operation",
909
920
  options: options
910
921
  )
911
922
  operation = ::Gapic::Rest::TransportOperation.new response
912
923
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
913
-
914
- yield result, operation if block_given?
915
- result
924
+ catch :response do
925
+ yield result, operation if block_given?
926
+ result
927
+ end
916
928
  end
917
929
 
918
930
  ##
@@ -941,16 +953,18 @@ module Google
941
953
 
942
954
  response = @client_stub.make_http_request(
943
955
  verb,
944
- uri: uri,
945
- body: body || "",
946
- params: query_string_params,
956
+ uri: uri,
957
+ body: body || "",
958
+ params: query_string_params,
959
+ method_name: "wait_operation",
947
960
  options: options
948
961
  )
949
962
  operation = ::Gapic::Rest::TransportOperation.new response
950
963
  result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
951
-
952
- yield result, operation if block_given?
953
- result
964
+ catch :response do
965
+ yield result, operation if block_given?
966
+ result
967
+ end
954
968
  end
955
969
 
956
970
  ##