# 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.AwsVmDetails do
  @moduledoc """
  AwsVmDetails describes a VM in AWS.

  ## Attributes

  *   `architecture` (*type:* `String.t`, *default:* `nil`) - The CPU architecture.
  *   `bootOption` (*type:* `String.t`, *default:* `nil`) - The VM Boot Option.
  *   `committedStorageMb` (*type:* `String.t`, *default:* `nil`) - The total size of the storage allocated to the VM in MB.
  *   `cpuCount` (*type:* `integer()`, *default:* `nil`) - The number of cpus the VM has.
  *   `diskCount` (*type:* `integer()`, *default:* `nil`) - The number of disks the VM has.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - The display name of the VM. Note that this value is not necessarily unique.
  *   `instanceType` (*type:* `String.t`, *default:* `nil`) - The instance type of the VM.
  *   `memoryMb` (*type:* `integer()`, *default:* `nil`) - The memory size of the VM in MB.
  *   `osDescription` (*type:* `String.t`, *default:* `nil`) - The VM's OS.
  *   `powerState` (*type:* `String.t`, *default:* `nil`) - Output only. The power state of the VM at the moment list was taken.
  *   `securityGroups` (*type:* `list(GoogleApi.VMMigration.V1.Model.AwsSecurityGroup.t)`, *default:* `nil`) - The security groups the VM belongs to.
  *   `sourceDescription` (*type:* `String.t`, *default:* `nil`) - The descriptive name of the AWS's source this VM is connected to.
  *   `sourceId` (*type:* `String.t`, *default:* `nil`) - The id of the AWS's source this VM is connected to.
  *   `tags` (*type:* `map()`, *default:* `nil`) - The tags of the VM.
  *   `virtualizationType` (*type:* `String.t`, *default:* `nil`) - The virtualization type.
  *   `vmId` (*type:* `String.t`, *default:* `nil`) - The VM ID in AWS.
  *   `vpcId` (*type:* `String.t`, *default:* `nil`) - The VPC ID the VM belongs to.
  *   `zone` (*type:* `String.t`, *default:* `nil`) - The AWS zone of the VM.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :architecture => String.t() | nil,
          :bootOption => String.t() | nil,
          :committedStorageMb => String.t() | nil,
          :cpuCount => integer() | nil,
          :diskCount => integer() | nil,
          :displayName => String.t() | nil,
          :instanceType => String.t() | nil,
          :memoryMb => integer() | nil,
          :osDescription => String.t() | nil,
          :powerState => String.t() | nil,
          :securityGroups => list(GoogleApi.VMMigration.V1.Model.AwsSecurityGroup.t()) | nil,
          :sourceDescription => String.t() | nil,
          :sourceId => String.t() | nil,
          :tags => map() | nil,
          :virtualizationType => String.t() | nil,
          :vmId => String.t() | nil,
          :vpcId => String.t() | nil,
          :zone => String.t() | nil
        }

  field(:architecture)
  field(:bootOption)
  field(:committedStorageMb)
  field(:cpuCount)
  field(:diskCount)
  field(:displayName)
  field(:instanceType)
  field(:memoryMb)
  field(:osDescription)
  field(:powerState)
  field(:securityGroups, as: GoogleApi.VMMigration.V1.Model.AwsSecurityGroup, type: :list)
  field(:sourceDescription)
  field(:sourceId)
  field(:tags, type: :map)
  field(:virtualizationType)
  field(:vmId)
  field(:vpcId)
  field(:zone)
end

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

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