google-ads-ad_manager-v1 0.1.0 → 0.2.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 (33) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +36 -0
  3. data/lib/google/ads/ad_manager/v1/ad_unit_service/rest/client.rb +29 -4
  4. data/lib/google/ads/ad_manager/v1/ad_unit_service/rest/service_stub.rb +38 -20
  5. data/lib/google/ads/ad_manager/v1/company_service/rest/client.rb +28 -3
  6. data/lib/google/ads/ad_manager/v1/company_service/rest/service_stub.rb +30 -14
  7. data/lib/google/ads/ad_manager/v1/custom_field_service/rest/client.rb +28 -3
  8. data/lib/google/ads/ad_manager/v1/custom_field_service/rest/service_stub.rb +30 -14
  9. data/lib/google/ads/ad_manager/v1/custom_targeting_key_service/rest/client.rb +28 -3
  10. data/lib/google/ads/ad_manager/v1/custom_targeting_key_service/rest/service_stub.rb +30 -14
  11. data/lib/google/ads/ad_manager/v1/custom_targeting_value_service/rest/client.rb +28 -3
  12. data/lib/google/ads/ad_manager/v1/custom_targeting_value_service/rest/service_stub.rb +30 -14
  13. data/lib/google/ads/ad_manager/v1/entity_signals_mapping_service/rest/client.rb +28 -7
  14. data/lib/google/ads/ad_manager/v1/entity_signals_mapping_service/rest/service_stub.rb +62 -38
  15. data/lib/google/ads/ad_manager/v1/network_service/rest/client.rb +27 -3
  16. data/lib/google/ads/ad_manager/v1/network_service/rest/service_stub.rb +30 -14
  17. data/lib/google/ads/ad_manager/v1/order_service/rest/client.rb +28 -3
  18. data/lib/google/ads/ad_manager/v1/order_service/rest/service_stub.rb +30 -14
  19. data/lib/google/ads/ad_manager/v1/placement_service/rest/client.rb +28 -3
  20. data/lib/google/ads/ad_manager/v1/placement_service/rest/service_stub.rb +30 -14
  21. data/lib/google/ads/ad_manager/v1/report_service/rest/client.rb +29 -7
  22. data/lib/google/ads/ad_manager/v1/report_service/rest/operations.rb +43 -38
  23. data/lib/google/ads/ad_manager/v1/report_service/rest/service_stub.rb +62 -38
  24. data/lib/google/ads/ad_manager/v1/role_service/rest/client.rb +28 -3
  25. data/lib/google/ads/ad_manager/v1/role_service/rest/service_stub.rb +30 -14
  26. data/lib/google/ads/ad_manager/v1/taxonomy_category_service/rest/client.rb +28 -3
  27. data/lib/google/ads/ad_manager/v1/taxonomy_category_service/rest/service_stub.rb +30 -14
  28. data/lib/google/ads/ad_manager/v1/user_service/rest/client.rb +27 -2
  29. data/lib/google/ads/ad_manager/v1/user_service/rest/service_stub.rb +22 -8
  30. data/lib/google/ads/ad_manager/v1/version.rb +1 -1
  31. data/proto_docs/google/api/client.rb +25 -0
  32. data/proto_docs/google/longrunning/operations.rb +19 -14
  33. metadata +5 -5
@@ -155,8 +155,28 @@ module Google
155
155
  endpoint: @config.endpoint,
156
156
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
157
157
  universe_domain: @config.universe_domain,
158
- credentials: credentials
158
+ credentials: credentials,
159
+ logger: @config.logger
159
160
  )
161
+
162
+ @order_service_stub.logger(stub: true)&.info do |entry|
163
+ entry.set_system_name
164
+ entry.set_service
165
+ entry.message = "Created client for #{entry.service}"
166
+ entry.set_credentials_fields credentials
167
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
168
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
169
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
170
+ end
171
+ end
172
+
173
+ ##
174
+ # The logger used for request/response debug logging.
175
+ #
176
+ # @return [Logger]
177
+ #
178
+ def logger
179
+ @order_service_stub.logger
160
180
  end
161
181
 
162
182
  # Service calls
@@ -235,7 +255,6 @@ module Google
235
255
 
236
256
  @order_service_stub.get_order request, options do |result, operation|
237
257
  yield result, operation if block_given?
238
- return result
239
258
  end
