google-cloud-vmware_engine-v1 0.9.2 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -196,7 +196,7 @@ module Google
196
196
  @operations_stub.list_operations request, options do |result, operation|
197
197
  result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options
198
198
  yield result, operation if block_given?
199
- return result
199
+ throw :response, result
200
200
  end
201
201
  rescue ::Gapic::Rest::Error => e
202
202
  raise ::Google::Cloud::Error.from_error(e)
@@ -285,7 +285,7 @@ module Google
285
285
  @operations_stub.get_operation request, options do |result, operation|
286
286
  result = ::Gapic::Operation.new result, @operations_client, options: options
287
287
  yield result, operation if block_given?
288
- return result
288
+ throw :response, result
289
289
  end
290
290
  rescue ::Gapic::Rest::Error => e
291
291
  raise ::Google::Cloud::Error.from_error(e)
@@ -367,7 +367,6 @@ module Google
367
367
 
368
368
  @operations_stub.delete_operation request, options do |result, operation|
369
369
  yield result, operation if block_given?
370
- return result
371
370
  end
372
371
  rescue ::Gapic::Rest::Error => e
373
372
  raise ::Google::Cloud::Error.from_error(e)
@@ -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)
@@ -504,6 +502,13 @@ module Google
504
502
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
505
503
  # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
506
504
  # * (`nil`) indicating no credentials
505
+ #
506
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
507
+ # external source for authentication to Google Cloud, you must validate it before
508
+ # providing it to a Google API client library. Providing an unvalidated credential
509
+ # configuration to Google APIs can compromise the security of your systems and data.
510
+ # For more information, refer to [Validate credential configurations from external
511
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
507
512
  # @return [::Object]
508
513
  # @!attribute [rw] scope
509
514
  # The OAuth scopes
@@ -536,6 +541,11 @@ module Google
536
541
  # default endpoint URL. The default value of nil uses the environment
537
542
  # universe (usually the default "googleapis.com" universe).
538
543
  # @return [::String,nil]
544
+ # @!attribute [rw] logger
545
+ # A custom logger to use for request/response debug logging, or the value
546
+ # `:default` (the default) to construct a default logger, or `nil` to
547
+ # explicitly disable logging.
548
+ # @return [::Logger,:default,nil]
539
549
  #
540
550
  class Configuration
541
551
  extend ::Gapic::Config
@@ -557,6 +567,7 @@ module Google
557
567
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
558
568
  config_attr :quota_project, nil, ::String, nil
559
569
  config_attr :universe_domain, nil, ::String, nil
570
+ config_attr :logger, :default, ::Logger, nil, :default
560
571
 
561
572
  # @private
562
573
  def initialize parent_config = nil
@@ -676,16 +687,18 @@ module Google
676
687
 
677
688
  response = @client_stub.make_http_request(
678
689
  verb,
679
- uri: uri,
680
- body: body || "",
681
- params: query_string_params,
690
+ uri: uri,
691
+ body: body || "",
692
+ params: query_string_params,
693
+ method_name: "list_operations",
682
694
  options: options
683
695
  )
684
696
  operation = ::Gapic::Rest::TransportOperation.new response
685
697
  result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true
686
-
687
- yield result, operation if block_given?
688
- result
698
+ catch :response do
699
+ yield result, operation if block_given?
700
+ result
701
+ end
689
702
  end
690
703
 
691
704
  ##
@@ -714,16 +727,18 @@ module Google
714
727
 
715
728
  response = @client_stub.make_http_request(
716
729
  verb,
717
- uri: uri,
718
- body: body || "",
719
- params: query_string_params,
730
+ uri: uri,
731
+ body: body || "",
732
+ params: query_string_params,
733
+ method_name: "get_operation",
720
734
  options: options
721
735
  )
722
736
  operation = ::Gapic::Rest::TransportOperation.new response
723
737
  result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
724
-
725
- yield result, operation if block_given?
726
- result
738
+ catch :response do
739
+ yield result, operation if block_given?
740
+ result
741
+ end
727
742
  end
728
743
 
729
744
  ##
@@ -752,16 +767,18 @@ module Google
752
767
 
753
768
  response = @client_stub.make_http_request(
754
769
  verb,
755
- uri: uri,
756
- body: body || "",
757
- params: query_string_params,
770
+ uri: uri,
771
+ body: body || "",
772
+ params: query_string_params,
773
+ method_name: "delete_operation",
758
774
  options: options
759
775
  )
760
776
  operation = ::Gapic::Rest::TransportOperation.new response
761
777
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
762
-
763
- yield result, operation if block_given?
764
- result
778
+ catch :response do
779
+ yield result, operation if block_given?
780
+ result
781
+ end
765
782
  end
766
783
 
767
784
  ##
@@ -790,16 +807,18 @@ module Google
790
807
 
791
808
  response = @client_stub.make_http_request(
792
809
  verb,
793
- uri: uri,
794
- body: body || "",
795
- params: query_string_params,
810
+ uri: uri,
811
+ body: body || "",
812
+ params: query_string_params,
813
+ method_name: "cancel_operation",
796
814
  options: options
797
815
  )
798
816
  operation = ::Gapic::Rest::TransportOperation.new response
799
817
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
800
-
801
- yield result, operation if block_given?
802
- result
818
+ catch :response do
819
+ yield result, operation if block_given?
820
+ result
821
+ end
803
822
  end
804
823
 
805
824
  ##