google-cloud-gke_hub-v1beta1 0.11.0 → 0.12.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.
@@ -43,6 +43,9 @@ module Google
43
43
  # with Membership resources.
44
44
  #
45
45
  class Client
46
+ # @private
47
+ API_VERSION = ""
48
+
46
49
  # @private
47
50
  DEFAULT_ENDPOINT_TEMPLATE = "gkehub.$UNIVERSE_DOMAIN$"
48
51
 
@@ -170,15 +173,27 @@ module Google
170
173
  endpoint: @config.endpoint,
171
174
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
172
175
  universe_domain: @config.universe_domain,
173
- credentials: credentials
176
+ credentials: credentials,
177
+ logger: @config.logger
174
178
  )
175
179
 
180
+ @gke_hub_membership_service_stub.logger(stub: true)&.info do |entry|
181
+ entry.set_system_name
182
+ entry.set_service
183
+ entry.message = "Created client for #{entry.service}"
184
+ entry.set_credentials_fields credentials
185
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
186
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
187
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
188
+ end
189
+
176
190
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
177
191
  config.credentials = credentials
178
192
  config.quota_project = @quota_project_id
179
193
  config.endpoint = @gke_hub_membership_service_stub.endpoint
180
194
  config.universe_domain = @gke_hub_membership_service_stub.universe_domain
181
195
  config.bindings_override = @config.bindings_override
196
+ config.logger = @gke_hub_membership_service_stub.logger if config.respond_to? :logger=
182
197
  end
183
198
 
184
199
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
@@ -187,6 +202,7 @@ module Google
187
202
  config.endpoint = @gke_hub_membership_service_stub.endpoint
188
203
  config.universe_domain = @gke_hub_membership_service_stub.universe_domain
189
204
  config.bindings_override = @config.bindings_override
205
+ config.logger = @gke_hub_membership_service_stub.logger if config.respond_to? :logger=
190
206
  end
191
207
  end
192
208
 
@@ -211,6 +227,15 @@ module Google
211
227
  #
212
228
  attr_reader :iam_policy_client
213
229
 
230
+ ##
231
+ # The logger used for request/response debug logging.
232
+ #
233
+ # @return [Logger]
234
+ #
235
+ def logger
236
+ @gke_hub_membership_service_stub.logger
237
+ end
238
+
214
239
  # Service calls
215
240
 
216
241
  ##
@@ -305,12 +330,13 @@ module Google
305
330
  # Customize the options with defaults
306
331
  call_metadata = @config.rpcs.list_memberships.metadata.to_h
307
332
 
308
- # Set x-goog-api-client and x-goog-user-project headers
333
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
309
334
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
310
335
  lib_name: @config.lib_name, lib_version: @config.lib_version,
311
336
  gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION,
312
337
  transports_version_send: [:rest]
313
338
 
339
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
314
340
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
315
341
 
316
342
  options.apply_defaults timeout: @config.rpcs.list_memberships.timeout,
@@ -323,7 +349,6 @@ module Google
323
349
 
324
350
  @gke_hub_membership_service_stub.list_memberships request, options do |result, operation|
325
351
  yield result, operation if block_given?
326
- return result
327
352
  end
328
353
  rescue ::Gapic::Rest::Error => e
329
354
  raise ::Google::Cloud::Error.from_error(e)
@@ -384,12 +409,13 @@ module Google
384
409
  # Customize the options with defaults
385
410
  call_metadata = @config.rpcs.get_membership.metadata.to_h
386
411
 
387
- # Set x-goog-api-client and x-goog-user-project headers
412
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
388
413
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
389
414
  lib_name: @config.lib_name, lib_version: @config.lib_version,
390
415
  gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION,
391
416
  transports_version_send: [:rest]
392
417
 
418
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
393
419
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
394
420
 
395
421
  options.apply_defaults timeout: @config.rpcs.get_membership.timeout,
@@ -402,7 +428,6 @@ module Google
402
428
 
403
429
  @gke_hub_membership_service_stub.get_membership request, options do |result, operation|
