google-apis-notebooks_v2 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,6 +22,34 @@ module Google
22
22
  module Apis
23
23
  module NotebooksV2
24
24
 
25
+ # An accelerator configuration for a VM instance Definition of a hardware
26
+ # accelerator. Note that there is no check on `type` and `core_count`
27
+ # combinations. TPUs are not supported. See [GPUs on Compute Engine](https://
28
+ # cloud.google.com/compute/docs/gpus/#gpus-list) to find a valid combination.
29
+ class AcceleratorConfig
30
+ include Google::Apis::Core::Hashable
31
+
32
+ # Optional. Count of cores of this accelerator.
33
+ # Corresponds to the JSON property `coreCount`
34
+ # @return [Fixnum]
35
+ attr_accessor :core_count
36
+
37
+ # Optional. Type of this accelerator.
38
+ # Corresponds to the JSON property `type`
39
+ # @return [String]
40
+ attr_accessor :type
41
+
42
+ def initialize(**args)
43
+ update!(**args)
44
+ end
45
+
46
+ # Update properties of this object
47
+ def update!(**args)
48
+ @core_count = args[:core_count] if args.key?(:core_count)
49
+ @type = args[:type] if args.key?(:type)
50
+ end
51
+ end
52
+
25
53
  # Associates `members`, or principals, with a `role`.
26
54
  class Binding
27
55
  include Google::Apis::Core::Hashable
@@ -98,6 +126,49 @@ module Google
98
126
  end
99
127
  end
100
128
 
129
+ # The definition of a boot disk.
130
+ class BootDisk
131
+ include Google::Apis::Core::Hashable
132
+
133
+ # Optional. Input only. Disk encryption method used on the boot and data disks,
134
+ # defaults to GMEK.
135
+ # Corresponds to the JSON property `diskEncryption`
136
+ # @return [String]
137
+ attr_accessor :disk_encryption
138
+
139
+ # Optional. The size of the boot disk in GB attached to this instance, up to a
140
+ # maximum of 64000 GB (64 TB). If not specified, this defaults to the
141
+ # recommended value of 150GB.
142
+ # Corresponds to the JSON property `diskSizeGb`
143
+ # @return [Fixnum]
144
+ attr_accessor :disk_size_gb
145
+
146
+ # Optional. Indicates the type of the disk.
147
+ # Corresponds to the JSON property `diskType`
148
+ # @return [String]
149
+ attr_accessor :disk_type
150
+
151
+ # Optional. Input only. The KMS key used to encrypt the disks, only applicable
152
+ # if disk_encryption is CMEK. Format: `projects/`project_id`/locations/`location`
153
+ # /keyRings/`key_ring_id`/cryptoKeys/`key_id`` Learn more about using your own
154
+ # encryption keys.
155
+ # Corresponds to the JSON property `kmsKey`
156
+ # @return [String]
157
+ attr_accessor :kms_key
158
+
159
+ def initialize(**args)
160
+ update!(**args)
161
+ end
162
+
163
+ # Update properties of this object
164
+ def update!(**args)
165
+ @disk_encryption = args[:disk_encryption] if args.key?(:disk_encryption)
166
+ @disk_size_gb = args[:disk_size_gb] if args.key?(:disk_size_gb)
167
+ @disk_type = args[:disk_type] if args.key?(:disk_type)
168
+ @kms_key = args[:kms_key] if args.key?(:kms_key)
169
+ end
170
+ end
171
+
101
172
  # The request message for Operations.CancelOperation.
102
173
  class CancelOperationRequest
103
174
  include Google::Apis::Core::Hashable
@@ -111,6 +182,191 @@ module Google
111
182
  end
112
183
  end
113
184
 
