google-cloud-orchestration-airflow-service-v1 1.0.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -159,8 +159,19 @@ module Google
159
159
  endpoint: @config.endpoint,
160
160
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
161
161
  universe_domain: @config.universe_domain,
162
- credentials: credentials
162
+ credentials: credentials,
163
+ logger: @config.logger
163
164
  )
165
+
166
+ @environments_stub.logger(stub: true)&.info do |entry|
167
+ entry.set_system_name
168
+ entry.set_service
169
+ entry.message = "Created client for #{entry.service}"
170
+ entry.set_credentials_fields credentials
171
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
172
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
173
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
174
+ end
164
175
  end
165
176
 
166
177
  ##
@@ -170,6 +181,15 @@ module Google
170
181
  #
171
182
  attr_reader :operations_client
172
183
 
184
+ ##
185
+ # The logger used for request/response debug logging.
186
+ #
187
+ # @return [Logger]
188
+ #
189
+ def logger
190
+ @environments_stub.logger
191
+ end
192
+
173
193
  # Service calls
174
194
 
175
195
  ##
@@ -256,7 +276,7 @@ module Google
256
276
  @environments_stub.create_environment request, options do |result, operation|
257
277
  result = ::Gapic::Operation.new result, @operations_client, options: options
258
278
  yield result, operation if block_given?
259
- return result
279
+ throw :response, result
260
280
  end
261
281
  rescue ::Gapic::Rest::Error => e
262
282
  raise ::Google::Cloud::Error.from_error(e)
@@ -336,7 +356,6 @@ module Google
336
356
 
337
357
  @environments_stub.get_environment request, options do |result, operation|
338
358
  yield result, operation if block_given?
339
- return result
340
359
  end
341
360
  rescue ::Gapic::Rest::Error => e
342
361
  raise ::Google::Cloud::Error.from_error(e)
@@ -425,7 +444,7 @@ module Google
425
444
  @environments_stub.list_environments request, options do |result, operation|
426
445
  result = ::Gapic::Rest::PagedEnumerable.new @environments_stub, :list_environments, "environments", request, result, options
427
446
  yield result, operation if block_given?
428
- return result
447
+ throw :response, result
429
448
  end
430
449
  rescue ::Gapic::Rest::Error => e
431
450
  raise ::Google::Cloud::Error.from_error(e)
@@ -640,7 +659,7 @@ module Google
640
659
  @environments_stub.update_environment request, options do |result, operation|
641
660
  result = ::Gapic::Operation.new result, @operations_client, options: options
642
661
  yield result, operation if block_given?
643
- return result
662
+ throw :response, result
644
663
  end
645
664
  rescue ::Gapic::Rest::Error => e
646
665
  raise ::Google::Cloud::Error.from_error(e)
@@ -728,7 +747,7 @@ module Google
728
747
  @environments_stub.delete_environment request, options do |result, operation|
729
748
  result = ::Gapic::Operation.new result, @operations_client, options: options
730
749
  yield result, operation if block_given?
731
- return result
750
+ throw :response, result
732
751
  end
733
752
  rescue ::Gapic::Rest::Error => e
734
753
  raise ::Google::Cloud::Error.from_error(e)
@@ -817,7 +836,6 @@ module Google
817
836
 
818
837
  @environments_stub.execute_airflow_command request, options do |result, operation|
819
838
  yield result, operation if block_given?
820
- return result
821
839
  end
822
840
  rescue ::Gapic::Rest::Error => e
823
841
  raise ::Google::Cloud::Error.from_error(e)
@@ -906,7 +924,6 @@ module Google
906
924
 
907
925
  @environments_stub.stop_airflow_command request, options do |result, operation|
908
926
  yield result, operation if block_given?
909
- return result
910
927
  end
911
928
  rescue ::Gapic::Rest::Error => e
912
929
  raise ::Google::Cloud::Error.from_error(e)
@@ -994,7 +1011,6 @@ module Google
994
1011
 
995
1012
  @environments_stub.poll_airflow_command request, options do |result, operation|
996
1013
  yield result, operation if block_given?
997
- return result
998
1014
  end
999
1015
  rescue ::Gapic::Rest::Error => e
1000
1016
  raise ::Google::Cloud::Error.from_error(e)
