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,1832 @@
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 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module WorkstationsV1
24
+
25
+ # Specifies the audit configuration for a service. The configuration determines
26
+ # which permission types are logged, and what identities, if any, are exempted
27
+ # from logging. An AuditConfig must have one or more AuditLogConfigs. If there
28
+ # are AuditConfigs for both `allServices` and a specific service, the union of
29
+ # the two AuditConfigs is used for that service: the log_types specified in each
30
+ # AuditConfig are enabled, and the exempted_members in each AuditLogConfig are
31
+ # exempted. Example Policy with multiple AuditConfigs: ` "audit_configs": [ ` "
32
+ # service": "allServices", "audit_log_configs": [ ` "log_type": "DATA_READ", "
33
+ # exempted_members": [ "user:jose@example.com" ] `, ` "log_type": "DATA_WRITE" `,
34
+ # ` "log_type": "ADMIN_READ" ` ] `, ` "service": "sampleservice.googleapis.com",
35
+ # "audit_log_configs": [ ` "log_type": "DATA_READ" `, ` "log_type": "DATA_WRITE"
36
+ # , "exempted_members": [ "user:aliya@example.com" ] ` ] ` ] ` For sampleservice,
37
+ # this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also
38
+ # exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com`
39
+ # from DATA_WRITE logging.
40
+ class AuditConfig
41
+ include Google::Apis::Core::Hashable
42
+
43
+ # The configuration for logging of each type of permission.
44
+ # Corresponds to the JSON property `auditLogConfigs`
45
+ # @return [Array<Google::Apis::WorkstationsV1::AuditLogConfig>]
46
+ attr_accessor :audit_log_configs
47
+
48
+ # Specifies a service that will be enabled for audit logging. For example, `
49
+ # storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special
50
+ # value that covers all services.
51
+ # Corresponds to the JSON property `service`
52
+ # @return [String]
53
+ attr_accessor :service
54
+
55
+ def initialize(**args)
56
+ update!(**args)
57
+ end
58
+
59
+ # Update properties of this object
60
+ def update!(**args)
61
+ @audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
62
+ @service = args[:service] if args.key?(:service)
63
+ end
64
+ end
65
+
66
+ # Provides the configuration for logging a type of permissions. Example: ` "
67
+ # audit_log_configs": [ ` "log_type": "DATA_READ", "exempted_members": [ "user:
68
+ # jose@example.com" ] `, ` "log_type": "DATA_WRITE" ` ] ` This enables '
69
+ # DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from
70
+ # DATA_READ logging.
71
+ class AuditLogConfig
72
+ include Google::Apis::Core::Hashable
73
+
74
+ # Specifies the identities that do not cause logging for this type of permission.
75
+ # Follows the same format of Binding.members.
76
+ # Corresponds to the JSON property `exemptedMembers`
77
+ # @return [Array<String>]
78
+ attr_accessor :exempted_members
79
+
80
+ # The log type that this config enables.
81
+ # Corresponds to the JSON property `logType`
82
+ # @return [String]
83
+ attr_accessor :log_type
84
+
85
+ def initialize(**args)
86
+ update!(**args)
87
+ end
88
+
89
+ # Update properties of this object
90
+ def update!(**args)
91
+ @exempted_members = args[:exempted_members] if args.key?(:exempted_members)
92
+ @log_type = args[:log_type] if args.key?(:log_type)
93
+ end
94
+ end
95
+
96
+ # Associates `members`, or principals, with a `role`.
97
+ class Binding
98
+ include Google::Apis::Core::Hashable
99
+
100
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
101
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
102
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
103
+ # "Summary size limit" description: "Determines if a summary is less than 100
104
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
105
+ # Requestor is owner" description: "Determines if requestor is the document
106
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
107
+ # Logic): title: "Public documents" description: "Determine whether the document
108
+ # should be publicly visible" expression: "document.type != 'private' &&
109
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
110
+ # string" description: "Create a notification string with a timestamp."
111
+ # expression: "'New message received at ' + string(document.create_time)" The
112
+ # exact variables and functions that may be referenced within an expression are
113
+ # determined by the service that evaluates it. See the service documentation for
114
+ # additional information.
115
+ # Corresponds to the JSON property `condition`
116
+ # @return [Google::Apis::WorkstationsV1::Expr]
117
+ attr_accessor :condition
118
+
119
+ # Specifies the principals requesting access for a Google Cloud resource. `
120
+ # members` can have the following values: * `allUsers`: A special identifier
121
+ # that represents anyone who is on the internet; with or without a Google
122
+ # account. * `allAuthenticatedUsers`: A special identifier that represents
123
+ # anyone who is authenticated with a Google account or a service account. Does
124
+ # not include identities that come from external identity providers (IdPs)
125
+ # through identity federation. * `user:`emailid``: An email address that
126
+ # represents a specific Google account. For example, `alice@example.com` . * `
127
+ # serviceAccount:`emailid``: An email address that represents a Google service
128
+ # account. For example, `my-other-app@appspot.gserviceaccount.com`. * `
129
+ # serviceAccount:`projectid`.svc.id.goog[`namespace`/`kubernetes-sa`]`: An
130
+ # identifier for a [Kubernetes service account](https://cloud.google.com/
131
+ # kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-
132
+ # project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:`emailid``: An
133
+ # email address that represents a Google group. For example, `admins@example.com`
134
+ # . * `domain:`domain``: The G Suite domain (primary) that represents all the
135
+ # users of that domain. For example, `google.com` or `example.com`. * `deleted:
136
+ # user:`emailid`?uid=`uniqueid``: An email address (plus unique identifier)
137
+ # representing a user that has been recently deleted. For example, `alice@
138
+ # example.com?uid=123456789012345678901`. If the user is recovered, this value
139
+ # reverts to `user:`emailid`` and the recovered user retains the role in the
140
+ # binding. * `deleted:serviceAccount:`emailid`?uid=`uniqueid``: An email address
141
+ # (plus unique identifier) representing a service account that has been recently
142
+ # deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=
143
+ # 123456789012345678901`. If the service account is undeleted, this value
144
+ # reverts to `serviceAccount:`emailid`` and the undeleted service account
145
+ # retains the role in the binding. * `deleted:group:`emailid`?uid=`uniqueid``:
146
+ # An email address (plus unique identifier) representing a Google group that has
147
+ # been recently deleted. For example, `admins@example.com?uid=
148
+ # 123456789012345678901`. If the group is recovered, this value reverts to `
149
+ # group:`emailid`` and the recovered group retains the role in the binding.
150
+ # Corresponds to the JSON property `members`
151
+ # @return [Array<String>]
152
+ attr_accessor :members
153
+
154
+ # Role that is assigned to the list of `members`, or principals. For example, `
155
+ # roles/viewer`, `roles/editor`, or `roles/owner`.
156
+ # Corresponds to the JSON property `role`
157
+ # @return [String]
158
+ attr_accessor :role
159
+
160
+ def initialize(**args)
161
+ update!(**args)
162
+ end
163
+
164
+ # Update properties of this object
165
+ def update!(**args)
166
+ @condition = args[:condition] if args.key?(:condition)
167
+ @members = args[:members] if args.key?(:members)
168
+ @role = args[:role] if args.key?(:role)
169
+ end
170
+ end
171
+
172
+ # The request message for Operations.CancelOperation.
173
+ class CancelOperationRequest
174
+ include Google::Apis::Core::Hashable
175
+
176
+ def initialize(**args)
177
+ update!(**args)
178
+ end
179
+
180
+ # Update properties of this object
181
+ def update!(**args)
182
+ end
183
+ end
184
+
185
+ # A Docker container.
186
+ class Container
187
+ include Google::Apis::Core::Hashable
188
+
189
+ # Optional. Arguments passed to the entrypoint.
190
+ # Corresponds to the JSON property `args`
191
+ # @return [Array<String>]
192
+ attr_accessor :args
193
+
194
+ # Optional. If set, overrides the default ENTRYPOINT specified by the image.
195
+ # Corresponds to the JSON property `command`
196
+ # @return [Array<String>]
197
+ attr_accessor :command
198
+
199
+ # Optional. Environment variables passed to the container's entrypoint.
200
+ # Corresponds to the JSON property `env`
201
+ # @return [Hash<String,String>]
202
+ attr_accessor :env
203
+
204
+ # Optional. A Docker container image that defines a custom environment. Cloud
205
+ # Workstations provides a number of [preconfigured images](https://cloud.google.
206
+ # com/workstations/docs/preconfigured-base-images), but you can create your own [
207
+ # custom container images](https://cloud.google.com/workstations/docs/custom-
208
+ # container-images). If using a private image, the `host.gceInstance.
209
+ # serviceAccount` field must be specified in the workstation configuration and
210
+ # must have permission to pull the specified image. Otherwise, the image must be
211
+ # publicly accessible.
212
+ # Corresponds to the JSON property `image`
213
+ # @return [String]
214
+ attr_accessor :image
215
+
216
+ # Optional. If set, overrides the USER specified in the image with the given uid.
217
+ # Corresponds to the JSON property `runAsUser`
218
+ # @return [Fixnum]
219
+ attr_accessor :run_as_user
220
+
221
+ # Optional. If set, overrides the default DIR specified by the image.
222
+ # Corresponds to the JSON property `workingDir`
223
+ # @return [String]
224
+ attr_accessor :working_dir
225
+
226
+ def initialize(**args)
227
+ update!(**args)
228
+ end
229
+
230
+ # Update properties of this object
231
+ def update!(**args)
232
+ @args = args[:args] if args.key?(:args)
233
+ @command = args[:command] if args.key?(:command)
234
+ @env = args[:env] if args.key?(:env)
235
+ @image = args[:image] if args.key?(:image)
236
+ @run_as_user = args[:run_as_user] if args.key?(:run_as_user)
237
+ @working_dir = args[:working_dir] if args.key?(:working_dir)
238
+ end
239
+ end
240
+
241
+ # A customer-managed encryption key (CMEK) for the Compute Engine resources of
242
+ # the associated workstation configuration. Specify the name of your Cloud KMS
243
+ # encryption key and the default service account. We recommend that you use a
244
+ # separate service account and follow [Cloud KMS best practices](https://cloud.
245
+ # google.com/kms/docs/separation-of-duties).
246
+ class CustomerEncryptionKey
247
+ include Google::Apis::Core::Hashable
248
+
249
+ # Immutable. The name of the Google Cloud KMS encryption key. For example, `"
250
+ # projects/PROJECT_ID/locations/REGION/keyRings/KEY_RING/cryptoKeys/KEY_NAME"`.
251
+ # The key must be in the same region as the workstation configuration.
252
+ # Corresponds to the JSON property `kmsKey`
253
+ # @return [String]
254
+ attr_accessor :kms_key
255
+
256
+ # Immutable. The service account to use with the specified KMS key. We recommend
257
+ # that you use a separate service account and follow KMS best practices. For
258
+ # more information, see [Separation of duties](https://cloud.google.com/kms/docs/
259
+ # separation-of-duties) and `gcloud kms keys add-iam-policy-binding` [`--member`]
260
+ # (https://cloud.google.com/sdk/gcloud/reference/kms/keys/add-iam-policy-binding#
261
+ # --member).
262
+ # Corresponds to the JSON property `kmsKeyServiceAccount`
263
+ # @return [String]
264
+ attr_accessor :kms_key_service_account
265
+
266
+ def initialize(**args)
267
+ update!(**args)
268
+ end
269
+
270
+ # Update properties of this object
271
+ def update!(**args)
272
+ @kms_key = args[:kms_key] if args.key?(:kms_key)
273
+ @kms_key_service_account = args[:kms_key_service_account] if args.key?(:kms_key_service_account)
274
+ end
275
+ end
276
+
277
+ # Represents a textual expression in the Common Expression Language (CEL) syntax.
278
+ # CEL is a C-like expression language. The syntax and semantics of CEL are
279
+ # documented at https://github.com/google/cel-spec. Example (Comparison): title:
280
+ # "Summary size limit" description: "Determines if a summary is less than 100
281
+ # chars" expression: "document.summary.size() < 100" Example (Equality): title: "
282
+ # Requestor is owner" description: "Determines if requestor is the document
283
+ # owner" expression: "document.owner == request.auth.claims.email" Example (
284
+ # Logic): title: "Public documents" description: "Determine whether the document
285
+ # should be publicly visible" expression: "document.type != 'private' &&
286
+ # document.type != 'internal'" Example (Data Manipulation): title: "Notification
287
+ # string" description: "Create a notification string with a timestamp."
288
+ # expression: "'New message received at ' + string(document.create_time)" The
289
+ # exact variables and functions that may be referenced within an expression are
290
+ # determined by the service that evaluates it. See the service documentation for
291
+ # additional information.
292
+ class Expr
293
+ include Google::Apis::Core::Hashable
294
+
295
+ # Optional. Description of the expression. This is a longer text which describes
296
+ # the expression, e.g. when hovered over it in a UI.
297
+ # Corresponds to the JSON property `description`
298
+ # @return [String]
299
+ attr_accessor :description
300
+
301
+ # Textual representation of an expression in Common Expression Language syntax.
302
+ # Corresponds to the JSON property `expression`
303
+ # @return [String]
304
+ attr_accessor :expression
305
+
306
+ # Optional. String indicating the location of the expression for error reporting,
307
+ # e.g. a file name and a position in the file.
308
+ # Corresponds to the JSON property `location`
309
+ # @return [String]
310
+ attr_accessor :location
311
+
312
+ # Optional. Title for the expression, i.e. a short string describing its purpose.
313
+ # This can be used e.g. in UIs which allow to enter the expression.
314
+ # Corresponds to the JSON property `title`
315
+ # @return [String]
316
+ attr_accessor :title
317
+
318
+ def initialize(**args)
319
+ update!(**args)
320
+ end
321
+
322
+ # Update properties of this object
323
+ def update!(**args)
324
+ @description = args[:description] if args.key?(:description)
325
+ @expression = args[:expression] if args.key?(:expression)
326
+ @location = args[:location] if args.key?(:location)
327
+ @title = args[:title] if args.key?(:title)
328
+ end
329
+ end
330
+
331
+ # A set of Compute Engine Confidential VM instance options.
332
+ class GceConfidentialInstanceConfig
333
+ include Google::Apis::Core::Hashable
334
+
335
+ # Optional. Whether the instance has confidential compute enabled.
336
+ # Corresponds to the JSON property `enableConfidentialCompute`
337
+ # @return [Boolean]
338
+ attr_accessor :enable_confidential_compute
339
+ alias_method :enable_confidential_compute?, :enable_confidential_compute
340
+
341
+ def initialize(**args)
342
+ update!(**args)
343
+ end
344
+
345
+ # Update properties of this object
346
+ def update!(**args)
347
+ @enable_confidential_compute = args[:enable_confidential_compute] if args.key?(:enable_confidential_compute)
348
+ end
349
+ end
350
+
351
+ # A runtime using a Compute Engine instance.
352
+ class GceInstance
353
+ include Google::Apis::Core::Hashable
354
+
355
+ # Optional. The size of the boot disk for the VM in gigabytes (GB). The minimum
356
+ # boot disk size is `30` GB. Defaults to `50` GB.
357
+ # Corresponds to the JSON property `bootDiskSizeGb`
358
+ # @return [Fixnum]
359
+ attr_accessor :boot_disk_size_gb
360
+
361
+ # A set of Compute Engine Confidential VM instance options.
362
+ # Corresponds to the JSON property `confidentialInstanceConfig`
363
+ # @return [Google::Apis::WorkstationsV1::GceConfidentialInstanceConfig]
364
+ attr_accessor :confidential_instance_config
365
+
366
+ # Optional. When set to true, disables public IP addresses for VMs. If you
367
+ # disable public IP addresses, you must set up Private Google Access or Cloud
368
+ # NAT on your network. If you use Private Google Access and you use `private.
369
+ # googleapis.com` or `restricted.googleapis.com` for Container Registry and
370
+ # Artifact Registry, make sure that you set up DNS records for domains `*.gcr.io`
371
+ # and `*.pkg.dev`. Defaults to false (VMs have public IP addresses).
372
+ # Corresponds to the JSON property `disablePublicIpAddresses`
373
+ # @return [Boolean]
374
+ attr_accessor :disable_public_ip_addresses
375
+ alias_method :disable_public_ip_addresses?, :disable_public_ip_addresses
376
+
377
+ # Optional. Whether to enable nested virtualization on Cloud Workstations VMs
378
+ # created under this workstation configuration. Nested virtualization lets you
379
+ # run virtual machine (VM) instances inside your workstation. Before enabling
380
+ # nested virtualization, consider the following important considerations. Cloud
381
+ # Workstations instances are subject to the [same restrictions as Compute Engine
382
+ # instances](https://cloud.google.com/compute/docs/instances/nested-
383
+ # virtualization/overview#restrictions): * **Organization policy**: projects,
384
+ # folders, or organizations may be restricted from creating nested VMs if the **
385
+ # Disable VM nested virtualization** constraint is enforced in the organization
386
+ # policy. For more information, see the Compute Engine section, [Checking
387
+ # whether nested virtualization is allowed](https://cloud.google.com/compute/
388
+ # docs/instances/nested-virtualization/managing-constraint#
389
+ # checking_whether_nested_virtualization_is_allowed). * **Performance**: nested
390
+ # VMs might experience a 10% or greater decrease in performance for workloads
391
+ # that are CPU-bound and possibly greater than a 10% decrease for workloads that
392
+ # are input/output bound. * **Machine Type**: nested virtualization can only be
393
+ # enabled on workstation configurations that specify a machine_type in the N1 or
394
+ # N2 machine series. * **GPUs**: nested virtualization may not be enabled on
395
+ # workstation configurations with accelerators. * **Operating System**: Because [
396
+ # Container-Optimized OS](https://cloud.google.com/compute/docs/images/os-
397
+ # details#container-optimized_os_cos) does not support nested virtualization,
398
+ # when nested virtualization is enabled, the underlying Compute Engine VM
399
+ # instances boot from an [Ubuntu LTS](https://cloud.google.com/compute/docs/
400
+ # images/os-details#ubuntu_lts) image.
401
+ # Corresponds to the JSON property `enableNestedVirtualization`
402
+ # @return [Boolean]
403
+ attr_accessor :enable_nested_virtualization
404
+ alias_method :enable_nested_virtualization?, :enable_nested_virtualization
405
+
406
+ # Optional. The type of machine to use for VM instances—for example, `"e2-
407
+ # standard-4"`. For more information about machine types that Cloud Workstations
408
+ # supports, see the list of [available machine types](https://cloud.google.com/
409
+ # workstations/docs/available-machine-types).
410
+ # Corresponds to the JSON property `machineType`
411
+ # @return [String]
412
+ attr_accessor :machine_type
413
+
414
+ # Optional. The number of VMs that the system should keep idle so that new
415
+ # workstations can be started quickly for new users. Defaults to `0` in the API.
416
+ # Corresponds to the JSON property `poolSize`
417
+ # @return [Fixnum]
418
+ attr_accessor :pool_size
419
+
420
+ # Output only. Number of instances currently available in the pool for faster
421
+ # workstation startup.
422
+ # Corresponds to the JSON property `pooledInstances`
423
+ # @return [Fixnum]
424
+ attr_accessor :pooled_instances
425
+
426
+ # Optional. The email address of the service account for Cloud Workstations VMs
427
+ # created with this configuration. When specified, be sure that the service
428
+ # account has `logginglogEntries.create` permission on the project so it can
429
+ # write logs out to Cloud Logging. If using a custom container image, the
430
+ # service account must have permissions to pull the specified image. If you as
431
+ # the administrator want to be able to `ssh` into the underlying VM, you need to
432
+ # set this value to a service account for which you have the `iam.
433
+ # serviceAccounts.actAs` permission. Conversely, if you don't want anyone to be
434
+ # able to `ssh` into the underlying VM, use a service account where no one has
435
+ # that permission. If not set, VMs run with a service account provided by the
436
+ # Cloud Workstations service, and the image must be publicly accessible.
437
+ # Corresponds to the JSON property `serviceAccount`
438
+ # @return [String]
439
+ attr_accessor :service_account
440
+
441
+ # Optional. Scopes to grant to the service_account. Various scopes are
442
+ # automatically added based on feature usage. When specified, users of
443
+ # workstations under this configuration must have `iam.serviceAccounts.actAs` on
444
+ # the service account.
445
+ # Corresponds to the JSON property `serviceAccountScopes`
446
+ # @return [Array<String>]
447
+ attr_accessor :service_account_scopes
448
+
449
+ # A set of Compute Engine Shielded instance options.
450
+ # Corresponds to the JSON property `shieldedInstanceConfig`
451
+ # @return [Google::Apis::WorkstationsV1::GceShieldedInstanceConfig]
452
+ attr_accessor :shielded_instance_config
453
+
454
+ # Optional. Network tags to add to the Compute Engine VMs backing the
455
+ # workstations. This option applies [network tags](https://cloud.google.com/vpc/
456
+ # docs/add-remove-network-tags) to VMs created with this configuration. These
457
+ # network tags enable the creation of [firewall rules](https://cloud.google.com/
458
+ # workstations/docs/configure-firewall-rules).
459
+ # Corresponds to the JSON property `tags`
460
+ # @return [Array<String>]
461
+ attr_accessor :tags
462
+
463
+ def initialize(**args)
464
+ update!(**args)
465
+ end
466
+
467
+ # Update properties of this object
468
+ def update!(**args)
469
+ @boot_disk_size_gb = args[:boot_disk_size_gb] if args.key?(:boot_disk_size_gb)
470
+ @confidential_instance_config = args[:confidential_instance_config] if args.key?(:confidential_instance_config)
471
+ @disable_public_ip_addresses = args[:disable_public_ip_addresses] if args.key?(:disable_public_ip_addresses)
472
+ @enable_nested_virtualization = args[:enable_nested_virtualization] if args.key?(:enable_nested_virtualization)
473
+ @machine_type = args[:machine_type] if args.key?(:machine_type)
474
+ @pool_size = args[:pool_size] if args.key?(:pool_size)
475
+ @pooled_instances = args[:pooled_instances] if args.key?(:pooled_instances)
476
+ @service_account = args[:service_account] if args.key?(:service_account)
477
+ @service_account_scopes = args[:service_account_scopes] if args.key?(:service_account_scopes)
478
+ @shielded_instance_config = args[:shielded_instance_config] if args.key?(:shielded_instance_config)
479
+ @tags = args[:tags] if args.key?(:tags)
480
+ end
481
+ end
482
+
483
+ # A PersistentDirectory backed by a Compute Engine regional persistent disk. The
484
+ # persistent_directories field is repeated, but it may contain only one entry.
485
+ # It creates a [persistent disk](https://cloud.google.com/compute/docs/disks/
486
+ # persistent-disks) that mounts to the workstation VM at `/home` when the
487
+ # session starts and detaches when the session ends. If this field is empty,
488
+ # workstations created with this configuration do not have a persistent home
489
+ # directory.
490
+ class GceRegionalPersistentDisk
491
+ include Google::Apis::Core::Hashable
492
+
493
+ # Optional. The [type of the persistent disk](https://cloud.google.com/compute/
494
+ # docs/disks#disk-types) for the home directory. Defaults to `"pd-standard"`.
495
+ # Corresponds to the JSON property `diskType`
496
+ # @return [String]
497
+ attr_accessor :disk_type
498
+
499
+ # Optional. Type of file system that the disk should be formatted with. The
500
+ # workstation image must support this file system type. Must be empty if
501
+ # source_snapshot is set. Defaults to `"ext4"`.
502
+ # Corresponds to the JSON property `fsType`
503
+ # @return [String]
504
+ attr_accessor :fs_type
505
+
506
+ # Optional. Whether the persistent disk should be deleted when the workstation
507
+ # is deleted. Valid values are `DELETE` and `RETAIN`. Defaults to `DELETE`.
508
+ # Corresponds to the JSON property `reclaimPolicy`
509
+ # @return [String]
510
+ attr_accessor :reclaim_policy
511
+
512
+ # Optional. The GB capacity of a persistent home directory for each workstation
513
+ # created with this configuration. Must be empty if source_snapshot is set.
514
+ # Valid values are `10`, `50`, `100`, `200`, `500`, or `1000`. Defaults to `200`.
515
+ # If less than `200` GB, the disk_type must be `"pd-balanced"` or `"pd-ssd"`.
516
+ # Corresponds to the JSON property `sizeGb`
517
+ # @return [Fixnum]
518
+ attr_accessor :size_gb
519
+
520
+ # Optional. Name of the snapshot to use as the source for the disk. If set,
521
+ # size_gb and fs_type must be empty.
522
+ # Corresponds to the JSON property `sourceSnapshot`
523
+ # @return [String]
524
+ attr_accessor :source_snapshot
525
+
526
+ def initialize(**args)
527
+ update!(**args)
528
+ end
529
+
530
+ # Update properties of this object
531
+ def update!(**args)
532
+ @disk_type = args[:disk_type] if args.key?(:disk_type)
533
+ @fs_type = args[:fs_type] if args.key?(:fs_type)
534
+ @reclaim_policy = args[:reclaim_policy] if args.key?(:reclaim_policy)
535
+ @size_gb = args[:size_gb] if args.key?(:size_gb)
536
+ @source_snapshot = args[:source_snapshot] if args.key?(:source_snapshot)
537
+ end
538
+ end
539
+
540
+ # A set of Compute Engine Shielded instance options.
541
+ class GceShieldedInstanceConfig
542
+ include Google::Apis::Core::Hashable
543
+
544
+ # Optional. Whether the instance has integrity monitoring enabled.
545
+ # Corresponds to the JSON property `enableIntegrityMonitoring`
546
+ # @return [Boolean]
547
+ attr_accessor :enable_integrity_monitoring
548
+ alias_method :enable_integrity_monitoring?, :enable_integrity_monitoring
549
+
550
+ # Optional. Whether the instance has Secure Boot enabled.
551
+ # Corresponds to the JSON property `enableSecureBoot`
552
+ # @return [Boolean]
553
+ attr_accessor :enable_secure_boot
554
+ alias_method :enable_secure_boot?, :enable_secure_boot
555
+
556
+ # Optional. Whether the instance has the vTPM enabled.
557
+ # Corresponds to the JSON property `enableVtpm`
558
+ # @return [Boolean]
559
+ attr_accessor :enable_vtpm
560
+ alias_method :enable_vtpm?, :enable_vtpm
561
+
562
+ def initialize(**args)
563
+ update!(**args)
564
+ end
565
+
566
+ # Update properties of this object
567
+ def update!(**args)
568
+ @enable_integrity_monitoring = args[:enable_integrity_monitoring] if args.key?(:enable_integrity_monitoring)
569
+ @enable_secure_boot = args[:enable_secure_boot] if args.key?(:enable_secure_boot)
570
+ @enable_vtpm = args[:enable_vtpm] if args.key?(:enable_vtpm)
571
+ end
572
+ end
573
+
574
+ # Request message for GenerateAccessToken.
575
+ class GenerateAccessTokenRequest
576
+ include Google::Apis::Core::Hashable
577
+
578
+ # Desired expiration time of the access token. This value must be at most 24
579
+ # hours in the future. If a value is not specified, the token's expiration time
580
+ # will be set to a default value of 1 hour in the future.
581
+ # Corresponds to the JSON property `expireTime`
582
+ # @return [String]
583
+ attr_accessor :expire_time
584
+
585
+ # Desired lifetime duration of the access token. This value must be at most 24
586
+ # hours. If a value is not specified, the token's lifetime will be set to a
587
+ # default value of 1 hour.
588
+ # Corresponds to the JSON property `ttl`
589
+ # @return [String]
590
+ attr_accessor :ttl
591
+
592
+ def initialize(**args)
593
+ update!(**args)
594
+ end
595
+
596
+ # Update properties of this object
597
+ def update!(**args)
598
+ @expire_time = args[:expire_time] if args.key?(:expire_time)
599
+ @ttl = args[:ttl] if args.key?(:ttl)
600
+ end
601
+ end
602
+
603
+ # Response message for GenerateAccessToken.
604
+ class GenerateAccessTokenResponse
605
+ include Google::Apis::Core::Hashable
606
+
607
+ # The generated bearer access token. To use this token, include it in an
608
+ # Authorization header of an HTTP request sent to the associated workstation's
609
+ # hostname—for example, `Authorization: Bearer `.
610
+ # Corresponds to the JSON property `accessToken`
611
+ # @return [String]
612
+ attr_accessor :access_token
613
+
614
+ # Time at which the generated token will expire.
615
+ # Corresponds to the JSON property `expireTime`
616
+ # @return [String]
617
+ attr_accessor :expire_time
618
+
619
+ def initialize(**args)
620
+ update!(**args)
621
+ end
622
+
623
+ # Update properties of this object
624
+ def update!(**args)
625
+ @access_token = args[:access_token] if args.key?(:access_token)
626
+ @expire_time = args[:expire_time] if args.key?(:expire_time)
627
+ end
628
+ end
629
+
630
+ # A generic empty message that you can re-use to avoid defining duplicated empty
631
+ # messages in your APIs. A typical example is to use it as the request or the
632
+ # response type of an API method. For instance: service Foo ` rpc Bar(google.
633
+ # protobuf.Empty) returns (google.protobuf.Empty); `
634
+ class GoogleProtobufEmpty
635
+ include Google::Apis::Core::Hashable
636
+
637
+ def initialize(**args)
638
+ update!(**args)
639
+ end
640
+
641
+ # Update properties of this object
642
+ def update!(**args)
643
+ end
644
+ end
645
+
646
+ # Runtime host for a workstation.
647
+ class Host
648
+ include Google::Apis::Core::Hashable
649
+
650
+ # A runtime using a Compute Engine instance.
651
+ # Corresponds to the JSON property `gceInstance`
652
+ # @return [Google::Apis::WorkstationsV1::GceInstance]
653
+ attr_accessor :gce_instance
654
+
655
+ def initialize(**args)
656
+ update!(**args)
657
+ end
658
+
659
+ # Update properties of this object
660
+ def update!(**args)
661
+ @gce_instance = args[:gce_instance] if args.key?(:gce_instance)
662
+ end
663
+ end
664
+
665
+ # The response message for Locations.ListLocations.
666
+ class ListLocationsResponse
667
+ include Google::Apis::Core::Hashable
668
+
669
+ # A list of locations that matches the specified filter in the request.
670
+ # Corresponds to the JSON property `locations`
671
+ # @return [Array<Google::Apis::WorkstationsV1::Location>]
672
+ attr_accessor :locations
673
+
674
+ # The standard List next-page token.
675
+ # Corresponds to the JSON property `nextPageToken`
676
+ # @return [String]
677
+ attr_accessor :next_page_token
678
+
679
+ def initialize(**args)
680
+ update!(**args)
681
+ end
682
+
683
+ # Update properties of this object
684
+ def update!(**args)
685
+ @locations = args[:locations] if args.key?(:locations)
686
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
687
+ end
688
+ end
689
+
690
+ # The response message for Operations.ListOperations.
691
+ class ListOperationsResponse
692
+ include Google::Apis::Core::Hashable
693
+
694
+ # The standard List next-page token.
695
+ # Corresponds to the JSON property `nextPageToken`
696
+ # @return [String]
697
+ attr_accessor :next_page_token
698
+
699
+ # A list of operations that matches the specified filter in the request.
700
+ # Corresponds to the JSON property `operations`
701
+ # @return [Array<Google::Apis::WorkstationsV1::Operation>]
702
+ attr_accessor :operations
703
+
704
+ def initialize(**args)
705
+ update!(**args)
706
+ end
707
+
708
+ # Update properties of this object
709
+ def update!(**args)
710
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
711
+ @operations = args[:operations] if args.key?(:operations)
712
+ end
713
+ end
714
+
715
+ # Response message for ListUsableWorkstationConfigs.
716
+ class ListUsableWorkstationConfigsResponse
717
+ include Google::Apis::Core::Hashable
718
+
719
+ # Token to retrieve the next page of results, or empty if there are no more
720
+ # results in the list.
721
+ # Corresponds to the JSON property `nextPageToken`
722
+ # @return [String]
723
+ attr_accessor :next_page_token
724
+
725
+ # Unreachable resources.
726
+ # Corresponds to the JSON property `unreachable`
727
+ # @return [Array<String>]
728
+ attr_accessor :unreachable
729
+
730
+ # The requested configs.
731
+ # Corresponds to the JSON property `workstationConfigs`
732
+ # @return [Array<Google::Apis::WorkstationsV1::WorkstationConfig>]
733
+ attr_accessor :workstation_configs
734
+
735
+ def initialize(**args)
736
+ update!(**args)
737
+ end
738
+
739
+ # Update properties of this object
740
+ def update!(**args)
741
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
742
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
743
+ @workstation_configs = args[:workstation_configs] if args.key?(:workstation_configs)
744
+ end
745
+ end
746
+
747
+ # Response message for ListUsableWorkstations.
748
+ class ListUsableWorkstationsResponse
749
+ include Google::Apis::Core::Hashable
750
+
751
+ # Token to retrieve the next page of results, or empty if there are no more
752
+ # results in the list.
753
+ # Corresponds to the JSON property `nextPageToken`
754
+ # @return [String]
755
+ attr_accessor :next_page_token
756
+
757
+ # Unreachable resources.
758
+ # Corresponds to the JSON property `unreachable`
759
+ # @return [Array<String>]
760
+ attr_accessor :unreachable
761
+
762
+ # The requested workstations.
763
+ # Corresponds to the JSON property `workstations`
764
+ # @return [Array<Google::Apis::WorkstationsV1::Workstation>]
765
+ attr_accessor :workstations
766
+
767
+ def initialize(**args)
768
+ update!(**args)
769
+ end
770
+
771
+ # Update properties of this object
772
+ def update!(**args)
773
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
774
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
775
+ @workstations = args[:workstations] if args.key?(:workstations)
776
+ end
777
+ end
778
+
779
+ # Response message for ListWorkstationClusters.
780
+ class ListWorkstationClustersResponse
781
+ include Google::Apis::Core::Hashable
782
+
783
+ # Token to retrieve the next page of results, or empty if there are no more
784
+ # results in the list.
785
+ # Corresponds to the JSON property `nextPageToken`
786
+ # @return [String]
787
+ attr_accessor :next_page_token
788
+
789
+ # Unreachable resources.
790
+ # Corresponds to the JSON property `unreachable`
791
+ # @return [Array<String>]
792
+ attr_accessor :unreachable
793
+
794
+ # The requested workstation clusters.
795
+ # Corresponds to the JSON property `workstationClusters`
796
+ # @return [Array<Google::Apis::WorkstationsV1::WorkstationCluster>]
797
+ attr_accessor :workstation_clusters
798
+
799
+ def initialize(**args)
800
+ update!(**args)
801
+ end
802
+
803
+ # Update properties of this object
804
+ def update!(**args)
805
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
806
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
807
+ @workstation_clusters = args[:workstation_clusters] if args.key?(:workstation_clusters)
808
+ end
809
+ end
810
+
811
+ # Response message for ListWorkstationConfigs.
812
+ class ListWorkstationConfigsResponse
813
+ include Google::Apis::Core::Hashable
814
+
815
+ # Token to retrieve the next page of results, or empty if there are no more
816
+ # results in the list.
817
+ # Corresponds to the JSON property `nextPageToken`
818
+ # @return [String]
819
+ attr_accessor :next_page_token
820
+
821
+ # Unreachable resources.
822
+ # Corresponds to the JSON property `unreachable`
823
+ # @return [Array<String>]
824
+ attr_accessor :unreachable
825
+
826
+ # The requested configs.
827
+ # Corresponds to the JSON property `workstationConfigs`
828
+ # @return [Array<Google::Apis::WorkstationsV1::WorkstationConfig>]
829
+ attr_accessor :workstation_configs
830
+
831
+ def initialize(**args)
832
+ update!(**args)
833
+ end
834
+
835
+ # Update properties of this object
836
+ def update!(**args)
837
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
838
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
839
+ @workstation_configs = args[:workstation_configs] if args.key?(:workstation_configs)
840
+ end
841
+ end
842
+
843
+ # Response message for ListWorkstations.
844
+ class ListWorkstationsResponse
845
+ include Google::Apis::Core::Hashable
846
+
847
+ # Optional. Token to retrieve the next page of results, or empty if there are no
848
+ # more results in the list.
849
+ # Corresponds to the JSON property `nextPageToken`
850
+ # @return [String]
851
+ attr_accessor :next_page_token
852
+
853
+ # Optional. Unreachable resources.
854
+ # Corresponds to the JSON property `unreachable`
855
+ # @return [Array<String>]
856
+ attr_accessor :unreachable
857
+
858
+ # The requested workstations.
859
+ # Corresponds to the JSON property `workstations`
860
+ # @return [Array<Google::Apis::WorkstationsV1::Workstation>]
861
+ attr_accessor :workstations
862
+
863
+ def initialize(**args)
864
+ update!(**args)
865
+ end
866
+
867
+ # Update properties of this object
868
+ def update!(**args)
869
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
870
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
871
+ @workstations = args[:workstations] if args.key?(:workstations)
872
+ end
873
+ end
874
+
875
+ # A resource that represents a Google Cloud location.
876
+ class Location
877
+ include Google::Apis::Core::Hashable
878
+
879
+ # The friendly name for this location, typically a nearby city name. For example,
880
+ # "Tokyo".
881
+ # Corresponds to the JSON property `displayName`
882
+ # @return [String]
883
+ attr_accessor :display_name
884
+
885
+ # Cross-service attributes for the location. For example `"cloud.googleapis.com/
886
+ # region": "us-east1"`
887
+ # Corresponds to the JSON property `labels`
888
+ # @return [Hash<String,String>]
889
+ attr_accessor :labels
890
+
891
+ # The canonical id for this location. For example: `"us-east1"`.
892
+ # Corresponds to the JSON property `locationId`
893
+ # @return [String]
894
+ attr_accessor :location_id
895
+
896
+ # Service-specific metadata. For example the available capacity at the given
897
+ # location.
898
+ # Corresponds to the JSON property `metadata`
899
+ # @return [Hash<String,Object>]
900
+ attr_accessor :metadata
901
+
902
+ # Resource name for the location, which may vary between implementations. For
903
+ # example: `"projects/example-project/locations/us-east1"`
904
+ # Corresponds to the JSON property `name`
905
+ # @return [String]
906
+ attr_accessor :name
907
+
908
+ def initialize(**args)
909
+ update!(**args)
910
+ end
911
+
912
+ # Update properties of this object
913
+ def update!(**args)
914
+ @display_name = args[:display_name] if args.key?(:display_name)
915
+ @labels = args[:labels] if args.key?(:labels)
916
+ @location_id = args[:location_id] if args.key?(:location_id)
917
+ @metadata = args[:metadata] if args.key?(:metadata)
918
+ @name = args[:name] if args.key?(:name)
919
+ end
920
+ end
921
+
922
+ # This resource represents a long-running operation that is the result of a
923
+ # network API call.
924
+ class Operation
925
+ include Google::Apis::Core::Hashable
926
+
927
+ # If the value is `false`, it means the operation is still in progress. If `true`
928
+ # , the operation is completed, and either `error` or `response` is available.
929
+ # Corresponds to the JSON property `done`
930
+ # @return [Boolean]
931
+ attr_accessor :done
932
+ alias_method :done?, :done
933
+
934
+ # The `Status` type defines a logical error model that is suitable for different
935
+ # programming environments, including REST APIs and RPC APIs. It is used by [
936
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
937
+ # data: error code, error message, and error details. You can find out more
938
+ # about this error model and how to work with it in the [API Design Guide](https:
939
+ # //cloud.google.com/apis/design/errors).
940
+ # Corresponds to the JSON property `error`
941
+ # @return [Google::Apis::WorkstationsV1::Status]
942
+ attr_accessor :error
943
+
944
+ # Service-specific metadata associated with the operation. It typically contains
945
+ # progress information and common metadata such as create time. Some services
946
+ # might not provide such metadata. Any method that returns a long-running
947
+ # operation should document the metadata type, if any.
948
+ # Corresponds to the JSON property `metadata`
949
+ # @return [Hash<String,Object>]
950
+ attr_accessor :metadata
951
+
952
+ # The server-assigned name, which is only unique within the same service that
953
+ # originally returns it. If you use the default HTTP mapping, the `name` should
954
+ # be a resource name ending with `operations/`unique_id``.
955
+ # Corresponds to the JSON property `name`
956
+ # @return [String]
957
+ attr_accessor :name
958
+
959
+ # The normal, successful response of the operation. If the original method
960
+ # returns no data on success, such as `Delete`, the response is `google.protobuf.
961
+ # Empty`. If the original method is standard `Get`/`Create`/`Update`, the
962
+ # response should be the resource. For other methods, the response should have
963
+ # the type `XxxResponse`, where `Xxx` is the original method name. For example,
964
+ # if the original method name is `TakeSnapshot()`, the inferred response type is
965
+ # `TakeSnapshotResponse`.
966
+ # Corresponds to the JSON property `response`
967
+ # @return [Hash<String,Object>]
968
+ attr_accessor :response
969
+
970
+ def initialize(**args)
971
+ update!(**args)
972
+ end
973
+
974
+ # Update properties of this object
975
+ def update!(**args)
976
+ @done = args[:done] if args.key?(:done)
977
+ @error = args[:error] if args.key?(:error)
978
+ @metadata = args[:metadata] if args.key?(:metadata)
979
+ @name = args[:name] if args.key?(:name)
980
+ @response = args[:response] if args.key?(:response)
981
+ end
982
+ end
983
+
984
+ # Metadata for long-running operations.
985
+ class OperationMetadata
986
+ include Google::Apis::Core::Hashable
987
+
988
+ # Output only. API version used to start the operation.
989
+ # Corresponds to the JSON property `apiVersion`
990
+ # @return [String]
991
+ attr_accessor :api_version
992
+
993
+ # Output only. Time that the operation was created.
994
+ # Corresponds to the JSON property `createTime`
995
+ # @return [String]
996
+ attr_accessor :create_time
997
+
998
+ # Output only. Time that the operation finished running.
999
+ # Corresponds to the JSON property `endTime`
1000
+ # @return [String]
1001
+ attr_accessor :end_time
1002
+
1003
+ # Output only. Identifies whether the user has requested cancellation of the
1004
+ # operation.
1005
+ # Corresponds to the JSON property `requestedCancellation`
1006
+ # @return [Boolean]
1007
+ attr_accessor :requested_cancellation
1008
+ alias_method :requested_cancellation?, :requested_cancellation
1009
+
1010
+ # Output only. Human-readable status of the operation, if any.
1011
+ # Corresponds to the JSON property `statusMessage`
1012
+ # @return [String]
1013
+ attr_accessor :status_message
1014
+
1015
+ # Output only. Server-defined resource path for the target of the operation.
1016
+ # Corresponds to the JSON property `target`
1017
+ # @return [String]
1018
+ attr_accessor :target
1019
+
1020
+ # Output only. Name of the verb executed by the operation.
1021
+ # Corresponds to the JSON property `verb`
1022
+ # @return [String]
1023
+ attr_accessor :verb
1024
+
1025
+ def initialize(**args)
1026
+ update!(**args)
1027
+ end
1028
+
1029
+ # Update properties of this object
1030
+ def update!(**args)
1031
+ @api_version = args[:api_version] if args.key?(:api_version)
1032
+ @create_time = args[:create_time] if args.key?(:create_time)
1033
+ @end_time = args[:end_time] if args.key?(:end_time)
1034
+ @requested_cancellation = args[:requested_cancellation] if args.key?(:requested_cancellation)
1035
+ @status_message = args[:status_message] if args.key?(:status_message)
1036
+ @target = args[:target] if args.key?(:target)
1037
+ @verb = args[:verb] if args.key?(:verb)
1038
+ end
1039
+ end
1040
+
1041
+ # A directory to persist across workstation sessions.
1042
+ class PersistentDirectory
1043
+ include Google::Apis::Core::Hashable
1044
+
1045
+ # A PersistentDirectory backed by a Compute Engine regional persistent disk. The
1046
+ # persistent_directories field is repeated, but it may contain only one entry.
1047
+ # It creates a [persistent disk](https://cloud.google.com/compute/docs/disks/
1048
+ # persistent-disks) that mounts to the workstation VM at `/home` when the
1049
+ # session starts and detaches when the session ends. If this field is empty,
1050
+ # workstations created with this configuration do not have a persistent home
1051
+ # directory.
1052
+ # Corresponds to the JSON property `gcePd`
1053
+ # @return [Google::Apis::WorkstationsV1::GceRegionalPersistentDisk]
1054
+ attr_accessor :gce_pd
1055
+
1056
+ # Optional. Location of this directory in the running workstation.
1057
+ # Corresponds to the JSON property `mountPath`
1058
+ # @return [String]
1059
+ attr_accessor :mount_path
1060
+
1061
+ def initialize(**args)
1062
+ update!(**args)
1063
+ end
1064
+
1065
+ # Update properties of this object
1066
+ def update!(**args)
1067
+ @gce_pd = args[:gce_pd] if args.key?(:gce_pd)
1068
+ @mount_path = args[:mount_path] if args.key?(:mount_path)
1069
+ end
1070
+ end
1071
+
1072
+ # An Identity and Access Management (IAM) policy, which specifies access
1073
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
1074
+ # A `binding` binds one or more `members`, or principals, to a single `role`.
1075
+ # Principals can be user accounts, service accounts, Google groups, and domains (
1076
+ # such as G Suite). A `role` is a named list of permissions; each `role` can be
1077
+ # an IAM predefined role or a user-created custom role. For some types of Google
1078
+ # Cloud resources, a `binding` can also specify a `condition`, which is a
1079
+ # logical expression that allows access to a resource only if the expression
1080
+ # evaluates to `true`. A condition can add constraints based on attributes of
1081
+ # the request, the resource, or both. To learn which resources support
1082
+ # conditions in their IAM policies, see the [IAM documentation](https://cloud.
1083
+ # google.com/iam/help/conditions/resource-policies). **JSON example:** ``` ` "
1084
+ # bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
1085
+ # "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
1086
+ # serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
1087
+ # roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
1088
+ # ], "condition": ` "title": "expirable access", "description": "Does not grant
1089
+ # access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
1090
+ # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` ``` **YAML
1091
+ # example:** ``` bindings: - members: - user:mike@example.com - group:admins@
1092
+ # example.com - domain:google.com - serviceAccount:my-project-id@appspot.
1093
+ # gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: -
1094
+ # user:eve@example.com role: roles/resourcemanager.organizationViewer condition:
1095
+ # title: expirable access description: Does not grant access after Sep 2020
1096
+ # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag:
1097
+ # BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the
1098
+ # [IAM documentation](https://cloud.google.com/iam/docs/).
1099
+ class Policy
1100
+ include Google::Apis::Core::Hashable
1101
+
1102
+ # Specifies cloud audit logging configuration for this policy.
1103
+ # Corresponds to the JSON property `auditConfigs`
1104
+ # @return [Array<Google::Apis::WorkstationsV1::AuditConfig>]
1105
+ attr_accessor :audit_configs
1106
+
1107
+ # Associates a list of `members`, or principals, with a `role`. Optionally, may
1108
+ # specify a `condition` that determines how and when the `bindings` are applied.
1109
+ # Each of the `bindings` must contain at least one principal. The `bindings` in
1110
+ # a `Policy` can refer to up to 1,500 principals; up to 250 of these principals
1111
+ # can be Google groups. Each occurrence of a principal counts towards these
1112
+ # limits. For example, if the `bindings` grant 50 different roles to `user:alice@
1113
+ # example.com`, and not to any other principal, then you can add another 1,450
1114
+ # principals to the `bindings` in the `Policy`.
1115
+ # Corresponds to the JSON property `bindings`
1116
+ # @return [Array<Google::Apis::WorkstationsV1::Binding>]
1117
+ attr_accessor :bindings
1118
+
1119
+ # `etag` is used for optimistic concurrency control as a way to help prevent
1120
+ # simultaneous updates of a policy from overwriting each other. It is strongly
1121
+ # suggested that systems make use of the `etag` in the read-modify-write cycle
1122
+ # to perform policy updates in order to avoid race conditions: An `etag` is
1123
+ # returned in the response to `getIamPolicy`, and systems are expected to put
1124
+ # that etag in the request to `setIamPolicy` to ensure that their change will be
1125
+ # applied to the same version of the policy. **Important:** If you use IAM
1126
+ # Conditions, you must include the `etag` field whenever you call `setIamPolicy`.
1127
+ # If you omit this field, then IAM allows you to overwrite a version `3` policy
1128
+ # with a version `1` policy, and all of the conditions in the version `3` policy
1129
+ # are lost.
1130
+ # Corresponds to the JSON property `etag`
1131
+ # NOTE: Values are automatically base64 encoded/decoded in the client library.
1132
+ # @return [String]
1133
+ attr_accessor :etag
1134
+
1135
+ # Specifies the format of the policy. Valid values are `0`, `1`, and `3`.
1136
+ # Requests that specify an invalid value are rejected. Any operation that
1137
+ # affects conditional role bindings must specify version `3`. This requirement
1138
+ # applies to the following operations: * Getting a policy that includes a
1139
+ # conditional role binding * Adding a conditional role binding to a policy *
1140
+ # Changing a conditional role binding in a policy * Removing any role binding,
1141
+ # with or without a condition, from a policy that includes conditions **
1142
+ # Important:** If you use IAM Conditions, you must include the `etag` field
1143
+ # whenever you call `setIamPolicy`. If you omit this field, then IAM allows you
1144
+ # to overwrite a version `3` policy with a version `1` policy, and all of the
1145
+ # conditions in the version `3` policy are lost. If a policy does not include
1146
+ # any conditions, operations on that policy may specify any valid version or
1147
+ # leave the field unset. To learn which resources support conditions in their
1148
+ # IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/
1149
+ # conditions/resource-policies).
1150
+ # Corresponds to the JSON property `version`
1151
+ # @return [Fixnum]
1152
+ attr_accessor :version
1153
+
1154
+ def initialize(**args)
1155
+ update!(**args)
1156
+ end
1157
+
1158
+ # Update properties of this object
1159
+ def update!(**args)
1160
+ @audit_configs = args[:audit_configs] if args.key?(:audit_configs)
1161
+ @bindings = args[:bindings] if args.key?(:bindings)
1162
+ @etag = args[:etag] if args.key?(:etag)
1163
+ @version = args[:version] if args.key?(:version)
1164
+ end
1165
+ end
1166
+
1167
+ # Configuration options for private workstation clusters.
1168
+ class PrivateClusterConfig
1169
+ include Google::Apis::Core::Hashable
1170
+
1171
+ # Optional. Additional projects that are allowed to attach to the workstation
1172
+ # cluster's service attachment. By default, the workstation cluster's project
1173
+ # and the VPC host project (if different) are allowed.
1174
+ # Corresponds to the JSON property `allowedProjects`
1175
+ # @return [Array<String>]
1176
+ attr_accessor :allowed_projects
1177
+
1178
+ # Output only. Hostname for the workstation cluster. This field will be
1179
+ # populated only when private endpoint is enabled. To access workstations in the
1180
+ # workstation cluster, create a new DNS zone mapping this domain name to an
1181
+ # internal IP address and a forwarding rule mapping that address to the service
1182
+ # attachment.
1183
+ # Corresponds to the JSON property `clusterHostname`
1184
+ # @return [String]
1185
+ attr_accessor :cluster_hostname
1186
+
1187
+ # Immutable. Whether Workstations endpoint is private.
1188
+ # Corresponds to the JSON property `enablePrivateEndpoint`
1189
+ # @return [Boolean]
1190
+ attr_accessor :enable_private_endpoint
1191
+ alias_method :enable_private_endpoint?, :enable_private_endpoint
1192
+
1193
+ # Output only. Service attachment URI for the workstation cluster. The service
1194
+ # attachemnt is created when private endpoint is enabled. To access workstations
1195
+ # in the workstation cluster, configure access to the managed service using [
1196
+ # Private Service Connect](https://cloud.google.com/vpc/docs/configure-private-
1197
+ # service-connect-services).
1198
+ # Corresponds to the JSON property `serviceAttachmentUri`
1199
+ # @return [String]
1200
+ attr_accessor :service_attachment_uri
1201
+
1202
+ def initialize(**args)
1203
+ update!(**args)
1204
+ end
1205
+
1206
+ # Update properties of this object
1207
+ def update!(**args)
1208
+ @allowed_projects = args[:allowed_projects] if args.key?(:allowed_projects)
1209
+ @cluster_hostname = args[:cluster_hostname] if args.key?(:cluster_hostname)
1210
+ @enable_private_endpoint = args[:enable_private_endpoint] if args.key?(:enable_private_endpoint)
1211
+ @service_attachment_uri = args[:service_attachment_uri] if args.key?(:service_attachment_uri)
1212
+ end
1213
+ end
1214
+
1215
+ # A readiness check to be performed on a workstation.
1216
+ class ReadinessCheck
1217
+ include Google::Apis::Core::Hashable
1218
+
1219
+ # Optional. Path to which the request should be sent.
1220
+ # Corresponds to the JSON property `path`
1221
+ # @return [String]
1222
+ attr_accessor :path
1223
+
1224
+ # Optional. Port to which the request should be sent.
1225
+ # Corresponds to the JSON property `port`
1226
+ # @return [Fixnum]
1227
+ attr_accessor :port
1228
+
1229
+ def initialize(**args)
1230
+ update!(**args)
1231
+ end
1232
+
1233
+ # Update properties of this object
1234
+ def update!(**args)
1235
+ @path = args[:path] if args.key?(:path)
1236
+ @port = args[:port] if args.key?(:port)
1237
+ end
1238
+ end
1239
+
1240
+ # Request message for `SetIamPolicy` method.
1241
+ class SetIamPolicyRequest
1242
+ include Google::Apis::Core::Hashable
1243
+
1244
+ # An Identity and Access Management (IAM) policy, which specifies access
1245
+ # controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
1246
+ # A `binding` binds one or more `members`, or principals, to a single `role`.
1247
+ # Principals can be user accounts, service accounts, Google groups, and domains (
1248
+ # such as G Suite). A `role` is a named list of permissions; each `role` can be
1249
+ # an IAM predefined role or a user-created custom role. For some types of Google
1250
+ # Cloud resources, a `binding` can also specify a `condition`, which is a
1251
+ # logical expression that allows access to a resource only if the expression
1252
+ # evaluates to `true`. A condition can add constraints based on attributes of
1253
+ # the request, the resource, or both. To learn which resources support
1254
+ # conditions in their IAM policies, see the [IAM documentation](https://cloud.
1255
+ # google.com/iam/help/conditions/resource-policies). **JSON example:** ``` ` "
1256
+ # bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
1257
+ # "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
1258
+ # serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
1259
+ # roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
1260
+ # ], "condition": ` "title": "expirable access", "description": "Does not grant
1261
+ # access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
1262
+ # 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` ``` **YAML
1263
+ # example:** ``` bindings: - members: - user:mike@example.com - group:admins@
1264
+ # example.com - domain:google.com - serviceAccount:my-project-id@appspot.
1265
+ # gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: -
1266
+ # user:eve@example.com role: roles/resourcemanager.organizationViewer condition:
1267
+ # title: expirable access description: Does not grant access after Sep 2020
1268
+ # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag:
1269
+ # BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the
1270
+ # [IAM documentation](https://cloud.google.com/iam/docs/).
1271
+ # Corresponds to the JSON property `policy`
1272
+ # @return [Google::Apis::WorkstationsV1::Policy]
1273
+ attr_accessor :policy
1274
+
1275
+ # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
1276
+ # the fields in the mask will be modified. If no mask is provided, the following
1277
+ # default mask is used: `paths: "bindings, etag"`
1278
+ # Corresponds to the JSON property `updateMask`
1279
+ # @return [String]
1280
+ attr_accessor :update_mask
1281
+
1282
+ def initialize(**args)
1283
+ update!(**args)
1284
+ end
1285
+
1286
+ # Update properties of this object
1287
+ def update!(**args)
1288
+ @policy = args[:policy] if args.key?(:policy)
1289
+ @update_mask = args[:update_mask] if args.key?(:update_mask)
1290
+ end
1291
+ end
1292
+
1293
+ # Request message for StartWorkstation.
1294
+ class StartWorkstationRequest
1295
+ include Google::Apis::Core::Hashable
1296
+
1297
+ # Optional. If set, the request will be rejected if the latest version of the
1298
+ # workstation on the server does not have this ETag.
1299
+ # Corresponds to the JSON property `etag`
1300
+ # @return [String]
1301
+ attr_accessor :etag
1302
+
1303
+ # Optional. If set, validate the request and preview the review, but do not
1304
+ # actually apply it.
1305
+ # Corresponds to the JSON property `validateOnly`
1306
+ # @return [Boolean]
1307
+ attr_accessor :validate_only
1308
+ alias_method :validate_only?, :validate_only
1309
+
1310
+ def initialize(**args)
1311
+ update!(**args)
1312
+ end
1313
+
1314
+ # Update properties of this object
1315
+ def update!(**args)
1316
+ @etag = args[:etag] if args.key?(:etag)
1317
+ @validate_only = args[:validate_only] if args.key?(:validate_only)
1318
+ end
1319
+ end
1320
+
1321
+ # The `Status` type defines a logical error model that is suitable for different
1322
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1323
+ # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
1324
+ # data: error code, error message, and error details. You can find out more
1325
+ # about this error model and how to work with it in the [API Design Guide](https:
1326
+ # //cloud.google.com/apis/design/errors).
1327
+ class Status
1328
+ include Google::Apis::Core::Hashable
1329
+
1330
+ # The status code, which should be an enum value of google.rpc.Code.
1331
+ # Corresponds to the JSON property `code`
1332
+ # @return [Fixnum]
1333
+ attr_accessor :code
1334
+
1335
+ # A list of messages that carry the error details. There is a common set of
1336
+ # message types for APIs to use.
1337
+ # Corresponds to the JSON property `details`
1338
+ # @return [Array<Hash<String,Object>>]
1339
+ attr_accessor :details
1340
+
1341
+ # A developer-facing error message, which should be in English. Any user-facing
1342
+ # error message should be localized and sent in the google.rpc.Status.details
1343
+ # field, or localized by the client.
1344
+ # Corresponds to the JSON property `message`
1345
+ # @return [String]
1346
+ attr_accessor :message
1347
+
1348
+ def initialize(**args)
1349
+ update!(**args)
1350
+ end
1351
+
1352
+ # Update properties of this object
1353
+ def update!(**args)
1354
+ @code = args[:code] if args.key?(:code)
1355
+ @details = args[:details] if args.key?(:details)
1356
+ @message = args[:message] if args.key?(:message)
1357
+ end
1358
+ end
1359
+
1360
+ # Request message for StopWorkstation.
1361
+ class StopWorkstationRequest
1362
+ include Google::Apis::Core::Hashable
1363
+
1364
+ # Optional. If set, the request will be rejected if the latest version of the
1365
+ # workstation on the server does not have this ETag.
1366
+ # Corresponds to the JSON property `etag`
1367
+ # @return [String]
1368
+ attr_accessor :etag
1369
+
1370
+ # Optional. If set, validate the request and preview the review, but do not
1371
+ # actually apply it.
1372
+ # Corresponds to the JSON property `validateOnly`
1373
+ # @return [Boolean]
1374
+ attr_accessor :validate_only
1375
+ alias_method :validate_only?, :validate_only
1376
+
1377
+ def initialize(**args)
1378
+ update!(**args)
1379
+ end
1380
+
1381
+ # Update properties of this object
1382
+ def update!(**args)
1383
+ @etag = args[:etag] if args.key?(:etag)
1384
+ @validate_only = args[:validate_only] if args.key?(:validate_only)
1385
+ end
1386
+ end
1387
+
1388
+ # Request message for `TestIamPermissions` method.
1389
+ class TestIamPermissionsRequest
1390
+ include Google::Apis::Core::Hashable
1391
+
1392
+ # The set of permissions to check for the `resource`. Permissions with wildcards
1393
+ # (such as `*` or `storage.*`) are not allowed. For more information see [IAM
1394
+ # Overview](https://cloud.google.com/iam/docs/overview#permissions).
1395
+ # Corresponds to the JSON property `permissions`
1396
+ # @return [Array<String>]
1397
+ attr_accessor :permissions
1398
+
1399
+ def initialize(**args)
1400
+ update!(**args)
1401
+ end
1402
+
1403
+ # Update properties of this object
1404
+ def update!(**args)
1405
+ @permissions = args[:permissions] if args.key?(:permissions)
1406
+ end
1407
+ end
1408
+
1409
+ # Response message for `TestIamPermissions` method.
1410
+ class TestIamPermissionsResponse
1411
+ include Google::Apis::Core::Hashable
1412
+
1413
+ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
1414
+ # Corresponds to the JSON property `permissions`
1415
+ # @return [Array<String>]
1416
+ attr_accessor :permissions
1417
+
1418
+ def initialize(**args)
1419
+ update!(**args)
1420
+ end
1421
+
1422
+ # Update properties of this object
1423
+ def update!(**args)
1424
+ @permissions = args[:permissions] if args.key?(:permissions)
1425
+ end
1426
+ end
1427
+
1428
+ # A single instance of a developer workstation with its own persistent storage.
1429
+ class Workstation
1430
+ include Google::Apis::Core::Hashable
1431
+
1432
+ # Optional. Client-specified annotations.
1433
+ # Corresponds to the JSON property `annotations`
1434
+ # @return [Hash<String,String>]
1435
+ attr_accessor :annotations
1436
+
1437
+ # Output only. Time when this workstation was created.
1438
+ # Corresponds to the JSON property `createTime`
1439
+ # @return [String]
1440
+ attr_accessor :create_time
1441
+
1442
+ # Output only. Time when this workstation was soft-deleted.
1443
+ # Corresponds to the JSON property `deleteTime`
1444
+ # @return [String]
1445
+ attr_accessor :delete_time
1446
+
1447
+ # Optional. Human-readable name for this workstation.
1448
+ # Corresponds to the JSON property `displayName`
1449
+ # @return [String]
1450
+ attr_accessor :display_name
1451
+
1452
+ # Optional. Checksum computed by the server. May be sent on update and delete
1453
+ # requests to make sure that the client has an up-to-date value before
1454
+ # proceeding.
1455
+ # Corresponds to the JSON property `etag`
1456
+ # @return [String]
1457
+ attr_accessor :etag
1458
+
1459
+ # Output only. Host to which clients can send HTTPS traffic that will be
1460
+ # received by the workstation. Authorized traffic will be received to the
1461
+ # workstation as HTTP on port 80. To send traffic to a different port, clients
1462
+ # may prefix the host with the destination port in the format ``port`-`host``.
1463
+ # Corresponds to the JSON property `host`
1464
+ # @return [String]
1465
+ attr_accessor :host
1466
+
1467
+ # Optional. [Labels](https://cloud.google.com/workstations/docs/label-resources)
1468
+ # that are applied to the workstation and that are also propagated to the
1469
+ # underlying Compute Engine resources.
1470
+ # Corresponds to the JSON property `labels`
1471
+ # @return [Hash<String,String>]
1472
+ attr_accessor :labels
1473
+
1474
+ # Full name of this workstation.
1475
+ # Corresponds to the JSON property `name`
1476
+ # @return [String]
1477
+ attr_accessor :name
1478
+
1479
+ # Output only. Indicates whether this workstation is currently being updated to
1480
+ # match its intended state.
1481
+ # Corresponds to the JSON property `reconciling`
1482
+ # @return [Boolean]
1483
+ attr_accessor :reconciling
1484
+ alias_method :reconciling?, :reconciling
1485
+
1486
+ # Output only. Time when this workstation was most recently successfully started,
1487
+ # regardless of the workstation's initial state.
1488
+ # Corresponds to the JSON property `startTime`
1489
+ # @return [String]
1490
+ attr_accessor :start_time
1491
+
1492
+ # Output only. Current state of the workstation.
1493
+ # Corresponds to the JSON property `state`
1494
+ # @return [String]
1495
+ attr_accessor :state
1496
+
1497
+ # Output only. A system-assigned unique identifier for this workstation.
1498
+ # Corresponds to the JSON property `uid`
1499
+ # @return [String]
1500
+ attr_accessor :uid
1501
+
1502
+ # Output only. Time when this workstation was most recently updated.
1503
+ # Corresponds to the JSON property `updateTime`
1504
+ # @return [String]
1505
+ attr_accessor :update_time
1506
+
1507
+ def initialize(**args)
1508
+ update!(**args)
1509
+ end
1510
+
1511
+ # Update properties of this object
1512
+ def update!(**args)
1513
+ @annotations = args[:annotations] if args.key?(:annotations)
1514
+ @create_time = args[:create_time] if args.key?(:create_time)
1515
+ @delete_time = args[:delete_time] if args.key?(:delete_time)
1516
+ @display_name = args[:display_name] if args.key?(:display_name)
1517
+ @etag = args[:etag] if args.key?(:etag)
1518
+ @host = args[:host] if args.key?(:host)
1519
+ @labels = args[:labels] if args.key?(:labels)
1520
+ @name = args[:name] if args.key?(:name)
1521
+ @reconciling = args[:reconciling] if args.key?(:reconciling)
1522
+ @start_time = args[:start_time] if args.key?(:start_time)
1523
+ @state = args[:state] if args.key?(:state)
1524
+ @uid = args[:uid] if args.key?(:uid)
1525
+ @update_time = args[:update_time] if args.key?(:update_time)
1526
+ end
1527
+ end
1528
+
1529
+ # A workstation cluster resource in the Cloud Workstations API. Defines a group
1530
+ # of workstations in a particular region and the VPC network they're attached to.
1531
+ class WorkstationCluster
1532
+ include Google::Apis::Core::Hashable
1533
+
1534
+ # Optional. Client-specified annotations.
1535
+ # Corresponds to the JSON property `annotations`
1536
+ # @return [Hash<String,String>]
1537
+ attr_accessor :annotations
1538
+
1539
+ # Output only. Status conditions describing the workstation cluster's current
1540
+ # state.
1541
+ # Corresponds to the JSON property `conditions`
1542
+ # @return [Array<Google::Apis::WorkstationsV1::Status>]
1543
+ attr_accessor :conditions
1544
+
1545
+ # Output only. The private IP address of the control plane for this workstation
1546
+ # cluster. Workstation VMs need access to this IP address to work with the
1547
+ # service, so make sure that your firewall rules allow egress from the
1548
+ # workstation VMs to this address.
1549
+ # Corresponds to the JSON property `controlPlaneIp`
1550
+ # @return [String]
1551
+ attr_accessor :control_plane_ip
1552
+
1553
+ # Output only. Time when this workstation cluster was created.
1554
+ # Corresponds to the JSON property `createTime`
1555
+ # @return [String]
1556
+ attr_accessor :create_time
1557
+
1558
+ # Output only. Whether this workstation cluster is in degraded mode, in which
1559
+ # case it may require user action to restore full functionality. Details can be
1560
+ # found in conditions.
1561
+ # Corresponds to the JSON property `degraded`
1562
+ # @return [Boolean]
1563
+ attr_accessor :degraded
1564
+ alias_method :degraded?, :degraded
1565
+
1566
+ # Output only. Time when this workstation cluster was soft-deleted.
1567
+ # Corresponds to the JSON property `deleteTime`
1568
+ # @return [String]
1569
+ attr_accessor :delete_time
1570
+
1571
+ # Optional. Human-readable name for this workstation cluster.
1572
+ # Corresponds to the JSON property `displayName`
1573
+ # @return [String]
1574
+ attr_accessor :display_name
1575
+
1576
+ # Optional. Checksum computed by the server. May be sent on update and delete
1577
+ # requests to make sure that the client has an up-to-date value before
1578
+ # proceeding.
1579
+ # Corresponds to the JSON property `etag`
1580
+ # @return [String]
1581
+ attr_accessor :etag
1582
+
1583
+ # Optional. [Labels](https://cloud.google.com/workstations/docs/label-resources)
1584
+ # that are applied to the workstation cluster and that are also propagated to
1585
+ # the underlying Compute Engine resources.
1586
+ # Corresponds to the JSON property `labels`
1587
+ # @return [Hash<String,String>]
1588
+ attr_accessor :labels
1589
+
1590
+ # Full name of this workstation cluster.
1591
+ # Corresponds to the JSON property `name`
1592
+ # @return [String]
1593
+ attr_accessor :name
1594
+
1595
+ # Immutable. Name of the Compute Engine network in which instances associated
1596
+ # with this workstation cluster will be created.
1597
+ # Corresponds to the JSON property `network`
1598
+ # @return [String]
1599
+ attr_accessor :network
1600
+
1601
+ # Configuration options for private workstation clusters.
1602
+ # Corresponds to the JSON property `privateClusterConfig`
1603
+ # @return [Google::Apis::WorkstationsV1::PrivateClusterConfig]
1604
+ attr_accessor :private_cluster_config
1605
+
1606
+ # Output only. Indicates whether this workstation cluster is currently being
1607
+ # updated to match its intended state.
1608
+ # Corresponds to the JSON property `reconciling`
1609
+ # @return [Boolean]
1610
+ attr_accessor :reconciling
1611
+ alias_method :reconciling?, :reconciling
1612
+
1613
+ # Immutable. Name of the Compute Engine subnetwork in which instances associated
1614
+ # with this workstation cluster will be created. Must be part of the subnetwork
1615
+ # specified for this workstation cluster.
1616
+ # Corresponds to the JSON property `subnetwork`
1617
+ # @return [String]
1618
+ attr_accessor :subnetwork
1619
+
1620
+ # Output only. A system-assigned unique identifier for this workstation cluster.
1621
+ # Corresponds to the JSON property `uid`
1622
+ # @return [String]
1623
+ attr_accessor :uid
1624
+
1625
+ # Output only. Time when this workstation cluster was most recently updated.
1626
+ # Corresponds to the JSON property `updateTime`
1627
+ # @return [String]
1628
+ attr_accessor :update_time
1629
+
1630
+ def initialize(**args)
1631
+ update!(**args)
1632
+ end
1633
+
1634
+ # Update properties of this object
1635
+ def update!(**args)
1636
+ @annotations = args[:annotations] if args.key?(:annotations)
1637
+ @conditions = args[:conditions] if args.key?(:conditions)
1638
+ @control_plane_ip = args[:control_plane_ip] if args.key?(:control_plane_ip)
1639
+ @create_time = args[:create_time] if args.key?(:create_time)
1640
+ @degraded = args[:degraded] if args.key?(:degraded)
1641
+ @delete_time = args[:delete_time] if args.key?(:delete_time)
1642
+ @display_name = args[:display_name] if args.key?(:display_name)
1643
+ @etag = args[:etag] if args.key?(:etag)
1644
+ @labels = args[:labels] if args.key?(:labels)
1645
+ @name = args[:name] if args.key?(:name)
1646
+ @network = args[:network] if args.key?(:network)
1647
+ @private_cluster_config = args[:private_cluster_config] if args.key?(:private_cluster_config)
1648
+ @reconciling = args[:reconciling] if args.key?(:reconciling)
1649
+ @subnetwork = args[:subnetwork] if args.key?(:subnetwork)
1650
+ @uid = args[:uid] if args.key?(:uid)
1651
+ @update_time = args[:update_time] if args.key?(:update_time)
1652
+ end
1653
+ end
1654
+
1655
+ # A workstation configuration resource in the Cloud Workstations API.
1656
+ # Workstation configurations act as templates for workstations. The workstation
1657
+ # configuration defines details such as the workstation virtual machine (VM)
1658
+ # instance type, persistent storage, container image defining environment, which
1659
+ # IDE or Code Editor to use, and more. Administrators and platform teams can
1660
+ # also use [Identity and Access Management (IAM)](https://cloud.google.com/iam/
1661
+ # docs/overview) rules to grant access to teams or to individual developers.
1662
+ class WorkstationConfig
1663
+ include Google::Apis::Core::Hashable
1664
+
1665
+ # Optional. Client-specified annotations.
1666
+ # Corresponds to the JSON property `annotations`
1667
+ # @return [Hash<String,String>]
1668
+ attr_accessor :annotations
1669
+
1670
+ # Output only. Status conditions describing the current resource state.
1671
+ # Corresponds to the JSON property `conditions`
1672
+ # @return [Array<Google::Apis::WorkstationsV1::Status>]
1673
+ attr_accessor :conditions
1674
+
1675
+ # A Docker container.
1676
+ # Corresponds to the JSON property `container`
1677
+ # @return [Google::Apis::WorkstationsV1::Container]
1678
+ attr_accessor :container
1679
+
1680
+ # Output only. Time when this workstation configuration was created.
1681
+ # Corresponds to the JSON property `createTime`
1682
+ # @return [String]
1683
+ attr_accessor :create_time
1684
+
1685
+ # Output only. Whether this resource is degraded, in which case it may require
1686
+ # user action to restore full functionality. See also the conditions field.
1687
+ # Corresponds to the JSON property `degraded`
1688
+ # @return [Boolean]
1689
+ attr_accessor :degraded
1690
+ alias_method :degraded?, :degraded
1691
+
1692
+ # Output only. Time when this workstation configuration was soft-deleted.
1693
+ # Corresponds to the JSON property `deleteTime`
1694
+ # @return [String]
1695
+ attr_accessor :delete_time
1696
+
1697
+ # Optional. Human-readable name for this workstation configuration.
1698
+ # Corresponds to the JSON property `displayName`
1699
+ # @return [String]
1700
+ attr_accessor :display_name
1701
+
1702
+ # A customer-managed encryption key (CMEK) for the Compute Engine resources of
1703
+ # the associated workstation configuration. Specify the name of your Cloud KMS
1704
+ # encryption key and the default service account. We recommend that you use a
1705
+ # separate service account and follow [Cloud KMS best practices](https://cloud.
1706
+ # google.com/kms/docs/separation-of-duties).
1707
+ # Corresponds to the JSON property `encryptionKey`
1708
+ # @return [Google::Apis::WorkstationsV1::CustomerEncryptionKey]
1709
+ attr_accessor :encryption_key
1710
+
1711
+ # Optional. Checksum computed by the server. May be sent on update and delete
1712
+ # requests to make sure that the client has an up-to-date value before
1713
+ # proceeding.
1714
+ # Corresponds to the JSON property `etag`
1715
+ # @return [String]
1716
+ attr_accessor :etag
1717
+
1718
+ # Runtime host for a workstation.
1719
+ # Corresponds to the JSON property `host`
1720
+ # @return [Google::Apis::WorkstationsV1::Host]
1721
+ attr_accessor :host
1722
+
1723
+ # Optional. Number of seconds to wait before automatically stopping a
1724
+ # workstation after it last received user traffic. A value of `"0s"` indicates
1725
+ # that Cloud Workstations VMs created with this configuration should never time
1726
+ # out due to idleness. Provide [duration](https://developers.google.com/protocol-
1727
+ # buffers/docs/reference/google.protobuf#duration) terminated by `s` for seconds—
1728
+ # for example, `"7200s"` (2 hours). The default is `"1200s"` (20 minutes).
1729
+ # Corresponds to the JSON property `idleTimeout`
1730
+ # @return [String]
1731
+ attr_accessor :idle_timeout
1732
+
1733
+ # Optional. [Labels](https://cloud.google.com/workstations/docs/label-resources)
1734
+ # that are applied to the workstation configuration and that are also propagated
1735
+ # to the underlying Compute Engine resources.
1736
+ # Corresponds to the JSON property `labels`
1737
+ # @return [Hash<String,String>]
1738
+ attr_accessor :labels
1739
+
1740
+ # Full name of this workstation configuration.
1741
+ # Corresponds to the JSON property `name`
1742
+ # @return [String]
1743
+ attr_accessor :name
1744
+
1745
+ # Optional. Directories to persist across workstation sessions.
1746
+ # Corresponds to the JSON property `persistentDirectories`
1747
+ # @return [Array<Google::Apis::WorkstationsV1::PersistentDirectory>]
1748
+ attr_accessor :persistent_directories
1749
+
1750
+ # Optional. Readiness checks to perform when starting a workstation using this
1751
+ # workstation configuration. Mark a workstation as running only after all
1752
+ # specified readiness checks return 200 status codes.
1753
+ # Corresponds to the JSON property `readinessChecks`
1754
+ # @return [Array<Google::Apis::WorkstationsV1::ReadinessCheck>]
1755
+ attr_accessor :readiness_checks
1756
+
1757
+ # Output only. Indicates whether this workstation configuration is currently
1758
+ # being updated to match its intended state.
1759
+ # Corresponds to the JSON property `reconciling`
1760
+ # @return [Boolean]
1761
+ attr_accessor :reconciling
1762
+ alias_method :reconciling?, :reconciling
1763
+
1764
+ # Optional. Immutable. Specifies the zones used to replicate the VM and disk
1765
+ # resources within the region. If set, exactly two zones within the workstation
1766
+ # cluster's region must be specified—for example, `['us-central1-a', 'us-
1767
+ # central1-f']`. If this field is empty, two default zones within the region are
1768
+ # used. Immutable after the workstation configuration is created.
1769
+ # Corresponds to the JSON property `replicaZones`
1770
+ # @return [Array<String>]
1771
+ attr_accessor :replica_zones
1772
+
1773
+ # Optional. Number of seconds that a workstation can run until it is
1774
+ # automatically shut down. We recommend that workstations be shut down daily to
1775
+ # reduce costs and so that security updates can be applied upon restart. The
1776
+ # idle_timeout and running_timeout fields are independent of each other. Note
1777
+ # that the running_timeout field shuts down VMs after the specified time,
1778
+ # regardless of whether or not the VMs are idle. Provide duration terminated by `
1779
+ # s` for seconds—for example, `"54000s"` (15 hours). Defaults to `"43200s"` (12
1780
+ # hours). A value of `"0s"` indicates that workstations using this configuration
1781
+ # should never time out. If encryption_key is set, it must be greater than `"0s"`
1782
+ # and less than `"86400s"` (24 hours). Warning: A value of `"0s"` indicates
1783
+ # that Cloud Workstations VMs created with this configuration have no maximum
1784
+ # running time. This is strongly discouraged because you incur costs and will
1785
+ # not pick up security updates.
1786
+ # Corresponds to the JSON property `runningTimeout`
1787
+ # @return [String]
1788
+ attr_accessor :running_timeout
1789
+
1790
+ # Output only. A system-assigned unique identifier for this workstation
1791
+ # configuration.
1792
+ # Corresponds to the JSON property `uid`
1793
+ # @return [String]
1794
+ attr_accessor :uid
1795
+
1796
+ # Output only. Time when this workstation configuration was most recently
1797
+ # updated.
1798
+ # Corresponds to the JSON property `updateTime`
1799
+ # @return [String]
1800
+ attr_accessor :update_time
1801
+
1802
+ def initialize(**args)
1803
+ update!(**args)
1804
+ end
1805
+
1806
+ # Update properties of this object
1807
+ def update!(**args)
1808
+ @annotations = args[:annotations] if args.key?(:annotations)
1809
+ @conditions = args[:conditions] if args.key?(:conditions)
1810
+ @container = args[:container] if args.key?(:container)
1811
+ @create_time = args[:create_time] if args.key?(:create_time)
1812
+ @degraded = args[:degraded] if args.key?(:degraded)
1813
+ @delete_time = args[:delete_time] if args.key?(:delete_time)
1814
+ @display_name = args[:display_name] if args.key?(:display_name)
1815
+ @encryption_key = args[:encryption_key] if args.key?(:encryption_key)
1816
+ @etag = args[:etag] if args.key?(:etag)
1817
+ @host = args[:host] if args.key?(:host)
1818
+ @idle_timeout = args[:idle_timeout] if args.key?(:idle_timeout)
1819
+ @labels = args[:labels] if args.key?(:labels)
1820
+ @name = args[:name] if args.key?(:name)
1821
+ @persistent_directories = args[:persistent_directories] if args.key?(:persistent_directories)
1822
+ @readiness_checks = args[:readiness_checks] if args.key?(:readiness_checks)
1823
+ @reconciling = args[:reconciling] if args.key?(:reconciling)
1824
+ @replica_zones = args[:replica_zones] if args.key?(:replica_zones)
1825
+ @running_timeout = args[:running_timeout] if args.key?(:running_timeout)
1826
+ @uid = args[:uid] if args.key?(:uid)
1827
+ @update_time = args[:update_time] if args.key?(:update_time)
1828
+ end
1829
+ end
1830
+ end
1831
+ end
1832
+ end