lib/nomad_client/model/task_diff.ex

# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://openapi-generator.tech
# Do not edit the class manually.

defmodule NomadClient.Model.TaskDiff do
  @moduledoc """

  """

  @derive [Poison.Encoder]
  defstruct [
    :Type,
    :Name,
    :Fields,
    :Objects,
    :Annotations
  ]

  @type t :: %__MODULE__{
          :Type => String.t() | nil,
          :Name => String.t() | nil,
          :Fields => [NomadClient.Model.FieldDiff.t()] | nil,
          :Objects => [NomadClient.Model.ObjectDiff.t()] | nil,
          :Annotations => [String.t()] | nil
        }
end

defimpl Poison.Decoder, for: NomadClient.Model.TaskDiff do
  import NomadClient.Deserializer

  def decode(value, options) do
    value
    |> deserialize(:Fields, :list, NomadClient.Model.FieldDiff, options)
    |> deserialize(:Objects, :list, NomadClient.Model.ObjectDiff, options)
  end
end