1 |
|
-module(mongoose_graphql_enum). |
2 |
|
|
3 |
|
-export([input/2, output/2]). |
4 |
|
|
5 |
|
-ignore_xref([input/2, output/2]). |
6 |
|
|
7 |
|
input(<<"PresenceShow">>, Show) -> |
8 |
13 |
{ok, list_to_binary(string:to_lower(binary_to_list(Show)))}; |
9 |
|
input(<<"PresenceType">>, Type) -> |
10 |
16 |
{ok, list_to_binary(string:to_lower(binary_to_list(Type)))}; |
11 |
:-( |
input(<<"Affiliation">>, <<"OWNER">>) -> {ok, owner}; |
12 |
:-( |
input(<<"Affiliation">>, <<"MEMBER">>) -> {ok, member}; |
13 |
:-( |
input(<<"Affiliation">>, <<"NONE">>) -> {ok, none}; |
14 |
123 |
input(<<"AddressTags">>, Name) -> {ok, Name}; |
15 |
6 |
input(<<"BlockingAction">>, <<"ALLOW">>) -> {ok, allow}; |
16 |
10 |
input(<<"BlockingAction">>, <<"DENY">>) -> {ok, deny}; |
17 |
15 |
input(<<"BlockedEntityType">>, <<"USER">>) -> {ok, user}; |
18 |
1 |
input(<<"BlockedEntityType">>, <<"ROOM">>) -> {ok, room}; |
19 |
39 |
input(<<"EmailTags">>, Name) -> {ok, Name}; |
20 |
8 |
input(<<"SubAction">>, <<"INVITE">>) -> {ok, invite}; |
21 |
3 |
input(<<"SubAction">>, <<"ACCEPT">>) -> {ok, accept}; |
22 |
3 |
input(<<"SubAction">>, <<"DECLINE">>) -> {ok, decline}; |
23 |
3 |
input(<<"SubAction">>, <<"CANCEL">>) -> {ok, cancel}; |
24 |
7 |
input(<<"MutualSubAction">>, <<"CONNECT">>) -> {ok, connect}; |
25 |
7 |
input(<<"MutualSubAction">>, <<"DISCONNECT">>) -> {ok, disconnect}; |
26 |
11 |
input(<<"MUCRole">>, <<"VISITOR">>) -> {ok, visitor}; |
27 |
6 |
input(<<"MUCRole">>, <<"PARTICIPANT">>) -> {ok, participant}; |
28 |
12 |
input(<<"MUCRole">>, <<"MODERATOR">>) -> {ok, moderator}; |
29 |
7 |
input(<<"MUCAffiliation">>, <<"NONE">>) -> {ok, none}; |
30 |
21 |
input(<<"MUCAffiliation">>, <<"MEMBER">>) -> {ok, member}; |
31 |
6 |
input(<<"MUCAffiliation">>, <<"OUTCAST">>) -> {ok, outcast}; |
32 |
11 |
input(<<"MUCAffiliation">>, <<"ADMIN">>) -> {ok, admin}; |
33 |
11 |
input(<<"MUCAffiliation">>, <<"OWNER">>) -> {ok, owner}; |
34 |
39 |
input(<<"PrivacyClassificationTags">>, Name) -> {ok, Name}; |
35 |
52 |
input(<<"TelephoneTags">>, Name) -> {ok, Name}; |
36 |
20 |
input(<<"LogLevel">>, Name) -> {ok, list_to_atom(string:to_lower(binary_to_list(Name)))}; |
37 |
:-( |
input(<<"MetricType">>, Name) -> {ok, Name}. |
38 |
|
|
39 |
|
output(<<"DomainStatus">>, Type) -> |
40 |
11 |
{ok, list_to_binary(string:to_upper(atom_to_list(Type)))}; |
41 |
|
output(<<"PresenceShow">>, Show) -> |
42 |
:-( |
{ok, list_to_binary(string:to_upper(binary_to_list(Show)))}; |
43 |
|
output(<<"PresenceType">>, Type) -> |
44 |
:-( |
{ok, list_to_binary(string:to_upper(binary_to_list(Type)))}; |
45 |
|
output(<<"AuthStatus">>, Status) -> |
46 |
9 |
{ok, atom_to_binary(Status, utf8)}; |
47 |
|
output(<<"AuthType">>, Type) -> |
48 |
2 |
{ok, list_to_binary(string:to_upper(atom_to_list(Type)))}; |
49 |
|
output(<<"Affiliation">>, Aff) -> |
50 |
35 |
{ok, list_to_binary(string:to_upper(atom_to_list(Aff)))}; |
51 |
|
output(<<"BlockingAction">>, Action) -> |
52 |
7 |
{ok, list_to_binary(string:to_upper(atom_to_list(Action)))}; |
53 |
|
output(<<"BlockedEntityType">>, What) -> |
54 |
7 |
{ok, list_to_binary(string:to_upper(atom_to_list(What)))}; |
55 |
|
output(<<"ContactSub">>, Type) when Type =:= both; |
56 |
|
Type =:= from; |
57 |
|
Type =:= to; |
58 |
|
Type =:= none -> |
59 |
8 |
{ok, list_to_binary(string:to_upper(atom_to_list(Type)))}; |
60 |
|
output(<<"ContactAsk">>, Type) when Type =:= subscrube; |
61 |
|
Type =:= unsubscribe; |
62 |
|
Type =:= in; |
63 |
|
Type =:= out; |
64 |
|
Type =:= both; |
65 |
|
Type =:= none -> |
66 |
8 |
{ok, list_to_binary(string:to_upper(atom_to_list(Type)))}; |
67 |
|
output(<<"MUCRole">>, Role) -> |
68 |
10 |
{ok, list_to_binary(string:to_upper(atom_to_list(Role)))}; |
69 |
|
output(<<"MUCAffiliation">>, Aff) -> |
70 |
16 |
{ok, list_to_binary(string:to_upper(atom_to_list(Aff)))}; |
71 |
90 |
output(<<"AddressTags">>, Name) -> {ok, Name}; |
72 |
30 |
output(<<"EmailTags">>, Name) -> {ok, Name}; |
73 |
24 |
output(<<"PrivacyClassificationTags">>, Name) -> {ok, Name}; |
74 |
20 |
output(<<"LogLevel">>, Name) -> {ok, list_to_binary(string:to_upper(atom_to_list(Name)))}; |
75 |
32 |
output(<<"TelephoneTags">>, Name) -> {ok, Name}; |
76 |
3140 |
output(<<"MetricType">>, Type) -> {ok, Type}; |
77 |
2 |
output(<<"StatusCode">>, Code) -> {ok, Code}. |