# 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.CheckInRequest do
  @moduledoc """
  The parameters to the CheckIn method.

  ## Attributes

  *   `deadlineExpired` (*type:* `GoogleApi.Genomics.V2alpha1.Model.Empty.t`, *default:* `nil`) - The deadline has expired and the worker needs more time.
  *   `event` (*type:* `map()`, *default:* `nil`) - A workflow specific event occurred.
  *   `events` (*type:* `list(GoogleApi.Genomics.V2alpha1.Model.TimestampedEvent.t)`, *default:* `nil`) - A list of timestamped events.
  *   `result` (*type:* `GoogleApi.Genomics.V2alpha1.Model.Status.t`, *default:* `nil`) - The operation has finished with the given result.
  *   `sosReport` (*type:* `String.t`, *default:* `nil`) - An SOS report for an unexpected VM failure.
  *   `workerStatus` (*type:* `GoogleApi.Genomics.V2alpha1.Model.WorkerStatus.t`, *default:* `nil`) - Data about the status of the worker VM.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :deadlineExpired => GoogleApi.Genomics.V2alpha1.Model.Empty.t() | nil,
          :event => map() | nil,
          :events => list(GoogleApi.Genomics.V2alpha1.Model.TimestampedEvent.t()) | nil,
          :result => GoogleApi.Genomics.V2alpha1.Model.Status.t() | nil,
          :sosReport => String.t() | nil,
          :workerStatus => GoogleApi.Genomics.V2alpha1.Model.WorkerStatus.t() | nil
        }

  field(:deadlineExpired, as: GoogleApi.Genomics.V2alpha1.Model.Empty)
  field(:event, type: :map)
  field(:events, as: GoogleApi.Genomics.V2alpha1.Model.TimestampedEvent, type: :list)
  field(:result, as: GoogleApi.Genomics.V2alpha1.Model.Status)
  field(:sosReport)
  field(:workerStatus, as: GoogleApi.Genomics.V2alpha1.Model.WorkerStatus)
end

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

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