-
Notifications
You must be signed in to change notification settings - Fork 0
/
models_gen.go
238 lines (196 loc) · 5.36 KB
/
models_gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
package model
import (
"fmt"
"io"
"strconv"
)
type ChannelOfContact string
const (
ChannelOfContactApp ChannelOfContact = "APP"
ChannelOfContactShortcode ChannelOfContact = "SHORTCODE"
)
var AllChannelOfContact = []ChannelOfContact{
ChannelOfContactApp,
ChannelOfContactShortcode,
}
func (e ChannelOfContact) IsValid() bool {
switch e {
case ChannelOfContactApp, ChannelOfContactShortcode:
return true
}
return false
}
func (e ChannelOfContact) String() string {
return string(e)
}
func (e *ChannelOfContact) UnmarshalGQL(v interface{}) error {
str, ok := v.(string)
if !ok {
return fmt.Errorf("enums must be strings")
}
*e = ChannelOfContact(str)
if !e.IsValid() {
return fmt.Errorf("%s is not a valid ChannelOfContact", str)
}
return nil
}
func (e ChannelOfContact) MarshalGQL(w io.Writer) {
fmt.Fprint(w, strconv.Quote(e.String()))
}
type FilterOperatorType string
const (
FilterOperatorTypeEq FilterOperatorType = "EQ"
FilterOperatorTypeNeq FilterOperatorType = "NEQ"
FilterOperatorTypeLt FilterOperatorType = "LT"
FilterOperatorTypeLte FilterOperatorType = "LTE"
FilterOperatorTypeGt FilterOperatorType = "GT"
FilterOperatorTypeGte FilterOperatorType = "GTE"
FilterOperatorTypeHasProperty FilterOperatorType = "HAS_PROPERTY"
FilterOperatorTypeNotHasProperty FilterOperatorType = "NOT_HAS_PROPERTY"
FilterOperatorTypeContainsToken FilterOperatorType = "CONTAINS_TOKEN"
FilterOperatorTypeNotContainsToken FilterOperatorType = "NOT_CONTAINS_TOKEN"
)
var AllFilterOperatorType = []FilterOperatorType{
FilterOperatorTypeEq,
FilterOperatorTypeNeq,
FilterOperatorTypeLt,
FilterOperatorTypeLte,
FilterOperatorTypeGt,
FilterOperatorTypeGte,
FilterOperatorTypeHasProperty,
FilterOperatorTypeNotHasProperty,
FilterOperatorTypeContainsToken,
FilterOperatorTypeNotContainsToken,
}
func (e FilterOperatorType) IsValid() bool {
switch e {
case FilterOperatorTypeEq, FilterOperatorTypeNeq, FilterOperatorTypeLt, FilterOperatorTypeLte, FilterOperatorTypeGt, FilterOperatorTypeGte, FilterOperatorTypeHasProperty, FilterOperatorTypeNotHasProperty, FilterOperatorTypeContainsToken, FilterOperatorTypeNotContainsToken:
return true
}
return false
}
func (e FilterOperatorType) String() string {
return string(e)
}
func (e *FilterOperatorType) UnmarshalGQL(v interface{}) error {
str, ok := v.(string)
if !ok {
return fmt.Errorf("enums must be strings")
}
*e = FilterOperatorType(str)
if !e.IsValid() {
return fmt.Errorf("%s is not a valid FilterOperatorType", str)
}
return nil
}
func (e FilterOperatorType) MarshalGQL(w io.Writer) {
fmt.Fprint(w, strconv.Quote(e.String()))
}
type GeneralOptionType string
const (
GeneralOptionTypeYes GeneralOptionType = "YES"
GeneralOptionTypeNo GeneralOptionType = "NO"
GeneralOptionTypeNotGiven GeneralOptionType = "NOT_GIVEN"
)
var AllGeneralOptionType = []GeneralOptionType{
GeneralOptionTypeYes,
GeneralOptionTypeNo,
GeneralOptionTypeNotGiven,
}
func (e GeneralOptionType) IsValid() bool {
switch e {
case GeneralOptionTypeYes, GeneralOptionTypeNo, GeneralOptionTypeNotGiven:
return true
}
return false
}
func (e GeneralOptionType) String() string {
return string(e)
}
func (e *GeneralOptionType) UnmarshalGQL(v interface{}) error {
str, ok := v.(string)
if !ok {
return fmt.Errorf("enums must be strings")
}
*e = GeneralOptionType(str)
if !e.IsValid() {
return fmt.Errorf("%s is not a valid GeneralOptionType", str)
}
return nil
}
func (e GeneralOptionType) MarshalGQL(w io.Writer) {
fmt.Fprint(w, strconv.Quote(e.String()))
}
type SignUpMethod string
const (
SignUpMethodAnonymous SignUpMethod = "anonymous"
SignUpMethodApple SignUpMethod = "apple"
SignUpMethodFacebook SignUpMethod = "facebook"
SignUpMethodGoogle SignUpMethod = "google"
SignUpMethodPhone SignUpMethod = "phone"
)
var AllSignUpMethod = []SignUpMethod{
SignUpMethodAnonymous,
SignUpMethodApple,
SignUpMethodFacebook,
SignUpMethodGoogle,
SignUpMethodPhone,
}
func (e SignUpMethod) IsValid() bool {
switch e {
case SignUpMethodAnonymous, SignUpMethodApple, SignUpMethodFacebook, SignUpMethodGoogle, SignUpMethodPhone:
return true
}
return false
}
func (e SignUpMethod) String() string {
return string(e)
}
func (e *SignUpMethod) UnmarshalGQL(v interface{}) error {
str, ok := v.(string)
if !ok {
return fmt.Errorf("enums must be strings")
}
*e = SignUpMethod(str)
if !e.IsValid() {
return fmt.Errorf("%s is not a valid SignUpMethod", str)
}
return nil
}
func (e SignUpMethod) MarshalGQL(w io.Writer) {
fmt.Fprint(w, strconv.Quote(e.String()))
}
type SortType string
const (
SortTypeAscending SortType = "ASCENDING"
SortTypeDescending SortType = "DESCENDING"
)
var AllSortType = []SortType{
SortTypeAscending,
SortTypeDescending,
}
func (e SortType) IsValid() bool {
switch e {
case SortTypeAscending, SortTypeDescending:
return true
}
return false
}
func (e SortType) String() string {
return string(e)
}
func (e *SortType) UnmarshalGQL(v interface{}) error {
str, ok := v.(string)
if !ok {
return fmt.Errorf("enums must be strings")
}
*e = SortType(str)
if !e.IsValid() {
return fmt.Errorf("%s is not a valid SortType", str)
}
return nil
}
func (e SortType) MarshalGQL(w io.Writer) {
fmt.Fprint(w, strconv.Quote(e.String()))
}