# 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.LifeSciences.V2beta.Model.Event do
  @moduledoc """
  Carries information about events that occur during pipeline execution.

  ## Attributes

  *   `containerKilled` (*type:* `GoogleApi.LifeSciences.V2beta.Model.ContainerKilledEvent.t`, *default:* `nil`) - See google.cloud.lifesciences.v2beta.ContainerKilledEvent.
  *   `containerStarted` (*type:* `GoogleApi.LifeSciences.V2beta.Model.ContainerStartedEvent.t`, *default:* `nil`) - See google.cloud.lifesciences.v2beta.ContainerStartedEvent.
  *   `containerStopped` (*type:* `GoogleApi.LifeSciences.V2beta.Model.ContainerStoppedEvent.t`, *default:* `nil`) - See google.cloud.lifesciences.v2beta.ContainerStoppedEvent.
  *   `delayed` (*type:* `GoogleApi.LifeSciences.V2beta.Model.DelayedEvent.t`, *default:* `nil`) - See google.cloud.lifesciences.v2beta.DelayedEvent.
  *   `description` (*type:* `String.t`, *default:* `nil`) - A human-readable description of the event. Note that these strings can change at any time without notice. Any application logic must use the information in the `details` field.
  *   `failed` (*type:* `GoogleApi.LifeSciences.V2beta.Model.FailedEvent.t`, *default:* `nil`) - See google.cloud.lifesciences.v2beta.FailedEvent.
  *   `pullStarted` (*type:* `GoogleApi.LifeSciences.V2beta.Model.PullStartedEvent.t`, *default:* `nil`) - See google.cloud.lifesciences.v2beta.PullStartedEvent.
  *   `pullStopped` (*type:* `GoogleApi.LifeSciences.V2beta.Model.PullStoppedEvent.t`, *default:* `nil`) - See google.cloud.lifesciences.v2beta.PullStoppedEvent.
  *   `timestamp` (*type:* `DateTime.t`, *default:* `nil`) - The time at which the event occurred.
  *   `unexpectedExitStatus` (*type:* `GoogleApi.LifeSciences.V2beta.Model.UnexpectedExitStatusEvent.t`, *default:* `nil`) - See google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent.
  *   `workerAssigned` (*type:* `GoogleApi.LifeSciences.V2beta.Model.WorkerAssignedEvent.t`, *default:* `nil`) - See google.cloud.lifesciences.v2beta.WorkerAssignedEvent.
  *   `workerReleased` (*type:* `GoogleApi.LifeSciences.V2beta.Model.WorkerReleasedEvent.t`, *default:* `nil`) - See google.cloud.lifesciences.v2beta.WorkerReleasedEvent.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :containerKilled => GoogleApi.LifeSciences.V2beta.Model.ContainerKilledEvent.t() | nil,
          :containerStarted =>
            GoogleApi.LifeSciences.V2beta.Model.ContainerStartedEvent.t() | nil,
          :containerStopped =>
            GoogleApi.LifeSciences.V2beta.Model.ContainerStoppedEvent.t() | nil,
          :delayed => GoogleApi.LifeSciences.V2beta.Model.DelayedEvent.t() | nil,
          :description => String.t() | nil,
          :failed => GoogleApi.LifeSciences.V2beta.Model.FailedEvent.t() | nil,
          :pullStarted => GoogleApi.LifeSciences.V2beta.Model.PullStartedEvent.t() | nil,
          :pullStopped => GoogleApi.LifeSciences.V2beta.Model.PullStoppedEvent.t() | nil,
          :timestamp => DateTime.t() | nil,
          :unexpectedExitStatus =>
            GoogleApi.LifeSciences.V2beta.Model.UnexpectedExitStatusEvent.t() | nil,
          :workerAssigned => GoogleApi.LifeSciences.V2beta.Model.WorkerAssignedEvent.t() | nil,
          :workerReleased => GoogleApi.LifeSciences.V2beta.Model.WorkerReleasedEvent.t() | nil
        }

  field(:containerKilled, as: GoogleApi.LifeSciences.V2beta.Model.ContainerKilledEvent)
  field(:containerStarted, as: GoogleApi.LifeSciences.V2beta.Model.ContainerStartedEvent)
  field(:containerStopped, as: GoogleApi.LifeSciences.V2beta.Model.ContainerStoppedEvent)
  field(:delayed, as: GoogleApi.LifeSciences.V2beta.Model.DelayedEvent)
  field(:description)
  field(:failed, as: GoogleApi.LifeSciences.V2beta.Model.FailedEvent)
  field(:pullStarted, as: GoogleApi.LifeSciences.V2beta.Model.PullStartedEvent)
  field(:pullStopped, as: GoogleApi.LifeSciences.V2beta.Model.PullStoppedEvent)
  field(:timestamp, as: DateTime)
  field(:unexpectedExitStatus, as: GoogleApi.LifeSciences.V2beta.Model.UnexpectedExitStatusEvent)
  field(:workerAssigned, as: GoogleApi.LifeSciences.V2beta.Model.WorkerAssignedEvent)
  field(:workerReleased, as: GoogleApi.LifeSciences.V2beta.Model.WorkerReleasedEvent)
end

defimpl Poison.Decoder, for: GoogleApi.LifeSciences.V2beta.Model.Event do
  def decode(value, options) do
    GoogleApi.LifeSciences.V2beta.Model.Event.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.LifeSciences.V2beta.Model.Event do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
