google-cloud-bare_metal_solution-v2 0.4.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/client.rb +2769 -405
  3. data/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/paths.rb +135 -0
  4. data/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb +2031 -285
  5. data/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/service_stub.rb +1662 -231
  6. data/lib/google/cloud/bare_metal_solution/v2/version.rb +1 -1
  7. data/lib/google/cloud/baremetalsolution/v2/baremetalsolution_pb.rb +7 -6
  8. data/lib/google/cloud/baremetalsolution/v2/baremetalsolution_services_pb.rb +62 -0
  9. data/lib/google/cloud/baremetalsolution/v2/common_pb.rb +48 -0
  10. data/lib/google/cloud/baremetalsolution/v2/instance_pb.rb +12 -6
  11. data/lib/google/cloud/baremetalsolution/v2/lun_pb.rb +4 -1
  12. data/lib/google/cloud/baremetalsolution/v2/network_pb.rb +3 -1
  13. data/lib/google/cloud/baremetalsolution/v2/nfs_share_pb.rb +5 -1
  14. data/lib/google/cloud/baremetalsolution/v2/osimage_pb.rb +47 -0
  15. data/lib/google/cloud/baremetalsolution/v2/provisioning_pb.rb +80 -0
  16. data/lib/google/cloud/baremetalsolution/v2/ssh_key_pb.rb +49 -0
  17. data/lib/google/cloud/baremetalsolution/v2/volume_pb.rb +8 -1
  18. data/lib/google/cloud/baremetalsolution/v2/volume_snapshot_pb.rb +54 -0
  19. data/proto_docs/google/cloud/baremetalsolution/v2/{baremetalsolution.rb → common.rb} +36 -14
  20. data/proto_docs/google/cloud/baremetalsolution/v2/instance.rb +95 -68
  21. data/proto_docs/google/cloud/baremetalsolution/v2/lun.rb +19 -0
  22. data/proto_docs/google/cloud/baremetalsolution/v2/network.rb +68 -2
  23. data/proto_docs/google/cloud/baremetalsolution/v2/nfs_share.rb +83 -9
  24. data/proto_docs/google/cloud/baremetalsolution/v2/osimage.rb +80 -0
  25. data/proto_docs/google/cloud/baremetalsolution/v2/provisioning.rb +639 -0
  26. data/proto_docs/google/cloud/baremetalsolution/v2/ssh_key.rb +97 -0
  27. data/proto_docs/google/cloud/baremetalsolution/v2/volume.rb +91 -4
  28. data/proto_docs/google/cloud/baremetalsolution/v2/volume_snapshot.rb +134 -0
  29. data/proto_docs/google/type/expr.rb +75 -0
  30. metadata +13 -3
@@ -478,6 +478,95 @@ module Google
478
478
  raise ::Google::Cloud::Error.from_error(e)
479
479
  end
480
480
 
481
+ ##
482
+ # RenameInstance sets a new name for an instance.
483
+ # Use with caution, previous names become immediately invalidated.
484
+ #
485
+ # @overload rename_instance(request, options = nil)
486
+ # Pass arguments to `rename_instance` via a request object, either of type
487
+ # {::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest} or an equivalent Hash.
488
+ #
489
+ # @param request [::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest, ::Hash]
490
+ # A request object representing the call parameters. Required. To specify no
491
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
492
+ # @param options [::Gapic::CallOptions, ::Hash]
493
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
494
+ #
495
+ # @overload rename_instance(name: nil, new_instance_id: nil)
496
+ # Pass arguments to `rename_instance` via keyword arguments. Note that at
497
+ # least one keyword argument is required. To specify no parameters, or to keep all
498
+ # the default parameter values, pass an empty Hash as a request object (see above).
499
+ #
500
+ # @param name [::String]
501
+ # Required. The `name` field is used to identify the instance.
502
+ # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance}
503
+ # @param new_instance_id [::String]
504
+ # Required. The new `id` of the instance.
505
+ #
506
+ # @yield [response, operation] Access the result along with the RPC operation
507
+ # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::Instance]
508
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
509
+ #
510
+ # @return [::Google::Cloud::BareMetalSolution::V2::Instance]
511
+ #
512
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
513
+ #
514
+ # @example Basic example
515
+ # require "google/cloud/bare_metal_solution/v2"
516
+ #
517
+ # # Create a client object. The client can be reused for multiple calls.
518
+ # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
519
+ #
520
+ # # Create a request. To set request fields, pass in keyword arguments.
521
+ # request = Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest.new
522
+ #
523
+ # # Call the rename_instance method.
524
+ # result = client.rename_instance request
525
+ #
526
+ # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Instance.
527
+ # p result
528
+ #
529
+ def rename_instance request, options = nil
530
+ raise ::ArgumentError, "request must be provided" if request.nil?
531
+
532
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameInstanceRequest
533
+
534
+ # Converts hash and nil to an options object
535
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
536
+
537
+ # Customize the options with defaults
538
+ metadata = @config.rpcs.rename_instance.metadata.to_h
539
+
540
+ # Set x-goog-api-client and x-goog-user-project headers
541
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
542
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
543
+ gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION
544
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
545
+
546
+ header_params = {}
547
+ if request.name
548
+ header_params["name"] = request.name
549
+ end
550
+
551
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
552
+ metadata[:"x-goog-request-params"] ||= request_params_header
553
+
554
+ options.apply_defaults timeout: @config.rpcs.rename_instance.timeout,
555
+ metadata: metadata,
556
+ retry_policy: @config.rpcs.rename_instance.retry_policy
557
+
558
+ options.apply_defaults timeout: @config.timeout,
559
+ metadata: @config.metadata,
560
+ retry_policy: @config.retry_policy
561
+
562
+ @bare_metal_solution_stub.call_rpc :rename_instance, request, options: options do |response, operation|
563
+ yield response, operation if block_given?
564
+ return response
565
+ end
566
+ rescue ::GRPC::BadStatus => e
567
+ raise ::Google::Cloud::Error.from_error(e)
568
+ end
569
+
481
570
  ##
482
571
  # Perform an ungraceful, hard reset on a server. Equivalent to shutting the
483
572
  # power off and then turning it back on.
@@ -759,27 +848,25 @@ module Google
759
848
  end
760
849
 
761
850
  ##
762
- # Detach LUN from Instance.
851
+ # Enable the interactive serial console feature on an instance.
763
852
  #
764
- # @overload detach_lun(request, options = nil)
765
- # Pass arguments to `detach_lun` via a request object, either of type
766
- # {::Google::Cloud::BareMetalSolution::V2::DetachLunRequest} or an equivalent Hash.
853
+ # @overload enable_interactive_serial_console(request, options = nil)
854
+ # Pass arguments to `enable_interactive_serial_console` via a request object, either of type
855
+ # {::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest} or an equivalent Hash.
767
856
  #
768
- # @param request [::Google::Cloud::BareMetalSolution::V2::DetachLunRequest, ::Hash]
857
+ # @param request [::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest, ::Hash]
769
858
  # A request object representing the call parameters. Required. To specify no
770
859
  # parameters, or to keep all the default parameter values, pass an empty Hash.
771
860
  # @param options [::Gapic::CallOptions, ::Hash]
772
861
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
773
862
  #
774
- # @overload detach_lun(instance: nil, lun: nil)
775
- # Pass arguments to `detach_lun` via keyword arguments. Note that at
863
+ # @overload enable_interactive_serial_console(name: nil)
864
+ # Pass arguments to `enable_interactive_serial_console` via keyword arguments. Note that at
776
865
  # least one keyword argument is required. To specify no parameters, or to keep all
777
866
  # the default parameter values, pass an empty Hash as a request object (see above).
778
867
  #
779
- # @param instance [::String]
780
- # Required. Name of the instance.
781
- # @param lun [::String]
782
- # Required. Name of the Lun to detach.
868
+ # @param name [::String]
869
+ # Required. Name of the resource.
783
870
  #
784
871
  # @yield [response, operation] Access the result along with the RPC operation
785
872
  # @yieldparam response [::Gapic::Operation]
@@ -796,10 +883,10 @@ module Google
796
883
  # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
797
884
  #
798
885
  # # Create a request. To set request fields, pass in keyword arguments.
799
- # request = Google::Cloud::BareMetalSolution::V2::DetachLunRequest.new
886
+ # request = Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest.new
800
887
  #
801
- # # Call the detach_lun method.
802
- # result = client.detach_lun request
888
+ # # Call the enable_interactive_serial_console method.
889
+ # result = client.enable_interactive_serial_console request
803
890
  #
804
891
  # # The returned object is of type Gapic::Operation. You can use it to
805
892
  # # check the status of an operation, cancel it, or wait for results.
@@ -811,16 +898,16 @@ module Google
811
898
  # puts "No response received."
812
899
  # end
813
900
  #
814
- def detach_lun request, options = nil
901
+ def enable_interactive_serial_console request, options = nil
815
902
  raise ::ArgumentError, "request must be provided" if request.nil?
816
903
 
817
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DetachLunRequest
904
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::EnableInteractiveSerialConsoleRequest
818
905
 
819
906
  # Converts hash and nil to an options object
820
907
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
821
908
 
822
909
  # Customize the options with defaults
823
- metadata = @config.rpcs.detach_lun.metadata.to_h
910
+ metadata = @config.rpcs.enable_interactive_serial_console.metadata.to_h
824
911
 
825
912
  # Set x-goog-api-client and x-goog-user-project headers
826
913
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -829,22 +916,22 @@ module Google
829
916
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
830
917
 
831
918
  header_params = {}
832
- if request.instance
833
- header_params["instance"] = request.instance
919
+ if request.name
920
+ header_params["name"] = request.name
834
921
  end
835
922
 
836
923
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
837
924
  metadata[:"x-goog-request-params"] ||= request_params_header
838
925
 
839
- options.apply_defaults timeout: @config.rpcs.detach_lun.timeout,
926
+ options.apply_defaults timeout: @config.rpcs.enable_interactive_serial_console.timeout,
840
927
  metadata: metadata,
841
- retry_policy: @config.rpcs.detach_lun.retry_policy
928
+ retry_policy: @config.rpcs.enable_interactive_serial_console.retry_policy
842
929
 
843
930
  options.apply_defaults timeout: @config.timeout,
844
931
  metadata: @config.metadata,
845
932
  retry_policy: @config.retry_policy
846
933
 
847
- @bare_metal_solution_stub.call_rpc :detach_lun, request, options: options do |response, operation|
934
+ @bare_metal_solution_stub.call_rpc :enable_interactive_serial_console, request, options: options do |response, operation|
848
935
  response = ::Gapic::Operation.new response, @operations_client, options: options
849
936
  yield response, operation if block_given?
850
937
  return response
@@ -854,38 +941,31 @@ module Google
854
941
  end
855
942
 
856
943
  ##
857
- # List storage volumes in a given project and location.
944
+ # Disable the interactive serial console feature on an instance.
858
945
  #
859
- # @overload list_volumes(request, options = nil)
860
- # Pass arguments to `list_volumes` via a request object, either of type
861
- # {::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest} or an equivalent Hash.
946
+ # @overload disable_interactive_serial_console(request, options = nil)
947
+ # Pass arguments to `disable_interactive_serial_console` via a request object, either of type
948
+ # {::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest} or an equivalent Hash.
862
949
  #
863
- # @param request [::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest, ::Hash]
950
+ # @param request [::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest, ::Hash]
864
951
  # A request object representing the call parameters. Required. To specify no
865
952
  # parameters, or to keep all the default parameter values, pass an empty Hash.
866
953
  # @param options [::Gapic::CallOptions, ::Hash]
867
954
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
868
955
  #
869
- # @overload list_volumes(parent: nil, page_size: nil, page_token: nil, filter: nil)
870
- # Pass arguments to `list_volumes` via keyword arguments. Note that at
956
+ # @overload disable_interactive_serial_console(name: nil)
957
+ # Pass arguments to `disable_interactive_serial_console` via keyword arguments. Note that at
871
958
  # least one keyword argument is required. To specify no parameters, or to keep all
872
959
  # the default parameter values, pass an empty Hash as a request object (see above).
873
960
  #
874
- # @param parent [::String]
875
- # Required. Parent value for ListVolumesRequest.
876
- # @param page_size [::Integer]
877
- # Requested page size. The server might return fewer items than requested.
878
- # If unspecified, server will pick an appropriate default.
879
- # @param page_token [::String]
880
- # A token identifying a page of results from the server.
881
- # @param filter [::String]
882
- # List filter.
961
+ # @param name [::String]
962
+ # Required. Name of the resource.
883
963
  #
884
964
  # @yield [response, operation] Access the result along with the RPC operation
885
- # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>]
965
+ # @yieldparam response [::Gapic::Operation]
886
966
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
887
967
  #
888
- # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>]
968
+ # @return [::Gapic::Operation]
889
969
  #
890
970
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
891
971
  #
@@ -896,28 +976,31 @@ module Google
896
976
  # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
897
977
  #
898
978
  # # Create a request. To set request fields, pass in keyword arguments.
899
- # request = Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.new
979
+ # request = Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest.new
900
980
  #
901
- # # Call the list_volumes method.
902
- # result = client.list_volumes request
981
+ # # Call the disable_interactive_serial_console method.
982
+ # result = client.disable_interactive_serial_console request
903
983
  #
904
- # # The returned object is of type Gapic::PagedEnumerable. You can iterate
905
- # # over elements, and API calls will be issued to fetch pages as needed.
906
- # result.each do |item|
907
- # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Volume.
908
- # p item
984
+ # # The returned object is of type Gapic::Operation. You can use it to
985
+ # # check the status of an operation, cancel it, or wait for results.
986
+ # # Here is how to wait for a response.
987
+ # result.wait_until_done! timeout: 60
988
+ # if result.response?
989
+ # p result.response
990
+ # else
991
+ # puts "No response received."
909
992
  # end
910
993
  #
911
- def list_volumes request, options = nil
994
+ def disable_interactive_serial_console request, options = nil
912
995
  raise ::ArgumentError, "request must be provided" if request.nil?
913
996
 
914
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest
997
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DisableInteractiveSerialConsoleRequest
915
998
 
916
999
  # Converts hash and nil to an options object
917
1000
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
918
1001
 
919
1002
  # Customize the options with defaults
920
- metadata = @config.rpcs.list_volumes.metadata.to_h
1003
+ metadata = @config.rpcs.disable_interactive_serial_console.metadata.to_h
921
1004
 
922
1005
  # Set x-goog-api-client and x-goog-user-project headers
923
1006
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -926,23 +1009,23 @@ module Google
926
1009
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
927
1010
 
928
1011
  header_params = {}
929
- if request.parent
930
- header_params["parent"] = request.parent
1012
+ if request.name
1013
+ header_params["name"] = request.name
931
1014
  end
932
1015
 
933
1016
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
934
1017
  metadata[:"x-goog-request-params"] ||= request_params_header
935
1018
 
936
- options.apply_defaults timeout: @config.rpcs.list_volumes.timeout,
1019
+ options.apply_defaults timeout: @config.rpcs.disable_interactive_serial_console.timeout,
937
1020
  metadata: metadata,
938
- retry_policy: @config.rpcs.list_volumes.retry_policy
1021
+ retry_policy: @config.rpcs.disable_interactive_serial_console.retry_policy
939
1022
 
940
1023
  options.apply_defaults timeout: @config.timeout,
941
1024
  metadata: @config.metadata,
942
1025
  retry_policy: @config.retry_policy
943
1026
 
944
- @bare_metal_solution_stub.call_rpc :list_volumes, request, options: options do |response, operation|
945
- response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_volumes, request, response, operation, options
1027
+ @bare_metal_solution_stub.call_rpc :disable_interactive_serial_console, request, options: options do |response, operation|
1028
+ response = ::Gapic::Operation.new response, @operations_client, options: options
946
1029
  yield response, operation if block_given?
947
1030
  return response
948
1031
  end
@@ -951,31 +1034,35 @@ module Google
951
1034
  end
952
1035
 
953
1036
  ##
954
- # Get details of a single storage volume.
1037
+ # Detach LUN from Instance.
955
1038
  #
956
- # @overload get_volume(request, options = nil)
957
- # Pass arguments to `get_volume` via a request object, either of type
958
- # {::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest} or an equivalent Hash.
1039
+ # @overload detach_lun(request, options = nil)
1040
+ # Pass arguments to `detach_lun` via a request object, either of type
1041
+ # {::Google::Cloud::BareMetalSolution::V2::DetachLunRequest} or an equivalent Hash.
959
1042
  #
960
- # @param request [::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest, ::Hash]
1043
+ # @param request [::Google::Cloud::BareMetalSolution::V2::DetachLunRequest, ::Hash]
961
1044
  # A request object representing the call parameters. Required. To specify no
962
1045
  # parameters, or to keep all the default parameter values, pass an empty Hash.
963
1046
  # @param options [::Gapic::CallOptions, ::Hash]
964
1047
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
965
1048
  #
966
- # @overload get_volume(name: nil)
967
- # Pass arguments to `get_volume` via keyword arguments. Note that at
1049
+ # @overload detach_lun(instance: nil, lun: nil, skip_reboot: nil)
1050
+ # Pass arguments to `detach_lun` via keyword arguments. Note that at
968
1051
  # least one keyword argument is required. To specify no parameters, or to keep all
969
1052
  # the default parameter values, pass an empty Hash as a request object (see above).
970
1053
  #
971
- # @param name [::String]
972
- # Required. Name of the resource.
1054
+ # @param instance [::String]
1055
+ # Required. Name of the instance.
1056
+ # @param lun [::String]
1057
+ # Required. Name of the Lun to detach.
1058
+ # @param skip_reboot [::Boolean]
1059
+ # If true, performs lun unmapping without instance reboot.
973
1060
  #
974
1061
  # @yield [response, operation] Access the result along with the RPC operation
975
- # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::Volume]
1062
+ # @yieldparam response [::Gapic::Operation]
976
1063
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
977
1064
  #
978
- # @return [::Google::Cloud::BareMetalSolution::V2::Volume]
1065
+ # @return [::Gapic::Operation]
979
1066
  #
980
1067
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
981
1068
  #
@@ -986,24 +1073,31 @@ module Google
986
1073
  # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
987
1074
  #
988
1075
  # # Create a request. To set request fields, pass in keyword arguments.
989
- # request = Google::Cloud::BareMetalSolution::V2::GetVolumeRequest.new
1076
+ # request = Google::Cloud::BareMetalSolution::V2::DetachLunRequest.new
990
1077
  #
991
- # # Call the get_volume method.
992
- # result = client.get_volume request
1078
+ # # Call the detach_lun method.
1079
+ # result = client.detach_lun request
993
1080
  #
994
- # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Volume.
995
- # p result
1081
+ # # The returned object is of type Gapic::Operation. You can use it to
1082
+ # # check the status of an operation, cancel it, or wait for results.
1083
+ # # Here is how to wait for a response.
1084
+ # result.wait_until_done! timeout: 60
1085
+ # if result.response?
1086
+ # p result.response
1087
+ # else
1088
+ # puts "No response received."
1089
+ # end
996
1090
  #
997
- def get_volume request, options = nil
1091
+ def detach_lun request, options = nil
998
1092
  raise ::ArgumentError, "request must be provided" if request.nil?
999
1093
 
1000
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest
1094
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DetachLunRequest
1001
1095
 
1002
1096
  # Converts hash and nil to an options object
1003
1097
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1004
1098
 
1005
1099
  # Customize the options with defaults
1006
- metadata = @config.rpcs.get_volume.metadata.to_h
1100
+ metadata = @config.rpcs.detach_lun.metadata.to_h
1007
1101
 
1008
1102
  # Set x-goog-api-client and x-goog-user-project headers
1009
1103
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1012,22 +1106,23 @@ module Google
1012
1106
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1013
1107
 
1014
1108
  header_params = {}
1015
- if request.name
1016
- header_params["name"] = request.name
1109
+ if request.instance
1110
+ header_params["instance"] = request.instance
1017
1111
  end
1018
1112
 
1019
1113
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1020
1114
  metadata[:"x-goog-request-params"] ||= request_params_header
1021
1115
 
1022
- options.apply_defaults timeout: @config.rpcs.get_volume.timeout,
1116
+ options.apply_defaults timeout: @config.rpcs.detach_lun.timeout,
1023
1117
  metadata: metadata,
1024
- retry_policy: @config.rpcs.get_volume.retry_policy
1118
+ retry_policy: @config.rpcs.detach_lun.retry_policy
1025
1119
 
1026
1120
  options.apply_defaults timeout: @config.timeout,
1027
1121
  metadata: @config.metadata,
1028
1122
  retry_policy: @config.retry_policy
1029
1123
 
1030
- @bare_metal_solution_stub.call_rpc :get_volume, request, options: options do |response, operation|
1124
+ @bare_metal_solution_stub.call_rpc :detach_lun, request, options: options do |response, operation|
1125
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1031
1126
  yield response, operation if block_given?
1032
1127
  return response
1033
1128
  end
@@ -1036,42 +1131,37 @@ module Google
1036
1131
  end
1037
1132
 
1038
1133
  ##
1039
- # Update details of a single storage volume.
1134
+ # Lists the public SSH keys registered for the specified project.
1135
+ # These SSH keys are used only for the interactive serial console feature.
1040
1136
  #
1041
- # @overload update_volume(request, options = nil)
1042
- # Pass arguments to `update_volume` via a request object, either of type
1043
- # {::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest} or an equivalent Hash.
1137
+ # @overload list_ssh_keys(request, options = nil)
1138
+ # Pass arguments to `list_ssh_keys` via a request object, either of type
1139
+ # {::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest} or an equivalent Hash.
1044
1140
  #
