google-cloud-network_services-v1 2.2.0 → 2.3.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.
- checksums.yaml +4 -4
- data/lib/google/cloud/network_services/v1/dep_service/client.rb +579 -24
- data/lib/google/cloud/network_services/v1/dep_service/paths.rb +19 -0
- data/lib/google/cloud/network_services/v1/dep_service/rest/client.rb +544 -24
- data/lib/google/cloud/network_services/v1/dep_service/rest/service_stub.rb +307 -0
- data/lib/google/cloud/network_services/v1/network_services/client.rb +944 -0
- data/lib/google/cloud/network_services/v1/network_services/paths.rb +40 -0
- data/lib/google/cloud/network_services/v1/network_services/rest/client.rb +881 -0
- data/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb +552 -0
- data/lib/google/cloud/network_services/v1/version.rb +1 -1
- data/lib/google/cloud/networkservices/v1/dep_pb.rb +10 -2
- data/lib/google/cloud/networkservices/v1/dep_services_pb.rb +12 -0
- data/lib/google/cloud/networkservices/v1/extensibility_pb.rb +66 -0
- data/lib/google/cloud/networkservices/v1/network_services_pb.rb +3 -1
- data/lib/google/cloud/networkservices/v1/network_services_services_pb.rb +22 -0
- data/proto_docs/google/cloud/networkservices/v1/dep.rb +376 -52
- data/proto_docs/google/cloud/networkservices/v1/extensibility.rb +518 -0
- metadata +3 -1
@@ -675,6 +675,824 @@ module Google
|
|
675
675
|
raise ::Google::Cloud::Error.from_error(e)
|
676
676
|
end
|
677
677
|
|
678
|
+
##
|
679
|
+
# Lists `WasmPluginVersion` resources in a given project and
|
680
|
+
# location.
|
681
|
+
#
|
682
|
+
# @overload list_wasm_plugin_versions(request, options = nil)
|
683
|
+
# Pass arguments to `list_wasm_plugin_versions` via a request object, either of type
|
684
|
+
# {::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest} or an equivalent Hash.
|
685
|
+
#
|
686
|
+
# @param request [::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest, ::Hash]
|
687
|
+
# A request object representing the call parameters. Required. To specify no
|
688
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
689
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
690
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
691
|
+
#
|
692
|
+
# @overload list_wasm_plugin_versions(parent: nil, page_size: nil, page_token: nil)
|
693
|
+
# Pass arguments to `list_wasm_plugin_versions` via keyword arguments. Note that at
|
694
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
695
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
696
|
+
#
|
697
|
+
# @param parent [::String]
|
698
|
+
# Required. The `WasmPlugin` resource whose `WasmPluginVersion`s
|
699
|
+
# are listed, specified in the following format:
|
700
|
+
# `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.
|
701
|
+
# @param page_size [::Integer]
|
702
|
+
# Maximum number of `WasmPluginVersion` resources to return per
|
703
|
+
# call. If not specified, at most 50 `WasmPluginVersion` resources are
|
704
|
+
# returned. The maximum value is 1000; values above 1000 are coerced to
|
705
|
+
# 1000.
|
706
|
+
# @param page_token [::String]
|
707
|
+
# The value returned by the last `ListWasmPluginVersionsResponse` call.
|
708
|
+
# Indicates that this is a continuation of a prior
|
709
|
+
# `ListWasmPluginVersions` call, and that the
|
710
|
+
# next page of data is to be returned.
|
711
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
712
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPluginVersion>]
|
713
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
714
|
+
#
|
715
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPluginVersion>]
|
716
|
+
#
|
717
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
718
|
+
#
|
719
|
+
# @example Basic example
|
720
|
+
# require "google/cloud/network_services/v1"
|
721
|
+
#
|
722
|
+
# # Create a client object. The client can be reused for multiple calls.
|
723
|
+
# client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new
|
724
|
+
#
|
725
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
726
|
+
# request = Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest.new
|
727
|
+
#
|
728
|
+
# # Call the list_wasm_plugin_versions method.
|
729
|
+
# result = client.list_wasm_plugin_versions request
|
730
|
+
#
|
731
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
732
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
733
|
+
# result.each do |item|
|
734
|
+
# # Each element is of type ::Google::Cloud::NetworkServices::V1::WasmPluginVersion.
|
735
|
+
# p item
|
736
|
+
# end
|
737
|
+
#
|
738
|
+
def list_wasm_plugin_versions request, options = nil
|
739
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
740
|
+
|
741
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListWasmPluginVersionsRequest
|
742
|
+
|
743
|
+
# Converts hash and nil to an options object
|
744
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
745
|
+
|
746
|
+
# Customize the options with defaults
|
747
|
+
call_metadata = @config.rpcs.list_wasm_plugin_versions.metadata.to_h
|
748
|
+
|
749
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
750
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
751
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
752
|
+
gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION,
|
753
|
+
transports_version_send: [:rest]
|
754
|
+
|
755
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
756
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
757
|
+
|
758
|
+
options.apply_defaults timeout: @config.rpcs.list_wasm_plugin_versions.timeout,
|
759
|
+
metadata: call_metadata,
|
760
|
+
retry_policy: @config.rpcs.list_wasm_plugin_versions.retry_policy
|
761
|
+
|
762
|
+
options.apply_defaults timeout: @config.timeout,
|
763
|
+
metadata: @config.metadata,
|
764
|
+
retry_policy: @config.retry_policy
|
765
|
+
|
766
|
+
@network_services_stub.list_wasm_plugin_versions request, options do |result, operation|
|
767
|
+
result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_wasm_plugin_versions, "wasm_plugin_versions", request, result, options
|
768
|
+
yield result, operation if block_given?
|
769
|
+
throw :response, result
|
770
|
+
end
|
771
|
+
rescue ::Gapic::Rest::Error => e
|
772
|
+
raise ::Google::Cloud::Error.from_error(e)
|
773
|
+
end
|
774
|
+
|
775
|
+
##
|
776
|
+
# Gets details of the specified `WasmPluginVersion` resource.
|
777
|
+
#
|
778
|
+
# @overload get_wasm_plugin_version(request, options = nil)
|
779
|
+
# Pass arguments to `get_wasm_plugin_version` via a request object, either of type
|
780
|
+
# {::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest} or an equivalent Hash.
|
781
|
+
#
|
782
|
+
# @param request [::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest, ::Hash]
|
783
|
+
# A request object representing the call parameters. Required. To specify no
|
784
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
785
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
786
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
787
|
+
#
|
788
|
+
# @overload get_wasm_plugin_version(name: nil)
|
789
|
+
# Pass arguments to `get_wasm_plugin_version` via keyword arguments. Note that at
|
790
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
791
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
792
|
+
#
|
793
|
+
# @param name [::String]
|
794
|
+
# Required. A name of the `WasmPluginVersion` resource to get. Must be in
|
795
|
+
# the format
|
796
|
+
# `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.
|
797
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
798
|
+
# @yieldparam result [::Google::Cloud::NetworkServices::V1::WasmPluginVersion]
|
799
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
800
|
+
#
|
801
|
+
# @return [::Google::Cloud::NetworkServices::V1::WasmPluginVersion]
|
802
|
+
#
|
803
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
804
|
+
#
|
805
|
+
# @example Basic example
|
806
|
+
# require "google/cloud/network_services/v1"
|
807
|
+
#
|
808
|
+
# # Create a client object. The client can be reused for multiple calls.
|
809
|
+
# client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new
|
810
|
+
#
|
811
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
812
|
+
# request = Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest.new
|
813
|
+
#
|
814
|
+
# # Call the get_wasm_plugin_version method.
|
815
|
+
# result = client.get_wasm_plugin_version request
|
816
|
+
#
|
817
|
+
# # The returned object is of type Google::Cloud::NetworkServices::V1::WasmPluginVersion.
|
818
|
+
# p result
|
819
|
+
#
|
820
|
+
def get_wasm_plugin_version request, options = nil
|
821
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
822
|
+
|
823
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetWasmPluginVersionRequest
|
824
|
+
|
825
|
+
# Converts hash and nil to an options object
|
826
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
827
|
+
|
828
|
+
# Customize the options with defaults
|
829
|
+
call_metadata = @config.rpcs.get_wasm_plugin_version.metadata.to_h
|
830
|
+
|
831
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
832
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
833
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
834
|
+
gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION,
|
835
|
+
transports_version_send: [:rest]
|
836
|
+
|
837
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
838
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
839
|
+
|
840
|
+
options.apply_defaults timeout: @config.rpcs.get_wasm_plugin_version.timeout,
|
841
|
+
metadata: call_metadata,
|
842
|
+
retry_policy: @config.rpcs.get_wasm_plugin_version.retry_policy
|
843
|
+
|
844
|
+
options.apply_defaults timeout: @config.timeout,
|
845
|
+
metadata: @config.metadata,
|
846
|
+
retry_policy: @config.retry_policy
|
847
|
+
|
848
|
+
@network_services_stub.get_wasm_plugin_version request, options do |result, operation|
|
849
|
+
yield result, operation if block_given?
|
850
|
+
end
|
851
|
+
rescue ::Gapic::Rest::Error => e
|
852
|
+
raise ::Google::Cloud::Error.from_error(e)
|
853
|
+
end
|
854
|
+
|
855
|
+
##
|
856
|
+
# Creates a new `WasmPluginVersion` resource in a given project
|
857
|
+
# and location.
|
858
|
+
#
|
859
|
+
# @overload create_wasm_plugin_version(request, options = nil)
|
860
|
+
# Pass arguments to `create_wasm_plugin_version` via a request object, either of type
|
861
|
+
# {::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest} or an equivalent Hash.
|
862
|
+
#
|
863
|
+
# @param request [::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest, ::Hash]
|
864
|
+
# A request object representing the call parameters. Required. To specify no
|
865
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
866
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
867
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
868
|
+
#
|
869
|
+
# @overload create_wasm_plugin_version(parent: nil, wasm_plugin_version_id: nil, wasm_plugin_version: nil)
|
870
|
+
# Pass arguments to `create_wasm_plugin_version` via keyword arguments. Note that at
|
871
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
872
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
873
|
+
#
|
874
|
+
# @param parent [::String]
|
875
|
+
# Required. The parent resource of the `WasmPluginVersion` resource. Must be
|
876
|
+
# in the format
|
877
|
+
# `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.
|
878
|
+
# @param wasm_plugin_version_id [::String]
|
879
|
+
# Required. User-provided ID of the `WasmPluginVersion` resource to be
|
880
|
+
# created.
|
881
|
+
# @param wasm_plugin_version [::Google::Cloud::NetworkServices::V1::WasmPluginVersion, ::Hash]
|
882
|
+
# Required. `WasmPluginVersion` resource to be created.
|
883
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
884
|
+
# @yieldparam result [::Gapic::Operation]
|
885
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
886
|
+
#
|
887
|
+
# @return [::Gapic::Operation]
|
888
|
+
#
|
889
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
890
|
+
#
|
891
|
+
# @example Basic example
|
892
|
+
# require "google/cloud/network_services/v1"
|
893
|
+
#
|
894
|
+
# # Create a client object. The client can be reused for multiple calls.
|
895
|
+
# client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new
|
896
|
+
#
|
897
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
898
|
+
# request = Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest.new
|
899
|
+
#
|
900
|
+
# # Call the create_wasm_plugin_version method.
|
901
|
+
# result = client.create_wasm_plugin_version request
|
902
|
+
#
|
903
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
904
|
+
# # check the status of an operation, cancel it, or wait for results.
|
905
|
+
# # Here is how to wait for a response.
|
906
|
+
# result.wait_until_done! timeout: 60
|
907
|
+
# if result.response?
|
908
|
+
# p result.response
|
909
|
+
# else
|
910
|
+
# puts "No response received."
|
911
|
+
# end
|
912
|
+
#
|
913
|
+
def create_wasm_plugin_version request, options = nil
|
914
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
915
|
+
|
916
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateWasmPluginVersionRequest
|
917
|
+
|
918
|
+
# Converts hash and nil to an options object
|
919
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
920
|
+
|
921
|
+
# Customize the options with defaults
|
922
|
+
call_metadata = @config.rpcs.create_wasm_plugin_version.metadata.to_h
|
923
|
+
|
924
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
925
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
926
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
927
|
+
gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION,
|
928
|
+
transports_version_send: [:rest]
|
929
|
+
|
930
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
931
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
932
|
+
|
933
|
+
options.apply_defaults timeout: @config.rpcs.create_wasm_plugin_version.timeout,
|
934
|
+
metadata: call_metadata,
|
935
|
+
retry_policy: @config.rpcs.create_wasm_plugin_version.retry_policy
|
936
|
+
|
937
|
+
options.apply_defaults timeout: @config.timeout,
|
938
|
+
metadata: @config.metadata,
|
939
|
+
retry_policy: @config.retry_policy
|
940
|
+
|
941
|
+
@network_services_stub.create_wasm_plugin_version request, options do |result, operation|
|
942
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
943
|
+
yield result, operation if block_given?
|
944
|
+
throw :response, result
|
945
|
+
end
|
946
|
+
rescue ::Gapic::Rest::Error => e
|
947
|
+
raise ::Google::Cloud::Error.from_error(e)
|
948
|
+
end
|
949
|
+
|
950
|
+
##
|
951
|
+
# Deletes the specified `WasmPluginVersion` resource.
|
952
|
+
#
|
953
|
+
# @overload delete_wasm_plugin_version(request, options = nil)
|
954
|
+
# Pass arguments to `delete_wasm_plugin_version` via a request object, either of type
|
955
|
+
# {::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest} or an equivalent Hash.
|
956
|
+
#
|
957
|
+
# @param request [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest, ::Hash]
|
958
|
+
# A request object representing the call parameters. Required. To specify no
|
959
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
960
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
961
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
962
|
+
#
|
963
|
+
# @overload delete_wasm_plugin_version(name: nil)
|
964
|
+
# Pass arguments to `delete_wasm_plugin_version` via keyword arguments. Note that at
|
965
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
966
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
967
|
+
#
|
968
|
+
# @param name [::String]
|
969
|
+
# Required. A name of the `WasmPluginVersion` resource to delete. Must be in
|
970
|
+
# the format
|
971
|
+
# `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.
|
972
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
973
|
+
# @yieldparam result [::Gapic::Operation]
|
974
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
975
|
+
#
|
976
|
+
# @return [::Gapic::Operation]
|
977
|
+
#
|
978
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
979
|
+
#
|
980
|
+
# @example Basic example
|
981
|
+
# require "google/cloud/network_services/v1"
|
982
|
+
#
|
983
|
+
# # Create a client object. The client can be reused for multiple calls.
|
984
|
+
# client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new
|
985
|
+
#
|
986
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
987
|
+
# request = Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest.new
|
988
|
+
#
|
989
|
+
# # Call the delete_wasm_plugin_version method.
|
990
|
+
# result = client.delete_wasm_plugin_version request
|
991
|
+
#
|
992
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
993
|
+
# # check the status of an operation, cancel it, or wait for results.
|
994
|
+
# # Here is how to wait for a response.
|
995
|
+
# result.wait_until_done! timeout: 60
|
996
|
+
# if result.response?
|
997
|
+
# p result.response
|
998
|
+
# else
|
999
|
+
# puts "No response received."
|
1000
|
+
# end
|
1001
|
+
#
|
1002
|
+
def delete_wasm_plugin_version request, options = nil
|
1003
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1004
|
+
|
1005
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginVersionRequest
|
1006
|
+
|
1007
|
+
# Converts hash and nil to an options object
|
1008
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1009
|
+
|
1010
|
+
# Customize the options with defaults
|
1011
|
+
call_metadata = @config.rpcs.delete_wasm_plugin_version.metadata.to_h
|
1012
|
+
|
1013
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1014
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1015
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1016
|
+
gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION,
|
1017
|
+
transports_version_send: [:rest]
|
1018
|
+
|
1019
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1020
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1021
|
+
|
1022
|
+
options.apply_defaults timeout: @config.rpcs.delete_wasm_plugin_version.timeout,
|
1023
|
+
metadata: call_metadata,
|
1024
|
+
retry_policy: @config.rpcs.delete_wasm_plugin_version.retry_policy
|
1025
|
+
|
1026
|
+
options.apply_defaults timeout: @config.timeout,
|
1027
|
+
metadata: @config.metadata,
|
1028
|
+
retry_policy: @config.retry_policy
|
1029
|
+
|
1030
|
+
@network_services_stub.delete_wasm_plugin_version request, options do |result, operation|
|
1031
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1032
|
+
yield result, operation if block_given?
|
1033
|
+
throw :response, result
|
1034
|
+
end
|
1035
|
+
rescue ::Gapic::Rest::Error => e
|
1036
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1037
|
+
end
|
1038
|
+
|
1039
|
+
##
|
1040
|
+
# Lists `WasmPlugin` resources in a given project and
|
1041
|
+
# location.
|
1042
|
+
#
|
1043
|
+
# @overload list_wasm_plugins(request, options = nil)
|
1044
|
+
# Pass arguments to `list_wasm_plugins` via a request object, either of type
|
1045
|
+
# {::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest} or an equivalent Hash.
|
1046
|
+
#
|
1047
|
+
# @param request [::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest, ::Hash]
|
1048
|
+
# A request object representing the call parameters. Required. To specify no
|
1049
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1050
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1051
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1052
|
+
#
|
1053
|
+
# @overload list_wasm_plugins(parent: nil, page_size: nil, page_token: nil)
|
1054
|
+
# Pass arguments to `list_wasm_plugins` via keyword arguments. Note that at
|
1055
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1056
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1057
|
+
#
|
1058
|
+
# @param parent [::String]
|
1059
|
+
# Required. The project and location from which the `WasmPlugin` resources
|
1060
|
+
# are listed, specified in the following format:
|
1061
|
+
# `projects/{project}/locations/global`.
|
1062
|
+
# @param page_size [::Integer]
|
1063
|
+
# Maximum number of `WasmPlugin` resources to return per call.
|
1064
|
+
# If not specified, at most 50 `WasmPlugin` resources are returned.
|
1065
|
+
# The maximum value is 1000; values above 1000 are coerced to 1000.
|
1066
|
+
# @param page_token [::String]
|
1067
|
+
# The value returned by the last `ListWasmPluginsResponse` call.
|
1068
|
+
# Indicates that this is a continuation of a prior
|
1069
|
+
# `ListWasmPlugins` call, and that the
|
1070
|
+
# next page of data is to be returned.
|
1071
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1072
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPlugin>]
|
1073
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1074
|
+
#
|
1075
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkServices::V1::WasmPlugin>]
|
1076
|
+
#
|
1077
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1078
|
+
#
|
1079
|
+
# @example Basic example
|
1080
|
+
# require "google/cloud/network_services/v1"
|
1081
|
+
#
|
1082
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1083
|
+
# client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new
|
1084
|
+
#
|
1085
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1086
|
+
# request = Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest.new
|
1087
|
+
#
|
1088
|
+
# # Call the list_wasm_plugins method.
|
1089
|
+
# result = client.list_wasm_plugins request
|
1090
|
+
#
|
1091
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1092
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1093
|
+
# result.each do |item|
|
1094
|
+
# # Each element is of type ::Google::Cloud::NetworkServices::V1::WasmPlugin.
|
1095
|
+
# p item
|
1096
|
+
# end
|
1097
|
+
#
|
1098
|
+
def list_wasm_plugins request, options = nil
|
1099
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1100
|
+
|
1101
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::ListWasmPluginsRequest
|
1102
|
+
|
1103
|
+
# Converts hash and nil to an options object
|
1104
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1105
|
+
|
1106
|
+
# Customize the options with defaults
|
1107
|
+
call_metadata = @config.rpcs.list_wasm_plugins.metadata.to_h
|
1108
|
+
|
1109
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1110
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1111
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1112
|
+
gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION,
|
1113
|
+
transports_version_send: [:rest]
|
1114
|
+
|
1115
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1116
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1117
|
+
|
1118
|
+
options.apply_defaults timeout: @config.rpcs.list_wasm_plugins.timeout,
|
1119
|
+
metadata: call_metadata,
|
1120
|
+
retry_policy: @config.rpcs.list_wasm_plugins.retry_policy
|
1121
|
+
|
1122
|
+
options.apply_defaults timeout: @config.timeout,
|
1123
|
+
metadata: @config.metadata,
|
1124
|
+
retry_policy: @config.retry_policy
|
1125
|
+
|
1126
|
+
@network_services_stub.list_wasm_plugins request, options do |result, operation|
|
1127
|
+
result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_wasm_plugins, "wasm_plugins", request, result, options
|
1128
|
+
yield result, operation if block_given?
|
1129
|
+
throw :response, result
|
1130
|
+
end
|
1131
|
+
rescue ::Gapic::Rest::Error => e
|
1132
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1133
|
+
end
|
1134
|
+
|
1135
|
+
##
|
1136
|
+
# Gets details of the specified `WasmPlugin` resource.
|
1137
|
+
#
|
1138
|
+
# @overload get_wasm_plugin(request, options = nil)
|
1139
|
+
# Pass arguments to `get_wasm_plugin` via a request object, either of type
|
1140
|
+
# {::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest} or an equivalent Hash.
|
1141
|
+
#
|
1142
|
+
# @param request [::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest, ::Hash]
|
1143
|
+
# A request object representing the call parameters. Required. To specify no
|
1144
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1145
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1146
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1147
|
+
#
|
1148
|
+
# @overload get_wasm_plugin(name: nil, view: nil)
|
1149
|
+
# Pass arguments to `get_wasm_plugin` via keyword arguments. Note that at
|
1150
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1151
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1152
|
+
#
|
1153
|
+
# @param name [::String]
|
1154
|
+
# Required. A name of the `WasmPlugin` resource to get. Must be in the
|
1155
|
+
# format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.
|
1156
|
+
# @param view [::Google::Cloud::NetworkServices::V1::WasmPluginView]
|
1157
|
+
# Determines how much data must be returned in the response. See
|
1158
|
+
# [AIP-157](https://google.aip.dev/157).
|
1159
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1160
|
+
# @yieldparam result [::Google::Cloud::NetworkServices::V1::WasmPlugin]
|
1161
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1162
|
+
#
|
1163
|
+
# @return [::Google::Cloud::NetworkServices::V1::WasmPlugin]
|
1164
|
+
#
|
1165
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1166
|
+
#
|
1167
|
+
# @example Basic example
|
1168
|
+
# require "google/cloud/network_services/v1"
|
1169
|
+
#
|
1170
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1171
|
+
# client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new
|
1172
|
+
#
|
1173
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1174
|
+
# request = Google::Cloud::NetworkServices::V1::GetWasmPluginRequest.new
|
1175
|
+
#
|
1176
|
+
# # Call the get_wasm_plugin method.
|
1177
|
+
# result = client.get_wasm_plugin request
|
1178
|
+
#
|
1179
|
+
# # The returned object is of type Google::Cloud::NetworkServices::V1::WasmPlugin.
|
1180
|
+
# p result
|
1181
|
+
#
|
1182
|
+
def get_wasm_plugin request, options = nil
|
1183
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1184
|
+
|
1185
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::GetWasmPluginRequest
|
1186
|
+
|
1187
|
+
# Converts hash and nil to an options object
|
1188
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1189
|
+
|
1190
|
+
# Customize the options with defaults
|
1191
|
+
call_metadata = @config.rpcs.get_wasm_plugin.metadata.to_h
|
1192
|
+
|
1193
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1194
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1195
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1196
|
+
gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION,
|
1197
|
+
transports_version_send: [:rest]
|
1198
|
+
|
1199
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1200
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1201
|
+
|
1202
|
+
options.apply_defaults timeout: @config.rpcs.get_wasm_plugin.timeout,
|
1203
|
+
metadata: call_metadata,
|
1204
|
+
retry_policy: @config.rpcs.get_wasm_plugin.retry_policy
|
1205
|
+
|
1206
|
+
options.apply_defaults timeout: @config.timeout,
|
1207
|
+
metadata: @config.metadata,
|
1208
|
+
retry_policy: @config.retry_policy
|
1209
|
+
|
1210
|
+
@network_services_stub.get_wasm_plugin request, options do |result, operation|
|
1211
|
+
yield result, operation if block_given?
|
1212
|
+
end
|
1213
|
+
rescue ::Gapic::Rest::Error => e
|
1214
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1215
|
+
end
|
1216
|
+
|
1217
|
+
##
|
1218
|
+
# Creates a new `WasmPlugin` resource in a given project
|
1219
|
+
# and location.
|
1220
|
+
#
|
1221
|
+
# @overload create_wasm_plugin(request, options = nil)
|
1222
|
+
# Pass arguments to `create_wasm_plugin` via a request object, either of type
|
1223
|
+
# {::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest} or an equivalent Hash.
|
1224
|
+
#
|
1225
|
+
# @param request [::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest, ::Hash]
|
1226
|
+
# A request object representing the call parameters. Required. To specify no
|
1227
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1228
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1229
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1230
|
+
#
|
1231
|
+
# @overload create_wasm_plugin(parent: nil, wasm_plugin_id: nil, wasm_plugin: nil)
|
1232
|
+
# Pass arguments to `create_wasm_plugin` via keyword arguments. Note that at
|
1233
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1234
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1235
|
+
#
|
1236
|
+
# @param parent [::String]
|
1237
|
+
# Required. The parent resource of the `WasmPlugin` resource. Must be in the
|
1238
|
+
# format `projects/{project}/locations/global`.
|
1239
|
+
# @param wasm_plugin_id [::String]
|
1240
|
+
# Required. User-provided ID of the `WasmPlugin` resource to be created.
|
1241
|
+
# @param wasm_plugin [::Google::Cloud::NetworkServices::V1::WasmPlugin, ::Hash]
|
1242
|
+
# Required. `WasmPlugin` resource to be created.
|
1243
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1244
|
+
# @yieldparam result [::Gapic::Operation]
|
1245
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1246
|
+
#
|
1247
|
+
# @return [::Gapic::Operation]
|
1248
|
+
#
|
1249
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1250
|
+
#
|
1251
|
+
# @example Basic example
|
1252
|
+
# require "google/cloud/network_services/v1"
|
1253
|
+
#
|
1254
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1255
|
+
# client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new
|
1256
|
+
#
|
1257
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1258
|
+
# request = Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest.new
|
1259
|
+
#
|
1260
|
+
# # Call the create_wasm_plugin method.
|
1261
|
+
# result = client.create_wasm_plugin request
|
1262
|
+
#
|
1263
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1264
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1265
|
+
# # Here is how to wait for a response.
|
1266
|
+
# result.wait_until_done! timeout: 60
|
1267
|
+
# if result.response?
|
1268
|
+
# p result.response
|
1269
|
+
# else
|
1270
|
+
# puts "No response received."
|
1271
|
+
# end
|
1272
|
+
#
|
1273
|
+
def create_wasm_plugin request, options = nil
|
1274
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1275
|
+
|
1276
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::CreateWasmPluginRequest
|
1277
|
+
|
1278
|
+
# Converts hash and nil to an options object
|
1279
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1280
|
+
|
1281
|
+
# Customize the options with defaults
|
1282
|
+
call_metadata = @config.rpcs.create_wasm_plugin.metadata.to_h
|
1283
|
+
|
1284
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1285
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1286
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1287
|
+
gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION,
|
1288
|
+
transports_version_send: [:rest]
|
1289
|
+
|
1290
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1291
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1292
|
+
|
1293
|
+
options.apply_defaults timeout: @config.rpcs.create_wasm_plugin.timeout,
|
1294
|
+
metadata: call_metadata,
|
1295
|
+
retry_policy: @config.rpcs.create_wasm_plugin.retry_policy
|
1296
|
+
|
1297
|
+
options.apply_defaults timeout: @config.timeout,
|
1298
|
+
metadata: @config.metadata,
|
1299
|
+
retry_policy: @config.retry_policy
|
1300
|
+
|
1301
|
+
@network_services_stub.create_wasm_plugin request, options do |result, operation|
|
1302
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1303
|
+
yield result, operation if block_given?
|
1304
|
+
throw :response, result
|
1305
|
+
end
|
1306
|
+
rescue ::Gapic::Rest::Error => e
|
1307
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1308
|
+
end
|
1309
|
+
|
1310
|
+
##
|
1311
|
+
# Updates the parameters of the specified `WasmPlugin` resource.
|
1312
|
+
#
|
1313
|
+
# @overload update_wasm_plugin(request, options = nil)
|
1314
|
+
# Pass arguments to `update_wasm_plugin` via a request object, either of type
|
1315
|
+
# {::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest} or an equivalent Hash.
|
1316
|
+
#
|
1317
|
+
# @param request [::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest, ::Hash]
|
1318
|
+
# A request object representing the call parameters. Required. To specify no
|
1319
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1320
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1321
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1322
|
+
#
|
1323
|
+
# @overload update_wasm_plugin(update_mask: nil, wasm_plugin: nil)
|
1324
|
+
# Pass arguments to `update_wasm_plugin` via keyword arguments. Note that at
|
1325
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1326
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1327
|
+
#
|
1328
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1329
|
+
# Optional. Used to specify the fields to be overwritten in the
|
1330
|
+
# `WasmPlugin` resource by the update.
|
1331
|
+
# The fields specified in the `update_mask` field are relative to the
|
1332
|
+
# resource, not the full request.
|
1333
|
+
# An omitted `update_mask` field is treated as an implied `update_mask`
|
1334
|
+
# field equivalent to all fields that are populated (that have a non-empty
|
1335
|
+
# value).
|
1336
|
+
# The `update_mask` field supports a special value `*`, which means that
|
1337
|
+
# each field in the given `WasmPlugin` resource (including the empty ones)
|
1338
|
+
# replaces the current value.
|
1339
|
+
# @param wasm_plugin [::Google::Cloud::NetworkServices::V1::WasmPlugin, ::Hash]
|
1340
|
+
# Required. Updated `WasmPlugin` resource.
|
1341
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1342
|
+
# @yieldparam result [::Gapic::Operation]
|
1343
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1344
|
+
#
|
1345
|
+
# @return [::Gapic::Operation]
|
1346
|
+
#
|
1347
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1348
|
+
#
|
1349
|
+
# @example Basic example
|
1350
|
+
# require "google/cloud/network_services/v1"
|
1351
|
+
#
|
1352
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1353
|
+
# client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new
|
1354
|
+
#
|
1355
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1356
|
+
# request = Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest.new
|
1357
|
+
#
|
1358
|
+
# # Call the update_wasm_plugin method.
|
1359
|
+
# result = client.update_wasm_plugin request
|
1360
|
+
#
|
1361
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1362
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1363
|
+
# # Here is how to wait for a response.
|
1364
|
+
# result.wait_until_done! timeout: 60
|
1365
|
+
# if result.response?
|
1366
|
+
# p result.response
|
1367
|
+
# else
|
1368
|
+
# puts "No response received."
|
1369
|
+
# end
|
1370
|
+
#
|
1371
|
+
def update_wasm_plugin request, options = nil
|
1372
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1373
|
+
|
1374
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::UpdateWasmPluginRequest
|
1375
|
+
|
1376
|
+
# Converts hash and nil to an options object
|
1377
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1378
|
+
|
1379
|
+
# Customize the options with defaults
|
1380
|
+
call_metadata = @config.rpcs.update_wasm_plugin.metadata.to_h
|
1381
|
+
|
1382
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1383
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1384
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1385
|
+
gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION,
|
1386
|
+
transports_version_send: [:rest]
|
1387
|
+
|
1388
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1389
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1390
|
+
|
1391
|
+
options.apply_defaults timeout: @config.rpcs.update_wasm_plugin.timeout,
|
1392
|
+
metadata: call_metadata,
|
1393
|
+
retry_policy: @config.rpcs.update_wasm_plugin.retry_policy
|
1394
|
+
|
1395
|
+
options.apply_defaults timeout: @config.timeout,
|
1396
|
+
metadata: @config.metadata,
|
1397
|
+
retry_policy: @config.retry_policy
|
1398
|
+
|
1399
|
+
@network_services_stub.update_wasm_plugin request, options do |result, operation|
|
1400
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1401
|
+
yield result, operation if block_given?
|
1402
|
+
throw :response, result
|
1403
|
+
end
|
1404
|
+
rescue ::Gapic::Rest::Error => e
|
1405
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1406
|
+
end
|
1407
|
+
|
1408
|
+
##
|
1409
|
+
# Deletes the specified `WasmPlugin` resource.
|
1410
|
+
#
|
1411
|
+
# @overload delete_wasm_plugin(request, options = nil)
|
1412
|
+
# Pass arguments to `delete_wasm_plugin` via a request object, either of type
|
1413
|
+
# {::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest} or an equivalent Hash.
|
1414
|
+
#
|
1415
|
+
# @param request [::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest, ::Hash]
|
1416
|
+
# A request object representing the call parameters. Required. To specify no
|
1417
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1418
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1419
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1420
|
+
#
|
1421
|
+
# @overload delete_wasm_plugin(name: nil)
|
1422
|
+
# Pass arguments to `delete_wasm_plugin` via keyword arguments. Note that at
|
1423
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1424
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1425
|
+
#
|
1426
|
+
# @param name [::String]
|
1427
|
+
# Required. A name of the `WasmPlugin` resource to delete. Must be in the
|
1428
|
+
# format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.
|
1429
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1430
|
+
# @yieldparam result [::Gapic::Operation]
|
1431
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1432
|
+
#
|
1433
|
+
# @return [::Gapic::Operation]
|
1434
|
+
#
|
1435
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1436
|
+
#
|
1437
|
+
# @example Basic example
|
1438
|
+
# require "google/cloud/network_services/v1"
|
1439
|
+
#
|
1440
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1441
|
+
# client = Google::Cloud::NetworkServices::V1::NetworkServices::Rest::Client.new
|
1442
|
+
#
|
1443
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1444
|
+
# request = Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest.new
|
1445
|
+
#
|
1446
|
+
# # Call the delete_wasm_plugin method.
|
1447
|
+
# result = client.delete_wasm_plugin request
|
1448
|
+
#
|
1449
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1450
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1451
|
+
# # Here is how to wait for a response.
|
1452
|
+
# result.wait_until_done! timeout: 60
|
1453
|
+
# if result.response?
|
1454
|
+
# p result.response
|
1455
|
+
# else
|
1456
|
+
# puts "No response received."
|
1457
|
+
# end
|
1458
|
+
#
|
1459
|
+
def delete_wasm_plugin request, options = nil
|
1460
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1461
|
+
|
1462
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkServices::V1::DeleteWasmPluginRequest
|
1463
|
+
|
1464
|
+
# Converts hash and nil to an options object
|
1465
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1466
|
+
|
1467
|
+
# Customize the options with defaults
|
1468
|
+
call_metadata = @config.rpcs.delete_wasm_plugin.metadata.to_h
|
1469
|
+
|
1470
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1471
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1472
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1473
|
+
gapic_version: ::Google::Cloud::NetworkServices::V1::VERSION,
|
1474
|
+
transports_version_send: [:rest]
|
1475
|
+
|
1476
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1477
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1478
|
+
|
1479
|
+
options.apply_defaults timeout: @config.rpcs.delete_wasm_plugin.timeout,
|
1480
|
+
metadata: call_metadata,
|
1481
|
+
retry_policy: @config.rpcs.delete_wasm_plugin.retry_policy
|
1482
|
+
|
1483
|
+
options.apply_defaults timeout: @config.timeout,
|
1484
|
+
metadata: @config.metadata,
|
1485
|
+
retry_policy: @config.retry_policy
|
1486
|
+
|
1487
|
+
@network_services_stub.delete_wasm_plugin request, options do |result, operation|
|
1488
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1489
|
+
yield result, operation if block_given?
|
1490
|
+
throw :response, result
|
1491
|
+
end
|
1492
|
+
rescue ::Gapic::Rest::Error => e
|
1493
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1494
|
+
end
|
1495
|
+
|
678
1496
|
##
|
679
1497
|
# Lists Gateways in a given project and location.
|
680
1498
|
#
|
@@ -4766,6 +5584,51 @@ module Google
|
|
4766
5584
|
#
|
4767
5585
|
attr_reader :delete_endpoint_policy
|
4768
5586
|
##
|
5587
|
+
# RPC-specific configuration for `list_wasm_plugin_versions`
|
5588
|
+
# @return [::Gapic::Config::Method]
|
5589
|
+
#
|
5590
|
+
attr_reader :list_wasm_plugin_versions
|
5591
|
+
##
|
5592
|
+
# RPC-specific configuration for `get_wasm_plugin_version`
|
5593
|
+
# @return [::Gapic::Config::Method]
|
5594
|
+
#
|
5595
|
+
attr_reader :get_wasm_plugin_version
|
5596
|
+
##
|
5597
|
+
# RPC-specific configuration for `create_wasm_plugin_version`
|
5598
|
+
# @return [::Gapic::Config::Method]
|
5599
|
+
#
|
5600
|
+
attr_reader :create_wasm_plugin_version
|
5601
|
+
##
|
5602
|
+
# RPC-specific configuration for `delete_wasm_plugin_version`
|
5603
|
+
# @return [::Gapic::Config::Method]
|
5604
|
+
#
|
5605
|
+
attr_reader :delete_wasm_plugin_version
|
5606
|
+
##
|
5607
|
+
# RPC-specific configuration for `list_wasm_plugins`
|
5608
|
+
# @return [::Gapic::Config::Method]
|
5609
|
+
#
|
5610
|
+
attr_reader :list_wasm_plugins
|
5611
|
+
##
|
5612
|
+
# RPC-specific configuration for `get_wasm_plugin`
|
5613
|
+
# @return [::Gapic::Config::Method]
|
5614
|
+
#
|
5615
|
+
attr_reader :get_wasm_plugin
|
5616
|
+
##
|
5617
|
+
# RPC-specific configuration for `create_wasm_plugin`
|
5618
|
+
# @return [::Gapic::Config::Method]
|
5619
|
+
#
|
5620
|
+
attr_reader :create_wasm_plugin
|
5621
|
+
##
|
5622
|
+
# RPC-specific configuration for `update_wasm_plugin`
|
5623
|
+
# @return [::Gapic::Config::Method]
|
5624
|
+
#
|
5625
|
+
attr_reader :update_wasm_plugin
|
5626
|
+
##
|
5627
|
+
# RPC-specific configuration for `delete_wasm_plugin`
|
5628
|
+
# @return [::Gapic::Config::Method]
|
5629
|
+
#
|
5630
|
+
attr_reader :delete_wasm_plugin
|
5631
|
+
##
|
4769
5632
|
# RPC-specific configuration for `list_gateways`
|
4770
5633
|
# @return [::Gapic::Config::Method]
|
4771
5634
|
#
|
@@ -4998,6 +5861,24 @@ module Google
|
|
4998
5861
|
@update_endpoint_policy = ::Gapic::Config::Method.new update_endpoint_policy_config
|
4999
5862
|
delete_endpoint_policy_config = parent_rpcs.delete_endpoint_policy if parent_rpcs.respond_to? :delete_endpoint_policy
|
5000
5863
|
@delete_endpoint_policy = ::Gapic::Config::Method.new delete_endpoint_policy_config
|
5864
|
+
list_wasm_plugin_versions_config = parent_rpcs.list_wasm_plugin_versions if parent_rpcs.respond_to? :list_wasm_plugin_versions
|
5865
|
+
@list_wasm_plugin_versions = ::Gapic::Config::Method.new list_wasm_plugin_versions_config
|
5866
|
+
get_wasm_plugin_version_config = parent_rpcs.get_wasm_plugin_version if parent_rpcs.respond_to? :get_wasm_plugin_version
|
5867
|
+
@get_wasm_plugin_version = ::Gapic::Config::Method.new get_wasm_plugin_version_config
|
5868
|
+
create_wasm_plugin_version_config = parent_rpcs.create_wasm_plugin_version if parent_rpcs.respond_to? :create_wasm_plugin_version
|
5869
|
+
@create_wasm_plugin_version = ::Gapic::Config::Method.new create_wasm_plugin_version_config
|
5870
|
+
delete_wasm_plugin_version_config = parent_rpcs.delete_wasm_plugin_version if parent_rpcs.respond_to? :delete_wasm_plugin_version
|
5871
|
+
@delete_wasm_plugin_version = ::Gapic::Config::Method.new delete_wasm_plugin_version_config
|
5872
|
+
list_wasm_plugins_config = parent_rpcs.list_wasm_plugins if parent_rpcs.respond_to? :list_wasm_plugins
|
5873
|
+
@list_wasm_plugins = ::Gapic::Config::Method.new list_wasm_plugins_config
|
5874
|
+
get_wasm_plugin_config = parent_rpcs.get_wasm_plugin if parent_rpcs.respond_to? :get_wasm_plugin
|
5875
|
+
@get_wasm_plugin = ::Gapic::Config::Method.new get_wasm_plugin_config
|
5876
|
+
create_wasm_plugin_config = parent_rpcs.create_wasm_plugin if parent_rpcs.respond_to? :create_wasm_plugin
|
5877
|
+
@create_wasm_plugin = ::Gapic::Config::Method.new create_wasm_plugin_config
|
5878
|
+
update_wasm_plugin_config = parent_rpcs.update_wasm_plugin if parent_rpcs.respond_to? :update_wasm_plugin
|
5879
|
+
@update_wasm_plugin = ::Gapic::Config::Method.new update_wasm_plugin_config
|
5880
|
+
delete_wasm_plugin_config = parent_rpcs.delete_wasm_plugin if parent_rpcs.respond_to? :delete_wasm_plugin
|
5881
|
+
@delete_wasm_plugin = ::Gapic::Config::Method.new delete_wasm_plugin_config
|
5001
5882
|
list_gateways_config = parent_rpcs.list_gateways if parent_rpcs.respond_to? :list_gateways
|
5002
5883
|
@list_gateways = ::Gapic::Config::Method.new list_gateways_config
|
5003
5884
|
get_gateway_config = parent_rpcs.get_gateway if parent_rpcs.respond_to? :get_gateway
|