185
+ # Response for checking if a notebook instance is upgradeable.
186
+ class CheckInstanceUpgradabilityResponse
187
+ include Google::Apis::Core::Hashable
188
+
189
+ # The new image self link this instance will be upgraded to if calling the
190
+ # upgrade endpoint. This field will only be populated if field upgradeable is
191
+ # true.
192
+ # Corresponds to the JSON property `upgradeImage`
193
+ # @return [String]
194
+ attr_accessor :upgrade_image
195
+
196
+ # Additional information about upgrade.
197
+ # Corresponds to the JSON property `upgradeInfo`
198
+ # @return [String]
199
+ attr_accessor :upgrade_info
200
+
201
+ # The version this instance will be upgraded to if calling the upgrade endpoint.
202
+ # This field will only be populated if field upgradeable is true.
203
+ # Corresponds to the JSON property `upgradeVersion`
204
+ # @return [String]
205
+ attr_accessor :upgrade_version
206
+
207
+ # If an instance is upgradeable.
208
+ # Corresponds to the JSON property `upgradeable`
209
+ # @return [Boolean]
210
+ attr_accessor :upgradeable
211
+ alias_method :upgradeable?, :upgradeable
212
+
213
+ def initialize(**args)
214
+ update!(**args)
215
+ end
216
+
217
+ # Update properties of this object
218
+ def update!(**args)
219
+ @upgrade_image = args[:upgrade_image] if args.key?(:upgrade_image)
220
+ @upgrade_info = args[:upgrade_info] if args.key?(:upgrade_info)
221
+ @upgrade_version = args[:upgrade_version] if args.key?(:upgrade_version)
222
+ @upgradeable = args[:upgradeable] if args.key?(:upgradeable)
223
+ end
224
+ end
225
+
226
+ # Definition of a container image for starting a notebook instance with the
227
+ # environment installed in a container.
228
+ class ContainerImage
229
+ include Google::Apis::Core::Hashable
230
+
231
+ # Required. The path to the container image repository. For example: `gcr.io/`
232
+ # project_id`/`image_name``
233
+ # Corresponds to the JSON property `repository`
234
+ # @return [String]
235
+ attr_accessor :repository
236
+
237
+ # Optional. The tag of the container image. If not specified, this defaults to
238
+ # the latest tag.
239
+ # Corresponds to the JSON property `tag`
240
+ # @return [String]
241
+ attr_accessor :tag
242
+
243
+ def initialize(**args)
244
+ update!(**args)
245
+ end
246
+
247
+ # Update properties of this object
248
+ def update!(**args)
249
+ @repository = args[:repository] if args.key?(:repository)
250
+ @tag = args[:tag] if args.key?(:tag)
251
+ end
252
+ end
253
+
254
+ # An instance-attached disk resource.
255
+ class DataDisk
256
+ include Google::Apis::Core::Hashable
257
+
258
+ # Optional. Input only. Disk encryption method used on the boot and data disks,
259
+ # defaults to GMEK.
260
+ # Corresponds to the JSON property `diskEncryption`
261
+ # @return [String]
262
+ attr_accessor :disk_encryption
263
+
264
+ # Optional. The size of the disk in GB attached to this VM instance, up to a
265
+ # maximum of 64000 GB (64 TB). If not specified, this defaults to 100.
266
+ # Corresponds to the JSON property `diskSizeGb`
267
+ # @return [Fixnum]
268
+ attr_accessor :disk_size_gb
269
+
270
+ # Optional. Input only. Indicates the type of the disk.
271
+ # Corresponds to the JSON property `diskType`
272
+ # @return [String]
273
+ attr_accessor :disk_type
274
+
275
+ # Optional. Input only. The KMS key used to encrypt the disks, only applicable
276
+ # if disk_encryption is CMEK. Format: `projects/`project_id`/locations/`location`
277
+ # /keyRings/`key_ring_id`/cryptoKeys/`key_id`` Learn more about using your own
278
+ # encryption keys.
279
+ # Corresponds to the JSON property `kmsKey`
280
+ # @return [String]
281
+ attr_accessor :kms_key
282
+
283
+ def initialize(**args)
284
+ update!(**args)
285
+ end
286
+
287
+ # Update properties of this object
288
+ def update!(**args)
289
+ @disk_encryption = args[:disk_encryption] if args.key?(:disk_encryption)
290
+ @disk_size_gb = args[:disk_size_gb] if args.key?(:disk_size_gb)
291
+ @disk_type = args[:disk_type] if args.key?(:disk_type)
292
+ @kms_key = args[:kms_key] if args.key?(:kms_key)
293
+ end
294
+ end
295
+
296
+ # Request for creating a notebook instance diagnostic file.
297
+ class DiagnoseInstanceRequest
298
+ include Google::Apis::Core::Hashable
299
+
300
+ # Defines flags that are used to run the diagnostic tool
301
+ # Corresponds to the JSON property `diagnosticConfig`
302
+ # @return [Google::Apis::NotebooksV2::DiagnosticConfig]
303
+ attr_accessor :diagnostic_config
304
+
305
+ def initialize(**args)
306
+ update!(**args)
307
+ end
308
+
309
+ # Update properties of this object
310
+ def update!(**args)
311
+ @diagnostic_config = args[:diagnostic_config] if args.key?(:diagnostic_config)
312
+ end
313
+ end
314
+
315
+ # Defines flags that are used to run the diagnostic tool
316
+ class DiagnosticConfig
317
+ include Google::Apis::Core::Hashable
318
+
319
+ # Optional. Enables flag to copy all `/home/jupyter` folder contents
320
+ # Corresponds to the JSON property `enableCopyHomeFilesFlag`
321
+ # @return [Boolean]
322
+ attr_accessor :enable_copy_home_files_flag
323
+ alias_method :enable_copy_home_files_flag?, :enable_copy_home_files_flag
324
+
325
+ # Optional. Enables flag to capture packets from the instance for 30 seconds
326
+ # Corresponds to the JSON property `enablePacketCaptureFlag`
327
+ # @return [Boolean]
328
+ attr_accessor :enable_packet_capture_flag
329
+ alias_method :enable_packet_capture_flag?, :enable_packet_capture_flag
330
+
331
+ # Optional. Enables flag to repair service for instance
332
+ # Corresponds to the JSON property `enableRepairFlag`
333
+ # @return [Boolean]
334
+ attr_accessor :enable_repair_flag
335
+ alias_method :enable_repair_flag?, :enable_repair_flag
336
+
337
+ # Required. User Cloud Storage bucket location (REQUIRED). Must be formatted
338
+ # with path prefix (`gs://$GCS_BUCKET`). Permissions: User Managed Notebooks: -
339
+ # storage.buckets.writer: Must be given to the project's service account
340
+ # attached to VM. Google Managed Notebooks: - storage.buckets.writer: Must be
341
+ # given to the project's service account or user credentials attached to VM
342
+ # depending on authentication mode. Cloud Storage bucket Log file will be
343
+ # written to `gs://$GCS_BUCKET/$RELATIVE_PATH/$VM_DATE_$TIME.tar.gz`
344
+ # Corresponds to the JSON property `gcsBucket`
345
+ # @return [String]
346
+ attr_accessor :gcs_bucket
347
+
348
+ # Optional. Defines the relative storage path in the Cloud Storage bucket where
349
+ # the diagnostic logs will be written: Default path will be the root directory
350
+ # of the Cloud Storage bucket (`gs://$GCS_BUCKET/$DATE_$TIME.tar.gz`) Example of
351
+ # full path where Log file will be written: `gs://$GCS_BUCKET/$RELATIVE_PATH/`
352
+ # Corresponds to the JSON property `relativePath`
353
+ # @return [String]
354
+ attr_accessor :relative_path
355
+
356
+ def initialize(**args)
357
+ update!(**args)
358
+ end
359
+
360
+ # Update properties of this object
361
+ def update!(**args)
362
+ @enable_copy_home_files_flag = args[:enable_copy_home_files_flag] if args.key?(:enable_copy_home_files_flag)
363
+ @enable_packet_capture_flag = args[:enable_packet_capture_flag] if args.key?(:enable_packet_capture_flag)
364
+ @enable_repair_flag = args[:enable_repair_flag] if args.key?(:enable_repair_flag)
365
+ @gcs_bucket = args[:gcs_bucket] if args.key?(:gcs_bucket)
366
+ @relative_path = args[:relative_path] if args.key?(:relative_path)
367
+ end
368
+ end
369
+
114
370
  # A generic empty message that you can re-use to avoid defining duplicated empty