1045
- # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest, ::Hash]
1141
+ # @param request [::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest, ::Hash]
1046
1142
  # A request object representing the call parameters. Required. To specify no
1047
1143
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1048
1144
  # @param options [::Gapic::CallOptions, ::Hash]
1049
1145
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1050
1146
  #
1051
- # @overload update_volume(volume: nil, update_mask: nil)
1052
- # Pass arguments to `update_volume` via keyword arguments. Note that at
1147
+ # @overload list_ssh_keys(parent: nil, page_size: nil, page_token: nil)
1148
+ # Pass arguments to `list_ssh_keys` via keyword arguments. Note that at
1053
1149
  # least one keyword argument is required. To specify no parameters, or to keep all
1054
1150
  # the default parameter values, pass an empty Hash as a request object (see above).
1055
1151
  #
1056
- # @param volume [::Google::Cloud::BareMetalSolution::V2::Volume, ::Hash]
1057
- # Required. The volume to update.
1058
- #
1059
- # The `name` field is used to identify the volume to update.
1060
- # Format: projects/\\{project}/locations/\\{location}/volumes/\\{volume}
1061
- # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1062
- # The list of fields to update.
1063
- # The only currently supported fields are:
1064
- # `snapshot_auto_delete_behavior`
1065
- # `snapshot_schedule_policy_name`
1066
- # 'labels'
1067
- # 'snapshot_enabled'
1068
- # 'snapshot_reservation_detail.reserved_space_percent'
1152
+ # @param parent [::String]
1153
+ # Required. The parent containing the SSH keys.
1154
+ # Currently, the only valid value for the location is "global".
1155
+ # @param page_size [::Integer]
1156
+ # The maximum number of items to return.
1157
+ # @param page_token [::String]
1158
+ # The next_page_token value returned from a previous List request, if any.
1069
1159
  #
1070
1160
  # @yield [response, operation] Access the result along with the RPC operation
1071
- # @yieldparam response [::Gapic::Operation]
1161
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::SSHKey>]
1072
1162
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
1073
1163
  #
1074
- # @return [::Gapic::Operation]
1164
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::SSHKey>]
1075
1165
  #
1076
1166
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1077
1167
  #
@@ -1082,31 +1172,28 @@ module Google
1082
1172
  # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
1083
1173
  #
1084
1174
  # # Create a request. To set request fields, pass in keyword arguments.
1085
- # request = Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest.new
1175
+ # request = Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest.new
1086
1176
  #
1087
- # # Call the update_volume method.
1088
- # result = client.update_volume request
1177
+ # # Call the list_ssh_keys method.
1178
+ # result = client.list_ssh_keys request
1089
1179
  #
1090
- # # The returned object is of type Gapic::Operation. You can use it to
1091
- # # check the status of an operation, cancel it, or wait for results.
1092
- # # Here is how to wait for a response.
1093
- # result.wait_until_done! timeout: 60
1094
- # if result.response?
1095
- # p result.response
1096
- # else
1097
- # puts "No response received."
1180
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1181
+ # # over elements, and API calls will be issued to fetch pages as needed.
1182
+ # result.each do |item|
1183
+ # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::SSHKey.
1184
+ # p item
1098
1185
  # end
1099
1186
  #
1100
- def update_volume request, options = nil
1187
+ def list_ssh_keys request, options = nil
1101
1188
  raise ::ArgumentError, "request must be provided" if request.nil?
1102
1189
 
1103
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest
1190
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListSSHKeysRequest
1104
1191
 
1105
1192
  # Converts hash and nil to an options object
1106
1193
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1107
1194
 
1108
1195
  # Customize the options with defaults
1109
- metadata = @config.rpcs.update_volume.metadata.to_h
1196
+ metadata = @config.rpcs.list_ssh_keys.metadata.to_h
1110
1197
 
1111
1198
  # Set x-goog-api-client and x-goog-user-project headers
1112
1199
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1115,23 +1202,23 @@ module Google
1115
1202
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1116
1203
 
1117
1204
  header_params = {}
1118
- if request.volume&.name
1119
- header_params["volume.name"] = request.volume.name
1205
+ if request.parent
1206
+ header_params["parent"] = request.parent
1120
1207
  end
1121
1208
 
1122
1209
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1123
1210
  metadata[:"x-goog-request-params"] ||= request_params_header
1124
1211
 
1125
- options.apply_defaults timeout: @config.rpcs.update_volume.timeout,
1212
+ options.apply_defaults timeout: @config.rpcs.list_ssh_keys.timeout,
1126
1213
  metadata: metadata,
1127
- retry_policy: @config.rpcs.update_volume.retry_policy
1214
+ retry_policy: @config.rpcs.list_ssh_keys.retry_policy
1128
1215
 
1129
1216
  options.apply_defaults timeout: @config.timeout,
1130
1217
  metadata: @config.metadata,
1131
1218
  retry_policy: @config.retry_policy
1132
1219
 
1133
- @bare_metal_solution_stub.call_rpc :update_volume, request, options: options do |response, operation|
1134
- response = ::Gapic::Operation.new response, @operations_client, options: options
1220
+ @bare_metal_solution_stub.call_rpc :list_ssh_keys, request, options: options do |response, operation|
1221
+ response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_ssh_keys, request, response, operation, options
1135
1222
  yield response, operation if block_given?
1136
1223
  return response
1137
1224
  end
@@ -1140,24 +1227,669 @@ module Google
1140
1227
  end
1141
1228
 
1142
1229
  ##
1143
- # Emergency Volume resize.
1230
+ # Register a public SSH key in the specified project for use with the
1231
+ # interactive serial console feature.
1144
1232
  #
1145
- # @overload resize_volume(request, options = nil)
1146
- # Pass arguments to `resize_volume` via a request object, either of type
1147
- # {::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest} or an equivalent Hash.
1233
+ # @overload create_ssh_key(request, options = nil)
1234
+ # Pass arguments to `create_ssh_key` via a request object, either of type
1235
+ # {::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest} or an equivalent Hash.
1148
1236
  #
1149
- # @param request [::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest, ::Hash]
1237
+ # @param request [::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest, ::Hash]
1150
1238
  # A request object representing the call parameters. Required. To specify no
1151
1239
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1152
1240
  # @param options [::Gapic::CallOptions, ::Hash]
1153
1241
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1154
1242
  #
1155
- # @overload resize_volume(volume: nil, size_gib: nil)
1156
- # Pass arguments to `resize_volume` via keyword arguments. Note that at
1243
+ # @overload create_ssh_key(parent: nil, ssh_key: nil, ssh_key_id: nil)
1244
+ # Pass arguments to `create_ssh_key` via keyword arguments. Note that at
1157
1245
  # least one keyword argument is required. To specify no parameters, or to keep all
1158
1246
  # the default parameter values, pass an empty Hash as a request object (see above).
1159
1247
  #
1160
- # @param volume [::String]
1248
+ # @param parent [::String]
1249
+ # Required. The parent containing the SSH keys.
1250
+ # @param ssh_key [::Google::Cloud::BareMetalSolution::V2::SSHKey, ::Hash]
1251
+ # Required. The SSH key to register.
1252
+ # @param ssh_key_id [::String]
1253
+ # Required. The ID to use for the key, which will become the final component
1254
+ # of the key's resource name.
1255
+ #
1256
+ # This value must match the regex:
1257
+ # [a-zA-Z0-9@.\-_]\\{1,64}
1258
+ #
1259
+ # @yield [response, operation] Access the result along with the RPC operation
1260
+ # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::SSHKey]
1261
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1262
+ #
1263
+ # @return [::Google::Cloud::BareMetalSolution::V2::SSHKey]
1264
+ #
1265
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1266
+ #
1267
+ # @example Basic example
1268
+ # require "google/cloud/bare_metal_solution/v2"
1269
+ #
1270
+ # # Create a client object. The client can be reused for multiple calls.
1271
+ # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
1272
+ #
1273
+ # # Create a request. To set request fields, pass in keyword arguments.
1274
+ # request = Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest.new
1275
+ #
1276
+ # # Call the create_ssh_key method.
1277
+ # result = client.create_ssh_key request
1278
+ #
1279
+ # # The returned object is of type Google::Cloud::BareMetalSolution::V2::SSHKey.
1280
+ # p result
1281
+ #
1282
+ def create_ssh_key request, options = nil
1283
+ raise ::ArgumentError, "request must be provided" if request.nil?
1284
+
1285
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateSSHKeyRequest
1286
+
1287
+ # Converts hash and nil to an options object
1288
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1289
+
1290
+ # Customize the options with defaults
1291
+ metadata = @config.rpcs.create_ssh_key.metadata.to_h
1292
+
1293
+ # Set x-goog-api-client and x-goog-user-project headers
1294
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1295
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1296
+ gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION
1297
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1298
+
1299
+ header_params = {}
1300
+ if request.parent
1301
+ header_params["parent"] = request.parent
1302
+ end
1303
+
1304
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1305
+ metadata[:"x-goog-request-params"] ||= request_params_header
1306
+
1307
+ options.apply_defaults timeout: @config.rpcs.create_ssh_key.timeout,
1308
+ metadata: metadata,
1309
+ retry_policy: @config.rpcs.create_ssh_key.retry_policy
1310
+
1311
+ options.apply_defaults timeout: @config.timeout,
1312
+ metadata: @config.metadata,
1313
+ retry_policy: @config.retry_policy
1314
+
1315
+ @bare_metal_solution_stub.call_rpc :create_ssh_key, request, options: options do |response, operation|
1316
+ yield response, operation if block_given?
1317
+ return response
1318
+ end
1319
+ rescue ::GRPC::BadStatus => e
1320
+ raise ::Google::Cloud::Error.from_error(e)
1321
+ end
1322
+
1323
+ ##
1324
+ # Deletes a public SSH key registered in the specified project.
1325
+ #
1326
+ # @overload delete_ssh_key(request, options = nil)
1327
+ # Pass arguments to `delete_ssh_key` via a request object, either of type
1328
+ # {::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest} or an equivalent Hash.
1329
+ #
1330
+ # @param request [::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest, ::Hash]
1331
+ # A request object representing the call parameters. Required. To specify no
1332
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1333
+ # @param options [::Gapic::CallOptions, ::Hash]
1334
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1335
+ #
1336
+ # @overload delete_ssh_key(name: nil)
1337
+ # Pass arguments to `delete_ssh_key` via keyword arguments. Note that at
1338
+ # least one keyword argument is required. To specify no parameters, or to keep all
1339
+ # the default parameter values, pass an empty Hash as a request object (see above).
1340
+ #
1341
+ # @param name [::String]
1342
+ # Required. The name of the SSH key to delete.
1343
+ # Currently, the only valid value for the location is "global".
1344
+ #
1345
+ # @yield [response, operation] Access the result along with the RPC operation
1346
+ # @yieldparam response [::Google::Protobuf::Empty]
1347
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1348
+ #
1349
+ # @return [::Google::Protobuf::Empty]
1350
+ #
1351
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1352
+ #
1353
+ # @example Basic example
1354
+ # require "google/cloud/bare_metal_solution/v2"
1355
+ #
1356
+ # # Create a client object. The client can be reused for multiple calls.
1357
+ # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
1358
+ #
1359
+ # # Create a request. To set request fields, pass in keyword arguments.
1360
+ # request = Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest.new
1361
+ #
1362
+ # # Call the delete_ssh_key method.
1363
+ # result = client.delete_ssh_key request
1364
+ #
1365
+ # # The returned object is of type Google::Protobuf::Empty.
1366
+ # p result
1367
+ #
1368
+ def delete_ssh_key request, options = nil
1369
+ raise ::ArgumentError, "request must be provided" if request.nil?
1370
+
1371
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DeleteSSHKeyRequest
1372
+
1373
+ # Converts hash and nil to an options object
1374
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1375
+
1376
+ # Customize the options with defaults
1377
+ metadata = @config.rpcs.delete_ssh_key.metadata.to_h
1378
+
1379
+ # Set x-goog-api-client and x-goog-user-project headers
1380
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1381
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1382
+ gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION
1383
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1384
+
1385
+ header_params = {}
1386
+ if request.name
1387
+ header_params["name"] = request.name
1388
+ end
1389
+
1390
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1391
+ metadata[:"x-goog-request-params"] ||= request_params_header
1392
+
1393
+ options.apply_defaults timeout: @config.rpcs.delete_ssh_key.timeout,
1394
+ metadata: metadata,
1395
+ retry_policy: @config.rpcs.delete_ssh_key.retry_policy
1396
+
1397
+ options.apply_defaults timeout: @config.timeout,
1398
+ metadata: @config.metadata,
1399
+ retry_policy: @config.retry_policy
1400
+
1401
+ @bare_metal_solution_stub.call_rpc :delete_ssh_key, request, options: options do |response, operation|
1402
+ yield response, operation if block_given?
1403
+ return response
1404
+ end
1405
+ rescue ::GRPC::BadStatus => e
1406
+ raise ::Google::Cloud::Error.from_error(e)
1407
+ end
1408
+
1409
+ ##
1410
+ # List storage volumes in a given project and location.
1411
+ #
1412
+ # @overload list_volumes(request, options = nil)
1413
+ # Pass arguments to `list_volumes` via a request object, either of type
1414
+ # {::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest} or an equivalent Hash.
1415
+ #
1416
+ # @param request [::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest, ::Hash]
1417
+ # A request object representing the call parameters. Required. To specify no
1418
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1419
+ # @param options [::Gapic::CallOptions, ::Hash]
1420
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1421
+ #
1422
+ # @overload list_volumes(parent: nil, page_size: nil, page_token: nil, filter: nil)
1423
+ # Pass arguments to `list_volumes` via keyword arguments. Note that at
1424
+ # least one keyword argument is required. To specify no parameters, or to keep all
1425
+ # the default parameter values, pass an empty Hash as a request object (see above).
1426
+ #
1427
+ # @param parent [::String]
1428
+ # Required. Parent value for ListVolumesRequest.
1429
+ # @param page_size [::Integer]
1430
+ # Requested page size. The server might return fewer items than requested.
1431
+ # If unspecified, server will pick an appropriate default.
1432
+ # @param page_token [::String]
1433
+ # A token identifying a page of results from the server.
1434
+ # @param filter [::String]
1435
+ # List filter.
1436
+ #
1437
+ # @yield [response, operation] Access the result along with the RPC operation
1438
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>]
1439
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1440
+ #
1441
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Volume>]
1442
+ #
1443
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1444
+ #
1445
+ # @example Basic example
1446
+ # require "google/cloud/bare_metal_solution/v2"
1447
+ #
1448
+ # # Create a client object. The client can be reused for multiple calls.
1449
+ # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
1450
+ #
1451
+ # # Create a request. To set request fields, pass in keyword arguments.
1452
+ # request = Google::Cloud::BareMetalSolution::V2::ListVolumesRequest.new
1453
+ #
1454
+ # # Call the list_volumes method.
1455
+ # result = client.list_volumes request
1456
+ #
1457
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1458
+ # # over elements, and API calls will be issued to fetch pages as needed.
1459
+ # result.each do |item|
1460
+ # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Volume.
1461
+ # p item
1462
+ # end
1463
+ #
1464
+ def list_volumes request, options = nil
1465
+ raise ::ArgumentError, "request must be provided" if request.nil?
1466
+
1467
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest
1468
+
1469
+ # Converts hash and nil to an options object
1470
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1471
+
1472
+ # Customize the options with defaults
1473
+ metadata = @config.rpcs.list_volumes.metadata.to_h
1474
+
1475
+ # Set x-goog-api-client and x-goog-user-project headers
1476
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1477
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1478
+ gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION
1479
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1480
+
1481
+ header_params = {}
1482
+ if request.parent
1483
+ header_params["parent"] = request.parent
1484
+ end
1485
+
1486
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1487
+ metadata[:"x-goog-request-params"] ||= request_params_header
1488
+
1489
+ options.apply_defaults timeout: @config.rpcs.list_volumes.timeout,
1490
+ metadata: metadata,
1491
+ retry_policy: @config.rpcs.list_volumes.retry_policy
1492
+
1493
+ options.apply_defaults timeout: @config.timeout,
1494
+ metadata: @config.metadata,
1495
+ retry_policy: @config.retry_policy
1496
+
1497
+ @bare_metal_solution_stub.call_rpc :list_volumes, request, options: options do |response, operation|
1498
+ response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_volumes, request, response, operation, options
1499
+ yield response, operation if block_given?
1500
+ return response
1501
+ end
1502
+ rescue ::GRPC::BadStatus => e
1503
+ raise ::Google::Cloud::Error.from_error(e)
1504
+ end
1505
+
1506
+ ##
1507
+ # Get details of a single storage volume.
1508
+ #
1509
+ # @overload get_volume(request, options = nil)
1510
+ # Pass arguments to `get_volume` via a request object, either of type
1511
+ # {::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest} or an equivalent Hash.
1512
+ #
1513
+ # @param request [::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest, ::Hash]
1514
+ # A request object representing the call parameters. Required. To specify no
1515
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1516
+ # @param options [::Gapic::CallOptions, ::Hash]
1517
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1518
+ #
1519
+ # @overload get_volume(name: nil)
1520
+ # Pass arguments to `get_volume` via keyword arguments. Note that at
1521
+ # least one keyword argument is required. To specify no parameters, or to keep all
1522
+ # the default parameter values, pass an empty Hash as a request object (see above).
1523
+ #
1524
+ # @param name [::String]
1525
+ # Required. Name of the resource.
1526
+ #
1527
+ # @yield [response, operation] Access the result along with the RPC operation
1528
+ # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::Volume]
1529
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1530
+ #
1531
+ # @return [::Google::Cloud::BareMetalSolution::V2::Volume]
1532
+ #
1533
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1534
+ #
1535
+ # @example Basic example
1536
+ # require "google/cloud/bare_metal_solution/v2"
1537
+ #
1538
+ # # Create a client object. The client can be reused for multiple calls.
1539
+ # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
1540
+ #
1541
+ # # Create a request. To set request fields, pass in keyword arguments.
1542
+ # request = Google::Cloud::BareMetalSolution::V2::GetVolumeRequest.new
1543
+ #
1544
+ # # Call the get_volume method.
1545
+ # result = client.get_volume request
1546
+ #
1547
+ # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Volume.
1548
+ # p result
1549
+ #
1550
+ def get_volume request, options = nil
1551
+ raise ::ArgumentError, "request must be provided" if request.nil?
1552
+
1553
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest
1554
+
1555
+ # Converts hash and nil to an options object
1556
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1557
+
1558
+ # Customize the options with defaults
1559
+ metadata = @config.rpcs.get_volume.metadata.to_h
1560
+
1561
+ # Set x-goog-api-client and x-goog-user-project headers
1562
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1563
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1564
+ gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION
1565
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1566
+
1567
+ header_params = {}
1568
+ if request.name
1569
+ header_params["name"] = request.name
1570
+ end
1571
+
1572
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1573
+ metadata[:"x-goog-request-params"] ||= request_params_header
1574
+
1575
+ options.apply_defaults timeout: @config.rpcs.get_volume.timeout,
1576
+ metadata: metadata,
1577
+ retry_policy: @config.rpcs.get_volume.retry_policy
1578
+
1579
+ options.apply_defaults timeout: @config.timeout,
1580
+ metadata: @config.metadata,
1581
+ retry_policy: @config.retry_policy
1582
+
1583
+ @bare_metal_solution_stub.call_rpc :get_volume, request, options: options do |response, operation|
1584
+ yield response, operation if block_given?
1585
+ return response
1586
+ end
1587
+ rescue ::GRPC::BadStatus => e
1588
+ raise ::Google::Cloud::Error.from_error(e)
1589
+ end
1590
+
1591
+ ##
1592
+ # Update details of a single storage volume.
1593
+ #
1594
+ # @overload update_volume(request, options = nil)
1595
+ # Pass arguments to `update_volume` via a request object, either of type
1596
+ # {::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest} or an equivalent Hash.
1597
+ #
1598
+ # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest, ::Hash]
1599
+ # A request object representing the call parameters. Required. To specify no
1600
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1601
+ # @param options [::Gapic::CallOptions, ::Hash]
1602
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1603
+ #
1604
+ # @overload update_volume(volume: nil, update_mask: nil)
1605
+ # Pass arguments to `update_volume` via keyword arguments. Note that at
1606
+ # least one keyword argument is required. To specify no parameters, or to keep all
1607
+ # the default parameter values, pass an empty Hash as a request object (see above).
1608
+ #
1609
+ # @param volume [::Google::Cloud::BareMetalSolution::V2::Volume, ::Hash]
1610
+ # Required. The volume to update.
1611
+ #
1612
+ # The `name` field is used to identify the volume to update.
1613
+ # Format: projects/\\{project}/locations/\\{location}/volumes/\\{volume}
1614
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1615
+ # The list of fields to update.
1616
+ # The only currently supported fields are:
1617
+ # 'labels'
1618
+ #
1619
+ # @yield [response, operation] Access the result along with the RPC operation
1620
+ # @yieldparam response [::Gapic::Operation]
1621
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1622
+ #
1623
+ # @return [::Gapic::Operation]
1624
+ #
1625
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1626
+ #
1627
+ # @example Basic example
1628
+ # require "google/cloud/bare_metal_solution/v2"
1629
+ #
1630
+ # # Create a client object. The client can be reused for multiple calls.
1631
+ # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
1632
+ #
1633
+ # # Create a request. To set request fields, pass in keyword arguments.
1634
+ # request = Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest.new
1635
+ #
1636
+ # # Call the update_volume method.
1637
+ # result = client.update_volume request
1638
+ #
1639
+ # # The returned object is of type Gapic::Operation. You can use it to
1640
+ # # check the status of an operation, cancel it, or wait for results.
1641
+ # # Here is how to wait for a response.
1642
+ # result.wait_until_done! timeout: 60
1643
+ # if result.response?
1644
+ # p result.response
1645
+ # else
1646
+ # puts "No response received."
1647
+ # end
1648
+ #
1649
+ def update_volume request, options = nil
1650
+ raise ::ArgumentError, "request must be provided" if request.nil?
1651
+
1652
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest
1653
+
1654
+ # Converts hash and nil to an options object
1655
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1656
+
1657
+ # Customize the options with defaults
1658
+ metadata = @config.rpcs.update_volume.metadata.to_h
1659
+
1660
+ # Set x-goog-api-client and x-goog-user-project headers
1661
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1662
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1663
+ gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION
1664
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1665
+
1666
+ header_params = {}
1667
+ if request.volume&.name
1668
+ header_params["volume.name"] = request.volume.name
1669
+ end
1670
+
1671
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1672
+ metadata[:"x-goog-request-params"] ||= request_params_header
1673
+
1674
+ options.apply_defaults timeout: @config.rpcs.update_volume.timeout,
1675
+ metadata: metadata,
1676
+ retry_policy: @config.rpcs.update_volume.retry_policy
1677
+
1678
+ options.apply_defaults timeout: @config.timeout,
1679
+ metadata: @config.metadata,
1680
+ retry_policy: @config.retry_policy
1681
+
1682
+ @bare_metal_solution_stub.call_rpc :update_volume, request, options: options do |response, operation|
1683
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1684
+ yield response, operation if block_given?
1685
+ return response
1686
+ end
1687
+ rescue ::GRPC::BadStatus => e
1688
+ raise ::Google::Cloud::Error.from_error(e)
1689
+ end
1690
+
1691
+ ##
1692
+ # RenameVolume sets a new name for a volume.
1693
+ # Use with caution, previous names become immediately invalidated.
1694
+ #
1695
+ # @overload rename_volume(request, options = nil)
1696
+ # Pass arguments to `rename_volume` via a request object, either of type
1697
+ # {::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest} or an equivalent Hash.
1698
+ #
1699
+ # @param request [::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest, ::Hash]
1700
+ # A request object representing the call parameters. Required. To specify no
1701
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1702
+ # @param options [::Gapic::CallOptions, ::Hash]
1703
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1704
+ #
1705
+ # @overload rename_volume(name: nil, new_volume_id: nil)
1706
+ # Pass arguments to `rename_volume` via keyword arguments. Note that at
1707
+ # least one keyword argument is required. To specify no parameters, or to keep all
1708
+ # the default parameter values, pass an empty Hash as a request object (see above).
1709
+ #
1710
+ # @param name [::String]
1711
+ # Required. The `name` field is used to identify the volume.
1712
+ # Format: projects/\\{project}/locations/\\{location}/volumes/\\{volume}
1713
+ # @param new_volume_id [::String]
1714
+ # Required. The new `id` of the volume.
1715
+ #
1716
+ # @yield [response, operation] Access the result along with the RPC operation
1717
+ # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::Volume]
1718
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1719
+ #
1720
+ # @return [::Google::Cloud::BareMetalSolution::V2::Volume]
1721
+ #
1722
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1723
+ #
1724
+ # @example Basic example
1725
+ # require "google/cloud/bare_metal_solution/v2"
1726
+ #
1727
+ # # Create a client object. The client can be reused for multiple calls.
1728
+ # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
1729
+ #
1730
+ # # Create a request. To set request fields, pass in keyword arguments.
1731
+ # request = Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest.new
1732
+ #
1733
+ # # Call the rename_volume method.
1734
+ # result = client.rename_volume request
1735
+ #
1736
+ # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Volume.
1737
+ # p result
1738
+ #
1739
+ def rename_volume request, options = nil
1740
+ raise ::ArgumentError, "request must be provided" if request.nil?
1741
+
1742
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameVolumeRequest
1743
+
1744
+ # Converts hash and nil to an options object
1745
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1746
+
1747
+ # Customize the options with defaults
1748
+ metadata = @config.rpcs.rename_volume.metadata.to_h
1749
+
1750
+ # Set x-goog-api-client and x-goog-user-project headers
1751
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1752
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1753
+ gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION
1754
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1755
+
1756
+ header_params = {}
1757
+ if request.name
1758
+ header_params["name"] = request.name
1759
+ end
1760
+
1761
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1762
+ metadata[:"x-goog-request-params"] ||= request_params_header
1763
+
1764
+ options.apply_defaults timeout: @config.rpcs.rename_volume.timeout,
1765
+ metadata: metadata,
1766
+ retry_policy: @config.rpcs.rename_volume.retry_policy
1767
+
1768
+ options.apply_defaults timeout: @config.timeout,
1769
+ metadata: @config.metadata,
1770
+ retry_policy: @config.retry_policy
1771
+
1772
+ @bare_metal_solution_stub.call_rpc :rename_volume, request, options: options do |response, operation|
1773
+ yield response, operation if block_given?
1774
+ return response
1775
+ end
1776
+ rescue ::GRPC::BadStatus => e
1777
+ raise ::Google::Cloud::Error.from_error(e)
1778
+ end
1779
+
1780
+ ##
1781
+ # Skips volume's cooloff and deletes it now.
1782
+ # Volume must be in cooloff state.
1783
+ #
1784
+ # @overload evict_volume(request, options = nil)
1785
+ # Pass arguments to `evict_volume` via a request object, either of type
1786
+ # {::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest} or an equivalent Hash.
1787
+ #
1788
+ # @param request [::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest, ::Hash]
1789
+ # A request object representing the call parameters. Required. To specify no
1790
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1791
+ # @param options [::Gapic::CallOptions, ::Hash]
1792
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1793
+ #
1794
+ # @overload evict_volume(name: nil)
1795
+ # Pass arguments to `evict_volume` via keyword arguments. Note that at
1796
+ # least one keyword argument is required. To specify no parameters, or to keep all
1797
+ # the default parameter values, pass an empty Hash as a request object (see above).
1798
+ #
1799
+ # @param name [::String]
1800
+ # Required. The name of the Volume.
1801
+ #
1802
+ # @yield [response, operation] Access the result along with the RPC operation
1803
+ # @yieldparam response [::Gapic::Operation]
1804
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1805
+ #
1806
+ # @return [::Gapic::Operation]
1807
+ #
1808
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1809
+ #
1810
+ # @example Basic example
1811
+ # require "google/cloud/bare_metal_solution/v2"
1812
+ #
1813
+ # # Create a client object. The client can be reused for multiple calls.
1814
+ # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
1815
+ #
1816
+ # # Create a request. To set request fields, pass in keyword arguments.
1817
+ # request = Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest.new
1818
+ #
1819
+ # # Call the evict_volume method.
1820
+ # result = client.evict_volume request
1821
+ #
1822
+ # # The returned object is of type Gapic::Operation. You can use it to
1823
+ # # check the status of an operation, cancel it, or wait for results.
1824
+ # # Here is how to wait for a response.
1825
+ # result.wait_until_done! timeout: 60
1826
+ # if result.response?
1827
+ # p result.response
1828
+ # else
1829
+ # puts "No response received."
1830
+ # end
1831
+ #
1832
+ def evict_volume request, options = nil
1833
+ raise ::ArgumentError, "request must be provided" if request.nil?
1834
+
1835
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::EvictVolumeRequest
1836
+
1837
+ # Converts hash and nil to an options object
1838
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1839
+
1840
+ # Customize the options with defaults
1841
+ metadata = @config.rpcs.evict_volume.metadata.to_h
1842
+
1843
+ # Set x-goog-api-client and x-goog-user-project headers
1844
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1845
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1846
+ gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION
1847
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1848
+
1849
+ header_params = {}
1850
+ if request.name
1851
+ header_params["name"] = request.name
1852
+ end
1853
+
1854
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1855
+ metadata[:"x-goog-request-params"] ||= request_params_header
1856
+
1857
+ options.apply_defaults timeout: @config.rpcs.evict_volume.timeout,
1858
+ metadata: metadata,
1859
+ retry_policy: @config.rpcs.evict_volume.retry_policy
1860
+
1861
+ options.apply_defaults timeout: @config.timeout,
1862
+ metadata: @config.metadata,
1863
+ retry_policy: @config.retry_policy
1864
+
1865
+ @bare_metal_solution_stub.call_rpc :evict_volume, request, options: options do |response, operation|
1866
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1867
+ yield response, operation if block_given?
1868
+ return response
1869
+ end
1870
+ rescue ::GRPC::BadStatus => e
1871
+ raise ::Google::Cloud::Error.from_error(e)
1872
+ end
1873
+
1874
+ ##
1875
+ # Emergency Volume resize.
1876
+ #
1877
+ # @overload resize_volume(request, options = nil)
1878
+ # Pass arguments to `resize_volume` via a request object, either of type
1879
+ # {::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest} or an equivalent Hash.
1880
+ #
1881
+ # @param request [::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest, ::Hash]
1882
+ # A request object representing the call parameters. Required. To specify no
1883
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1884
+ # @param options [::Gapic::CallOptions, ::Hash]
1885
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1886
+ #
1887
+ # @overload resize_volume(volume: nil, size_gib: nil)
1888
+ # Pass arguments to `resize_volume` via keyword arguments. Note that at
1889
+ # least one keyword argument is required. To specify no parameters, or to keep all
1890
+ # the default parameter values, pass an empty Hash as a request object (see above).
1891
+ #
1892
+ # @param volume [::String]
1161
1893
  # Required. Volume to resize.
