google-apis-workstations_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1274 @@
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 WorkstationsV1
23
+ # Cloud Workstations API
24
+ #
25
+ # Allows administrators to create managed developer environments in the cloud.
26
+ #
27
+ # @example
28
+ # require 'google/apis/workstations_v1'
29
+ #
30
+ # Workstations = Google::Apis::WorkstationsV1 # Alias the module
31
+ # service = Workstations::CloudWorkstationsService.new
32
+ #
33
+ # @see https://cloud.google.com/workstations
34
+ class CloudWorkstationsService < 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://workstations.googleapis.com/', '',
47
+ client_name: 'google-apis-workstations_v1',
48
+ client_version: Google::Apis::WorkstationsV1::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::WorkstationsV1::Location] parsed result object
65
+ # @yieldparam err [StandardError] error object if request failed
66
+ #
67
+ # @return [Google::Apis::WorkstationsV1::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::WorkstationsV1::Location::Representation
75
+ command.response_class = Google::Apis::WorkstationsV1::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
+ # A filter to narrow down results to a preferred subset. The filtering language
87
+ # accepts strings like `"displayName=tokyo"`, and is documented in more detail
88
+ # in [AIP-160](https://google.aip.dev/160).
89
+ # @param [Fixnum] page_size
90
+ # The maximum number of results to return. If not set, the service selects a
91
+ # default.
92
+ # @param [String] page_token
93
+ # A page token received from the `next_page_token` field in the response. Send
94
+ # that page token to receive the subsequent page.
95
+ # @param [String] fields
96
+ # Selector specifying which fields to include in a partial response.
97
+ # @param [String] quota_user
98
+ # Available to use for quota purposes for server-side applications. Can be any
99
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
100
+ # @param [Google::Apis::RequestOptions] options
101
+ # Request-specific options
102
+ #
103
+ # @yield [result, err] Result & error if block supplied
104
+ # @yieldparam result [Google::Apis::WorkstationsV1::ListLocationsResponse] parsed result object
105
+ # @yieldparam err [StandardError] error object if request failed
106
+ #
107
+ # @return [Google::Apis::WorkstationsV1::ListLocationsResponse]
108
+ #
109
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
110
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
111
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
112
+ def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
113
+ command = make_simple_command(:get, 'v1/{+name}/locations', options)
114
+ command.response_representation = Google::Apis::WorkstationsV1::ListLocationsResponse::Representation
115
+ command.response_class = Google::Apis::WorkstationsV1::ListLocationsResponse
116
+ command.params['name'] = name unless name.nil?
117
+ command.query['filter'] = filter unless filter.nil?
118
+ command.query['pageSize'] = page_size unless page_size.nil?
119
+ command.query['pageToken'] = page_token unless page_token.nil?
120
+ command.query['fields'] = fields unless fields.nil?
121
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
122
+ execute_or_queue_command(command, &block)
123
+ end
124
+
125
+ # Starts asynchronous cancellation on a long-running operation. The server makes
126
+ # a best effort to cancel the operation, but success is not guaranteed. If the
127
+ # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
128
+ # Clients can use Operations.GetOperation or other methods to check whether the
129
+ # cancellation succeeded or whether the operation completed despite cancellation.
130
+ # On successful cancellation, the operation is not deleted; instead, it becomes
131
+ # an operation with an Operation.error value with a google.rpc.Status.code of 1,
132
+ # corresponding to `Code.CANCELLED`.
133
+ # @param [String] name
134
+ # The name of the operation resource to be cancelled.
135
+ # @param [Google::Apis::WorkstationsV1::CancelOperationRequest] cancel_operation_request_object
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::WorkstationsV1::GoogleProtobufEmpty] parsed result object
146
+ # @yieldparam err [StandardError] error object if request failed
147
+ #
148
+ # @return [Google::Apis::WorkstationsV1::GoogleProtobufEmpty]
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 cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
154
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
155
+ command.request_representation = Google::Apis::WorkstationsV1::CancelOperationRequest::Representation
156
+ command.request_object = cancel_operation_request_object
157
+ command.response_representation = Google::Apis::WorkstationsV1::GoogleProtobufEmpty::Representation
158
+ command.response_class = Google::Apis::WorkstationsV1::GoogleProtobufEmpty
159
+ command.params['name'] = name unless name.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 long-running operation. This method indicates that the client is no
166
+ # longer interested in the operation result. It does not cancel the operation.
167
+ # If the server doesn't support this method, it returns `google.rpc.Code.
168
+ # UNIMPLEMENTED`.
169
+ # @param [String] name
170
+ # The name of the operation resource to be deleted.
171
+ # @param [String] fields
172
+ # Selector specifying which fields to include in a partial response.
173
+ # @param [String] quota_user
174
+ # Available to use for quota purposes for server-side applications. Can be any
175
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
176
+ # @param [Google::Apis::RequestOptions] options
177
+ # Request-specific options
178
+ #
179
+ # @yield [result, err] Result & error if block supplied
180
+ # @yieldparam result [Google::Apis::WorkstationsV1::GoogleProtobufEmpty] parsed result object
181
+ # @yieldparam err [StandardError] error object if request failed
182
+ #
183
+ # @return [Google::Apis::WorkstationsV1::GoogleProtobufEmpty]
184
+ #
185
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
186
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
187
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
188
+ def delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
189
+ command = make_simple_command(:delete, 'v1/{+name}', options)
190
+ command.response_representation = Google::Apis::WorkstationsV1::GoogleProtobufEmpty::Representation
191
+ command.response_class = Google::Apis::WorkstationsV1::GoogleProtobufEmpty
192
+ command.params['name'] = name unless name.nil?
193
+ command.query['fields'] = fields unless fields.nil?
194
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
195
+ execute_or_queue_command(command, &block)
196
+ end
197
+
198
+ # Gets the latest state of a long-running operation. Clients can use this method
199
+ # to poll the operation result at intervals as recommended by the API service.
200
+ # @param [String] name
201
+ # The name of the operation resource.
202
+ # @param [String] fields
203
+ # Selector specifying which fields to include in a partial response.
204
+ # @param [String] quota_user
205
+ # Available to use for quota purposes for server-side applications. Can be any
206
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
207
+ # @param [Google::Apis::RequestOptions] options
208
+ # Request-specific options
209
+ #
210
+ # @yield [result, err] Result & error if block supplied
211
+ # @yieldparam result [Google::Apis::WorkstationsV1::Operation] parsed result object
212
+ # @yieldparam err [StandardError] error object if request failed
213
+ #
214
+ # @return [Google::Apis::WorkstationsV1::Operation]
215
+ #
216
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
217
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
218
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
219
+ def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
220
+ command = make_simple_command(:get, 'v1/{+name}', options)
221
+ command.response_representation = Google::Apis::WorkstationsV1::Operation::Representation
222
+ command.response_class = Google::Apis::WorkstationsV1::Operation
223
+ command.params['name'] = name unless name.nil?
224
+ command.query['fields'] = fields unless fields.nil?
225
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
226
+ execute_or_queue_command(command, &block)
227
+ end
228
+
229
+ # Lists operations that match the specified filter in the request. If the server
230
+ # doesn't support this method, it returns `UNIMPLEMENTED`.
231
+ # @param [String] name
232
+ # The name of the operation's parent resource.
233
+ # @param [String] filter
234
+ # The standard list filter.
235
+ # @param [Fixnum] page_size
236
+ # The standard list page size.
237
+ # @param [String] page_token
238
+ # The standard list page token.
239
+ # @param [String] fields
240
+ # Selector specifying which fields to include in a partial response.
241
+ # @param [String] quota_user
242
+ # Available to use for quota purposes for server-side applications. Can be any
243
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
244
+ # @param [Google::Apis::RequestOptions] options
245
+ # Request-specific options
246
+ #
247
+ # @yield [result, err] Result & error if block supplied
248
+ # @yieldparam result [Google::Apis::WorkstationsV1::ListOperationsResponse] parsed result object
249
+ # @yieldparam err [StandardError] error object if request failed
250
+ #
251
+ # @return [Google::Apis::WorkstationsV1::ListOperationsResponse]
252
+ #
253
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
254
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
255
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
256
+ def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
257
+ command = make_simple_command(:get, 'v1/{+name}/operations', options)
258
+ command.response_representation = Google::Apis::WorkstationsV1::ListOperationsResponse::Representation
259
+ command.response_class = Google::Apis::WorkstationsV1::ListOperationsResponse
260
+ command.params['name'] = name unless name.nil?
261
+ command.query['filter'] = filter unless filter.nil?
262
+ command.query['pageSize'] = page_size unless page_size.nil?
263
+ command.query['pageToken'] = page_token unless page_token.nil?
264
+ command.query['fields'] = fields unless fields.nil?
265
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
266
+ execute_or_queue_command(command, &block)
267
+ end
268
+
269
+ # Creates a new workstation cluster.
270
+ # @param [String] parent
271
+ # Required. Parent resource name.
272
+ # @param [Google::Apis::WorkstationsV1::WorkstationCluster] workstation_cluster_object
273
+ # @param [Boolean] validate_only
274
+ # Optional. If set, validate the request and preview the review, but do not
275
+ # actually apply it.
276
+ # @param [String] workstation_cluster_id
277
+ # Required. ID to use for the workstation cluster.
278
+ # @param [String] fields
279
+ # Selector specifying which fields to include in a partial response.
280
+ # @param [String] quota_user
281
+ # Available to use for quota purposes for server-side applications. Can be any
282
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
283
+ # @param [Google::Apis::RequestOptions] options
284
+ # Request-specific options
285
+ #
286
+ # @yield [result, err] Result & error if block supplied
287
+ # @yieldparam result [Google::Apis::WorkstationsV1::Operation] parsed result object
288
+ # @yieldparam err [StandardError] error object if request failed
289
+ #
290
+ # @return [Google::Apis::WorkstationsV1::Operation]
291
+ #
292
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
293
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
294
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
295
+ def create_project_location_workstation_cluster(parent, workstation_cluster_object = nil, validate_only: nil, workstation_cluster_id: nil, fields: nil, quota_user: nil, options: nil, &block)
296
+ command = make_simple_command(:post, 'v1/{+parent}/workstationClusters', options)
297
+ command.request_representation = Google::Apis::WorkstationsV1::WorkstationCluster::Representation
298
+ command.request_object = workstation_cluster_object
299
+ command.response_representation = Google::Apis::WorkstationsV1::Operation::Representation
300
+ command.response_class = Google::Apis::WorkstationsV1::Operation
301
+ command.params['parent'] = parent unless parent.nil?
302
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
303
+ command.query['workstationClusterId'] = workstation_cluster_id unless workstation_cluster_id.nil?
304
+ command.query['fields'] = fields unless fields.nil?
305
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
306
+ execute_or_queue_command(command, &block)
307
+ end
308
+
309
+ # Deletes the specified workstation cluster.
310
+ # @param [String] name
311
+ # Required. Name of the workstation cluster to delete.
312
+ # @param [String] etag
313
+ # Optional. If set, the request will be rejected if the latest version of the
314
+ # workstation cluster on the server does not have this ETag.
315
+ # @param [Boolean] force
316
+ # Optional. If set, any workstation configurations and workstations in the
317
+ # workstation cluster are also deleted. Otherwise, the request only works if the
318
+ # workstation cluster has no configurations or workstations.
319
+ # @param [Boolean] validate_only
320
+ # Optional. If set, validate the request and preview the review, but do not
321
+ # apply it.
322
+ # @param [String] fields
323
+ # Selector specifying which fields to include in a partial response.
324
+ # @param [String] quota_user
325
+ # Available to use for quota purposes for server-side applications. Can be any
326
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
327
+ # @param [Google::Apis::RequestOptions] options
328
+ # Request-specific options
329
+ #
330
+ # @yield [result, err] Result & error if block supplied
331
+ # @yieldparam result [Google::Apis::WorkstationsV1::Operation] parsed result object
332
+ # @yieldparam err [StandardError] error object if request failed
333
+ #
334
+ # @return [Google::Apis::WorkstationsV1::Operation]
335
+ #
336
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
337
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
338
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
339
+ def delete_project_location_workstation_cluster(name, etag: nil, force: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
340
+ command = make_simple_command(:delete, 'v1/{+name}', options)
341
+ command.response_representation = Google::Apis::WorkstationsV1::Operation::Representation
342
+ command.response_class = Google::Apis::WorkstationsV1::Operation
343
+ command.params['name'] = name unless name.nil?
344
+ command.query['etag'] = etag unless etag.nil?
345
+ command.query['force'] = force unless force.nil?
346
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
347
+ command.query['fields'] = fields unless fields.nil?
348
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
349
+ execute_or_queue_command(command, &block)
350
+ end
351
+
352
+ # Returns the requested workstation cluster.
353
+ # @param [String] name
354
+ # Required. Name of the requested resource.
355
+ # @param [String] fields
356
+ # Selector specifying which fields to include in a partial response.
357
+ # @param [String] quota_user
358
+ # Available to use for quota purposes for server-side applications. Can be any
359
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
360
+ # @param [Google::Apis::RequestOptions] options
361
+ # Request-specific options
362
+ #
363
+ # @yield [result, err] Result & error if block supplied
364
+ # @yieldparam result [Google::Apis::WorkstationsV1::WorkstationCluster] parsed result object
365
+ # @yieldparam err [StandardError] error object if request failed
366
+ #
367
+ # @return [Google::Apis::WorkstationsV1::WorkstationCluster]
368
+ #
369
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
370
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
371
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
372
+ def get_project_location_workstation_cluster(name, fields: nil, quota_user: nil, options: nil, &block)
373
+ command = make_simple_command(:get, 'v1/{+name}', options)
374
+ command.response_representation = Google::Apis::WorkstationsV1::WorkstationCluster::Representation
375
+ command.response_class = Google::Apis::WorkstationsV1::WorkstationCluster
376
+ command.params['name'] = name unless name.nil?
377
+ command.query['fields'] = fields unless fields.nil?
378
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
379
+ execute_or_queue_command(command, &block)
380
+ end
381
+
382
+ # Returns all workstation clusters in the specified location.
383
+ # @param [String] parent
384
+ # Required. Parent resource name.
385
+ # @param [Fixnum] page_size
386
+ # Optional. Maximum number of items to return.
387
+ # @param [String] page_token
388
+ # Optional. next_page_token value returned from a previous List request, if any.
389
+ # @param [String] fields
390
+ # Selector specifying which fields to include in a partial response.
391
+ # @param [String] quota_user
392
+ # Available to use for quota purposes for server-side applications. Can be any
393
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
394
+ # @param [Google::Apis::RequestOptions] options
395
+ # Request-specific options
396
+ #
397
+ # @yield [result, err] Result & error if block supplied
398
+ # @yieldparam result [Google::Apis::WorkstationsV1::ListWorkstationClustersResponse] parsed result object
399
+ # @yieldparam err [StandardError] error object if request failed
400
+ #
401
+ # @return [Google::Apis::WorkstationsV1::ListWorkstationClustersResponse]
402
+ #
403
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
404
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
405
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
406
+ def list_project_location_workstation_clusters(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
407
+ command = make_simple_command(:get, 'v1/{+parent}/workstationClusters', options)
408
+ command.response_representation = Google::Apis::WorkstationsV1::ListWorkstationClustersResponse::Representation
409
+ command.response_class = Google::Apis::WorkstationsV1::ListWorkstationClustersResponse
410
+ command.params['parent'] = parent unless parent.nil?
411
+ command.query['pageSize'] = page_size unless page_size.nil?
412
+ command.query['pageToken'] = page_token unless page_token.nil?
413
+ command.query['fields'] = fields unless fields.nil?
414
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
415
+ execute_or_queue_command(command, &block)
416
+ end
417
+
418
+ # Updates an existing workstation cluster.
419
+ # @param [String] name
420
+ # Full name of this workstation cluster.
421
+ # @param [Google::Apis::WorkstationsV1::WorkstationCluster] workstation_cluster_object
422
+ # @param [Boolean] allow_missing
423
+ # Optional. If set, and the workstation cluster is not found, a new workstation
424
+ # cluster will be created. In this situation, update_mask is ignored.
425
+ # @param [String] update_mask
426
+ # Required. Mask that specifies which fields in the workstation cluster should
427
+ # be updated.
428
+ # @param [Boolean] validate_only
429
+ # Optional. If set, validate the request and preview the review, but do not
430
+ # actually apply it.
431
+ # @param [String] fields
432
+ # Selector specifying which fields to include in a partial response.
433
+ # @param [String] quota_user
434
+ # Available to use for quota purposes for server-side applications. Can be any
435
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
436
+ # @param [Google::Apis::RequestOptions] options
437
+ # Request-specific options
438
+ #
439
+ # @yield [result, err] Result & error if block supplied
440
+ # @yieldparam result [Google::Apis::WorkstationsV1::Operation] parsed result object
441
+ # @yieldparam err [StandardError] error object if request failed
442
+ #
443
+ # @return [Google::Apis::WorkstationsV1::Operation]
444
+ #
445
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
446
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
447
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
448
+ def patch_project_location_workstation_cluster(name, workstation_cluster_object = nil, allow_missing: nil, update_mask: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
449
+ command = make_simple_command(:patch, 'v1/{+name}', options)
450
+ command.request_representation = Google::Apis::WorkstationsV1::WorkstationCluster::Representation
451
+ command.request_object = workstation_cluster_object
452
+ command.response_representation = Google::Apis::WorkstationsV1::Operation::Representation
453
+ command.response_class = Google::Apis::WorkstationsV1::Operation
454
+ command.params['name'] = name unless name.nil?
455
+ command.query['allowMissing'] = allow_missing unless allow_missing.nil?
456
+ command.query['updateMask'] = update_mask unless update_mask.nil?
457
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
458
+ command.query['fields'] = fields unless fields.nil?
459
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
460
+ execute_or_queue_command(command, &block)
461
+ end
462
+
463
+ # Creates a new workstation configuration.
464
+ # @param [String] parent
465
+ # Required. Parent resource name.
466
+ # @param [Google::Apis::WorkstationsV1::WorkstationConfig] workstation_config_object
467
+ # @param [Boolean] validate_only
468
+ # Optional. If set, validate the request and preview the review, but do not
469
+ # actually apply it.
470
+ # @param [String] workstation_config_id
471
+ # Required. ID to use for the workstation configuration.
472
+ # @param [String] fields
473
+ # Selector specifying which fields to include in a partial response.
474
+ # @param [String] quota_user
475
+ # Available to use for quota purposes for server-side applications. Can be any
476
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
477
+ # @param [Google::Apis::RequestOptions] options
478
+ # Request-specific options
479
+ #
480
+ # @yield [result, err] Result & error if block supplied
481
+ # @yieldparam result [Google::Apis::WorkstationsV1::Operation] parsed result object
482
+ # @yieldparam err [StandardError] error object if request failed
483
+ #
484
+ # @return [Google::Apis::WorkstationsV1::Operation]
485
+ #
486
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
487
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
488
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
489
+ def create_project_location_workstation_cluster_workstation_config(parent, workstation_config_object = nil, validate_only: nil, workstation_config_id: nil, fields: nil, quota_user: nil, options: nil, &block)
490
+ command = make_simple_command(:post, 'v1/{+parent}/workstationConfigs', options)
491
+ command.request_representation = Google::Apis::WorkstationsV1::WorkstationConfig::Representation
492
+ command.request_object = workstation_config_object
493
+ command.response_representation = Google::Apis::WorkstationsV1::Operation::Representation
494
+ command.response_class = Google::Apis::WorkstationsV1::Operation
495
+ command.params['parent'] = parent unless parent.nil?
496
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
497
+ command.query['workstationConfigId'] = workstation_config_id unless workstation_config_id.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
+ # Deletes the specified workstation configuration.
504
+ # @param [String] name
505
+ # Required. Name of the workstation configuration to delete.
506
+ # @param [String] etag
507
+ # Optional. If set, the request is rejected if the latest version of the
508
+ # workstation configuration on the server does not have this ETag.
509
+ # @param [Boolean] force
510
+ # Optional. If set, any workstations in the workstation configuration are also
511
+ # deleted. Otherwise, the request works only if the workstation configuration
512
+ # has no workstations.
513
+ # @param [Boolean] validate_only
514
+ # Optional. If set, validate the request and preview the review, but do not
515
+ # actually apply it.
516
+ # @param [String] fields
517
+ # Selector specifying which fields to include in a partial response.
518
+ # @param [String] quota_user
519
+ # Available to use for quota purposes for server-side applications. Can be any
520
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
521
+ # @param [Google::Apis::RequestOptions] options
522
+ # Request-specific options
523
+ #
524
+ # @yield [result, err] Result & error if block supplied
525
+ # @yieldparam result [Google::Apis::WorkstationsV1::Operation] parsed result object
526
+ # @yieldparam err [StandardError] error object if request failed
527
+ #
528
+ # @return [Google::Apis::WorkstationsV1::Operation]
529
+ #
530
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
531
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
532
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
533
+ def delete_project_location_workstation_cluster_workstation_config(name, etag: nil, force: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
534
+ command = make_simple_command(:delete, 'v1/{+name}', options)
535
+ command.response_representation = Google::Apis::WorkstationsV1::Operation::Representation
536
+ command.response_class = Google::Apis::WorkstationsV1::Operation
537
+ command.params['name'] = name unless name.nil?
538
+ command.query['etag'] = etag unless etag.nil?
539
+ command.query['force'] = force unless force.nil?
540
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
541
+ command.query['fields'] = fields unless fields.nil?
542
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
543
+ execute_or_queue_command(command, &block)
544
+ end
545
+
546
+ # Returns the requested workstation configuration.
547
+ # @param [String] name
548
+ # Required. Name of the requested resource.
549
+ # @param [String] fields
550
+ # Selector specifying which fields to include in a partial response.
551
+ # @param [String] quota_user
552
+ # Available to use for quota purposes for server-side applications. Can be any
553
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
554
+ # @param [Google::Apis::RequestOptions] options
555
+ # Request-specific options
556
+ #
557
+ # @yield [result, err] Result & error if block supplied
558
+ # @yieldparam result [Google::Apis::WorkstationsV1::WorkstationConfig] parsed result object
559
+ # @yieldparam err [StandardError] error object if request failed
560
+ #
561
+ # @return [Google::Apis::WorkstationsV1::WorkstationConfig]
562
+ #
563
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
564
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
565
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
566
+ def get_project_location_workstation_cluster_workstation_config(name, fields: nil, quota_user: nil, options: nil, &block)
567
+ command = make_simple_command(:get, 'v1/{+name}', options)
568
+ command.response_representation = Google::Apis::WorkstationsV1::WorkstationConfig::Representation
569
+ command.response_class = Google::Apis::WorkstationsV1::WorkstationConfig
570
+ command.params['name'] = name unless name.nil?
571
+ command.query['fields'] = fields unless fields.nil?
572
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
573
+ execute_or_queue_command(command, &block)
574
+ end
575
+
576
+ # Gets the access control policy for a resource. Returns an empty policy if the
577
+ # resource exists and does not have a policy set.
578
+ # @param [String] resource
579
+ # REQUIRED: The resource for which the policy is being requested. See [Resource
580
+ # names](https://cloud.google.com/apis/design/resource_names) for the
581
+ # appropriate value for this field.
582
+ # @param [Fixnum] options_requested_policy_version
583
+ # Optional. The maximum policy version that will be used to format the policy.
584
+ # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
585
+ # rejected. Requests for policies with any conditional role bindings must
586
+ # specify version 3. Policies with no conditional role bindings may specify any
587
+ # valid value or leave the field unset. The policy in the response might use the
588
+ # policy version that you specified, or it might use a lower policy version. For
589
+ # example, if you specify version 3, but the policy has no conditional role
590
+ # bindings, the response uses version 1. To learn which resources support
591
+ # conditions in their IAM policies, see the [IAM documentation](https://cloud.
592
+ # google.com/iam/help/conditions/resource-policies).
593
+ # @param [String] fields
594
+ # Selector specifying which fields to include in a partial response.
595
+ # @param [String] quota_user
596
+ # Available to use for quota purposes for server-side applications. Can be any
597
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
598
+ # @param [Google::Apis::RequestOptions] options
599
+ # Request-specific options
600
+ #
601
+ # @yield [result, err] Result & error if block supplied
602
+ # @yieldparam result [Google::Apis::WorkstationsV1::Policy] parsed result object
603
+ # @yieldparam err [StandardError] error object if request failed
604
+ #
605
+ # @return [Google::Apis::WorkstationsV1::Policy]
606
+ #
607
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
608
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
609
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
610
+ def get_project_location_workstation_cluster_workstation_config_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
611
+ command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options)
612
+ command.response_representation = Google::Apis::WorkstationsV1::Policy::Representation
613
+ command.response_class = Google::Apis::WorkstationsV1::Policy
614
+ command.params['resource'] = resource unless resource.nil?
615
+ command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
616
+ command.query['fields'] = fields unless fields.nil?
617
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
618
+ execute_or_queue_command(command, &block)
619
+ end
620
+
621
+ # Returns all workstation configurations in the specified cluster.
622
+ # @param [String] parent
623
+ # Required. Parent resource name.
624
+ # @param [Fixnum] page_size
625
+ # Optional. Maximum number of items to return.
626
+ # @param [String] page_token
627
+ # Optional. next_page_token value returned from a previous List request, if any.
628
+ # @param [String] fields
629
+ # Selector specifying which fields to include in a partial response.
630
+ # @param [String] quota_user
631
+ # Available to use for quota purposes for server-side applications. Can be any
632
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
633
+ # @param [Google::Apis::RequestOptions] options
634
+ # Request-specific options
635
+ #
636
+ # @yield [result, err] Result & error if block supplied
637
+ # @yieldparam result [Google::Apis::WorkstationsV1::ListWorkstationConfigsResponse] parsed result object
638
+ # @yieldparam err [StandardError] error object if request failed
639
+ #
640
+ # @return [Google::Apis::WorkstationsV1::ListWorkstationConfigsResponse]
641
+ #
642
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
643
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
644
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
645
+ def list_project_location_workstation_cluster_workstation_configs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
646
+ command = make_simple_command(:get, 'v1/{+parent}/workstationConfigs', options)
647
+ command.response_representation = Google::Apis::WorkstationsV1::ListWorkstationConfigsResponse::Representation
648
+ command.response_class = Google::Apis::WorkstationsV1::ListWorkstationConfigsResponse
649
+ command.params['parent'] = parent unless parent.nil?
650
+ command.query['pageSize'] = page_size unless page_size.nil?
651
+ command.query['pageToken'] = page_token unless page_token.nil?
652
+ command.query['fields'] = fields unless fields.nil?
653
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
654
+ execute_or_queue_command(command, &block)
655
+ end
656
+
657
+ # Returns all workstation configurations in the specified cluster on which the
658
+ # caller has the "workstations.workstation.create" permission.
659
+ # @param [String] parent
660
+ # Required. Parent resource name.
661
+ # @param [Fixnum] page_size
662
+ # Optional. Maximum number of items to return.
663
+ # @param [String] page_token
664
+ # Optional. next_page_token value returned from a previous List request, if any.
665
+ # @param [String] fields
666
+ # Selector specifying which fields to include in a partial response.
667
+ # @param [String] quota_user
668
+ # Available to use for quota purposes for server-side applications. Can be any
669
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
670
+ # @param [Google::Apis::RequestOptions] options
671
+ # Request-specific options
672
+ #
673
+ # @yield [result, err] Result & error if block supplied
674
+ # @yieldparam result [Google::Apis::WorkstationsV1::ListUsableWorkstationConfigsResponse] parsed result object
675
+ # @yieldparam err [StandardError] error object if request failed
676
+ #
677
+ # @return [Google::Apis::WorkstationsV1::ListUsableWorkstationConfigsResponse]
678
+ #
679
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
680
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
681
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
682
+ def list_project_location_workstation_cluster_workstation_config_usable(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
683
+ command = make_simple_command(:get, 'v1/{+parent}/workstationConfigs:listUsable', options)
684
+ command.response_representation = Google::Apis::WorkstationsV1::ListUsableWorkstationConfigsResponse::Representation
685
+ command.response_class = Google::Apis::WorkstationsV1::ListUsableWorkstationConfigsResponse
686
+ command.params['parent'] = parent unless parent.nil?
687
+ command.query['pageSize'] = page_size unless page_size.nil?
688
+ command.query['pageToken'] = page_token unless page_token.nil?
689
+ command.query['fields'] = fields unless fields.nil?
690
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
691
+ execute_or_queue_command(command, &block)
692
+ end
693
+
694
+ # Updates an existing workstation configuration.
695
+ # @param [String] name
696
+ # Full name of this workstation configuration.
697
+ # @param [Google::Apis::WorkstationsV1::WorkstationConfig] workstation_config_object
698
+ # @param [Boolean] allow_missing
699
+ # Optional. If set and the workstation configuration is not found, a new
700
+ # workstation configuration will be created. In this situation, update_mask is
701
+ # ignored.
702
+ # @param [String] update_mask
703
+ # Required. Mask specifying which fields in the workstation configuration should
704
+ # be updated.
705
+ # @param [Boolean] validate_only
706
+ # Optional. If set, validate the request and preview the review, but do not
707
+ # actually apply it.
708
+ # @param [String] fields
709
+ # Selector specifying which fields to include in a partial response.
710
+ # @param [String] quota_user
711
+ # Available to use for quota purposes for server-side applications. Can be any
712
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
713
+ # @param [Google::Apis::RequestOptions] options
714
+ # Request-specific options
715
+ #
716
+ # @yield [result, err] Result & error if block supplied
717
+ # @yieldparam result [Google::Apis::WorkstationsV1::Operation] parsed result object
718
+ # @yieldparam err [StandardError] error object if request failed
719
+ #
720
+ # @return [Google::Apis::WorkstationsV1::Operation]
721
+ #
722
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
723
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
724
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
725
+ def patch_project_location_workstation_cluster_workstation_config(name, workstation_config_object = nil, allow_missing: nil, update_mask: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
726
+ command = make_simple_command(:patch, 'v1/{+name}', options)
727
+ command.request_representation = Google::Apis::WorkstationsV1::WorkstationConfig::Representation
728
+ command.request_object = workstation_config_object
729
+ command.response_representation = Google::Apis::WorkstationsV1::Operation::Representation
730
+ command.response_class = Google::Apis::WorkstationsV1::Operation
731
+ command.params['name'] = name unless name.nil?
732
+ command.query['allowMissing'] = allow_missing unless allow_missing.nil?
733
+ command.query['updateMask'] = update_mask unless update_mask.nil?
734
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
735
+ command.query['fields'] = fields unless fields.nil?
736
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
737
+ execute_or_queue_command(command, &block)
738
+ end
739
+
740
+ # Sets the access control policy on the specified resource. Replaces any
741
+ # existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `
742
+ # PERMISSION_DENIED` errors.
743
+ # @param [String] resource
744
+ # REQUIRED: The resource for which the policy is being specified. See [Resource
745
+ # names](https://cloud.google.com/apis/design/resource_names) for the
746
+ # appropriate value for this field.
747
+ # @param [Google::Apis::WorkstationsV1::SetIamPolicyRequest] set_iam_policy_request_object
748
+ # @param [String] fields
749
+ # Selector specifying which fields to include in a partial response.
750
+ # @param [String] quota_user
751
+ # Available to use for quota purposes for server-side applications. Can be any
752
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
753
+ # @param [Google::Apis::RequestOptions] options
754
+ # Request-specific options
755
+ #
756
+ # @yield [result, err] Result & error if block supplied
757
+ # @yieldparam result [Google::Apis::WorkstationsV1::Policy] parsed result object
758
+ # @yieldparam err [StandardError] error object if request failed
759
+ #
760
+ # @return [Google::Apis::WorkstationsV1::Policy]
761
+ #
762
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
763
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
764
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
765
+ def set_workstation_config_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
766
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
767
+ command.request_representation = Google::Apis::WorkstationsV1::SetIamPolicyRequest::Representation
768
+ command.request_object = set_iam_policy_request_object
769
+ command.response_representation = Google::Apis::WorkstationsV1::Policy::Representation
770
+ command.response_class = Google::Apis::WorkstationsV1::Policy
771
+ command.params['resource'] = resource unless resource.nil?
772
+ command.query['fields'] = fields unless fields.nil?
773
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
774
+ execute_or_queue_command(command, &block)
775
+ end
776
+
777
+ # Returns permissions that a caller has on the specified resource. If the
778
+ # resource does not exist, this will return an empty set of permissions, not a `
779
+ # NOT_FOUND` error. Note: This operation is designed to be used for building
780
+ # permission-aware UIs and command-line tools, not for authorization checking.
781
+ # This operation may "fail open" without warning.
782
+ # @param [String] resource
783
+ # REQUIRED: The resource for which the policy detail is being requested. See [
784
+ # Resource names](https://cloud.google.com/apis/design/resource_names) for the
785
+ # appropriate value for this field.
786
+ # @param [Google::Apis::WorkstationsV1::TestIamPermissionsRequest] test_iam_permissions_request_object
787
+ # @param [String] fields
788
+ # Selector specifying which fields to include in a partial response.
789
+ # @param [String] quota_user
790
+ # Available to use for quota purposes for server-side applications. Can be any
791
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
792
+ # @param [Google::Apis::RequestOptions] options
793
+ # Request-specific options
794
+ #
795
+ # @yield [result, err] Result & error if block supplied
796
+ # @yieldparam result [Google::Apis::WorkstationsV1::TestIamPermissionsResponse] parsed result object
797
+ # @yieldparam err [StandardError] error object if request failed
798
+ #
799
+ # @return [Google::Apis::WorkstationsV1::TestIamPermissionsResponse]
800
+ #
801
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
802
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
803
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
804
+ def test_workstation_config_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
805
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
806
+ command.request_representation = Google::Apis::WorkstationsV1::TestIamPermissionsRequest::Representation
807
+ command.request_object = test_iam_permissions_request_object
808
+ command.response_representation = Google::Apis::WorkstationsV1::TestIamPermissionsResponse::Representation
809
+ command.response_class = Google::Apis::WorkstationsV1::TestIamPermissionsResponse
810
+ command.params['resource'] = resource unless resource.nil?
811
+ command.query['fields'] = fields unless fields.nil?
812
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
813
+ execute_or_queue_command(command, &block)
814
+ end
815
+
816
+ # Creates a new workstation.
817
+ # @param [String] parent
818
+ # Required. Parent resource name.
819
+ # @param [Google::Apis::WorkstationsV1::Workstation] workstation_object
820
+ # @param [Boolean] validate_only
821
+ # Optional. If set, validate the request and preview the review, but do not
822
+ # actually apply it.
823
+ # @param [String] workstation_id
824
+ # Required. ID to use for the workstation.
825
+ # @param [String] fields
826
+ # Selector specifying which fields to include in a partial response.
827
+ # @param [String] quota_user
828
+ # Available to use for quota purposes for server-side applications. Can be any
829
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
830
+ # @param [Google::Apis::RequestOptions] options
831
+ # Request-specific options
832
+ #
833
+ # @yield [result, err] Result & error if block supplied
834
+ # @yieldparam result [Google::Apis::WorkstationsV1::Operation] parsed result object
835
+ # @yieldparam err [StandardError] error object if request failed
836
+ #
837
+ # @return [Google::Apis::WorkstationsV1::Operation]
838
+ #
839
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
840
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
841
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
842
+ def create_project_location_workstation_cluster_workstation_config_workstation(parent, workstation_object = nil, validate_only: nil, workstation_id: nil, fields: nil, quota_user: nil, options: nil, &block)
843
+ command = make_simple_command(:post, 'v1/{+parent}/workstations', options)
844
+ command.request_representation = Google::Apis::WorkstationsV1::Workstation::Representation
845
+ command.request_object = workstation_object
846
+ command.response_representation = Google::Apis::WorkstationsV1::Operation::Representation
847
+ command.response_class = Google::Apis::WorkstationsV1::Operation
848
+ command.params['parent'] = parent unless parent.nil?
849
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
850
+ command.query['workstationId'] = workstation_id unless workstation_id.nil?
851
+ command.query['fields'] = fields unless fields.nil?
852
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
853
+ execute_or_queue_command(command, &block)
854
+ end
855
+
856
+ # Deletes the specified workstation.
857
+ # @param [String] name
858
+ # Required. Name of the workstation to delete.
859
+ # @param [String] etag
860
+ # Optional. If set, the request will be rejected if the latest version of the
861
+ # workstation on the server does not have this ETag.
862
+ # @param [Boolean] validate_only
863
+ # Optional. If set, validate the request and preview the review, but do not
864
+ # actually apply it.
865
+ # @param [String] fields
866
+ # Selector specifying which fields to include in a partial response.
867
+ # @param [String] quota_user
868
+ # Available to use for quota purposes for server-side applications. Can be any
869
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
870
+ # @param [Google::Apis::RequestOptions] options
871
+ # Request-specific options
872
+ #
873
+ # @yield [result, err] Result & error if block supplied
874
+ # @yieldparam result [Google::Apis::WorkstationsV1::Operation] parsed result object
875
+ # @yieldparam err [StandardError] error object if request failed
876
+ #
877
+ # @return [Google::Apis::WorkstationsV1::Operation]
878
+ #
879
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
880
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
881
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
882
+ def delete_project_location_workstation_cluster_workstation_config_workstation(name, etag: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
883
+ command = make_simple_command(:delete, 'v1/{+name}', options)
884
+ command.response_representation = Google::Apis::WorkstationsV1::Operation::Representation
885
+ command.response_class = Google::Apis::WorkstationsV1::Operation
886
+ command.params['name'] = name unless name.nil?
887
+ command.query['etag'] = etag unless etag.nil?
888
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
889
+ command.query['fields'] = fields unless fields.nil?
890
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
891
+ execute_or_queue_command(command, &block)
892
+ end
893
+
894
+ # Returns a short-lived credential that can be used to send authenticated and
895
+ # authorized traffic to a workstation.
896
+ # @param [String] workstation
897
+ # Required. Name of the workstation for which the access token should be
898
+ # generated.
899
+ # @param [Google::Apis::WorkstationsV1::GenerateAccessTokenRequest] generate_access_token_request_object
900
+ # @param [String] fields
901
+ # Selector specifying which fields to include in a partial response.
902
+ # @param [String] quota_user
903
+ # Available to use for quota purposes for server-side applications. Can be any
904
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
905
+ # @param [Google::Apis::RequestOptions] options
906
+ # Request-specific options
907
+ #
908
+ # @yield [result, err] Result & error if block supplied
909
+ # @yieldparam result [Google::Apis::WorkstationsV1::GenerateAccessTokenResponse] parsed result object
910
+ # @yieldparam err [StandardError] error object if request failed
911
+ #
912
+ # @return [Google::Apis::WorkstationsV1::GenerateAccessTokenResponse]
913
+ #
914
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
915
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
916
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
917
+ def generate_workstation_access_token(workstation, generate_access_token_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
918
+ command = make_simple_command(:post, 'v1/{+workstation}:generateAccessToken', options)
919
+ command.request_representation = Google::Apis::WorkstationsV1::GenerateAccessTokenRequest::Representation
920
+ command.request_object = generate_access_token_request_object
921
+ command.response_representation = Google::Apis::WorkstationsV1::GenerateAccessTokenResponse::Representation
922
+ command.response_class = Google::Apis::WorkstationsV1::GenerateAccessTokenResponse
923
+ command.params['workstation'] = workstation unless workstation.nil?
924
+ command.query['fields'] = fields unless fields.nil?
925
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
926
+ execute_or_queue_command(command, &block)
927
+ end
928
+
929
+ # Returns the requested workstation.
930
+ # @param [String] name
931
+ # Required. Name of the requested resource.
932
+ # @param [String] fields
933
+ # Selector specifying which fields to include in a partial response.
934
+ # @param [String] quota_user
935
+ # Available to use for quota purposes for server-side applications. Can be any
936
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
937
+ # @param [Google::Apis::RequestOptions] options
938
+ # Request-specific options
939
+ #
940
+ # @yield [result, err] Result & error if block supplied
941
+ # @yieldparam result [Google::Apis::WorkstationsV1::Workstation] parsed result object
942
+ # @yieldparam err [StandardError] error object if request failed
943
+ #
944
+ # @return [Google::Apis::WorkstationsV1::Workstation]
945
+ #
946
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
947
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
948
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
949
+ def get_project_location_workstation_cluster_workstation_config_workstation(name, fields: nil, quota_user: nil, options: nil, &block)
950
+ command = make_simple_command(:get, 'v1/{+name}', options)
951
+ command.response_representation = Google::Apis::WorkstationsV1::Workstation::Representation
952
+ command.response_class = Google::Apis::WorkstationsV1::Workstation
953
+ command.params['name'] = name unless name.nil?
954
+ command.query['fields'] = fields unless fields.nil?
955
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
956
+ execute_or_queue_command(command, &block)
957
+ end
958
+
959
+ # Gets the access control policy for a resource. Returns an empty policy if the
960
+ # resource exists and does not have a policy set.
961
+ # @param [String] resource
962
+ # REQUIRED: The resource for which the policy is being requested. See [Resource
963
+ # names](https://cloud.google.com/apis/design/resource_names) for the
964
+ # appropriate value for this field.
965
+ # @param [Fixnum] options_requested_policy_version
966
+ # Optional. The maximum policy version that will be used to format the policy.
967
+ # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
968
+ # rejected. Requests for policies with any conditional role bindings must
969
+ # specify version 3. Policies with no conditional role bindings may specify any
970
+ # valid value or leave the field unset. The policy in the response might use the
971
+ # policy version that you specified, or it might use a lower policy version. For
972
+ # example, if you specify version 3, but the policy has no conditional role
973
+ # bindings, the response uses version 1. To learn which resources support
974
+ # conditions in their IAM policies, see the [IAM documentation](https://cloud.
975
+ # google.com/iam/help/conditions/resource-policies).
976
+ # @param [String] fields
977
+ # Selector specifying which fields to include in a partial response.
978
+ # @param [String] quota_user
979
+ # Available to use for quota purposes for server-side applications. Can be any
980
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
981
+ # @param [Google::Apis::RequestOptions] options
982
+ # Request-specific options
983
+ #
984
+ # @yield [result, err] Result & error if block supplied
985
+ # @yieldparam result [Google::Apis::WorkstationsV1::Policy] parsed result object
986
+ # @yieldparam err [StandardError] error object if request failed
987
+ #
988
+ # @return [Google::Apis::WorkstationsV1::Policy]
989
+ #
990
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
991
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
992
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
993
+ def get_project_location_workstation_cluster_workstation_config_workstation_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
994
+ command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options)
995
+ command.response_representation = Google::Apis::WorkstationsV1::Policy::Representation
996
+ command.response_class = Google::Apis::WorkstationsV1::Policy
997
+ command.params['resource'] = resource unless resource.nil?
998
+ command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
999
+ command.query['fields'] = fields unless fields.nil?
1000
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1001
+ execute_or_queue_command(command, &block)
1002
+ end
1003
+
1004
+ # Returns all Workstations using the specified workstation configuration.
1005
+ # @param [String] parent
1006
+ # Required. Parent resource name.
1007
+ # @param [Fixnum] page_size
1008
+ # Optional. Maximum number of items to return.
1009
+ # @param [String] page_token
1010
+ # Optional. next_page_token value returned from a previous List request, if any.
1011
+ # @param [String] fields
1012
+ # Selector specifying which fields to include in a partial response.
1013
+ # @param [String] quota_user
1014
+ # Available to use for quota purposes for server-side applications. Can be any
1015
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1016
+ # @param [Google::Apis::RequestOptions] options
1017
+ # Request-specific options
1018
+ #
1019
+ # @yield [result, err] Result & error if block supplied
1020
+ # @yieldparam result [Google::Apis::WorkstationsV1::ListWorkstationsResponse] parsed result object
1021
+ # @yieldparam err [StandardError] error object if request failed
1022
+ #
1023
+ # @return [Google::Apis::WorkstationsV1::ListWorkstationsResponse]
1024
+ #
1025
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1026
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1027
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1028
+ def list_project_location_workstation_cluster_workstation_config_workstations(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1029
+ command = make_simple_command(:get, 'v1/{+parent}/workstations', options)
1030
+ command.response_representation = Google::Apis::WorkstationsV1::ListWorkstationsResponse::Representation
1031
+ command.response_class = Google::Apis::WorkstationsV1::ListWorkstationsResponse
1032
+ command.params['parent'] = parent unless parent.nil?
1033
+ command.query['pageSize'] = page_size unless page_size.nil?
1034
+ command.query['pageToken'] = page_token unless page_token.nil?
1035
+ command.query['fields'] = fields unless fields.nil?
1036
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1037
+ execute_or_queue_command(command, &block)
1038
+ end
1039
+
1040
+ # Returns all workstations using the specified workstation configuration on
1041
+ # which the caller has the "workstations.workstations.use" permission.
1042
+ # @param [String] parent
1043
+ # Required. Parent resource name.
1044
+ # @param [Fixnum] page_size
1045
+ # Optional. Maximum number of items to return.
1046
+ # @param [String] page_token
1047
+ # Optional. next_page_token value returned from a previous List request, if any.
1048
+ # @param [String] fields
1049
+ # Selector specifying which fields to include in a partial response.
1050
+ # @param [String] quota_user
1051
+ # Available to use for quota purposes for server-side applications. Can be any
1052
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1053
+ # @param [Google::Apis::RequestOptions] options
1054
+ # Request-specific options
1055
+ #
1056
+ # @yield [result, err] Result & error if block supplied
1057
+ # @yieldparam result [Google::Apis::WorkstationsV1::ListUsableWorkstationsResponse] parsed result object
1058
+ # @yieldparam err [StandardError] error object if request failed
1059
+ #
1060
+ # @return [Google::Apis::WorkstationsV1::ListUsableWorkstationsResponse]
1061
+ #
1062
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1063
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1064
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1065
+ def list_project_location_workstation_cluster_workstation_config_workstation_usable(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1066
+ command = make_simple_command(:get, 'v1/{+parent}/workstations:listUsable', options)
1067
+ command.response_representation = Google::Apis::WorkstationsV1::ListUsableWorkstationsResponse::Representation
1068
+ command.response_class = Google::Apis::WorkstationsV1::ListUsableWorkstationsResponse
1069
+ command.params['parent'] = parent unless parent.nil?
1070
+ command.query['pageSize'] = page_size unless page_size.nil?
1071
+ command.query['pageToken'] = page_token unless page_token.nil?
1072
+ command.query['fields'] = fields unless fields.nil?
1073
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1074
+ execute_or_queue_command(command, &block)
1075
+ end
1076
+
1077
+ # Updates an existing workstation.
1078
+ # @param [String] name
1079
+ # Full name of this workstation.
1080
+ # @param [Google::Apis::WorkstationsV1::Workstation] workstation_object
1081
+ # @param [Boolean] allow_missing
1082
+ # Optional. If set and the workstation configuration is not found, a new
1083
+ # workstation configuration is created. In this situation, update_mask is
1084
+ # ignored.
1085
+ # @param [String] update_mask
1086
+ # Required. Mask specifying which fields in the workstation configuration should
1087
+ # be updated.
1088
+ # @param [Boolean] validate_only
1089
+ # Optional. If set, validate the request and preview the review, but do not
1090
+ # actually apply it.
1091
+ # @param [String] fields
1092
+ # Selector specifying which fields to include in a partial response.
1093
+ # @param [String] quota_user
1094
+ # Available to use for quota purposes for server-side applications. Can be any
1095
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1096
+ # @param [Google::Apis::RequestOptions] options
1097
+ # Request-specific options
1098
+ #
1099
+ # @yield [result, err] Result & error if block supplied
1100
+ # @yieldparam result [Google::Apis::WorkstationsV1::Operation] parsed result object
1101
+ # @yieldparam err [StandardError] error object if request failed
1102
+ #
1103
+ # @return [Google::Apis::WorkstationsV1::Operation]
1104
+ #
1105
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1106
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1107
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1108
+ def patch_project_location_workstation_cluster_workstation_config_workstation(name, workstation_object = nil, allow_missing: nil, update_mask: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
1109
+ command = make_simple_command(:patch, 'v1/{+name}', options)
1110
+ command.request_representation = Google::Apis::WorkstationsV1::Workstation::Representation
1111
+ command.request_object = workstation_object
1112
+ command.response_representation = Google::Apis::WorkstationsV1::Operation::Representation
1113
+ command.response_class = Google::Apis::WorkstationsV1::Operation
1114
+ command.params['name'] = name unless name.nil?
1115
+ command.query['allowMissing'] = allow_missing unless allow_missing.nil?
1116
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1117
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
1118
+ command.query['fields'] = fields unless fields.nil?
1119
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1120
+ execute_or_queue_command(command, &block)
1121
+ end
1122
+
1123
+ # Sets the access control policy on the specified resource. Replaces any
1124
+ # existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `
1125
+ # PERMISSION_DENIED` errors.
1126
+ # @param [String] resource
1127
+ # REQUIRED: The resource for which the policy is being specified. See [Resource
1128
+ # names](https://cloud.google.com/apis/design/resource_names) for the
1129
+ # appropriate value for this field.
1130
+ # @param [Google::Apis::WorkstationsV1::SetIamPolicyRequest] set_iam_policy_request_object
1131
+ # @param [String] fields
1132
+ # Selector specifying which fields to include in a partial response.
1133
+ # @param [String] quota_user
1134
+ # Available to use for quota purposes for server-side applications. Can be any
1135
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1136
+ # @param [Google::Apis::RequestOptions] options
1137
+ # Request-specific options
1138
+ #
1139
+ # @yield [result, err] Result & error if block supplied
1140
+ # @yieldparam result [Google::Apis::WorkstationsV1::Policy] parsed result object
1141
+ # @yieldparam err [StandardError] error object if request failed
1142
+ #
1143
+ # @return [Google::Apis::WorkstationsV1::Policy]
1144
+ #
1145
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1146
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1147
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1148
+ def set_workstation_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1149
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
1150
+ command.request_representation = Google::Apis::WorkstationsV1::SetIamPolicyRequest::Representation
1151
+ command.request_object = set_iam_policy_request_object
1152
+ command.response_representation = Google::Apis::WorkstationsV1::Policy::Representation
1153
+ command.response_class = Google::Apis::WorkstationsV1::Policy
1154
+ command.params['resource'] = resource unless resource.nil?
1155
+ command.query['fields'] = fields unless fields.nil?
1156
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1157
+ execute_or_queue_command(command, &block)
1158
+ end
1159
+
1160
+ # Starts running a workstation so that users can connect to it.
1161
+ # @param [String] name
1162
+ # Required. Name of the workstation to start.
1163
+ # @param [Google::Apis::WorkstationsV1::StartWorkstationRequest] start_workstation_request_object
1164
+ # @param [String] fields
1165
+ # Selector specifying which fields to include in a partial response.
1166
+ # @param [String] quota_user
1167
+ # Available to use for quota purposes for server-side applications. Can be any
1168
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1169
+ # @param [Google::Apis::RequestOptions] options
1170
+ # Request-specific options
1171
+ #
1172
+ # @yield [result, err] Result & error if block supplied
1173
+ # @yieldparam result [Google::Apis::WorkstationsV1::Operation] parsed result object
1174
+ # @yieldparam err [StandardError] error object if request failed
1175
+ #
1176
+ # @return [Google::Apis::WorkstationsV1::Operation]
1177
+ #
1178
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1179
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1180
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1181
+ def start_workstation(name, start_workstation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1182
+ command = make_simple_command(:post, 'v1/{+name}:start', options)
1183
+ command.request_representation = Google::Apis::WorkstationsV1::StartWorkstationRequest::Representation
1184
+ command.request_object = start_workstation_request_object
1185
+ command.response_representation = Google::Apis::WorkstationsV1::Operation::Representation
1186
+ command.response_class = Google::Apis::WorkstationsV1::Operation
1187
+ command.params['name'] = name unless name.nil?
1188
+ command.query['fields'] = fields unless fields.nil?
1189
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1190
+ execute_or_queue_command(command, &block)
1191
+ end
1192
+
1193
+ # Stops running a workstation, reducing costs.
1194
+ # @param [String] name
1195
+ # Required. Name of the workstation to stop.
1196
+ # @param [Google::Apis::WorkstationsV1::StopWorkstationRequest] stop_workstation_request_object
1197
+ # @param [String] fields
1198
+ # Selector specifying which fields to include in a partial response.
1199
+ # @param [String] quota_user
1200
+ # Available to use for quota purposes for server-side applications. Can be any
1201
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1202
+ # @param [Google::Apis::RequestOptions] options
1203
+ # Request-specific options
1204
+ #
1205
+ # @yield [result, err] Result & error if block supplied
1206
+ # @yieldparam result [Google::Apis::WorkstationsV1::Operation] parsed result object
1207
+ # @yieldparam err [StandardError] error object if request failed
1208
+ #
1209
+ # @return [Google::Apis::WorkstationsV1::Operation]
1210
+ #
1211
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1212
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1213
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1214
+ def stop_workstation(name, stop_workstation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1215
+ command = make_simple_command(:post, 'v1/{+name}:stop', options)
1216
+ command.request_representation = Google::Apis::WorkstationsV1::StopWorkstationRequest::Representation
1217
+ command.request_object = stop_workstation_request_object
1218
+ command.response_representation = Google::Apis::WorkstationsV1::Operation::Representation
1219
+ command.response_class = Google::Apis::WorkstationsV1::Operation
1220
+ command.params['name'] = name unless name.nil?
1221
+ command.query['fields'] = fields unless fields.nil?
1222
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1223
+ execute_or_queue_command(command, &block)
1224
+ end
1225
+
1226
+ # Returns permissions that a caller has on the specified resource. If the
1227
+ # resource does not exist, this will return an empty set of permissions, not a `
1228
+ # NOT_FOUND` error. Note: This operation is designed to be used for building
1229
+ # permission-aware UIs and command-line tools, not for authorization checking.
1230
+ # This operation may "fail open" without warning.
1231
+ # @param [String] resource
1232
+ # REQUIRED: The resource for which the policy detail is being requested. See [
1233
+ # Resource names](https://cloud.google.com/apis/design/resource_names) for the
1234
+ # appropriate value for this field.
1235
+ # @param [Google::Apis::WorkstationsV1::TestIamPermissionsRequest] test_iam_permissions_request_object
1236
+ # @param [String] fields
1237
+ # Selector specifying which fields to include in a partial response.
1238
+ # @param [String] quota_user
1239
+ # Available to use for quota purposes for server-side applications. Can be any
1240
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1241
+ # @param [Google::Apis::RequestOptions] options
1242
+ # Request-specific options
1243
+ #
1244
+ # @yield [result, err] Result & error if block supplied
1245
+ # @yieldparam result [Google::Apis::WorkstationsV1::TestIamPermissionsResponse] parsed result object
1246
+ # @yieldparam err [StandardError] error object if request failed
1247
+ #
1248
+ # @return [Google::Apis::WorkstationsV1::TestIamPermissionsResponse]
1249
+ #
1250
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1251
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1252
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1253
+ def test_workstation_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1254
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
1255
+ command.request_representation = Google::Apis::WorkstationsV1::TestIamPermissionsRequest::Representation
1256
+ command.request_object = test_iam_permissions_request_object
1257
+ command.response_representation = Google::Apis::WorkstationsV1::TestIamPermissionsResponse::Representation
1258
+ command.response_class = Google::Apis::WorkstationsV1::TestIamPermissionsResponse
1259
+ command.params['resource'] = resource unless resource.nil?
1260
+ command.query['fields'] = fields unless fields.nil?
1261
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1262
+ execute_or_queue_command(command, &block)
1263
+ end
1264
+
1265
+ protected
1266
+
1267
+ def apply_command_defaults(command)
1268
+ command.query['key'] = key unless key.nil?
1269
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1270
+ end
1271
+ end
1272
+ end
1273
+ end
1274
+ end