115
371
  # messages in your APIs. A typical example is to use it as the request or the
116
372
  # response type of an API method. For instance: service Foo ` rpc Bar(google.
@@ -127,6 +383,37 @@ module Google
127
383
  end
128
384
  end
129
385
 
386
+ # The definition of an Event for a managed / semi-managed notebook instance.
387
+ class Event
388
+ include Google::Apis::Core::Hashable
389
+
390
+ # Optional. Event details. This field is used to pass event information.
391
+ # Corresponds to the JSON property `details`
392
+ # @return [Hash<String,String>]
393
+ attr_accessor :details
394
+
395
+ # Optional. Event report time.
396
+ # Corresponds to the JSON property `reportTime`
397
+ # @return [String]
398
+ attr_accessor :report_time
399
+
400
+ # Optional. Event type.
401
+ # Corresponds to the JSON property `type`
402
+ # @return [String]
403
+ attr_accessor :type
404
+
405
+ def initialize(**args)
406
+ update!(**args)
407
+ end
408
+
409
+ # Update properties of this object
410
+ def update!(**args)
411
+ @details = args[:details] if args.key?(:details)
412
+ @report_time = args[:report_time] if args.key?(:report_time)
413
+ @type = args[:type] if args.key?(:type)
414
+ end
415
+ end
416
+
130
417
  # Represents a textual expression in the Common Expression Language (CEL) syntax.
131
418
  # CEL is a C-like expression language. The syntax and semantics of CEL are
132
419
  # documented at https://github.com/google/cel-spec. Example (Comparison): title:
@@ -181,6 +468,289 @@ module Google
181
468
  end
182
469
  end
183
470
 
