Packages

Reference spec for interacting with Foyer API services

Current section

Files

Jump to
foyer_api_sdk lib foyer_api model label.ex
Raw

lib/foyer_api/model/label.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 FoyerAPI.Model.Label do
@moduledoc """
"""
@derive [Poison.Encoder]
defstruct [
:id,
:mediaId,
:name,
:classId,
:confidence,
:rank,
:source,
:updatedAt,
:createdAt,
:Media
]
@type t :: %__MODULE__{
:id => integer() | nil,
:mediaId => integer() | nil,
:name => String.t | nil,
:classId => integer() | nil,
:confidence => float() | nil,
:rank => integer() | nil,
:source => String.t | nil,
:updatedAt => Date.t | nil,
:createdAt => Date.t | nil,
:Media => FoyerAPI.Model.Media.t | nil
}
end
defimpl Poison.Decoder, for: FoyerAPI.Model.Label do
import FoyerAPI.Deserializer
def decode(value, options) do
value
|> deserialize(:updatedAt, :date, nil, options)
|> deserialize(:createdAt, :date, nil, options)
|> deserialize(:Media, :struct, FoyerAPI.Model.Media, options)
end
end