404
430
  yield result, operation if block_given?
405
- return result
406
431
  end
407
432
  rescue ::Gapic::Rest::Error => e
408
433
  raise ::Google::Cloud::Error.from_error(e)
@@ -500,12 +525,13 @@ module Google
500
525
  # Customize the options with defaults
501
526
  call_metadata = @config.rpcs.create_membership.metadata.to_h
502
527
 
503
- # Set x-goog-api-client and x-goog-user-project headers
528
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
504
529
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
505
530
  lib_name: @config.lib_name, lib_version: @config.lib_version,
506
531
  gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION,
507
532
  transports_version_send: [:rest]
508
533
 
534
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
509
535
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
510
536
 
511
537
  options.apply_defaults timeout: @config.rpcs.create_membership.timeout,
@@ -519,7 +545,7 @@ module Google
519
545
  @gke_hub_membership_service_stub.create_membership request, options do |result, operation|
520
546
  result = ::Gapic::Operation.new result, @operations_client, options: options
521
547
  yield result, operation if block_given?
522
- return result
548
+ throw :response, result
523
549
  end
524
550
  rescue ::Gapic::Rest::Error => e
525
551
  raise ::Google::Cloud::Error.from_error(e)
@@ -609,12 +635,13 @@ module Google
609
635
  # Customize the options with defaults
610
636
  call_metadata = @config.rpcs.delete_membership.metadata.to_h
611
637
 
612
- # Set x-goog-api-client and x-goog-user-project headers
638
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
613
639
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
614
640
  lib_name: @config.lib_name, lib_version: @config.lib_version,
615
641
  gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION,
616
642
  transports_version_send: [:rest]
617
643
 
644
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
618
645
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
619
646
 
620
647
  options.apply_defaults timeout: @config.rpcs.delete_membership.timeout,
@@ -628,7 +655,7 @@ module Google
628
655
  @gke_hub_membership_service_stub.delete_membership request, options do |result, operation|
629
656
  result = ::Gapic::Operation.new result, @operations_client, options: options
630
657
  yield result, operation if block_given?
631
- return result
658
+ throw :response, result
632
659
  end
633
660
  rescue ::Gapic::Rest::Error => e
634
661
  raise ::Google::Cloud::Error.from_error(e)
@@ -722,12 +749,13 @@ module Google
722
749
  # Customize the options with defaults
723
750
  call_metadata = @config.rpcs.update_membership.metadata.to_h
724
751
 
725
- # Set x-goog-api-client and x-goog-user-project headers
752
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
726
753
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
727
754
  lib_name: @config.lib_name, lib_version: @config.lib_version,
728
755
  gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION,
729
756
  transports_version_send: [:rest]
730
757
 
758
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
731
759
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
732
760
 
733
761
  options.apply_defaults timeout: @config.rpcs.update_membership.timeout,
@@ -741,7 +769,7 @@ module Google
741
769
  @gke_hub_membership_service_stub.update_membership request, options do |result, operation|
742
770
  result = ::Gapic::Operation.new result, @operations_client, options: options
743
771
  yield result, operation if block_given?
744
- return result
772
+ throw :response, result
745
773
  end
746
774
  rescue ::Gapic::Rest::Error => e
747
775
  raise ::Google::Cloud::Error.from_error(e)
@@ -818,12 +846,13 @@ module Google
818
846
  # Customize the options with defaults
819
847
  call_metadata = @config.rpcs.generate_connect_manifest.metadata.to_h
820
848
 
821
- # Set x-goog-api-client and x-goog-user-project headers
849
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
822
850
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
823
851
  lib_name: @config.lib_name, lib_version: @config.lib_version,
824
852
  gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION,
825
853
  transports_version_send: [:rest]
826
854
 
855
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
827
856
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
828
857
 
829
858
  options.apply_defaults timeout: @config.rpcs.generate_connect_manifest.timeout,
@@ -836,7 +865,6 @@ module Google
836
865
 
