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

defmodule FXHistoricalRESTAPI.Model.V1Asset do
  @moduledoc """
  Represents an asset.
  """

  @derive JSON.Encoder
  defstruct [
    :asset_id,
    :name,
    :type_is_crypto,
    :data_quote_start,
    :data_quote_end,
    :data_orderbook_start,
    :data_orderbook_end,
    :data_trade_start,
    :data_trade_end,
    :data_symbols_count,
    :volume_1hrs_usd,
    :volume_1day_usd,
    :volume_1mth_usd,
    :price_usd,
    :id_icon,
    :supply_current,
    :supply_total,
    :supply_max,
    :chain_addresses,
    :data_start,
    :data_end
  ]

  @type t :: %__MODULE__{
    :asset_id => String.t | nil,
    :name => String.t | nil,
    :type_is_crypto => integer() | nil,
    :data_quote_start => DateTime.t | nil,
    :data_quote_end => DateTime.t | nil,
    :data_orderbook_start => DateTime.t | nil,
    :data_orderbook_end => DateTime.t | nil,
    :data_trade_start => DateTime.t | nil,
    :data_trade_end => DateTime.t | nil,
    :data_symbols_count => integer() | nil,
    :volume_1hrs_usd => float() | nil,
    :volume_1day_usd => float() | nil,
    :volume_1mth_usd => float() | nil,
    :price_usd => float() | nil,
    :id_icon => String.t | nil,
    :supply_current => float() | nil,
    :supply_total => float() | nil,
    :supply_max => float() | nil,
    :chain_addresses => [FXHistoricalRESTAPI.Model.V1ChainNetworkAddress.t] | nil,
    :data_start => String.t | nil,
    :data_end => String.t | nil
  }

  alias FXHistoricalRESTAPI.Deserializer

  def decode(value) do
    value
     |> Deserializer.deserialize(:chain_addresses, :list, FXHistoricalRESTAPI.Model.V1ChainNetworkAddress)
  end
end