@@ -1095,7 +1111,123 @@ module Google
1095
1111
  @environments_stub.list_workloads request, options do |result, operation|
1096
1112
  result = ::Gapic::Rest::PagedEnumerable.new @environments_stub, :list_workloads, "workloads", request, result, options
1097
1113
  yield result, operation if block_given?
1098
- return result
1114
+ throw :response, result
1115
+ end
1116
+ rescue ::Gapic::Rest::Error => e
1117
+ raise ::Google::Cloud::Error.from_error(e)
1118
+ end
1119
+
1120
+ ##
1121
+ # Check if an upgrade operation on the environment will succeed.
1122
+ #
1123
+ # In case of problems detailed info can be found in the returned Operation.
1124
+ #
1125
+ # @overload check_upgrade(request, options = nil)
1126
+ # Pass arguments to `check_upgrade` via a request object, either of type
1127
+ # {::Google::Cloud::Orchestration::Airflow::Service::V1::CheckUpgradeRequest} or an equivalent Hash.
1128
+ #
1129
+ # @param request [::Google::Cloud::Orchestration::Airflow::Service::V1::CheckUpgradeRequest, ::Hash]
1130
+ # A request object representing the call parameters. Required. To specify no
1131
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1132
+ # @param options [::Gapic::CallOptions, ::Hash]
1133
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1134
+ #
1135
+ # @overload check_upgrade(environment: nil, image_version: nil)
1136
+ # Pass arguments to `check_upgrade` via keyword arguments. Note that at
1137
+ # least one keyword argument is required. To specify no parameters, or to keep all
1138
+ # the default parameter values, pass an empty Hash as a request object (see above).
1139
+ #
1140
+ # @param environment [::String]
1141
+ # Required. The resource name of the environment to check upgrade for, in the
1142
+ # form:
1143
+ # "projects/\\{projectId}/locations/\\{locationId}/environments/\\{environmentId}"
1144
+ # @param image_version [::String]
1145
+ # Optional. The version of the software running in the environment.
1146
+ # This encapsulates both the version of Cloud Composer functionality and the
1147
+ # version of Apache Airflow. It must match the regular expression
1148
+ # `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`.
1149
+ # When used as input, the server also checks if the provided version is
1150
+ # supported and denies the request for an unsupported version.
1151
+ #
1152
+ # The Cloud Composer portion of the image version is a full
1153
+ # [semantic version](https://semver.org), or an alias in the form of major
1154
+ # version number or `latest`. When an alias is provided, the server replaces
1155
+ # it with the current Cloud Composer version that satisfies the alias.
1156
+ #
1157
+ # The Apache Airflow portion of the image version is a full semantic version
1158
+ # that points to one of the supported Apache Airflow versions, or an alias in
1159
+ # the form of only major or major.minor versions specified. When an alias is
1160
+ # provided, the server replaces it with the latest Apache Airflow version
1161
+ # that satisfies the alias and is supported in the given Cloud Composer
1162
+ # version.
1163
+ #
1164
+ # In all cases, the resolved image version is stored in the same field.
1165
+ #
1166
+ # See also [version
1167
+ # list](/composer/docs/concepts/versioning/composer-versions) and [versioning
1168
+ # overview](/composer/docs/concepts/versioning/composer-versioning-overview).
1169
+ # @yield [result, operation] Access the result along with the TransportOperation object
1170
+ # @yieldparam result [::Gapic::Operation]
1171
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1172
+ #
1173
+ # @return [::Gapic::Operation]
1174
+ #
1175
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1176
+ #
1177
+ # @example Basic example
1178
+ # require "google/cloud/orchestration/airflow/service/v1"
1179
+ #
1180
+ # # Create a client object. The client can be reused for multiple calls.
1181
+ # client = Google::Cloud::Orchestration::Airflow::Service::V1::Environments::Rest::Client.new
1182
+ #
1183
+ # # Create a request. To set request fields, pass in keyword arguments.
1184
+ # request = Google::Cloud::Orchestration::Airflow::Service::V1::CheckUpgradeRequest.new
1185
+ #
1186
+ # # Call the check_upgrade method.
1187
+ # result = client.check_upgrade request
1188
+ #
1189
+ # # The returned object is of type Gapic::Operation. You can use it to
1190
+ # # check the status of an operation, cancel it, or wait for results.
1191
+ # # Here is how to wait for a response.
1192
+ # result.wait_until_done! timeout: 60
1193
+ # if result.response?
1194
+ # p result.response
1195
+ # else
1196
+ # puts "No response received."
1197
+ # end
1198
+ #
1199
+ def check_upgrade request, options = nil
1200
+ raise ::ArgumentError, "request must be provided" if request.nil?
1201
+
1202
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Orchestration::Airflow::Service::V1::CheckUpgradeRequest
1203
+
1204
+ # Converts hash and nil to an options object
1205
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1206
+
1207
+ # Customize the options with defaults
1208
+ call_metadata = @config.rpcs.check_upgrade.metadata.to_h
1209
+
1210
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1211
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1212
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1213
+ gapic_version: ::Google::Cloud::Orchestration::Airflow::Service::V1::VERSION,
1214
+ transports_version_send: [:rest]
1215
+
1216
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1217
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1218
+
1219
+ options.apply_defaults timeout: @config.rpcs.check_upgrade.timeout,
1220
+ metadata: call_metadata,
1221
+ retry_policy: @config.rpcs.check_upgrade.retry_policy
1222
+
1223
+ options.apply_defaults timeout: @config.timeout,
1224
+ metadata: @config.metadata,
1225
+ retry_policy: @config.retry_policy
1226
+
1227
+ @environments_stub.check_upgrade request, options do |result, operation|
1228
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1229
+ yield result, operation if block_given?
1230
+ throw :response, result
1099
1231
  end