240
259
  rescue ::Gapic::Rest::Error => e
241
260
  raise ::Google::Cloud::Error.from_error(e)
@@ -346,7 +365,7 @@ module Google
346
365
  @order_service_stub.list_orders request, options do |result, operation|
347
366
  result = ::Gapic::Rest::PagedEnumerable.new @order_service_stub, :list_orders, "orders", request, result, options
348
367
  yield result, operation if block_given?
349
- return result
368
+ throw :response, result
350
369
  end
351
370
  rescue ::Gapic::Rest::Error => e
352
371
  raise ::Google::Cloud::Error.from_error(e)
@@ -426,6 +445,11 @@ module Google
426
445
  # default endpoint URL. The default value of nil uses the environment
427
446
  # universe (usually the default "googleapis.com" universe).
428
447
  # @return [::String,nil]
448
+ # @!attribute [rw] logger
449
+ # A custom logger to use for request/response debug logging, or the value
450
+ # `:default` (the default) to construct a default logger, or `nil` to
451
+ # explicitly disable logging.
452
+ # @return [::Logger,:default,nil]
429
453
  #
430
454
  class Configuration
431
455
  extend ::Gapic::Config
@@ -447,6 +471,7 @@ module Google
447
471
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
448
472
  config_attr :quota_project, nil, ::String, nil
449
473
  config_attr :universe_domain, nil, ::String, nil
474
+ config_attr :logger, :default, ::Logger, nil, :default
450
475
 
451
476
  # @private
452
477
  def initialize parent_config = nil
@@ -30,7 +30,8 @@ module Google
30
30
  # including transcoding, making the REST call, and deserialing the response.
31
31
  #
32
32
  class ServiceStub
33
- def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
33
+ # @private
34
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
34
35
  # These require statements are intentionally placed here to initialize
35
36
  # the REST modules only when it's required.
36
37
  require "gapic/rest"
@@ -40,7 +41,9 @@ module Google
40
41
  universe_domain: universe_domain,
41
42
  credentials: credentials,
42
43
  numeric_enums: true,
43
- raise_faraday_errors: false
44
+ service_name: self.class,
45
+ raise_faraday_errors: false,
46
+ logger: logger
44
47
  end
45
48
 
46
49
  ##
@@ -61,6 +64,15 @@ module Google
61
64
  @client_stub.endpoint
62
65
  end
63
66
 
67
+ ##
68
+ # The logger used for request/response debug logging.
69
+ #
70
+ # @return [Logger]
71
+ #
72
+ def logger stub: false
73
+ stub ? @client_stub.stub_logger : @client_stub.logger
74
+ end
75
+
64
76
  ##
65
77
  # Baseline implementation for the get_order REST call
66
78
  #
@@ -87,16 +99,18 @@ module Google
87
99
 
88
100
  response = @client_stub.make_http_request(
89
101
  verb,
90
- uri: uri,
91
- body: body || "",
92
- params: query_string_params,
102
+ uri: uri,
103
+ body: body || "",
104
+ params: query_string_params,
105
+ method_name: "get_order",
93
106
  options: options
94
107
  )
95
108
  operation = ::Gapic::Rest::TransportOperation.new response
96
109
  result = ::Google::Ads::AdManager::V1::Order.decode_json response.body, ignore_unknown_fields: true
97
-
98
- yield result, operation if block_given?
99
- result
110
+ catch :response do
111
+ yield result, operation if block_given?
112
+ result
113
+ end
100
114
  end
101
115
 
102
116
  ##
@@ -125,16 +139,18 @@ module Google
125
139
 
126
140
  response = @client_stub.make_http_request(
127
141
  verb,
128
- uri: uri,
129
- body: body || "",
130
- params: query_string_params,
142
+ uri: uri,
143
+ body: body || "",
144
+ params: query_string_params,
145
+ method_name: "list_orders",
131
146
  options: options
132
147
  )
133
148
  operation = ::Gapic::Rest::TransportOperation.new response
134
149
  result = ::Google::Ads::AdManager::V1::ListOrdersResponse.decode_json response.body, ignore_unknown_fields: true
135
-
136
- yield result, operation if block_given?
137
- result
150
+ catch :response do
151
+ yield result, operation if block_given?
152
+ result
153
+ end
138
154
  end
139
155
 
140
156
  ##
