google-cloud-spanner-admin-instance-v1 1.3.0 → 1.4.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.
@@ -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
  ##