1100
1232
  rescue ::Gapic::Rest::Error => e
1101
1233
  raise ::Google::Cloud::Error.from_error(e)
@@ -1180,7 +1312,6 @@ module Google
1180
1312
 
1181
1313
  @environments_stub.create_user_workloads_secret request, options do |result, operation|
1182
1314
  yield result, operation if block_given?
1183
- return result
1184
1315
  end
1185
1316
  rescue ::Gapic::Rest::Error => e
1186
1317
  raise ::Google::Cloud::Error.from_error(e)
@@ -1264,7 +1395,6 @@ module Google
1264
1395
 
1265
1396
  @environments_stub.get_user_workloads_secret request, options do |result, operation|
1266
1397
  yield result, operation if block_given?
1267
- return result
1268
1398
  end
1269
1399
  rescue ::Gapic::Rest::Error => e
1270
1400
  raise ::Google::Cloud::Error.from_error(e)
@@ -1357,7 +1487,7 @@ module Google
1357
1487
  @environments_stub.list_user_workloads_secrets request, options do |result, operation|
1358
1488
  result = ::Gapic::Rest::PagedEnumerable.new @environments_stub, :list_user_workloads_secrets, "user_workloads_secrets", request, result, options
1359
1489
  yield result, operation if block_given?
1360
- return result
1490
+ throw :response, result
1361
1491
  end
1362
1492
  rescue ::Gapic::Rest::Error => e
1363
1493
  raise ::Google::Cloud::Error.from_error(e)
@@ -1439,7 +1569,6 @@ module Google
1439
1569
 
1440
1570
  @environments_stub.update_user_workloads_secret request, options do |result, operation|
1441
1571
  yield result, operation if block_given?
1442
- return result
1443
1572
  end
1444
1573
  rescue ::Gapic::Rest::Error => e
1445
1574
  raise ::Google::Cloud::Error.from_error(e)
@@ -1522,7 +1651,6 @@ module Google
1522
1651
 
1523
1652
  @environments_stub.delete_user_workloads_secret request, options do |result, operation|
1524
1653
  yield result, operation if block_given?
1525
- return result
1526
1654
  end
1527
1655
  rescue ::Gapic::Rest::Error => e
1528
1656
  raise ::Google::Cloud::Error.from_error(e)
@@ -1607,7 +1735,6 @@ module Google
1607
1735
 
1608
1736
  @environments_stub.create_user_workloads_config_map request, options do |result, operation|
1609
1737
  yield result, operation if block_given?
1610
- return result
1611
1738
  end
1612
1739
  rescue ::Gapic::Rest::Error => e
