# 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.Admin.Directory_v1.Model.OsUpdateStatus do
  @moduledoc """
  Contains information regarding the current OS update status.

  ## Attributes

  *   `rebootTime` (*type:* `String.t`, *default:* `nil`) - Date and time of the last reboot.
  *   `state` (*type:* `String.t`, *default:* `nil`) - The update state of an OS update.
  *   `targetKioskAppVersion` (*type:* `String.t`, *default:* `nil`) - New required platform version from the pending updated kiosk app.
  *   `targetOsVersion` (*type:* `String.t`, *default:* `nil`) - New platform version of the OS image being downloaded and applied. It is only set when update status is UPDATE_STATUS_DOWNLOAD_IN_PROGRESS or UPDATE_STATUS_NEED_REBOOT. Note this could be a dummy "0.0.0.0" for UPDATE_STATUS_NEED_REBOOT for some edge cases, e.g. update engine is restarted without a reboot.
  *   `updateCheckTime` (*type:* `String.t`, *default:* `nil`) - Date and time of the last update check.
  *   `updateTime` (*type:* `String.t`, *default:* `nil`) - Date and time of the last successful OS update.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :rebootTime => String.t() | nil,
          :state => String.t() | nil,
          :targetKioskAppVersion => String.t() | nil,
          :targetOsVersion => String.t() | nil,
          :updateCheckTime => String.t() | nil,
          :updateTime => String.t() | nil
        }

  field(:rebootTime)
  field(:state)
  field(:targetKioskAppVersion)
  field(:targetOsVersion)
  field(:updateCheckTime)
  field(:updateTime)
end

defimpl Poison.Decoder, for: GoogleApi.Admin.Directory_v1.Model.OsUpdateStatus do
  def decode(value, options) do
    GoogleApi.Admin.Directory_v1.Model.OsUpdateStatus.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Admin.Directory_v1.Model.OsUpdateStatus do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