1162
1894
  # @param size_gib [::Integer]
1163
1895
  # New Volume size, in GiB.
@@ -1177,10 +1909,1387 @@ module Google
1177
1909
  # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
1178
1910
  #
1179
1911
  # # Create a request. To set request fields, pass in keyword arguments.
1180
- # request = Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest.new
1912
+ # request = Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest.new
1913
+ #
1914
+ # # Call the resize_volume method.
1915
+ # result = client.resize_volume request
1916
+ #
1917
+ # # The returned object is of type Gapic::Operation. You can use it to
1918
+ # # check the status of an operation, cancel it, or wait for results.
1919
+ # # Here is how to wait for a response.
1920
+ # result.wait_until_done! timeout: 60
1921
+ # if result.response?
1922
+ # p result.response
1923
+ # else
1924
+ # puts "No response received."
1925
+ # end
1926
+ #
1927
+ def resize_volume request, options = nil
1928
+ raise ::ArgumentError, "request must be provided" if request.nil?
1929
+
1930
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest
1931
+
1932
+ # Converts hash and nil to an options object
1933
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1934
+
1935
+ # Customize the options with defaults
1936
+ metadata = @config.rpcs.resize_volume.metadata.to_h
1937
+
1938
+ # Set x-goog-api-client and x-goog-user-project headers
1939
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1940
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1941
+ gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION
1942
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1943
+
1944
+ header_params = {}
1945
+ if request.volume
1946
+ header_params["volume"] = request.volume
1947
+ end
1948
+
1949
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1950
+ metadata[:"x-goog-request-params"] ||= request_params_header
1951
+
1952
+ options.apply_defaults timeout: @config.rpcs.resize_volume.timeout,
1953
+ metadata: metadata,
1954
+ retry_policy: @config.rpcs.resize_volume.retry_policy
1955
+
1956
+ options.apply_defaults timeout: @config.timeout,
1957
+ metadata: @config.metadata,
1958
+ retry_policy: @config.retry_policy
1959
+
1960
+ @bare_metal_solution_stub.call_rpc :resize_volume, request, options: options do |response, operation|
1961
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1962
+ yield response, operation if block_given?
1963
+ return response
1964
+ end
1965
+ rescue ::GRPC::BadStatus => e
1966
+ raise ::Google::Cloud::Error.from_error(e)
1967
+ end
1968
+
1969
+ ##
1970
+ # List network in a given project and location.
1971
+ #
1972
+ # @overload list_networks(request, options = nil)
1973
+ # Pass arguments to `list_networks` via a request object, either of type
1974
+ # {::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest} or an equivalent Hash.
1975
+ #
1976
+ # @param request [::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest, ::Hash]
1977
+ # A request object representing the call parameters. Required. To specify no
1978
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1979
+ # @param options [::Gapic::CallOptions, ::Hash]
1980
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1981
+ #
1982
+ # @overload list_networks(parent: nil, page_size: nil, page_token: nil, filter: nil)
1983
+ # Pass arguments to `list_networks` via keyword arguments. Note that at
1984
+ # least one keyword argument is required. To specify no parameters, or to keep all
1985
+ # the default parameter values, pass an empty Hash as a request object (see above).
1986
+ #
1987
+ # @param parent [::String]
1988
+ # Required. Parent value for ListNetworksRequest.
1989
+ # @param page_size [::Integer]
1990
+ # Requested page size. The server might return fewer items than requested.
1991
+ # If unspecified, server will pick an appropriate default.
1992
+ # @param page_token [::String]
1993
+ # A token identifying a page of results from the server.
1994
+ # @param filter [::String]
1995
+ # List filter.
1996
+ #
1997
+ # @yield [response, operation] Access the result along with the RPC operation
1998
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>]
1999
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2000
+ #
2001
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>]
2002
+ #
2003
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2004
+ #
2005
+ # @example Basic example
2006
+ # require "google/cloud/bare_metal_solution/v2"
2007
+ #
2008
+ # # Create a client object. The client can be reused for multiple calls.
2009
+ # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
2010
+ #
2011
+ # # Create a request. To set request fields, pass in keyword arguments.
2012
+ # request = Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.new
2013
+ #
2014
+ # # Call the list_networks method.
2015
+ # result = client.list_networks request
2016
+ #
2017
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2018
+ # # over elements, and API calls will be issued to fetch pages as needed.
2019
+ # result.each do |item|
2020
+ # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Network.
2021
+ # p item
2022
+ # end
2023
+ #
2024
+ def list_networks request, options = nil
2025
+ raise ::ArgumentError, "request must be provided" if request.nil?
2026
+
2027
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest
2028
+
2029
+ # Converts hash and nil to an options object
2030
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2031
+
2032
+ # Customize the options with defaults
2033
+ metadata = @config.rpcs.list_networks.metadata.to_h
2034
+
2035
+ # Set x-goog-api-client and x-goog-user-project headers
2036
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2037
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2038
+ gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION
2039
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2040
+
2041
+ header_params = {}
2042
+ if request.parent
2043
+ header_params["parent"] = request.parent
2044
+ end
2045
+
2046
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2047
+ metadata[:"x-goog-request-params"] ||= request_params_header
2048
+
2049
+ options.apply_defaults timeout: @config.rpcs.list_networks.timeout,
2050
+ metadata: metadata,
2051
+ retry_policy: @config.rpcs.list_networks.retry_policy
2052
+
2053
+ options.apply_defaults timeout: @config.timeout,
2054
+ metadata: @config.metadata,
2055
+ retry_policy: @config.retry_policy
2056
+
2057
+ @bare_metal_solution_stub.call_rpc :list_networks, request, options: options do |response, operation|
2058
+ response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_networks, request, response, operation, options
2059
+ yield response, operation if block_given?
2060
+ return response
2061
+ end
2062
+ rescue ::GRPC::BadStatus => e
2063
+ raise ::Google::Cloud::Error.from_error(e)
2064
+ end
2065
+
2066
+ ##
2067
+ # List all Networks (and used IPs for each Network) in the vendor account
2068
+ # associated with the specified project.
2069
+ #
2070
+ # @overload list_network_usage(request, options = nil)
2071
+ # Pass arguments to `list_network_usage` via a request object, either of type
2072
+ # {::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest} or an equivalent Hash.
2073
+ #
2074
+ # @param request [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest, ::Hash]
2075
+ # A request object representing the call parameters. Required. To specify no
2076
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2077
+ # @param options [::Gapic::CallOptions, ::Hash]
2078
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2079
+ #
2080
+ # @overload list_network_usage(location: nil)
2081
+ # Pass arguments to `list_network_usage` via keyword arguments. Note that at
2082
+ # least one keyword argument is required. To specify no parameters, or to keep all
2083
+ # the default parameter values, pass an empty Hash as a request object (see above).
2084
+ #
2085
+ # @param location [::String]
2086
+ # Required. Parent value (project and location).
2087
+ #
2088
+ # @yield [response, operation] Access the result along with the RPC operation
2089
+ # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse]
2090
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2091
+ #
2092
+ # @return [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse]
2093
+ #
2094
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2095
+ #
2096
+ # @example Basic example
2097
+ # require "google/cloud/bare_metal_solution/v2"
2098
+ #
2099
+ # # Create a client object. The client can be reused for multiple calls.
2100
+ # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
2101
+ #
2102
+ # # Create a request. To set request fields, pass in keyword arguments.
2103
+ # request = Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new
2104
+ #
2105
+ # # Call the list_network_usage method.
2106
+ # result = client.list_network_usage request
2107
+ #
2108
+ # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse.
2109
+ # p result
2110
+ #
2111
+ def list_network_usage request, options = nil
2112
+ raise ::ArgumentError, "request must be provided" if request.nil?
2113
+
2114
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest
2115
+
2116
+ # Converts hash and nil to an options object
2117
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2118
+
2119
+ # Customize the options with defaults
2120
+ metadata = @config.rpcs.list_network_usage.metadata.to_h
2121
+
2122
+ # Set x-goog-api-client and x-goog-user-project headers
2123
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2124
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2125
+ gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION
2126
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2127
+
2128
+ header_params = {}
2129
+ if request.location
2130
+ header_params["location"] = request.location
2131
+ end
2132
+
2133
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2134
+ metadata[:"x-goog-request-params"] ||= request_params_header
2135
+
2136
+ options.apply_defaults timeout: @config.rpcs.list_network_usage.timeout,
2137
+ metadata: metadata,
2138
+ retry_policy: @config.rpcs.list_network_usage.retry_policy
2139
+
2140
+ options.apply_defaults timeout: @config.timeout,
2141
+ metadata: @config.metadata,
2142
+ retry_policy: @config.retry_policy
2143
+
2144
+ @bare_metal_solution_stub.call_rpc :list_network_usage, request, options: options do |response, operation|
2145
+ yield response, operation if block_given?
2146
+ return response
2147
+ end
2148
+ rescue ::GRPC::BadStatus => e
2149
+ raise ::Google::Cloud::Error.from_error(e)
2150
+ end
2151
+
2152
+ ##
2153
+ # Get details of a single network.
2154
+ #
2155
+ # @overload get_network(request, options = nil)
2156
+ # Pass arguments to `get_network` via a request object, either of type
2157
+ # {::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest} or an equivalent Hash.
2158
+ #
2159
+ # @param request [::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest, ::Hash]
2160
+ # A request object representing the call parameters. Required. To specify no
2161
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2162
+ # @param options [::Gapic::CallOptions, ::Hash]
2163
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2164
+ #
2165
+ # @overload get_network(name: nil)
2166
+ # Pass arguments to `get_network` via keyword arguments. Note that at
2167
+ # least one keyword argument is required. To specify no parameters, or to keep all
2168
+ # the default parameter values, pass an empty Hash as a request object (see above).
2169
+ #
2170
+ # @param name [::String]
2171
+ # Required. Name of the resource.
2172
+ #
2173
+ # @yield [response, operation] Access the result along with the RPC operation
2174
+ # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::Network]
2175
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2176
+ #
2177
+ # @return [::Google::Cloud::BareMetalSolution::V2::Network]
2178
+ #
2179
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2180
+ #
2181
+ # @example Basic example
2182
+ # require "google/cloud/bare_metal_solution/v2"
2183
+ #
2184
+ # # Create a client object. The client can be reused for multiple calls.
2185
+ # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
2186
+ #
2187
+ # # Create a request. To set request fields, pass in keyword arguments.
2188
+ # request = Google::Cloud::BareMetalSolution::V2::GetNetworkRequest.new
2189
+ #
2190
+ # # Call the get_network method.
2191
+ # result = client.get_network request
2192
+ #
2193
+ # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Network.
2194
+ # p result
2195
+ #
2196
+ def get_network request, options = nil
2197
+ raise ::ArgumentError, "request must be provided" if request.nil?
2198
+
2199
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest
2200
+
2201
+ # Converts hash and nil to an options object
2202
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2203
+
2204
+ # Customize the options with defaults
2205
+ metadata = @config.rpcs.get_network.metadata.to_h
2206
+
2207
+ # Set x-goog-api-client and x-goog-user-project headers
2208
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2209
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2210
+ gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION
2211
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2212
+
2213
+ header_params = {}
2214
+ if request.name
2215
+ header_params["name"] = request.name
2216
+ end
2217
+
2218
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2219
+ metadata[:"x-goog-request-params"] ||= request_params_header
2220
+
2221
+ options.apply_defaults timeout: @config.rpcs.get_network.timeout,
2222
+ metadata: metadata,
2223
+ retry_policy: @config.rpcs.get_network.retry_policy
2224
+
2225
+ options.apply_defaults timeout: @config.timeout,
2226
+ metadata: @config.metadata,
2227
+ retry_policy: @config.retry_policy
2228
+
2229
+ @bare_metal_solution_stub.call_rpc :get_network, request, options: options do |response, operation|
2230
+ yield response, operation if block_given?
2231
+ return response
2232
+ end
2233
+ rescue ::GRPC::BadStatus => e
2234
+ raise ::Google::Cloud::Error.from_error(e)
2235
+ end
2236
+
2237
+ ##
2238
+ # Update details of a single network.
2239
+ #
2240
+ # @overload update_network(request, options = nil)
2241
+ # Pass arguments to `update_network` via a request object, either of type
2242
+ # {::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest} or an equivalent Hash.
2243
+ #
2244
+ # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest, ::Hash]
2245
+ # A request object representing the call parameters. Required. To specify no
2246
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2247
+ # @param options [::Gapic::CallOptions, ::Hash]
2248
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2249
+ #
2250
+ # @overload update_network(network: nil, update_mask: nil)
2251
+ # Pass arguments to `update_network` via keyword arguments. Note that at
2252
+ # least one keyword argument is required. To specify no parameters, or to keep all
2253
+ # the default parameter values, pass an empty Hash as a request object (see above).
2254
+ #
2255
+ # @param network [::Google::Cloud::BareMetalSolution::V2::Network, ::Hash]
2256
+ # Required. The network to update.
2257
+ #
2258
+ # The `name` field is used to identify the instance to update.
2259
+ # Format: projects/\\{project}/locations/\\{location}/networks/\\{network}
2260
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2261
+ # The list of fields to update.
2262
+ # The only currently supported fields are:
2263
+ # `labels`, `reservations`, `vrf.vlan_attachments`
2264
+ #
2265
+ # @yield [response, operation] Access the result along with the RPC operation
2266
+ # @yieldparam response [::Gapic::Operation]
2267
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2268
+ #
2269
+ # @return [::Gapic::Operation]
2270
+ #
2271
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2272
+ #
2273
+ # @example Basic example
2274
+ # require "google/cloud/bare_metal_solution/v2"
2275
+ #
2276
+ # # Create a client object. The client can be reused for multiple calls.
2277
+ # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
2278
+ #
2279
+ # # Create a request. To set request fields, pass in keyword arguments.
2280
+ # request = Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest.new
2281
+ #
2282
+ # # Call the update_network method.
2283
+ # result = client.update_network request
2284
+ #
2285
+ # # The returned object is of type Gapic::Operation. You can use it to
2286
+ # # check the status of an operation, cancel it, or wait for results.
2287
+ # # Here is how to wait for a response.
2288
+ # result.wait_until_done! timeout: 60
2289
+ # if result.response?
2290
+ # p result.response
2291
+ # else
2292
+ # puts "No response received."
2293
+ # end
2294
+ #
2295
+ def update_network request, options = nil
2296
+ raise ::ArgumentError, "request must be provided" if request.nil?
2297
+
2298
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest
2299
+
2300
+ # Converts hash and nil to an options object
2301
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2302
+
2303
+ # Customize the options with defaults
2304
+ metadata = @config.rpcs.update_network.metadata.to_h
2305
+
2306
+ # Set x-goog-api-client and x-goog-user-project headers
2307
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2308
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2309
+ gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION
2310
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2311
+
2312
+ header_params = {}
2313
+ if request.network&.name
2314
+ header_params["network.name"] = request.network.name
2315
+ end
2316
+
2317
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2318
+ metadata[:"x-goog-request-params"] ||= request_params_header
2319
+
2320
+ options.apply_defaults timeout: @config.rpcs.update_network.timeout,
2321
+ metadata: metadata,
2322
+ retry_policy: @config.rpcs.update_network.retry_policy
2323
+
2324
+ options.apply_defaults timeout: @config.timeout,
2325
+ metadata: @config.metadata,
2326
+ retry_policy: @config.retry_policy
2327
+
2328
+ @bare_metal_solution_stub.call_rpc :update_network, request, options: options do |response, operation|
2329
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2330
+ yield response, operation if block_given?
2331
+ return response
2332
+ end
2333
+ rescue ::GRPC::BadStatus => e
2334
+ raise ::Google::Cloud::Error.from_error(e)
2335
+ end
2336
+
2337
+ ##
2338
+ # Takes a snapshot of a boot volume.
2339
+ # Returns INVALID_ARGUMENT if called for a non-boot volume.
2340
+ #
2341
+ # @overload create_volume_snapshot(request, options = nil)
2342
+ # Pass arguments to `create_volume_snapshot` via a request object, either of type
2343
+ # {::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest} or an equivalent Hash.
2344
+ #
2345
+ # @param request [::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest, ::Hash]
2346
+ # A request object representing the call parameters. Required. To specify no
2347
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2348
+ # @param options [::Gapic::CallOptions, ::Hash]
2349
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2350
+ #
2351
+ # @overload create_volume_snapshot(parent: nil, volume_snapshot: nil)
2352
+ # Pass arguments to `create_volume_snapshot` via keyword arguments. Note that at
2353
+ # least one keyword argument is required. To specify no parameters, or to keep all
2354
+ # the default parameter values, pass an empty Hash as a request object (see above).
2355
+ #
2356
+ # @param parent [::String]
2357
+ # Required. The volume to snapshot.
2358
+ # @param volume_snapshot [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot, ::Hash]
2359
+ # Required. The snapshot to create.
2360
+ #
2361
+ # @yield [response, operation] Access the result along with the RPC operation
2362
+ # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot]
2363
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2364
+ #
2365
+ # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot]
2366
+ #
2367
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2368
+ #
2369
+ # @example Basic example
2370
+ # require "google/cloud/bare_metal_solution/v2"
2371
+ #
2372
+ # # Create a client object. The client can be reused for multiple calls.
2373
+ # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
2374
+ #
2375
+ # # Create a request. To set request fields, pass in keyword arguments.
2376
+ # request = Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest.new
2377
+ #
2378
+ # # Call the create_volume_snapshot method.
2379
+ # result = client.create_volume_snapshot request
2380
+ #
2381
+ # # The returned object is of type Google::Cloud::BareMetalSolution::V2::VolumeSnapshot.
2382
+ # p result
2383
+ #
2384
+ def create_volume_snapshot request, options = nil
2385
+ raise ::ArgumentError, "request must be provided" if request.nil?
2386
+
2387
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateVolumeSnapshotRequest
2388
+
2389
+ # Converts hash and nil to an options object
2390
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2391
+
2392
+ # Customize the options with defaults
2393
+ metadata = @config.rpcs.create_volume_snapshot.metadata.to_h
2394
+
2395
+ # Set x-goog-api-client and x-goog-user-project headers
2396
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2397
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2398
+ gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION
2399
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2400
+
2401
+ header_params = {}
2402
+ if request.parent
2403
+ header_params["parent"] = request.parent
2404
+ end
2405
+
2406
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2407
+ metadata[:"x-goog-request-params"] ||= request_params_header
2408
+
2409
+ options.apply_defaults timeout: @config.rpcs.create_volume_snapshot.timeout,
2410
+ metadata: metadata,
2411
+ retry_policy: @config.rpcs.create_volume_snapshot.retry_policy
2412
+
2413
+ options.apply_defaults timeout: @config.timeout,
2414
+ metadata: @config.metadata,
2415
+ retry_policy: @config.retry_policy
2416
+
2417
+ @bare_metal_solution_stub.call_rpc :create_volume_snapshot, request, options: options do |response, operation|
2418
+ yield response, operation if block_given?
2419
+ return response
2420
+ end
2421
+ rescue ::GRPC::BadStatus => e
2422
+ raise ::Google::Cloud::Error.from_error(e)
2423
+ end
2424
+
2425
+ ##
2426
+ # Uses the specified snapshot to restore its parent volume.
2427
+ # Returns INVALID_ARGUMENT if called for a non-boot volume.
2428
+ #
2429
+ # @overload restore_volume_snapshot(request, options = nil)
2430
+ # Pass arguments to `restore_volume_snapshot` via a request object, either of type
2431
+ # {::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest} or an equivalent Hash.
2432
+ #
2433
+ # @param request [::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest, ::Hash]
2434
+ # A request object representing the call parameters. Required. To specify no
2435
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2436
+ # @param options [::Gapic::CallOptions, ::Hash]
2437
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2438
+ #
2439
+ # @overload restore_volume_snapshot(volume_snapshot: nil)
2440
+ # Pass arguments to `restore_volume_snapshot` via keyword arguments. Note that at
2441
+ # least one keyword argument is required. To specify no parameters, or to keep all
2442
+ # the default parameter values, pass an empty Hash as a request object (see above).
2443
+ #
2444
+ # @param volume_snapshot [::String]
2445
+ # Required. Name of the snapshot which will be used to restore its parent
2446
+ # volume.
2447
+ #
2448
+ # @yield [response, operation] Access the result along with the RPC operation
2449
+ # @yieldparam response [::Gapic::Operation]
2450
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2451
+ #
2452
+ # @return [::Gapic::Operation]
2453
+ #
2454
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2455
+ #
2456
+ # @example Basic example
2457
+ # require "google/cloud/bare_metal_solution/v2"
2458
+ #
2459
+ # # Create a client object. The client can be reused for multiple calls.
2460
+ # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
2461
+ #
2462
+ # # Create a request. To set request fields, pass in keyword arguments.
2463
+ # request = Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest.new
2464
+ #
2465
+ # # Call the restore_volume_snapshot method.
2466
+ # result = client.restore_volume_snapshot request
2467
+ #
2468
+ # # The returned object is of type Gapic::Operation. You can use it to
2469
+ # # check the status of an operation, cancel it, or wait for results.
2470
+ # # Here is how to wait for a response.
2471
+ # result.wait_until_done! timeout: 60
2472
+ # if result.response?
2473
+ # p result.response
2474
+ # else
2475
+ # puts "No response received."
2476
+ # end
2477
+ #
2478
+ def restore_volume_snapshot request, options = nil
2479
+ raise ::ArgumentError, "request must be provided" if request.nil?
2480
+
2481
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RestoreVolumeSnapshotRequest
2482
+
2483
+ # Converts hash and nil to an options object
2484
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2485
+
2486
+ # Customize the options with defaults
2487
+ metadata = @config.rpcs.restore_volume_snapshot.metadata.to_h
2488
+
2489
+ # Set x-goog-api-client and x-goog-user-project headers
2490
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2491
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2492
+ gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION
2493
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2494
+
2495
+ header_params = {}
2496
+ if request.volume_snapshot
2497
+ header_params["volume_snapshot"] = request.volume_snapshot
2498
+ end
2499
+
2500
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2501
+ metadata[:"x-goog-request-params"] ||= request_params_header
2502
+
2503
+ options.apply_defaults timeout: @config.rpcs.restore_volume_snapshot.timeout,
2504
+ metadata: metadata,
2505
+ retry_policy: @config.rpcs.restore_volume_snapshot.retry_policy
2506
+
2507
+ options.apply_defaults timeout: @config.timeout,
2508
+ metadata: @config.metadata,
2509
+ retry_policy: @config.retry_policy
2510
+
2511
+ @bare_metal_solution_stub.call_rpc :restore_volume_snapshot, request, options: options do |response, operation|
2512
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2513
+ yield response, operation if block_given?
2514
+ return response
2515
+ end
2516
+ rescue ::GRPC::BadStatus => e
2517
+ raise ::Google::Cloud::Error.from_error(e)
2518
+ end
2519
+
2520
+ ##
2521
+ # Deletes a volume snapshot.
2522
+ # Returns INVALID_ARGUMENT if called for a non-boot volume.
2523
+ #
2524
+ # @overload delete_volume_snapshot(request, options = nil)
2525
+ # Pass arguments to `delete_volume_snapshot` via a request object, either of type
2526
+ # {::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest} or an equivalent Hash.
2527
+ #
2528
+ # @param request [::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest, ::Hash]
2529
+ # A request object representing the call parameters. Required. To specify no
2530
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2531
+ # @param options [::Gapic::CallOptions, ::Hash]
2532
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2533
+ #
2534
+ # @overload delete_volume_snapshot(name: nil)
2535
+ # Pass arguments to `delete_volume_snapshot` via keyword arguments. Note that at
2536
+ # least one keyword argument is required. To specify no parameters, or to keep all
2537
+ # the default parameter values, pass an empty Hash as a request object (see above).
2538
+ #
2539
+ # @param name [::String]
2540
+ # Required. The name of the snapshot to delete.
2541
+ #
2542
+ # @yield [response, operation] Access the result along with the RPC operation
2543
+ # @yieldparam response [::Google::Protobuf::Empty]
2544
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2545
+ #
2546
+ # @return [::Google::Protobuf::Empty]
2547
+ #
2548
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2549
+ #
2550
+ # @example Basic example
2551
+ # require "google/cloud/bare_metal_solution/v2"
2552
+ #
2553
+ # # Create a client object. The client can be reused for multiple calls.
2554
+ # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
2555
+ #
2556
+ # # Create a request. To set request fields, pass in keyword arguments.
2557
+ # request = Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest.new
2558
+ #
2559
+ # # Call the delete_volume_snapshot method.
2560
+ # result = client.delete_volume_snapshot request
2561
+ #
2562
+ # # The returned object is of type Google::Protobuf::Empty.
2563
+ # p result
2564
+ #
2565
+ def delete_volume_snapshot request, options = nil
2566
+ raise ::ArgumentError, "request must be provided" if request.nil?
2567
+
2568
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DeleteVolumeSnapshotRequest
2569
+
2570
+ # Converts hash and nil to an options object
2571
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2572
+
2573
+ # Customize the options with defaults
2574
+ metadata = @config.rpcs.delete_volume_snapshot.metadata.to_h
2575
+
2576
+ # Set x-goog-api-client and x-goog-user-project headers
2577
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2578
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2579
+ gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION
2580
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2581
+
2582
+ header_params = {}
2583
+ if request.name
2584
+ header_params["name"] = request.name
2585
+ end
2586
+
2587
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2588
+ metadata[:"x-goog-request-params"] ||= request_params_header
2589
+
2590
+ options.apply_defaults timeout: @config.rpcs.delete_volume_snapshot.timeout,
2591
+ metadata: metadata,
2592
+ retry_policy: @config.rpcs.delete_volume_snapshot.retry_policy
2593
+
2594
+ options.apply_defaults timeout: @config.timeout,
2595
+ metadata: @config.metadata,
2596
+ retry_policy: @config.retry_policy
2597
+
2598
+ @bare_metal_solution_stub.call_rpc :delete_volume_snapshot, request, options: options do |response, operation|
2599
+ yield response, operation if block_given?
2600
+ return response
2601
+ end
2602
+ rescue ::GRPC::BadStatus => e
2603
+ raise ::Google::Cloud::Error.from_error(e)
2604
+ end
2605
+
2606
+ ##
2607
+ # Returns the specified snapshot resource.
2608
+ # Returns INVALID_ARGUMENT if called for a non-boot volume.
2609
+ #
2610
+ # @overload get_volume_snapshot(request, options = nil)
2611
+ # Pass arguments to `get_volume_snapshot` via a request object, either of type
2612
+ # {::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest} or an equivalent Hash.
2613
+ #
2614
+ # @param request [::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest, ::Hash]
2615
+ # A request object representing the call parameters. Required. To specify no
2616
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2617
+ # @param options [::Gapic::CallOptions, ::Hash]
2618
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2619
+ #
2620
+ # @overload get_volume_snapshot(name: nil)
2621
+ # Pass arguments to `get_volume_snapshot` via keyword arguments. Note that at
2622
+ # least one keyword argument is required. To specify no parameters, or to keep all
2623
+ # the default parameter values, pass an empty Hash as a request object (see above).
2624
+ #
2625
+ # @param name [::String]
2626
+ # Required. The name of the snapshot.
2627
+ #
2628
+ # @yield [response, operation] Access the result along with the RPC operation
2629
+ # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot]
2630
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2631
+ #
2632
+ # @return [::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot]
2633
+ #
2634
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2635
+ #
2636
+ # @example Basic example
2637
+ # require "google/cloud/bare_metal_solution/v2"
2638
+ #
2639
+ # # Create a client object. The client can be reused for multiple calls.
2640
+ # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
2641
+ #
2642
+ # # Create a request. To set request fields, pass in keyword arguments.
2643
+ # request = Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest.new
2644
+ #
2645
+ # # Call the get_volume_snapshot method.
2646
+ # result = client.get_volume_snapshot request
2647
+ #
2648
+ # # The returned object is of type Google::Cloud::BareMetalSolution::V2::VolumeSnapshot.
2649
+ # p result
2650
+ #
2651
+ def get_volume_snapshot request, options = nil
2652
+ raise ::ArgumentError, "request must be provided" if request.nil?
2653
+
2654
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetVolumeSnapshotRequest
2655
+
2656
+ # Converts hash and nil to an options object
2657
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2658
+
2659
+ # Customize the options with defaults
2660
+ metadata = @config.rpcs.get_volume_snapshot.metadata.to_h
2661
+
2662
+ # Set x-goog-api-client and x-goog-user-project headers
2663
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2664
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2665
+ gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION
2666
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2667
+
2668
+ header_params = {}
2669
+ if request.name
2670
+ header_params["name"] = request.name
2671
+ end
2672
+
2673
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2674
+ metadata[:"x-goog-request-params"] ||= request_params_header
2675
+
2676
+ options.apply_defaults timeout: @config.rpcs.get_volume_snapshot.timeout,
2677
+ metadata: metadata,
2678
+ retry_policy: @config.rpcs.get_volume_snapshot.retry_policy
2679
+
2680
+ options.apply_defaults timeout: @config.timeout,
2681
+ metadata: @config.metadata,
2682
+ retry_policy: @config.retry_policy
2683
+
2684
+ @bare_metal_solution_stub.call_rpc :get_volume_snapshot, request, options: options do |response, operation|
2685
+ yield response, operation if block_given?
2686
+ return response
2687
+ end
2688
+ rescue ::GRPC::BadStatus => e
2689
+ raise ::Google::Cloud::Error.from_error(e)
2690
+ end
2691
+
2692
+ ##
2693
+ # Retrieves the list of snapshots for the specified volume.
2694
+ # Returns a response with an empty list of snapshots if called
2695
+ # for a non-boot volume.
2696
+ #
2697
+ # @overload list_volume_snapshots(request, options = nil)
2698
+ # Pass arguments to `list_volume_snapshots` via a request object, either of type
2699
+ # {::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest} or an equivalent Hash.
2700
+ #
2701
+ # @param request [::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest, ::Hash]
2702
+ # A request object representing the call parameters. Required. To specify no
2703
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2704
+ # @param options [::Gapic::CallOptions, ::Hash]
2705
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2706
+ #
2707
+ # @overload list_volume_snapshots(parent: nil, page_size: nil, page_token: nil)
2708
+ # Pass arguments to `list_volume_snapshots` via keyword arguments. Note that at
2709
+ # least one keyword argument is required. To specify no parameters, or to keep all
2710
+ # the default parameter values, pass an empty Hash as a request object (see above).
2711
+ #
2712
+ # @param parent [::String]
2713
+ # Required. Parent value for ListVolumesRequest.
2714
+ # @param page_size [::Integer]
2715
+ # Requested page size. The server might return fewer items than requested.
2716
+ # If unspecified, server will pick an appropriate default.
2717
+ # @param page_token [::String]
2718
+ # A token identifying a page of results from the server.
2719
+ #
2720
+ # @yield [response, operation] Access the result along with the RPC operation
2721
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot>]
2722
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2723
+ #
2724
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot>]
2725
+ #
2726
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2727
+ #
2728
+ # @example Basic example
2729
+ # require "google/cloud/bare_metal_solution/v2"
2730
+ #
2731
+ # # Create a client object. The client can be reused for multiple calls.
2732
+ # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
2733
+ #
2734
+ # # Create a request. To set request fields, pass in keyword arguments.
2735
+ # request = Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest.new
2736
+ #
2737
+ # # Call the list_volume_snapshots method.
2738
+ # result = client.list_volume_snapshots request
2739
+ #
2740
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2741
+ # # over elements, and API calls will be issued to fetch pages as needed.
2742
+ # result.each do |item|
2743
+ # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::VolumeSnapshot.
2744
+ # p item
2745
+ # end
2746
+ #
2747
+ def list_volume_snapshots request, options = nil
2748
+ raise ::ArgumentError, "request must be provided" if request.nil?
2749
+
2750
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListVolumeSnapshotsRequest
2751
+
2752
+ # Converts hash and nil to an options object
2753
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2754
+
2755
+ # Customize the options with defaults
2756
+ metadata = @config.rpcs.list_volume_snapshots.metadata.to_h
2757
+
2758
+ # Set x-goog-api-client and x-goog-user-project headers
2759
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2760
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2761
+ gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION
2762
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2763
+
2764
+ header_params = {}
2765
+ if request.parent
2766
+ header_params["parent"] = request.parent
2767
+ end
2768
+
2769
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2770
+ metadata[:"x-goog-request-params"] ||= request_params_header
2771
+
2772
+ options.apply_defaults timeout: @config.rpcs.list_volume_snapshots.timeout,
2773
+ metadata: metadata,
2774
+ retry_policy: @config.rpcs.list_volume_snapshots.retry_policy
2775
+
2776
+ options.apply_defaults timeout: @config.timeout,
2777
+ metadata: @config.metadata,
2778
+ retry_policy: @config.retry_policy
2779
+
2780
+ @bare_metal_solution_stub.call_rpc :list_volume_snapshots, request, options: options do |response, operation|
2781
+ response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_volume_snapshots, request, response, operation, options
2782
+ yield response, operation if block_given?
2783
+ return response
2784
+ end
2785
+ rescue ::GRPC::BadStatus => e
2786
+ raise ::Google::Cloud::Error.from_error(e)
2787
+ end
2788
+
2789
+ ##
2790
+ # Get details of a single storage logical unit number(LUN).
2791
+ #
2792
+ # @overload get_lun(request, options = nil)
2793
+ # Pass arguments to `get_lun` via a request object, either of type
2794
+ # {::Google::Cloud::BareMetalSolution::V2::GetLunRequest} or an equivalent Hash.
2795
+ #
2796
+ # @param request [::Google::Cloud::BareMetalSolution::V2::GetLunRequest, ::Hash]
2797
+ # A request object representing the call parameters. Required. To specify no
2798
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2799
+ # @param options [::Gapic::CallOptions, ::Hash]
2800
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2801
+ #
2802
+ # @overload get_lun(name: nil)
2803
+ # Pass arguments to `get_lun` via keyword arguments. Note that at
2804
+ # least one keyword argument is required. To specify no parameters, or to keep all
2805
+ # the default parameter values, pass an empty Hash as a request object (see above).
2806
+ #
2807
+ # @param name [::String]
2808
+ # Required. Name of the resource.
2809
+ #
2810
+ # @yield [response, operation] Access the result along with the RPC operation
2811
+ # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::Lun]
2812
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2813
+ #
2814
+ # @return [::Google::Cloud::BareMetalSolution::V2::Lun]
2815
+ #
2816
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2817
+ #
2818
+ # @example Basic example
2819
+ # require "google/cloud/bare_metal_solution/v2"
2820
+ #
2821
+ # # Create a client object. The client can be reused for multiple calls.
2822
+ # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
2823
+ #
2824
+ # # Create a request. To set request fields, pass in keyword arguments.
2825
+ # request = Google::Cloud::BareMetalSolution::V2::GetLunRequest.new
2826
+ #
2827
+ # # Call the get_lun method.
2828
+ # result = client.get_lun request
2829
+ #
2830
+ # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Lun.
2831
+ # p result
2832
+ #
2833
+ def get_lun request, options = nil
2834
+ raise ::ArgumentError, "request must be provided" if request.nil?
2835
+
2836
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetLunRequest
2837
+
2838
+ # Converts hash and nil to an options object
2839
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2840
+
2841
+ # Customize the options with defaults
2842
+ metadata = @config.rpcs.get_lun.metadata.to_h
2843
+
2844
+ # Set x-goog-api-client and x-goog-user-project headers
2845
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2846
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2847
+ gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION
2848
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2849
+
2850
+ header_params = {}
2851
+ if request.name
2852
+ header_params["name"] = request.name
2853
+ end
2854
+
2855
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2856
+ metadata[:"x-goog-request-params"] ||= request_params_header
2857
+
2858
+ options.apply_defaults timeout: @config.rpcs.get_lun.timeout,
2859
+ metadata: metadata,
2860
+ retry_policy: @config.rpcs.get_lun.retry_policy
2861
+
2862
+ options.apply_defaults timeout: @config.timeout,
2863
+ metadata: @config.metadata,
2864
+ retry_policy: @config.retry_policy
2865
+
2866
+ @bare_metal_solution_stub.call_rpc :get_lun, request, options: options do |response, operation|
2867
+ yield response, operation if block_given?
2868
+ return response
2869
+ end
2870
+ rescue ::GRPC::BadStatus => e
2871
+ raise ::Google::Cloud::Error.from_error(e)
2872
+ end
2873
+
2874
+ ##
2875
+ # List storage volume luns for given storage volume.
2876
+ #
2877
+ # @overload list_luns(request, options = nil)
2878
+ # Pass arguments to `list_luns` via a request object, either of type
2879
+ # {::Google::Cloud::BareMetalSolution::V2::ListLunsRequest} or an equivalent Hash.
2880
+ #
2881
+ # @param request [::Google::Cloud::BareMetalSolution::V2::ListLunsRequest, ::Hash]
2882
+ # A request object representing the call parameters. Required. To specify no
2883
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2884
+ # @param options [::Gapic::CallOptions, ::Hash]
2885
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2886
+ #
2887
+ # @overload list_luns(parent: nil, page_size: nil, page_token: nil)
2888
+ # Pass arguments to `list_luns` via keyword arguments. Note that at
2889
+ # least one keyword argument is required. To specify no parameters, or to keep all
2890
+ # the default parameter values, pass an empty Hash as a request object (see above).
2891
+ #
2892
+ # @param parent [::String]
2893
+ # Required. Parent value for ListLunsRequest.
2894
+ # @param page_size [::Integer]
2895
+ # Requested page size. The server might return fewer items than requested.
2896
+ # If unspecified, server will pick an appropriate default.
2897
+ # @param page_token [::String]
2898
+ # A token identifying a page of results from the server.
2899
+ #
2900
+ # @yield [response, operation] Access the result along with the RPC operation
2901
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>]
2902
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2903
+ #
2904
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>]
2905
+ #
2906
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2907
+ #
2908
+ # @example Basic example
2909
+ # require "google/cloud/bare_metal_solution/v2"
2910
+ #
2911
+ # # Create a client object. The client can be reused for multiple calls.
2912
+ # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
2913
+ #
2914
+ # # Create a request. To set request fields, pass in keyword arguments.
2915
+ # request = Google::Cloud::BareMetalSolution::V2::ListLunsRequest.new
2916
+ #
2917
+ # # Call the list_luns method.
2918
+ # result = client.list_luns request
2919
+ #
2920
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2921
+ # # over elements, and API calls will be issued to fetch pages as needed.
2922
+ # result.each do |item|
2923
+ # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Lun.
2924
+ # p item
2925
+ # end
2926
+ #
2927
+ def list_luns request, options = nil
2928
+ raise ::ArgumentError, "request must be provided" if request.nil?
2929
+
2930
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListLunsRequest
2931
+
2932
+ # Converts hash and nil to an options object
2933
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2934
+
2935
+ # Customize the options with defaults
2936
+ metadata = @config.rpcs.list_luns.metadata.to_h
2937
+
2938
+ # Set x-goog-api-client and x-goog-user-project headers
2939
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2940
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2941
+ gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION
2942
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2943
+
2944
+ header_params = {}
2945
+ if request.parent
2946
+ header_params["parent"] = request.parent
2947
+ end
2948
+
2949
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2950
+ metadata[:"x-goog-request-params"] ||= request_params_header
2951
+
2952
+ options.apply_defaults timeout: @config.rpcs.list_luns.timeout,
2953
+ metadata: metadata,
2954
+ retry_policy: @config.rpcs.list_luns.retry_policy
2955
+
2956
+ options.apply_defaults timeout: @config.timeout,
2957
+ metadata: @config.metadata,
2958
+ retry_policy: @config.retry_policy
2959
+
2960
+ @bare_metal_solution_stub.call_rpc :list_luns, request, options: options do |response, operation|
2961
+ response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_luns, request, response, operation, options
2962
+ yield response, operation if block_given?
2963
+ return response
2964
+ end
2965
+ rescue ::GRPC::BadStatus => e
2966
+ raise ::Google::Cloud::Error.from_error(e)
2967
+ end
2968
+
2969
+ ##
2970
+ # Skips lun's cooloff and deletes it now.
2971
+ # Lun must be in cooloff state.
2972
+ #
2973
+ # @overload evict_lun(request, options = nil)
2974
+ # Pass arguments to `evict_lun` via a request object, either of type
2975
+ # {::Google::Cloud::BareMetalSolution::V2::EvictLunRequest} or an equivalent Hash.
2976
+ #
2977
+ # @param request [::Google::Cloud::BareMetalSolution::V2::EvictLunRequest, ::Hash]
2978
+ # A request object representing the call parameters. Required. To specify no
2979
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2980
+ # @param options [::Gapic::CallOptions, ::Hash]
2981
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2982
+ #
2983
+ # @overload evict_lun(name: nil)
2984
+ # Pass arguments to `evict_lun` via keyword arguments. Note that at
2985
+ # least one keyword argument is required. To specify no parameters, or to keep all
2986
+ # the default parameter values, pass an empty Hash as a request object (see above).
2987
+ #
2988
+ # @param name [::String]
2989
+ # Required. The name of the lun.
2990
+ #
2991
+ # @yield [response, operation] Access the result along with the RPC operation
2992
+ # @yieldparam response [::Gapic::Operation]
2993
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2994
+ #
2995
+ # @return [::Gapic::Operation]
2996
+ #
2997
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2998
+ #
2999
+ # @example Basic example
3000
+ # require "google/cloud/bare_metal_solution/v2"
3001
+ #
3002
+ # # Create a client object. The client can be reused for multiple calls.
3003
+ # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
3004
+ #
3005
+ # # Create a request. To set request fields, pass in keyword arguments.
3006
+ # request = Google::Cloud::BareMetalSolution::V2::EvictLunRequest.new
3007
+ #
3008
+ # # Call the evict_lun method.
3009
+ # result = client.evict_lun request
3010
+ #
3011
+ # # The returned object is of type Gapic::Operation. You can use it to
3012
+ # # check the status of an operation, cancel it, or wait for results.
3013
+ # # Here is how to wait for a response.
3014
+ # result.wait_until_done! timeout: 60
3015
+ # if result.response?
3016
+ # p result.response
3017
+ # else
3018
+ # puts "No response received."
3019
+ # end
3020
+ #
3021
+ def evict_lun request, options = nil
3022
+ raise ::ArgumentError, "request must be provided" if request.nil?
3023
+
3024
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::EvictLunRequest
3025
+
3026
+ # Converts hash and nil to an options object
3027
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3028
+
3029
+ # Customize the options with defaults
3030
+ metadata = @config.rpcs.evict_lun.metadata.to_h
3031
+
3032
+ # Set x-goog-api-client and x-goog-user-project headers
3033
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3034
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3035
+ gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION
3036
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3037
+
3038
+ header_params = {}
3039
+ if request.name
3040
+ header_params["name"] = request.name
3041
+ end
3042
+
3043
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3044
+ metadata[:"x-goog-request-params"] ||= request_params_header
3045
+
3046
+ options.apply_defaults timeout: @config.rpcs.evict_lun.timeout,
3047
+ metadata: metadata,
3048
+ retry_policy: @config.rpcs.evict_lun.retry_policy
3049
+
3050
+ options.apply_defaults timeout: @config.timeout,
3051
+ metadata: @config.metadata,
3052
+ retry_policy: @config.retry_policy
3053
+
3054
+ @bare_metal_solution_stub.call_rpc :evict_lun, request, options: options do |response, operation|
3055
+ response = ::Gapic::Operation.new response, @operations_client, options: options
3056
+ yield response, operation if block_given?
3057
+ return response
3058
+ end
3059
+ rescue ::GRPC::BadStatus => e
3060
+ raise ::Google::Cloud::Error.from_error(e)
3061
+ end
3062
+
3063
+ ##
3064
+ # Get details of a single NFS share.
3065
+ #
3066
+ # @overload get_nfs_share(request, options = nil)
3067
+ # Pass arguments to `get_nfs_share` via a request object, either of type
3068
+ # {::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest} or an equivalent Hash.
3069
+ #
3070
+ # @param request [::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest, ::Hash]
3071
+ # A request object representing the call parameters. Required. To specify no
3072
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3073
+ # @param options [::Gapic::CallOptions, ::Hash]
3074
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3075
+ #
3076
+ # @overload get_nfs_share(name: nil)
3077
+ # Pass arguments to `get_nfs_share` via keyword arguments. Note that at
3078
+ # least one keyword argument is required. To specify no parameters, or to keep all
3079
+ # the default parameter values, pass an empty Hash as a request object (see above).
3080
+ #
3081
+ # @param name [::String]
3082
+ # Required. Name of the resource.
3083
+ #
3084
+ # @yield [response, operation] Access the result along with the RPC operation
3085
+ # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::NfsShare]
3086
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3087
+ #
3088
+ # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare]
3089
+ #
3090
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3091
+ #
3092
+ # @example Basic example
3093
+ # require "google/cloud/bare_metal_solution/v2"
3094
+ #
3095
+ # # Create a client object. The client can be reused for multiple calls.
3096
+ # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
3097
+ #
3098
+ # # Create a request. To set request fields, pass in keyword arguments.
3099
+ # request = Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest.new
3100
+ #
3101
+ # # Call the get_nfs_share method.
3102
+ # result = client.get_nfs_share request
3103
+ #
3104
+ # # The returned object is of type Google::Cloud::BareMetalSolution::V2::NfsShare.
3105
+ # p result
3106
+ #
3107
+ def get_nfs_share request, options = nil
3108
+ raise ::ArgumentError, "request must be provided" if request.nil?
3109
+
3110
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest
3111
+
3112
+ # Converts hash and nil to an options object
3113
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3114
+
3115
+ # Customize the options with defaults
3116
+ metadata = @config.rpcs.get_nfs_share.metadata.to_h
3117
+
3118
+ # Set x-goog-api-client and x-goog-user-project headers
3119
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3120
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3121
+ gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION
3122
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3123
+
3124
+ header_params = {}
3125
+ if request.name
3126
+ header_params["name"] = request.name
3127
+ end
3128
+
3129
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3130
+ metadata[:"x-goog-request-params"] ||= request_params_header
3131
+
3132
+ options.apply_defaults timeout: @config.rpcs.get_nfs_share.timeout,
3133
+ metadata: metadata,
3134
+ retry_policy: @config.rpcs.get_nfs_share.retry_policy
3135
+
3136
+ options.apply_defaults timeout: @config.timeout,
3137
+ metadata: @config.metadata,
3138
+ retry_policy: @config.retry_policy
3139
+
3140
+ @bare_metal_solution_stub.call_rpc :get_nfs_share, request, options: options do |response, operation|
3141
+ yield response, operation if block_given?
3142
+ return response
3143
+ end
3144
+ rescue ::GRPC::BadStatus => e
3145
+ raise ::Google::Cloud::Error.from_error(e)
3146
+ end
3147
+
3148
+ ##
3149
+ # List NFS shares.
3150
+ #
3151
+ # @overload list_nfs_shares(request, options = nil)
3152
+ # Pass arguments to `list_nfs_shares` via a request object, either of type
3153
+ # {::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest} or an equivalent Hash.
3154
+ #
3155
+ # @param request [::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest, ::Hash]
3156
+ # A request object representing the call parameters. Required. To specify no
3157
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3158
+ # @param options [::Gapic::CallOptions, ::Hash]
3159
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3160
+ #
3161
+ # @overload list_nfs_shares(parent: nil, page_size: nil, page_token: nil, filter: nil)
3162
+ # Pass arguments to `list_nfs_shares` via keyword arguments. Note that at
3163
+ # least one keyword argument is required. To specify no parameters, or to keep all
3164
+ # the default parameter values, pass an empty Hash as a request object (see above).
3165
+ #
3166
+ # @param parent [::String]
3167
+ # Required. Parent value for ListNfsSharesRequest.
3168
+ # @param page_size [::Integer]
3169
+ # Requested page size. The server might return fewer items than requested.
3170
+ # If unspecified, server will pick an appropriate default.
3171
+ # @param page_token [::String]
3172
+ # A token identifying a page of results from the server.
3173
+ # @param filter [::String]
3174
+ # List filter.
3175
+ #
3176
+ # @yield [response, operation] Access the result along with the RPC operation
3177
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>]
3178
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3179
+ #
3180
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>]
3181
+ #
3182
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3183
+ #
3184
+ # @example Basic example
3185
+ # require "google/cloud/bare_metal_solution/v2"
3186
+ #
3187
+ # # Create a client object. The client can be reused for multiple calls.
3188
+ # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
3189
+ #
3190
+ # # Create a request. To set request fields, pass in keyword arguments.
3191
+ # request = Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest.new
3192
+ #
3193
+ # # Call the list_nfs_shares method.
3194
+ # result = client.list_nfs_shares request
3195
+ #
3196
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
3197
+ # # over elements, and API calls will be issued to fetch pages as needed.
3198
+ # result.each do |item|
3199
+ # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::NfsShare.
3200
+ # p item
3201
+ # end
3202
+ #
3203
+ def list_nfs_shares request, options = nil
3204
+ raise ::ArgumentError, "request must be provided" if request.nil?
3205
+
3206
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest
3207
+
3208
+ # Converts hash and nil to an options object
3209
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3210
+
3211
+ # Customize the options with defaults
3212
+ metadata = @config.rpcs.list_nfs_shares.metadata.to_h
3213
+
3214
+ # Set x-goog-api-client and x-goog-user-project headers
3215
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3216
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3217
+ gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION
3218
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3219
+
3220
+ header_params = {}
3221
+ if request.parent
3222
+ header_params["parent"] = request.parent
3223
+ end
3224
+
3225
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3226
+ metadata[:"x-goog-request-params"] ||= request_params_header
3227
+
3228
+ options.apply_defaults timeout: @config.rpcs.list_nfs_shares.timeout,
3229
+ metadata: metadata,
3230
+ retry_policy: @config.rpcs.list_nfs_shares.retry_policy
3231
+
3232
+ options.apply_defaults timeout: @config.timeout,
3233
+ metadata: @config.metadata,
3234
+ retry_policy: @config.retry_policy
3235
+
3236
+ @bare_metal_solution_stub.call_rpc :list_nfs_shares, request, options: options do |response, operation|
3237
+ response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_nfs_shares, request, response, operation, options
3238
+ yield response, operation if block_given?
3239
+ return response
3240
+ end
3241
+ rescue ::GRPC::BadStatus => e
3242
+ raise ::Google::Cloud::Error.from_error(e)
3243
+ end
3244
+
3245
+ ##
3246
+ # Update details of a single NFS share.
3247
+ #
3248
+ # @overload update_nfs_share(request, options = nil)
3249
+ # Pass arguments to `update_nfs_share` via a request object, either of type
3250
+ # {::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest} or an equivalent Hash.
3251
+ #
3252
+ # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest, ::Hash]
3253
+ # A request object representing the call parameters. Required. To specify no
3254
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3255
+ # @param options [::Gapic::CallOptions, ::Hash]
3256
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3257
+ #
3258
+ # @overload update_nfs_share(nfs_share: nil, update_mask: nil)
3259
+ # Pass arguments to `update_nfs_share` via keyword arguments. Note that at
3260
+ # least one keyword argument is required. To specify no parameters, or to keep all
3261
+ # the default parameter values, pass an empty Hash as a request object (see above).
3262
+ #
3263
+ # @param nfs_share [::Google::Cloud::BareMetalSolution::V2::NfsShare, ::Hash]
3264
+ # Required. The NFS share to update.
3265
+ #
3266
+ # The `name` field is used to identify the NFS share to update.
3267
+ # Format: projects/\\{project}/locations/\\{location}/nfsShares/\\{nfs_share}
3268
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3269
+ # The list of fields to update.
3270
+ # The only currently supported fields are:
3271
+ # `labels`
3272
+ # `allowed_clients`
3273
+ #
3274
+ # @yield [response, operation] Access the result along with the RPC operation
3275
+ # @yieldparam response [::Gapic::Operation]
3276
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3277
+ #
3278
+ # @return [::Gapic::Operation]
3279
+ #
3280
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3281
+ #
3282
+ # @example Basic example
3283
+ # require "google/cloud/bare_metal_solution/v2"
3284
+ #
3285
+ # # Create a client object. The client can be reused for multiple calls.
3286
+ # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
3287
+ #
3288
+ # # Create a request. To set request fields, pass in keyword arguments.
3289
+ # request = Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest.new
1181
3290
  #