@@ -150,8 +150,28 @@ module Google
150
150
  endpoint: @config.endpoint,
151
151
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
152
152
  universe_domain: @config.universe_domain,
153
- credentials: credentials
153
+ credentials: credentials,
154
+ logger: @config.logger
154
155
  )
156
+
157
+ @placement_service_stub.logger(stub: true)&.info do |entry|
158
+ entry.set_system_name
159
+ entry.set_service
160
+ entry.message = "Created client for #{entry.service}"
161
+ entry.set_credentials_fields credentials
162
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
163
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
164
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
165
+ end
166
+ end
167
+
168
+ ##
169
+ # The logger used for request/response debug logging.
170
+ #
171
+ # @return [Logger]
172
+ #
173
+ def logger
174
+ @placement_service_stub.logger
155
175
  end
156
176
 
157
177
  # Service calls
@@ -230,7 +250,6 @@ module Google
230
250
 
231
251
  @placement_service_stub.get_placement request, options do |result, operation|
232
252
  yield result, operation if block_given?
233
- return result
234
253
  end
235
254
  rescue ::Gapic::Rest::Error => e
236
255
  raise ::Google::Cloud::Error.from_error(e)
@@ -336,7 +355,7 @@ module Google
336
355
  @placement_service_stub.list_placements request, options do |result, operation|
337
356
  result = ::Gapic::Rest::PagedEnumerable.new @placement_service_stub, :list_placements, "placements", request, result, options
338
357
  yield result, operation if block_given?
339
- return result
358
+ throw :response, result
340
359
  end
341
360
  rescue ::Gapic::Rest::Error => e
342
361
  raise ::Google::Cloud::Error.from_error(e)
@@ -416,6 +435,11 @@ module Google
416
435
  # default endpoint URL. The default value of nil uses the environment
417
436
  # universe (usually the default "googleapis.com" universe).
418
437
  # @return [::String,nil]
438
+ # @!attribute [rw] logger
439
+ # A custom logger to use for request/response debug logging, or the value
440
+ # `:default` (the default) to construct a default logger, or `nil` to
441
+ # explicitly disable logging.
442
+ # @return [::Logger,:default,nil]
419
443
  #
420
444
  class Configuration
421
445
  extend ::Gapic::Config
@@ -437,6 +461,7 @@ module Google
437
461
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
438
462
  config_attr :quota_project, nil, ::String, nil
439
463
  config_attr :universe_domain, nil, ::String, nil
464
+ config_attr :logger, :default, ::Logger, nil, :default
440
465
 
441
466
  # @private
442
467
  def initialize parent_config = nil
@@ -30,7 +30,8 @@ module Google
30
30
  # including transcoding, making the REST call, and deserialing the response.
31
31
  #
32
32
  class ServiceStub
33
- def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
33
+ # @private
34
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
34
35
  # These require statements are intentionally placed here to initialize
35
36
  # the REST modules only when it's required.
36
37
  require "gapic/rest"
@@ -40,7 +41,9 @@ module Google
40
41
  universe_domain: universe_domain,
41
42
  credentials: credentials,
42
43
  numeric_enums: true,
43
- raise_faraday_errors: false
44
+ service_name: self.class,
45
+ raise_faraday_errors: false,
46
+ logger: logger
44
47
  end
45
48
 
46
49
  ##
@@ -61,6 +64,15 @@ module Google
61
64
  @client_stub.endpoint
62
65
  end
63
66
 
67
+ ##
68
+ # The logger used for request/response debug logging.
69
+ #
70
+ # @return [Logger]
71
+ #
72
+ def logger stub: false
73
+ stub ? @client_stub.stub_logger : @client_stub.logger
74
+ end
75
+
64
76
  ##
65
77
  # Baseline implementation for the get_placement REST call
66
78
  #
@@ -87,16 +99,18 @@ module Google
87
99
 
88
100
  response = @client_stub.make_http_request(
89
101
  verb,
90
- uri: uri,
91
- body: body || "",
92
- params: query_string_params,
102
+ uri: uri,
103
+ body: body || "",
104
+ params: query_string_params,
105
+ method_name: "get_placement",
93
106
  options: options
94
107
  )
95
108
  operation = ::Gapic::Rest::TransportOperation.new response
96
109
  result = ::Google::Ads::AdManager::V1::Placement.decode_json response.body, ignore_unknown_fields: true