471
+ # A GPU driver configuration
472
+ class GpuDriverConfig
473
+ include Google::Apis::Core::Hashable
474
+
475
+ # Optional. Specify a custom Cloud Storage path where the GPU driver is stored.
476
+ # If not specified, we'll automatically choose from official GPU drivers.
477
+ # Corresponds to the JSON property `customGpuDriverPath`
478
+ # @return [String]
479
+ attr_accessor :custom_gpu_driver_path
480
+
481
+ # Optional. Whether the end user authorizes Google Cloud to install GPU driver
482
+ # on this VM instance. If this field is empty or set to false, the GPU driver
483
+ # won't be installed. Only applicable to instances with GPUs.
484
+ # Corresponds to the JSON property `enableGpuDriver`
485
+ # @return [Boolean]
486
+ attr_accessor :enable_gpu_driver
487
+ alias_method :enable_gpu_driver?, :enable_gpu_driver
488
+
489
+ def initialize(**args)
490
+ update!(**args)
491
+ end
492
+
493
+ # Update properties of this object
494
+ def update!(**args)
495
+ @custom_gpu_driver_path = args[:custom_gpu_driver_path] if args.key?(:custom_gpu_driver_path)
496
+ @enable_gpu_driver = args[:enable_gpu_driver] if args.key?(:enable_gpu_driver)
497
+ end
498
+ end
499
+
500
+ # The definition of how to configure a VM instance outside of Resources and
501
+ # Identity.
502
+ class GceSetup
503
+ include Google::Apis::Core::Hashable
504
+
505
+ # Optional. The hardware accelerators used on this instance. If you use
506
+ # accelerators, make sure that your configuration has [enough vCPUs and memory
507
+ # to support the `machine_type` you have selected](https://cloud.google.com/
508
+ # compute/docs/gpus/#gpus-list). Currently supports only one accelerator
509
+ # configuration.
510
+ # Corresponds to the JSON property `acceleratorConfigs`
511
+ # @return [Array<Google::Apis::NotebooksV2::AcceleratorConfig>]
512
+ attr_accessor :accelerator_configs
513
+
514
+ # The definition of a boot disk.
515
+ # Corresponds to the JSON property `bootDisk`
516
+ # @return [Google::Apis::NotebooksV2::BootDisk]
517
+ attr_accessor :boot_disk
518
+
519
+ # Definition of a container image for starting a notebook instance with the
520
+ # environment installed in a container.
521
+ # Corresponds to the JSON property `containerImage`
522
+ # @return [Google::Apis::NotebooksV2::ContainerImage]
523
+ attr_accessor :container_image
524
+
525
+ # Optional. Data disks attached to the VM instance. Currently supports only one
526
+ # data disk.
527
+ # Corresponds to the JSON property `dataDisks`
528
+ # @return [Array<Google::Apis::NotebooksV2::DataDisk>]
529
+ attr_accessor :data_disks
530
+
531
+ # Optional. If true, no external IP will be assigned to this VM instance.
532
+ # Corresponds to the JSON property `disablePublicIp`
533
+ # @return [Boolean]
534
+ attr_accessor :disable_public_ip
535
+ alias_method :disable_public_ip?, :disable_public_ip
536
+
537
+ # Optional. Flag to enable ip forwarding or not, default false/off. https://
538
+ # cloud.google.com/vpc/docs/using-routes#canipforward
539
+ # Corresponds to the JSON property `enableIpForwarding`
540
+ # @return [Boolean]
541
+ attr_accessor :enable_ip_forwarding
542
+ alias_method :enable_ip_forwarding?, :enable_ip_forwarding
543
+
544
+ # A GPU driver configuration
545
+ # Corresponds to the JSON property `gpuDriverConfig`
546
+ # @return [Google::Apis::NotebooksV2::GpuDriverConfig]
547
+ attr_accessor :gpu_driver_config
548
+
549
+ # Optional. The machine type of the VM instance. https://cloud.google.com/
550
+ # compute/docs/machine-resource
551
+ # Corresponds to the JSON property `machineType`
552
+ # @return [String]
553
+ attr_accessor :machine_type
554
+
555
+ # Optional. Custom metadata to apply to this instance.
556
+ # Corresponds to the JSON property `metadata`
557
+ # @return [Hash<String,String>]
558
+ attr_accessor :metadata
559
+
560
+ # Optional. The network interfaces for the VM. Supports only one interface.
561
+ # Corresponds to the JSON property `networkInterfaces`
562
+ # @return [Array<Google::Apis::NotebooksV2::NetworkInterface>]
563
+ attr_accessor :network_interfaces
564
+
565
+ # Optional. The service account that serves as an identity for the VM instance.
566
+ # Currently supports only one service account.
567
+ # Corresponds to the JSON property `serviceAccounts`
568
+ # @return [Array<Google::Apis::NotebooksV2::ServiceAccount>]
569
+ attr_accessor :service_accounts
570
+
571
+ # A set of Shielded Instance options. See [Images using supported Shielded VM
572
+ # features](https://cloud.google.com/compute/docs/instances/modifying-shielded-
573
+ # vm). Not all combinations are valid.
574
+ # Corresponds to the JSON property `shieldedInstanceConfig`
575
+ # @return [Google::Apis::NotebooksV2::ShieldedInstanceConfig]
576
+ attr_accessor :shielded_instance_config
577
+
578
+ # Optional. The Compute Engine tags to add to runtime (see [Tagging instances](
579
+ # https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
580
+ # Corresponds to the JSON property `tags`
581
+ # @return [Array<String>]
582
+ attr_accessor :tags
583
+
584
+ # Definition of a custom Compute Engine virtual machine image for starting a
585
+ # notebook instance with the environment installed directly on the VM.
586
+ # Corresponds to the JSON property `vmImage`
587
+ # @return [Google::Apis::NotebooksV2::VmImage]
588
+ attr_accessor :vm_image
589
+
590
+ def initialize(**args)
591
+ update!(**args)
592
+ end
593
+
594
+ # Update properties of this object
595
+ def update!(**args)
596
+ @accelerator_configs = args[:accelerator_configs] if args.key?(:accelerator_configs)
597
+ @boot_disk = args[:boot_disk] if args.key?(:boot_disk)
598
+ @container_image = args[:container_image] if args.key?(:container_image)
599
+ @data_disks = args[:data_disks] if args.key?(:data_disks)
600
+ @disable_public_ip = args[:disable_public_ip] if args.key?(:disable_public_ip)
601
+ @enable_ip_forwarding = args[:enable_ip_forwarding] if args.key?(:enable_ip_forwarding)
602
+ @gpu_driver_config = args[:gpu_driver_config] if args.key?(:gpu_driver_config)
603
+ @machine_type = args[:machine_type] if args.key?(:machine_type)
604
+ @metadata = args[:metadata] if args.key?(:metadata)
605
+ @network_interfaces = args[:network_interfaces] if args.key?(:network_interfaces)
606
+ @service_accounts = args[:service_accounts] if args.key?(:service_accounts)
607
+ @shielded_instance_config = args[:shielded_instance_config] if args.key?(:shielded_instance_config)
608
+ @tags = args[:tags] if args.key?(:tags)
609
+ @vm_image = args[:vm_image] if args.key?(:vm_image)
610
+ end
611
+ end
612
+
613
+ # The definition of a notebook instance.
614
+ class Instance
615
+ include Google::Apis::Core::Hashable
616
+
617
+ # Output only. Instance creation time.
618
+ # Corresponds to the JSON property `createTime`
619
+ # @return [String]
620
+ attr_accessor :create_time
621
+
622
+ # Output only. Email address of entity that sent original CreateInstance request.
623
+ # Corresponds to the JSON property `creator`
624
+ # @return [String]
625
+ attr_accessor :creator
626
+
627
+ # Optional. If true, the notebook instance will not register with the proxy.
628
+ # Corresponds to the JSON property `disableProxyAccess`
629
+ # @return [Boolean]
630
+ attr_accessor :disable_proxy_access
631
+ alias_method :disable_proxy_access?, :disable_proxy_access
632
+
633
+ # The definition of how to configure a VM instance outside of Resources and
634
+ # Identity.
635
+ # Corresponds to the JSON property `gceSetup`
636
+ # @return [Google::Apis::NotebooksV2::GceSetup]
637
+ attr_accessor :gce_setup
638
+
639
+ # Output only. Additional information about instance health. Example: healthInfo"
640
+ # : ` "docker_proxy_agent_status": "1", "docker_status": "1", "
641
+ # jupyterlab_api_status": "-1", "jupyterlab_status": "-1", "updated": "2020-10-
642
+ # 18 09:40:03.573409" `
643
+ # Corresponds to the JSON property `healthInfo`
644
+ # @return [Hash<String,String>]
645
+ attr_accessor :health_info
646
+
647
+ # Output only. Instance health_state.
648
+ # Corresponds to the JSON property `healthState`
649
+ # @return [String]
650
+ attr_accessor :health_state
651
+
652
+ # Output only. Unique ID of the resource.
653
+ # Corresponds to the JSON property `id`
654
+ # @return [String]
655
+ attr_accessor :id
656
+
657
+ # Optional. Input only. The owner of this instance after creation. Format: `
658
+ # alias@example.com` Currently supports one owner only. If not specified, all of
659
+ # the service account users of your VM instance's service account can use the
660
+ # instance.
661
+ # Corresponds to the JSON property `instanceOwners`
662
+ # @return [Array<String>]
663
+ attr_accessor :instance_owners
664
+
665
+ # Optional. Labels to apply to this instance. These can be later modified by the
666
+ # UpdateInstance method.
667
+ # Corresponds to the JSON property `labels`
668
+ # @return [Hash<String,String>]
669
+ attr_accessor :labels
670
+
671
+ # Output only. The name of this notebook instance. Format: `projects/`project_id`
672
+ # /locations/`location`/instances/`instance_id``
673
+ # Corresponds to the JSON property `name`
674
+ # @return [String]
675
+ attr_accessor :name
676
+
677
+ # Output only. The proxy endpoint that is used to access the Jupyter notebook.
678
+ # Corresponds to the JSON property `proxyUri`
679
+ # @return [String]
680
+ attr_accessor :proxy_uri
681
+
682
+ # Output only. The state of this instance.
683
+ # Corresponds to the JSON property `state`
684
+ # @return [String]
685
+ attr_accessor :state
686
+
687
+ # Output only. Instance update time.
688
+ # Corresponds to the JSON property `updateTime`
689
+ # @return [String]
690
+ attr_accessor :update_time
691
+
692
+ # Output only. The upgrade history of this instance.
693
+ # Corresponds to the JSON property `upgradeHistory`
694
+ # @return [Array<Google::Apis::NotebooksV2::UpgradeHistoryEntry>]
695
+ attr_accessor :upgrade_history
696
+
697
+ def initialize(**args)
698
+ update!(**args)
699
+ end
700
+
701
+ # Update properties of this object
702
+ def update!(**args)
703
+ @create_time = args[:create_time] if args.key?(:create_time)
704
+ @creator = args[:creator] if args.key?(:creator)
705
+ @disable_proxy_access = args[:disable_proxy_access] if args.key?(:disable_proxy_access)
706
+ @gce_setup = args[:gce_setup] if args.key?(:gce_setup)
707
+ @health_info = args[:health_info] if args.key?(:health_info)
708
+ @health_state = args[:health_state] if args.key?(:health_state)
709
+ @id = args[:id] if args.key?(:id)
710
+ @instance_owners = args[:instance_owners] if args.key?(:instance_owners)
711
+ @labels = args[:labels] if args.key?(:labels)
712
+ @name = args[:name] if args.key?(:name)
713
+ @proxy_uri = args[:proxy_uri] if args.key?(:proxy_uri)
714
+ @state = args[:state] if args.key?(:state)
715
+ @update_time = args[:update_time] if args.key?(:update_time)
716
+ @upgrade_history = args[:upgrade_history] if args.key?(:upgrade_history)
717
+ end
718
+ end
719
+
720
+ # Response for listing notebook instances.
721
+ class ListInstancesResponse
722
+ include Google::Apis::Core::Hashable
723
+
724
+ # A list of returned instances.
725
+ # Corresponds to the JSON property `instances`
726
+ # @return [Array<Google::Apis::NotebooksV2::Instance>]
727
+ attr_accessor :instances
728
+
729
+ # Page token that can be used to continue listing from the last result in the
730
+ # next list call.
731
+ # Corresponds to the JSON property `nextPageToken`
732
+ # @return [String]
733
+ attr_accessor :next_page_token
734
+
735
+ # Locations that could not be reached. For example, ['us-west1-a', 'us-central1-
736
+ # b']. A ListInstancesResponse will only contain either instances or
737
+ # unreachables,
738
+ # Corresponds to the JSON property `unreachable`
739
+ # @return [Array<String>]
740
+ attr_accessor :unreachable
741
+
742
+ def initialize(**args)
743
+ update!(**args)
744
+ end
745
+
746
+ # Update properties of this object
747
+ def update!(**args)
748
+ @instances = args[:instances] if args.key?(:instances)
749
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
750
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
751
+ end
752
+ end
753
+
184
754
  # The response message for Locations.ListLocations.
