lib/ory/model/rule.ex

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

  @derive Jason.Encoder
  defstruct [
    :authenticators,
    :authorizer,
    :description,
    :id,
    :match,
    :mutators,
    :upstream
  ]

  @type t :: %__MODULE__{
    :authenticators => [Ory.Model.RuleHandler.t] | nil,
    :authorizer => Ory.Model.RuleHandler.t | nil,
    :description => String.t | nil,
    :id => String.t | nil,
    :match => Ory.Model.RuleMatch.t | nil,
    :mutators => [Ory.Model.RuleHandler.t] | nil,
    :upstream => Ory.Model.Upstream.t | nil
  }

  alias Ory.Deserializer

  def decode(value) do
    value
     |> Deserializer.deserialize(:authenticators, :list, Ory.Model.RuleHandler)
     |> Deserializer.deserialize(:authorizer, :struct, Ory.Model.RuleHandler)
     |> Deserializer.deserialize(:match, :struct, Ory.Model.RuleMatch)
     |> Deserializer.deserialize(:mutators, :list, Ory.Model.RuleHandler)
     |> Deserializer.deserialize(:upstream, :struct, Ory.Model.Upstream)
  end
end