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

defmodule Ory.Model.CreateIdentityBody do
  @moduledoc """
  Create Identity Body
  """

  @derive Jason.Encoder
  defstruct [
    :credentials,
    :external_id,
    :metadata_admin,
    :metadata_public,
    :organization_id,
    :recovery_addresses,
    :schema_id,
    :state,
    :traits,
    :verifiable_addresses
  ]

  @type t :: %__MODULE__{
    :credentials => Ory.Model.IdentityWithCredentials.t | nil,
    :external_id => String.t | nil,
    :metadata_admin => any() | nil,
    :metadata_public => any() | nil,
    :organization_id => String.t | nil,
    :recovery_addresses => [Ory.Model.RecoveryIdentityAddress.t] | nil,
    :schema_id => String.t,
    :state => String.t | nil,
    :traits => map(),
    :verifiable_addresses => [Ory.Model.VerifiableIdentityAddress.t] | nil
  }

  alias Ory.Deserializer

  def decode(value) do
    value
     |> Deserializer.deserialize(:credentials, :struct, Ory.Model.IdentityWithCredentials)
     |> Deserializer.deserialize(:recovery_addresses, :list, Ory.Model.RecoveryIdentityAddress)
     |> Deserializer.deserialize(:verifiable_addresses, :list, Ory.Model.VerifiableIdentityAddress)
  end
end