837
866
  @gke_hub_membership_service_stub.generate_connect_manifest request, options do |result, operation|
838
867
  yield result, operation if block_given?
839
- return result
840
868
  end
841
869
  rescue ::Gapic::Rest::Error => e
842
870
  raise ::Google::Cloud::Error.from_error(e)
@@ -905,12 +933,13 @@ module Google
905
933
  # Customize the options with defaults
906
934
  call_metadata = @config.rpcs.validate_exclusivity.metadata.to_h
907
935
 
908
- # Set x-goog-api-client and x-goog-user-project headers
936
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
909
937
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
910
938
  lib_name: @config.lib_name, lib_version: @config.lib_version,
911
939
  gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION,
912
940
  transports_version_send: [:rest]
913
941
 
942
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
914
943
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
915
944
 
916
945
  options.apply_defaults timeout: @config.rpcs.validate_exclusivity.timeout,
@@ -923,7 +952,6 @@ module Google
923
952
 
924
953
  @gke_hub_membership_service_stub.validate_exclusivity request, options do |result, operation|
925
954
  yield result, operation if block_given?
926
- return result
927
955
  end
928
956
  rescue ::Gapic::Rest::Error => e
929
957
  raise ::Google::Cloud::Error.from_error(e)
@@ -1003,12 +1031,13 @@ module Google
1003
1031
  # Customize the options with defaults
1004
1032
  call_metadata = @config.rpcs.generate_exclusivity_manifest.metadata.to_h
1005
1033
 
1006
- # Set x-goog-api-client and x-goog-user-project headers
1034
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1007
1035
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1008
1036
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1009
1037
  gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION,
1010
1038
  transports_version_send: [:rest]
1011
1039
 
1040
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1012
1041
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1013
1042
 
1014
1043
  options.apply_defaults timeout: @config.rpcs.generate_exclusivity_manifest.timeout,
@@ -1021,7 +1050,6 @@ module Google
1021
1050
 
1022
1051
  @gke_hub_membership_service_stub.generate_exclusivity_manifest request, options do |result, operation|
1023
1052
  yield result, operation if block_given?
1024
- return result
1025
1053
  end
1026
1054
  rescue ::Gapic::Rest::Error => e
1027
1055
  raise ::Google::Cloud::Error.from_error(e)
@@ -1101,6 +1129,11 @@ module Google
1101
1129
  # default endpoint URL. The default value of nil uses the environment
1102
1130
  # universe (usually the default "googleapis.com" universe).
1103
1131
  # @return [::String,nil]
1132
+ # @!attribute [rw] logger
1133
+ # A custom logger to use for request/response debug logging, or the value
1134
+ # `:default` (the default) to construct a default logger, or `nil` to
1135
+ # explicitly disable logging.
1136
+ # @return [::Logger,:default,nil]
1104
1137
  #
1105
1138
  class Configuration
1106
1139
  extend ::Gapic::Config
@@ -1129,6 +1162,7 @@ module Google
1129
1162
  # by the host service.
1130
1163
  # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
1131
1164
  config_attr :bindings_override, {}, ::Hash, nil
1165
+ config_attr :logger, :default, ::Logger, nil, :default
1132
1166
 
1133
1167
  # @private
1134
1168
  def initialize parent_config = nil
@@ -26,6 +26,9 @@ module Google
26
26
  module Rest
27
27
  # Service that implements Longrunning Operations API.
28
28
  class Operations
29
+ # @private
30
+ API_VERSION = ""
31
+
29
32
  # @private
30
33
  DEFAULT_ENDPOINT_TEMPLATE = "gkehub.$UNIVERSE_DOMAIN$"
31
34
 
@@ -112,14 +115,6 @@ module Google
112
115
  # Lists operations that match the specified filter in the request. If the
113
116
  # server doesn't support this method, it returns `UNIMPLEMENTED`.
114
117
  #
