Current section

Files

Jump to
tallgrass src internal@pokemon@shape@shape.erl
Raw

src/internal@pokemon@shape@shape.erl

-module(internal@pokemon@shape@shape).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]).
-export([shape/0]).
-export_type([shape/0]).
-type shape() :: {shape,
integer(),
binary(),
list(internal@common@name:name()),
list(internal@common@name:name()),
list(internal@common@affordance:affordance())}.
-spec awesome_name() -> decode:decoder(internal@common@name:name()).
awesome_name() ->
_pipe = decode:into(
(decode:parameter(
fun(Name) ->
decode:parameter(fun(Language) -> {name, Name, Language} end)
end
))
),
_pipe@1 = decode:field(
_pipe,
<<"awesome_name"/utf8>>,
{decoder, fun gleam@dynamic:string/1}
),
decode:field(
_pipe@1,
<<"language"/utf8>>,
internal@common@affordance:affordance()
).
-spec shape() -> decode:decoder(shape()).
shape() ->
_pipe = decode:into(
(decode:parameter(
fun(Id) ->
decode:parameter(
fun(Name) ->
decode:parameter(
fun(Names) ->
decode:parameter(
fun(Awesome_names) ->
decode:parameter(
fun(Pokemon_species) ->
{shape,
Id,
Name,
Names,
Awesome_names,
Pokemon_species}
end
)
end
)
end
)
end
)
end
))
),
_pipe@1 = decode:field(
_pipe,
<<"id"/utf8>>,
{decoder, fun gleam@dynamic:int/1}
),
_pipe@2 = decode:field(
_pipe@1,
<<"name"/utf8>>,
{decoder, fun gleam@dynamic:string/1}
),
_pipe@3 = decode:field(
_pipe@2,
<<"names"/utf8>>,
decode:list(internal@common@name:name())
),
_pipe@4 = decode:field(
_pipe@3,
<<"awesome_names"/utf8>>,
decode:list(awesome_name())
),
decode:field(
_pipe@4,
<<"pokemon_species"/utf8>>,
decode:list(internal@common@affordance:affordance())
).