1182
- # # Call the resize_volume method.
1183
- # result = client.resize_volume request
3291
+ # # Call the update_nfs_share method.
3292
+ # result = client.update_nfs_share request
1184
3293
  #
1185
3294
  # # The returned object is of type Gapic::Operation. You can use it to
1186
3295
  # # check the status of an operation, cancel it, or wait for results.
@@ -1192,16 +3301,16 @@ module Google
1192
3301
  # puts "No response received."
1193
3302
  # end
1194
3303
  #
1195
- def resize_volume request, options = nil
3304
+ def update_nfs_share request, options = nil
1196
3305
  raise ::ArgumentError, "request must be provided" if request.nil?
1197
3306
 
1198
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest
3307
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest
1199
3308
 
1200
3309
  # Converts hash and nil to an options object
1201
3310
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1202
3311
 
1203
3312
  # Customize the options with defaults
1204
- metadata = @config.rpcs.resize_volume.metadata.to_h
3313
+ metadata = @config.rpcs.update_nfs_share.metadata.to_h
1205
3314
 
1206
3315
  # Set x-goog-api-client and x-goog-user-project headers
1207
3316
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1210,22 +3319,22 @@ module Google
1210
3319
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1211
3320
 
1212
3321
  header_params = {}
1213
- if request.volume
1214
- header_params["volume"] = request.volume
3322
+ if request.nfs_share&.name
3323
+ header_params["nfs_share.name"] = request.nfs_share.name
1215
3324
  end
