google-cloud-netapp-v1 2.7.0 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5751,6 +5751,552 @@ module Google
5751
5751
  raise ::Google::Cloud::Error.from_error(e)
5752
5752
  end
5753
5753
 
5754
+ ##
5755
+ # Restore files from a backup to a volume.
5756
+ #
5757
+ # @overload restore_backup_files(request, options = nil)
5758
+ # Pass arguments to `restore_backup_files` via a request object, either of type
5759
+ # {::Google::Cloud::NetApp::V1::RestoreBackupFilesRequest} or an equivalent Hash.
5760
+ #
5761
+ # @param request [::Google::Cloud::NetApp::V1::RestoreBackupFilesRequest, ::Hash]
5762
+ # A request object representing the call parameters. Required. To specify no
5763
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
5764
+ # @param options [::Gapic::CallOptions, ::Hash]
5765
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
5766
+ #
5767
+ # @overload restore_backup_files(name: nil, backup: nil, file_list: nil, restore_destination_path: nil)
5768
+ # Pass arguments to `restore_backup_files` via keyword arguments. Note that at
5769
+ # least one keyword argument is required. To specify no parameters, or to keep all
5770
+ # the default parameter values, pass an empty Hash as a request object (see above).
5771
+ #
5772
+ # @param name [::String]
5773
+ # Required. The volume resource name, in the format
5774
+ # `projects/{project_id}/locations/{location}/volumes/{volume_id}`
5775
+ # @param backup [::String]
5776
+ # Required. The backup resource name, in the format
5777
+ # `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`
5778
+ # @param file_list [::Array<::String>]
5779
+ # Required. List of files to be restored, specified by their absolute path in
5780
+ # the source volume.
5781
+ # @param restore_destination_path [::String]
5782
+ # Optional. Absolute directory path in the destination volume. This is
5783
+ # required if the `file_list` is provided.
5784
+ # @yield [result, operation] Access the result along with the TransportOperation object
5785
+ # @yieldparam result [::Gapic::Operation]
5786
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
5787
+ #
5788
+ # @return [::Gapic::Operation]
5789
+ #
5790
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
5791
+ #
5792
+ # @example Basic example
5793
+ # require "google/cloud/netapp/v1"
5794
+ #
5795
+ # # Create a client object. The client can be reused for multiple calls.
5796
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
5797
+ #
5798
+ # # Create a request. To set request fields, pass in keyword arguments.
5799
+ # request = Google::Cloud::NetApp::V1::RestoreBackupFilesRequest.new
5800
+ #
5801
+ # # Call the restore_backup_files method.
5802
+ # result = client.restore_backup_files request
5803
+ #
5804
+ # # The returned object is of type Gapic::Operation. You can use it to
5805
+ # # check the status of an operation, cancel it, or wait for results.
5806
+ # # Here is how to wait for a response.
5807
+ # result.wait_until_done! timeout: 60
5808
+ # if result.response?
5809
+ # p result.response
5810
+ # else
5811
+ # puts "No response received."
5812
+ # end
5813
+ #
5814
+ def restore_backup_files request, options = nil
5815
+ raise ::ArgumentError, "request must be provided" if request.nil?
5816
+
5817
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::RestoreBackupFilesRequest
5818
+
5819
+ # Converts hash and nil to an options object
5820
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
5821
+
5822
+ # Customize the options with defaults
5823
+ call_metadata = @config.rpcs.restore_backup_files.metadata.to_h
5824
+
5825
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
5826
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
5827
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
5828
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
5829
+ transports_version_send: [:rest]
5830
+
5831
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
5832
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
5833
+
5834
+ options.apply_defaults timeout: @config.rpcs.restore_backup_files.timeout,
5835
+ metadata: call_metadata,
5836
+ retry_policy: @config.rpcs.restore_backup_files.retry_policy
5837
+
5838
+ options.apply_defaults timeout: @config.timeout,
5839
+ metadata: @config.metadata,
5840
+ retry_policy: @config.retry_policy
5841
+
5842
+ @net_app_stub.restore_backup_files request, options do |result, operation|
5843
+ result = ::Gapic::Operation.new result, @operations_client, options: options
5844
+ yield result, operation if block_given?
5845
+ throw :response, result
5846
+ end
5847
+ rescue ::Gapic::Rest::Error => e
5848
+ raise ::Google::Cloud::Error.from_error(e)
5849
+ end
5850
+
5851
+ ##
5852
+ # Returns a list of host groups in a `location`. Use `-` as location to list
5853
+ # host groups across all locations.
5854
+ #
5855
+ # @overload list_host_groups(request, options = nil)
5856
+ # Pass arguments to `list_host_groups` via a request object, either of type
5857
+ # {::Google::Cloud::NetApp::V1::ListHostGroupsRequest} or an equivalent Hash.
5858
+ #
5859
+ # @param request [::Google::Cloud::NetApp::V1::ListHostGroupsRequest, ::Hash]
5860
+ # A request object representing the call parameters. Required. To specify no
5861
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
5862
+ # @param options [::Gapic::CallOptions, ::Hash]
5863
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
5864
+ #
5865
+ # @overload list_host_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
5866
+ # Pass arguments to `list_host_groups` via keyword arguments. Note that at
5867
+ # least one keyword argument is required. To specify no parameters, or to keep all
5868
+ # the default parameter values, pass an empty Hash as a request object (see above).
5869
+ #
5870
+ # @param parent [::String]
5871
+ # Required. Parent value for ListHostGroupsRequest
5872
+ # @param page_size [::Integer]
5873
+ # Optional. Requested page size. Server may return fewer items than
5874
+ # requested. If unspecified, the server will pick an appropriate default.
5875
+ # @param page_token [::String]
5876
+ # Optional. A token identifying a page of results the server should return.
5877
+ # @param filter [::String]
5878
+ # Optional. Filter to apply to the request.
5879
+ # @param order_by [::String]
5880
+ # Optional. Hint for how to order the results
5881
+ # @yield [result, operation] Access the result along with the TransportOperation object
5882
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetApp::V1::HostGroup>]
5883
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
5884
+ #
5885
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetApp::V1::HostGroup>]
5886
+ #
5887
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
5888
+ #
5889
+ # @example Basic example
5890
+ # require "google/cloud/netapp/v1"
5891
+ #
5892
+ # # Create a client object. The client can be reused for multiple calls.
5893
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
5894
+ #
5895
+ # # Create a request. To set request fields, pass in keyword arguments.
5896
+ # request = Google::Cloud::NetApp::V1::ListHostGroupsRequest.new
5897
+ #
5898
+ # # Call the list_host_groups method.
5899
+ # result = client.list_host_groups request
5900
+ #
5901
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
5902
+ # # over elements, and API calls will be issued to fetch pages as needed.
5903
+ # result.each do |item|
5904
+ # # Each element is of type ::Google::Cloud::NetApp::V1::HostGroup.
5905
+ # p item
5906
+ # end
5907
+ #
5908
+ def list_host_groups request, options = nil
5909
+ raise ::ArgumentError, "request must be provided" if request.nil?
5910
+
5911
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::ListHostGroupsRequest
5912
+
5913
+ # Converts hash and nil to an options object
5914
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
5915
+
5916
+ # Customize the options with defaults
5917
+ call_metadata = @config.rpcs.list_host_groups.metadata.to_h
5918
+
5919
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
5920
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
5921
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
5922
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
5923
+ transports_version_send: [:rest]
5924
+
5925
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
5926
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
5927
+
5928
+ options.apply_defaults timeout: @config.rpcs.list_host_groups.timeout,
5929
+ metadata: call_metadata,
5930
+ retry_policy: @config.rpcs.list_host_groups.retry_policy
5931
+
5932
+ options.apply_defaults timeout: @config.timeout,
5933
+ metadata: @config.metadata,
5934
+ retry_policy: @config.retry_policy
5935
+
5936
+ @net_app_stub.list_host_groups request, options do |result, operation|
5937
+ result = ::Gapic::Rest::PagedEnumerable.new @net_app_stub, :list_host_groups, "host_groups", request, result, options
5938
+ yield result, operation if block_given?
5939
+ throw :response, result
5940
+ end
5941
+ rescue ::Gapic::Rest::Error => e
5942
+ raise ::Google::Cloud::Error.from_error(e)
5943
+ end
5944
+
5945
+ ##
5946
+ # Returns details of the specified host group.
5947
+ #
5948
+ # @overload get_host_group(request, options = nil)
5949
+ # Pass arguments to `get_host_group` via a request object, either of type
5950
+ # {::Google::Cloud::NetApp::V1::GetHostGroupRequest} or an equivalent Hash.
5951
+ #
5952
+ # @param request [::Google::Cloud::NetApp::V1::GetHostGroupRequest, ::Hash]
5953
+ # A request object representing the call parameters. Required. To specify no
5954
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
5955
+ # @param options [::Gapic::CallOptions, ::Hash]
5956
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
5957
+ #
5958
+ # @overload get_host_group(name: nil)
5959
+ # Pass arguments to `get_host_group` via keyword arguments. Note that at
5960
+ # least one keyword argument is required. To specify no parameters, or to keep all
5961
+ # the default parameter values, pass an empty Hash as a request object (see above).
5962
+ #
5963
+ # @param name [::String]
5964
+ # Required. The resource name of the host group.
5965
+ # Format:
5966
+ # `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`.
5967
+ # @yield [result, operation] Access the result along with the TransportOperation object
5968
+ # @yieldparam result [::Google::Cloud::NetApp::V1::HostGroup]
5969
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
5970
+ #
5971
+ # @return [::Google::Cloud::NetApp::V1::HostGroup]
5972
+ #
5973
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
5974
+ #
5975
+ # @example Basic example
5976
+ # require "google/cloud/netapp/v1"
5977
+ #
5978
+ # # Create a client object. The client can be reused for multiple calls.
5979
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
5980
+ #
5981
+ # # Create a request. To set request fields, pass in keyword arguments.
5982
+ # request = Google::Cloud::NetApp::V1::GetHostGroupRequest.new
5983
+ #
5984
+ # # Call the get_host_group method.
5985
+ # result = client.get_host_group request
5986
+ #
5987
+ # # The returned object is of type Google::Cloud::NetApp::V1::HostGroup.
5988
+ # p result
5989
+ #
5990
+ def get_host_group request, options = nil
5991
+ raise ::ArgumentError, "request must be provided" if request.nil?
5992
+
5993
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::GetHostGroupRequest
5994
+
5995
+ # Converts hash and nil to an options object
5996
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
5997
+
5998
+ # Customize the options with defaults
5999
+ call_metadata = @config.rpcs.get_host_group.metadata.to_h
6000
+
6001
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
6002
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
6003
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
6004
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
6005
+ transports_version_send: [:rest]
6006
+
6007
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
6008
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
6009
+
6010
+ options.apply_defaults timeout: @config.rpcs.get_host_group.timeout,
6011
+ metadata: call_metadata,
6012
+ retry_policy: @config.rpcs.get_host_group.retry_policy
6013
+
6014
+ options.apply_defaults timeout: @config.timeout,
6015
+ metadata: @config.metadata,
6016
+ retry_policy: @config.retry_policy
6017
+
6018
+ @net_app_stub.get_host_group request, options do |result, operation|
6019
+ yield result, operation if block_given?
6020
+ end
6021
+ rescue ::Gapic::Rest::Error => e
6022
+ raise ::Google::Cloud::Error.from_error(e)
6023
+ end
6024
+
6025
+ ##
6026
+ # Creates a new host group.
6027
+ #
6028
+ # @overload create_host_group(request, options = nil)
6029
+ # Pass arguments to `create_host_group` via a request object, either of type
6030
+ # {::Google::Cloud::NetApp::V1::CreateHostGroupRequest} or an equivalent Hash.
6031
+ #
6032
+ # @param request [::Google::Cloud::NetApp::V1::CreateHostGroupRequest, ::Hash]
6033
+ # A request object representing the call parameters. Required. To specify no
6034
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
6035
+ # @param options [::Gapic::CallOptions, ::Hash]
6036
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
6037
+ #
6038
+ # @overload create_host_group(parent: nil, host_group: nil, host_group_id: nil)
6039
+ # Pass arguments to `create_host_group` via keyword arguments. Note that at
6040
+ # least one keyword argument is required. To specify no parameters, or to keep all
6041
+ # the default parameter values, pass an empty Hash as a request object (see above).
6042
+ #
6043
+ # @param parent [::String]
6044
+ # Required. Parent value for CreateHostGroupRequest
6045
+ # @param host_group [::Google::Cloud::NetApp::V1::HostGroup, ::Hash]
6046
+ # Required. Fields of the host group to create.
6047
+ # @param host_group_id [::String]
6048
+ # Required. ID of the host group to create. Must be unique within the parent
6049
+ # resource. Must contain only letters, numbers, and hyphen, with
6050
+ # the first character a letter or underscore, the last a letter or underscore
6051
+ # or a number, and a 63 character maximum.
6052
+ # @yield [result, operation] Access the result along with the TransportOperation object
6053
+ # @yieldparam result [::Gapic::Operation]
6054
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
6055
+ #
6056
+ # @return [::Gapic::Operation]
6057
+ #
6058
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
6059
+ #
6060
+ # @example Basic example
6061
+ # require "google/cloud/netapp/v1"
6062
+ #
6063
+ # # Create a client object. The client can be reused for multiple calls.
6064
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
6065
+ #
6066
+ # # Create a request. To set request fields, pass in keyword arguments.
6067
+ # request = Google::Cloud::NetApp::V1::CreateHostGroupRequest.new
6068
+ #
6069
+ # # Call the create_host_group method.
6070
+ # result = client.create_host_group request
6071
+ #
6072
+ # # The returned object is of type Gapic::Operation. You can use it to
6073
+ # # check the status of an operation, cancel it, or wait for results.
6074
+ # # Here is how to wait for a response.
6075
+ # result.wait_until_done! timeout: 60
6076
+ # if result.response?
6077
+ # p result.response
6078
+ # else
6079
+ # puts "No response received."
6080
+ # end
6081
+ #
6082
+ def create_host_group request, options = nil
6083
+ raise ::ArgumentError, "request must be provided" if request.nil?
6084
+
6085
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::CreateHostGroupRequest
6086
+
6087
+ # Converts hash and nil to an options object
6088
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
6089
+
6090
+ # Customize the options with defaults
6091
+ call_metadata = @config.rpcs.create_host_group.metadata.to_h
6092
+
6093
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
6094
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
6095
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
6096
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
6097
+ transports_version_send: [:rest]
6098
+
6099
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
6100
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
6101
+
6102
+ options.apply_defaults timeout: @config.rpcs.create_host_group.timeout,
6103
+ metadata: call_metadata,
6104
+ retry_policy: @config.rpcs.create_host_group.retry_policy
6105
+
6106
+ options.apply_defaults timeout: @config.timeout,
6107
+ metadata: @config.metadata,
6108
+ retry_policy: @config.retry_policy
6109
+
6110
+ @net_app_stub.create_host_group request, options do |result, operation|
6111
+ result = ::Gapic::Operation.new result, @operations_client, options: options
6112
+ yield result, operation if block_given?
6113
+ throw :response, result
6114
+ end
6115
+ rescue ::Gapic::Rest::Error => e
6116
+ raise ::Google::Cloud::Error.from_error(e)
6117
+ end
6118
+
6119
+ ##
6120
+ # Updates an existing host group.
6121
+ #
6122
+ # @overload update_host_group(request, options = nil)
6123
+ # Pass arguments to `update_host_group` via a request object, either of type
6124
+ # {::Google::Cloud::NetApp::V1::UpdateHostGroupRequest} or an equivalent Hash.
6125
+ #
6126
+ # @param request [::Google::Cloud::NetApp::V1::UpdateHostGroupRequest, ::Hash]
6127
+ # A request object representing the call parameters. Required. To specify no
6128
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
6129
+ # @param options [::Gapic::CallOptions, ::Hash]
6130
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
6131
+ #
6132
+ # @overload update_host_group(host_group: nil, update_mask: nil)
6133
+ # Pass arguments to `update_host_group` via keyword arguments. Note that at
6134
+ # least one keyword argument is required. To specify no parameters, or to keep all
6135
+ # the default parameter values, pass an empty Hash as a request object (see above).
6136
+ #
6137
+ # @param host_group [::Google::Cloud::NetApp::V1::HostGroup, ::Hash]
6138
+ # Required. The host group to update.
6139
+ # The host group's `name` field is used to identify the host group.
6140
+ # Format:
6141
+ # `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`.
6142
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
6143
+ # Optional. The list of fields to update.
6144
+ # @yield [result, operation] Access the result along with the TransportOperation object
6145
+ # @yieldparam result [::Gapic::Operation]
6146
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
6147
+ #
6148
+ # @return [::Gapic::Operation]
6149
+ #
6150
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
6151
+ #
6152
+ # @example Basic example
6153
+ # require "google/cloud/netapp/v1"
6154
+ #
6155
+ # # Create a client object. The client can be reused for multiple calls.
6156
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
6157
+ #
6158
+ # # Create a request. To set request fields, pass in keyword arguments.
6159
+ # request = Google::Cloud::NetApp::V1::UpdateHostGroupRequest.new
6160
+ #
6161
+ # # Call the update_host_group method.
6162
+ # result = client.update_host_group request
6163
+ #
6164
+ # # The returned object is of type Gapic::Operation. You can use it to
6165
+ # # check the status of an operation, cancel it, or wait for results.
6166
+ # # Here is how to wait for a response.
6167
+ # result.wait_until_done! timeout: 60
6168
+ # if result.response?
6169
+ # p result.response
6170
+ # else
6171
+ # puts "No response received."
6172
+ # end
6173
+ #
6174
+ def update_host_group request, options = nil
6175
+ raise ::ArgumentError, "request must be provided" if request.nil?
6176
+
6177
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::UpdateHostGroupRequest
6178
+
6179
+ # Converts hash and nil to an options object
6180
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
6181
+
6182
+ # Customize the options with defaults
6183
+ call_metadata = @config.rpcs.update_host_group.metadata.to_h
6184
+
6185
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
6186
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
6187
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
6188
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
6189
+ transports_version_send: [:rest]
6190
+
6191
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
6192
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
6193
+
6194
+ options.apply_defaults timeout: @config.rpcs.update_host_group.timeout,
6195
+ metadata: call_metadata,
6196
+ retry_policy: @config.rpcs.update_host_group.retry_policy
6197
+
6198
+ options.apply_defaults timeout: @config.timeout,
6199
+ metadata: @config.metadata,
6200
+ retry_policy: @config.retry_policy
6201
+
6202
+ @net_app_stub.update_host_group request, options do |result, operation|
6203
+ result = ::Gapic::Operation.new result, @operations_client, options: options
6204
+ yield result, operation if block_given?
6205
+ throw :response, result
6206
+ end
6207
+ rescue ::Gapic::Rest::Error => e
6208
+ raise ::Google::Cloud::Error.from_error(e)
6209
+ end
6210
+
6211
+ ##
6212
+ # Deletes a host group.
6213
+ #
6214
+ # @overload delete_host_group(request, options = nil)
6215
+ # Pass arguments to `delete_host_group` via a request object, either of type
6216
+ # {::Google::Cloud::NetApp::V1::DeleteHostGroupRequest} or an equivalent Hash.
6217
+ #
6218
+ # @param request [::Google::Cloud::NetApp::V1::DeleteHostGroupRequest, ::Hash]
6219
+ # A request object representing the call parameters. Required. To specify no
6220
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
6221
+ # @param options [::Gapic::CallOptions, ::Hash]
6222
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
6223
+ #
6224
+ # @overload delete_host_group(name: nil)
6225
+ # Pass arguments to `delete_host_group` via keyword arguments. Note that at
6226
+ # least one keyword argument is required. To specify no parameters, or to keep all
6227
+ # the default parameter values, pass an empty Hash as a request object (see above).
6228
+ #
6229
+ # @param name [::String]
6230
+ # Required. The resource name of the host group.
6231
+ # Format:
6232
+ # `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`.
6233
+ # @yield [result, operation] Access the result along with the TransportOperation object
6234
+ # @yieldparam result [::Gapic::Operation]
6235
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
6236
+ #
6237
+ # @return [::Gapic::Operation]
6238
+ #
6239
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
6240
+ #
6241
+ # @example Basic example
6242
+ # require "google/cloud/netapp/v1"
6243
+ #
6244
+ # # Create a client object. The client can be reused for multiple calls.
6245
+ # client = Google::Cloud::NetApp::V1::NetApp::Rest::Client.new
6246
+ #
6247
+ # # Create a request. To set request fields, pass in keyword arguments.
6248
+ # request = Google::Cloud::NetApp::V1::DeleteHostGroupRequest.new
6249
+ #
6250
+ # # Call the delete_host_group method.
6251
+ # result = client.delete_host_group request
6252
+ #
6253
+ # # The returned object is of type Gapic::Operation. You can use it to
6254
+ # # check the status of an operation, cancel it, or wait for results.
6255
+ # # Here is how to wait for a response.
6256
+ # result.wait_until_done! timeout: 60
6257
+ # if result.response?
6258
+ # p result.response
6259
+ # else
6260
+ # puts "No response received."
6261
+ # end
6262
+ #
6263
+ def delete_host_group request, options = nil
6264
+ raise ::ArgumentError, "request must be provided" if request.nil?
6265
+
6266
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetApp::V1::DeleteHostGroupRequest
6267
+
6268
+ # Converts hash and nil to an options object
6269
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
6270
+
6271
+ # Customize the options with defaults
6272
+ call_metadata = @config.rpcs.delete_host_group.metadata.to_h
6273
+
6274
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
6275
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
6276
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
6277
+ gapic_version: ::Google::Cloud::NetApp::V1::VERSION,
6278
+ transports_version_send: [:rest]
6279
+
6280
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
6281
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
6282
+
6283
+ options.apply_defaults timeout: @config.rpcs.delete_host_group.timeout,
6284
+ metadata: call_metadata,
6285
+ retry_policy: @config.rpcs.delete_host_group.retry_policy
6286
+
6287
+ options.apply_defaults timeout: @config.timeout,
6288
+ metadata: @config.metadata,
6289
+ retry_policy: @config.retry_policy
6290
+
6291
+ @net_app_stub.delete_host_group request, options do |result, operation|
6292
+ result = ::Gapic::Operation.new result, @operations_client, options: options
6293
+ yield result, operation if block_given?
6294
+ throw :response, result
6295
+ end
6296
+ rescue ::Gapic::Rest::Error => e
6297
+ raise ::Google::Cloud::Error.from_error(e)
6298
+ end
6299
+
5754
6300
  ##
