# NOTE: This file is auto generated by OpenAPI Generator 7.9.0-SNAPSHOT (https://openapi-generator.tech).
# Do not edit this file manually.

defmodule Nuon.Model.AppRunnerJob do
  @moduledoc """
  
  """

  @derive Jason.Encoder
  defstruct [
    :available_timeout,
    :created_at,
    :created_by,
    :created_by_id,
    :execution_timeout,
    :executions,
    :group,
    :id,
    :max_executions,
    :operation,
    :org,
    :org_id,
    :overall_timeout,
    :owner_id,
    :owner_type,
    :queue_timeout,
    :runner_id,
    :status,
    :status_description,
    :type,
    :updated_at
  ]

  @type t :: %__MODULE__{
    :available_timeout => integer() | nil,
    :created_at => String.t | nil,
    :created_by => Nuon.Model.AppAccount.t | nil,
    :created_by_id => String.t | nil,
    :execution_timeout => integer() | nil,
    :executions => [Nuon.Model.AppRunnerJobExecution.t] | nil,
    :group => Nuon.Model.AppRunnerJobGroup.t | nil,
    :id => String.t | nil,
    :max_executions => integer() | nil,
    :operation => Nuon.Model.AppRunnerJobOperationType.t | nil,
    :org => Nuon.Model.AppOrg.t | nil,
    :org_id => String.t | nil,
    :overall_timeout => integer() | nil,
    :owner_id => String.t | nil,
    :owner_type => String.t | nil,
    :queue_timeout => integer() | nil,
    :runner_id => String.t | nil,
    :status => Nuon.Model.AppRunnerJobStatus.t | nil,
    :status_description => String.t | nil,
    :type => Nuon.Model.AppRunnerJobType.t | nil,
    :updated_at => String.t | nil
  }

  alias Nuon.Deserializer

  def decode(value) do
    value
     |> Deserializer.deserialize(:created_by, :struct, Nuon.Model.AppAccount)
     |> Deserializer.deserialize(:executions, :list, Nuon.Model.AppRunnerJobExecution)
     |> Deserializer.deserialize(:group, :struct, Nuon.Model.AppRunnerJobGroup)
     |> Deserializer.deserialize(:operation, :struct, Nuon.Model.AppRunnerJobOperationType)
     |> Deserializer.deserialize(:org, :struct, Nuon.Model.AppOrg)
     |> Deserializer.deserialize(:status, :struct, Nuon.Model.AppRunnerJobStatus)
     |> Deserializer.deserialize(:type, :struct, Nuon.Model.AppRunnerJobType)
  end
end

