1// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
2
3package protocol
4
5import (
6 json "encoding/json"
7 easyjson "github.com/mailru/easyjson"
8 jlexer "github.com/mailru/easyjson/jlexer"
9 jwriter "github.com/mailru/easyjson/jwriter"
10 game "github.com/zikaeroh/codies/internal/game"
11)
12
13// suppress unused package warning
14var (
15 _ *json.RawMessage
16 _ *jlexer.Lexer
17 _ *jwriter.Writer
18 _ easyjson.Marshaler
19)
20
21func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol(in *jlexer.Lexer, out *TimeResponse) {
22 isTopLevel := in.IsStart()
23 if in.IsNull() {
24 if isTopLevel {
25 in.Consumed()
26 }
27 in.Skip()
28 return
29 }
30 in.Delim('{')
31 for !in.IsDelim('}') {
32 key := in.UnsafeString()
33 in.WantColon()
34 if in.IsNull() {
35 in.Skip()
36 in.WantComma()
37 continue
38 }
39 switch key {
40 case "time":
41 if data := in.Raw(); in.Ok() {
42 in.AddError((out.Time).UnmarshalJSON(data))
43 }
44 default:
45 in.AddError(&jlexer.LexerError{
46 Offset: in.GetPos(),
47 Reason: "unknown field",
48 Data: key,
49 })
50 }
51 in.WantComma()
52 }
53 in.Delim('}')
54 if isTopLevel {
55 in.Consumed()
56 }
57}
58func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol(out *jwriter.Writer, in TimeResponse) {
59 out.RawByte('{')
60 first := true
61 _ = first
62 {
63 const prefix string = ",\"time\":"
64 out.RawString(prefix[1:])
65 out.Raw((in.Time).MarshalJSON())
66 }
67 out.RawByte('}')
68}
69
70// MarshalJSON supports json.Marshaler interface
71func (v TimeResponse) MarshalJSON() ([]byte, error) {
72 w := jwriter.Writer{}
73 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol(&w, v)
74 return w.Buffer.BuildBytes(), w.Error
75}
76
77// MarshalEasyJSON supports easyjson.Marshaler interface
78func (v TimeResponse) MarshalEasyJSON(w *jwriter.Writer) {
79 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol(w, v)
80}
81
82// UnmarshalJSON supports json.Unmarshaler interface
83func (v *TimeResponse) UnmarshalJSON(data []byte) error {
84 r := jlexer.Lexer{Data: data}
85 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol(&r, v)
86 return r.Error()
87}
88
89// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
90func (v *TimeResponse) UnmarshalEasyJSON(l *jlexer.Lexer) {
91 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol(l, v)
92}
93func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol1(in *jlexer.Lexer, out *StatsResponse) {
94 isTopLevel := in.IsStart()
95 if in.IsNull() {
96 if isTopLevel {
97 in.Consumed()
98 }
99 in.Skip()
100 return
101 }
102 in.Delim('{')
103 for !in.IsDelim('}') {
104 key := in.UnsafeString()
105 in.WantColon()
106 if in.IsNull() {
107 in.Skip()
108 in.WantComma()
109 continue
110 }
111 switch key {
112 case "rooms":
113 out.Rooms = int(in.Int())
114 case "clients":
115 out.Clients = int(in.Int())
116 default:
117 in.AddError(&jlexer.LexerError{
118 Offset: in.GetPos(),
119 Reason: "unknown field",
120 Data: key,
121 })
122 }
123 in.WantComma()
124 }
125 in.Delim('}')
126 if isTopLevel {
127 in.Consumed()
128 }
129}
130func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol1(out *jwriter.Writer, in StatsResponse) {
131 out.RawByte('{')
132 first := true
133 _ = first
134 {
135 const prefix string = ",\"rooms\":"
136 out.RawString(prefix[1:])
137 out.Int(int(in.Rooms))
138 }
139 {
140 const prefix string = ",\"clients\":"
141 out.RawString(prefix)
142 out.Int(int(in.Clients))
143 }
144 out.RawByte('}')
145}
146
147// MarshalJSON supports json.Marshaler interface
148func (v StatsResponse) MarshalJSON() ([]byte, error) {
149 w := jwriter.Writer{}
150 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol1(&w, v)
151 return w.Buffer.BuildBytes(), w.Error
152}
153
154// MarshalEasyJSON supports easyjson.Marshaler interface
155func (v StatsResponse) MarshalEasyJSON(w *jwriter.Writer) {
156 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol1(w, v)
157}
158
159// UnmarshalJSON supports json.Unmarshaler interface
160func (v *StatsResponse) UnmarshalJSON(data []byte) error {
161 r := jlexer.Lexer{Data: data}
162 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol1(&r, v)
163 return r.Error()
164}
165
166// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
167func (v *StatsResponse) UnmarshalEasyJSON(l *jlexer.Lexer) {
168 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol1(l, v)
169}
170func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol2(in *jlexer.Lexer, out *StateWordList) {
171 isTopLevel := in.IsStart()
172 if in.IsNull() {
173 if isTopLevel {
174 in.Consumed()
175 }
176 in.Skip()
177 return
178 }
179 in.Delim('{')
180 for !in.IsDelim('}') {
181 key := in.UnsafeString()
182 in.WantColon()
183 if in.IsNull() {
184 in.Skip()
185 in.WantComma()
186 continue
187 }
188 switch key {
189 case "name":
190 out.Name = string(in.String())
191 case "count":
192 out.Count = int(in.Int())
193 case "custom":
194 out.Custom = bool(in.Bool())
195 case "enabled":
196 out.Enabled = bool(in.Bool())
197 default:
198 in.AddError(&jlexer.LexerError{
199 Offset: in.GetPos(),
200 Reason: "unknown field",
201 Data: key,
202 })
203 }
204 in.WantComma()
205 }
206 in.Delim('}')
207 if isTopLevel {
208 in.Consumed()
209 }
210}
211func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol2(out *jwriter.Writer, in StateWordList) {
212 out.RawByte('{')
213 first := true
214 _ = first
215 {
216 const prefix string = ",\"name\":"
217 out.RawString(prefix[1:])
218 out.String(string(in.Name))
219 }
220 {
221 const prefix string = ",\"count\":"
222 out.RawString(prefix)
223 out.Int(int(in.Count))
224 }
225 {
226 const prefix string = ",\"custom\":"
227 out.RawString(prefix)
228 out.Bool(bool(in.Custom))
229 }
230 {
231 const prefix string = ",\"enabled\":"
232 out.RawString(prefix)
233 out.Bool(bool(in.Enabled))
234 }
235 out.RawByte('}')
236}
237
238// MarshalJSON supports json.Marshaler interface
239func (v StateWordList) MarshalJSON() ([]byte, error) {
240 w := jwriter.Writer{}
241 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol2(&w, v)
242 return w.Buffer.BuildBytes(), w.Error
243}
244
245// MarshalEasyJSON supports easyjson.Marshaler interface
246func (v StateWordList) MarshalEasyJSON(w *jwriter.Writer) {
247 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol2(w, v)
248}
249
250// UnmarshalJSON supports json.Unmarshaler interface
251func (v *StateWordList) UnmarshalJSON(data []byte) error {
252 r := jlexer.Lexer{Data: data}
253 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol2(&r, v)
254 return r.Error()
255}
256
257// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
258func (v *StateWordList) UnmarshalEasyJSON(l *jlexer.Lexer) {
259 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol2(l, v)
260}
261func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol3(in *jlexer.Lexer, out *StateView) {
262 isTopLevel := in.IsStart()
263 if in.IsNull() {
264 if isTopLevel {
265 in.Consumed()
266 }
267 in.Skip()
268 return
269 }
270 in.Delim('{')
271 for !in.IsDelim('}') {
272 key := in.UnsafeString()
273 in.WantColon()
274 if in.IsNull() {
275 in.Skip()
276 in.WantComma()
277 continue
278 }
279 switch key {
280 case "team":
281 out.Team = game.Team(in.Int())
282 case "neutral":
283 out.Neutral = bool(in.Bool())
284 case "bomb":
285 out.Bomb = bool(in.Bool())
286 default:
287 in.AddError(&jlexer.LexerError{
288 Offset: in.GetPos(),
289 Reason: "unknown field",
290 Data: key,
291 })
292 }
293 in.WantComma()
294 }
295 in.Delim('}')
296 if isTopLevel {
297 in.Consumed()
298 }
299}
300func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol3(out *jwriter.Writer, in StateView) {
301 out.RawByte('{')
302 first := true
303 _ = first
304 {
305 const prefix string = ",\"team\":"
306 out.RawString(prefix[1:])
307 out.Int(int(in.Team))
308 }
309 {
310 const prefix string = ",\"neutral\":"
311 out.RawString(prefix)
312 out.Bool(bool(in.Neutral))
313 }
314 {
315 const prefix string = ",\"bomb\":"
316 out.RawString(prefix)
317 out.Bool(bool(in.Bomb))
318 }
319 out.RawByte('}')
320}
321
322// MarshalJSON supports json.Marshaler interface
323func (v StateView) MarshalJSON() ([]byte, error) {
324 w := jwriter.Writer{}
325 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol3(&w, v)
326 return w.Buffer.BuildBytes(), w.Error
327}
328
329// MarshalEasyJSON supports easyjson.Marshaler interface
330func (v StateView) MarshalEasyJSON(w *jwriter.Writer) {
331 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol3(w, v)
332}
333
334// UnmarshalJSON supports json.Unmarshaler interface
335func (v *StateView) UnmarshalJSON(data []byte) error {
336 r := jlexer.Lexer{Data: data}
337 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol3(&r, v)
338 return r.Error()
339}
340
341// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
342func (v *StateView) UnmarshalEasyJSON(l *jlexer.Lexer) {
343 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol3(l, v)
344}
345func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol4(in *jlexer.Lexer, out *StateTimer) {
346 isTopLevel := in.IsStart()
347 if in.IsNull() {
348 if isTopLevel {
349 in.Consumed()
350 }
351 in.Skip()
352 return
353 }
354 in.Delim('{')
355 for !in.IsDelim('}') {
356 key := in.UnsafeString()
357 in.WantColon()
358 if in.IsNull() {
359 in.Skip()
360 in.WantComma()
361 continue
362 }
363 switch key {
364 case "turnTime":
365 out.TurnTime = int(in.Int())
366 case "turnEnd":
367 if data := in.Raw(); in.Ok() {
368 in.AddError((out.TurnEnd).UnmarshalJSON(data))
369 }
370 default:
371 in.AddError(&jlexer.LexerError{
372 Offset: in.GetPos(),
373 Reason: "unknown field",
374 Data: key,
375 })
376 }
377 in.WantComma()
378 }
379 in.Delim('}')
380 if isTopLevel {
381 in.Consumed()
382 }
383}
384func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol4(out *jwriter.Writer, in StateTimer) {
385 out.RawByte('{')
386 first := true
387 _ = first
388 {
389 const prefix string = ",\"turnTime\":"
390 out.RawString(prefix[1:])
391 out.Int(int(in.TurnTime))
392 }
393 {
394 const prefix string = ",\"turnEnd\":"
395 out.RawString(prefix)
396 out.Raw((in.TurnEnd).MarshalJSON())
397 }
398 out.RawByte('}')
399}
400
401// MarshalJSON supports json.Marshaler interface
402func (v StateTimer) MarshalJSON() ([]byte, error) {
403 w := jwriter.Writer{}
404 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol4(&w, v)
405 return w.Buffer.BuildBytes(), w.Error
406}
407
408// MarshalEasyJSON supports easyjson.Marshaler interface
409func (v StateTimer) MarshalEasyJSON(w *jwriter.Writer) {
410 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol4(w, v)
411}
412
413// UnmarshalJSON supports json.Unmarshaler interface
414func (v *StateTimer) UnmarshalJSON(data []byte) error {
415 r := jlexer.Lexer{Data: data}
416 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol4(&r, v)
417 return r.Error()
418}
419
420// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
421func (v *StateTimer) UnmarshalEasyJSON(l *jlexer.Lexer) {
422 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol4(l, v)
423}
424func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol5(in *jlexer.Lexer, out *StateTile) {
425 isTopLevel := in.IsStart()
426 if in.IsNull() {
427 if isTopLevel {
428 in.Consumed()
429 }
430 in.Skip()
431 return
432 }
433 in.Delim('{')
434 for !in.IsDelim('}') {
435 key := in.UnsafeString()
436 in.WantColon()
437 if in.IsNull() {
438 in.Skip()
439 in.WantComma()
440 continue
441 }
442 switch key {
443 case "word":
444 out.Word = string(in.String())
445 case "revealed":
446 out.Revealed = bool(in.Bool())
447 case "view":
448 if in.IsNull() {
449 in.Skip()
450 out.View = nil
451 } else {
452 if out.View == nil {
453 out.View = new(StateView)
454 }
455 (*out.View).UnmarshalEasyJSON(in)
456 }
457 default:
458 in.AddError(&jlexer.LexerError{
459 Offset: in.GetPos(),
460 Reason: "unknown field",
461 Data: key,
462 })
463 }
464 in.WantComma()
465 }
466 in.Delim('}')
467 if isTopLevel {
468 in.Consumed()
469 }
470}
471func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol5(out *jwriter.Writer, in StateTile) {
472 out.RawByte('{')
473 first := true
474 _ = first
475 {
476 const prefix string = ",\"word\":"
477 out.RawString(prefix[1:])
478 out.String(string(in.Word))
479 }
480 {
481 const prefix string = ",\"revealed\":"
482 out.RawString(prefix)
483 out.Bool(bool(in.Revealed))
484 }
485 {
486 const prefix string = ",\"view\":"
487 out.RawString(prefix)
488 if in.View == nil {
489 out.RawString("null")
490 } else {
491 (*in.View).MarshalEasyJSON(out)
492 }
493 }
494 out.RawByte('}')
495}
496
497// MarshalJSON supports json.Marshaler interface
498func (v StateTile) MarshalJSON() ([]byte, error) {
499 w := jwriter.Writer{}
500 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol5(&w, v)
501 return w.Buffer.BuildBytes(), w.Error
502}
503
504// MarshalEasyJSON supports easyjson.Marshaler interface
505func (v StateTile) MarshalEasyJSON(w *jwriter.Writer) {
506 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol5(w, v)
507}
508
509// UnmarshalJSON supports json.Unmarshaler interface
510func (v *StateTile) UnmarshalJSON(data []byte) error {
511 r := jlexer.Lexer{Data: data}
512 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol5(&r, v)
513 return r.Error()
514}
515
516// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
517func (v *StateTile) UnmarshalEasyJSON(l *jlexer.Lexer) {
518 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol5(l, v)
519}
520func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol6(in *jlexer.Lexer, out *StatePlayer) {
521 isTopLevel := in.IsStart()
522 if in.IsNull() {
523 if isTopLevel {
524 in.Consumed()
525 }
526 in.Skip()
527 return
528 }
529 in.Delim('{')
530 for !in.IsDelim('}') {
531 key := in.UnsafeString()
532 in.WantColon()
533 if in.IsNull() {
534 in.Skip()
535 in.WantComma()
536 continue
537 }
538 switch key {
539 case "playerID":
540 out.PlayerID = string(in.String())
541 case "nickname":
542 out.Nickname = string(in.String())
543 case "spymaster":
544 out.Spymaster = bool(in.Bool())
545 default:
546 in.AddError(&jlexer.LexerError{
547 Offset: in.GetPos(),
548 Reason: "unknown field",
549 Data: key,
550 })
551 }
552 in.WantComma()
553 }
554 in.Delim('}')
555 if isTopLevel {
556 in.Consumed()
557 }
558}
559func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol6(out *jwriter.Writer, in StatePlayer) {
560 out.RawByte('{')
561 first := true
562 _ = first
563 {
564 const prefix string = ",\"playerID\":"
565 out.RawString(prefix[1:])
566 out.String(string(in.PlayerID))
567 }
568 {
569 const prefix string = ",\"nickname\":"
570 out.RawString(prefix)
571 out.String(string(in.Nickname))
572 }
573 {
574 const prefix string = ",\"spymaster\":"
575 out.RawString(prefix)
576 out.Bool(bool(in.Spymaster))
577 }
578 out.RawByte('}')
579}
580
581// MarshalJSON supports json.Marshaler interface
582func (v StatePlayer) MarshalJSON() ([]byte, error) {
583 w := jwriter.Writer{}
584 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol6(&w, v)
585 return w.Buffer.BuildBytes(), w.Error
586}
587
588// MarshalEasyJSON supports easyjson.Marshaler interface
589func (v StatePlayer) MarshalEasyJSON(w *jwriter.Writer) {
590 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol6(w, v)
591}
592
593// UnmarshalJSON supports json.Unmarshaler interface
594func (v *StatePlayer) UnmarshalJSON(data []byte) error {
595 r := jlexer.Lexer{Data: data}
596 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol6(&r, v)
597 return r.Error()
598}
599
600// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
601func (v *StatePlayer) UnmarshalEasyJSON(l *jlexer.Lexer) {
602 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol6(l, v)
603}
604func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol7(in *jlexer.Lexer, out *State) {
605 isTopLevel := in.IsStart()
606 if in.IsNull() {
607 if isTopLevel {
608 in.Consumed()
609 }
610 in.Skip()
611 return
612 }
613 in.Delim('{')
614 for !in.IsDelim('}') {
615 key := in.UnsafeString()
616 in.WantColon()
617 if in.IsNull() {
618 in.Skip()
619 in.WantComma()
620 continue
621 }
622 switch key {
623 case "playerID":
624 out.PlayerID = string(in.String())
625 case "roomState":
626 if in.IsNull() {
627 in.Skip()
628 out.RoomState = nil
629 } else {
630 if out.RoomState == nil {
631 out.RoomState = new(RoomState)
632 }
633 (*out.RoomState).UnmarshalEasyJSON(in)
634 }
635 default:
636 in.AddError(&jlexer.LexerError{
637 Offset: in.GetPos(),
638 Reason: "unknown field",
639 Data: key,
640 })
641 }
642 in.WantComma()
643 }
644 in.Delim('}')
645 if isTopLevel {
646 in.Consumed()
647 }
648}
649func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol7(out *jwriter.Writer, in State) {
650 out.RawByte('{')
651 first := true
652 _ = first
653 {
654 const prefix string = ",\"playerID\":"
655 out.RawString(prefix[1:])
656 out.String(string(in.PlayerID))
657 }
658 {
659 const prefix string = ",\"roomState\":"
660 out.RawString(prefix)
661 if in.RoomState == nil {
662 out.RawString("null")
663 } else {
664 (*in.RoomState).MarshalEasyJSON(out)
665 }
666 }
667 out.RawByte('}')
668}
669
670// MarshalJSON supports json.Marshaler interface
671func (v State) MarshalJSON() ([]byte, error) {
672 w := jwriter.Writer{}
673 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol7(&w, v)
674 return w.Buffer.BuildBytes(), w.Error
675}
676
677// MarshalEasyJSON supports easyjson.Marshaler interface
678func (v State) MarshalEasyJSON(w *jwriter.Writer) {
679 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol7(w, v)
680}
681
682// UnmarshalJSON supports json.Unmarshaler interface
683func (v *State) UnmarshalJSON(data []byte) error {
684 r := jlexer.Lexer{Data: data}
685 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol7(&r, v)
686 return r.Error()
687}
688
689// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
690func (v *State) UnmarshalEasyJSON(l *jlexer.Lexer) {
691 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol7(l, v)
692}
693func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol8(in *jlexer.Lexer, out *ServerNote) {
694 isTopLevel := in.IsStart()
695 if in.IsNull() {
696 if isTopLevel {
697 in.Consumed()
698 }
699 in.Skip()
700 return
701 }
702 in.Delim('{')
703 for !in.IsDelim('}') {
704 key := in.UnsafeString()
705 in.WantColon()
706 if in.IsNull() {
707 in.Skip()
708 in.WantComma()
709 continue
710 }
711 switch key {
712 case "method":
713 out.Method = ServerMethod(in.String())
714 case "params":
715 if m, ok := out.Params.(easyjson.Unmarshaler); ok {
716 m.UnmarshalEasyJSON(in)
717 } else if m, ok := out.Params.(json.Unmarshaler); ok {
718 _ = m.UnmarshalJSON(in.Raw())
719 } else {
720 out.Params = in.Interface()
721 }
722 default:
723 in.AddError(&jlexer.LexerError{
724 Offset: in.GetPos(),
725 Reason: "unknown field",
726 Data: key,
727 })
728 }
729 in.WantComma()
730 }
731 in.Delim('}')
732 if isTopLevel {
733 in.Consumed()
734 }
735}
736func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol8(out *jwriter.Writer, in ServerNote) {
737 out.RawByte('{')
738 first := true
739 _ = first
740 {
741 const prefix string = ",\"method\":"
742 out.RawString(prefix[1:])
743 out.String(string(in.Method))
744 }
745 {
746 const prefix string = ",\"params\":"
747 out.RawString(prefix)
748 if m, ok := in.Params.(easyjson.Marshaler); ok {
749 m.MarshalEasyJSON(out)
750 } else if m, ok := in.Params.(json.Marshaler); ok {
751 out.Raw(m.MarshalJSON())
752 } else {
753 out.Raw(json.Marshal(in.Params))
754 }
755 }
756 out.RawByte('}')
757}
758
759// MarshalJSON supports json.Marshaler interface
760func (v ServerNote) MarshalJSON() ([]byte, error) {
761 w := jwriter.Writer{}
762 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol8(&w, v)
763 return w.Buffer.BuildBytes(), w.Error
764}
765
766// MarshalEasyJSON supports easyjson.Marshaler interface
767func (v ServerNote) MarshalEasyJSON(w *jwriter.Writer) {
768 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol8(w, v)
769}
770
771// UnmarshalJSON supports json.Unmarshaler interface
772func (v *ServerNote) UnmarshalJSON(data []byte) error {
773 r := jlexer.Lexer{Data: data}
774 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol8(&r, v)
775 return r.Error()
776}
777
778// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
779func (v *ServerNote) UnmarshalEasyJSON(l *jlexer.Lexer) {
780 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol8(l, v)
781}
782func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol9(in *jlexer.Lexer, out *RoomState) {
783 isTopLevel := in.IsStart()
784 if in.IsNull() {
785 if isTopLevel {
786 in.Consumed()
787 }
788 in.Skip()
789 return
790 }
791 in.Delim('{')
792 for !in.IsDelim('}') {
793 key := in.UnsafeString()
794 in.WantColon()
795 if in.IsNull() {
796 in.Skip()
797 in.WantComma()
798 continue
799 }
800 switch key {
801 case "version":
802 out.Version = int(in.Int())
803 case "teams":
804 if in.IsNull() {
805 in.Skip()
806 out.Teams = nil
807 } else {
808 in.Delim('[')
809 if out.Teams == nil {
810 if !in.IsDelim(']') {
811 out.Teams = make([][]*StatePlayer, 0, 2)
812 } else {
813 out.Teams = [][]*StatePlayer{}
814 }
815 } else {
816 out.Teams = (out.Teams)[:0]
817 }
818 for !in.IsDelim(']') {
819 var v1 []*StatePlayer
820 if in.IsNull() {
821 in.Skip()
822 v1 = nil
823 } else {
824 in.Delim('[')
825 if v1 == nil {
826 if !in.IsDelim(']') {
827 v1 = make([]*StatePlayer, 0, 8)
828 } else {
829 v1 = []*StatePlayer{}
830 }
831 } else {
832 v1 = (v1)[:0]
833 }
834 for !in.IsDelim(']') {
835 var v2 *StatePlayer
836 if in.IsNull() {
837 in.Skip()
838 v2 = nil
839 } else {
840 if v2 == nil {
841 v2 = new(StatePlayer)
842 }
843 (*v2).UnmarshalEasyJSON(in)
844 }
845 v1 = append(v1, v2)
846 in.WantComma()
847 }
848 in.Delim(']')
849 }
850 out.Teams = append(out.Teams, v1)
851 in.WantComma()
852 }
853 in.Delim(']')
854 }
855 case "turn":
856 out.Turn = game.Team(in.Int())
857 case "winner":
858 if in.IsNull() {
859 in.Skip()
860 out.Winner = nil
861 } else {
862 if out.Winner == nil {
863 out.Winner = new(game.Team)
864 }
865 *out.Winner = game.Team(in.Int())
866 }
867 case "board":
868 if in.IsNull() {
869 in.Skip()
870 out.Board = nil
871 } else {
872 in.Delim('[')
873 if out.Board == nil {
874 if !in.IsDelim(']') {
875 out.Board = make([][]*StateTile, 0, 2)
876 } else {
877 out.Board = [][]*StateTile{}
878 }
879 } else {
880 out.Board = (out.Board)[:0]
881 }
882 for !in.IsDelim(']') {
883 var v3 []*StateTile
884 if in.IsNull() {
885 in.Skip()
886 v3 = nil
887 } else {
888 in.Delim('[')
889 if v3 == nil {
890 if !in.IsDelim(']') {
891 v3 = make([]*StateTile, 0, 8)
892 } else {
893 v3 = []*StateTile{}
894 }
895 } else {
896 v3 = (v3)[:0]
897 }
898 for !in.IsDelim(']') {
899 var v4 *StateTile
900 if in.IsNull() {
901 in.Skip()
902 v4 = nil
903 } else {
904 if v4 == nil {
905 v4 = new(StateTile)
906 }
907 (*v4).UnmarshalEasyJSON(in)
908 }
909 v3 = append(v3, v4)
910 in.WantComma()
911 }
912 in.Delim(']')
913 }
914 out.Board = append(out.Board, v3)
915 in.WantComma()
916 }
917 in.Delim(']')
918 }
919 case "wordsLeft":
920 if in.IsNull() {
921 in.Skip()
922 out.WordsLeft = nil
923 } else {
924 in.Delim('[')
925 if out.WordsLeft == nil {
926 if !in.IsDelim(']') {
927 out.WordsLeft = make([]int, 0, 8)
928 } else {
929 out.WordsLeft = []int{}
930 }
931 } else {
932 out.WordsLeft = (out.WordsLeft)[:0]
933 }
934 for !in.IsDelim(']') {
935 var v5 int
936 v5 = int(in.Int())
937 out.WordsLeft = append(out.WordsLeft, v5)
938 in.WantComma()
939 }
940 in.Delim(']')
941 }
942 case "lists":
943 if in.IsNull() {
944 in.Skip()
945 out.Lists = nil
946 } else {
947 in.Delim('[')
948 if out.Lists == nil {
949 if !in.IsDelim(']') {
950 out.Lists = make([]*StateWordList, 0, 8)
951 } else {
952 out.Lists = []*StateWordList{}
953 }
954 } else {
955 out.Lists = (out.Lists)[:0]
956 }
957 for !in.IsDelim(']') {
958 var v6 *StateWordList
959 if in.IsNull() {
960 in.Skip()
961 v6 = nil
962 } else {
963 if v6 == nil {
964 v6 = new(StateWordList)
965 }
966 (*v6).UnmarshalEasyJSON(in)
967 }
968 out.Lists = append(out.Lists, v6)
969 in.WantComma()
970 }
971 in.Delim(']')
972 }
973 case "timer":
974 if in.IsNull() {
975 in.Skip()
976 out.Timer = nil
977 } else {
978 if out.Timer == nil {
979 out.Timer = new(StateTimer)
980 }
981 (*out.Timer).UnmarshalEasyJSON(in)
982 }
983 case "hideBomb":
984 out.HideBomb = bool(in.Bool())
985 default:
986 in.AddError(&jlexer.LexerError{
987 Offset: in.GetPos(),
988 Reason: "unknown field",
989 Data: key,
990 })
991 }
992 in.WantComma()
993 }
994 in.Delim('}')
995 if isTopLevel {
996 in.Consumed()
997 }
998}
999func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol9(out *jwriter.Writer, in RoomState) {
1000 out.RawByte('{')
1001 first := true
1002 _ = first
1003 {
1004 const prefix string = ",\"version\":"
1005 out.RawString(prefix[1:])
1006 out.Int(int(in.Version))
1007 }
1008 {
1009 const prefix string = ",\"teams\":"
1010 out.RawString(prefix)
1011 if in.Teams == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
1012 out.RawString("null")
1013 } else {
1014 out.RawByte('[')
1015 for v7, v8 := range in.Teams {
1016 if v7 > 0 {
1017 out.RawByte(',')
1018 }
1019 if v8 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
1020 out.RawString("null")
1021 } else {
1022 out.RawByte('[')
1023 for v9, v10 := range v8 {
1024 if v9 > 0 {
1025 out.RawByte(',')
1026 }
1027 if v10 == nil {
1028 out.RawString("null")
1029 } else {
1030 (*v10).MarshalEasyJSON(out)
1031 }
1032 }
1033 out.RawByte(']')
1034 }
1035 }
1036 out.RawByte(']')
1037 }
1038 }
1039 {
1040 const prefix string = ",\"turn\":"
1041 out.RawString(prefix)
1042 out.Int(int(in.Turn))
1043 }
1044 {
1045 const prefix string = ",\"winner\":"
1046 out.RawString(prefix)
1047 if in.Winner == nil {
1048 out.RawString("null")
1049 } else {
1050 out.Int(int(*in.Winner))
1051 }
1052 }
1053 {
1054 const prefix string = ",\"board\":"
1055 out.RawString(prefix)
1056 if in.Board == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
1057 out.RawString("null")
1058 } else {
1059 out.RawByte('[')
1060 for v11, v12 := range in.Board {
1061 if v11 > 0 {
1062 out.RawByte(',')
1063 }
1064 if v12 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
1065 out.RawString("null")
1066 } else {
1067 out.RawByte('[')
1068 for v13, v14 := range v12 {
1069 if v13 > 0 {
1070 out.RawByte(',')
1071 }
1072 if v14 == nil {
1073 out.RawString("null")
1074 } else {
1075 (*v14).MarshalEasyJSON(out)
1076 }
1077 }
1078 out.RawByte(']')
1079 }
1080 }
1081 out.RawByte(']')
1082 }
1083 }
1084 {
1085 const prefix string = ",\"wordsLeft\":"
1086 out.RawString(prefix)
1087 if in.WordsLeft == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
1088 out.RawString("null")
1089 } else {
1090 out.RawByte('[')
1091 for v15, v16 := range in.WordsLeft {
1092 if v15 > 0 {
1093 out.RawByte(',')
1094 }
1095 out.Int(int(v16))
1096 }
1097 out.RawByte(']')
1098 }
1099 }
1100 {
1101 const prefix string = ",\"lists\":"
1102 out.RawString(prefix)
1103 if in.Lists == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
1104 out.RawString("null")
1105 } else {
1106 out.RawByte('[')
1107 for v17, v18 := range in.Lists {
1108 if v17 > 0 {
1109 out.RawByte(',')
1110 }
1111 if v18 == nil {
1112 out.RawString("null")
1113 } else {
1114 (*v18).MarshalEasyJSON(out)
1115 }
1116 }
1117 out.RawByte(']')
1118 }
1119 }
1120 {
1121 const prefix string = ",\"timer\":"
1122 out.RawString(prefix)
1123 if in.Timer == nil {
1124 out.RawString("null")
1125 } else {
1126 (*in.Timer).MarshalEasyJSON(out)
1127 }
1128 }
1129 {
1130 const prefix string = ",\"hideBomb\":"
1131 out.RawString(prefix)
1132 out.Bool(bool(in.HideBomb))
1133 }
1134 out.RawByte('}')
1135}
1136
1137// MarshalJSON supports json.Marshaler interface
1138func (v RoomState) MarshalJSON() ([]byte, error) {
1139 w := jwriter.Writer{}
1140 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol9(&w, v)
1141 return w.Buffer.BuildBytes(), w.Error
1142}
1143
1144// MarshalEasyJSON supports easyjson.Marshaler interface
1145func (v RoomState) MarshalEasyJSON(w *jwriter.Writer) {
1146 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol9(w, v)
1147}
1148
1149// UnmarshalJSON supports json.Unmarshaler interface
1150func (v *RoomState) UnmarshalJSON(data []byte) error {
1151 r := jlexer.Lexer{Data: data}
1152 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol9(&r, v)
1153 return r.Error()
1154}
1155
1156// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
1157func (v *RoomState) UnmarshalEasyJSON(l *jlexer.Lexer) {
1158 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol9(l, v)
1159}
1160func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol10(in *jlexer.Lexer, out *RoomResponse) {
1161 isTopLevel := in.IsStart()
1162 if in.IsNull() {
1163 if isTopLevel {
1164 in.Consumed()
1165 }
1166 in.Skip()
1167 return
1168 }
1169 in.Delim('{')
1170 for !in.IsDelim('}') {
1171 key := in.UnsafeString()
1172 in.WantColon()
1173 if in.IsNull() {
1174 in.Skip()
1175 in.WantComma()
1176 continue
1177 }
1178 switch key {
1179 case "id":
1180 if in.IsNull() {
1181 in.Skip()
1182 out.ID = nil
1183 } else {
1184 if out.ID == nil {
1185 out.ID = new(string)
1186 }
1187 *out.ID = string(in.String())
1188 }
1189 case "error":
1190 if in.IsNull() {
1191 in.Skip()
1192 out.Error = nil
1193 } else {
1194 if out.Error == nil {
1195 out.Error = new(string)
1196 }
1197 *out.Error = string(in.String())
1198 }
1199 default:
1200 in.AddError(&jlexer.LexerError{
1201 Offset: in.GetPos(),
1202 Reason: "unknown field",
1203 Data: key,
1204 })
1205 }
1206 in.WantComma()
1207 }
1208 in.Delim('}')
1209 if isTopLevel {
1210 in.Consumed()
1211 }
1212}
1213func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol10(out *jwriter.Writer, in RoomResponse) {
1214 out.RawByte('{')
1215 first := true
1216 _ = first
1217 if in.ID != nil {
1218 const prefix string = ",\"id\":"
1219 first = false
1220 out.RawString(prefix[1:])
1221 out.String(string(*in.ID))
1222 }
1223 if in.Error != nil {
1224 const prefix string = ",\"error\":"
1225 if first {
1226 first = false
1227 out.RawString(prefix[1:])
1228 } else {
1229 out.RawString(prefix)
1230 }
1231 out.String(string(*in.Error))
1232 }
1233 out.RawByte('}')
1234}
1235
1236// MarshalJSON supports json.Marshaler interface
1237func (v RoomResponse) MarshalJSON() ([]byte, error) {
1238 w := jwriter.Writer{}
1239 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol10(&w, v)
1240 return w.Buffer.BuildBytes(), w.Error
1241}
1242
1243// MarshalEasyJSON supports easyjson.Marshaler interface
1244func (v RoomResponse) MarshalEasyJSON(w *jwriter.Writer) {
1245 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol10(w, v)
1246}
1247
1248// UnmarshalJSON supports json.Unmarshaler interface
1249func (v *RoomResponse) UnmarshalJSON(data []byte) error {
1250 r := jlexer.Lexer{Data: data}
1251 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol10(&r, v)
1252 return r.Error()
1253}
1254
1255// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
1256func (v *RoomResponse) UnmarshalEasyJSON(l *jlexer.Lexer) {
1257 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol10(l, v)
1258}
1259func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol11(in *jlexer.Lexer, out *RoomRequest) {
1260 isTopLevel := in.IsStart()
1261 if in.IsNull() {
1262 if isTopLevel {
1263 in.Consumed()
1264 }
1265 in.Skip()
1266 return
1267 }
1268 in.Delim('{')
1269 for !in.IsDelim('}') {
1270 key := in.UnsafeString()
1271 in.WantColon()
1272 if in.IsNull() {
1273 in.Skip()
1274 in.WantComma()
1275 continue
1276 }
1277 switch key {
1278 case "roomName":
1279 out.RoomName = string(in.String())
1280 case "roomPass":
1281 out.RoomPass = string(in.String())
1282 case "create":
1283 out.Create = bool(in.Bool())
1284 default:
1285 in.AddError(&jlexer.LexerError{
1286 Offset: in.GetPos(),
1287 Reason: "unknown field",
1288 Data: key,
1289 })
1290 }
1291 in.WantComma()
1292 }
1293 in.Delim('}')
1294 if isTopLevel {
1295 in.Consumed()
1296 }
1297}
1298func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol11(out *jwriter.Writer, in RoomRequest) {
1299 out.RawByte('{')
1300 first := true
1301 _ = first
1302 {
1303 const prefix string = ",\"roomName\":"
1304 out.RawString(prefix[1:])
1305 out.String(string(in.RoomName))
1306 }
1307 {
1308 const prefix string = ",\"roomPass\":"
1309 out.RawString(prefix)
1310 out.String(string(in.RoomPass))
1311 }
1312 {
1313 const prefix string = ",\"create\":"
1314 out.RawString(prefix)
1315 out.Bool(bool(in.Create))
1316 }
1317 out.RawByte('}')
1318}
1319
1320// MarshalJSON supports json.Marshaler interface
1321func (v RoomRequest) MarshalJSON() ([]byte, error) {
1322 w := jwriter.Writer{}
1323 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol11(&w, v)
1324 return w.Buffer.BuildBytes(), w.Error
1325}
1326
1327// MarshalEasyJSON supports easyjson.Marshaler interface
1328func (v RoomRequest) MarshalEasyJSON(w *jwriter.Writer) {
1329 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol11(w, v)
1330}
1331
1332// UnmarshalJSON supports json.Unmarshaler interface
1333func (v *RoomRequest) UnmarshalJSON(data []byte) error {
1334 r := jlexer.Lexer{Data: data}
1335 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol11(&r, v)
1336 return r.Error()
1337}
1338
1339// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
1340func (v *RoomRequest) UnmarshalEasyJSON(l *jlexer.Lexer) {
1341 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol11(l, v)
1342}
1343func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol12(in *jlexer.Lexer, out *RevealParams) {
1344 isTopLevel := in.IsStart()
1345 if in.IsNull() {
1346 if isTopLevel {
1347 in.Consumed()
1348 }
1349 in.Skip()
1350 return
1351 }
1352 in.Delim('{')
1353 for !in.IsDelim('}') {
1354 key := in.UnsafeString()
1355 in.WantColon()
1356 if in.IsNull() {
1357 in.Skip()
1358 in.WantComma()
1359 continue
1360 }
1361 switch key {
1362 case "row":
1363 out.Row = int(in.Int())
1364 case "col":
1365 out.Col = int(in.Int())
1366 default:
1367 in.AddError(&jlexer.LexerError{
1368 Offset: in.GetPos(),
1369 Reason: "unknown field",
1370 Data: key,
1371 })
1372 }
1373 in.WantComma()
1374 }
1375 in.Delim('}')
1376 if isTopLevel {
1377 in.Consumed()
1378 }
1379}
1380func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol12(out *jwriter.Writer, in RevealParams) {
1381 out.RawByte('{')
1382 first := true
1383 _ = first
1384 {
1385 const prefix string = ",\"row\":"
1386 out.RawString(prefix[1:])
1387 out.Int(int(in.Row))
1388 }
1389 {
1390 const prefix string = ",\"col\":"
1391 out.RawString(prefix)
1392 out.Int(int(in.Col))
1393 }
1394 out.RawByte('}')
1395}
1396
1397// MarshalJSON supports json.Marshaler interface
1398func (v RevealParams) MarshalJSON() ([]byte, error) {
1399 w := jwriter.Writer{}
1400 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol12(&w, v)
1401 return w.Buffer.BuildBytes(), w.Error
1402}
1403
1404// MarshalEasyJSON supports easyjson.Marshaler interface
1405func (v RevealParams) MarshalEasyJSON(w *jwriter.Writer) {
1406 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol12(w, v)
1407}
1408
1409// UnmarshalJSON supports json.Unmarshaler interface
1410func (v *RevealParams) UnmarshalJSON(data []byte) error {
1411 r := jlexer.Lexer{Data: data}
1412 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol12(&r, v)
1413 return r.Error()
1414}
1415
1416// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
1417func (v *RevealParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
1418 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol12(l, v)
1419}
1420func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol13(in *jlexer.Lexer, out *RemovePackParams) {
1421 isTopLevel := in.IsStart()
1422 if in.IsNull() {
1423 if isTopLevel {
1424 in.Consumed()
1425 }
1426 in.Skip()
1427 return
1428 }
1429 in.Delim('{')
1430 for !in.IsDelim('}') {
1431 key := in.UnsafeString()
1432 in.WantColon()
1433 if in.IsNull() {
1434 in.Skip()
1435 in.WantComma()
1436 continue
1437 }
1438 switch key {
1439 case "num":
1440 out.Num = int(in.Int())
1441 default:
1442 in.AddError(&jlexer.LexerError{
1443 Offset: in.GetPos(),
1444 Reason: "unknown field",
1445 Data: key,
1446 })
1447 }
1448 in.WantComma()
1449 }
1450 in.Delim('}')
1451 if isTopLevel {
1452 in.Consumed()
1453 }
1454}
1455func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol13(out *jwriter.Writer, in RemovePackParams) {
1456 out.RawByte('{')
1457 first := true
1458 _ = first
1459 {
1460 const prefix string = ",\"num\":"
1461 out.RawString(prefix[1:])
1462 out.Int(int(in.Num))
1463 }
1464 out.RawByte('}')
1465}
1466
1467// MarshalJSON supports json.Marshaler interface
1468func (v RemovePackParams) MarshalJSON() ([]byte, error) {
1469 w := jwriter.Writer{}
1470 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol13(&w, v)
1471 return w.Buffer.BuildBytes(), w.Error
1472}
1473
1474// MarshalEasyJSON supports easyjson.Marshaler interface
1475func (v RemovePackParams) MarshalEasyJSON(w *jwriter.Writer) {
1476 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol13(w, v)
1477}
1478
1479// UnmarshalJSON supports json.Unmarshaler interface
1480func (v *RemovePackParams) UnmarshalJSON(data []byte) error {
1481 r := jlexer.Lexer{Data: data}
1482 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol13(&r, v)
1483 return r.Error()
1484}
1485
1486// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
1487func (v *RemovePackParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
1488 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol13(l, v)
1489}
1490func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol14(in *jlexer.Lexer, out *RandomizeTeamsParams) {
1491 isTopLevel := in.IsStart()
1492 if in.IsNull() {
1493 if isTopLevel {
1494 in.Consumed()
1495 }
1496 in.Skip()
1497 return
1498 }
1499 in.Delim('{')
1500 for !in.IsDelim('}') {
1501 key := in.UnsafeString()
1502 in.WantColon()
1503 if in.IsNull() {
1504 in.Skip()
1505 in.WantComma()
1506 continue
1507 }
1508 switch key {
1509 default:
1510 in.AddError(&jlexer.LexerError{
1511 Offset: in.GetPos(),
1512 Reason: "unknown field",
1513 Data: key,
1514 })
1515 }
1516 in.WantComma()
1517 }
1518 in.Delim('}')
1519 if isTopLevel {
1520 in.Consumed()
1521 }
1522}
1523func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol14(out *jwriter.Writer, in RandomizeTeamsParams) {
1524 out.RawByte('{')
1525 first := true
1526 _ = first
1527 out.RawByte('}')
1528}
1529
1530// MarshalJSON supports json.Marshaler interface
1531func (v RandomizeTeamsParams) MarshalJSON() ([]byte, error) {
1532 w := jwriter.Writer{}
1533 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol14(&w, v)
1534 return w.Buffer.BuildBytes(), w.Error
1535}
1536
1537// MarshalEasyJSON supports easyjson.Marshaler interface
1538func (v RandomizeTeamsParams) MarshalEasyJSON(w *jwriter.Writer) {
1539 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol14(w, v)
1540}
1541
1542// UnmarshalJSON supports json.Unmarshaler interface
1543func (v *RandomizeTeamsParams) UnmarshalJSON(data []byte) error {
1544 r := jlexer.Lexer{Data: data}
1545 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol14(&r, v)
1546 return r.Error()
1547}
1548
1549// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
1550func (v *RandomizeTeamsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
1551 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol14(l, v)
1552}
1553func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol15(in *jlexer.Lexer, out *NewGameParams) {
1554 isTopLevel := in.IsStart()
1555 if in.IsNull() {
1556 if isTopLevel {
1557 in.Consumed()
1558 }
1559 in.Skip()
1560 return
1561 }
1562 in.Delim('{')
1563 for !in.IsDelim('}') {
1564 key := in.UnsafeString()
1565 in.WantColon()
1566 if in.IsNull() {
1567 in.Skip()
1568 in.WantComma()
1569 continue
1570 }
1571 switch key {
1572 default:
1573 in.AddError(&jlexer.LexerError{
1574 Offset: in.GetPos(),
1575 Reason: "unknown field",
1576 Data: key,
1577 })
1578 }
1579 in.WantComma()
1580 }
1581 in.Delim('}')
1582 if isTopLevel {
1583 in.Consumed()
1584 }
1585}
1586func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol15(out *jwriter.Writer, in NewGameParams) {
1587 out.RawByte('{')
1588 first := true
1589 _ = first
1590 out.RawByte('}')
1591}
1592
1593// MarshalJSON supports json.Marshaler interface
1594func (v NewGameParams) MarshalJSON() ([]byte, error) {
1595 w := jwriter.Writer{}
1596 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol15(&w, v)
1597 return w.Buffer.BuildBytes(), w.Error
1598}
1599
1600// MarshalEasyJSON supports easyjson.Marshaler interface
1601func (v NewGameParams) MarshalEasyJSON(w *jwriter.Writer) {
1602 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol15(w, v)
1603}
1604
1605// UnmarshalJSON supports json.Unmarshaler interface
1606func (v *NewGameParams) UnmarshalJSON(data []byte) error {
1607 r := jlexer.Lexer{Data: data}
1608 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol15(&r, v)
1609 return r.Error()
1610}
1611
1612// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
1613func (v *NewGameParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
1614 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol15(l, v)
1615}
1616func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol16(in *jlexer.Lexer, out *EndTurnParams) {
1617 isTopLevel := in.IsStart()
1618 if in.IsNull() {
1619 if isTopLevel {
1620 in.Consumed()
1621 }
1622 in.Skip()
1623 return
1624 }
1625 in.Delim('{')
1626 for !in.IsDelim('}') {
1627 key := in.UnsafeString()
1628 in.WantColon()
1629 if in.IsNull() {
1630 in.Skip()
1631 in.WantComma()
1632 continue
1633 }
1634 switch key {
1635 default:
1636 in.AddError(&jlexer.LexerError{
1637 Offset: in.GetPos(),
1638 Reason: "unknown field",
1639 Data: key,
1640 })
1641 }
1642 in.WantComma()
1643 }
1644 in.Delim('}')
1645 if isTopLevel {
1646 in.Consumed()
1647 }
1648}
1649func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol16(out *jwriter.Writer, in EndTurnParams) {
1650 out.RawByte('{')
1651 first := true
1652 _ = first
1653 out.RawByte('}')
1654}
1655
1656// MarshalJSON supports json.Marshaler interface
1657func (v EndTurnParams) MarshalJSON() ([]byte, error) {
1658 w := jwriter.Writer{}
1659 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol16(&w, v)
1660 return w.Buffer.BuildBytes(), w.Error
1661}
1662
1663// MarshalEasyJSON supports easyjson.Marshaler interface
1664func (v EndTurnParams) MarshalEasyJSON(w *jwriter.Writer) {
1665 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol16(w, v)
1666}
1667
1668// UnmarshalJSON supports json.Unmarshaler interface
1669func (v *EndTurnParams) UnmarshalJSON(data []byte) error {
1670 r := jlexer.Lexer{Data: data}
1671 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol16(&r, v)
1672 return r.Error()
1673}
1674
1675// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
1676func (v *EndTurnParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
1677 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol16(l, v)
1678}
1679func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol17(in *jlexer.Lexer, out *ClientNote) {
1680 isTopLevel := in.IsStart()
1681 if in.IsNull() {
1682 if isTopLevel {
1683 in.Consumed()
1684 }
1685 in.Skip()
1686 return
1687 }
1688 in.Delim('{')
1689 for !in.IsDelim('}') {
1690 key := in.UnsafeString()
1691 in.WantColon()
1692 if in.IsNull() {
1693 in.Skip()
1694 in.WantComma()
1695 continue
1696 }
1697 switch key {
1698 case "method":
1699 out.Method = ClientMethod(in.String())
1700 case "version":
1701 out.Version = int(in.Int())
1702 case "params":
1703 (out.Params).UnmarshalEasyJSON(in)
1704 default:
1705 in.AddError(&jlexer.LexerError{
1706 Offset: in.GetPos(),
1707 Reason: "unknown field",
1708 Data: key,
1709 })
1710 }
1711 in.WantComma()
1712 }
1713 in.Delim('}')
1714 if isTopLevel {
1715 in.Consumed()
1716 }
1717}
1718func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol17(out *jwriter.Writer, in ClientNote) {
1719 out.RawByte('{')
1720 first := true
1721 _ = first
1722 {
1723 const prefix string = ",\"method\":"
1724 out.RawString(prefix[1:])
1725 out.String(string(in.Method))
1726 }
1727 {
1728 const prefix string = ",\"version\":"
1729 out.RawString(prefix)
1730 out.Int(int(in.Version))
1731 }
1732 {
1733 const prefix string = ",\"params\":"
1734 out.RawString(prefix)
1735 (in.Params).MarshalEasyJSON(out)
1736 }
1737 out.RawByte('}')
1738}
1739
1740// MarshalJSON supports json.Marshaler interface
1741func (v ClientNote) MarshalJSON() ([]byte, error) {
1742 w := jwriter.Writer{}
1743 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol17(&w, v)
1744 return w.Buffer.BuildBytes(), w.Error
1745}
1746
1747// MarshalEasyJSON supports easyjson.Marshaler interface
1748func (v ClientNote) MarshalEasyJSON(w *jwriter.Writer) {
1749 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol17(w, v)
1750}
1751
1752// UnmarshalJSON supports json.Unmarshaler interface
1753func (v *ClientNote) UnmarshalJSON(data []byte) error {
1754 r := jlexer.Lexer{Data: data}
1755 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol17(&r, v)
1756 return r.Error()
1757}
1758
1759// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
1760func (v *ClientNote) UnmarshalEasyJSON(l *jlexer.Lexer) {
1761 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol17(l, v)
1762}
1763func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol18(in *jlexer.Lexer, out *ChangeTurnTimeParams) {
1764 isTopLevel := in.IsStart()
1765 if in.IsNull() {
1766 if isTopLevel {
1767 in.Consumed()
1768 }
1769 in.Skip()
1770 return
1771 }
1772 in.Delim('{')
1773 for !in.IsDelim('}') {
1774 key := in.UnsafeString()
1775 in.WantColon()
1776 if in.IsNull() {
1777 in.Skip()
1778 in.WantComma()
1779 continue
1780 }
1781 switch key {
1782 case "seconds":
1783 out.Seconds = int(in.Int())
1784 default:
1785 in.AddError(&jlexer.LexerError{
1786 Offset: in.GetPos(),
1787 Reason: "unknown field",
1788 Data: key,
1789 })
1790 }
1791 in.WantComma()
1792 }
1793 in.Delim('}')
1794 if isTopLevel {
1795 in.Consumed()
1796 }
1797}
1798func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol18(out *jwriter.Writer, in ChangeTurnTimeParams) {
1799 out.RawByte('{')
1800 first := true
1801 _ = first
1802 {
1803 const prefix string = ",\"seconds\":"
1804 out.RawString(prefix[1:])
1805 out.Int(int(in.Seconds))
1806 }
1807 out.RawByte('}')
1808}
1809
1810// MarshalJSON supports json.Marshaler interface
1811func (v ChangeTurnTimeParams) MarshalJSON() ([]byte, error) {
1812 w := jwriter.Writer{}
1813 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol18(&w, v)
1814 return w.Buffer.BuildBytes(), w.Error
1815}
1816
1817// MarshalEasyJSON supports easyjson.Marshaler interface
1818func (v ChangeTurnTimeParams) MarshalEasyJSON(w *jwriter.Writer) {
1819 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol18(w, v)
1820}
1821
1822// UnmarshalJSON supports json.Unmarshaler interface
1823func (v *ChangeTurnTimeParams) UnmarshalJSON(data []byte) error {
1824 r := jlexer.Lexer{Data: data}
1825 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol18(&r, v)
1826 return r.Error()
1827}
1828
1829// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
1830func (v *ChangeTurnTimeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
1831 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol18(l, v)
1832}
1833func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol19(in *jlexer.Lexer, out *ChangeTurnModeParams) {
1834 isTopLevel := in.IsStart()
1835 if in.IsNull() {
1836 if isTopLevel {
1837 in.Consumed()
1838 }
1839 in.Skip()
1840 return
1841 }
1842 in.Delim('{')
1843 for !in.IsDelim('}') {
1844 key := in.UnsafeString()
1845 in.WantColon()
1846 if in.IsNull() {
1847 in.Skip()
1848 in.WantComma()
1849 continue
1850 }
1851 switch key {
1852 case "timed":
1853 out.Timed = bool(in.Bool())
1854 default:
1855 in.AddError(&jlexer.LexerError{
1856 Offset: in.GetPos(),
1857 Reason: "unknown field",
1858 Data: key,
1859 })
1860 }
1861 in.WantComma()
1862 }
1863 in.Delim('}')
1864 if isTopLevel {
1865 in.Consumed()
1866 }
1867}
1868func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol19(out *jwriter.Writer, in ChangeTurnModeParams) {
1869 out.RawByte('{')
1870 first := true
1871 _ = first
1872 {
1873 const prefix string = ",\"timed\":"
1874 out.RawString(prefix[1:])
1875 out.Bool(bool(in.Timed))
1876 }
1877 out.RawByte('}')
1878}
1879
1880// MarshalJSON supports json.Marshaler interface
1881func (v ChangeTurnModeParams) MarshalJSON() ([]byte, error) {
1882 w := jwriter.Writer{}
1883 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol19(&w, v)
1884 return w.Buffer.BuildBytes(), w.Error
1885}
1886
1887// MarshalEasyJSON supports easyjson.Marshaler interface
1888func (v ChangeTurnModeParams) MarshalEasyJSON(w *jwriter.Writer) {
1889 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol19(w, v)
1890}
1891
1892// UnmarshalJSON supports json.Unmarshaler interface
1893func (v *ChangeTurnModeParams) UnmarshalJSON(data []byte) error {
1894 r := jlexer.Lexer{Data: data}
1895 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol19(&r, v)
1896 return r.Error()
1897}
1898
1899// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
1900func (v *ChangeTurnModeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
1901 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol19(l, v)
1902}
1903func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol20(in *jlexer.Lexer, out *ChangeTeamParams) {
1904 isTopLevel := in.IsStart()
1905 if in.IsNull() {
1906 if isTopLevel {
1907 in.Consumed()
1908 }
1909 in.Skip()
1910 return
1911 }
1912 in.Delim('{')
1913 for !in.IsDelim('}') {
1914 key := in.UnsafeString()
1915 in.WantColon()
1916 if in.IsNull() {
1917 in.Skip()
1918 in.WantComma()
1919 continue
1920 }
1921 switch key {
1922 case "team":
1923 out.Team = game.Team(in.Int())
1924 default:
1925 in.AddError(&jlexer.LexerError{
1926 Offset: in.GetPos(),
1927 Reason: "unknown field",
1928 Data: key,
1929 })
1930 }
1931 in.WantComma()
1932 }
1933 in.Delim('}')
1934 if isTopLevel {
1935 in.Consumed()
1936 }
1937}
1938func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol20(out *jwriter.Writer, in ChangeTeamParams) {
1939 out.RawByte('{')
1940 first := true
1941 _ = first
1942 {
1943 const prefix string = ",\"team\":"
1944 out.RawString(prefix[1:])
1945 out.Int(int(in.Team))
1946 }
1947 out.RawByte('}')
1948}
1949
1950// MarshalJSON supports json.Marshaler interface
1951func (v ChangeTeamParams) MarshalJSON() ([]byte, error) {
1952 w := jwriter.Writer{}
1953 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol20(&w, v)
1954 return w.Buffer.BuildBytes(), w.Error
1955}
1956
1957// MarshalEasyJSON supports easyjson.Marshaler interface
1958func (v ChangeTeamParams) MarshalEasyJSON(w *jwriter.Writer) {
1959 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol20(w, v)
1960}
1961
1962// UnmarshalJSON supports json.Unmarshaler interface
1963func (v *ChangeTeamParams) UnmarshalJSON(data []byte) error {
1964 r := jlexer.Lexer{Data: data}
1965 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol20(&r, v)
1966 return r.Error()
1967}
1968
1969// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
1970func (v *ChangeTeamParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
1971 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol20(l, v)
1972}
1973func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol21(in *jlexer.Lexer, out *ChangeRoleParams) {
1974 isTopLevel := in.IsStart()
1975 if in.IsNull() {
1976 if isTopLevel {
1977 in.Consumed()
1978 }
1979 in.Skip()
1980 return
1981 }
1982 in.Delim('{')
1983 for !in.IsDelim('}') {
1984 key := in.UnsafeString()
1985 in.WantColon()
1986 if in.IsNull() {
1987 in.Skip()
1988 in.WantComma()
1989 continue
1990 }
1991 switch key {
1992 case "spymaster":
1993 out.Spymaster = bool(in.Bool())
1994 default:
1995 in.AddError(&jlexer.LexerError{
1996 Offset: in.GetPos(),
1997 Reason: "unknown field",
1998 Data: key,
1999 })
2000 }
2001 in.WantComma()
2002 }
2003 in.Delim('}')
2004 if isTopLevel {
2005 in.Consumed()
2006 }
2007}
2008func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol21(out *jwriter.Writer, in ChangeRoleParams) {
2009 out.RawByte('{')
2010 first := true
2011 _ = first
2012 {
2013 const prefix string = ",\"spymaster\":"
2014 out.RawString(prefix[1:])
2015 out.Bool(bool(in.Spymaster))
2016 }
2017 out.RawByte('}')
2018}
2019
2020// MarshalJSON supports json.Marshaler interface
2021func (v ChangeRoleParams) MarshalJSON() ([]byte, error) {
2022 w := jwriter.Writer{}
2023 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol21(&w, v)
2024 return w.Buffer.BuildBytes(), w.Error
2025}
2026
2027// MarshalEasyJSON supports easyjson.Marshaler interface
2028func (v ChangeRoleParams) MarshalEasyJSON(w *jwriter.Writer) {
2029 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol21(w, v)
2030}
2031
2032// UnmarshalJSON supports json.Unmarshaler interface
2033func (v *ChangeRoleParams) UnmarshalJSON(data []byte) error {
2034 r := jlexer.Lexer{Data: data}
2035 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol21(&r, v)
2036 return r.Error()
2037}
2038
2039// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
2040func (v *ChangeRoleParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
2041 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol21(l, v)
2042}
2043func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol22(in *jlexer.Lexer, out *ChangePackParams) {
2044 isTopLevel := in.IsStart()
2045 if in.IsNull() {
2046 if isTopLevel {
2047 in.Consumed()
2048 }
2049 in.Skip()
2050 return
2051 }
2052 in.Delim('{')
2053 for !in.IsDelim('}') {
2054 key := in.UnsafeString()
2055 in.WantColon()
2056 if in.IsNull() {
2057 in.Skip()
2058 in.WantComma()
2059 continue
2060 }
2061 switch key {
2062 case "num":
2063 out.Num = int(in.Int())
2064 case "enable":
2065 out.Enable = bool(in.Bool())
2066 default:
2067 in.AddError(&jlexer.LexerError{
2068 Offset: in.GetPos(),
2069 Reason: "unknown field",
2070 Data: key,
2071 })
2072 }
2073 in.WantComma()
2074 }
2075 in.Delim('}')
2076 if isTopLevel {
2077 in.Consumed()
2078 }
2079}
2080func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol22(out *jwriter.Writer, in ChangePackParams) {
2081 out.RawByte('{')
2082 first := true
2083 _ = first
2084 {
2085 const prefix string = ",\"num\":"
2086 out.RawString(prefix[1:])
2087 out.Int(int(in.Num))
2088 }
2089 {
2090 const prefix string = ",\"enable\":"
2091 out.RawString(prefix)
2092 out.Bool(bool(in.Enable))
2093 }
2094 out.RawByte('}')
2095}
2096
2097// MarshalJSON supports json.Marshaler interface
2098func (v ChangePackParams) MarshalJSON() ([]byte, error) {
2099 w := jwriter.Writer{}
2100 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol22(&w, v)
2101 return w.Buffer.BuildBytes(), w.Error
2102}
2103
2104// MarshalEasyJSON supports easyjson.Marshaler interface
2105func (v ChangePackParams) MarshalEasyJSON(w *jwriter.Writer) {
2106 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol22(w, v)
2107}
2108
2109// UnmarshalJSON supports json.Unmarshaler interface
2110func (v *ChangePackParams) UnmarshalJSON(data []byte) error {
2111 r := jlexer.Lexer{Data: data}
2112 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol22(&r, v)
2113 return r.Error()
2114}
2115
2116// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
2117func (v *ChangePackParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
2118 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol22(l, v)
2119}
2120func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol23(in *jlexer.Lexer, out *ChangeNicknameParams) {
2121 isTopLevel := in.IsStart()
2122 if in.IsNull() {
2123 if isTopLevel {
2124 in.Consumed()
2125 }
2126 in.Skip()
2127 return
2128 }
2129 in.Delim('{')
2130 for !in.IsDelim('}') {
2131 key := in.UnsafeString()
2132 in.WantColon()
2133 if in.IsNull() {
2134 in.Skip()
2135 in.WantComma()
2136 continue
2137 }
2138 switch key {
2139 case "nickname":
2140 out.Nickname = string(in.String())
2141 default:
2142 in.AddError(&jlexer.LexerError{
2143 Offset: in.GetPos(),
2144 Reason: "unknown field",
2145 Data: key,
2146 })
2147 }
2148 in.WantComma()
2149 }
2150 in.Delim('}')
2151 if isTopLevel {
2152 in.Consumed()
2153 }
2154}
2155func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol23(out *jwriter.Writer, in ChangeNicknameParams) {
2156 out.RawByte('{')
2157 first := true
2158 _ = first
2159 {
2160 const prefix string = ",\"nickname\":"
2161 out.RawString(prefix[1:])
2162 out.String(string(in.Nickname))
2163 }
2164 out.RawByte('}')
2165}
2166
2167// MarshalJSON supports json.Marshaler interface
2168func (v ChangeNicknameParams) MarshalJSON() ([]byte, error) {
2169 w := jwriter.Writer{}
2170 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol23(&w, v)
2171 return w.Buffer.BuildBytes(), w.Error
2172}
2173
2174// MarshalEasyJSON supports easyjson.Marshaler interface
2175func (v ChangeNicknameParams) MarshalEasyJSON(w *jwriter.Writer) {
2176 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol23(w, v)
2177}
2178
2179// UnmarshalJSON supports json.Unmarshaler interface
2180func (v *ChangeNicknameParams) UnmarshalJSON(data []byte) error {
2181 r := jlexer.Lexer{Data: data}
2182 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol23(&r, v)
2183 return r.Error()
2184}
2185
2186// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
2187func (v *ChangeNicknameParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
2188 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol23(l, v)
2189}
2190func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol24(in *jlexer.Lexer, out *ChangeHideBombParams) {
2191 isTopLevel := in.IsStart()
2192 if in.IsNull() {
2193 if isTopLevel {
2194 in.Consumed()
2195 }
2196 in.Skip()
2197 return
2198 }
2199 in.Delim('{')
2200 for !in.IsDelim('}') {
2201 key := in.UnsafeString()
2202 in.WantColon()
2203 if in.IsNull() {
2204 in.Skip()
2205 in.WantComma()
2206 continue
2207 }
2208 switch key {
2209 case "hideBomb":
2210 out.HideBomb = bool(in.Bool())
2211 default:
2212 in.AddError(&jlexer.LexerError{
2213 Offset: in.GetPos(),
2214 Reason: "unknown field",
2215 Data: key,
2216 })
2217 }
2218 in.WantComma()
2219 }
2220 in.Delim('}')
2221 if isTopLevel {
2222 in.Consumed()
2223 }
2224}
2225func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol24(out *jwriter.Writer, in ChangeHideBombParams) {
2226 out.RawByte('{')
2227 first := true
2228 _ = first
2229 {
2230 const prefix string = ",\"hideBomb\":"
2231 out.RawString(prefix[1:])
2232 out.Bool(bool(in.HideBomb))
2233 }
2234 out.RawByte('}')
2235}
2236
2237// MarshalJSON supports json.Marshaler interface
2238func (v ChangeHideBombParams) MarshalJSON() ([]byte, error) {
2239 w := jwriter.Writer{}
2240 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol24(&w, v)
2241 return w.Buffer.BuildBytes(), w.Error
2242}
2243
2244// MarshalEasyJSON supports easyjson.Marshaler interface
2245func (v ChangeHideBombParams) MarshalEasyJSON(w *jwriter.Writer) {
2246 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol24(w, v)
2247}
2248
2249// UnmarshalJSON supports json.Unmarshaler interface
2250func (v *ChangeHideBombParams) UnmarshalJSON(data []byte) error {
2251 r := jlexer.Lexer{Data: data}
2252 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol24(&r, v)
2253 return r.Error()
2254}
2255
2256// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
2257func (v *ChangeHideBombParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
2258 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol24(l, v)
2259}
2260func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol25(in *jlexer.Lexer, out *AddPacksParams) {
2261 isTopLevel := in.IsStart()
2262 if in.IsNull() {
2263 if isTopLevel {
2264 in.Consumed()
2265 }
2266 in.Skip()
2267 return
2268 }
2269 in.Delim('{')
2270 for !in.IsDelim('}') {
2271 key := in.UnsafeString()
2272 in.WantColon()
2273 if in.IsNull() {
2274 in.Skip()
2275 in.WantComma()
2276 continue
2277 }
2278 switch key {
2279 case "packs":
2280 if in.IsNull() {
2281 in.Skip()
2282 out.Packs = nil
2283 } else {
2284 in.Delim('[')
2285 if out.Packs == nil {
2286 if !in.IsDelim(']') {
2287 out.Packs = make([]struct {
2288 Name string `json:"name"`
2289 Words []string `json:"words"`
2290 }, 0, 1)
2291 } else {
2292 out.Packs = []struct {
2293 Name string `json:"name"`
2294 Words []string `json:"words"`
2295 }{}
2296 }
2297 } else {
2298 out.Packs = (out.Packs)[:0]
2299 }
2300 for !in.IsDelim(']') {
2301 var v19 struct {
2302 Name string `json:"name"`
2303 Words []string `json:"words"`
2304 }
2305 easyjsonE4425964Decode(in, &v19)
2306 out.Packs = append(out.Packs, v19)
2307 in.WantComma()
2308 }
2309 in.Delim(']')
2310 }
2311 default:
2312 in.AddError(&jlexer.LexerError{
2313 Offset: in.GetPos(),
2314 Reason: "unknown field",
2315 Data: key,
2316 })
2317 }
2318 in.WantComma()
2319 }
2320 in.Delim('}')
2321 if isTopLevel {
2322 in.Consumed()
2323 }
2324}
2325func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol25(out *jwriter.Writer, in AddPacksParams) {
2326 out.RawByte('{')
2327 first := true
2328 _ = first
2329 {
2330 const prefix string = ",\"packs\":"
2331 out.RawString(prefix[1:])
2332 if in.Packs == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
2333 out.RawString("null")
2334 } else {
2335 out.RawByte('[')
2336 for v20, v21 := range in.Packs {
2337 if v20 > 0 {
2338 out.RawByte(',')
2339 }
2340 easyjsonE4425964Encode(out, v21)
2341 }
2342 out.RawByte(']')
2343 }
2344 }
2345 out.RawByte('}')
2346}
2347
2348// MarshalJSON supports json.Marshaler interface
2349func (v AddPacksParams) MarshalJSON() ([]byte, error) {
2350 w := jwriter.Writer{}
2351 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol25(&w, v)
2352 return w.Buffer.BuildBytes(), w.Error
2353}
2354
2355// MarshalEasyJSON supports easyjson.Marshaler interface
2356func (v AddPacksParams) MarshalEasyJSON(w *jwriter.Writer) {
2357 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol25(w, v)
2358}
2359
2360// UnmarshalJSON supports json.Unmarshaler interface
2361func (v *AddPacksParams) UnmarshalJSON(data []byte) error {
2362 r := jlexer.Lexer{Data: data}
2363 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol25(&r, v)
2364 return r.Error()
2365}
2366
2367// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
2368func (v *AddPacksParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
2369 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol25(l, v)
2370}
2371func easyjsonE4425964Decode(in *jlexer.Lexer, out *struct {
2372 Name string `json:"name"`
2373 Words []string `json:"words"`
2374}) {
2375 isTopLevel := in.IsStart()
2376 if in.IsNull() {
2377 if isTopLevel {
2378 in.Consumed()
2379 }
2380 in.Skip()
2381 return
2382 }
2383 in.Delim('{')
2384 for !in.IsDelim('}') {
2385 key := in.UnsafeString()
2386 in.WantColon()
2387 if in.IsNull() {
2388 in.Skip()
2389 in.WantComma()
2390 continue
2391 }
2392 switch key {
2393 case "name":
2394 out.Name = string(in.String())
2395 case "words":
2396 if in.IsNull() {
2397 in.Skip()
2398 out.Words = nil
2399 } else {
2400 in.Delim('[')
2401 if out.Words == nil {
2402 if !in.IsDelim(']') {
2403 out.Words = make([]string, 0, 4)
2404 } else {
2405 out.Words = []string{}
2406 }
2407 } else {
2408 out.Words = (out.Words)[:0]
2409 }
2410 for !in.IsDelim(']') {
2411 var v22 string
2412 v22 = string(in.String())
2413 out.Words = append(out.Words, v22)
2414 in.WantComma()
2415 }
2416 in.Delim(']')
2417 }
2418 default:
2419 in.AddError(&jlexer.LexerError{
2420 Offset: in.GetPos(),
2421 Reason: "unknown field",
2422 Data: key,
2423 })
2424 }
2425 in.WantComma()
2426 }
2427 in.Delim('}')
2428 if isTopLevel {
2429 in.Consumed()
2430 }
2431}
2432func easyjsonE4425964Encode(out *jwriter.Writer, in struct {
2433 Name string `json:"name"`
2434 Words []string `json:"words"`
2435}) {
2436 out.RawByte('{')
2437 first := true
2438 _ = first
2439 {
2440 const prefix string = ",\"name\":"
2441 out.RawString(prefix[1:])
2442 out.String(string(in.Name))
2443 }
2444 {
2445 const prefix string = ",\"words\":"
2446 out.RawString(prefix)
2447 if in.Words == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
2448 out.RawString("null")
2449 } else {
2450 out.RawByte('[')
2451 for v23, v24 := range in.Words {
2452 if v23 > 0 {
2453 out.RawByte(',')
2454 }
2455 out.String(string(v24))
2456 }
2457 out.RawByte(']')
2458 }
2459 }
2460 out.RawByte('}')
2461}