185
755
  class ListLocationsResponse
186
756
  include Google::Apis::Core::Hashable
@@ -278,6 +848,40 @@ module Google
278
848
  end
279
849
  end
280
850
 
851
+ # The definition of a network interface resource attached to a VM.
852
+ class NetworkInterface
853
+ include Google::Apis::Core::Hashable
854
+
855
+ # Optional. The name of the VPC that this VM instance is in. Format: `projects/`
856
+ # project_id`/global/networks/`network_id``
857
+ # Corresponds to the JSON property `network`
858
+ # @return [String]
859
+ attr_accessor :network
860
+
861
+ # Optional. The type of vNIC to be used on this interface. This may be gVNIC or
862
+ # VirtioNet.
863
+ # Corresponds to the JSON property `nicType`
864
+ # @return [String]
865
+ attr_accessor :nic_type
866
+
867
+ # Optional. The name of the subnet that this VM instance is in. Format: `
868
+ # projects/`project_id`/regions/`region`/subnetworks/`subnetwork_id``
869
+ # Corresponds to the JSON property `subnet`
870
+ # @return [String]
871
+ attr_accessor :subnet
872
+
873
+ def initialize(**args)
874
+ update!(**args)
875
+ end
876
+
877
+ # Update properties of this object
878
+ def update!(**args)
879
+ @network = args[:network] if args.key?(:network)
880
+ @nic_type = args[:nic_type] if args.key?(:nic_type)
881
+ @subnet = args[:subnet] if args.key?(:subnet)
882
+ end
883
+ end
884
+
281
885
  # This resource represents a long-running operation that is the result of a