115
- # NOTE: the `name` binding allows API services to override the binding
116
- # to use different resource name schemes, such as `users/*/operations`. To
117
- # override the binding, API services can add a binding such as
118
- # `"/v1/{name=users/*}/operations"` to their service configuration.
119
- # For backwards compatibility, the default name includes the operations
120
- # collection id, however overriding users must ensure the name binding
121
- # is the parent resource, without the operations collection id.
122
- #
123
118
  # @overload list_operations(request, options = nil)
124
119
  # Pass arguments to `list_operations` via a request object, either of type
125
120
  # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
@@ -181,12 +176,13 @@ module Google
181
176
  # Customize the options with defaults
182
177
  call_metadata = @config.rpcs.list_operations.metadata.to_h
183
178
 
184
- # Set x-goog-api-client and x-goog-user-project headers
179
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
185
180
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
186
181
  lib_name: @config.lib_name, lib_version: @config.lib_version,
187
182
  gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION,
188
183
  transports_version_send: [:rest]
189
184
 
185
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
190
186
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
191
187
 
192
188
  options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
@@ -200,7 +196,7 @@ module Google
200
196
  @operations_stub.list_operations request, options do |result, operation|
201
197
  result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options
202
198
  yield result, operation if block_given?
203
- return result
199
+ throw :response, result
204
200
  end
205
201
  rescue ::Gapic::Rest::Error => e
206
202
  raise ::Google::Cloud::Error.from_error(e)
@@ -269,12 +265,13 @@ module Google
269
265
  # Customize the options with defaults
270
266
  call_metadata = @config.rpcs.get_operation.metadata.to_h
271
267
 
272
- # Set x-goog-api-client and x-goog-user-project headers
268
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
273
269
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
274
270
  lib_name: @config.lib_name, lib_version: @config.lib_version,
275
271
  gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION,
276
272
  transports_version_send: [:rest]
277
273
 
274
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
278
275
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
279
276
 
280
277
  options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
@@ -288,7 +285,7 @@ module Google
288
285
  @operations_stub.get_operation request, options do |result, operation|
289
286
  result = ::Gapic::Operation.new result, @operations_client, options: options
290
287
  yield result, operation if block_given?
291
- return result
288
+ throw :response, result
292
289
  end
293
290
  rescue ::Gapic::Rest::Error => e
294
291
  raise ::Google::Cloud::Error.from_error(e)
@@ -351,12 +348,13 @@ module Google
351
348
  # Customize the options with defaults
352
349
  call_metadata = @config.rpcs.delete_operation.metadata.to_h
353
350
 
354
- # Set x-goog-api-client and x-goog-user-project headers
351
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
355
352
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
356
353
  lib_name: @config.lib_name, lib_version: @config.lib_version,
357
354
  gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION,
358
355
  transports_version_send: [:rest]
359
356
 
357
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
360
358
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
361
359
 
362
360
  options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
@@ -369,7 +367,6 @@ module Google
369
367
 
370
368
  @operations_stub.delete_operation request, options do |result, operation|
371
369
  yield result, operation if block_given?
372
- return result
373
370
  end
374
371
  rescue ::Gapic::Rest::Error => e
375
372
  raise ::Google::Cloud::Error.from_error(e)
@@ -384,8 +381,9 @@ module Google
384
381
  # other methods to check whether the cancellation succeeded or whether the
385
382
  # operation completed despite cancellation. On successful cancellation,
386
383
  # the operation is not deleted; instead, it becomes an operation with
387
- # an {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
388
- # 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`.
389
387
  #
390
388
  # @overload cancel_operation(request, options = nil)
391
389
  # Pass arguments to `cancel_operation` via a request object, either of type
@@ -438,12 +436,13 @@ module Google
438
436
  # Customize the options with defaults
439
437
  call_metadata = @config.rpcs.cancel_operation.metadata.to_h
440
438
 
441
- # Set x-goog-api-client and x-goog-user-project headers
439
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
442
440
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
443
441
  lib_name: @config.lib_name, lib_version: @config.lib_version,
444
442
  gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION,
445
443
  transports_version_send: [:rest]
446
444
 
445
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
447
446
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
448
447
 
449
448
  options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
