# 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.AppAccount do
  @moduledoc """
  
  """

  @derive Jason.Encoder
  defstruct [
    :account_type,
    :created_at,
    :email,
    :id,
    :org_ids,
    :permissions,
    :roles,
    :subject,
    :updated_at
  ]

  @type t :: %__MODULE__{
    :account_type => Nuon.Model.AppAccountType.t | nil,
    :created_at => String.t | nil,
    :email => String.t | nil,
    :id => String.t | nil,
    :org_ids => [String.t] | nil,
    :permissions => %{optional(String.t) => Nuon.Model.PermissionsPermission.t} | nil,
    :roles => [Nuon.Model.AppRole.t] | nil,
    :subject => String.t | nil,
    :updated_at => String.t | nil
  }

  alias Nuon.Deserializer

  def decode(value) do
    value
     |> Deserializer.deserialize(:account_type, :struct, Nuon.Model.AppAccountType)
     |> Deserializer.deserialize(:permissions, :map, Nuon.Model.PermissionsPermission)
     |> Deserializer.deserialize(:roles, :list, Nuon.Model.AppRole)
  end
end