282
886
  # network API call.
283
887
  class Operation
@@ -493,6 +1097,97 @@ module Google
493
1097
  end
494
1098
  end
495
1099
 
1100
+ # Request for notebook instances to report information to Notebooks API.
1101
+ class ReportInstanceInfoSystemRequest
1102
+ include Google::Apis::Core::Hashable
1103
+
1104
+ # The definition of an Event for a managed / semi-managed notebook instance.
1105
+ # Corresponds to the JSON property `event`
1106
+ # @return [Google::Apis::NotebooksV2::Event]
1107
+ attr_accessor :event
1108
+
1109
+ # Required. The VM hardware token for authenticating the VM. https://cloud.
1110
+ # google.com/compute/docs/instances/verifying-instance-identity
1111
+ # Corresponds to the JSON property `vmId`
1112
+ # @return [String]
1113
+ attr_accessor :vm_id
1114
+
1115
+ def initialize(**args)
1116
+ update!(**args)
1117
+ end
1118
+
1119
+ # Update properties of this object
1120
+ def update!(**args)
1121
+ @event = args[:event] if args.key?(:event)
1122
+ @vm_id = args[:vm_id] if args.key?(:vm_id)
1123
+ end
1124
+ end
1125
+
1126
+ # Request for resetting a notebook instance
1127
+ class ResetInstanceRequest
1128
+ include Google::Apis::Core::Hashable
1129
+
1130
+ def initialize(**args)
1131
+ update!(**args)
1132
+ end
1133
+
1134
+ # Update properties of this object
1135
+ def update!(**args)
1136
+ end
1137
+ end
1138
+
1139
+ # Request for rollbacking a notebook instance
1140
+ class RollbackInstanceRequest
1141
+ include Google::Apis::Core::Hashable
1142
+
1143
+ # Required. Output only. Revision Id
1144
+ # Corresponds to the JSON property `revisionId`
1145
+ # @return [String]
1146
+ attr_accessor :revision_id
1147
+
1148
+ # Required. The snapshot for rollback. Example: "projects/test-project/global/
1149
+ # snapshots/krwlzipynril".
1150
+ # Corresponds to the JSON property `targetSnapshot`
1151
+ # @return [String]
1152
+ attr_accessor :target_snapshot
1153
+
1154
+ def initialize(**args)
1155
+ update!(**args)
1156
+ end
1157
+
1158
+ # Update properties of this object
1159
+ def update!(**args)
1160
+ @revision_id = args[:revision_id] if args.key?(:revision_id)
1161
+ @target_snapshot = args[:target_snapshot] if args.key?(:target_snapshot)
1162
+ end
1163
+ end
1164
+
1165
+ # A service account that acts as an identity.
1166
+ class ServiceAccount
1167
+ include Google::Apis::Core::Hashable
1168
+
1169
+ # Optional. Email address of the service account.
1170
+ # Corresponds to the JSON property `email`
1171
+ # @return [String]
1172
+ attr_accessor :email
1173
+
1174
+ # Output only. The list of scopes to be made available for this service account.
1175
+ # Set by the CLH to https://www.googleapis.com/auth/cloud-platform
1176
+ # Corresponds to the JSON property `scopes`
1177
+ # @return [Array<String>]
1178
+ attr_accessor :scopes
1179
+
1180
+ def initialize(**args)
1181
+ update!(**args)
1182
+ end
1183
+
1184
+ # Update properties of this object
1185
+ def update!(**args)
1186
+ @email = args[:email] if args.key?(:email)
1187
+ @scopes = args[:scopes] if args.key?(:scopes)
1188
+ end
1189
+ end
1190
+
496
1191
  # Request message for `SetIamPolicy` method.
