# 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.DiskImageTargetDetails do
  @moduledoc """
  The target details of the image resource that will be created by the import job.

  ## Attributes

  *   `additionalLicenses` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Additional licenses to assign to the image. Format: https://www.googleapis.com/compute/v1/projects/PROJECT_ID/global/licenses/LICENSE_NAME Or https://www.googleapis.com/compute/beta/projects/PROJECT_ID/global/licenses/LICENSE_NAME
  *   `dataDiskImageImport` (*type:* `GoogleApi.VMMigration.V1.Model.DataDiskImageImport.t`, *default:* `nil`) - Optional. Use to skip OS adaptation process.
  *   `description` (*type:* `String.t`, *default:* `nil`) - Optional. An optional description of the image.
  *   `encryption` (*type:* `GoogleApi.VMMigration.V1.Model.Encryption.t`, *default:* `nil`) - Immutable. The encryption to apply to the image.
  *   `familyName` (*type:* `String.t`, *default:* `nil`) - Optional. The name of the image family to which the new image belongs.
  *   `imageName` (*type:* `String.t`, *default:* `nil`) - Required. The name of the image to be created.
  *   `labels` (*type:* `map()`, *default:* `nil`) - Optional. A map of labels to associate with the image.
  *   `osAdaptationParameters` (*type:* `GoogleApi.VMMigration.V1.Model.ImageImportOsAdaptationParameters.t`, *default:* `nil`) - Optional. Use to set the parameters relevant for the OS adaptation process.
  *   `singleRegionStorage` (*type:* `boolean()`, *default:* `nil`) - Optional. Set to true to set the image storageLocations to the single region of the import job. When false, the closest multi-region is selected.
  *   `targetProject` (*type:* `String.t`, *default:* `nil`) - Required. Reference to the TargetProject resource that represents the target project in which the imported image will be created.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :additionalLicenses => list(String.t()) | nil,
          :dataDiskImageImport => GoogleApi.VMMigration.V1.Model.DataDiskImageImport.t() | nil,
          :description => String.t() | nil,
          :encryption => GoogleApi.VMMigration.V1.Model.Encryption.t() | nil,
          :familyName => String.t() | nil,
          :imageName => String.t() | nil,
          :labels => map() | nil,
          :osAdaptationParameters =>
            GoogleApi.VMMigration.V1.Model.ImageImportOsAdaptationParameters.t() | nil,
          :singleRegionStorage => boolean() | nil,
          :targetProject => String.t() | nil
        }

  field(:additionalLicenses, type: :list)
  field(:dataDiskImageImport, as: GoogleApi.VMMigration.V1.Model.DataDiskImageImport)
  field(:description)
  field(:encryption, as: GoogleApi.VMMigration.V1.Model.Encryption)
  field(:familyName)
  field(:imageName)
  field(:labels, type: :map)

  field(:osAdaptationParameters,
    as: GoogleApi.VMMigration.V1.Model.ImageImportOsAdaptationParameters
  )

  field(:singleRegionStorage)
  field(:targetProject)
end

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

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