1216
3325
 
1217
3326
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1218
3327
  metadata[:"x-goog-request-params"] ||= request_params_header
1219
3328
 
1220
- options.apply_defaults timeout: @config.rpcs.resize_volume.timeout,
3329
+ options.apply_defaults timeout: @config.rpcs.update_nfs_share.timeout,
1221
3330
  metadata: metadata,
1222
- retry_policy: @config.rpcs.resize_volume.retry_policy
3331
+ retry_policy: @config.rpcs.update_nfs_share.retry_policy
1223
3332
 
1224
3333
  options.apply_defaults timeout: @config.timeout,
1225
3334
  metadata: @config.metadata,
1226
3335
  retry_policy: @config.retry_policy
1227
3336
 
1228
- @bare_metal_solution_stub.call_rpc :resize_volume, request, options: options do |response, operation|
3337
+ @bare_metal_solution_stub.call_rpc :update_nfs_share, request, options: options do |response, operation|
1229
3338
  response = ::Gapic::Operation.new response, @operations_client, options: options
1230
3339
  yield response, operation if block_given?
1231
3340
  return response
@@ -1235,38 +3344,33 @@ module Google
1235
3344
  end
1236
3345
 
1237
3346
  ##
1238
- # List network in a given project and location.
3347
+ # Create an NFS share.
1239
3348
  #
1240
- # @overload list_networks(request, options = nil)
1241
- # Pass arguments to `list_networks` via a request object, either of type
1242
- # {::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest} or an equivalent Hash.
3349
+ # @overload create_nfs_share(request, options = nil)
3350
+ # Pass arguments to `create_nfs_share` via a request object, either of type
3351
+ # {::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest} or an equivalent Hash.
1243
3352
  #