497
1192
  class SetIamPolicyRequest
498
1193
  include Google::Apis::Core::Hashable
@@ -538,6 +1233,63 @@ module Google
538
1233
  end
539
1234
  end
540
1235
 
1236
+ # A set of Shielded Instance options. See [Images using supported Shielded VM
1237
+ # features](https://cloud.google.com/compute/docs/instances/modifying-shielded-
1238
+ # vm). Not all combinations are valid.
1239
+ class ShieldedInstanceConfig
1240
+ include Google::Apis::Core::Hashable
1241
+
1242
+ # Optional. Defines whether the VM instance has integrity monitoring enabled.
1243
+ # Enables monitoring and attestation of the boot integrity of the VM instance.
1244
+ # The attestation is performed against the integrity policy baseline. This
1245
+ # baseline is initially derived from the implicitly trusted boot image when the
1246
+ # VM instance is created. Enabled by default.
1247
+ # Corresponds to the JSON property `enableIntegrityMonitoring`
1248
+ # @return [Boolean]
1249
+ attr_accessor :enable_integrity_monitoring
1250
+ alias_method :enable_integrity_monitoring?, :enable_integrity_monitoring
1251
+
1252
+ # Optional. Defines whether the VM instance has Secure Boot enabled. Secure Boot
1253
+ # helps ensure that the system only runs authentic software by verifying the
1254
+ # digital signature of all boot components, and halting the boot process if
1255
+ # signature verification fails. Disabled by default.
1256
+ # Corresponds to the JSON property `enableSecureBoot`
1257
+ # @return [Boolean]
1258
+ attr_accessor :enable_secure_boot
1259
+ alias_method :enable_secure_boot?, :enable_secure_boot
1260
+
1261
+ # Optional. Defines whether the VM instance has the vTPM enabled. Enabled by
1262
+ # default.
1263
+ # Corresponds to the JSON property `enableVtpm`
1264
+ # @return [Boolean]
1265
+ attr_accessor :enable_vtpm
1266
+ alias_method :enable_vtpm?, :enable_vtpm
1267
+
1268
+ def initialize(**args)
1269
+ update!(**args)
1270
+ end
1271
+
1272
+ # Update properties of this object
1273
+ def update!(**args)
1274
+ @enable_integrity_monitoring = args[:enable_integrity_monitoring] if args.key?(:enable_integrity_monitoring)
1275
+ @enable_secure_boot = args[:enable_secure_boot] if args.key?(:enable_secure_boot)
1276
+ @enable_vtpm = args[:enable_vtpm] if args.key?(:enable_vtpm)
1277
+ end
1278
+ end
1279
+
1280
+ # Request for starting a notebook instance
1281
+ class StartInstanceRequest
1282
+ include Google::Apis::Core::Hashable
1283
+
1284
+ def initialize(**args)
1285
+ update!(**args)
1286
+ end
1287
+
1288
+ # Update properties of this object
1289
+ def update!(**args)
1290
+ end
1291
+ end
1292
+
541
1293
  # The `Status` type defines a logical error model that is suitable for different
542
1294
  # programming environments, including REST APIs and RPC APIs. It is used by [
543
1295
  # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
@@ -577,6 +1329,19 @@ module Google
577
1329
  end
578
1330
  end
579
1331
 
1332
+ # Request for stopping a notebook instance
1333
+ class StopInstanceRequest
1334
+ include Google::Apis::Core::Hashable
1335
+
1336
+ def initialize(**args)
1337
+ update!(**args)
1338
+ end
1339
+
1340
+ # Update properties of this object
1341
+ def update!(**args)
1342
+ end
1343
+ end
1344
+
580
1345
  # Request message for `TestIamPermissions` method.
581
1346
  class TestIamPermissionsRequest
582
1347
  include Google::Apis::Core::Hashable
@@ -616,6 +1381,141 @@ module Google
616
1381
  @permissions = args[:permissions] if args.key?(:permissions)
617
1382
  end
618
1383
  end