97
-
98
- yield result, operation if block_given?
99
- result
110
+ catch :response do
111
+ yield result, operation if block_given?
112
+ result
113
+ end
100
114
  end
101
115
 
102
116
  ##
@@ -125,16 +139,18 @@ module Google
125
139
 
126
140
  response = @client_stub.make_http_request(
127
141
  verb,
128
- uri: uri,
129
- body: body || "",
130
- params: query_string_params,
142
+ uri: uri,
143
+ body: body || "",
144
+ params: query_string_params,
145
+ method_name: "list_placements",
131
146
  options: options
132
147
  )
133
148
  operation = ::Gapic::Rest::TransportOperation.new response
134
149
  result = ::Google::Ads::AdManager::V1::ListPlacementsResponse.decode_json response.body, ignore_unknown_fields: true
135
-
136
- yield result, operation if block_given?
137
- result
150
+ catch :response do
151
+ yield result, operation if block_given?
152
+ result
153
+ end
138
154
  end
139
155
 
140
156
  ##
@@ -157,8 +157,19 @@ module Google
157
157
  endpoint: @config.endpoint,
158
158
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
159
159
  universe_domain: @config.universe_domain,
160
- credentials: credentials
160
+ credentials: credentials,
161
+ logger: @config.logger
161
162
  )
163
+
164
+ @report_service_stub.logger(stub: true)&.info do |entry|
165
+ entry.set_system_name
166
+ entry.set_service
167
+ entry.message = "Created client for #{entry.service}"
168
+ entry.set_credentials_fields credentials
169
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
170
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
171
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
172
+ end
162
173
  end
163
174
 
164
175
  ##
@@ -168,6 +179,15 @@ module Google
168
179
  #
169
180
  attr_reader :operations_client
170
181
 
182
+ ##
183
+ # The logger used for request/response debug logging.
184
+ #
185
+ # @return [Logger]
186
+ #
187
+ def logger
188
+ @report_service_stub.logger
189
+ end
190
+
171
191
  # Service calls
172
192
 
173
193
  ##
@@ -244,7 +264,6 @@ module Google
244
264
 
245
265
  @report_service_stub.get_report request, options do |result, operation|
246
266
  yield result, operation if block_given?
247
- return result
248
267
  end
249
268
  rescue ::Gapic::Rest::Error => e
250
269
  raise ::Google::Cloud::Error.from_error(e)
@@ -350,7 +369,7 @@ module Google
350
369
  @report_service_stub.list_reports request, options do |result, operation|
351
370
  result = ::Gapic::Rest::PagedEnumerable.new @report_service_stub, :list_reports, "reports", request, result, options
352
371
  yield result, operation if block_given?
353
- return result
372
+ throw :response, result
354
373
  end
355
374
  rescue ::Gapic::Rest::Error => e
356
375
  raise ::Google::Cloud::Error.from_error(e)
@@ -432,7 +451,6 @@ module Google
432
451
 
433
452
  @report_service_stub.create_report request, options do |result, operation|
434
453
  yield result, operation if block_given?
435
- return result
436
454
  end
437
455
  rescue ::Gapic::Rest::Error => e
438
456
  raise ::Google::Cloud::Error.from_error(e)
@@ -513,7 +531,6 @@ module Google
513
531
 
514
532
  @report_service_stub.update_report request, options do |result, operation|
515
533
  yield result, operation if block_given?
516
- return result
517
534
  end
518
535
  rescue ::Gapic::Rest::Error => e
519
536
  raise ::Google::Cloud::Error.from_error(e)
@@ -608,7 +625,7 @@ module Google
608
625
  @report_service_stub.run_report request, options do |result, operation|
609
626
  result = ::Gapic::Operation.new result, @operations_client, options: options
610
627
  yield result, operation if block_given?
611
- return result
628
+ throw :response, result
612
629
  end
613
630
  rescue ::Gapic::Rest::Error => e
614
631
  raise ::Google::Cloud::Error.from_error(e)
@@ -703,7 +720,6 @@ module Google
703
720
 
704
721
  @report_service_stub.fetch_report_result_rows request, options do |result, operation|
705
722
  yield result, operation if block_given?
706
- return result
707
723
  end
708
724
  rescue ::Gapic::Rest::Error => e