1244
- # @param request [::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest, ::Hash]
3353
+ # @param request [::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest, ::Hash]
1245
3354
  # A request object representing the call parameters. Required. To specify no
1246
3355
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1247
3356
  # @param options [::Gapic::CallOptions, ::Hash]
1248
3357
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1249
3358
  #
1250
- # @overload list_networks(parent: nil, page_size: nil, page_token: nil, filter: nil)
1251
- # Pass arguments to `list_networks` via keyword arguments. Note that at
3359
+ # @overload create_nfs_share(parent: nil, nfs_share: nil)
3360
+ # Pass arguments to `create_nfs_share` via keyword arguments. Note that at
1252
3361
  # least one keyword argument is required. To specify no parameters, or to keep all
1253
3362
  # the default parameter values, pass an empty Hash as a request object (see above).
1254
3363
  #
1255
3364
  # @param parent [::String]
1256
- # Required. Parent value for ListNetworksRequest.
1257
- # @param page_size [::Integer]
1258
- # Requested page size. The server might return fewer items than requested.
1259
- # If unspecified, server will pick an appropriate default.
1260
- # @param page_token [::String]
1261
- # A token identifying a page of results from the server.
1262
- # @param filter [::String]
1263
- # List filter.
3365
+ # Required. The parent project and location.
3366
+ # @param nfs_share [::Google::Cloud::BareMetalSolution::V2::NfsShare, ::Hash]
3367
+ # Required. The NfsShare to create.
1264
3368
  #
1265
3369
  # @yield [response, operation] Access the result along with the RPC operation
1266
- # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>]
3370
+ # @yieldparam response [::Gapic::Operation]
1267
3371
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
1268
3372
  #
1269
- # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Network>]
3373
+ # @return [::Gapic::Operation]
1270
3374
  #
1271
3375
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1272
3376
  #
@@ -1277,28 +3381,31 @@ module Google
1277
3381
  # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
1278
3382
  #
1279
3383
  # # Create a request. To set request fields, pass in keyword arguments.
1280
- # request = Google::Cloud::BareMetalSolution::V2::ListNetworksRequest.new
3384
+ # request = Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest.new
1281
3385
  #
1282
- # # Call the list_networks method.
1283
- # result = client.list_networks request
3386
+ # # Call the create_nfs_share method.
3387
+ # result = client.create_nfs_share request
1284
3388
  #
1285
- # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1286
- # # over elements, and API calls will be issued to fetch pages as needed.
1287
- # result.each do |item|
1288
- # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Network.
1289
- # p item
3389
+ # # The returned object is of type Gapic::Operation. You can use it to
3390
+ # # check the status of an operation, cancel it, or wait for results.
3391
+ # # Here is how to wait for a response.
3392
+ # result.wait_until_done! timeout: 60
3393
+ # if result.response?
3394
+ # p result.response
3395
+ # else
3396
+ # puts "No response received."
1290
3397
  # end
1291
3398
  #
1292
- def list_networks request, options = nil
3399
+ def create_nfs_share request, options = nil
1293
3400
  raise ::ArgumentError, "request must be provided" if request.nil?
1294
3401
 
1295
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest
3402
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateNfsShareRequest
1296
3403
 
1297
3404
  # Converts hash and nil to an options object
1298
3405
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1299
3406
 
1300
3407
  # Customize the options with defaults
1301
- metadata = @config.rpcs.list_networks.metadata.to_h
3408
+ metadata = @config.rpcs.create_nfs_share.metadata.to_h
1302
3409
 
1303
3410
  # Set x-goog-api-client and x-goog-user-project headers
1304
3411
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1314,16 +3421,16 @@ module Google
1314
3421
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1315
3422
  metadata[:"x-goog-request-params"] ||= request_params_header
1316
3423
 
1317
- options.apply_defaults timeout: @config.rpcs.list_networks.timeout,
3424
+ options.apply_defaults timeout: @config.rpcs.create_nfs_share.timeout,
1318
3425
  metadata: metadata,
1319
- retry_policy: @config.rpcs.list_networks.retry_policy
3426
+ retry_policy: @config.rpcs.create_nfs_share.retry_policy
1320
3427
 
1321
3428
  options.apply_defaults timeout: @config.timeout,
1322
3429
  metadata: @config.metadata,
1323
3430
  retry_policy: @config.retry_policy
1324
3431
 
1325
- @bare_metal_solution_stub.call_rpc :list_networks, request, options: options do |response, operation|
1326
- response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_networks, request, response, operation, options
3432
+ @bare_metal_solution_stub.call_rpc :create_nfs_share, request, options: options do |response, operation|
3433
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1327
3434
  yield response, operation if block_given?
1328
3435
  return response
1329
3436
  end
@@ -1332,32 +3439,35 @@ module Google
1332
3439
  end
1333
3440
 
1334
3441
  ##
1335
- # List all Networks (and used IPs for each Network) in the vendor account
1336
- # associated with the specified project.
3442
+ # RenameNfsShare sets a new name for an nfsshare.
3443
+ # Use with caution, previous names become immediately invalidated.
1337
3444
  #
1338
- # @overload list_network_usage(request, options = nil)
1339
- # Pass arguments to `list_network_usage` via a request object, either of type
1340
- # {::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest} or an equivalent Hash.
3445
+ # @overload rename_nfs_share(request, options = nil)
3446
+ # Pass arguments to `rename_nfs_share` via a request object, either of type
3447
+ # {::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest} or an equivalent Hash.
1341
3448
  #
1342
- # @param request [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest, ::Hash]
3449
+ # @param request [::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest, ::Hash]
1343
3450
  # A request object representing the call parameters. Required. To specify no
1344
3451
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1345
3452
  # @param options [::Gapic::CallOptions, ::Hash]
1346
3453
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1347
3454
  #
1348
- # @overload list_network_usage(location: nil)
1349
- # Pass arguments to `list_network_usage` via keyword arguments. Note that at
3455
+ # @overload rename_nfs_share(name: nil, new_nfsshare_id: nil)
3456
+ # Pass arguments to `rename_nfs_share` via keyword arguments. Note that at
1350
3457
  # least one keyword argument is required. To specify no parameters, or to keep all
1351
3458
  # the default parameter values, pass an empty Hash as a request object (see above).
1352
3459
  #
1353
- # @param location [::String]
1354
- # Required. Parent value (project and location).
3460
+ # @param name [::String]
3461
+ # Required. The `name` field is used to identify the nfsshare.
3462
+ # Format: projects/\\{project}/locations/\\{location}/nfsshares/\\{nfsshare}
3463
+ # @param new_nfsshare_id [::String]
3464
+ # Required. The new `id` of the nfsshare.
1355
3465
  #
1356
3466
  # @yield [response, operation] Access the result along with the RPC operation
1357
- # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse]
3467
+ # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::NfsShare]
1358
3468
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
1359
3469
  #
1360
- # @return [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse]
3470
+ # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare]
1361
3471
  #
1362
3472
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1363
3473
  #
@@ -1368,24 +3478,24 @@ module Google
1368
3478
  # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
1369
3479
  #
1370
3480
  # # Create a request. To set request fields, pass in keyword arguments.
1371
- # request = Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest.new
3481
+ # request = Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest.new
1372
3482
  #
1373
- # # Call the list_network_usage method.
1374
- # result = client.list_network_usage request
3483
+ # # Call the rename_nfs_share method.
3484
+ # result = client.rename_nfs_share request
1375
3485
  #
1376
- # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse.
3486
+ # # The returned object is of type Google::Cloud::BareMetalSolution::V2::NfsShare.
1377
3487
  # p result
1378
3488
  #
1379
- def list_network_usage request, options = nil
3489
+ def rename_nfs_share request, options = nil
1380
3490
  raise ::ArgumentError, "request must be provided" if request.nil?
1381
3491
 
1382
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest
3492
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameNfsShareRequest
1383
3493
 
1384
3494
  # Converts hash and nil to an options object
1385
3495
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1386
3496
 
1387
3497
  # Customize the options with defaults
1388
- metadata = @config.rpcs.list_network_usage.metadata.to_h
3498
+ metadata = @config.rpcs.rename_nfs_share.metadata.to_h
1389
3499
 
1390
3500
  # Set x-goog-api-client and x-goog-user-project headers
1391
3501
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1394,22 +3504,22 @@ module Google
1394
3504
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1395
3505
 
1396
3506
  header_params = {}
1397
- if request.location
1398
- header_params["location"] = request.location
3507
+ if request.name
3508
+ header_params["name"] = request.name
1399
3509
  end
1400
3510
 
1401
3511
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1402
3512
  metadata[:"x-goog-request-params"] ||= request_params_header
1403
3513
 
1404
- options.apply_defaults timeout: @config.rpcs.list_network_usage.timeout,
3514
+ options.apply_defaults timeout: @config.rpcs.rename_nfs_share.timeout,
1405
3515
  metadata: metadata,
1406
- retry_policy: @config.rpcs.list_network_usage.retry_policy
3516
+ retry_policy: @config.rpcs.rename_nfs_share.retry_policy
1407
3517
 
1408
3518
  options.apply_defaults timeout: @config.timeout,
1409
3519
  metadata: @config.metadata,
1410
3520
  retry_policy: @config.retry_policy
1411
3521
 
1412
- @bare_metal_solution_stub.call_rpc :list_network_usage, request, options: options do |response, operation|
3522
+ @bare_metal_solution_stub.call_rpc :rename_nfs_share, request, options: options do |response, operation|
1413
3523
  yield response, operation if block_given?
1414
3524
  return response
1415
3525
  end
@@ -1418,31 +3528,31 @@ module Google
1418
3528
  end
1419
3529
 
1420
3530
  ##
1421
- # Get details of a single network.
3531
+ # Delete an NFS share. The underlying volume is automatically deleted.
1422
3532
  #
1423
- # @overload get_network(request, options = nil)
1424
- # Pass arguments to `get_network` via a request object, either of type
1425
- # {::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest} or an equivalent Hash.
3533
+ # @overload delete_nfs_share(request, options = nil)
3534
+ # Pass arguments to `delete_nfs_share` via a request object, either of type
3535
+ # {::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest} or an equivalent Hash.
1426
3536
  #
1427
- # @param request [::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest, ::Hash]
3537
+ # @param request [::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest, ::Hash]
1428
3538
  # A request object representing the call parameters. Required. To specify no
1429
3539
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1430
3540
  # @param options [::Gapic::CallOptions, ::Hash]
1431
3541
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1432
3542
  #
1433
- # @overload get_network(name: nil)
1434
- # Pass arguments to `get_network` via keyword arguments. Note that at
3543
+ # @overload delete_nfs_share(name: nil)
3544
+ # Pass arguments to `delete_nfs_share` via keyword arguments. Note that at
1435
3545
  # least one keyword argument is required. To specify no parameters, or to keep all
1436
3546
  # the default parameter values, pass an empty Hash as a request object (see above).
1437
3547
  #
1438
3548
  # @param name [::String]
1439
- # Required. Name of the resource.
3549
+ # Required. The name of the NFS share to delete.
1440
3550
  #
1441
3551
  # @yield [response, operation] Access the result along with the RPC operation
1442
- # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::Network]
3552
+ # @yieldparam response [::Gapic::Operation]
1443
3553
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
1444
3554
  #
1445
- # @return [::Google::Cloud::BareMetalSolution::V2::Network]
3555
+ # @return [::Gapic::Operation]
1446
3556
  #
1447
3557
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1448
3558
  #
@@ -1453,24 +3563,31 @@ module Google
1453
3563
  # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
1454
3564
  #
1455
3565
  # # Create a request. To set request fields, pass in keyword arguments.
1456
- # request = Google::Cloud::BareMetalSolution::V2::GetNetworkRequest.new
3566
+ # request = Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest.new
1457
3567
  #
1458
- # # Call the get_network method.
1459
- # result = client.get_network request
3568
+ # # Call the delete_nfs_share method.
3569
+ # result = client.delete_nfs_share request
1460
3570
  #
1461
- # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Network.
1462
- # p result
3571
+ # # The returned object is of type Gapic::Operation. You can use it to
3572
+ # # check the status of an operation, cancel it, or wait for results.
3573
+ # # Here is how to wait for a response.
3574
+ # result.wait_until_done! timeout: 60
3575
+ # if result.response?
3576
+ # p result.response
3577
+ # else
3578
+ # puts "No response received."
3579
+ # end
1463
3580
  #
1464
- def get_network request, options = nil
3581
+ def delete_nfs_share request, options = nil
1465
3582
  raise ::ArgumentError, "request must be provided" if request.nil?
1466
3583
 
1467
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest
3584
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DeleteNfsShareRequest
1468
3585
 
1469
3586
  # Converts hash and nil to an options object
1470
3587
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1471
3588
 
1472
3589
  # Customize the options with defaults
1473
- metadata = @config.rpcs.get_network.metadata.to_h
3590
+ metadata = @config.rpcs.delete_nfs_share.metadata.to_h
1474
3591
 
1475
3592
  # Set x-goog-api-client and x-goog-user-project headers
1476
3593
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1486,15 +3603,16 @@ module Google
1486
3603
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1487
3604
  metadata[:"x-goog-request-params"] ||= request_params_header
1488
3605
 
1489
- options.apply_defaults timeout: @config.rpcs.get_network.timeout,
3606
+ options.apply_defaults timeout: @config.rpcs.delete_nfs_share.timeout,
1490
3607
  metadata: metadata,
1491
- retry_policy: @config.rpcs.get_network.retry_policy
3608
+ retry_policy: @config.rpcs.delete_nfs_share.retry_policy
1492
3609
 
1493
3610
  options.apply_defaults timeout: @config.timeout,
1494
3611
  metadata: @config.metadata,
1495
3612
  retry_policy: @config.retry_policy
1496
3613
 
1497
- @bare_metal_solution_stub.call_rpc :get_network, request, options: options do |response, operation|
3614
+ @bare_metal_solution_stub.call_rpc :delete_nfs_share, request, options: options do |response, operation|
3615
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1498
3616
  yield response, operation if block_given?
1499
3617
  return response
1500
3618
  end
@@ -1503,38 +3621,38 @@ module Google
1503
3621
  end
1504
3622
 
1505
3623
  ##
1506
- # Update details of a single network.
3624
+ # List the budget details to provision resources on a given project.
1507
3625
  #
1508
- # @overload update_network(request, options = nil)
1509
- # Pass arguments to `update_network` via a request object, either of type
1510
- # {::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest} or an equivalent Hash.
3626
+ # @overload list_provisioning_quotas(request, options = nil)
3627
+ # Pass arguments to `list_provisioning_quotas` via a request object, either of type
3628
+ # {::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest} or an equivalent Hash.
1511
3629
  #
1512
- # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest, ::Hash]
3630
+ # @param request [::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest, ::Hash]
1513
3631
  # A request object representing the call parameters. Required. To specify no
1514
3632
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1515
3633
  # @param options [::Gapic::CallOptions, ::Hash]
1516
3634
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1517
3635
  #
1518
- # @overload update_network(network: nil, update_mask: nil)
1519
- # Pass arguments to `update_network` via keyword arguments. Note that at
3636
+ # @overload list_provisioning_quotas(parent: nil, page_size: nil, page_token: nil)
3637
+ # Pass arguments to `list_provisioning_quotas` via keyword arguments. Note that at
1520
3638
  # least one keyword argument is required. To specify no parameters, or to keep all
1521
3639
  # the default parameter values, pass an empty Hash as a request object (see above).
1522
3640
  #
1523
- # @param network [::Google::Cloud::BareMetalSolution::V2::Network, ::Hash]
1524
- # Required. The network to update.
1525
- #
1526
- # The `name` field is used to identify the instance to update.
1527
- # Format: projects/\\{project}/locations/\\{location}/networks/\\{network}
1528
- # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1529
- # The list of fields to update.
1530
- # The only currently supported fields are:
1531
- # `labels`, `reservations`
3641
+ # @param parent [::String]
3642
+ # Required. Parent value for ListProvisioningQuotasRequest.
3643
+ # @param page_size [::Integer]
3644
+ # Requested page size. The server might return fewer items than requested.
3645
+ # If unspecified, server will pick an appropriate default.
3646
+ # Notice that page_size field is not supported and won't be respected in
3647
+ # the API request for now, will be updated when pagination is supported.
3648
+ # @param page_token [::String]
3649
+ # A token identifying a page of results from the server.
1532
3650
  #
1533
3651
  # @yield [response, operation] Access the result along with the RPC operation
1534
- # @yieldparam response [::Gapic::Operation]
3652
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>]
1535
3653
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
1536
3654
  #
1537
- # @return [::Gapic::Operation]
3655
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota>]
1538
3656
  #
1539
3657
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1540
3658
  #
@@ -1545,31 +3663,120 @@ module Google
1545
3663
  # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
1546
3664
  #
1547
3665
  # # Create a request. To set request fields, pass in keyword arguments.
1548
- # request = Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest.new
3666
+ # request = Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest.new
1549
3667
  #
1550
- # # Call the update_network method.
1551
- # result = client.update_network request
3668
+ # # Call the list_provisioning_quotas method.
3669
+ # result = client.list_provisioning_quotas request
1552
3670
  #
1553
- # # The returned object is of type Gapic::Operation. You can use it to
1554
- # # check the status of an operation, cancel it, or wait for results.
1555
- # # Here is how to wait for a response.
1556
- # result.wait_until_done! timeout: 60
1557
- # if result.response?
1558
- # p result.response
1559
- # else
1560
- # puts "No response received."
3671
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
3672
+ # # over elements, and API calls will be issued to fetch pages as needed.
3673
+ # result.each do |item|
3674
+ # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::ProvisioningQuota.
3675
+ # p item
1561
3676
  # end
1562
3677
  #
1563
- def update_network request, options = nil
3678
+ def list_provisioning_quotas request, options = nil
3679
+ raise ::ArgumentError, "request must be provided" if request.nil?
3680
+
3681
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListProvisioningQuotasRequest
3682
+
3683
+ # Converts hash and nil to an options object
3684
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3685
+
3686
+ # Customize the options with defaults
3687
+ metadata = @config.rpcs.list_provisioning_quotas.metadata.to_h
3688
+
3689
+ # Set x-goog-api-client and x-goog-user-project headers
3690
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3691
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3692
+ gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION
3693
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3694
+
3695
+ header_params = {}
3696
+ if request.parent
3697
+ header_params["parent"] = request.parent
3698
+ end
3699
+
3700
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3701
+ metadata[:"x-goog-request-params"] ||= request_params_header
3702
+
3703
+ options.apply_defaults timeout: @config.rpcs.list_provisioning_quotas.timeout,
3704
+ metadata: metadata,
3705
+ retry_policy: @config.rpcs.list_provisioning_quotas.retry_policy
3706
+
3707
+ options.apply_defaults timeout: @config.timeout,
3708
+ metadata: @config.metadata,
3709
+ retry_policy: @config.retry_policy
3710
+
3711
+ @bare_metal_solution_stub.call_rpc :list_provisioning_quotas, request, options: options do |response, operation|
3712
+ response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_provisioning_quotas, request, response, operation, options
3713
+ yield response, operation if block_given?
3714
+ return response
3715
+ end
3716
+ rescue ::GRPC::BadStatus => e
3717
+ raise ::Google::Cloud::Error.from_error(e)
3718
+ end
3719
+
3720
+ ##
3721
+ # Submit a provisiong configuration for a given project.
3722
+ #
3723
+ # @overload submit_provisioning_config(request, options = nil)
3724
+ # Pass arguments to `submit_provisioning_config` via a request object, either of type
3725
+ # {::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest} or an equivalent Hash.
3726
+ #
3727
+ # @param request [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest, ::Hash]
3728
+ # A request object representing the call parameters. Required. To specify no
3729
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3730
+ # @param options [::Gapic::CallOptions, ::Hash]
3731
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3732
+ #
3733
+ # @overload submit_provisioning_config(parent: nil, provisioning_config: nil, email: nil)
3734
+ # Pass arguments to `submit_provisioning_config` via keyword arguments. Note that at
3735
+ # least one keyword argument is required. To specify no parameters, or to keep all
3736
+ # the default parameter values, pass an empty Hash as a request object (see above).
3737
+ #
3738
+ # @param parent [::String]
3739
+ # Required. The parent project and location containing the
3740
+ # ProvisioningConfig.
3741
+ # @param provisioning_config [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig, ::Hash]
3742
+ # Required. The ProvisioningConfig to create.
3743
+ # @param email [::String]
3744
+ # Optional. Email provided to send a confirmation with provisioning config
3745
+ # to.
3746
+ #
3747
+ # @yield [response, operation] Access the result along with the RPC operation
3748
+ # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse]
3749
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3750
+ #
3751
+ # @return [::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse]
3752
+ #
3753
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3754
+ #
3755
+ # @example Basic example
3756
+ # require "google/cloud/bare_metal_solution/v2"
3757
+ #
3758
+ # # Create a client object. The client can be reused for multiple calls.
3759
+ # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
3760
+ #
3761
+ # # Create a request. To set request fields, pass in keyword arguments.
3762
+ # request = Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest.new
3763
+ #
3764
+ # # Call the submit_provisioning_config method.
3765
+ # result = client.submit_provisioning_config request
3766
+ #
3767
+ # # The returned object is of type Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigResponse.
3768
+ # p result
3769
+ #
3770
+ def submit_provisioning_config request, options = nil
1564
3771
  raise ::ArgumentError, "request must be provided" if request.nil?
1565
3772
 
1566
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest
3773
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::SubmitProvisioningConfigRequest
1567
3774
 
1568
3775
  # Converts hash and nil to an options object
