# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.VMMigration.V1.Model.DisksMigrationVmTargetDefaults do
  @moduledoc """
  Details for creation of a VM that migrated data disks will be attached to.

  ## Attributes

  *   `additionalLicenses` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Additional licenses to assign to the VM.
  *   `bootDiskDefaults` (*type:* `GoogleApi.VMMigration.V1.Model.BootDiskDefaults.t`, *default:* `nil`) - Optional. Details of the boot disk of the VM.
  *   `computeScheduling` (*type:* `GoogleApi.VMMigration.V1.Model.ComputeScheduling.t`, *default:* `nil`) - Optional. Compute instance scheduling information (if empty default is used).
  *   `enableIntegrityMonitoring` (*type:* `boolean()`, *default:* `nil`) - Optional. Defines whether the instance has integrity monitoring enabled.
  *   `enableVtpm` (*type:* `boolean()`, *default:* `nil`) - Optional. Defines whether the instance has vTPM enabled.
  *   `encryption` (*type:* `GoogleApi.VMMigration.V1.Model.Encryption.t`, *default:* `nil`) - Optional. The encryption to apply to the VM.
  *   `hostname` (*type:* `String.t`, *default:* `nil`) - Optional. The hostname to assign to the VM.
  *   `labels` (*type:* `map()`, *default:* `nil`) - Optional. A map of labels to associate with the VM.
  *   `machineType` (*type:* `String.t`, *default:* `nil`) - Required. The machine type to create the VM with.
  *   `machineTypeSeries` (*type:* `String.t`, *default:* `nil`) - Optional. The machine type series to create the VM with. For presentation only.
  *   `metadata` (*type:* `map()`, *default:* `nil`) - Optional. The metadata key/value pairs to assign to the VM.
  *   `networkInterfaces` (*type:* `list(GoogleApi.VMMigration.V1.Model.NetworkInterface.t)`, *default:* `nil`) - Optional. NICs to attach to the VM.
  *   `networkTags` (*type:* `list(String.t)`, *default:* `nil`) - Optional. A list of network tags to associate with the VM.
  *   `secureBoot` (*type:* `boolean()`, *default:* `nil`) - Optional. Defines whether the instance has Secure Boot enabled. This can be set to true only if the VM boot option is EFI.
  *   `serviceAccount` (*type:* `String.t`, *default:* `nil`) - Optional. The service account to associate the VM with.
  *   `vmName` (*type:* `String.t`, *default:* `nil`) - Required. The name of the VM to create.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :additionalLicenses => list(String.t()) | nil,
          :bootDiskDefaults => GoogleApi.VMMigration.V1.Model.BootDiskDefaults.t() | nil,
          :computeScheduling => GoogleApi.VMMigration.V1.Model.ComputeScheduling.t() | nil,
          :enableIntegrityMonitoring => boolean() | nil,
          :enableVtpm => boolean() | nil,
          :encryption => GoogleApi.VMMigration.V1.Model.Encryption.t() | nil,
          :hostname => String.t() | nil,
          :labels => map() | nil,
          :machineType => String.t() | nil,
          :machineTypeSeries => String.t() | nil,
          :metadata => map() | nil,
          :networkInterfaces => list(GoogleApi.VMMigration.V1.Model.NetworkInterface.t()) | nil,
          :networkTags => list(String.t()) | nil,
          :secureBoot => boolean() | nil,
          :serviceAccount => String.t() | nil,
          :vmName => String.t() | nil
        }

  field(:additionalLicenses, type: :list)
  field(:bootDiskDefaults, as: GoogleApi.VMMigration.V1.Model.BootDiskDefaults)
  field(:computeScheduling, as: GoogleApi.VMMigration.V1.Model.ComputeScheduling)
  field(:enableIntegrityMonitoring)
  field(:enableVtpm)
  field(:encryption, as: GoogleApi.VMMigration.V1.Model.Encryption)
  field(:hostname)
  field(:labels, type: :map)
  field(:machineType)
  field(:machineTypeSeries)
  field(:metadata, type: :map)
  field(:networkInterfaces, as: GoogleApi.VMMigration.V1.Model.NetworkInterface, type: :list)
  field(:networkTags, type: :list)
  field(:secureBoot)
  field(:serviceAccount)
  field(:vmName)
end

defimpl Poison.Decoder, for: GoogleApi.VMMigration.V1.Model.DisksMigrationVmTargetDefaults do
  def decode(value, options) do
    GoogleApi.VMMigration.V1.Model.DisksMigrationVmTargetDefaults.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.VMMigration.V1.Model.DisksMigrationVmTargetDefaults do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