5755
6301
  # Configuration class for the NetApp REST API.
5756
6302
  #
@@ -6204,6 +6750,36 @@ module Google
6204
6750
  # @return [::Gapic::Config::Method]
6205
6751
  #
6206
6752
  attr_reader :delete_quota_rule
6753
+ ##
6754
+ # RPC-specific configuration for `restore_backup_files`
6755
+ # @return [::Gapic::Config::Method]
6756
+ #
6757
+ attr_reader :restore_backup_files
6758
+ ##
6759
+ # RPC-specific configuration for `list_host_groups`
6760
+ # @return [::Gapic::Config::Method]
6761
+ #
6762
+ attr_reader :list_host_groups
6763
+ ##
6764
+ # RPC-specific configuration for `get_host_group`
6765
+ # @return [::Gapic::Config::Method]
6766
+ #
6767
+ attr_reader :get_host_group
6768
+ ##
6769
+ # RPC-specific configuration for `create_host_group`
6770
+ # @return [::Gapic::Config::Method]
6771
+ #
6772
+ attr_reader :create_host_group
6773
+ ##
6774
+ # RPC-specific configuration for `update_host_group`
6775
+ # @return [::Gapic::Config::Method]
6776
+ #
6777
+ attr_reader :update_host_group
6778
+ ##
6779
+ # RPC-specific configuration for `delete_host_group`
6780
+ # @return [::Gapic::Config::Method]
6781
+ #
6782
+ attr_reader :delete_host_group
6207
6783
 