1569
3776
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1570
3777
 
1571
3778
  # Customize the options with defaults
1572
- metadata = @config.rpcs.update_network.metadata.to_h
3779
+ metadata = @config.rpcs.submit_provisioning_config.metadata.to_h
1573
3780
 
1574
3781
  # Set x-goog-api-client and x-goog-user-project headers
1575
3782
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1578,23 +3785,22 @@ module Google
1578
3785
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1579
3786
 
1580
3787
  header_params = {}
1581
- if request.network&.name
1582
- header_params["network.name"] = request.network.name
3788
+ if request.parent
3789
+ header_params["parent"] = request.parent
1583
3790
  end
1584
3791
 
1585
3792
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1586
3793
  metadata[:"x-goog-request-params"] ||= request_params_header
1587
3794
 
1588
- options.apply_defaults timeout: @config.rpcs.update_network.timeout,
3795
+ options.apply_defaults timeout: @config.rpcs.submit_provisioning_config.timeout,
1589
3796
  metadata: metadata,
1590
- retry_policy: @config.rpcs.update_network.retry_policy
3797
+ retry_policy: @config.rpcs.submit_provisioning_config.retry_policy
1591
3798
 
1592
3799
  options.apply_defaults timeout: @config.timeout,
1593
3800
  metadata: @config.metadata,
1594
3801
  retry_policy: @config.retry_policy
1595
3802
 
1596
- @bare_metal_solution_stub.call_rpc :update_network, request, options: options do |response, operation|
1597
- response = ::Gapic::Operation.new response, @operations_client, options: options
3803
+ @bare_metal_solution_stub.call_rpc :submit_provisioning_config, request, options: options do |response, operation|
1598
3804
  yield response, operation if block_given?
1599
3805
  return response
1600
3806
  end
@@ -1603,31 +3809,31 @@ module Google
1603
3809
  end
1604
3810
 
1605
3811
  ##
1606
- # Get details of a single storage logical unit number(LUN).
3812
+ # Get ProvisioningConfig by name.
1607
3813
  #
1608
- # @overload get_lun(request, options = nil)
1609
- # Pass arguments to `get_lun` via a request object, either of type
1610
- # {::Google::Cloud::BareMetalSolution::V2::GetLunRequest} or an equivalent Hash.
3814
+ # @overload get_provisioning_config(request, options = nil)
3815
+ # Pass arguments to `get_provisioning_config` via a request object, either of type
3816
+ # {::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest} or an equivalent Hash.
1611
3817
  #
1612
- # @param request [::Google::Cloud::BareMetalSolution::V2::GetLunRequest, ::Hash]
3818
+ # @param request [::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest, ::Hash]
1613
3819
  # A request object representing the call parameters. Required. To specify no
1614
3820
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1615
3821
  # @param options [::Gapic::CallOptions, ::Hash]
1616
3822
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1617
3823
  #
1618
- # @overload get_lun(name: nil)
1619
- # Pass arguments to `get_lun` via keyword arguments. Note that at
3824
+ # @overload get_provisioning_config(name: nil)
3825
+ # Pass arguments to `get_provisioning_config` via keyword arguments. Note that at
1620
3826
  # least one keyword argument is required. To specify no parameters, or to keep all
1621
3827
  # the default parameter values, pass an empty Hash as a request object (see above).
1622
3828
  #
1623
3829
  # @param name [::String]
1624
- # Required. Name of the resource.
3830
+ # Required. Name of the ProvisioningConfig.
1625
3831
  #
1626
3832
  # @yield [response, operation] Access the result along with the RPC operation
1627
- # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::Lun]
3833
+ # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig]
1628
3834
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
1629
3835
  #
1630
- # @return [::Google::Cloud::BareMetalSolution::V2::Lun]
3836
+ # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig]
1631
3837
  #
1632
3838
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1633
3839
  #
@@ -1638,24 +3844,24 @@ module Google
1638
3844
  # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
1639
3845
  #
1640
3846
  # # Create a request. To set request fields, pass in keyword arguments.
1641
- # request = Google::Cloud::BareMetalSolution::V2::GetLunRequest.new
3847
+ # request = Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest.new
1642
3848
  #
1643
- # # Call the get_lun method.
1644
- # result = client.get_lun request
3849
+ # # Call the get_provisioning_config method.
3850
+ # result = client.get_provisioning_config request
1645
3851
  #
1646
- # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Lun.
3852
+ # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.
1647
3853
  # p result
1648
3854
  #
1649
- def get_lun request, options = nil
3855
+ def get_provisioning_config request, options = nil
1650
3856
  raise ::ArgumentError, "request must be provided" if request.nil?
1651
3857
 
1652
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetLunRequest
3858
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetProvisioningConfigRequest
1653
3859
 
1654
3860
  # Converts hash and nil to an options object
1655
3861
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1656
3862
 
1657
3863
  # Customize the options with defaults
1658
- metadata = @config.rpcs.get_lun.metadata.to_h
3864
+ metadata = @config.rpcs.get_provisioning_config.metadata.to_h
1659
3865
 
1660
3866
  # Set x-goog-api-client and x-goog-user-project headers
1661
3867
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1671,15 +3877,15 @@ module Google
1671
3877
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1672
3878
  metadata[:"x-goog-request-params"] ||= request_params_header
1673
3879
 
1674
- options.apply_defaults timeout: @config.rpcs.get_lun.timeout,
3880
+ options.apply_defaults timeout: @config.rpcs.get_provisioning_config.timeout,
1675
3881
  metadata: metadata,
1676
- retry_policy: @config.rpcs.get_lun.retry_policy
3882
+ retry_policy: @config.rpcs.get_provisioning_config.retry_policy
1677
3883
 
1678
3884
  options.apply_defaults timeout: @config.timeout,
1679
3885
  metadata: @config.metadata,
1680
3886
  retry_policy: @config.retry_policy
1681
3887
 
1682
- @bare_metal_solution_stub.call_rpc :get_lun, request, options: options do |response, operation|
3888
+ @bare_metal_solution_stub.call_rpc :get_provisioning_config, request, options: options do |response, operation|
1683
3889
  yield response, operation if block_given?
1684
3890
  return response
1685
3891
  end
@@ -1688,36 +3894,37 @@ module Google
1688
3894
  end
1689
3895
 
1690
3896
  ##
1691
- # List storage volume luns for given storage volume.
3897
+ # Create new ProvisioningConfig.
1692
3898
  #
1693
- # @overload list_luns(request, options = nil)
1694
- # Pass arguments to `list_luns` via a request object, either of type
1695
- # {::Google::Cloud::BareMetalSolution::V2::ListLunsRequest} or an equivalent Hash.
3899
+ # @overload create_provisioning_config(request, options = nil)
3900
+ # Pass arguments to `create_provisioning_config` via a request object, either of type
3901
+ # {::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest} or an equivalent Hash.
1696
3902
  #
1697
- # @param request [::Google::Cloud::BareMetalSolution::V2::ListLunsRequest, ::Hash]
3903
+ # @param request [::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest, ::Hash]
1698
3904
  # A request object representing the call parameters. Required. To specify no
1699
3905
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1700
3906
  # @param options [::Gapic::CallOptions, ::Hash]
1701
3907
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1702
3908
  #
1703
- # @overload list_luns(parent: nil, page_size: nil, page_token: nil)
1704
- # Pass arguments to `list_luns` via keyword arguments. Note that at
3909
+ # @overload create_provisioning_config(parent: nil, provisioning_config: nil, email: nil)
3910
+ # Pass arguments to `create_provisioning_config` via keyword arguments. Note that at
1705
3911
  # least one keyword argument is required. To specify no parameters, or to keep all
1706
3912
  # the default parameter values, pass an empty Hash as a request object (see above).
1707
3913
  #
1708
3914
  # @param parent [::String]
1709
- # Required. Parent value for ListLunsRequest.
1710
- # @param page_size [::Integer]
1711
- # Requested page size. The server might return fewer items than requested.
1712
- # If unspecified, server will pick an appropriate default.
1713
- # @param page_token [::String]
1714
- # A token identifying a page of results from the server.
3915
+ # Required. The parent project and location containing the
3916
+ # ProvisioningConfig.
3917
+ # @param provisioning_config [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig, ::Hash]
3918
+ # Required. The ProvisioningConfig to create.
3919
+ # @param email [::String]
3920
+ # Optional. Email provided to send a confirmation with provisioning config
3921
+ # to.
1715
3922
  #
1716
3923
  # @yield [response, operation] Access the result along with the RPC operation
1717
- # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>]
3924
+ # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig]
1718
3925
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
1719
3926
  #
1720
- # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::Lun>]
3927
+ # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig]
1721
3928
  #
1722
3929
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1723
3930
  #
@@ -1728,28 +3935,24 @@ module Google
1728
3935
  # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
1729
3936
  #
1730
3937
  # # Create a request. To set request fields, pass in keyword arguments.
1731
- # request = Google::Cloud::BareMetalSolution::V2::ListLunsRequest.new
3938
+ # request = Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest.new
1732
3939
  #
1733
- # # Call the list_luns method.
1734
- # result = client.list_luns request
3940
+ # # Call the create_provisioning_config method.
3941
+ # result = client.create_provisioning_config request
1735
3942
  #
1736
- # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1737
- # # over elements, and API calls will be issued to fetch pages as needed.
1738
- # result.each do |item|
1739
- # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::Lun.
1740
- # p item
1741
- # end
3943
+ # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.
3944
+ # p result
1742
3945
  #
1743
- def list_luns request, options = nil
3946
+ def create_provisioning_config request, options = nil
1744
3947
  raise ::ArgumentError, "request must be provided" if request.nil?
1745
3948
 
1746
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListLunsRequest
3949
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::CreateProvisioningConfigRequest
1747
3950
 
1748
3951
  # Converts hash and nil to an options object
1749
3952
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1750
3953
 
1751
3954
  # Customize the options with defaults
1752
- metadata = @config.rpcs.list_luns.metadata.to_h
3955
+ metadata = @config.rpcs.create_provisioning_config.metadata.to_h
1753
3956
 
1754
3957
  # Set x-goog-api-client and x-goog-user-project headers
1755
3958
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1765,16 +3968,15 @@ module Google
1765
3968
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1766
3969
  metadata[:"x-goog-request-params"] ||= request_params_header
1767
3970
 
1768
- options.apply_defaults timeout: @config.rpcs.list_luns.timeout,
3971
+ options.apply_defaults timeout: @config.rpcs.create_provisioning_config.timeout,
1769
3972
  metadata: metadata,
1770
- retry_policy: @config.rpcs.list_luns.retry_policy
3973
+ retry_policy: @config.rpcs.create_provisioning_config.retry_policy
1771
3974
 
1772
3975
  options.apply_defaults timeout: @config.timeout,
1773
3976
  metadata: @config.metadata,
1774
3977
  retry_policy: @config.retry_policy
1775
3978
 
1776
- @bare_metal_solution_stub.call_rpc :list_luns, request, options: options do |response, operation|
1777
- response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_luns, request, response, operation, options
3979
+ @bare_metal_solution_stub.call_rpc :create_provisioning_config, request, options: options do |response, operation|
1778
3980
  yield response, operation if block_given?
1779
3981
  return response
1780
3982
  end
@@ -1783,31 +3985,36 @@ module Google
1783
3985
  end
1784
3986
 
1785
3987
  ##
1786
- # Get details of a single NFS share.
3988
+ # Update existing ProvisioningConfig.
1787
3989
  #
1788
- # @overload get_nfs_share(request, options = nil)
1789
- # Pass arguments to `get_nfs_share` via a request object, either of type
1790
- # {::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest} or an equivalent Hash.
3990
+ # @overload update_provisioning_config(request, options = nil)
3991
+ # Pass arguments to `update_provisioning_config` via a request object, either of type
3992
+ # {::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest} or an equivalent Hash.
1791
3993
  #
1792
- # @param request [::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest, ::Hash]
3994
+ # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest, ::Hash]
1793
3995
  # A request object representing the call parameters. Required. To specify no
1794
3996
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1795
3997
  # @param options [::Gapic::CallOptions, ::Hash]
1796
3998
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1797
3999
  #
1798
- # @overload get_nfs_share(name: nil)
1799
- # Pass arguments to `get_nfs_share` via keyword arguments. Note that at
4000
+ # @overload update_provisioning_config(provisioning_config: nil, update_mask: nil, email: nil)
4001
+ # Pass arguments to `update_provisioning_config` via keyword arguments. Note that at
1800
4002
  # least one keyword argument is required. To specify no parameters, or to keep all
1801
4003
  # the default parameter values, pass an empty Hash as a request object (see above).
1802
4004
  #
1803
- # @param name [::String]
1804
- # Required. Name of the resource.
4005
+ # @param provisioning_config [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig, ::Hash]
4006
+ # Required. The ProvisioningConfig to update.
4007
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
4008
+ # Required. The list of fields to update.
4009
+ # @param email [::String]
4010
+ # Optional. Email provided to send a confirmation with provisioning config
4011
+ # to.
1805
4012
  #
1806
4013
  # @yield [response, operation] Access the result along with the RPC operation
1807
- # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::NfsShare]
4014
+ # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig]
1808
4015
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
1809
4016
  #
1810
- # @return [::Google::Cloud::BareMetalSolution::V2::NfsShare]
4017
+ # @return [::Google::Cloud::BareMetalSolution::V2::ProvisioningConfig]
1811
4018
  #
1812
4019
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1813
4020
  #
@@ -1818,24 +4025,24 @@ module Google
1818
4025
  # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
1819
4026
  #
1820
4027
  # # Create a request. To set request fields, pass in keyword arguments.
1821
- # request = Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest.new
4028
+ # request = Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest.new
1822
4029
  #
1823
- # # Call the get_nfs_share method.
1824
- # result = client.get_nfs_share request
4030
+ # # Call the update_provisioning_config method.
4031
+ # result = client.update_provisioning_config request
1825
4032
  #
1826
- # # The returned object is of type Google::Cloud::BareMetalSolution::V2::NfsShare.
4033
+ # # The returned object is of type Google::Cloud::BareMetalSolution::V2::ProvisioningConfig.
1827
4034
  # p result
1828
4035
  #
1829
- def get_nfs_share request, options = nil
4036
+ def update_provisioning_config request, options = nil
1830
4037
  raise ::ArgumentError, "request must be provided" if request.nil?
1831
4038
 
1832
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest
4039
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateProvisioningConfigRequest
1833
4040
 
1834
4041
  # Converts hash and nil to an options object
1835
4042
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1836
4043
 
1837
4044
  # Customize the options with defaults
1838
- metadata = @config.rpcs.get_nfs_share.metadata.to_h
4045
+ metadata = @config.rpcs.update_provisioning_config.metadata.to_h
1839
4046
 
1840
4047
  # Set x-goog-api-client and x-goog-user-project headers
1841
4048
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1844,22 +4051,22 @@ module Google
1844
4051
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1845
4052
 
1846
4053
  header_params = {}
1847
- if request.name
1848
- header_params["name"] = request.name
4054
+ if request.provisioning_config&.name
4055
+ header_params["provisioning_config.name"] = request.provisioning_config.name
1849
4056
  end
1850
4057
 
1851
4058
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1852
4059
  metadata[:"x-goog-request-params"] ||= request_params_header
1853
4060
 
1854
- options.apply_defaults timeout: @config.rpcs.get_nfs_share.timeout,
4061
+ options.apply_defaults timeout: @config.rpcs.update_provisioning_config.timeout,
1855
4062
  metadata: metadata,
1856
- retry_policy: @config.rpcs.get_nfs_share.retry_policy
4063
+ retry_policy: @config.rpcs.update_provisioning_config.retry_policy
1857
4064
 
1858
4065
  options.apply_defaults timeout: @config.timeout,
1859
4066
  metadata: @config.metadata,
1860
4067
  retry_policy: @config.retry_policy
1861
4068
 
1862
- @bare_metal_solution_stub.call_rpc :get_nfs_share, request, options: options do |response, operation|
4069
+ @bare_metal_solution_stub.call_rpc :update_provisioning_config, request, options: options do |response, operation|
1863
4070
  yield response, operation if block_given?
1864
4071
  return response
1865
4072
  end
@@ -1868,38 +4075,35 @@ module Google
1868
4075
  end
1869
4076
 
1870
4077
  ##
1871
- # List NFS shares.
4078
+ # RenameNetwork sets a new name for a network.
4079
+ # Use with caution, previous names become immediately invalidated.
1872
4080
  #
1873
- # @overload list_nfs_shares(request, options = nil)
1874
- # Pass arguments to `list_nfs_shares` via a request object, either of type
1875
- # {::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest} or an equivalent Hash.
4081
+ # @overload rename_network(request, options = nil)
4082
+ # Pass arguments to `rename_network` via a request object, either of type
4083
+ # {::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest} or an equivalent Hash.
1876
4084
  #
1877
- # @param request [::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest, ::Hash]
4085
+ # @param request [::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest, ::Hash]
1878
4086
  # A request object representing the call parameters. Required. To specify no
1879
4087
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1880
4088
  # @param options [::Gapic::CallOptions, ::Hash]
1881
4089
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1882
4090
  #
1883
- # @overload list_nfs_shares(parent: nil, page_size: nil, page_token: nil, filter: nil)
1884
- # Pass arguments to `list_nfs_shares` via keyword arguments. Note that at
4091
+ # @overload rename_network(name: nil, new_network_id: nil)
4092
+ # Pass arguments to `rename_network` via keyword arguments. Note that at
1885
4093
  # least one keyword argument is required. To specify no parameters, or to keep all
1886
4094
  # the default parameter values, pass an empty Hash as a request object (see above).
1887
4095
  #
1888
- # @param parent [::String]
1889
- # Required. Parent value for ListNfsSharesRequest.
1890
- # @param page_size [::Integer]
1891
- # Requested page size. The server might return fewer items than requested.
1892
- # If unspecified, server will pick an appropriate default.
1893
- # @param page_token [::String]
1894
- # A token identifying a page of results from the server.
1895
- # @param filter [::String]
1896
- # List filter.
4096
+ # @param name [::String]
4097
+ # Required. The `name` field is used to identify the network.
4098
+ # Format: projects/\\{project}/locations/\\{location}/networks/\\{network}
4099
+ # @param new_network_id [::String]
4100
+ # Required. The new `id` of the network.
1897
4101
  #
1898
4102
  # @yield [response, operation] Access the result along with the RPC operation
1899
- # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>]
4103
+ # @yieldparam response [::Google::Cloud::BareMetalSolution::V2::Network]
1900
4104
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
1901
4105
  #
1902
- # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::NfsShare>]
4106
+ # @return [::Google::Cloud::BareMetalSolution::V2::Network]
1903
4107
  #
1904
4108
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1905
4109
  #
@@ -1910,28 +4114,24 @@ module Google
1910
4114
  # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
1911
4115
  #
1912
4116
  # # Create a request. To set request fields, pass in keyword arguments.
1913
- # request = Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest.new
4117
+ # request = Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest.new
1914
4118
  #
1915
- # # Call the list_nfs_shares method.
1916
- # result = client.list_nfs_shares request
4119
+ # # Call the rename_network method.
4120
+ # result = client.rename_network request
1917
4121
  #
1918
- # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1919
- # # over elements, and API calls will be issued to fetch pages as needed.
1920
- # result.each do |item|
1921
- # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::NfsShare.
1922
- # p item
1923
- # end
4122
+ # # The returned object is of type Google::Cloud::BareMetalSolution::V2::Network.
4123
+ # p result
1924
4124
  #
1925
- def list_nfs_shares request, options = nil
4125
+ def rename_network request, options = nil
1926
4126
  raise ::ArgumentError, "request must be provided" if request.nil?
1927
4127
 
1928
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest
4128
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::RenameNetworkRequest
1929
4129
 
1930
4130
  # Converts hash and nil to an options object
1931
4131
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1932
4132
 
1933
4133
  # Customize the options with defaults
1934
- metadata = @config.rpcs.list_nfs_shares.metadata.to_h
4134
+ metadata = @config.rpcs.rename_network.metadata.to_h
1935
4135
 
1936
4136
  # Set x-goog-api-client and x-goog-user-project headers
1937
4137
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1940,23 +4140,22 @@ module Google
1940
4140
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1941
4141
 
1942
4142
  header_params = {}
1943
- if request.parent
1944
- header_params["parent"] = request.parent
4143
+ if request.name
4144
+ header_params["name"] = request.name
1945
4145
  end
1946
4146
 
1947
4147
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1948
4148
  metadata[:"x-goog-request-params"] ||= request_params_header
1949
4149
 
1950
- options.apply_defaults timeout: @config.rpcs.list_nfs_shares.timeout,
4150
+ options.apply_defaults timeout: @config.rpcs.rename_network.timeout,
1951
4151
  metadata: metadata,
1952
- retry_policy: @config.rpcs.list_nfs_shares.retry_policy
4152
+ retry_policy: @config.rpcs.rename_network.retry_policy
1953
4153
 
1954
4154
  options.apply_defaults timeout: @config.timeout,
1955
4155
  metadata: @config.metadata,
1956
4156
  retry_policy: @config.retry_policy
1957
4157
 
1958
- @bare_metal_solution_stub.call_rpc :list_nfs_shares, request, options: options do |response, operation|
1959
- response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_nfs_shares, request, response, operation, options
4158
+ @bare_metal_solution_stub.call_rpc :rename_network, request, options: options do |response, operation|
1960
4159
  yield response, operation if block_given?
1961
4160
  return response
1962
4161
  end
@@ -1965,38 +4164,38 @@ module Google
1965
4164
  end
1966
4165
 
1967
4166
  ##
1968
- # Update details of a single NFS share.
4167
+ # Retrieves the list of OS images which are currently approved.
1969
4168
  #
