google-apis-file_v1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google-apis-file_v1.rb +15 -0
- data/lib/google/apis/file_v1.rb +36 -0
- data/lib/google/apis/file_v1/classes.rb +1445 -0
- data/lib/google/apis/file_v1/gem_version.rb +28 -0
- data/lib/google/apis/file_v1/representations.rb +580 -0
- data/lib/google/apis/file_v1/service.rb +698 -0
- metadata +76 -0
@@ -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 FileV1
|
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_v1'
|
29
|
+
#
|
30
|
+
# File = Google::Apis::FileV1 # 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_v1',
|
48
|
+
client_version: Google::Apis::FileV1::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::FileV1::Location] parsed result object
|
65
|
+
# @yieldparam err [StandardError] error object if request failed
|
66
|
+
#
|
67
|
+
# @return [Google::Apis::FileV1::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, 'v1/{+name}', options)
|
74
|
+
command.response_representation = Google::Apis::FileV1::Location::Representation
|
75
|
+
command.response_class = Google::Apis::FileV1::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::FileV1::ListLocationsResponse] parsed result object
|
103
|
+
# @yieldparam err [StandardError] error object if request failed
|
104
|
+
#
|
105
|
+
# @return [Google::Apis::FileV1::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, 'v1/{+name}/locations', options)
|
112
|
+
command.response_representation = Google::Apis::FileV1::ListLocationsResponse::Representation
|
113
|
+
command.response_class = Google::Apis::FileV1::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_number`/locations/`location`. In Cloud Filestore, backup locations map
|
128
|
+
# to GCP regions, for example **us-west1**.
|
129
|
+
# @param [Google::Apis::FileV1::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. Values that do not match this pattern will trigger an
|
135
|
+
# INVALID_ARGUMENT error.
|
136
|
+
# @param [String] fields
|
137
|
+
# Selector specifying which fields to include in a partial response.
|
138
|
+
# @param [String] quota_user
|
139
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
140
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
141
|
+
# @param [Google::Apis::RequestOptions] options
|
142
|
+
# Request-specific options
|
143
|
+
#
|
144
|
+
# @yield [result, err] Result & error if block supplied
|
145
|
+
# @yieldparam result [Google::Apis::FileV1::Operation] parsed result object
|
146
|
+
# @yieldparam err [StandardError] error object if request failed
|
147
|
+
#
|
148
|
+
# @return [Google::Apis::FileV1::Operation]
|
149
|
+
#
|
150
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
151
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
152
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
153
|
+
def create_project_location_backup(parent, backup_object = nil, backup_id: nil, fields: nil, quota_user: nil, options: nil, &block)
|
154
|
+
command = make_simple_command(:post, 'v1/{+parent}/backups', options)
|
155
|
+
command.request_representation = Google::Apis::FileV1::Backup::Representation
|
156
|
+
command.request_object = backup_object
|
157
|
+
command.response_representation = Google::Apis::FileV1::Operation::Representation
|
158
|
+
command.response_class = Google::Apis::FileV1::Operation
|
159
|
+
command.params['parent'] = parent unless parent.nil?
|
160
|
+
command.query['backupId'] = backup_id unless backup_id.nil?
|
161
|
+
command.query['fields'] = fields unless fields.nil?
|
162
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
163
|
+
execute_or_queue_command(command, &block)
|
164
|
+
end
|
165
|
+
|
166
|
+
# Deletes a backup.
|
167
|
+
# @param [String] name
|
168
|
+
# Required. The backup resource name, in the format projects/`project_number`/
|
169
|
+
# locations/`location`/backups/`backup_id`
|
170
|
+
# @param [String] fields
|
171
|
+
# Selector specifying which fields to include in a partial response.
|
172
|
+
# @param [String] quota_user
|
173
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
174
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
175
|
+
# @param [Google::Apis::RequestOptions] options
|
176
|
+
# Request-specific options
|
177
|
+
#
|
178
|
+
# @yield [result, err] Result & error if block supplied
|
179
|
+
# @yieldparam result [Google::Apis::FileV1::Operation] parsed result object
|
180
|
+
# @yieldparam err [StandardError] error object if request failed
|
181
|
+
#
|
182
|
+
# @return [Google::Apis::FileV1::Operation]
|
183
|
+
#
|
184
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
185
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
186
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
187
|
+
def delete_project_location_backup(name, fields: nil, quota_user: nil, options: nil, &block)
|
188
|
+
command = make_simple_command(:delete, 'v1/{+name}', options)
|
189
|
+
command.response_representation = Google::Apis::FileV1::Operation::Representation
|
190
|
+
command.response_class = Google::Apis::FileV1::Operation
|
191
|
+
command.params['name'] = name unless name.nil?
|
192
|
+
command.query['fields'] = fields unless fields.nil?
|
193
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
194
|
+
execute_or_queue_command(command, &block)
|
195
|
+
end
|
196
|
+
|
197
|
+
# Gets the details of a specific backup.
|
198
|
+
# @param [String] name
|
199
|
+
# Required. The backup resource name, in the format projects/`project_number`/
|
200
|
+
# locations/`location`/backups/`backup_id`.
|
201
|
+
# @param [String] fields
|
202
|
+
# Selector specifying which fields to include in a partial response.
|
203
|
+
# @param [String] quota_user
|
204
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
205
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
206
|
+
# @param [Google::Apis::RequestOptions] options
|
207
|
+
# Request-specific options
|
208
|
+
#
|
209
|
+
# @yield [result, err] Result & error if block supplied
|
210
|
+
# @yieldparam result [Google::Apis::FileV1::Backup] parsed result object
|
211
|
+
# @yieldparam err [StandardError] error object if request failed
|
212
|
+
#
|
213
|
+
# @return [Google::Apis::FileV1::Backup]
|
214
|
+
#
|
215
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
216
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
217
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
218
|
+
def get_project_location_backup(name, fields: nil, quota_user: nil, options: nil, &block)
|
219
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
220
|
+
command.response_representation = Google::Apis::FileV1::Backup::Representation
|
221
|
+
command.response_class = Google::Apis::FileV1::Backup
|
222
|
+
command.params['name'] = name unless name.nil?
|
223
|
+
command.query['fields'] = fields unless fields.nil?
|
224
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
225
|
+
execute_or_queue_command(command, &block)
|
226
|
+
end
|
227
|
+
|
228
|
+
# Lists all backups in a project for either a specified location or for all
|
229
|
+
# locations.
|
230
|
+
# @param [String] parent
|
231
|
+
# Required. The project and location for which to retrieve backup information,
|
232
|
+
# in the format projects/`project_number`/locations/`location`. In Cloud
|
233
|
+
# Filestore, backup locations map to GCP regions, for example **us-west1**. To
|
234
|
+
# retrieve backup information for all locations, use "-" for the `location`
|
235
|
+
# value.
|
236
|
+
# @param [String] filter
|
237
|
+
# List filter.
|
238
|
+
# @param [String] order_by
|
239
|
+
# Sort results. Supported values are "name", "name desc" or "" (unsorted).
|
240
|
+
# @param [Fixnum] page_size
|
241
|
+
# The maximum number of items to return.
|
242
|
+
# @param [String] page_token
|
243
|
+
# The next_page_token value to use if there are additional results to retrieve
|
244
|
+
# for this list request.
|
245
|
+
# @param [String] fields
|
246
|
+
# Selector specifying which fields to include in a partial response.
|
247
|
+
# @param [String] quota_user
|
248
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
249
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
250
|
+
# @param [Google::Apis::RequestOptions] options
|
251
|
+
# Request-specific options
|
252
|
+
#
|
253
|
+
# @yield [result, err] Result & error if block supplied
|
254
|
+
# @yieldparam result [Google::Apis::FileV1::ListBackupsResponse] parsed result object
|
255
|
+
# @yieldparam err [StandardError] error object if request failed
|
256
|
+
#
|
257
|
+
# @return [Google::Apis::FileV1::ListBackupsResponse]
|
258
|
+
#
|
259
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
260
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
261
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
262
|
+
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)
|
263
|
+
command = make_simple_command(:get, 'v1/{+parent}/backups', options)
|
264
|
+
command.response_representation = Google::Apis::FileV1::ListBackupsResponse::Representation
|
265
|
+
command.response_class = Google::Apis::FileV1::ListBackupsResponse
|
266
|
+
command.params['parent'] = parent unless parent.nil?
|
267
|
+
command.query['filter'] = filter unless filter.nil?
|
268
|
+
command.query['orderBy'] = order_by unless order_by.nil?
|
269
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
270
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
271
|
+
command.query['fields'] = fields unless fields.nil?
|
272
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
273
|
+
execute_or_queue_command(command, &block)
|
274
|
+
end
|
275
|
+
|
276
|
+
# Updates the settings of a specific backup.
|
277
|
+
# @param [String] name
|
278
|
+
# Output only. The resource name of the backup, in the format projects/`
|
279
|
+
# project_number`/locations/`location_id`/backups/`backup_id`.
|
280
|
+
# @param [Google::Apis::FileV1::Backup] backup_object
|
281
|
+
# @param [String] update_mask
|
282
|
+
# Required. Mask of fields to update. At least one path must be supplied in this
|
283
|
+
# field.
|
284
|
+
# @param [String] fields
|
285
|
+
# Selector specifying which fields to include in a partial response.
|
286
|
+
# @param [String] quota_user
|
287
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
288
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
289
|
+
# @param [Google::Apis::RequestOptions] options
|
290
|
+
# Request-specific options
|
291
|
+
#
|
292
|
+
# @yield [result, err] Result & error if block supplied
|
293
|
+
# @yieldparam result [Google::Apis::FileV1::Operation] parsed result object
|
294
|
+
# @yieldparam err [StandardError] error object if request failed
|
295
|
+
#
|
296
|
+
# @return [Google::Apis::FileV1::Operation]
|
297
|
+
#
|
298
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
299
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
300
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
301
|
+
def patch_project_location_backup(name, backup_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
302
|
+
command = make_simple_command(:patch, 'v1/{+name}', options)
|
303
|
+
command.request_representation = Google::Apis::FileV1::Backup::Representation
|
304
|
+
command.request_object = backup_object
|
305
|
+
command.response_representation = Google::Apis::FileV1::Operation::Representation
|
306
|
+
command.response_class = Google::Apis::FileV1::Operation
|
307
|
+
command.params['name'] = name unless name.nil?
|
308
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
309
|
+
command.query['fields'] = fields unless fields.nil?
|
310
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
311
|
+
execute_or_queue_command(command, &block)
|
312
|
+
end
|
313
|
+
|
314
|
+
# Creates an instance. When creating from a backup, the capacity of the new
|
315
|
+
# instance needs to be equal to or larger than the capacity of the backup (and
|
316
|
+
# also equal to or larger than the minimum capacity of the tier).
|
317
|
+
# @param [String] parent
|
318
|
+
# Required. The instance's project and location, in the format projects/`
|
319
|
+
# project_id`/locations/`location`. In Cloud Filestore, locations map to GCP
|
320
|
+
# zones, for example **us-west1-b**.
|
321
|
+
# @param [Google::Apis::FileV1::Instance] instance_object
|
322
|
+
# @param [String] instance_id
|
323
|
+
# Required. The name of the instance to create. The name must be unique for the
|
324
|
+
# specified project and location.
|
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::FileV1::Operation] parsed result object
|
335
|
+
# @yieldparam err [StandardError] error object if request failed
|
336
|
+
#
|
337
|
+
# @return [Google::Apis::FileV1::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, 'v1/{+parent}/instances', options)
|
344
|
+
command.request_representation = Google::Apis::FileV1::Instance::Representation
|
345
|
+
command.request_object = instance_object
|
346
|
+
command.response_representation = Google::Apis::FileV1::Operation::Representation
|
347
|
+
command.response_class = Google::Apis::FileV1::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::FileV1::Operation] parsed result object
|
369
|
+
# @yieldparam err [StandardError] error object if request failed
|
370
|
+
#
|
371
|
+
# @return [Google::Apis::FileV1::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, 'v1/{+name}', options)
|
378
|
+
command.response_representation = Google::Apis::FileV1::Operation::Representation
|
379
|
+
command.response_class = Google::Apis::FileV1::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::FileV1::Instance] parsed result object
|
400
|
+
# @yieldparam err [StandardError] error object if request failed
|
401
|
+
#
|
402
|
+
# @return [Google::Apis::FileV1::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, 'v1/{+name}', options)
|
409
|
+
command.response_representation = Google::Apis::FileV1::Instance::Representation
|
410
|
+
command.response_class = Google::Apis::FileV1::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::FileV1::ListInstancesResponse] parsed result object
|
443
|
+
# @yieldparam err [StandardError] error object if request failed
|
444
|
+
#
|
445
|
+
# @return [Google::Apis::FileV1::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, 'v1/{+parent}/instances', options)
|
452
|
+
command.response_representation = Google::Apis::FileV1::ListInstancesResponse::Representation
|
453
|
+
command.response_class = Google::Apis::FileV1::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`/locations/`location`/instances/`instance`.
|
468
|
+
# @param [Google::Apis::FileV1::Instance] instance_object
|
469
|
+
# @param [String] update_mask
|
470
|
+
# Mask of fields to update. At least one path must be supplied in this field.
|
471
|
+
# 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::FileV1::Operation] parsed result object
|
483
|
+
# @yieldparam err [StandardError] error object if request failed
|
484
|
+
#
|
485
|
+
# @return [Google::Apis::FileV1::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, 'v1/{+name}', options)
|
492
|
+
command.request_representation = Google::Apis::FileV1::Instance::Representation
|
493
|
+
command.request_object = instance_object
|
494
|
+
command.response_representation = Google::Apis::FileV1::Operation::Representation
|
495
|
+
command.response_class = Google::Apis::FileV1::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_number`/locations/`location_id`/instances/`instance_id`.
|
509
|
+
# @param [Google::Apis::FileV1::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::FileV1::Operation] parsed result object
|
520
|
+
# @yieldparam err [StandardError] error object if request failed
|
521
|
+
#
|
522
|
+
# @return [Google::Apis::FileV1::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, 'v1/{+name}:restore', options)
|
529
|
+
command.request_representation = Google::Apis::FileV1::RestoreInstanceRequest::Representation
|
530
|
+
command.request_object = restore_instance_request_object
|
531
|
+
command.response_representation = Google::Apis::FileV1::Operation::Representation
|
532
|
+
command.response_class = Google::Apis::FileV1::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::FileV1::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::FileV1::Empty] parsed result object
|
560
|
+
# @yieldparam err [StandardError] error object if request failed
|
561
|
+
#
|
562
|
+
# @return [Google::Apis::FileV1::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, 'v1/{+name}:cancel', options)
|
569
|
+
command.request_representation = Google::Apis::FileV1::CancelOperationRequest::Representation
|
570
|
+
command.request_object = cancel_operation_request_object
|
571
|
+
command.response_representation = Google::Apis::FileV1::Empty::Representation
|
572
|
+
command.response_class = Google::Apis::FileV1::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::FileV1::Empty] parsed result object
|
595
|
+
# @yieldparam err [StandardError] error object if request failed
|
596
|
+
#
|
597
|
+
# @return [Google::Apis::FileV1::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, 'v1/{+name}', options)
|
604
|
+
command.response_representation = Google::Apis::FileV1::Empty::Representation
|
605
|
+
command.response_class = Google::Apis::FileV1::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::FileV1::Operation] parsed result object
|
626
|
+
# @yieldparam err [StandardError] error object if request failed
|
627
|
+
#
|
628
|
+
# @return [Google::Apis::FileV1::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, 'v1/{+name}', options)
|
635
|
+
command.response_representation = Google::Apis::FileV1::Operation::Representation
|
636
|
+
command.response_class = Google::Apis::FileV1::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::FileV1::ListOperationsResponse] parsed result object
|
669
|
+
# @yieldparam err [StandardError] error object if request failed
|
670
|
+
#
|
671
|
+
# @return [Google::Apis::FileV1::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, 'v1/{+name}/operations', options)
|
678
|
+
command.response_representation = Google::Apis::FileV1::ListOperationsResponse::Representation
|
679
|
+
command.response_class = Google::Apis::FileV1::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
|