1613
1740
  raise ::Google::Cloud::Error.from_error(e)
@@ -1690,7 +1817,6 @@ module Google
1690
1817
 
1691
1818
  @environments_stub.get_user_workloads_config_map request, options do |result, operation|
1692
1819
  yield result, operation if block_given?
1693
- return result
1694
1820
  end
1695
1821
  rescue ::Gapic::Rest::Error => e
1696
1822
  raise ::Google::Cloud::Error.from_error(e)
@@ -1783,7 +1909,7 @@ module Google
1783
1909
  @environments_stub.list_user_workloads_config_maps request, options do |result, operation|
1784
1910
  result = ::Gapic::Rest::PagedEnumerable.new @environments_stub, :list_user_workloads_config_maps, "user_workloads_config_maps", request, result, options
1785
1911
  yield result, operation if block_given?
1786
- return result
1912
+ throw :response, result
1787
1913
  end
1788
1914
  rescue ::Gapic::Rest::Error => e
1789
1915
  raise ::Google::Cloud::Error.from_error(e)
@@ -1865,7 +1991,6 @@ module Google
1865
1991
 
1866
1992
  @environments_stub.update_user_workloads_config_map request, options do |result, operation|
1867
1993
  yield result, operation if block_given?
1868
- return result
1869
1994
  end
1870
1995
  rescue ::Gapic::Rest::Error => e
1871
1996
  raise ::Google::Cloud::Error.from_error(e)
@@ -1948,7 +2073,6 @@ module Google
1948
2073
 
1949
2074
  @environments_stub.delete_user_workloads_config_map request, options do |result, operation|
1950
2075
  yield result, operation if block_given?
1951
- return result
1952
2076
  end
1953
2077
  rescue ::Gapic::Rest::Error => e
1954
2078
  raise ::Google::Cloud::Error.from_error(e)
@@ -2042,7 +2166,7 @@ module Google
2042
2166
  @environments_stub.save_snapshot request, options do |result, operation|
2043
2167
  result = ::Gapic::Operation.new result, @operations_client, options: options
2044
2168
  yield result, operation if block_given?
2045
- return result
2169
+ throw :response, result
2046
2170
  end
2047
2171
  rescue ::Gapic::Rest::Error => e
2048
2172
  raise ::Google::Cloud::Error.from_error(e)
@@ -2148,7 +2272,7 @@ module Google
2148
2272
  @environments_stub.load_snapshot request, options do |result, operation|
2149
2273
  result = ::Gapic::Operation.new result, @operations_client, options: options
2150
2274
  yield result, operation if block_given?
2151
- return result
2275
+ throw :response, result
2152
2276
  end
2153
2277
  rescue ::Gapic::Rest::Error => e
2154
2278
  raise ::Google::Cloud::Error.from_error(e)
@@ -2236,7 +2360,7 @@ module Google
2236
2360
  @environments_stub.database_failover request, options do |result, operation|
2237
2361
  result = ::Gapic::Operation.new result, @operations_client, options: options
2238
2362
  yield result, operation if block_given?
2239
- return result
2363
+ throw :response, result
2240
2364
  end
2241
2365
  rescue ::Gapic::Rest::Error => e
2242
2366
  raise ::Google::Cloud::Error.from_error(e)
@@ -2316,7 +2440,6 @@ module Google
2316
2440
 
2317
2441
  @environments_stub.fetch_database_properties request, options do |result, operation|
2318
2442
  yield result, operation if block_given?
2319
- return result
2320
2443
  end
2321
2444
  rescue ::Gapic::Rest::Error => e
2322
2445
  raise ::Google::Cloud::Error.from_error(e)
@@ -2396,6 +2519,11 @@ module Google
2396
2519
  # default endpoint URL. The default value of nil uses the environment
2397
2520
  # universe (usually the default "googleapis.com" universe).
2398
2521
  # @return [::String,nil]
2522
+ # @!attribute [rw] logger
2523
+ # A custom logger to use for request/response debug logging, or the value
2524
+ # `:default` (the default) to construct a default logger, or `nil` to
2525
+ # explicitly disable logging.
2526
+ # @return [::Logger,:default,nil]
2399
2527
  #
2400
2528
  class Configuration