1970
- # @overload update_nfs_share(request, options = nil)
1971
- # Pass arguments to `update_nfs_share` via a request object, either of type
1972
- # {::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest} or an equivalent Hash.
4169
+ # @overload list_os_images(request, options = nil)
4170
+ # Pass arguments to `list_os_images` via a request object, either of type
4171
+ # {::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest} or an equivalent Hash.
1973
4172
  #
1974
- # @param request [::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest, ::Hash]
4173
+ # @param request [::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest, ::Hash]
1975
4174
  # A request object representing the call parameters. Required. To specify no
1976
4175
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1977
4176
  # @param options [::Gapic::CallOptions, ::Hash]
1978
4177
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1979
4178
  #
1980
- # @overload update_nfs_share(nfs_share: nil, update_mask: nil)
1981
- # Pass arguments to `update_nfs_share` via keyword arguments. Note that at
4179
+ # @overload list_os_images(parent: nil, page_size: nil, page_token: nil)
4180
+ # Pass arguments to `list_os_images` via keyword arguments. Note that at
1982
4181
  # least one keyword argument is required. To specify no parameters, or to keep all
1983
4182
  # the default parameter values, pass an empty Hash as a request object (see above).
1984
4183
  #
1985
- # @param nfs_share [::Google::Cloud::BareMetalSolution::V2::NfsShare, ::Hash]
1986
- # Required. The NFS share to update.
1987
- #
1988
- # The `name` field is used to identify the NFS share to update.
1989
- # Format: projects/\\{project}/locations/\\{location}/nfsShares/\\{nfs_share}
1990
- # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1991
- # The list of fields to update.
1992
- # The only currently supported fields are:
1993
- # `labels`
4184
+ # @param parent [::String]
4185
+ # Required. Parent value for ListProvisioningQuotasRequest.
4186
+ # @param page_size [::Integer]
4187
+ # Requested page size. The server might return fewer items than requested.
4188
+ # If unspecified, server will pick an appropriate default.
4189
+ # Notice that page_size field is not supported and won't be respected in
4190
+ # the API request for now, will be updated when pagination is supported.
4191
+ # @param page_token [::String]
4192
+ # A token identifying a page of results from the server.
1994
4193
  #
1995
4194
  # @yield [response, operation] Access the result along with the RPC operation
1996
- # @yieldparam response [::Gapic::Operation]
4195
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::OSImage>]
1997
4196
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
1998
4197
  #
1999
- # @return [::Gapic::Operation]
4198
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::BareMetalSolution::V2::OSImage>]
2000
4199
  #
2001
4200
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2002
4201
  #
@@ -2007,31 +4206,28 @@ module Google
2007
4206
  # client = Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Client.new
2008
4207
  #
2009
4208
  # # Create a request. To set request fields, pass in keyword arguments.
2010
- # request = Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest.new
4209
+ # request = Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest.new
2011
4210
  #
2012
- # # Call the update_nfs_share method.
2013
- # result = client.update_nfs_share request
4211
+ # # Call the list_os_images method.
4212
+ # result = client.list_os_images request
2014
4213
  #
2015
- # # The returned object is of type Gapic::Operation. You can use it to
2016
- # # check the status of an operation, cancel it, or wait for results.
2017
- # # Here is how to wait for a response.
2018
- # result.wait_until_done! timeout: 60
2019
- # if result.response?
2020
- # p result.response
2021
- # else
2022
- # puts "No response received."
4214
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
4215
+ # # over elements, and API calls will be issued to fetch pages as needed.
4216
+ # result.each do |item|
4217
+ # # Each element is of type ::Google::Cloud::BareMetalSolution::V2::OSImage.
4218
+ # p item
2023
4219
  # end
2024
4220
  #
2025
- def update_nfs_share request, options = nil
4221
+ def list_os_images request, options = nil
2026
4222
  raise ::ArgumentError, "request must be provided" if request.nil?
2027
4223
 
2028
- request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest
4224
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListOSImagesRequest
2029
4225
 
2030
4226
  # Converts hash and nil to an options object
2031
4227
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2032
4228
 
2033
4229
  # Customize the options with defaults
2034
- metadata = @config.rpcs.update_nfs_share.metadata.to_h
4230
+ metadata = @config.rpcs.list_os_images.metadata.to_h
2035
4231
 
2036
4232
  # Set x-goog-api-client and x-goog-user-project headers
2037
4233
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2040,23 +4236,23 @@ module Google
2040
4236
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2041
4237
 
2042
4238
  header_params = {}
2043
- if request.nfs_share&.name
2044
- header_params["nfs_share.name"] = request.nfs_share.name
4239
+ if request.parent
4240
+ header_params["parent"] = request.parent
2045
4241
  end
2046
4242
 
2047
4243
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2048
4244
  metadata[:"x-goog-request-params"] ||= request_params_header
2049
4245
 
2050
- options.apply_defaults timeout: @config.rpcs.update_nfs_share.timeout,
4246
+ options.apply_defaults timeout: @config.rpcs.list_os_images.timeout,
2051
4247
  metadata: metadata,
2052
- retry_policy: @config.rpcs.update_nfs_share.retry_policy
4248
+ retry_policy: @config.rpcs.list_os_images.retry_policy
2053
4249
 
2054
4250
  options.apply_defaults timeout: @config.timeout,
2055
4251
  metadata: @config.metadata,
2056
4252
  retry_policy: @config.retry_policy
2057
4253
 
2058
- @bare_metal_solution_stub.call_rpc :update_nfs_share, request, options: options do |response, operation|
2059
- response = ::Gapic::Operation.new response, @operations_client, options: options
4254
+ @bare_metal_solution_stub.call_rpc :list_os_images, request, options: options do |response, operation|
4255
+ response = ::Gapic::PagedEnumerable.new @bare_metal_solution_stub, :list_os_images, request, response, operation, options
2060
4256
  yield response, operation if block_given?
2061
4257
  return response
2062
4258
  end
@@ -2217,6 +4413,11 @@ module Google
2217
4413
  #
2218
4414
  attr_reader :update_instance
2219
4415
  ##
4416
+ # RPC-specific configuration for `rename_instance`
4417
+ # @return [::Gapic::Config::Method]
4418
+ #
4419
+ attr_reader :rename_instance
4420
+ ##
2220
4421
  # RPC-specific configuration for `reset_instance`
2221
4422
  # @return [::Gapic::Config::Method]
2222
4423
  #
@@ -2232,11 +4433,36 @@ module Google
2232
4433
  #
2233
4434
  attr_reader :stop_instance
2234
4435
  ##
4436
+ # RPC-specific configuration for `enable_interactive_serial_console`
4437
+ # @return [::Gapic::Config::Method]
4438
+ #
4439
+ attr_reader :enable_interactive_serial_console
4440
+ ##
4441
+ # RPC-specific configuration for `disable_interactive_serial_console`
4442
+ # @return [::Gapic::Config::Method]
4443
+ #
4444
+ attr_reader :disable_interactive_serial_console
4445
+ ##
2235
4446
  # RPC-specific configuration for `detach_lun`
2236
4447
  # @return [::Gapic::Config::Method]
2237
4448
  #
2238
4449
  attr_reader :detach_lun
2239
4450
  ##
4451
+ # RPC-specific configuration for `list_ssh_keys`
4452
+ # @return [::Gapic::Config::Method]
4453
+ #
4454
+ attr_reader :list_ssh_keys
4455
+ ##
4456
+ # RPC-specific configuration for `create_ssh_key`
4457
+ # @return [::Gapic::Config::Method]
4458
+ #
4459
+ attr_reader :create_ssh_key
4460
+ ##
4461
+ # RPC-specific configuration for `delete_ssh_key`
4462
+ # @return [::Gapic::Config::Method]
4463
+ #
4464
+ attr_reader :delete_ssh_key
4465
+ ##
2240
4466
  # RPC-specific configuration for `list_volumes`
2241
4467
  # @return [::Gapic::Config::Method]
2242
4468
  #
@@ -2252,6 +4478,16 @@ module Google
2252
4478
  #
2253
4479
  attr_reader :update_volume
2254
4480
  ##
4481
+ # RPC-specific configuration for `rename_volume`
4482
+ # @return [::Gapic::Config::Method]
4483
+ #
4484
+ attr_reader :rename_volume
4485
+ ##
4486
+ # RPC-specific configuration for `evict_volume`
4487
+ # @return [::Gapic::Config::Method]
4488
+ #
4489
+ attr_reader :evict_volume
4490
+ ##
2255
4491
  # RPC-specific configuration for `resize_volume`
2256
4492
  # @return [::Gapic::Config::Method]
2257
4493
  #
@@ -2277,6 +4513,31 @@ module Google
2277
4513
  #
2278
4514
  attr_reader :update_network
2279
4515
  ##
4516
+ # RPC-specific configuration for `create_volume_snapshot`
4517
+ # @return [::Gapic::Config::Method]
4518
+ #
4519
+ attr_reader :create_volume_snapshot
4520
+ ##
4521
+ # RPC-specific configuration for `restore_volume_snapshot`
4522
+ # @return [::Gapic::Config::Method]
4523
+ #
4524
+ attr_reader :restore_volume_snapshot
4525
+ ##
4526
+ # RPC-specific configuration for `delete_volume_snapshot`
4527
+ # @return [::Gapic::Config::Method]
4528
+ #
4529
+ attr_reader :delete_volume_snapshot
4530
+ ##
4531
+ # RPC-specific configuration for `get_volume_snapshot`
4532
+ # @return [::Gapic::Config::Method]
4533
+ #
4534
+ attr_reader :get_volume_snapshot
4535
+ ##
4536
+ # RPC-specific configuration for `list_volume_snapshots`
4537
+ # @return [::Gapic::Config::Method]
4538
+ #
4539
+ attr_reader :list_volume_snapshots
4540
+ ##
2280
4541
  # RPC-specific configuration for `get_lun`
2281
4542
  # @return [::Gapic::Config::Method]
2282
4543
  #
@@ -2287,6 +4548,11 @@ module Google
2287
4548
  #
2288
4549
  attr_reader :list_luns
2289
4550
  ##
4551
+ # RPC-specific configuration for `evict_lun`
4552
+ # @return [::Gapic::Config::Method]
4553
+ #
4554
+ attr_reader :evict_lun
4555
+ ##
2290
4556
  # RPC-specific configuration for `get_nfs_share`
2291
4557
  # @return [::Gapic::Config::Method]
2292
4558
  #
@@ -2301,6 +4567,56 @@ module Google
2301
4567
  # @return [::Gapic::Config::Method]
2302
4568
  #
2303
4569
  attr_reader :update_nfs_share
4570
+ ##
4571
+ # RPC-specific configuration for `create_nfs_share`
4572
+ # @return [::Gapic::Config::Method]
4573
+ #
4574
+ attr_reader :create_nfs_share
4575
+ ##
4576
+ # RPC-specific configuration for `rename_nfs_share`
4577
+ # @return [::Gapic::Config::Method]
4578
+ #
4579
+ attr_reader :rename_nfs_share
4580
+ ##
4581
+ # RPC-specific configuration for `delete_nfs_share`
4582
+ # @return [::Gapic::Config::Method]
4583
+ #
4584
+ attr_reader :delete_nfs_share
4585
+ ##
4586
+ # RPC-specific configuration for `list_provisioning_quotas`
4587
+ # @return [::Gapic::Config::Method]
4588
+ #
4589
+ attr_reader :list_provisioning_quotas
4590
+ ##
4591
+ # RPC-specific configuration for `submit_provisioning_config`
4592
+ # @return [::Gapic::Config::Method]
4593
+ #
4594
+ attr_reader :submit_provisioning_config
4595
+ ##
4596
+ # RPC-specific configuration for `get_provisioning_config`
4597
+ # @return [::Gapic::Config::Method]
4598
+ #
4599
+ attr_reader :get_provisioning_config
4600
+ ##
4601
+ # RPC-specific configuration for `create_provisioning_config`
4602
+ # @return [::Gapic::Config::Method]
4603
+ #
4604
+ attr_reader :create_provisioning_config
4605
+ ##
4606
+ # RPC-specific configuration for `update_provisioning_config`
4607
+ # @return [::Gapic::Config::Method]
4608
+ #
4609
+ attr_reader :update_provisioning_config
4610
+ ##
4611
+ # RPC-specific configuration for `rename_network`
4612
+ # @return [::Gapic::Config::Method]
4613
+ #
4614
+ attr_reader :rename_network
4615
+ ##
4616
+ # RPC-specific configuration for `list_os_images`
4617
+ # @return [::Gapic::Config::Method]
4618
+ #
4619
+ attr_reader :list_os_images
2304
4620
 
2305
4621
  # @private
2306
4622
  def initialize parent_rpcs = nil
@@ -2310,20 +4626,36 @@ module Google
2310
4626
  @get_instance = ::Gapic::Config::Method.new get_instance_config
2311
4627
  update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance
2312
4628
  @update_instance = ::Gapic::Config::Method.new update_instance_config
4629
+ rename_instance_config = parent_rpcs.rename_instance if parent_rpcs.respond_to? :rename_instance
4630
+ @rename_instance = ::Gapic::Config::Method.new rename_instance_config
2313
4631
  reset_instance_config = parent_rpcs.reset_instance if parent_rpcs.respond_to? :reset_instance
2314
4632
  @reset_instance = ::Gapic::Config::Method.new reset_instance_config
2315
4633
  start_instance_config = parent_rpcs.start_instance if parent_rpcs.respond_to? :start_instance
2316
4634
  @start_instance = ::Gapic::Config::Method.new start_instance_config
2317
4635
  stop_instance_config = parent_rpcs.stop_instance if parent_rpcs.respond_to? :stop_instance
2318
4636
  @stop_instance = ::Gapic::Config::Method.new stop_instance_config
4637
+ enable_interactive_serial_console_config = parent_rpcs.enable_interactive_serial_console if parent_rpcs.respond_to? :enable_interactive_serial_console
4638
+ @enable_interactive_serial_console = ::Gapic::Config::Method.new enable_interactive_serial_console_config
4639
+ disable_interactive_serial_console_config = parent_rpcs.disable_interactive_serial_console if parent_rpcs.respond_to? :disable_interactive_serial_console
4640
+ @disable_interactive_serial_console = ::Gapic::Config::Method.new disable_interactive_serial_console_config
2319
4641
  detach_lun_config = parent_rpcs.detach_lun if parent_rpcs.respond_to? :detach_lun
2320
4642
  @detach_lun = ::Gapic::Config::Method.new detach_lun_config
4643
+ list_ssh_keys_config = parent_rpcs.list_ssh_keys if parent_rpcs.respond_to? :list_ssh_keys
4644
+ @list_ssh_keys = ::Gapic::Config::Method.new list_ssh_keys_config
4645
+ create_ssh_key_config = parent_rpcs.create_ssh_key if parent_rpcs.respond_to? :create_ssh_key
4646
+ @create_ssh_key = ::Gapic::Config::Method.new create_ssh_key_config
4647
+ delete_ssh_key_config = parent_rpcs.delete_ssh_key if parent_rpcs.respond_to? :delete_ssh_key
4648
+ @delete_ssh_key = ::Gapic::Config::Method.new delete_ssh_key_config
2321
4649
  list_volumes_config = parent_rpcs.list_volumes if parent_rpcs.respond_to? :list_volumes
2322
4650
  @list_volumes = ::Gapic::Config::Method.new list_volumes_config
2323
4651
  get_volume_config = parent_rpcs.get_volume if parent_rpcs.respond_to? :get_volume
2324
4652
  @get_volume = ::Gapic::Config::Method.new get_volume_config
2325
4653
  update_volume_config = parent_rpcs.update_volume if parent_rpcs.respond_to? :update_volume
2326
4654
  @update_volume = ::Gapic::Config::Method.new update_volume_config
4655
+ rename_volume_config = parent_rpcs.rename_volume if parent_rpcs.respond_to? :rename_volume
4656
+ @rename_volume = ::Gapic::Config::Method.new rename_volume_config
4657
+ evict_volume_config = parent_rpcs.evict_volume if parent_rpcs.respond_to? :evict_volume
4658
+ @evict_volume = ::Gapic::Config::Method.new evict_volume_config
2327
4659
  resize_volume_config = parent_rpcs.resize_volume if parent_rpcs.respond_to? :resize_volume
2328
4660
  @resize_volume = ::Gapic::Config::Method.new resize_volume_config
2329
4661
  list_networks_config = parent_rpcs.list_networks if parent_rpcs.respond_to? :list_networks
@@ -2334,16 +4666,48 @@ module Google
2334
4666
  @get_network = ::Gapic::Config::Method.new get_network_config
2335
4667
  update_network_config = parent_rpcs.update_network if parent_rpcs.respond_to? :update_network
2336
4668
  @update_network = ::Gapic::Config::Method.new update_network_config
4669
+ create_volume_snapshot_config = parent_rpcs.create_volume_snapshot if parent_rpcs.respond_to? :create_volume_snapshot
4670
+ @create_volume_snapshot = ::Gapic::Config::Method.new create_volume_snapshot_config
4671
+ restore_volume_snapshot_config = parent_rpcs.restore_volume_snapshot if parent_rpcs.respond_to? :restore_volume_snapshot
4672
+ @restore_volume_snapshot = ::Gapic::Config::Method.new restore_volume_snapshot_config
4673
+ delete_volume_snapshot_config = parent_rpcs.delete_volume_snapshot if parent_rpcs.respond_to? :delete_volume_snapshot
4674
+ @delete_volume_snapshot = ::Gapic::Config::Method.new delete_volume_snapshot_config
4675
+ get_volume_snapshot_config = parent_rpcs.get_volume_snapshot if parent_rpcs.respond_to? :get_volume_snapshot
4676
+ @get_volume_snapshot = ::Gapic::Config::Method.new get_volume_snapshot_config
4677
+ list_volume_snapshots_config = parent_rpcs.list_volume_snapshots if parent_rpcs.respond_to? :list_volume_snapshots
4678
+ @list_volume_snapshots = ::Gapic::Config::Method.new list_volume_snapshots_config
2337
4679
  get_lun_config = parent_rpcs.get_lun if parent_rpcs.respond_to? :get_lun
2338
4680
  @get_lun = ::Gapic::Config::Method.new get_lun_config
2339
4681
  list_luns_config = parent_rpcs.list_luns if parent_rpcs.respond_to? :list_luns
2340
4682
  @list_luns = ::Gapic::Config::Method.new list_luns_config
4683
+ evict_lun_config = parent_rpcs.evict_lun if parent_rpcs.respond_to? :evict_lun
4684
+ @evict_lun = ::Gapic::Config::Method.new evict_lun_config
2341
4685
  get_nfs_share_config = parent_rpcs.get_nfs_share if parent_rpcs.respond_to? :get_nfs_share
2342
4686
  @get_nfs_share = ::Gapic::Config::Method.new get_nfs_share_config
2343
4687
  list_nfs_shares_config = parent_rpcs.list_nfs_shares if parent_rpcs.respond_to? :list_nfs_shares
2344
4688
  @list_nfs_shares = ::Gapic::Config::Method.new list_nfs_shares_config
2345
4689
  update_nfs_share_config = parent_rpcs.update_nfs_share if parent_rpcs.respond_to? :update_nfs_share
2346
4690
  @update_nfs_share = ::Gapic::Config::Method.new update_nfs_share_config
4691
+ create_nfs_share_config = parent_rpcs.create_nfs_share if parent_rpcs.respond_to? :create_nfs_share
4692
+ @create_nfs_share = ::Gapic::Config::Method.new create_nfs_share_config
4693
+ rename_nfs_share_config = parent_rpcs.rename_nfs_share if parent_rpcs.respond_to? :rename_nfs_share
4694
+ @rename_nfs_share = ::Gapic::Config::Method.new rename_nfs_share_config
4695
+ delete_nfs_share_config = parent_rpcs.delete_nfs_share if parent_rpcs.respond_to? :delete_nfs_share
4696
+ @delete_nfs_share = ::Gapic::Config::Method.new delete_nfs_share_config
4697
+ list_provisioning_quotas_config = parent_rpcs.list_provisioning_quotas if parent_rpcs.respond_to? :list_provisioning_quotas
4698
+ @list_provisioning_quotas = ::Gapic::Config::Method.new list_provisioning_quotas_config
4699
+ submit_provisioning_config_config = parent_rpcs.submit_provisioning_config if parent_rpcs.respond_to? :submit_provisioning_config
4700
+ @submit_provisioning_config = ::Gapic::Config::Method.new submit_provisioning_config_config
4701
+ get_provisioning_config_config = parent_rpcs.get_provisioning_config if parent_rpcs.respond_to? :get_provisioning_config
4702
+ @get_provisioning_config = ::Gapic::Config::Method.new get_provisioning_config_config
4703
+ create_provisioning_config_config = parent_rpcs.create_provisioning_config if parent_rpcs.respond_to? :create_provisioning_config
4704
+ @create_provisioning_config = ::Gapic::Config::Method.new create_provisioning_config_config
4705
+ update_provisioning_config_config = parent_rpcs.update_provisioning_config if parent_rpcs.respond_to? :update_provisioning_config
4706
+ @update_provisioning_config = ::Gapic::Config::Method.new update_provisioning_config_config
4707
+ rename_network_config = parent_rpcs.rename_network if parent_rpcs.respond_to? :rename_network
4708
+ @rename_network = ::Gapic::Config::Method.new rename_network_config
4709
+ list_os_images_config = parent_rpcs.list_os_images if parent_rpcs.respond_to? :list_os_images
4710
+ @list_os_images = ::Gapic::Config::Method.new list_os_images_config
2347
4711
 
2348
4712
  yield self if block_given?
2349
4713
  end