709
725
  raise ::Google::Cloud::Error.from_error(e)
@@ -783,6 +799,11 @@ module Google
783
799
  # default endpoint URL. The default value of nil uses the environment
784
800
  # universe (usually the default "googleapis.com" universe).
785
801
  # @return [::String,nil]
802
+ # @!attribute [rw] logger
803
+ # A custom logger to use for request/response debug logging, or the value
804
+ # `:default` (the default) to construct a default logger, or `nil` to
805
+ # explicitly disable logging.
806
+ # @return [::Logger,:default,nil]
786
807
  #
787
808
  class Configuration
788
809
  extend ::Gapic::Config
@@ -804,6 +825,7 @@ module Google
804
825
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
805
826
  config_attr :quota_project, nil, ::String, nil
806
827
  config_attr :universe_domain, nil, ::String, nil
828
+ config_attr :logger, :default, ::Logger, nil, :default
807
829
 
808
830
  # @private
809
831
  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)
@@ -543,6 +534,11 @@ module Google
543
534
  # default endpoint URL. The default value of nil uses the environment
544
535
  # universe (usually the default "googleapis.com" universe).
545
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]
546
542
  #
547
543
  class Configuration
548
544
  extend ::Gapic::Config
@@ -564,6 +560,7 @@ module Google
564
560
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
565
561
  config_attr :quota_project, nil, ::String, nil
566
562
  config_attr :universe_domain, nil, ::String, nil
563
+ config_attr :logger, :default, ::Logger, nil, :default
567
564
 
568
565
  # @private
569
566
  def initialize parent_config = nil
@@ -683,16 +680,18 @@ module Google
683
680
 
684
681
  response = @client_stub.make_http_request(
685
682
  verb,
686
- uri: uri,
687
- body: body || "",
688
- params: query_string_params,
683
+ uri: uri,
684
+ body: body || "",
685
+ params: query_string_params,
686
+ method_name: "list_operations",
689
687
  options: options
690
688
  )
691
689
  operation = ::Gapic::Rest::TransportOperation.new response
692
690
  result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true
693
-
694
- yield result, operation if block_given?
695
- result
691
+ catch :response do
692
+ yield result, operation if block_given?
693
+ result
694
+ end
696
695
  end
697
696
 
698
697
  ##
@@ -721,16 +720,18 @@ module Google
721
720
 
722
721
  response = @client_stub.make_http_request(
723
722
  verb,
724
- uri: uri,
725
- body: body || "",
726
- params: query_string_params,
723
+ uri: uri,
724
+ body: body || "",
725
+ params: query_string_params,
726
+ method_name: "get_operation",
727
727
  options: options
728
728
  )
729
729
  operation = ::Gapic::Rest::TransportOperation.new response
730
730
  result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
731
-
732
- yield result, operation if block_given?
733
- result
731
+ catch :response do
732
+ yield result, operation if block_given?
733
+ result
734
+ end
734
735
  end
735
736
 
736
737
  ##
@@ -759,16 +760,18 @@ module Google
759
760
 
760
761
  response = @client_stub.make_http_request(
761
762
  verb,
762
- uri: uri,
763
- body: body || "",
764
- params: query_string_params,
763
+ uri: uri,
764
+ body: body || "",
765
+ params: query_string_params,
766
+ method_name: "delete_operation",
765
767
  options: options
766
768
  )
767
769
  operation = ::Gapic::Rest::TransportOperation.new response
768
770
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
769
-
770
- yield result, operation if block_given?
771
- result
771
+ catch :response do
772
+ yield result, operation if block_given?
773
+ result
774
+ end
772
775
  end
773
776
 
774
777
  ##
@@ -797,16 +800,18 @@ module Google
797
800
 
798
801
  response = @client_stub.make_http_request(
799
802
  verb,
800
- uri: uri,
801
- body: body || "",
802
- params: query_string_params,
803
+ uri: uri,
804
+ body: body || "",
805
+ params: query_string_params,
806
+ method_name: "cancel_operation",
803
807
  options: options
804
808
  )
805
809
  operation = ::Gapic::Rest::TransportOperation.new response
806
810
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
807
-
808
- yield result, operation if block_given?
809
- result
811
+ catch :response do
812
+ yield result, operation if block_given?
813
+ result
814
+ end
810
815
  end
811
816
 
812
817
  ##