|
| 1 | +# Copyright 2019 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 | +# NOTE: This file is auto generated by the elixir code generator program. |
| 16 | +# Do not edit this file manually. |
| 17 | + |
| 18 | +defmodule GoogleApi.Workstations.V1.Model.BoostConfig do |
| 19 | + @moduledoc """ |
| 20 | + A configuration that workstations can boost to. |
| 21 | +
|
| 22 | + ## Attributes |
| 23 | +
|
| 24 | + * `accelerators` (*type:* `list(GoogleApi.Workstations.V1.Model.Accelerator.t)`, *default:* `nil`) - Optional. A list of the type and count of accelerator cards attached to the boost instance. Defaults to `none`. |
| 25 | + * `bootDiskSizeGb` (*type:* `integer()`, *default:* `nil`) - Optional. The size of the boot disk for the VM in gigabytes (GB). The minimum boot disk size is `30` GB. Defaults to `50` GB. |
| 26 | + * `enableNestedVirtualization` (*type:* `boolean()`, *default:* `nil`) - Optional. Whether to enable nested virtualization on boosted Cloud Workstations VMs running using this boost configuration. Defaults to false. Nested virtualization lets you run virtual machine (VM) instances inside your workstation. Before enabling nested virtualization, consider the following important considerations. Cloud Workstations instances are subject to the [same restrictions as Compute Engine instances](https://cloud.google.com/compute/docs/instances/nested-virtualization/overview#restrictions): * **Organization policy**: projects, folders, or organizations may be restricted from creating nested VMs if the **Disable VM nested virtualization** constraint is enforced in the organization policy. For more information, see the Compute Engine section, [Checking whether nested virtualization is allowed](https://cloud.google.com/compute/docs/instances/nested-virtualization/managing-constraint#checking_whether_nested_virtualization_is_allowed). * **Performance**: nested VMs might experience a 10% or greater decrease in performance for workloads that are CPU-bound and possibly greater than a 10% decrease for workloads that are input/output bound. * **Machine Type**: nested virtualization can only be enabled on boost configurations that specify a machine_type in the N1 or N2 machine series. |
| 27 | + * `id` (*type:* `String.t`, *default:* `nil`) - Optional. Required. The id to be used for the boost configuration. |
| 28 | + * `machineType` (*type:* `String.t`, *default:* `nil`) - Optional. The type of machine that boosted VM instances will use—for example, `e2-standard-4`. For more information about machine types that Cloud Workstations supports, see the list of [available machine types](https://cloud.google.com/workstations/docs/available-machine-types). Defaults to `e2-standard-4`. |
| 29 | + * `poolSize` (*type:* `integer()`, *default:* `nil`) - Optional. The number of boost VMs that the system should keep idle so that workstations can be boosted quickly. Defaults to `0`. |
| 30 | + """ |
| 31 | + |
| 32 | + use GoogleApi.Gax.ModelBase |
| 33 | + |
| 34 | + @type t :: %__MODULE__{ |
| 35 | + :accelerators => list(GoogleApi.Workstations.V1.Model.Accelerator.t()) | nil, |
| 36 | + :bootDiskSizeGb => integer() | nil, |
| 37 | + :enableNestedVirtualization => boolean() | nil, |
| 38 | + :id => String.t() | nil, |
| 39 | + :machineType => String.t() | nil, |
| 40 | + :poolSize => integer() | nil |
| 41 | + } |
| 42 | + |
| 43 | + field(:accelerators, as: GoogleApi.Workstations.V1.Model.Accelerator, type: :list) |
| 44 | + field(:bootDiskSizeGb) |
| 45 | + field(:enableNestedVirtualization) |
| 46 | + field(:id) |
| 47 | + field(:machineType) |
| 48 | + field(:poolSize) |
| 49 | +end |
| 50 | + |
| 51 | +defimpl Poison.Decoder, for: GoogleApi.Workstations.V1.Model.BoostConfig do |
| 52 | + def decode(value, options) do |
| 53 | + GoogleApi.Workstations.V1.Model.BoostConfig.decode(value, options) |
| 54 | + end |
| 55 | +end |
| 56 | + |
| 57 | +defimpl Poison.Encoder, for: GoogleApi.Workstations.V1.Model.BoostConfig do |
| 58 | + def encode(value, options) do |
| 59 | + GoogleApi.Gax.ModelBase.encode(value, options) |
| 60 | + end |
| 61 | +end |
0 commit comments