Current section
Files
Jump to
Current section
Files
lib/ex_bifrost/model/create_routing_rule_request.ex
# NOTE: This file is auto generated by OpenAPI Generator 7.23.0 (https://openapi-generator.tech)
# using the Elixir SDK Generator template (https://github.com/houllette/elixir-sdk-generator).
# Do not edit this file manually — edit the templates and regenerate instead.
defmodule ExBifrost.Model.CreateRoutingRuleRequest do
@moduledoc """
Request to create a routing rule
"""
@derive JSON.Encoder
defstruct [
:name,
:description,
:enabled,
:cel_expression,
:targets,
:fallbacks,
:scope,
:scope_id,
:priority,
:query
]
@type t :: %__MODULE__{
:name => String.t(),
:description => String.t() | nil,
:enabled => boolean() | nil,
:cel_expression => String.t(),
:targets => [ExBifrost.Model.RoutingRuleTargetsInner.t()],
:fallbacks => [String.t()] | nil,
:scope => String.t(),
:scope_id => String.t() | nil,
:priority => integer(),
:query => map() | nil
}
alias ExBifrost.Deserializer
def decode(value) do
value
|> Deserializer.deserialize(:targets, :list, ExBifrost.Model.RoutingRuleTargetsInner)
end
end