google-cloud-bare_metal_solution-v2 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/README.md +3 -3
- data/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/client.rb +59 -69
- data/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/operations.rb +14 -16
- data/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/client.rb +1795 -0
- data/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/operations.rb +793 -0
- data/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/service_stub.rb +1237 -0
- data/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution/rest.rb +61 -0
- data/lib/google/cloud/bare_metal_solution/v2/bare_metal_solution.rb +7 -1
- data/lib/google/cloud/bare_metal_solution/v2/bindings_override.rb +102 -0
- data/lib/google/cloud/bare_metal_solution/v2/rest.rb +38 -0
- data/lib/google/cloud/bare_metal_solution/v2/version.rb +1 -1
- data/lib/google/cloud/bare_metal_solution/v2.rb +7 -2
- data/lib/google/cloud/baremetalsolution/v2/baremetalsolution_pb.rb +25 -12
- data/lib/google/cloud/baremetalsolution/v2/instance_pb.rb +28 -74
- data/lib/google/cloud/baremetalsolution/v2/lun_pb.rb +24 -42
- data/lib/google/cloud/baremetalsolution/v2/network_pb.rb +25 -89
- data/lib/google/cloud/baremetalsolution/v2/nfs_share_pb.rb +25 -45
- data/lib/google/cloud/baremetalsolution/v2/volume_pb.rb +25 -62
- data/proto_docs/google/api/client.rb +381 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/protobuf/any.rb +7 -4
- data/proto_docs/google/protobuf/empty.rb +0 -2
- data/proto_docs/google/protobuf/timestamp.rb +1 -3
- data/proto_docs/google/rpc/status.rb +4 -2
- metadata +21 -12
@@ -0,0 +1,1795 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/errors"
|
20
|
+
require "google/cloud/baremetalsolution/v2/baremetalsolution_pb"
|
21
|
+
require "google/cloud/bare_metal_solution/v2/bare_metal_solution/rest/service_stub"
|
22
|
+
require "google/cloud/location/rest"
|
23
|
+
require "google/iam/v1/rest"
|
24
|
+
|
25
|
+
module Google
|
26
|
+
module Cloud
|
27
|
+
module BareMetalSolution
|
28
|
+
module V2
|
29
|
+
module BareMetalSolution
|
30
|
+
module Rest
|
31
|
+
##
|
32
|
+
# REST client for the BareMetalSolution service.
|
33
|
+
#
|
34
|
+
# Performs management operations on Bare Metal Solution servers.
|
35
|
+
#
|
36
|
+
# The `baremetalsolution.googleapis.com` service provides management
|
37
|
+
# capabilities for Bare Metal Solution servers. To access the API methods, you
|
38
|
+
# must assign Bare Metal Solution IAM roles containing the desired permissions
|
39
|
+
# to your staff in your Google Cloud project. You must also enable the Bare
|
40
|
+
# Metal Solution API. Once enabled, the methods act
|
41
|
+
# upon specific servers in your Bare Metal Solution environment.
|
42
|
+
#
|
43
|
+
class Client
|
44
|
+
include Paths
|
45
|
+
|
46
|
+
# @private
|
47
|
+
attr_reader :bare_metal_solution_stub
|
48
|
+
|
49
|
+
##
|
50
|
+
# Configure the BareMetalSolution Client class.
|
51
|
+
#
|
52
|
+
# See {::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client::Configuration}
|
53
|
+
# for a description of the configuration fields.
|
54
|
+
#
|
55
|
+
# @example
|
56
|
+
#
|
57
|
+
# # Modify the configuration for all BareMetalSolution clients
|
58
|
+
# ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.configure do |config|
|
59
|
+
# config.timeout = 10.0
|
60
|
+
# end
|
61
|
+
#
|
62
|
+
# @yield [config] Configure the Client client.
|
63
|
+
# @yieldparam config [Client::Configuration]
|
64
|
+
#
|
65
|
+
# @return [Client::Configuration]
|
66
|
+
#
|
67
|
+
def self.configure
|
68
|
+
@configure ||= begin
|
69
|
+
namespace = ["Google", "Cloud", "BareMetalSolution", "V2"]
|
70
|
+
parent_config = while namespace.any?
|
71
|
+
parent_name = namespace.join "::"
|
72
|
+
parent_const = const_get parent_name
|
73
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
74
|
+
namespace.pop
|
75
|
+
end
|
76
|
+
default_config = Client::Configuration.new parent_config
|
77
|
+
|
78
|
+
default_config.timeout = 60.0
|
79
|
+
|
80
|
+
default_config
|
81
|
+
end
|
82
|
+
yield @configure if block_given?
|
83
|
+
@configure
|
84
|
+
end
|
85
|
+
|
86
|
+
##
|
87
|
+
# Configure the BareMetalSolution Client instance.
|
88
|
+
#
|
89
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
90
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
91
|
+
# should be made on {Client.configure}.
|
92
|
+
#
|
93
|
+
# See {::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client::Configuration}
|
94
|
+
# for a description of the configuration fields.
|
95
|
+
#
|
96
|
+
# @yield [config] Configure the Client client.
|
97
|
+
# @yieldparam config [Client::Configuration]
|
98
|
+
#
|
99
|
+
# @return [Client::Configuration]
|
100
|
+
#
|
101
|
+
def configure
|
102
|
+
yield @config if block_given?
|
103
|
+
@config
|
104
|
+
end
|
105
|
+
|
106
|
+
##
|
107
|
+
# Create a new BareMetalSolution REST client object.
|
108
|
+
#
|
109
|
+
# @example
|
110
|
+
#
|
111
|
+
# # Create a client using the default configuration
|
112
|
+
# client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new
|
113
|
+
#
|
114
|
+
# # Create a client using a custom configuration
|
115
|
+
# client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config|
|
116
|
+
# config.timeout = 10.0
|
117
|
+
# end
|
118
|
+
#
|
119
|
+
# @yield [config] Configure the BareMetalSolution client.
|
120
|
+
# @yieldparam config [Client::Configuration]
|
121
|
+
#
|
122
|
+
def initialize
|
123
|
+
# Create the configuration object
|
124
|
+
@config = Configuration.new Client.configure
|
125
|
+
|
126
|
+
# Yield the configuration if needed
|
127
|
+
yield @config if block_given?
|
128
|
+
|
129
|
+
# Create credentials
|
130
|
+
credentials = @config.credentials
|
131
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
132
|
+
# but only if the default endpoint does not have a region prefix.
|
133
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
134
|
+
!@config.endpoint.split(".").first.include?("-")
|
135
|
+
credentials ||= Credentials.default scope: @config.scope,
|
136
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
137
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
138
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
139
|
+
end
|
140
|
+
|
141
|
+
@quota_project_id = @config.quota_project
|
142
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
143
|
+
|
144
|
+
@operations_client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Operations.new do |config|
|
145
|
+
config.credentials = credentials
|
146
|
+
config.quota_project = @quota_project_id
|
147
|
+
config.endpoint = @config.endpoint
|
148
|
+
end
|
149
|
+
|
150
|
+
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
151
|
+
config.credentials = credentials
|
152
|
+
config.quota_project = @quota_project_id
|
153
|
+
config.endpoint = @config.endpoint
|
154
|
+
config.bindings_override = @config.bindings_override
|
155
|
+
end
|
156
|
+
|
157
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
|
158
|
+
config.credentials = credentials
|
159
|
+
config.quota_project = @quota_project_id
|
160
|
+
config.endpoint = @config.endpoint
|
161
|
+
end
|
162
|
+
|
163
|
+
@bare_metal_solution_stub = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
164
|
+
end
|
165
|
+
|
166
|
+
##
|
167
|
+
# Get the associated client for long-running operations.
|
168
|
+
#
|
169
|
+
# @return [::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Operations]
|
170
|
+
#
|
171
|
+
attr_reader :operations_client
|
172
|
+
|
173
|
+
##
|
174
|
+
# Get the associated client for mix-in of the Locations.
|
175
|
+
#
|
176
|
+
# @return [Google::Cloud::Location::Locations::Rest::Client]
|
177
|
+
#
|
178
|
+
attr_reader :location_client
|
179
|
+
|
180
|
+
##
|
181
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
182
|
+
#
|
183
|
+
# @return [Google::Iam::V1::IAMPolicy::Rest::Client]
|
184
|
+
#
|
185
|
+
attr_reader :iam_policy_client
|
186
|
+
|
187
|
+
# Service calls
|
188
|
+
|
189
|
+
##
|
190
|
+
# List servers in a given project and location.
|
191
|
+
#
|
192
|
+
# @overload list_instances(request, options = nil)
|
193
|
+
# Pass arguments to `list_instances` via a request object, either of type
|
194
|
+
# {::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest} or an equivalent Hash.
|
195
|
+
#
|
196
|
+
# @param request [::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest, ::Hash]
|
197
|
+
# A request object representing the call parameters. Required. To specify no
|
198
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
199
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
200
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
201
|
+
#
|
202
|
+
# @overload list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil)
|
203
|
+
# Pass arguments to `list_instances` via keyword arguments. Note that at
|
204
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
205
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
206
|
+
#
|
207
|
+
# @param parent [::String]
|
208
|
+
# Required. Parent value for ListInstancesRequest.
|
209
|
+
# @param page_size [::Integer]
|
210
|
+
# Requested page size. Server may return fewer items than requested.
|
211
|
+
# If unspecified, the server will pick an appropriate default.
|
212
|
+
# @param page_token [::String]
|
213
|
+
# A token identifying a page of results from the server.
|
214
|
+
# @param filter [::String]
|
215
|
+
# List filter.
|
216
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
217
|
+
# @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListInstancesResponse]
|
218
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
219
|
+
#
|
220
|
+
# @return [::Google::Cloud::BareMetalSolution::V2::ListInstancesResponse]
|
221
|
+
#
|
222
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
223
|
+
def list_instances request, options = nil
|
224
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
225
|
+
|
226
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListInstancesRequest
|
227
|
+
|
228
|
+
# Converts hash and nil to an options object
|
229
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
230
|
+
|
231
|
+
# Customize the options with defaults
|
232
|
+
call_metadata = @config.rpcs.list_instances.metadata.to_h
|
233
|
+
|
234
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
235
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
236
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
237
|
+
gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION,
|
238
|
+
transports_version_send: [:rest]
|
239
|
+
|
240
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
241
|
+
|
242
|
+
options.apply_defaults timeout: @config.rpcs.list_instances.timeout,
|
243
|
+
metadata: call_metadata,
|
244
|
+
retry_policy: @config.rpcs.list_instances.retry_policy
|
245
|
+
|
246
|
+
options.apply_defaults timeout: @config.timeout,
|
247
|
+
metadata: @config.metadata,
|
248
|
+
retry_policy: @config.retry_policy
|
249
|
+
|
250
|
+
@bare_metal_solution_stub.list_instances request, options do |result, operation|
|
251
|
+
yield result, operation if block_given?
|
252
|
+
return result
|
253
|
+
end
|
254
|
+
rescue ::Gapic::Rest::Error => e
|
255
|
+
raise ::Google::Cloud::Error.from_error(e)
|
256
|
+
end
|
257
|
+
|
258
|
+
##
|
259
|
+
# Get details about a single server.
|
260
|
+
#
|
261
|
+
# @overload get_instance(request, options = nil)
|
262
|
+
# Pass arguments to `get_instance` via a request object, either of type
|
263
|
+
# {::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest} or an equivalent Hash.
|
264
|
+
#
|
265
|
+
# @param request [::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest, ::Hash]
|
266
|
+
# A request object representing the call parameters. Required. To specify no
|
267
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
268
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
269
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
270
|
+
#
|
271
|
+
# @overload get_instance(name: nil)
|
272
|
+
# Pass arguments to `get_instance` via keyword arguments. Note that at
|
273
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
274
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
275
|
+
#
|
276
|
+
# @param name [::String]
|
277
|
+
# Required. Name of the resource.
|
278
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
279
|
+
# @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Instance]
|
280
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
281
|
+
#
|
282
|
+
# @return [::Google::Cloud::BareMetalSolution::V2::Instance]
|
283
|
+
#
|
284
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
285
|
+
def get_instance request, options = nil
|
286
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
287
|
+
|
288
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetInstanceRequest
|
289
|
+
|
290
|
+
# Converts hash and nil to an options object
|
291
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
292
|
+
|
293
|
+
# Customize the options with defaults
|
294
|
+
call_metadata = @config.rpcs.get_instance.metadata.to_h
|
295
|
+
|
296
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
297
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
298
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
299
|
+
gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION,
|
300
|
+
transports_version_send: [:rest]
|
301
|
+
|
302
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
303
|
+
|
304
|
+
options.apply_defaults timeout: @config.rpcs.get_instance.timeout,
|
305
|
+
metadata: call_metadata,
|
306
|
+
retry_policy: @config.rpcs.get_instance.retry_policy
|
307
|
+
|
308
|
+
options.apply_defaults timeout: @config.timeout,
|
309
|
+
metadata: @config.metadata,
|
310
|
+
retry_policy: @config.retry_policy
|
311
|
+
|
312
|
+
@bare_metal_solution_stub.get_instance request, options do |result, operation|
|
313
|
+
yield result, operation if block_given?
|
314
|
+
return result
|
315
|
+
end
|
316
|
+
rescue ::Gapic::Rest::Error => e
|
317
|
+
raise ::Google::Cloud::Error.from_error(e)
|
318
|
+
end
|
319
|
+
|
320
|
+
##
|
321
|
+
# Update details of a single server.
|
322
|
+
#
|
323
|
+
# @overload update_instance(request, options = nil)
|
324
|
+
# Pass arguments to `update_instance` via a request object, either of type
|
325
|
+
# {::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest} or an equivalent Hash.
|
326
|
+
#
|
327
|
+
# @param request [::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest, ::Hash]
|
328
|
+
# A request object representing the call parameters. Required. To specify no
|
329
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
330
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
331
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
332
|
+
#
|
333
|
+
# @overload update_instance(instance: nil, update_mask: nil)
|
334
|
+
# Pass arguments to `update_instance` via keyword arguments. Note that at
|
335
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
336
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
337
|
+
#
|
338
|
+
# @param instance [::Google::Cloud::BareMetalSolution::V2::Instance, ::Hash]
|
339
|
+
# Required. The server to update.
|
340
|
+
#
|
341
|
+
# The `name` field is used to identify the instance to update.
|
342
|
+
# Format: projects/\\{project}/locations/\\{location}/instances/\\{instance}
|
343
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
344
|
+
# The list of fields to update.
|
345
|
+
# The currently supported fields are:
|
346
|
+
# `labels`
|
347
|
+
# `hyperthreading_enabled`
|
348
|
+
# `os_image`
|
349
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
350
|
+
# @yieldparam result [::Gapic::Operation]
|
351
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
352
|
+
#
|
353
|
+
# @return [::Gapic::Operation]
|
354
|
+
#
|
355
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
356
|
+
def update_instance request, options = nil
|
357
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
358
|
+
|
359
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateInstanceRequest
|
360
|
+
|
361
|
+
# Converts hash and nil to an options object
|
362
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
363
|
+
|
364
|
+
# Customize the options with defaults
|
365
|
+
call_metadata = @config.rpcs.update_instance.metadata.to_h
|
366
|
+
|
367
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
368
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
369
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
370
|
+
gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION,
|
371
|
+
transports_version_send: [:rest]
|
372
|
+
|
373
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
374
|
+
|
375
|
+
options.apply_defaults timeout: @config.rpcs.update_instance.timeout,
|
376
|
+
metadata: call_metadata,
|
377
|
+
retry_policy: @config.rpcs.update_instance.retry_policy
|
378
|
+
|
379
|
+
options.apply_defaults timeout: @config.timeout,
|
380
|
+
metadata: @config.metadata,
|
381
|
+
retry_policy: @config.retry_policy
|
382
|
+
|
383
|
+
@bare_metal_solution_stub.update_instance request, options do |result, operation|
|
384
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
385
|
+
yield result, operation if block_given?
|
386
|
+
return result
|
387
|
+
end
|
388
|
+
rescue ::Gapic::Rest::Error => e
|
389
|
+
raise ::Google::Cloud::Error.from_error(e)
|
390
|
+
end
|
391
|
+
|
392
|
+
##
|
393
|
+
# Perform an ungraceful, hard reset on a server. Equivalent to shutting the
|
394
|
+
# power off and then turning it back on.
|
395
|
+
#
|
396
|
+
# @overload reset_instance(request, options = nil)
|
397
|
+
# Pass arguments to `reset_instance` via a request object, either of type
|
398
|
+
# {::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest} or an equivalent Hash.
|
399
|
+
#
|
400
|
+
# @param request [::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest, ::Hash]
|
401
|
+
# A request object representing the call parameters. Required. To specify no
|
402
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
403
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
404
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
405
|
+
#
|
406
|
+
# @overload reset_instance(name: nil)
|
407
|
+
# Pass arguments to `reset_instance` via keyword arguments. Note that at
|
408
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
409
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
410
|
+
#
|
411
|
+
# @param name [::String]
|
412
|
+
# Required. Name of the resource.
|
413
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
414
|
+
# @yieldparam result [::Gapic::Operation]
|
415
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
416
|
+
#
|
417
|
+
# @return [::Gapic::Operation]
|
418
|
+
#
|
419
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
420
|
+
def reset_instance request, options = nil
|
421
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
422
|
+
|
423
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ResetInstanceRequest
|
424
|
+
|
425
|
+
# Converts hash and nil to an options object
|
426
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
427
|
+
|
428
|
+
# Customize the options with defaults
|
429
|
+
call_metadata = @config.rpcs.reset_instance.metadata.to_h
|
430
|
+
|
431
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
432
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
433
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
434
|
+
gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION,
|
435
|
+
transports_version_send: [:rest]
|
436
|
+
|
437
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
438
|
+
|
439
|
+
options.apply_defaults timeout: @config.rpcs.reset_instance.timeout,
|
440
|
+
metadata: call_metadata,
|
441
|
+
retry_policy: @config.rpcs.reset_instance.retry_policy
|
442
|
+
|
443
|
+
options.apply_defaults timeout: @config.timeout,
|
444
|
+
metadata: @config.metadata,
|
445
|
+
retry_policy: @config.retry_policy
|
446
|
+
|
447
|
+
@bare_metal_solution_stub.reset_instance request, options do |result, operation|
|
448
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
449
|
+
yield result, operation if block_given?
|
450
|
+
return result
|
451
|
+
end
|
452
|
+
rescue ::Gapic::Rest::Error => e
|
453
|
+
raise ::Google::Cloud::Error.from_error(e)
|
454
|
+
end
|
455
|
+
|
456
|
+
##
|
457
|
+
# Starts a server that was shutdown.
|
458
|
+
#
|
459
|
+
# @overload start_instance(request, options = nil)
|
460
|
+
# Pass arguments to `start_instance` via a request object, either of type
|
461
|
+
# {::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest} or an equivalent Hash.
|
462
|
+
#
|
463
|
+
# @param request [::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest, ::Hash]
|
464
|
+
# A request object representing the call parameters. Required. To specify no
|
465
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
466
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
467
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
468
|
+
#
|
469
|
+
# @overload start_instance(name: nil)
|
470
|
+
# Pass arguments to `start_instance` via keyword arguments. Note that at
|
471
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
472
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
473
|
+
#
|
474
|
+
# @param name [::String]
|
475
|
+
# Required. Name of the resource.
|
476
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
477
|
+
# @yieldparam result [::Gapic::Operation]
|
478
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
479
|
+
#
|
480
|
+
# @return [::Gapic::Operation]
|
481
|
+
#
|
482
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
483
|
+
def start_instance request, options = nil
|
484
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
485
|
+
|
486
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::StartInstanceRequest
|
487
|
+
|
488
|
+
# Converts hash and nil to an options object
|
489
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
490
|
+
|
491
|
+
# Customize the options with defaults
|
492
|
+
call_metadata = @config.rpcs.start_instance.metadata.to_h
|
493
|
+
|
494
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
495
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
496
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
497
|
+
gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION,
|
498
|
+
transports_version_send: [:rest]
|
499
|
+
|
500
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
501
|
+
|
502
|
+
options.apply_defaults timeout: @config.rpcs.start_instance.timeout,
|
503
|
+
metadata: call_metadata,
|
504
|
+
retry_policy: @config.rpcs.start_instance.retry_policy
|
505
|
+
|
506
|
+
options.apply_defaults timeout: @config.timeout,
|
507
|
+
metadata: @config.metadata,
|
508
|
+
retry_policy: @config.retry_policy
|
509
|
+
|
510
|
+
@bare_metal_solution_stub.start_instance request, options do |result, operation|
|
511
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
512
|
+
yield result, operation if block_given?
|
513
|
+
return result
|
514
|
+
end
|
515
|
+
rescue ::Gapic::Rest::Error => e
|
516
|
+
raise ::Google::Cloud::Error.from_error(e)
|
517
|
+
end
|
518
|
+
|
519
|
+
##
|
520
|
+
# Stop a running server.
|
521
|
+
#
|
522
|
+
# @overload stop_instance(request, options = nil)
|
523
|
+
# Pass arguments to `stop_instance` via a request object, either of type
|
524
|
+
# {::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest} or an equivalent Hash.
|
525
|
+
#
|
526
|
+
# @param request [::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest, ::Hash]
|
527
|
+
# A request object representing the call parameters. Required. To specify no
|
528
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
529
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
530
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
531
|
+
#
|
532
|
+
# @overload stop_instance(name: nil)
|
533
|
+
# Pass arguments to `stop_instance` via keyword arguments. Note that at
|
534
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
535
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
536
|
+
#
|
537
|
+
# @param name [::String]
|
538
|
+
# Required. Name of the resource.
|
539
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
540
|
+
# @yieldparam result [::Gapic::Operation]
|
541
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
542
|
+
#
|
543
|
+
# @return [::Gapic::Operation]
|
544
|
+
#
|
545
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
546
|
+
def stop_instance request, options = nil
|
547
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
548
|
+
|
549
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::StopInstanceRequest
|
550
|
+
|
551
|
+
# Converts hash and nil to an options object
|
552
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
553
|
+
|
554
|
+
# Customize the options with defaults
|
555
|
+
call_metadata = @config.rpcs.stop_instance.metadata.to_h
|
556
|
+
|
557
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
558
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
559
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
560
|
+
gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION,
|
561
|
+
transports_version_send: [:rest]
|
562
|
+
|
563
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
564
|
+
|
565
|
+
options.apply_defaults timeout: @config.rpcs.stop_instance.timeout,
|
566
|
+
metadata: call_metadata,
|
567
|
+
retry_policy: @config.rpcs.stop_instance.retry_policy
|
568
|
+
|
569
|
+
options.apply_defaults timeout: @config.timeout,
|
570
|
+
metadata: @config.metadata,
|
571
|
+
retry_policy: @config.retry_policy
|
572
|
+
|
573
|
+
@bare_metal_solution_stub.stop_instance request, options do |result, operation|
|
574
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
575
|
+
yield result, operation if block_given?
|
576
|
+
return result
|
577
|
+
end
|
578
|
+
rescue ::Gapic::Rest::Error => e
|
579
|
+
raise ::Google::Cloud::Error.from_error(e)
|
580
|
+
end
|
581
|
+
|
582
|
+
##
|
583
|
+
# Detach LUN from Instance.
|
584
|
+
#
|
585
|
+
# @overload detach_lun(request, options = nil)
|
586
|
+
# Pass arguments to `detach_lun` via a request object, either of type
|
587
|
+
# {::Google::Cloud::BareMetalSolution::V2::DetachLunRequest} or an equivalent Hash.
|
588
|
+
#
|
589
|
+
# @param request [::Google::Cloud::BareMetalSolution::V2::DetachLunRequest, ::Hash]
|
590
|
+
# A request object representing the call parameters. Required. To specify no
|
591
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
592
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
593
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
594
|
+
#
|
595
|
+
# @overload detach_lun(instance: nil, lun: nil)
|
596
|
+
# Pass arguments to `detach_lun` via keyword arguments. Note that at
|
597
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
598
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
599
|
+
#
|
600
|
+
# @param instance [::String]
|
601
|
+
# Required. Name of the instance.
|
602
|
+
# @param lun [::String]
|
603
|
+
# Required. Name of the Lun to detach.
|
604
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
605
|
+
# @yieldparam result [::Gapic::Operation]
|
606
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
607
|
+
#
|
608
|
+
# @return [::Gapic::Operation]
|
609
|
+
#
|
610
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
611
|
+
def detach_lun request, options = nil
|
612
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
613
|
+
|
614
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::DetachLunRequest
|
615
|
+
|
616
|
+
# Converts hash and nil to an options object
|
617
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
618
|
+
|
619
|
+
# Customize the options with defaults
|
620
|
+
call_metadata = @config.rpcs.detach_lun.metadata.to_h
|
621
|
+
|
622
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
623
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
624
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
625
|
+
gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION,
|
626
|
+
transports_version_send: [:rest]
|
627
|
+
|
628
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
629
|
+
|
630
|
+
options.apply_defaults timeout: @config.rpcs.detach_lun.timeout,
|
631
|
+
metadata: call_metadata,
|
632
|
+
retry_policy: @config.rpcs.detach_lun.retry_policy
|
633
|
+
|
634
|
+
options.apply_defaults timeout: @config.timeout,
|
635
|
+
metadata: @config.metadata,
|
636
|
+
retry_policy: @config.retry_policy
|
637
|
+
|
638
|
+
@bare_metal_solution_stub.detach_lun request, options do |result, operation|
|
639
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
640
|
+
yield result, operation if block_given?
|
641
|
+
return result
|
642
|
+
end
|
643
|
+
rescue ::Gapic::Rest::Error => e
|
644
|
+
raise ::Google::Cloud::Error.from_error(e)
|
645
|
+
end
|
646
|
+
|
647
|
+
##
|
648
|
+
# List storage volumes in a given project and location.
|
649
|
+
#
|
650
|
+
# @overload list_volumes(request, options = nil)
|
651
|
+
# Pass arguments to `list_volumes` via a request object, either of type
|
652
|
+
# {::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest} or an equivalent Hash.
|
653
|
+
#
|
654
|
+
# @param request [::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest, ::Hash]
|
655
|
+
# A request object representing the call parameters. Required. To specify no
|
656
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
657
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
658
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
659
|
+
#
|
660
|
+
# @overload list_volumes(parent: nil, page_size: nil, page_token: nil, filter: nil)
|
661
|
+
# Pass arguments to `list_volumes` via keyword arguments. Note that at
|
662
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
663
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
664
|
+
#
|
665
|
+
# @param parent [::String]
|
666
|
+
# Required. Parent value for ListVolumesRequest.
|
667
|
+
# @param page_size [::Integer]
|
668
|
+
# Requested page size. The server might return fewer items than requested.
|
669
|
+
# If unspecified, server will pick an appropriate default.
|
670
|
+
# @param page_token [::String]
|
671
|
+
# A token identifying a page of results from the server.
|
672
|
+
# @param filter [::String]
|
673
|
+
# List filter.
|
674
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
675
|
+
# @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse]
|
676
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
677
|
+
#
|
678
|
+
# @return [::Google::Cloud::BareMetalSolution::V2::ListVolumesResponse]
|
679
|
+
#
|
680
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
681
|
+
def list_volumes request, options = nil
|
682
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
683
|
+
|
684
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListVolumesRequest
|
685
|
+
|
686
|
+
# Converts hash and nil to an options object
|
687
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
688
|
+
|
689
|
+
# Customize the options with defaults
|
690
|
+
call_metadata = @config.rpcs.list_volumes.metadata.to_h
|
691
|
+
|
692
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
693
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
694
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
695
|
+
gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION,
|
696
|
+
transports_version_send: [:rest]
|
697
|
+
|
698
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
699
|
+
|
700
|
+
options.apply_defaults timeout: @config.rpcs.list_volumes.timeout,
|
701
|
+
metadata: call_metadata,
|
702
|
+
retry_policy: @config.rpcs.list_volumes.retry_policy
|
703
|
+
|
704
|
+
options.apply_defaults timeout: @config.timeout,
|
705
|
+
metadata: @config.metadata,
|
706
|
+
retry_policy: @config.retry_policy
|
707
|
+
|
708
|
+
@bare_metal_solution_stub.list_volumes request, options do |result, operation|
|
709
|
+
yield result, operation if block_given?
|
710
|
+
return result
|
711
|
+
end
|
712
|
+
rescue ::Gapic::Rest::Error => e
|
713
|
+
raise ::Google::Cloud::Error.from_error(e)
|
714
|
+
end
|
715
|
+
|
716
|
+
##
|
717
|
+
# Get details of a single storage volume.
|
718
|
+
#
|
719
|
+
# @overload get_volume(request, options = nil)
|
720
|
+
# Pass arguments to `get_volume` via a request object, either of type
|
721
|
+
# {::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest} or an equivalent Hash.
|
722
|
+
#
|
723
|
+
# @param request [::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest, ::Hash]
|
724
|
+
# A request object representing the call parameters. Required. To specify no
|
725
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
726
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
727
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
728
|
+
#
|
729
|
+
# @overload get_volume(name: nil)
|
730
|
+
# Pass arguments to `get_volume` via keyword arguments. Note that at
|
731
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
732
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
733
|
+
#
|
734
|
+
# @param name [::String]
|
735
|
+
# Required. Name of the resource.
|
736
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
737
|
+
# @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Volume]
|
738
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
739
|
+
#
|
740
|
+
# @return [::Google::Cloud::BareMetalSolution::V2::Volume]
|
741
|
+
#
|
742
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
743
|
+
def get_volume request, options = nil
|
744
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
745
|
+
|
746
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetVolumeRequest
|
747
|
+
|
748
|
+
# Converts hash and nil to an options object
|
749
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
750
|
+
|
751
|
+
# Customize the options with defaults
|
752
|
+
call_metadata = @config.rpcs.get_volume.metadata.to_h
|
753
|
+
|
754
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
755
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
756
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
757
|
+
gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION,
|
758
|
+
transports_version_send: [:rest]
|
759
|
+
|
760
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
761
|
+
|
762
|
+
options.apply_defaults timeout: @config.rpcs.get_volume.timeout,
|
763
|
+
metadata: call_metadata,
|
764
|
+
retry_policy: @config.rpcs.get_volume.retry_policy
|
765
|
+
|
766
|
+
options.apply_defaults timeout: @config.timeout,
|
767
|
+
metadata: @config.metadata,
|
768
|
+
retry_policy: @config.retry_policy
|
769
|
+
|
770
|
+
@bare_metal_solution_stub.get_volume request, options do |result, operation|
|
771
|
+
yield result, operation if block_given?
|
772
|
+
return result
|
773
|
+
end
|
774
|
+
rescue ::Gapic::Rest::Error => e
|
775
|
+
raise ::Google::Cloud::Error.from_error(e)
|
776
|
+
end
|
777
|
+
|
778
|
+
##
|
779
|
+
# Update details of a single storage volume.
|
780
|
+
#
|
781
|
+
# @overload update_volume(request, options = nil)
|
782
|
+
# Pass arguments to `update_volume` via a request object, either of type
|
783
|
+
# {::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest} or an equivalent Hash.
|
784
|
+
#
|
785
|
+
# @param request [::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest, ::Hash]
|
786
|
+
# A request object representing the call parameters. Required. To specify no
|
787
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
788
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
789
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
790
|
+
#
|
791
|
+
# @overload update_volume(volume: nil, update_mask: nil)
|
792
|
+
# Pass arguments to `update_volume` via keyword arguments. Note that at
|
793
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
794
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
795
|
+
#
|
796
|
+
# @param volume [::Google::Cloud::BareMetalSolution::V2::Volume, ::Hash]
|
797
|
+
# Required. The volume to update.
|
798
|
+
#
|
799
|
+
# The `name` field is used to identify the volume to update.
|
800
|
+
# Format: projects/\\{project}/locations/\\{location}/volumes/\\{volume}
|
801
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
802
|
+
# The list of fields to update.
|
803
|
+
# The only currently supported fields are:
|
804
|
+
# `snapshot_auto_delete_behavior`
|
805
|
+
# `snapshot_schedule_policy_name`
|
806
|
+
# 'labels'
|
807
|
+
# 'snapshot_enabled'
|
808
|
+
# 'snapshot_reservation_detail.reserved_space_percent'
|
809
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
810
|
+
# @yieldparam result [::Gapic::Operation]
|
811
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
812
|
+
#
|
813
|
+
# @return [::Gapic::Operation]
|
814
|
+
#
|
815
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
816
|
+
def update_volume request, options = nil
|
817
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
818
|
+
|
819
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateVolumeRequest
|
820
|
+
|
821
|
+
# Converts hash and nil to an options object
|
822
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
823
|
+
|
824
|
+
# Customize the options with defaults
|
825
|
+
call_metadata = @config.rpcs.update_volume.metadata.to_h
|
826
|
+
|
827
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
828
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
829
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
830
|
+
gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION,
|
831
|
+
transports_version_send: [:rest]
|
832
|
+
|
833
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
834
|
+
|
835
|
+
options.apply_defaults timeout: @config.rpcs.update_volume.timeout,
|
836
|
+
metadata: call_metadata,
|
837
|
+
retry_policy: @config.rpcs.update_volume.retry_policy
|
838
|
+
|
839
|
+
options.apply_defaults timeout: @config.timeout,
|
840
|
+
metadata: @config.metadata,
|
841
|
+
retry_policy: @config.retry_policy
|
842
|
+
|
843
|
+
@bare_metal_solution_stub.update_volume request, options do |result, operation|
|
844
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
845
|
+
yield result, operation if block_given?
|
846
|
+
return result
|
847
|
+
end
|
848
|
+
rescue ::Gapic::Rest::Error => e
|
849
|
+
raise ::Google::Cloud::Error.from_error(e)
|
850
|
+
end
|
851
|
+
|
852
|
+
##
|
853
|
+
# Emergency Volume resize.
|
854
|
+
#
|
855
|
+
# @overload resize_volume(request, options = nil)
|
856
|
+
# Pass arguments to `resize_volume` via a request object, either of type
|
857
|
+
# {::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest} or an equivalent Hash.
|
858
|
+
#
|
859
|
+
# @param request [::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest, ::Hash]
|
860
|
+
# A request object representing the call parameters. Required. To specify no
|
861
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
862
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
863
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
864
|
+
#
|
865
|
+
# @overload resize_volume(volume: nil, size_gib: nil)
|
866
|
+
# Pass arguments to `resize_volume` via keyword arguments. Note that at
|
867
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
868
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
869
|
+
#
|
870
|
+
# @param volume [::String]
|
871
|
+
# Required. Volume to resize.
|
872
|
+
# @param size_gib [::Integer]
|
873
|
+
# New Volume size, in GiB.
|
874
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
875
|
+
# @yieldparam result [::Gapic::Operation]
|
876
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
877
|
+
#
|
878
|
+
# @return [::Gapic::Operation]
|
879
|
+
#
|
880
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
881
|
+
def resize_volume request, options = nil
|
882
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
883
|
+
|
884
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ResizeVolumeRequest
|
885
|
+
|
886
|
+
# Converts hash and nil to an options object
|
887
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
888
|
+
|
889
|
+
# Customize the options with defaults
|
890
|
+
call_metadata = @config.rpcs.resize_volume.metadata.to_h
|
891
|
+
|
892
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
893
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
894
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
895
|
+
gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION,
|
896
|
+
transports_version_send: [:rest]
|
897
|
+
|
898
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
899
|
+
|
900
|
+
options.apply_defaults timeout: @config.rpcs.resize_volume.timeout,
|
901
|
+
metadata: call_metadata,
|
902
|
+
retry_policy: @config.rpcs.resize_volume.retry_policy
|
903
|
+
|
904
|
+
options.apply_defaults timeout: @config.timeout,
|
905
|
+
metadata: @config.metadata,
|
906
|
+
retry_policy: @config.retry_policy
|
907
|
+
|
908
|
+
@bare_metal_solution_stub.resize_volume request, options do |result, operation|
|
909
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
910
|
+
yield result, operation if block_given?
|
911
|
+
return result
|
912
|
+
end
|
913
|
+
rescue ::Gapic::Rest::Error => e
|
914
|
+
raise ::Google::Cloud::Error.from_error(e)
|
915
|
+
end
|
916
|
+
|
917
|
+
##
|
918
|
+
# List network in a given project and location.
|
919
|
+
#
|
920
|
+
# @overload list_networks(request, options = nil)
|
921
|
+
# Pass arguments to `list_networks` via a request object, either of type
|
922
|
+
# {::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest} or an equivalent Hash.
|
923
|
+
#
|
924
|
+
# @param request [::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest, ::Hash]
|
925
|
+
# A request object representing the call parameters. Required. To specify no
|
926
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
927
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
928
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
929
|
+
#
|
930
|
+
# @overload list_networks(parent: nil, page_size: nil, page_token: nil, filter: nil)
|
931
|
+
# Pass arguments to `list_networks` via keyword arguments. Note that at
|
932
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
933
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
934
|
+
#
|
935
|
+
# @param parent [::String]
|
936
|
+
# Required. Parent value for ListNetworksRequest.
|
937
|
+
# @param page_size [::Integer]
|
938
|
+
# Requested page size. The server might return fewer items than requested.
|
939
|
+
# If unspecified, server will pick an appropriate default.
|
940
|
+
# @param page_token [::String]
|
941
|
+
# A token identifying a page of results from the server.
|
942
|
+
# @param filter [::String]
|
943
|
+
# List filter.
|
944
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
945
|
+
# @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse]
|
946
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
947
|
+
#
|
948
|
+
# @return [::Google::Cloud::BareMetalSolution::V2::ListNetworksResponse]
|
949
|
+
#
|
950
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
951
|
+
def list_networks request, options = nil
|
952
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
953
|
+
|
954
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNetworksRequest
|
955
|
+
|
956
|
+
# Converts hash and nil to an options object
|
957
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
958
|
+
|
959
|
+
# Customize the options with defaults
|
960
|
+
call_metadata = @config.rpcs.list_networks.metadata.to_h
|
961
|
+
|
962
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
963
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
964
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
965
|
+
gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION,
|
966
|
+
transports_version_send: [:rest]
|
967
|
+
|
968
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
969
|
+
|
970
|
+
options.apply_defaults timeout: @config.rpcs.list_networks.timeout,
|
971
|
+
metadata: call_metadata,
|
972
|
+
retry_policy: @config.rpcs.list_networks.retry_policy
|
973
|
+
|
974
|
+
options.apply_defaults timeout: @config.timeout,
|
975
|
+
metadata: @config.metadata,
|
976
|
+
retry_policy: @config.retry_policy
|
977
|
+
|
978
|
+
@bare_metal_solution_stub.list_networks request, options do |result, operation|
|
979
|
+
yield result, operation if block_given?
|
980
|
+
return result
|
981
|
+
end
|
982
|
+
rescue ::Gapic::Rest::Error => e
|
983
|
+
raise ::Google::Cloud::Error.from_error(e)
|
984
|
+
end
|
985
|
+
|
986
|
+
##
|
987
|
+
# List all Networks (and used IPs for each Network) in the vendor account
|
988
|
+
# associated with the specified project.
|
989
|
+
#
|
990
|
+
# @overload list_network_usage(request, options = nil)
|
991
|
+
# Pass arguments to `list_network_usage` via a request object, either of type
|
992
|
+
# {::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest} or an equivalent Hash.
|
993
|
+
#
|
994
|
+
# @param request [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest, ::Hash]
|
995
|
+
# A request object representing the call parameters. Required. To specify no
|
996
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
997
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
998
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
999
|
+
#
|
1000
|
+
# @overload list_network_usage(location: nil)
|
1001
|
+
# Pass arguments to `list_network_usage` via keyword arguments. Note that at
|
1002
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1003
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1004
|
+
#
|
1005
|
+
# @param location [::String]
|
1006
|
+
# Required. Parent value (project and location).
|
1007
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1008
|
+
# @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse]
|
1009
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1010
|
+
#
|
1011
|
+
# @return [::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageResponse]
|
1012
|
+
#
|
1013
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1014
|
+
def list_network_usage request, options = nil
|
1015
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1016
|
+
|
1017
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNetworkUsageRequest
|
1018
|
+
|
1019
|
+
# Converts hash and nil to an options object
|
1020
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1021
|
+
|
1022
|
+
# Customize the options with defaults
|
1023
|
+
call_metadata = @config.rpcs.list_network_usage.metadata.to_h
|
1024
|
+
|
1025
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1026
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1027
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1028
|
+
gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION,
|
1029
|
+
transports_version_send: [:rest]
|
1030
|
+
|
1031
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1032
|
+
|
1033
|
+
options.apply_defaults timeout: @config.rpcs.list_network_usage.timeout,
|
1034
|
+
metadata: call_metadata,
|
1035
|
+
retry_policy: @config.rpcs.list_network_usage.retry_policy
|
1036
|
+
|
1037
|
+
options.apply_defaults timeout: @config.timeout,
|
1038
|
+
metadata: @config.metadata,
|
1039
|
+
retry_policy: @config.retry_policy
|
1040
|
+
|
1041
|
+
@bare_metal_solution_stub.list_network_usage request, options do |result, operation|
|
1042
|
+
yield result, operation if block_given?
|
1043
|
+
return result
|
1044
|
+
end
|
1045
|
+
rescue ::Gapic::Rest::Error => e
|
1046
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1047
|
+
end
|
1048
|
+
|
1049
|
+
##
|
1050
|
+
# Get details of a single network.
|
1051
|
+
#
|
1052
|
+
# @overload get_network(request, options = nil)
|
1053
|
+
# Pass arguments to `get_network` via a request object, either of type
|
1054
|
+
# {::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest} or an equivalent Hash.
|
1055
|
+
#
|
1056
|
+
# @param request [::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest, ::Hash]
|
1057
|
+
# A request object representing the call parameters. Required. To specify no
|
1058
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1059
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1060
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1061
|
+
#
|
1062
|
+
# @overload get_network(name: nil)
|
1063
|
+
# Pass arguments to `get_network` via keyword arguments. Note that at
|
1064
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1065
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1066
|
+
#
|
1067
|
+
# @param name [::String]
|
1068
|
+
# Required. Name of the resource.
|
1069
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1070
|
+
# @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Network]
|
1071
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1072
|
+
#
|
1073
|
+
# @return [::Google::Cloud::BareMetalSolution::V2::Network]
|
1074
|
+
#
|
1075
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1076
|
+
def get_network request, options = nil
|
1077
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1078
|
+
|
1079
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetNetworkRequest
|
1080
|
+
|
1081
|
+
# Converts hash and nil to an options object
|
1082
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1083
|
+
|
1084
|
+
# Customize the options with defaults
|
1085
|
+
call_metadata = @config.rpcs.get_network.metadata.to_h
|
1086
|
+
|
1087
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1088
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1089
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1090
|
+
gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION,
|
1091
|
+
transports_version_send: [:rest]
|
1092
|
+
|
1093
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1094
|
+
|
1095
|
+
options.apply_defaults timeout: @config.rpcs.get_network.timeout,
|
1096
|
+
metadata: call_metadata,
|
1097
|
+
retry_policy: @config.rpcs.get_network.retry_policy
|
1098
|
+
|
1099
|
+
options.apply_defaults timeout: @config.timeout,
|
1100
|
+
metadata: @config.metadata,
|
1101
|
+
retry_policy: @config.retry_policy
|
1102
|
+
|
1103
|
+
@bare_metal_solution_stub.get_network request, options do |result, operation|
|
1104
|
+
yield result, operation if block_given?
|
1105
|
+
return result
|
1106
|
+
end
|
1107
|
+
rescue ::Gapic::Rest::Error => e
|
1108
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1109
|
+
end
|
1110
|
+
|
1111
|
+
##
|
1112
|
+
# Update details of a single network.
|
1113
|
+
#
|
1114
|
+
# @overload update_network(request, options = nil)
|
1115
|
+
# Pass arguments to `update_network` via a request object, either of type
|
1116
|
+
# {::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest} or an equivalent Hash.
|
1117
|
+
#
|
1118
|
+
# @param request [::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest, ::Hash]
|
1119
|
+
# A request object representing the call parameters. Required. To specify no
|
1120
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1121
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1122
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1123
|
+
#
|
1124
|
+
# @overload update_network(network: nil, update_mask: nil)
|
1125
|
+
# Pass arguments to `update_network` via keyword arguments. Note that at
|
1126
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1127
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1128
|
+
#
|
1129
|
+
# @param network [::Google::Cloud::BareMetalSolution::V2::Network, ::Hash]
|
1130
|
+
# Required. The network to update.
|
1131
|
+
#
|
1132
|
+
# The `name` field is used to identify the instance to update.
|
1133
|
+
# Format: projects/\\{project}/locations/\\{location}/networks/\\{network}
|
1134
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1135
|
+
# The list of fields to update.
|
1136
|
+
# The only currently supported fields are:
|
1137
|
+
# `labels`, `reservations`
|
1138
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1139
|
+
# @yieldparam result [::Gapic::Operation]
|
1140
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1141
|
+
#
|
1142
|
+
# @return [::Gapic::Operation]
|
1143
|
+
#
|
1144
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1145
|
+
def update_network request, options = nil
|
1146
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1147
|
+
|
1148
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateNetworkRequest
|
1149
|
+
|
1150
|
+
# Converts hash and nil to an options object
|
1151
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1152
|
+
|
1153
|
+
# Customize the options with defaults
|
1154
|
+
call_metadata = @config.rpcs.update_network.metadata.to_h
|
1155
|
+
|
1156
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1157
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1158
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1159
|
+
gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION,
|
1160
|
+
transports_version_send: [:rest]
|
1161
|
+
|
1162
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1163
|
+
|
1164
|
+
options.apply_defaults timeout: @config.rpcs.update_network.timeout,
|
1165
|
+
metadata: call_metadata,
|
1166
|
+
retry_policy: @config.rpcs.update_network.retry_policy
|
1167
|
+
|
1168
|
+
options.apply_defaults timeout: @config.timeout,
|
1169
|
+
metadata: @config.metadata,
|
1170
|
+
retry_policy: @config.retry_policy
|
1171
|
+
|
1172
|
+
@bare_metal_solution_stub.update_network request, options do |result, operation|
|
1173
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1174
|
+
yield result, operation if block_given?
|
1175
|
+
return result
|
1176
|
+
end
|
1177
|
+
rescue ::Gapic::Rest::Error => e
|
1178
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1179
|
+
end
|
1180
|
+
|
1181
|
+
##
|
1182
|
+
# Get details of a single storage logical unit number(LUN).
|
1183
|
+
#
|
1184
|
+
# @overload get_lun(request, options = nil)
|
1185
|
+
# Pass arguments to `get_lun` via a request object, either of type
|
1186
|
+
# {::Google::Cloud::BareMetalSolution::V2::GetLunRequest} or an equivalent Hash.
|
1187
|
+
#
|
1188
|
+
# @param request [::Google::Cloud::BareMetalSolution::V2::GetLunRequest, ::Hash]
|
1189
|
+
# A request object representing the call parameters. Required. To specify no
|
1190
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1191
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1192
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1193
|
+
#
|
1194
|
+
# @overload get_lun(name: nil)
|
1195
|
+
# Pass arguments to `get_lun` via keyword arguments. Note that at
|
1196
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1197
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1198
|
+
#
|
1199
|
+
# @param name [::String]
|
1200
|
+
# Required. Name of the resource.
|
1201
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1202
|
+
# @yieldparam result [::Google::Cloud::BareMetalSolution::V2::Lun]
|
1203
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1204
|
+
#
|
1205
|
+
# @return [::Google::Cloud::BareMetalSolution::V2::Lun]
|
1206
|
+
#
|
1207
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1208
|
+
def get_lun request, options = nil
|
1209
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1210
|
+
|
1211
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetLunRequest
|
1212
|
+
|
1213
|
+
# Converts hash and nil to an options object
|
1214
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1215
|
+
|
1216
|
+
# Customize the options with defaults
|
1217
|
+
call_metadata = @config.rpcs.get_lun.metadata.to_h
|
1218
|
+
|
1219
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1220
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1221
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1222
|
+
gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION,
|
1223
|
+
transports_version_send: [:rest]
|
1224
|
+
|
1225
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1226
|
+
|
1227
|
+
options.apply_defaults timeout: @config.rpcs.get_lun.timeout,
|
1228
|
+
metadata: call_metadata,
|
1229
|
+
retry_policy: @config.rpcs.get_lun.retry_policy
|
1230
|
+
|
1231
|
+
options.apply_defaults timeout: @config.timeout,
|
1232
|
+
metadata: @config.metadata,
|
1233
|
+
retry_policy: @config.retry_policy
|
1234
|
+
|
1235
|
+
@bare_metal_solution_stub.get_lun request, options do |result, operation|
|
1236
|
+
yield result, operation if block_given?
|
1237
|
+
return result
|
1238
|
+
end
|
1239
|
+
rescue ::Gapic::Rest::Error => e
|
1240
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1241
|
+
end
|
1242
|
+
|
1243
|
+
##
|
1244
|
+
# List storage volume luns for given storage volume.
|
1245
|
+
#
|
1246
|
+
# @overload list_luns(request, options = nil)
|
1247
|
+
# Pass arguments to `list_luns` via a request object, either of type
|
1248
|
+
# {::Google::Cloud::BareMetalSolution::V2::ListLunsRequest} or an equivalent Hash.
|
1249
|
+
#
|
1250
|
+
# @param request [::Google::Cloud::BareMetalSolution::V2::ListLunsRequest, ::Hash]
|
1251
|
+
# A request object representing the call parameters. Required. To specify no
|
1252
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1253
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1254
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1255
|
+
#
|
1256
|
+
# @overload list_luns(parent: nil, page_size: nil, page_token: nil)
|
1257
|
+
# Pass arguments to `list_luns` via keyword arguments. Note that at
|
1258
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1259
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1260
|
+
#
|
1261
|
+
# @param parent [::String]
|
1262
|
+
# Required. Parent value for ListLunsRequest.
|
1263
|
+
# @param page_size [::Integer]
|
1264
|
+
# Requested page size. The server might return fewer items than requested.
|
1265
|
+
# If unspecified, server will pick an appropriate default.
|
1266
|
+
# @param page_token [::String]
|
1267
|
+
# A token identifying a page of results from the server.
|
1268
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1269
|
+
# @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListLunsResponse]
|
1270
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1271
|
+
#
|
1272
|
+
# @return [::Google::Cloud::BareMetalSolution::V2::ListLunsResponse]
|
1273
|
+
#
|
1274
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1275
|
+
def list_luns request, options = nil
|
1276
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1277
|
+
|
1278
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListLunsRequest
|
1279
|
+
|
1280
|
+
# Converts hash and nil to an options object
|
1281
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1282
|
+
|
1283
|
+
# Customize the options with defaults
|
1284
|
+
call_metadata = @config.rpcs.list_luns.metadata.to_h
|
1285
|
+
|
1286
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1287
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1288
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1289
|
+
gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION,
|
1290
|
+
transports_version_send: [:rest]
|
1291
|
+
|
1292
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1293
|
+
|
1294
|
+
options.apply_defaults timeout: @config.rpcs.list_luns.timeout,
|
1295
|
+
metadata: call_metadata,
|
1296
|
+
retry_policy: @config.rpcs.list_luns.retry_policy
|
1297
|
+
|
1298
|
+
options.apply_defaults timeout: @config.timeout,
|
1299
|
+
metadata: @config.metadata,
|
1300
|
+
retry_policy: @config.retry_policy
|
1301
|
+
|
1302
|
+
@bare_metal_solution_stub.list_luns request, options do |result, operation|
|
1303
|
+
yield result, operation if block_given?
|
1304
|
+
return result
|
1305
|
+
end
|
1306
|
+
rescue ::Gapic::Rest::Error => e
|
1307
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1308
|
+
end
|
1309
|
+
|
1310
|
+
##
|
1311
|
+
# Get details of a single NFS share.
|
1312
|
+
#
|
1313
|
+
# @overload get_nfs_share(request, options = nil)
|
1314
|
+
# Pass arguments to `get_nfs_share` via a request object, either of type
|
1315
|
+
# {::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest} or an equivalent Hash.
|
1316
|
+
#
|
1317
|
+
# @param request [::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest, ::Hash]
|
1318
|
+
# A request object representing the call parameters. Required. To specify no
|
1319
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1320
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1321
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1322
|
+
#
|
1323
|
+
# @overload get_nfs_share(name: nil)
|
1324
|
+
# Pass arguments to `get_nfs_share` via keyword arguments. Note that at
|
1325
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1326
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1327
|
+
#
|
1328
|
+
# @param name [::String]
|
1329
|
+
# Required. Name of the resource.
|
1330
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1331
|
+
# @yieldparam result [::Google::Cloud::BareMetalSolution::V2::NfsShare]
|
1332
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1333
|
+
#
|
1334
|
+
# @return [::Google::Cloud::BareMetalSolution::V2::NfsShare]
|
1335
|
+
#
|
1336
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1337
|
+
def get_nfs_share request, options = nil
|
1338
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1339
|
+
|
1340
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::GetNfsShareRequest
|
1341
|
+
|
1342
|
+
# Converts hash and nil to an options object
|
1343
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1344
|
+
|
1345
|
+
# Customize the options with defaults
|
1346
|
+
call_metadata = @config.rpcs.get_nfs_share.metadata.to_h
|
1347
|
+
|
1348
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1349
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1350
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1351
|
+
gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION,
|
1352
|
+
transports_version_send: [:rest]
|
1353
|
+
|
1354
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1355
|
+
|
1356
|
+
options.apply_defaults timeout: @config.rpcs.get_nfs_share.timeout,
|
1357
|
+
metadata: call_metadata,
|
1358
|
+
retry_policy: @config.rpcs.get_nfs_share.retry_policy
|
1359
|
+
|
1360
|
+
options.apply_defaults timeout: @config.timeout,
|
1361
|
+
metadata: @config.metadata,
|
1362
|
+
retry_policy: @config.retry_policy
|
1363
|
+
|
1364
|
+
@bare_metal_solution_stub.get_nfs_share request, options do |result, operation|
|
1365
|
+
yield result, operation if block_given?
|
1366
|
+
return result
|
1367
|
+
end
|
1368
|
+
rescue ::Gapic::Rest::Error => e
|
1369
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1370
|
+
end
|
1371
|
+
|
1372
|
+
##
|
1373
|
+
# List NFS shares.
|
1374
|
+
#
|
1375
|
+
# @overload list_nfs_shares(request, options = nil)
|
1376
|
+
# Pass arguments to `list_nfs_shares` via a request object, either of type
|
1377
|
+
# {::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest} or an equivalent Hash.
|
1378
|
+
#
|
1379
|
+
# @param request [::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest, ::Hash]
|
1380
|
+
# A request object representing the call parameters. Required. To specify no
|
1381
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1382
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1383
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1384
|
+
#
|
1385
|
+
# @overload list_nfs_shares(parent: nil, page_size: nil, page_token: nil, filter: nil)
|
1386
|
+
# Pass arguments to `list_nfs_shares` via keyword arguments. Note that at
|
1387
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1388
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1389
|
+
#
|
1390
|
+
# @param parent [::String]
|
1391
|
+
# Required. Parent value for ListNfsSharesRequest.
|
1392
|
+
# @param page_size [::Integer]
|
1393
|
+
# Requested page size. The server might return fewer items than requested.
|
1394
|
+
# If unspecified, server will pick an appropriate default.
|
1395
|
+
# @param page_token [::String]
|
1396
|
+
# A token identifying a page of results from the server.
|
1397
|
+
# @param filter [::String]
|
1398
|
+
# List filter.
|
1399
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1400
|
+
# @yieldparam result [::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse]
|
1401
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1402
|
+
#
|
1403
|
+
# @return [::Google::Cloud::BareMetalSolution::V2::ListNfsSharesResponse]
|
1404
|
+
#
|
1405
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1406
|
+
def list_nfs_shares request, options = nil
|
1407
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1408
|
+
|
1409
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::ListNfsSharesRequest
|
1410
|
+
|
1411
|
+
# Converts hash and nil to an options object
|
1412
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1413
|
+
|
1414
|
+
# Customize the options with defaults
|
1415
|
+
call_metadata = @config.rpcs.list_nfs_shares.metadata.to_h
|
1416
|
+
|
1417
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1418
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1419
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1420
|
+
gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION,
|
1421
|
+
transports_version_send: [:rest]
|
1422
|
+
|
1423
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1424
|
+
|
1425
|
+
options.apply_defaults timeout: @config.rpcs.list_nfs_shares.timeout,
|
1426
|
+
metadata: call_metadata,
|
1427
|
+
retry_policy: @config.rpcs.list_nfs_shares.retry_policy
|
1428
|
+
|
1429
|
+
options.apply_defaults timeout: @config.timeout,
|
1430
|
+
metadata: @config.metadata,
|
1431
|
+
retry_policy: @config.retry_policy
|
1432
|
+
|
1433
|
+
@bare_metal_solution_stub.list_nfs_shares request, options do |result, operation|
|
1434
|
+
yield result, operation if block_given?
|
1435
|
+
return result
|
1436
|
+
end
|
1437
|
+
rescue ::Gapic::Rest::Error => e
|
1438
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1439
|
+
end
|
1440
|
+
|
1441
|
+
##
|
1442
|
+
# Update details of a single NFS share.
|
1443
|
+
#
|
1444
|
+
# @overload update_nfs_share(request, options = nil)
|
1445
|
+
# Pass arguments to `update_nfs_share` via a request object, either of type
|
1446
|
+
# {::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest} or an equivalent Hash.
|
1447
|
+
#
|
1448
|
+
# @param request [::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest, ::Hash]
|
1449
|
+
# A request object representing the call parameters. Required. To specify no
|
1450
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1451
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1452
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1453
|
+
#
|
1454
|
+
# @overload update_nfs_share(nfs_share: nil, update_mask: nil)
|
1455
|
+
# Pass arguments to `update_nfs_share` via keyword arguments. Note that at
|
1456
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1457
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1458
|
+
#
|
1459
|
+
# @param nfs_share [::Google::Cloud::BareMetalSolution::V2::NfsShare, ::Hash]
|
1460
|
+
# Required. The NFS share to update.
|
1461
|
+
#
|
1462
|
+
# The `name` field is used to identify the NFS share to update.
|
1463
|
+
# Format: projects/\\{project}/locations/\\{location}/nfsShares/\\{nfs_share}
|
1464
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1465
|
+
# The list of fields to update.
|
1466
|
+
# The only currently supported fields are:
|
1467
|
+
# `labels`
|
1468
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1469
|
+
# @yieldparam result [::Gapic::Operation]
|
1470
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1471
|
+
#
|
1472
|
+
# @return [::Gapic::Operation]
|
1473
|
+
#
|
1474
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1475
|
+
def update_nfs_share request, options = nil
|
1476
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1477
|
+
|
1478
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BareMetalSolution::V2::UpdateNfsShareRequest
|
1479
|
+
|
1480
|
+
# Converts hash and nil to an options object
|
1481
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1482
|
+
|
1483
|
+
# Customize the options with defaults
|
1484
|
+
call_metadata = @config.rpcs.update_nfs_share.metadata.to_h
|
1485
|
+
|
1486
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1487
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1488
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1489
|
+
gapic_version: ::Google::Cloud::BareMetalSolution::V2::VERSION,
|
1490
|
+
transports_version_send: [:rest]
|
1491
|
+
|
1492
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1493
|
+
|
1494
|
+
options.apply_defaults timeout: @config.rpcs.update_nfs_share.timeout,
|
1495
|
+
metadata: call_metadata,
|
1496
|
+
retry_policy: @config.rpcs.update_nfs_share.retry_policy
|
1497
|
+
|
1498
|
+
options.apply_defaults timeout: @config.timeout,
|
1499
|
+
metadata: @config.metadata,
|
1500
|
+
retry_policy: @config.retry_policy
|
1501
|
+
|
1502
|
+
@bare_metal_solution_stub.update_nfs_share request, options do |result, operation|
|
1503
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1504
|
+
yield result, operation if block_given?
|
1505
|
+
return result
|
1506
|
+
end
|
1507
|
+
rescue ::Gapic::Rest::Error => e
|
1508
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1509
|
+
end
|
1510
|
+
|
1511
|
+
##
|
1512
|
+
# Configuration class for the BareMetalSolution REST API.
|
1513
|
+
#
|
1514
|
+
# This class represents the configuration for BareMetalSolution REST,
|
1515
|
+
# providing control over timeouts, retry behavior, logging, transport
|
1516
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
1517
|
+
# applied individually to specific RPCs. See
|
1518
|
+
# {::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client::Configuration::Rpcs}
|
1519
|
+
# for a list of RPCs that can be configured independently.
|
1520
|
+
#
|
1521
|
+
# Configuration can be applied globally to all clients, or to a single client
|
1522
|
+
# on construction.
|
1523
|
+
#
|
1524
|
+
# @example
|
1525
|
+
#
|
1526
|
+
# # Modify the global config, setting the timeout for
|
1527
|
+
# # list_instances to 20 seconds,
|
1528
|
+
# # and all remaining timeouts to 10 seconds.
|
1529
|
+
# ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.configure do |config|
|
1530
|
+
# config.timeout = 10.0
|
1531
|
+
# config.rpcs.list_instances.timeout = 20.0
|
1532
|
+
# end
|
1533
|
+
#
|
1534
|
+
# # Apply the above configuration only to a new client.
|
1535
|
+
# client = ::Google::Cloud::BareMetalSolution::V2::BareMetalSolution::Rest::Client.new do |config|
|
1536
|
+
# config.timeout = 10.0
|
1537
|
+
# config.rpcs.list_instances.timeout = 20.0
|
1538
|
+
# end
|
1539
|
+
#
|
1540
|
+
# @!attribute [rw] endpoint
|
1541
|
+
# The hostname or hostname:port of the service endpoint.
|
1542
|
+
# Defaults to `"baremetalsolution.googleapis.com"`.
|
1543
|
+
# @return [::String]
|
1544
|
+
# @!attribute [rw] credentials
|
1545
|
+
# Credentials to send with calls. You may provide any of the following types:
|
1546
|
+
# * (`String`) The path to a service account key file in JSON format
|
1547
|
+
# * (`Hash`) A service account key as a Hash
|
1548
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1549
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
1550
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1551
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
1552
|
+
# * (`nil`) indicating no credentials
|
1553
|
+
# @return [::Object]
|
1554
|
+
# @!attribute [rw] scope
|
1555
|
+
# The OAuth scopes
|
1556
|
+
# @return [::Array<::String>]
|
1557
|
+
# @!attribute [rw] lib_name
|
1558
|
+
# The library name as recorded in instrumentation and logging
|
1559
|
+
# @return [::String]
|
1560
|
+
# @!attribute [rw] lib_version
|
1561
|
+
# The library version as recorded in instrumentation and logging
|
1562
|
+
# @return [::String]
|
1563
|
+
# @!attribute [rw] timeout
|
1564
|
+
# The call timeout in seconds.
|
1565
|
+
# @return [::Numeric]
|
1566
|
+
# @!attribute [rw] metadata
|
1567
|
+
# Additional headers to be sent with the call.
|
1568
|
+
# @return [::Hash{::Symbol=>::String}]
|
1569
|
+
# @!attribute [rw] retry_policy
|
1570
|
+
# The retry policy. The value is a hash with the following keys:
|
1571
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1572
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1573
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1574
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1575
|
+
# trigger a retry.
|
1576
|
+
# @return [::Hash]
|
1577
|
+
# @!attribute [rw] quota_project
|
1578
|
+
# A separate project against which to charge quota.
|
1579
|
+
# @return [::String]
|
1580
|
+
#
|
1581
|
+
class Configuration
|
1582
|
+
extend ::Gapic::Config
|
1583
|
+
|
1584
|
+
config_attr :endpoint, "baremetalsolution.googleapis.com", ::String
|
1585
|
+
config_attr :credentials, nil do |value|
|
1586
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1587
|
+
allowed.any? { |klass| klass === value }
|
1588
|
+
end
|
1589
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
1590
|
+
config_attr :lib_name, nil, ::String, nil
|
1591
|
+
config_attr :lib_version, nil, ::String, nil
|
1592
|
+
config_attr :timeout, nil, ::Numeric, nil
|
1593
|
+
config_attr :metadata, nil, ::Hash, nil
|
1594
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1595
|
+
config_attr :quota_project, nil, ::String, nil
|
1596
|
+
|
1597
|
+
# @private
|
1598
|
+
# Overrides for http bindings for the RPCs of this service
|
1599
|
+
# are only used when this service is used as mixin, and only
|
1600
|
+
# by the host service.
|
1601
|
+
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
1602
|
+
config_attr :bindings_override, {}, ::Hash, nil
|
1603
|
+
|
1604
|
+
# @private
|
1605
|
+
def initialize parent_config = nil
|
1606
|
+
@parent_config = parent_config unless parent_config.nil?
|
1607
|
+
|
1608
|
+
yield self if block_given?
|
1609
|
+
end
|
1610
|
+
|
1611
|
+
##
|
1612
|
+
# Configurations for individual RPCs
|
1613
|
+
# @return [Rpcs]
|
1614
|
+
#
|
1615
|
+
def rpcs
|
1616
|
+
@rpcs ||= begin
|
1617
|
+
parent_rpcs = nil
|
1618
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
1619
|
+
Rpcs.new parent_rpcs
|
1620
|
+
end
|
1621
|
+
end
|
1622
|
+
|
1623
|
+
##
|
1624
|
+
# Configuration RPC class for the BareMetalSolution API.
|
1625
|
+
#
|
1626
|
+
# Includes fields providing the configuration for each RPC in this service.
|
1627
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
1628
|
+
# the following configuration fields:
|
1629
|
+
#
|
1630
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
1631
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
1632
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
1633
|
+
# include the following keys:
|
1634
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1635
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1636
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1637
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1638
|
+
# trigger a retry.
|
1639
|
+
#
|
1640
|
+
class Rpcs
|
1641
|
+
##
|
1642
|
+
# RPC-specific configuration for `list_instances`
|
1643
|
+
# @return [::Gapic::Config::Method]
|
1644
|
+
#
|
1645
|
+
attr_reader :list_instances
|
1646
|
+
##
|
1647
|
+
# RPC-specific configuration for `get_instance`
|
1648
|
+
# @return [::Gapic::Config::Method]
|
1649
|
+
#
|
1650
|
+
attr_reader :get_instance
|
1651
|
+
##
|
1652
|
+
# RPC-specific configuration for `update_instance`
|
1653
|
+
# @return [::Gapic::Config::Method]
|
1654
|
+
#
|
1655
|
+
attr_reader :update_instance
|
1656
|
+
##
|
1657
|
+
# RPC-specific configuration for `reset_instance`
|
1658
|
+
# @return [::Gapic::Config::Method]
|
1659
|
+
#
|
1660
|
+
attr_reader :reset_instance
|
1661
|
+
##
|
1662
|
+
# RPC-specific configuration for `start_instance`
|
1663
|
+
# @return [::Gapic::Config::Method]
|
1664
|
+
#
|
1665
|
+
attr_reader :start_instance
|
1666
|
+
##
|
1667
|
+
# RPC-specific configuration for `stop_instance`
|
1668
|
+
# @return [::Gapic::Config::Method]
|
1669
|
+
#
|
1670
|
+
attr_reader :stop_instance
|
1671
|
+
##
|
1672
|
+
# RPC-specific configuration for `detach_lun`
|
1673
|
+
# @return [::Gapic::Config::Method]
|
1674
|
+
#
|
1675
|
+
attr_reader :detach_lun
|
1676
|
+
##
|
1677
|
+
# RPC-specific configuration for `list_volumes`
|
1678
|
+
# @return [::Gapic::Config::Method]
|
1679
|
+
#
|
1680
|
+
attr_reader :list_volumes
|
1681
|
+
##
|
1682
|
+
# RPC-specific configuration for `get_volume`
|
1683
|
+
# @return [::Gapic::Config::Method]
|
1684
|
+
#
|
1685
|
+
attr_reader :get_volume
|
1686
|
+
##
|
1687
|
+
# RPC-specific configuration for `update_volume`
|
1688
|
+
# @return [::Gapic::Config::Method]
|
1689
|
+
#
|
1690
|
+
attr_reader :update_volume
|
1691
|
+
##
|
1692
|
+
# RPC-specific configuration for `resize_volume`
|
1693
|
+
# @return [::Gapic::Config::Method]
|
1694
|
+
#
|
1695
|
+
attr_reader :resize_volume
|
1696
|
+
##
|
1697
|
+
# RPC-specific configuration for `list_networks`
|
1698
|
+
# @return [::Gapic::Config::Method]
|
1699
|
+
#
|
1700
|
+
attr_reader :list_networks
|
1701
|
+
##
|
1702
|
+
# RPC-specific configuration for `list_network_usage`
|
1703
|
+
# @return [::Gapic::Config::Method]
|
1704
|
+
#
|
1705
|
+
attr_reader :list_network_usage
|
1706
|
+
##
|
1707
|
+
# RPC-specific configuration for `get_network`
|
1708
|
+
# @return [::Gapic::Config::Method]
|
1709
|
+
#
|
1710
|
+
attr_reader :get_network
|
1711
|
+
##
|
1712
|
+
# RPC-specific configuration for `update_network`
|
1713
|
+
# @return [::Gapic::Config::Method]
|
1714
|
+
#
|
1715
|
+
attr_reader :update_network
|
1716
|
+
##
|
1717
|
+
# RPC-specific configuration for `get_lun`
|
1718
|
+
# @return [::Gapic::Config::Method]
|
1719
|
+
#
|
1720
|
+
attr_reader :get_lun
|
1721
|
+
##
|
1722
|
+
# RPC-specific configuration for `list_luns`
|
1723
|
+
# @return [::Gapic::Config::Method]
|
1724
|
+
#
|
1725
|
+
attr_reader :list_luns
|
1726
|
+
##
|
1727
|
+
# RPC-specific configuration for `get_nfs_share`
|
1728
|
+
# @return [::Gapic::Config::Method]
|
1729
|
+
#
|
1730
|
+
attr_reader :get_nfs_share
|
1731
|
+
##
|
1732
|
+
# RPC-specific configuration for `list_nfs_shares`
|
1733
|
+
# @return [::Gapic::Config::Method]
|
1734
|
+
#
|
1735
|
+
attr_reader :list_nfs_shares
|
1736
|
+
##
|
1737
|
+
# RPC-specific configuration for `update_nfs_share`
|
1738
|
+
# @return [::Gapic::Config::Method]
|
1739
|
+
#
|
1740
|
+
attr_reader :update_nfs_share
|
1741
|
+
|
1742
|
+
# @private
|
1743
|
+
def initialize parent_rpcs = nil
|
1744
|
+
list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances
|
1745
|
+
@list_instances = ::Gapic::Config::Method.new list_instances_config
|
1746
|
+
get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance
|
1747
|
+
@get_instance = ::Gapic::Config::Method.new get_instance_config
|
1748
|
+
update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance
|
1749
|
+
@update_instance = ::Gapic::Config::Method.new update_instance_config
|
1750
|
+
reset_instance_config = parent_rpcs.reset_instance if parent_rpcs.respond_to? :reset_instance
|
1751
|
+
@reset_instance = ::Gapic::Config::Method.new reset_instance_config
|
1752
|
+
start_instance_config = parent_rpcs.start_instance if parent_rpcs.respond_to? :start_instance
|
1753
|
+
@start_instance = ::Gapic::Config::Method.new start_instance_config
|
1754
|
+
stop_instance_config = parent_rpcs.stop_instance if parent_rpcs.respond_to? :stop_instance
|
1755
|
+
@stop_instance = ::Gapic::Config::Method.new stop_instance_config
|
1756
|
+
detach_lun_config = parent_rpcs.detach_lun if parent_rpcs.respond_to? :detach_lun
|
1757
|
+
@detach_lun = ::Gapic::Config::Method.new detach_lun_config
|
1758
|
+
list_volumes_config = parent_rpcs.list_volumes if parent_rpcs.respond_to? :list_volumes
|
1759
|
+
@list_volumes = ::Gapic::Config::Method.new list_volumes_config
|
1760
|
+
get_volume_config = parent_rpcs.get_volume if parent_rpcs.respond_to? :get_volume
|
1761
|
+
@get_volume = ::Gapic::Config::Method.new get_volume_config
|
1762
|
+
update_volume_config = parent_rpcs.update_volume if parent_rpcs.respond_to? :update_volume
|
1763
|
+
@update_volume = ::Gapic::Config::Method.new update_volume_config
|
1764
|
+
resize_volume_config = parent_rpcs.resize_volume if parent_rpcs.respond_to? :resize_volume
|
1765
|
+
@resize_volume = ::Gapic::Config::Method.new resize_volume_config
|
1766
|
+
list_networks_config = parent_rpcs.list_networks if parent_rpcs.respond_to? :list_networks
|
1767
|
+
@list_networks = ::Gapic::Config::Method.new list_networks_config
|
1768
|
+
list_network_usage_config = parent_rpcs.list_network_usage if parent_rpcs.respond_to? :list_network_usage
|
1769
|
+
@list_network_usage = ::Gapic::Config::Method.new list_network_usage_config
|
1770
|
+
get_network_config = parent_rpcs.get_network if parent_rpcs.respond_to? :get_network
|
1771
|
+
@get_network = ::Gapic::Config::Method.new get_network_config
|
1772
|
+
update_network_config = parent_rpcs.update_network if parent_rpcs.respond_to? :update_network
|
1773
|
+
@update_network = ::Gapic::Config::Method.new update_network_config
|
1774
|
+
get_lun_config = parent_rpcs.get_lun if parent_rpcs.respond_to? :get_lun
|
1775
|
+
@get_lun = ::Gapic::Config::Method.new get_lun_config
|
1776
|
+
list_luns_config = parent_rpcs.list_luns if parent_rpcs.respond_to? :list_luns
|
1777
|
+
@list_luns = ::Gapic::Config::Method.new list_luns_config
|
1778
|
+
get_nfs_share_config = parent_rpcs.get_nfs_share if parent_rpcs.respond_to? :get_nfs_share
|
1779
|
+
@get_nfs_share = ::Gapic::Config::Method.new get_nfs_share_config
|
1780
|
+
list_nfs_shares_config = parent_rpcs.list_nfs_shares if parent_rpcs.respond_to? :list_nfs_shares
|
1781
|
+
@list_nfs_shares = ::Gapic::Config::Method.new list_nfs_shares_config
|
1782
|
+
update_nfs_share_config = parent_rpcs.update_nfs_share if parent_rpcs.respond_to? :update_nfs_share
|
1783
|
+
@update_nfs_share = ::Gapic::Config::Method.new update_nfs_share_config
|
1784
|
+
|
1785
|
+
yield self if block_given?
|
1786
|
+
end
|
1787
|
+
end
|
1788
|
+
end
|
1789
|
+
end
|
1790
|
+
end
|
1791
|
+
end
|
1792
|
+
end
|
1793
|
+
end
|
1794
|
+
end
|
1795
|
+
end
|