lib/nomad_client/model/stat_object.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.StatObject do
  @moduledoc """

  """

  @derive [Poison.Encoder]
  defstruct [
    :Nested,
    :Attributes
  ]

  @type t :: %__MODULE__{
          :Nested => %{optional(String.t()) => NomadClient.Model.StatObject.t()} | nil,
          :Attributes => %{optional(String.t()) => NomadClient.Model.StatValue.t()} | nil
        }
end

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

  def decode(value, options) do
    value
    |> deserialize(:Nested, :map, NomadClient.Model.StatObject, options)
    |> deserialize(:Attributes, :map, NomadClient.Model.StatValue, options)
  end
end