# 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.Genomics.V2alpha1.Model.WorkerStatus do
  @moduledoc """
  The status of the worker VM.

  ## Attributes

  *   `attachedDisks` (*type:* `%{optional(String.t) => GoogleApi.Genomics.V2alpha1.Model.DiskStatus.t}`, *default:* `nil`) - Status of attached disks.
  *   `bootDisk` (*type:* `GoogleApi.Genomics.V2alpha1.Model.DiskStatus.t`, *default:* `nil`) - Status of the boot disk.
  *   `freeRamBytes` (*type:* `String.t`, *default:* `nil`) - Free RAM.
  *   `totalRamBytes` (*type:* `String.t`, *default:* `nil`) - Total RAM.
  *   `uptimeSeconds` (*type:* `String.t`, *default:* `nil`) - System uptime.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :attachedDisks =>
            %{optional(String.t()) => GoogleApi.Genomics.V2alpha1.Model.DiskStatus.t()} | nil,
          :bootDisk => GoogleApi.Genomics.V2alpha1.Model.DiskStatus.t() | nil,
          :freeRamBytes => String.t() | nil,
          :totalRamBytes => String.t() | nil,
          :uptimeSeconds => String.t() | nil
        }

  field(:attachedDisks, as: GoogleApi.Genomics.V2alpha1.Model.DiskStatus, type: :map)
  field(:bootDisk, as: GoogleApi.Genomics.V2alpha1.Model.DiskStatus)
  field(:freeRamBytes)
  field(:totalRamBytes)
  field(:uptimeSeconds)
end

defimpl Poison.Decoder, for: GoogleApi.Genomics.V2alpha1.Model.WorkerStatus do
  def decode(value, options) do
    GoogleApi.Genomics.V2alpha1.Model.WorkerStatus.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Genomics.V2alpha1.Model.WorkerStatus do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
