google-apis-workstations_v1beta 0.1.0

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