1384
+
1385
+ # The entry of VM image upgrade history.
1386
+ class UpgradeHistoryEntry
1387
+ include Google::Apis::Core::Hashable
1388
+
1389
+ # Optional. Action. Rolloback or Upgrade.
1390
+ # Corresponds to the JSON property `action`
1391
+ # @return [String]
1392
+ attr_accessor :action
1393
+
1394
+ # Optional. The container image before this instance upgrade.
1395
+ # Corresponds to the JSON property `containerImage`
1396
+ # @return [String]
1397
+ attr_accessor :container_image
1398
+
1399
+ # Immutable. The time that this instance upgrade history entry is created.
1400
+ # Corresponds to the JSON property `createTime`
1401
+ # @return [String]
1402
+ attr_accessor :create_time
1403
+
1404
+ # Optional. The framework of this notebook instance.
1405
+ # Corresponds to the JSON property `framework`
1406
+ # @return [String]
1407
+ attr_accessor :framework
1408
+
1409
+ # Optional. The snapshot of the boot disk of this notebook instance before
1410
+ # upgrade.
1411
+ # Corresponds to the JSON property `snapshot`
1412
+ # @return [String]
1413
+ attr_accessor :snapshot
1414
+
1415
+ # Output only. The state of this instance upgrade history entry.
1416
+ # Corresponds to the JSON property `state`
1417
+ # @return [String]
1418
+ attr_accessor :state
1419
+
1420
+ # Optional. Target VM Version, like m63.
1421
+ # Corresponds to the JSON property `targetVersion`
1422
+ # @return [String]
1423
+ attr_accessor :target_version
1424
+
1425
+ # Optional. The version of the notebook instance before this upgrade.
1426
+ # Corresponds to the JSON property `version`
1427
+ # @return [String]
1428
+ attr_accessor :version
1429
+
1430
+ # Optional. The VM image before this instance upgrade.
1431
+ # Corresponds to the JSON property `vmImage`
1432
+ # @return [String]
1433
+ attr_accessor :vm_image
1434
+
1435
+ def initialize(**args)
1436
+ update!(**args)
1437
+ end
1438
+
1439
+ # Update properties of this object
1440
+ def update!(**args)
1441
+ @action = args[:action] if args.key?(:action)
1442
+ @container_image = args[:container_image] if args.key?(:container_image)
1443
+ @create_time = args[:create_time] if args.key?(:create_time)
1444
+ @framework = args[:framework] if args.key?(:framework)
1445
+ @snapshot = args[:snapshot] if args.key?(:snapshot)
1446
+ @state = args[:state] if args.key?(:state)
1447
+ @target_version = args[:target_version] if args.key?(:target_version)
1448
+ @version = args[:version] if args.key?(:version)
1449
+ @vm_image = args[:vm_image] if args.key?(:vm_image)
1450
+ end
1451
+ end
1452
+
1453
+ # Request for upgrading a notebook instance
1454
+ class UpgradeInstanceRequest
1455
+ include Google::Apis::Core::Hashable
1456
+
1457
+ def initialize(**args)
1458
+ update!(**args)
1459
+ end
1460
+
1461
+ # Update properties of this object
1462
+ def update!(**args)
1463
+ end
1464
+ end
1465
+
1466
+ # Request for upgrading a notebook instance from within the VM
1467
+ class UpgradeInstanceSystemRequest
1468
+ include Google::Apis::Core::Hashable
1469
+
1470
+ # Required. The VM hardware token for authenticating the VM. https://cloud.
1471
+ # google.com/compute/docs/instances/verifying-instance-identity
1472
+ # Corresponds to the JSON property `vmId`
1473
+ # @return [String]
1474
+ attr_accessor :vm_id
1475
+
1476
+ def initialize(**args)
1477
+ update!(**args)
1478
+ end
1479
+
1480
+ # Update properties of this object
1481
+ def update!(**args)
1482
+ @vm_id = args[:vm_id] if args.key?(:vm_id)
1483
+ end
1484
+ end
1485
+
1486
+ # Definition of a custom Compute Engine virtual machine image for starting a
1487
+ # notebook instance with the environment installed directly on the VM.
1488
+ class VmImage
1489
+ include Google::Apis::Core::Hashable
1490
+
1491
+ # Optional. Use this VM image family to find the image; the newest image in this
1492
+ # family will be used.
1493
+ # Corresponds to the JSON property `family`
1494
+ # @return [String]
1495
+ attr_accessor :family
1496
+
1497
+ # Optional. Use VM image name to find the image.
1498
+ # Corresponds to the JSON property `name`
1499
+ # @return [String]
1500
+ attr_accessor :name
1501
+
1502
+ # Required. The name of the Google Cloud project that this VM image belongs to.
1503
+ # Format: ``project_id``
1504
+ # Corresponds to the JSON property `project`
1505
+ # @return [String]
1506
+ attr_accessor :project
1507
+
1508
+ def initialize(**args)
1509
+ update!(**args)
1510
+ end
1511
+
1512
+ # Update properties of this object
1513
+ def update!(**args)
1514
+ @family = args[:family] if args.key?(:family)
1515
+ @name = args[:name] if args.key?(:name)
1516
+ @project = args[:project] if args.key?(:project)
1517
+ end
1518
+ end
619
1519
  end
620
1520
  end
621
1521
  end