2401
2529
  extend ::Gapic::Config
@@ -2417,6 +2545,7 @@ module Google
2417
2545
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2418
2546
  config_attr :quota_project, nil, ::String, nil
2419
2547
  config_attr :universe_domain, nil, ::String, nil
2548
+ config_attr :logger, :default, ::Logger, nil, :default
2420
2549
 
2421
2550
  # @private
2422
2551
  def initialize parent_config = nil
@@ -2501,6 +2630,11 @@ module Google
2501
2630
  #
2502
2631
  attr_reader :list_workloads
2503
2632
  ##
2633
+ # RPC-specific configuration for `check_upgrade`
2634
+ # @return [::Gapic::Config::Method]
2635
+ #
2636
+ attr_reader :check_upgrade
2637
+ ##
2504
2638
  # RPC-specific configuration for `create_user_workloads_secret`
2505
2639
  # @return [::Gapic::Config::Method]
2506
2640
  #
@@ -2591,6 +2725,8 @@ module Google
2591
2725
  @poll_airflow_command = ::Gapic::Config::Method.new poll_airflow_command_config
2592
2726
  list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads
2593
2727
  @list_workloads = ::Gapic::Config::Method.new list_workloads_config
2728
+ check_upgrade_config = parent_rpcs.check_upgrade if parent_rpcs.respond_to? :check_upgrade
2729
+ @check_upgrade = ::Gapic::Config::Method.new check_upgrade_config
2594
2730
  create_user_workloads_secret_config = parent_rpcs.create_user_workloads_secret if parent_rpcs.respond_to? :create_user_workloads_secret
2595
2731
  @create_user_workloads_secret = ::Gapic::Config::Method.new create_user_workloads_secret_config
2596
2732
  get_user_workloads_secret_config = parent_rpcs.get_user_workloads_secret if parent_rpcs.respond_to? :get_user_workloads_secret
@@ -117,14 +117,6 @@ module Google
117
117
  # Lists operations that match the specified filter in the request. If the
118
118
  # server doesn't support this method, it returns `UNIMPLEMENTED`.
119
119
  #
120
- # NOTE: the `name` binding allows API services to override the binding
121
- # to use different resource name schemes, such as `users/*/operations`. To
122
- # override the binding, API services can add a binding such as
123
- # `"/v1/{name=users/*}/operations"` to their service configuration.
124
- # For backwards compatibility, the default name includes the operations
125
- # collection id, however overriding users must ensure the name binding
126
- # is the parent resource, without the operations collection id.
127
- #
128
120
  # @overload list_operations(request, options = nil)
129
121
  # Pass arguments to `list_operations` via a request object, either of type
130
122
  # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
@@ -206,7 +198,7 @@ module Google
206
198
  @operations_stub.list_operations request, options do |result, operation|
207
199
  result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options
208
200
  yield result, operation if block_given?
209
- return result
201
+ throw :response, result
210
202
  end
211
203
  rescue ::Gapic::Rest::Error => e
212
204
  raise ::Google::Cloud::Error.from_error(e)
@@ -295,7 +287,7 @@ module Google
295
287
  @operations_stub.get_operation request, options do |result, operation|
296
288
  result = ::Gapic::Operation.new result, @operations_client, options: options
297
289
  yield result, operation if block_given?
298
- return result
290
+ throw :response, result
299
291
  end
300
292
  rescue ::Gapic::Rest::Error => e
301
293
  raise ::Google::Cloud::Error.from_error(e)
@@ -377,7 +369,6 @@ module Google
377
369
 
378
370
  @operations_stub.delete_operation request, options do |result, operation|
379
371
  yield result, operation if block_given?
380
- return result
381
372
  end
382
373
  rescue ::Gapic::Rest::Error => e
383
374
  raise ::Google::Cloud::Error.from_error(e)
@@ -392,8 +383,9 @@ module Google
392
383
  # other methods to check whether the cancellation succeeded or whether the
393
384
  # operation completed despite cancellation. On successful cancellation,
394
385
  # the operation is not deleted; instead, it becomes an operation with
395
- # an {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
396
- # corresponding to `Code.CANCELLED`.
386
+ # an {::Google::Longrunning::Operation#error Operation.error} value with a
387
+ # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
388
+ # `Code.CANCELLED`.
397
389
  #
