google-apis-file_v1beta1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,698 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module FileV1beta1
23
+ # Cloud Filestore API
24
+ #
25
+ # The Cloud Filestore API is used for creating and managing cloud file servers.
26
+ #
27
+ # @example
28
+ # require 'google/apis/file_v1beta1'
29
+ #
30
+ # File = Google::Apis::FileV1beta1 # Alias the module
31
+ # service = File::CloudFilestoreService.new
32
+ #
33
+ # @see https://cloud.google.com/filestore/
34
+ class CloudFilestoreService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
+ def initialize
46
+ super('https://file.googleapis.com/', '',
47
+ client_name: 'google-apis-file_v1beta1',
48
+ client_version: Google::Apis::FileV1beta1::GEM_VERSION)
49
+ @batch_path = 'batch'
50
+ end
51
+
52
+ # Gets information about a location.
53
+ # @param [String] name
54
+ # Resource name for the location.
55
+ # @param [String] fields
56
+ # Selector specifying which fields to include in a partial response.
57
+ # @param [String] quota_user
58
+ # Available to use for quota purposes for server-side applications. Can be any
59
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
60
+ # @param [Google::Apis::RequestOptions] options
61
+ # Request-specific options
62
+ #
63
+ # @yield [result, err] Result & error if block supplied
64
+ # @yieldparam result [Google::Apis::FileV1beta1::Location] parsed result object
65
+ # @yieldparam err [StandardError] error object if request failed
66
+ #
67
+ # @return [Google::Apis::FileV1beta1::Location]
68
+ #
69
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
70
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
71
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
72
+ def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
73
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
74
+ command.response_representation = Google::Apis::FileV1beta1::Location::Representation
75
+ command.response_class = Google::Apis::FileV1beta1::Location
76
+ command.params['name'] = name unless name.nil?
77
+ command.query['fields'] = fields unless fields.nil?
78
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
79
+ execute_or_queue_command(command, &block)
80
+ end
81
+
82
+ # Lists information about the supported locations for this service.
83
+ # @param [String] name
84
+ # The resource that owns the locations collection, if applicable.
85
+ # @param [String] filter
86
+ # The standard list filter.
87
+ # @param [Boolean] include_unrevealed_locations
88
+ # If true, the returned list will include locations which are not yet revealed.
89
+ # @param [Fixnum] page_size
90
+ # The standard list page size.
91
+ # @param [String] page_token
92
+ # The standard list page token.
93
+ # @param [String] fields
94
+ # Selector specifying which fields to include in a partial response.
95
+ # @param [String] quota_user
96
+ # Available to use for quota purposes for server-side applications. Can be any
97
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
98
+ # @param [Google::Apis::RequestOptions] options
99
+ # Request-specific options
100
+ #
101
+ # @yield [result, err] Result & error if block supplied
102
+ # @yieldparam result [Google::Apis::FileV1beta1::ListLocationsResponse] parsed result object
103
+ # @yieldparam err [StandardError] error object if request failed
104
+ #
105
+ # @return [Google::Apis::FileV1beta1::ListLocationsResponse]
106
+ #
107
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
108
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
109
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
110
+ def list_project_locations(name, filter: nil, include_unrevealed_locations: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
111
+ command = make_simple_command(:get, 'v1beta1/{+name}/locations', options)
112
+ command.response_representation = Google::Apis::FileV1beta1::ListLocationsResponse::Representation
113
+ command.response_class = Google::Apis::FileV1beta1::ListLocationsResponse
114
+ command.params['name'] = name unless name.nil?
115
+ command.query['filter'] = filter unless filter.nil?
116
+ command.query['includeUnrevealedLocations'] = include_unrevealed_locations unless include_unrevealed_locations.nil?
117
+ command.query['pageSize'] = page_size unless page_size.nil?
118
+ command.query['pageToken'] = page_token unless page_token.nil?
119
+ command.query['fields'] = fields unless fields.nil?
120
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
121
+ execute_or_queue_command(command, &block)
122
+ end
123
+
124
+ # Creates a backup.
125
+ # @param [String] parent
126
+ # Required. The backup's project and location, in the format projects/`
127
+ # project_id`/locations/`location`. In Cloud Filestore, backup locations map to
128
+ # GCP regions, for example **us-west1**.
129
+ # @param [Google::Apis::FileV1beta1::Backup] backup_object
130
+ # @param [String] backup_id
131
+ # Required. The ID to use for the backup. The ID must be unique within the
132
+ # specified project and location. This value must start with a lowercase letter
133
+ # followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end
134
+ # with a hyphen.
135
+ # @param [String] fields
136
+ # Selector specifying which fields to include in a partial response.
137
+ # @param [String] quota_user
138
+ # Available to use for quota purposes for server-side applications. Can be any
139
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
140
+ # @param [Google::Apis::RequestOptions] options
141
+ # Request-specific options
142
+ #
143
+ # @yield [result, err] Result & error if block supplied
144
+ # @yieldparam result [Google::Apis::FileV1beta1::Operation] parsed result object
145
+ # @yieldparam err [StandardError] error object if request failed
146
+ #
147
+ # @return [Google::Apis::FileV1beta1::Operation]
148
+ #
149
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
150
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
151
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
152
+ def create_project_location_backup(parent, backup_object = nil, backup_id: nil, fields: nil, quota_user: nil, options: nil, &block)
153
+ command = make_simple_command(:post, 'v1beta1/{+parent}/backups', options)
154
+ command.request_representation = Google::Apis::FileV1beta1::Backup::Representation
155
+ command.request_object = backup_object
156
+ command.response_representation = Google::Apis::FileV1beta1::Operation::Representation
157
+ command.response_class = Google::Apis::FileV1beta1::Operation
158
+ command.params['parent'] = parent unless parent.nil?
159
+ command.query['backupId'] = backup_id unless backup_id.nil?
160
+ command.query['fields'] = fields unless fields.nil?
161
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
162
+ execute_or_queue_command(command, &block)
163
+ end
164
+
165
+ # Deletes a backup.
166
+ # @param [String] name
167
+ # Required. The backup resource name, in the format projects/`project_id`/
168
+ # locations/`location`/backups/`backup_id`
169
+ # @param [String] fields
170
+ # Selector specifying which fields to include in a partial response.
171
+ # @param [String] quota_user
172
+ # Available to use for quota purposes for server-side applications. Can be any
173
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
174
+ # @param [Google::Apis::RequestOptions] options
175
+ # Request-specific options
176
+ #
177
+ # @yield [result, err] Result & error if block supplied
178
+ # @yieldparam result [Google::Apis::FileV1beta1::Operation] parsed result object
179
+ # @yieldparam err [StandardError] error object if request failed
180
+ #
181
+ # @return [Google::Apis::FileV1beta1::Operation]
182
+ #
183
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
184
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
185
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
186
+ def delete_project_location_backup(name, fields: nil, quota_user: nil, options: nil, &block)
187
+ command = make_simple_command(:delete, 'v1beta1/{+name}', options)
188
+ command.response_representation = Google::Apis::FileV1beta1::Operation::Representation
189
+ command.response_class = Google::Apis::FileV1beta1::Operation
190
+ command.params['name'] = name unless name.nil?
191
+ command.query['fields'] = fields unless fields.nil?
192
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
193
+ execute_or_queue_command(command, &block)
194
+ end
195
+
196
+ # Gets the details of a specific backup.
197
+ # @param [String] name
198
+ # Required. The backup resource name, in the format projects/`project_id`/
199
+ # locations/`location`/backups/`backup_id`.
200
+ # @param [String] fields
201
+ # Selector specifying which fields to include in a partial response.
202
+ # @param [String] quota_user
203
+ # Available to use for quota purposes for server-side applications. Can be any
204
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
205
+ # @param [Google::Apis::RequestOptions] options
206
+ # Request-specific options
207
+ #
208
+ # @yield [result, err] Result & error if block supplied
209
+ # @yieldparam result [Google::Apis::FileV1beta1::Backup] parsed result object
210
+ # @yieldparam err [StandardError] error object if request failed
211
+ #
212
+ # @return [Google::Apis::FileV1beta1::Backup]
213
+ #
214
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
215
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
216
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
217
+ def get_project_location_backup(name, fields: nil, quota_user: nil, options: nil, &block)
218
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
219
+ command.response_representation = Google::Apis::FileV1beta1::Backup::Representation
220
+ command.response_class = Google::Apis::FileV1beta1::Backup
221
+ command.params['name'] = name unless name.nil?
222
+ command.query['fields'] = fields unless fields.nil?
223
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
224
+ execute_or_queue_command(command, &block)
225
+ end
226
+
227
+ # Lists all backups in a project for either a specified location or for all
228
+ # locations.
229
+ # @param [String] parent
230
+ # Required. The project and location for which to retrieve backup information,
231
+ # in the format projects/`project_id`/locations/`location`. In Cloud Filestore,
232
+ # backup locations map to GCP regions, for example **us-west1**. To retrieve
233
+ # backup information for all locations, use "-" for the `location` value.
234
+ # @param [String] filter
235
+ # List filter.
236
+ # @param [String] order_by
237
+ # Sort results. Supported values are "name", "name desc" or "" (unsorted).
238
+ # @param [Fixnum] page_size
239
+ # The maximum number of items to return.
240
+ # @param [String] page_token
241
+ # The next_page_token value to use if there are additional results to retrieve
242
+ # for this list request.
243
+ # @param [String] fields
244
+ # Selector specifying which fields to include in a partial response.
245
+ # @param [String] quota_user
246
+ # Available to use for quota purposes for server-side applications. Can be any
247
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
248
+ # @param [Google::Apis::RequestOptions] options
249
+ # Request-specific options
250
+ #
251
+ # @yield [result, err] Result & error if block supplied
252
+ # @yieldparam result [Google::Apis::FileV1beta1::ListBackupsResponse] parsed result object
253
+ # @yieldparam err [StandardError] error object if request failed
254
+ #
255
+ # @return [Google::Apis::FileV1beta1::ListBackupsResponse]
256
+ #
257
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
258
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
259
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
260
+ def list_project_location_backups(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
261
+ command = make_simple_command(:get, 'v1beta1/{+parent}/backups', options)
262
+ command.response_representation = Google::Apis::FileV1beta1::ListBackupsResponse::Representation
263
+ command.response_class = Google::Apis::FileV1beta1::ListBackupsResponse
264
+ command.params['parent'] = parent unless parent.nil?
265
+ command.query['filter'] = filter unless filter.nil?
266
+ command.query['orderBy'] = order_by unless order_by.nil?
267
+ command.query['pageSize'] = page_size unless page_size.nil?
268
+ command.query['pageToken'] = page_token unless page_token.nil?
269
+ command.query['fields'] = fields unless fields.nil?
270
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
271
+ execute_or_queue_command(command, &block)
272
+ end
273
+
274
+ # Updates the settings of a specific backup.
275
+ # @param [String] name
276
+ # Output only. The resource name of the backup, in the format projects/`
277
+ # project_id`/locations/`location_id`/backups/`backup_id`.
278
+ # @param [Google::Apis::FileV1beta1::Backup] backup_object
279
+ # @param [String] update_mask
280
+ # Required. Mask of fields to update. At least one path must be supplied in this
281
+ # field.
282
+ # @param [String] fields
283
+ # Selector specifying which fields to include in a partial response.
284
+ # @param [String] quota_user
285
+ # Available to use for quota purposes for server-side applications. Can be any
286
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
287
+ # @param [Google::Apis::RequestOptions] options
288
+ # Request-specific options
289
+ #
290
+ # @yield [result, err] Result & error if block supplied
291
+ # @yieldparam result [Google::Apis::FileV1beta1::Operation] parsed result object
292
+ # @yieldparam err [StandardError] error object if request failed
293
+ #
294
+ # @return [Google::Apis::FileV1beta1::Operation]
295
+ #
296
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
297
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
298
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
299
+ def patch_project_location_backup(name, backup_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
300
+ command = make_simple_command(:patch, 'v1beta1/{+name}', options)
301
+ command.request_representation = Google::Apis::FileV1beta1::Backup::Representation
302
+ command.request_object = backup_object
303
+ command.response_representation = Google::Apis::FileV1beta1::Operation::Representation
304
+ command.response_class = Google::Apis::FileV1beta1::Operation
305
+ command.params['name'] = name unless name.nil?
306
+ command.query['updateMask'] = update_mask unless update_mask.nil?
307
+ command.query['fields'] = fields unless fields.nil?
308
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
309
+ execute_or_queue_command(command, &block)
310
+ end
311
+
312
+ # Creates an instance. When creating from a backup, the capacity of the new
313
+ # instance needs to be equal to or larger than the capacity of the backup (and
314
+ # also equal to or larger than the minimum capacity of the tier).
315
+ # @param [String] parent
316
+ # Required. The instance's project and location, in the format projects/`
317
+ # project_id`/locations/`location`. In Cloud Filestore, locations map to GCP
318
+ # zones, for example **us-west1-b**.
319
+ # @param [Google::Apis::FileV1beta1::Instance] instance_object
320
+ # @param [String] instance_id
321
+ # Required. The ID of the instance to create. The ID must be unique within the
322
+ # specified project and location. This value must start with a lowercase letter
323
+ # followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end
324
+ # with a hyphen.
325
+ # @param [String] fields
326
+ # Selector specifying which fields to include in a partial response.
327
+ # @param [String] quota_user
328
+ # Available to use for quota purposes for server-side applications. Can be any
329
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
330
+ # @param [Google::Apis::RequestOptions] options
331
+ # Request-specific options
332
+ #
333
+ # @yield [result, err] Result & error if block supplied
334
+ # @yieldparam result [Google::Apis::FileV1beta1::Operation] parsed result object
335
+ # @yieldparam err [StandardError] error object if request failed
336
+ #
337
+ # @return [Google::Apis::FileV1beta1::Operation]
338
+ #
339
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
340
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
341
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
342
+ def create_project_location_instance(parent, instance_object = nil, instance_id: nil, fields: nil, quota_user: nil, options: nil, &block)
343
+ command = make_simple_command(:post, 'v1beta1/{+parent}/instances', options)
344
+ command.request_representation = Google::Apis::FileV1beta1::Instance::Representation
345
+ command.request_object = instance_object
346
+ command.response_representation = Google::Apis::FileV1beta1::Operation::Representation
347
+ command.response_class = Google::Apis::FileV1beta1::Operation
348
+ command.params['parent'] = parent unless parent.nil?
349
+ command.query['instanceId'] = instance_id unless instance_id.nil?
350
+ command.query['fields'] = fields unless fields.nil?
351
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
352
+ execute_or_queue_command(command, &block)
353
+ end
354
+
355
+ # Deletes an instance.
356
+ # @param [String] name
357
+ # Required. The instance resource name, in the format projects/`project_id`/
358
+ # locations/`location`/instances/`instance_id`
359
+ # @param [String] fields
360
+ # Selector specifying which fields to include in a partial response.
361
+ # @param [String] quota_user
362
+ # Available to use for quota purposes for server-side applications. Can be any
363
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
364
+ # @param [Google::Apis::RequestOptions] options
365
+ # Request-specific options
366
+ #
367
+ # @yield [result, err] Result & error if block supplied
368
+ # @yieldparam result [Google::Apis::FileV1beta1::Operation] parsed result object
369
+ # @yieldparam err [StandardError] error object if request failed
370
+ #
371
+ # @return [Google::Apis::FileV1beta1::Operation]
372
+ #
373
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
374
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
375
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
376
+ def delete_project_location_instance(name, fields: nil, quota_user: nil, options: nil, &block)
377
+ command = make_simple_command(:delete, 'v1beta1/{+name}', options)
378
+ command.response_representation = Google::Apis::FileV1beta1::Operation::Representation
379
+ command.response_class = Google::Apis::FileV1beta1::Operation
380
+ command.params['name'] = name unless name.nil?
381
+ command.query['fields'] = fields unless fields.nil?
382
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
383
+ execute_or_queue_command(command, &block)
384
+ end
385
+
386
+ # Gets the details of a specific instance.
387
+ # @param [String] name
388
+ # Required. The instance resource name, in the format projects/`project_id`/
389
+ # locations/`location`/instances/`instance_id`.
390
+ # @param [String] fields
391
+ # Selector specifying which fields to include in a partial response.
392
+ # @param [String] quota_user
393
+ # Available to use for quota purposes for server-side applications. Can be any
394
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
395
+ # @param [Google::Apis::RequestOptions] options
396
+ # Request-specific options
397
+ #
398
+ # @yield [result, err] Result & error if block supplied
399
+ # @yieldparam result [Google::Apis::FileV1beta1::Instance] parsed result object
400
+ # @yieldparam err [StandardError] error object if request failed
401
+ #
402
+ # @return [Google::Apis::FileV1beta1::Instance]
403
+ #
404
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
405
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
406
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
407
+ def get_project_location_instance(name, fields: nil, quota_user: nil, options: nil, &block)
408
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
409
+ command.response_representation = Google::Apis::FileV1beta1::Instance::Representation
410
+ command.response_class = Google::Apis::FileV1beta1::Instance
411
+ command.params['name'] = name unless name.nil?
412
+ command.query['fields'] = fields unless fields.nil?
413
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
414
+ execute_or_queue_command(command, &block)
415
+ end
416
+
417
+ # Lists all instances in a project for either a specified location or for all
418
+ # locations.
419
+ # @param [String] parent
420
+ # Required. The project and location for which to retrieve instance information,
421
+ # in the format projects/`project_id`/locations/`location`. In Cloud Filestore,
422
+ # locations map to GCP zones, for example **us-west1-b**. To retrieve instance
423
+ # information for all locations, use "-" for the `location` value.
424
+ # @param [String] filter
425
+ # List filter.
426
+ # @param [String] order_by
427
+ # Sort results. Supported values are "name", "name desc" or "" (unsorted).
428
+ # @param [Fixnum] page_size
429
+ # The maximum number of items to return.
430
+ # @param [String] page_token
431
+ # The next_page_token value to use if there are additional results to retrieve
432
+ # for this list request.
433
+ # @param [String] fields
434
+ # Selector specifying which fields to include in a partial response.
435
+ # @param [String] quota_user
436
+ # Available to use for quota purposes for server-side applications. Can be any
437
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
438
+ # @param [Google::Apis::RequestOptions] options
439
+ # Request-specific options
440
+ #
441
+ # @yield [result, err] Result & error if block supplied
442
+ # @yieldparam result [Google::Apis::FileV1beta1::ListInstancesResponse] parsed result object
443
+ # @yieldparam err [StandardError] error object if request failed
444
+ #
445
+ # @return [Google::Apis::FileV1beta1::ListInstancesResponse]
446
+ #
447
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
448
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
449
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
450
+ def list_project_location_instances(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
451
+ command = make_simple_command(:get, 'v1beta1/{+parent}/instances', options)
452
+ command.response_representation = Google::Apis::FileV1beta1::ListInstancesResponse::Representation
453
+ command.response_class = Google::Apis::FileV1beta1::ListInstancesResponse
454
+ command.params['parent'] = parent unless parent.nil?
455
+ command.query['filter'] = filter unless filter.nil?
456
+ command.query['orderBy'] = order_by unless order_by.nil?
457
+ command.query['pageSize'] = page_size unless page_size.nil?
458
+ command.query['pageToken'] = page_token unless page_token.nil?
459
+ command.query['fields'] = fields unless fields.nil?
460
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
461
+ execute_or_queue_command(command, &block)
462
+ end
463
+
464
+ # Updates the settings of a specific instance.
465
+ # @param [String] name
466
+ # Output only. The resource name of the instance, in the format projects/`
467
+ # project_id`/locations/`location_id`/instances/`instance_id`.
468
+ # @param [Google::Apis::FileV1beta1::Instance] instance_object
469
+ # @param [String] update_mask
470
+ # Required. Mask of fields to update. At least one path must be supplied in this
471
+ # field. The elements of the repeated paths field may only include these fields:
472
+ # * "description" * "file_shares" * "labels"
473
+ # @param [String] fields
474
+ # Selector specifying which fields to include in a partial response.
475
+ # @param [String] quota_user
476
+ # Available to use for quota purposes for server-side applications. Can be any
477
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
478
+ # @param [Google::Apis::RequestOptions] options
479
+ # Request-specific options
480
+ #
481
+ # @yield [result, err] Result & error if block supplied
482
+ # @yieldparam result [Google::Apis::FileV1beta1::Operation] parsed result object
483
+ # @yieldparam err [StandardError] error object if request failed
484
+ #
485
+ # @return [Google::Apis::FileV1beta1::Operation]
486
+ #
487
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
488
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
489
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
490
+ def patch_project_location_instance(name, instance_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
491
+ command = make_simple_command(:patch, 'v1beta1/{+name}', options)
492
+ command.request_representation = Google::Apis::FileV1beta1::Instance::Representation
493
+ command.request_object = instance_object
494
+ command.response_representation = Google::Apis::FileV1beta1::Operation::Representation
495
+ command.response_class = Google::Apis::FileV1beta1::Operation
496
+ command.params['name'] = name unless name.nil?
497
+ command.query['updateMask'] = update_mask unless update_mask.nil?
498
+ command.query['fields'] = fields unless fields.nil?
499
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
500
+ execute_or_queue_command(command, &block)
501
+ end
502
+
503
+ # Restores an existing instance's file share from a backup. The instance's file
504
+ # share capacity will be set to the backup's capacity or the minimum capacity of
505
+ # the tier, whichever is larger.
506
+ # @param [String] name
507
+ # Required. The resource name of the instance, in the format projects/`
508
+ # project_id`/locations/`location_id`/instances/`instance_id`.
509
+ # @param [Google::Apis::FileV1beta1::RestoreInstanceRequest] restore_instance_request_object
510
+ # @param [String] fields
511
+ # Selector specifying which fields to include in a partial response.
512
+ # @param [String] quota_user
513
+ # Available to use for quota purposes for server-side applications. Can be any
514
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
515
+ # @param [Google::Apis::RequestOptions] options
516
+ # Request-specific options
517
+ #
518
+ # @yield [result, err] Result & error if block supplied
519
+ # @yieldparam result [Google::Apis::FileV1beta1::Operation] parsed result object
520
+ # @yieldparam err [StandardError] error object if request failed
521
+ #
522
+ # @return [Google::Apis::FileV1beta1::Operation]
523
+ #
524
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
525
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
526
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
527
+ def restore_instance(name, restore_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
528
+ command = make_simple_command(:post, 'v1beta1/{+name}:restore', options)
529
+ command.request_representation = Google::Apis::FileV1beta1::RestoreInstanceRequest::Representation
530
+ command.request_object = restore_instance_request_object
531
+ command.response_representation = Google::Apis::FileV1beta1::Operation::Representation
532
+ command.response_class = Google::Apis::FileV1beta1::Operation
533
+ command.params['name'] = name unless name.nil?
534
+ command.query['fields'] = fields unless fields.nil?
535
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
536
+ execute_or_queue_command(command, &block)
537
+ end
538
+
539
+ # Starts asynchronous cancellation on a long-running operation. The server makes
540
+ # a best effort to cancel the operation, but success is not guaranteed. If the
541
+ # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
542
+ # Clients can use Operations.GetOperation or other methods to check whether the
543
+ # cancellation succeeded or whether the operation completed despite cancellation.
544
+ # On successful cancellation, the operation is not deleted; instead, it becomes
545
+ # an operation with an Operation.error value with a google.rpc.Status.code of 1,
546
+ # corresponding to `Code.CANCELLED`.
547
+ # @param [String] name
548
+ # The name of the operation resource to be cancelled.
549
+ # @param [Google::Apis::FileV1beta1::CancelOperationRequest] cancel_operation_request_object
550
+ # @param [String] fields
551
+ # Selector specifying which fields to include in a partial response.
552
+ # @param [String] quota_user
553
+ # Available to use for quota purposes for server-side applications. Can be any
554
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
555
+ # @param [Google::Apis::RequestOptions] options
556
+ # Request-specific options
557
+ #
558
+ # @yield [result, err] Result & error if block supplied
559
+ # @yieldparam result [Google::Apis::FileV1beta1::Empty] parsed result object
560
+ # @yieldparam err [StandardError] error object if request failed
561
+ #
562
+ # @return [Google::Apis::FileV1beta1::Empty]
563
+ #
564
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
565
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
566
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
567
+ def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
568
+ command = make_simple_command(:post, 'v1beta1/{+name}:cancel', options)
569
+ command.request_representation = Google::Apis::FileV1beta1::CancelOperationRequest::Representation
570
+ command.request_object = cancel_operation_request_object
571
+ command.response_representation = Google::Apis::FileV1beta1::Empty::Representation
572
+ command.response_class = Google::Apis::FileV1beta1::Empty
573
+ command.params['name'] = name unless name.nil?
574
+ command.query['fields'] = fields unless fields.nil?
575
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
576
+ execute_or_queue_command(command, &block)
577
+ end
578
+
579
+ # Deletes a long-running operation. This method indicates that the client is no
580
+ # longer interested in the operation result. It does not cancel the operation.
581
+ # If the server doesn't support this method, it returns `google.rpc.Code.
582
+ # UNIMPLEMENTED`.
583
+ # @param [String] name
584
+ # The name of the operation resource to be deleted.
585
+ # @param [String] fields
586
+ # Selector specifying which fields to include in a partial response.
587
+ # @param [String] quota_user
588
+ # Available to use for quota purposes for server-side applications. Can be any
589
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
590
+ # @param [Google::Apis::RequestOptions] options
591
+ # Request-specific options
592
+ #
593
+ # @yield [result, err] Result & error if block supplied
594
+ # @yieldparam result [Google::Apis::FileV1beta1::Empty] parsed result object
595
+ # @yieldparam err [StandardError] error object if request failed
596
+ #
597
+ # @return [Google::Apis::FileV1beta1::Empty]
598
+ #
599
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
600
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
601
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
602
+ def delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
603
+ command = make_simple_command(:delete, 'v1beta1/{+name}', options)
604
+ command.response_representation = Google::Apis::FileV1beta1::Empty::Representation
605
+ command.response_class = Google::Apis::FileV1beta1::Empty
606
+ command.params['name'] = name unless name.nil?
607
+ command.query['fields'] = fields unless fields.nil?
608
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
609
+ execute_or_queue_command(command, &block)
610
+ end
611
+
612
+ # Gets the latest state of a long-running operation. Clients can use this method
613
+ # to poll the operation result at intervals as recommended by the API service.
614
+ # @param [String] name
615
+ # The name of the operation resource.
616
+ # @param [String] fields
617
+ # Selector specifying which fields to include in a partial response.
618
+ # @param [String] quota_user
619
+ # Available to use for quota purposes for server-side applications. Can be any
620
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
621
+ # @param [Google::Apis::RequestOptions] options
622
+ # Request-specific options
623
+ #
624
+ # @yield [result, err] Result & error if block supplied
625
+ # @yieldparam result [Google::Apis::FileV1beta1::Operation] parsed result object
626
+ # @yieldparam err [StandardError] error object if request failed
627
+ #
628
+ # @return [Google::Apis::FileV1beta1::Operation]
629
+ #
630
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
631
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
632
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
633
+ def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
634
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
635
+ command.response_representation = Google::Apis::FileV1beta1::Operation::Representation
636
+ command.response_class = Google::Apis::FileV1beta1::Operation
637
+ command.params['name'] = name unless name.nil?
638
+ command.query['fields'] = fields unless fields.nil?
639
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
640
+ execute_or_queue_command(command, &block)
641
+ end
642
+
643
+ # Lists operations that match the specified filter in the request. If the server
644
+ # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
645
+ # binding allows API services to override the binding to use different resource
646
+ # name schemes, such as `users/*/operations`. To override the binding, API
647
+ # services can add a binding such as `"/v1/`name=users/*`/operations"` to their
648
+ # service configuration. For backwards compatibility, the default name includes
649
+ # the operations collection id, however overriding users must ensure the name
650
+ # binding is the parent resource, without the operations collection id.
651
+ # @param [String] name
652
+ # The name of the operation's parent resource.
653
+ # @param [String] filter
654
+ # The standard list filter.
655
+ # @param [Fixnum] page_size
656
+ # The standard list page size.
657
+ # @param [String] page_token
658
+ # The standard list page token.
659
+ # @param [String] fields
660
+ # Selector specifying which fields to include in a partial response.
661
+ # @param [String] quota_user
662
+ # Available to use for quota purposes for server-side applications. Can be any
663
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
664
+ # @param [Google::Apis::RequestOptions] options
665
+ # Request-specific options
666
+ #
667
+ # @yield [result, err] Result & error if block supplied
668
+ # @yieldparam result [Google::Apis::FileV1beta1::ListOperationsResponse] parsed result object
669
+ # @yieldparam err [StandardError] error object if request failed
670
+ #
671
+ # @return [Google::Apis::FileV1beta1::ListOperationsResponse]
672
+ #
673
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
674
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
675
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
676
+ def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
677
+ command = make_simple_command(:get, 'v1beta1/{+name}/operations', options)
678
+ command.response_representation = Google::Apis::FileV1beta1::ListOperationsResponse::Representation
679
+ command.response_class = Google::Apis::FileV1beta1::ListOperationsResponse
680
+ command.params['name'] = name unless name.nil?
681
+ command.query['filter'] = filter unless filter.nil?
682
+ command.query['pageSize'] = page_size unless page_size.nil?
683
+ command.query['pageToken'] = page_token unless page_token.nil?
684
+ command.query['fields'] = fields unless fields.nil?
685
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
686
+ execute_or_queue_command(command, &block)
687
+ end
688
+
689
+ protected
690
+
691
+ def apply_command_defaults(command)
692
+ command.query['key'] = key unless key.nil?
693
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
694
+ end
695
+ end
696
+ end
697
+ end
698
+ end