6208
6784
  # @private
6209
6785
  def initialize parent_rpcs = nil
@@ -6327,6 +6903,18 @@ module Google
6327
6903
  @update_quota_rule = ::Gapic::Config::Method.new update_quota_rule_config
6328
6904
  delete_quota_rule_config = parent_rpcs.delete_quota_rule if parent_rpcs.respond_to? :delete_quota_rule
6329
6905
  @delete_quota_rule = ::Gapic::Config::Method.new delete_quota_rule_config
6906
+ restore_backup_files_config = parent_rpcs.restore_backup_files if parent_rpcs.respond_to? :restore_backup_files
6907
+ @restore_backup_files = ::Gapic::Config::Method.new restore_backup_files_config
6908
+ list_host_groups_config = parent_rpcs.list_host_groups if parent_rpcs.respond_to? :list_host_groups
6909
+ @list_host_groups = ::Gapic::Config::Method.new list_host_groups_config
6910
+ get_host_group_config = parent_rpcs.get_host_group if parent_rpcs.respond_to? :get_host_group
6911
+ @get_host_group = ::Gapic::Config::Method.new get_host_group_config
6912
+ create_host_group_config = parent_rpcs.create_host_group if parent_rpcs.respond_to? :create_host_group
6913
+ @create_host_group = ::Gapic::Config::Method.new create_host_group_config
6914
+ update_host_group_config = parent_rpcs.update_host_group if parent_rpcs.respond_to? :update_host_group
6915
+ @update_host_group = ::Gapic::Config::Method.new update_host_group_config
6916
+ delete_host_group_config = parent_rpcs.delete_host_group if parent_rpcs.respond_to? :delete_host_group
6917
+ @delete_host_group = ::Gapic::Config::Method.new delete_host_group_config
6330
6918
 
6331
6919
  yield self if block_given?
6332
6920
  end