@@ -456,7 +455,6 @@ module Google
456
455
 
457
456
  @operations_stub.cancel_operation request, options do |result, operation|
458
457
  yield result, operation if block_given?
459
- return result
460
458
  end
461
459
  rescue ::Gapic::Rest::Error => e
462
460
  raise ::Google::Cloud::Error.from_error(e)
@@ -536,6 +534,11 @@ module Google
536
534
  # default endpoint URL. The default value of nil uses the environment
537
535
  # universe (usually the default "googleapis.com" universe).
538
536
  # @return [::String,nil]
537
+ # @!attribute [rw] logger
538
+ # A custom logger to use for request/response debug logging, or the value
539
+ # `:default` (the default) to construct a default logger, or `nil` to
540
+ # explicitly disable logging.
541
+ # @return [::Logger,:default,nil]
539
542
  #
540
543
  class Configuration
541
544
  extend ::Gapic::Config
@@ -557,6 +560,7 @@ module Google
557
560
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
558
561
  config_attr :quota_project, nil, ::String, nil
559
562
  config_attr :universe_domain, nil, ::String, nil
563
+ config_attr :logger, :default, ::Logger, nil, :default
560
564
 
561
565
  # @private
562
566
  def initialize parent_config = nil
@@ -676,16 +680,18 @@ module Google
676
680
 
677
681
  response = @client_stub.make_http_request(
678
682
  verb,
679
- uri: uri,
680
- body: body || "",
681
- params: query_string_params,
683
+ uri: uri,
684
+ body: body || "",
685
+ params: query_string_params,
686
+ method_name: "list_operations",
682
687
  options: options
683
688
  )
684
689
  operation = ::Gapic::Rest::TransportOperation.new response
685
690
  result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true
686
-
687
- yield result, operation if block_given?
688
- result
691
+ catch :response do
692
+ yield result, operation if block_given?
693
+ result
694
+ end
689
695
  end
690
696
 
691
697
  ##
@@ -714,16 +720,18 @@ module Google
714
720
 
715
721
  response = @client_stub.make_http_request(
716
722
  verb,
717
- uri: uri,
718
- body: body || "",
719
- params: query_string_params,
723
+ uri: uri,
724
+ body: body || "",
725
+ params: query_string_params,
726
+ method_name: "get_operation",
720
727
  options: options
721
728
  )
722
729
  operation = ::Gapic::Rest::TransportOperation.new response
723
730
  result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
724
-
725
- yield result, operation if block_given?
726
- result
731
+ catch :response do
732
+ yield result, operation if block_given?
733
+ result
734
+ end
727
735
  end
728
736
 
729
737
  ##
@@ -752,16 +760,18 @@ module Google
752
760
 
753
761
  response = @client_stub.make_http_request(
754
762
  verb,
755
- uri: uri,
756
- body: body || "",
757
- params: query_string_params,
763
+ uri: uri,
764
+ body: body || "",
765
+ params: query_string_params,
766
+ method_name: "delete_operation",
758
767
  options: options
759
768
  )
760
769
  operation = ::Gapic::Rest::TransportOperation.new response
761
770
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
762
-
763
- yield result, operation if block_given?
764
- result
771
+ catch :response do
772
+ yield result, operation if block_given?
773
+ result
774
+ end
765
775
  end
766
776
 
767
777
  ##
@@ -790,16 +800,18 @@ module Google
790
800
 
791
801
  response = @client_stub.make_http_request(
792
802
  verb,
793
- uri: uri,
794
- body: body || "",
795
- params: query_string_params,
803
+ uri: uri,
804
+ body: body || "",
805
+ params: query_string_params,
806
+ method_name: "cancel_operation",
796
807
  options: options
797
808
  )
798
809
  operation = ::Gapic::Rest::TransportOperation.new response
799
810
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
800
-
801
- yield result, operation if block_given?
802
- result
811
+ catch :response do
812
+ yield result, operation if block_given?
813
+ result
814
+ end
803
815
  end
804
816
 
805
817
  ##