398
390
  # @overload cancel_operation(request, options = nil)
399
391
  # Pass arguments to `cancel_operation` via a request object, either of type
@@ -465,7 +457,6 @@ module Google
465
457
 
466
458
  @operations_stub.cancel_operation request, options do |result, operation|
467
459
  yield result, operation if block_given?
468
- return result
469
460
  end
470
461
  rescue ::Gapic::Rest::Error => e
471
462
  raise ::Google::Cloud::Error.from_error(e)
@@ -545,6 +536,11 @@ module Google
545
536
  # default endpoint URL. The default value of nil uses the environment
546
537
  # universe (usually the default "googleapis.com" universe).
547
538
  # @return [::String,nil]
539
+ # @!attribute [rw] logger
540
+ # A custom logger to use for request/response debug logging, or the value
541
+ # `:default` (the default) to construct a default logger, or `nil` to
542
+ # explicitly disable logging.
543
+ # @return [::Logger,:default,nil]
548
544
  #
549
545
  class Configuration
550
546
  extend ::Gapic::Config
@@ -566,6 +562,7 @@ module Google
566
562
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
567
563
  config_attr :quota_project, nil, ::String, nil
568
564
  config_attr :universe_domain, nil, ::String, nil
565
+ config_attr :logger, :default, ::Logger, nil, :default
569
566
 
570
567
  # @private
571
568
  def initialize parent_config = nil
@@ -685,16 +682,18 @@ module Google
685
682
 
686
683
  response = @client_stub.make_http_request(
687
684
  verb,
688
- uri: uri,
689
- body: body || "",
690
- params: query_string_params,
685
+ uri: uri,
686
+ body: body || "",
687
+ params: query_string_params,
688
+ method_name: "list_operations",
691
689
  options: options
692
690
  )
693
691
  operation = ::Gapic::Rest::TransportOperation.new response
694
692
  result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true
695
-
696
- yield result, operation if block_given?
697
- result
693
+ catch :response do
694
+ yield result, operation if block_given?
695
+ result
696
+ end
698
697
  end
699
698
 
700
699
  ##
@@ -723,16 +722,18 @@ module Google
723
722
 
724
723
  response = @client_stub.make_http_request(
725
724
  verb,
726
- uri: uri,
727
- body: body || "",
728
- params: query_string_params,
725
+ uri: uri,
726
+ body: body || "",
727
+ params: query_string_params,
728
+ method_name: "get_operation",
729
729
  options: options
730
730
  )
731
731
  operation = ::Gapic::Rest::TransportOperation.new response
732
732
  result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
733
-
734
- yield result, operation if block_given?
735
- result
733
+ catch :response do
734
+ yield result, operation if block_given?
735
+ result
736
+ end
736
737
  end
737
738
 
738
739
  ##
@@ -761,16 +762,18 @@ module Google
761
762
 
762
763
  response = @client_stub.make_http_request(
763
764
  verb,
764
- uri: uri,
765
- body: body || "",
766
- params: query_string_params,
765
+ uri: uri,
766
+ body: body || "",
767
+ params: query_string_params,
768
+ method_name: "delete_operation",
767
769
  options: options
768
770
  )
769
771
  operation = ::Gapic::Rest::TransportOperation.new response
770
772
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
771
-
772
- yield result, operation if block_given?
773
- result
773
+ catch :response do
774
+ yield result, operation if block_given?
775
+ result
776
+ end
774
777
  end
775
778
 
776
779
  ##
@@ -799,16 +802,18 @@ module Google
799
802
 
800
803
  response = @client_stub.make_http_request(
801
804
  verb,
802
- uri: uri,
803
- body: body || "",
804
- params: query_string_params,
805
+ uri: uri,
806
+ body: body || "",
807
+ params: query_string_params,
808
+ method_name: "cancel_operation",
805
809
  options: options
806
810
  )
807
811
  operation = ::Gapic::Rest::TransportOperation.new response
808
812
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
809
-
810
- yield result, operation if block_given?
811
- result
813
+ catch :response do
814
+ yield result, operation if block_given?
815
+ result
816
+ end
812
817
  end
813
818
 
814
819
  ##