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 if data := in.UnsafeBytes(); in.Ok() {
541 in.AddError((out.PlayerID).UnmarshalText(data))
542 }
543 case "nickname":
544 out.Nickname = string(in.String())
545 case "spymaster":
546 out.Spymaster = bool(in.Bool())
547 default:
548 in.AddError(&jlexer.LexerError{
549 Offset: in.GetPos(),
550 Reason: "unknown field",
551 Data: key,
552 })
553 }
554 in.WantComma()
555 }
556 in.Delim('}')
557 if isTopLevel {
558 in.Consumed()
559 }
560}
561func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol6(out *jwriter.Writer, in StatePlayer) {
562 out.RawByte('{')
563 first := true
564 _ = first
565 {
566 const prefix string = ",\"playerID\":"
567 out.RawString(prefix[1:])
568 out.RawText((in.PlayerID).MarshalText())
569 }
570 {
571 const prefix string = ",\"nickname\":"
572 out.RawString(prefix)
573 out.String(string(in.Nickname))
574 }
575 {
576 const prefix string = ",\"spymaster\":"
577 out.RawString(prefix)
578 out.Bool(bool(in.Spymaster))
579 }
580 out.RawByte('}')
581}
582
583// MarshalJSON supports json.Marshaler interface
584func (v StatePlayer) MarshalJSON() ([]byte, error) {
585 w := jwriter.Writer{}
586 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol6(&w, v)
587 return w.Buffer.BuildBytes(), w.Error
588}
589
590// MarshalEasyJSON supports easyjson.Marshaler interface
591func (v StatePlayer) MarshalEasyJSON(w *jwriter.Writer) {
592 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol6(w, v)
593}
594
595// UnmarshalJSON supports json.Unmarshaler interface
596func (v *StatePlayer) UnmarshalJSON(data []byte) error {
597 r := jlexer.Lexer{Data: data}
598 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol6(&r, v)
599 return r.Error()
600}
601
602// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
603func (v *StatePlayer) UnmarshalEasyJSON(l *jlexer.Lexer) {
604 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol6(l, v)
605}
606func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol7(in *jlexer.Lexer, out *State) {
607 isTopLevel := in.IsStart()
608 if in.IsNull() {
609 if isTopLevel {
610 in.Consumed()
611 }
612 in.Skip()
613 return
614 }
615 in.Delim('{')
616 for !in.IsDelim('}') {
617 key := in.UnsafeString()
618 in.WantColon()
619 if in.IsNull() {
620 in.Skip()
621 in.WantComma()
622 continue
623 }
624 switch key {
625 case "version":
626 out.Version = int(in.Int())
627 case "teams":
628 if in.IsNull() {
629 in.Skip()
630 out.Teams = nil
631 } else {
632 in.Delim('[')
633 if out.Teams == nil {
634 if !in.IsDelim(']') {
635 out.Teams = make([][]*StatePlayer, 0, 2)
636 } else {
637 out.Teams = [][]*StatePlayer{}
638 }
639 } else {
640 out.Teams = (out.Teams)[:0]
641 }
642 for !in.IsDelim(']') {
643 var v1 []*StatePlayer
644 if in.IsNull() {
645 in.Skip()
646 v1 = nil
647 } else {
648 in.Delim('[')
649 if v1 == nil {
650 if !in.IsDelim(']') {
651 v1 = make([]*StatePlayer, 0, 8)
652 } else {
653 v1 = []*StatePlayer{}
654 }
655 } else {
656 v1 = (v1)[:0]
657 }
658 for !in.IsDelim(']') {
659 var v2 *StatePlayer
660 if in.IsNull() {
661 in.Skip()
662 v2 = nil
663 } else {
664 if v2 == nil {
665 v2 = new(StatePlayer)
666 }
667 (*v2).UnmarshalEasyJSON(in)
668 }
669 v1 = append(v1, v2)
670 in.WantComma()
671 }
672 in.Delim(']')
673 }
674 out.Teams = append(out.Teams, v1)
675 in.WantComma()
676 }
677 in.Delim(']')
678 }
679 case "turn":
680 out.Turn = game.Team(in.Int())
681 case "winner":
682 if in.IsNull() {
683 in.Skip()
684 out.Winner = nil
685 } else {
686 if out.Winner == nil {
687 out.Winner = new(game.Team)
688 }
689 *out.Winner = game.Team(in.Int())
690 }
691 case "board":
692 if in.IsNull() {
693 in.Skip()
694 out.Board = nil
695 } else {
696 in.Delim('[')
697 if out.Board == nil {
698 if !in.IsDelim(']') {
699 out.Board = make([][]*StateTile, 0, 2)
700 } else {
701 out.Board = [][]*StateTile{}
702 }
703 } else {
704 out.Board = (out.Board)[:0]
705 }
706 for !in.IsDelim(']') {
707 var v3 []*StateTile
708 if in.IsNull() {
709 in.Skip()
710 v3 = nil
711 } else {
712 in.Delim('[')
713 if v3 == nil {
714 if !in.IsDelim(']') {
715 v3 = make([]*StateTile, 0, 8)
716 } else {
717 v3 = []*StateTile{}
718 }
719 } else {
720 v3 = (v3)[:0]
721 }
722 for !in.IsDelim(']') {
723 var v4 *StateTile
724 if in.IsNull() {
725 in.Skip()
726 v4 = nil
727 } else {
728 if v4 == nil {
729 v4 = new(StateTile)
730 }
731 (*v4).UnmarshalEasyJSON(in)
732 }
733 v3 = append(v3, v4)
734 in.WantComma()
735 }
736 in.Delim(']')
737 }
738 out.Board = append(out.Board, v3)
739 in.WantComma()
740 }
741 in.Delim(']')
742 }
743 case "wordsLeft":
744 if in.IsNull() {
745 in.Skip()
746 out.WordsLeft = nil
747 } else {
748 in.Delim('[')
749 if out.WordsLeft == nil {
750 if !in.IsDelim(']') {
751 out.WordsLeft = make([]int, 0, 8)
752 } else {
753 out.WordsLeft = []int{}
754 }
755 } else {
756 out.WordsLeft = (out.WordsLeft)[:0]
757 }
758 for !in.IsDelim(']') {
759 var v5 int
760 v5 = int(in.Int())
761 out.WordsLeft = append(out.WordsLeft, v5)
762 in.WantComma()
763 }
764 in.Delim(']')
765 }
766 case "lists":
767 if in.IsNull() {
768 in.Skip()
769 out.Lists = nil
770 } else {
771 in.Delim('[')
772 if out.Lists == nil {
773 if !in.IsDelim(']') {
774 out.Lists = make([]*StateWordList, 0, 8)
775 } else {
776 out.Lists = []*StateWordList{}
777 }
778 } else {
779 out.Lists = (out.Lists)[:0]
780 }
781 for !in.IsDelim(']') {
782 var v6 *StateWordList
783 if in.IsNull() {
784 in.Skip()
785 v6 = nil
786 } else {
787 if v6 == nil {
788 v6 = new(StateWordList)
789 }
790 (*v6).UnmarshalEasyJSON(in)
791 }
792 out.Lists = append(out.Lists, v6)
793 in.WantComma()
794 }
795 in.Delim(']')
796 }
797 case "timer":
798 if in.IsNull() {
799 in.Skip()
800 out.Timer = nil
801 } else {
802 if out.Timer == nil {
803 out.Timer = new(StateTimer)
804 }
805 (*out.Timer).UnmarshalEasyJSON(in)
806 }
807 case "hideBomb":
808 out.HideBomb = bool(in.Bool())
809 default:
810 in.AddError(&jlexer.LexerError{
811 Offset: in.GetPos(),
812 Reason: "unknown field",
813 Data: key,
814 })
815 }
816 in.WantComma()
817 }
818 in.Delim('}')
819 if isTopLevel {
820 in.Consumed()
821 }
822}
823func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol7(out *jwriter.Writer, in State) {
824 out.RawByte('{')
825 first := true
826 _ = first
827 {
828 const prefix string = ",\"version\":"
829 out.RawString(prefix[1:])
830 out.Int(int(in.Version))
831 }
832 {
833 const prefix string = ",\"teams\":"
834 out.RawString(prefix)
835 if in.Teams == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
836 out.RawString("null")
837 } else {
838 out.RawByte('[')
839 for v7, v8 := range in.Teams {
840 if v7 > 0 {
841 out.RawByte(',')
842 }
843 if v8 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
844 out.RawString("null")
845 } else {
846 out.RawByte('[')
847 for v9, v10 := range v8 {
848 if v9 > 0 {
849 out.RawByte(',')
850 }
851 if v10 == nil {
852 out.RawString("null")
853 } else {
854 (*v10).MarshalEasyJSON(out)
855 }
856 }
857 out.RawByte(']')
858 }
859 }
860 out.RawByte(']')
861 }
862 }
863 {
864 const prefix string = ",\"turn\":"
865 out.RawString(prefix)
866 out.Int(int(in.Turn))
867 }
868 {
869 const prefix string = ",\"winner\":"
870 out.RawString(prefix)
871 if in.Winner == nil {
872 out.RawString("null")
873 } else {
874 out.Int(int(*in.Winner))
875 }
876 }
877 {
878 const prefix string = ",\"board\":"
879 out.RawString(prefix)
880 if in.Board == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
881 out.RawString("null")
882 } else {
883 out.RawByte('[')
884 for v11, v12 := range in.Board {
885 if v11 > 0 {
886 out.RawByte(',')
887 }
888 if v12 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
889 out.RawString("null")
890 } else {
891 out.RawByte('[')
892 for v13, v14 := range v12 {
893 if v13 > 0 {
894 out.RawByte(',')
895 }
896 if v14 == nil {
897 out.RawString("null")
898 } else {
899 (*v14).MarshalEasyJSON(out)
900 }
901 }
902 out.RawByte(']')
903 }
904 }
905 out.RawByte(']')
906 }
907 }
908 {
909 const prefix string = ",\"wordsLeft\":"
910 out.RawString(prefix)
911 if in.WordsLeft == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
912 out.RawString("null")
913 } else {
914 out.RawByte('[')
915 for v15, v16 := range in.WordsLeft {
916 if v15 > 0 {
917 out.RawByte(',')
918 }
919 out.Int(int(v16))
920 }
921 out.RawByte(']')
922 }
923 }
924 {
925 const prefix string = ",\"lists\":"
926 out.RawString(prefix)
927 if in.Lists == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
928 out.RawString("null")
929 } else {
930 out.RawByte('[')
931 for v17, v18 := range in.Lists {
932 if v17 > 0 {
933 out.RawByte(',')
934 }
935 if v18 == nil {
936 out.RawString("null")
937 } else {
938 (*v18).MarshalEasyJSON(out)
939 }
940 }
941 out.RawByte(']')
942 }
943 }
944 {
945 const prefix string = ",\"timer\":"
946 out.RawString(prefix)
947 if in.Timer == nil {
948 out.RawString("null")
949 } else {
950 (*in.Timer).MarshalEasyJSON(out)
951 }
952 }
953 {
954 const prefix string = ",\"hideBomb\":"
955 out.RawString(prefix)
956 out.Bool(bool(in.HideBomb))
957 }
958 out.RawByte('}')
959}
960
961// MarshalJSON supports json.Marshaler interface
962func (v State) MarshalJSON() ([]byte, error) {
963 w := jwriter.Writer{}
964 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol7(&w, v)
965 return w.Buffer.BuildBytes(), w.Error
966}
967
968// MarshalEasyJSON supports easyjson.Marshaler interface
969func (v State) MarshalEasyJSON(w *jwriter.Writer) {
970 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol7(w, v)
971}
972
973// UnmarshalJSON supports json.Unmarshaler interface
974func (v *State) UnmarshalJSON(data []byte) error {
975 r := jlexer.Lexer{Data: data}
976 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol7(&r, v)
977 return r.Error()
978}
979
980// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
981func (v *State) UnmarshalEasyJSON(l *jlexer.Lexer) {
982 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol7(l, v)
983}
984func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol8(in *jlexer.Lexer, out *ServerNote) {
985 isTopLevel := in.IsStart()
986 if in.IsNull() {
987 if isTopLevel {
988 in.Consumed()
989 }
990 in.Skip()
991 return
992 }
993 in.Delim('{')
994 for !in.IsDelim('}') {
995 key := in.UnsafeString()
996 in.WantColon()
997 if in.IsNull() {
998 in.Skip()
999 in.WantComma()
1000 continue
1001 }
1002 switch key {
1003 case "method":
1004 out.Method = ServerMethod(in.String())
1005 case "params":
1006 if m, ok := out.Params.(easyjson.Unmarshaler); ok {
1007 m.UnmarshalEasyJSON(in)
1008 } else if m, ok := out.Params.(json.Unmarshaler); ok {
1009 _ = m.UnmarshalJSON(in.Raw())
1010 } else {
1011 out.Params = in.Interface()
1012 }
1013 default:
1014 in.AddError(&jlexer.LexerError{
1015 Offset: in.GetPos(),
1016 Reason: "unknown field",
1017 Data: key,
1018 })
1019 }
1020 in.WantComma()
1021 }
1022 in.Delim('}')
1023 if isTopLevel {
1024 in.Consumed()
1025 }
1026}
1027func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol8(out *jwriter.Writer, in ServerNote) {
1028 out.RawByte('{')
1029 first := true
1030 _ = first
1031 {
1032 const prefix string = ",\"method\":"
1033 out.RawString(prefix[1:])
1034 out.String(string(in.Method))
1035 }
1036 {
1037 const prefix string = ",\"params\":"
1038 out.RawString(prefix)
1039 if m, ok := in.Params.(easyjson.Marshaler); ok {
1040 m.MarshalEasyJSON(out)
1041 } else if m, ok := in.Params.(json.Marshaler); ok {
1042 out.Raw(m.MarshalJSON())
1043 } else {
1044 out.Raw(json.Marshal(in.Params))
1045 }
1046 }
1047 out.RawByte('}')
1048}
1049
1050// MarshalJSON supports json.Marshaler interface
1051func (v ServerNote) MarshalJSON() ([]byte, error) {
1052 w := jwriter.Writer{}
1053 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol8(&w, v)
1054 return w.Buffer.BuildBytes(), w.Error
1055}
1056
1057// MarshalEasyJSON supports easyjson.Marshaler interface
1058func (v ServerNote) MarshalEasyJSON(w *jwriter.Writer) {
1059 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol8(w, v)
1060}
1061
1062// UnmarshalJSON supports json.Unmarshaler interface
1063func (v *ServerNote) UnmarshalJSON(data []byte) error {
1064 r := jlexer.Lexer{Data: data}
1065 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol8(&r, v)
1066 return r.Error()
1067}
1068
1069// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
1070func (v *ServerNote) UnmarshalEasyJSON(l *jlexer.Lexer) {
1071 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol8(l, v)
1072}
1073func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol9(in *jlexer.Lexer, out *RoomResponse) {
1074 isTopLevel := in.IsStart()
1075 if in.IsNull() {
1076 if isTopLevel {
1077 in.Consumed()
1078 }
1079 in.Skip()
1080 return
1081 }
1082 in.Delim('{')
1083 for !in.IsDelim('}') {
1084 key := in.UnsafeString()
1085 in.WantColon()
1086 if in.IsNull() {
1087 in.Skip()
1088 in.WantComma()
1089 continue
1090 }
1091 switch key {
1092 case "id":
1093 if in.IsNull() {
1094 in.Skip()
1095 out.ID = nil
1096 } else {
1097 if out.ID == nil {
1098 out.ID = new(string)
1099 }
1100 *out.ID = string(in.String())
1101 }
1102 case "error":
1103 if in.IsNull() {
1104 in.Skip()
1105 out.Error = nil
1106 } else {
1107 if out.Error == nil {
1108 out.Error = new(string)
1109 }
1110 *out.Error = string(in.String())
1111 }
1112 default:
1113 in.AddError(&jlexer.LexerError{
1114 Offset: in.GetPos(),
1115 Reason: "unknown field",
1116 Data: key,
1117 })
1118 }
1119 in.WantComma()
1120 }
1121 in.Delim('}')
1122 if isTopLevel {
1123 in.Consumed()
1124 }
1125}
1126func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol9(out *jwriter.Writer, in RoomResponse) {
1127 out.RawByte('{')
1128 first := true
1129 _ = first
1130 if in.ID != nil {
1131 const prefix string = ",\"id\":"
1132 first = false
1133 out.RawString(prefix[1:])
1134 out.String(string(*in.ID))
1135 }
1136 if in.Error != nil {
1137 const prefix string = ",\"error\":"
1138 if first {
1139 first = false
1140 out.RawString(prefix[1:])
1141 } else {
1142 out.RawString(prefix)
1143 }
1144 out.String(string(*in.Error))
1145 }
1146 out.RawByte('}')
1147}
1148
1149// MarshalJSON supports json.Marshaler interface
1150func (v RoomResponse) MarshalJSON() ([]byte, error) {
1151 w := jwriter.Writer{}
1152 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol9(&w, v)
1153 return w.Buffer.BuildBytes(), w.Error
1154}
1155
1156// MarshalEasyJSON supports easyjson.Marshaler interface
1157func (v RoomResponse) MarshalEasyJSON(w *jwriter.Writer) {
1158 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol9(w, v)
1159}
1160
1161// UnmarshalJSON supports json.Unmarshaler interface
1162func (v *RoomResponse) UnmarshalJSON(data []byte) error {
1163 r := jlexer.Lexer{Data: data}
1164 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol9(&r, v)
1165 return r.Error()
1166}
1167
1168// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
1169func (v *RoomResponse) UnmarshalEasyJSON(l *jlexer.Lexer) {
1170 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol9(l, v)
1171}
1172func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol10(in *jlexer.Lexer, out *RoomRequest) {
1173 isTopLevel := in.IsStart()
1174 if in.IsNull() {
1175 if isTopLevel {
1176 in.Consumed()
1177 }
1178 in.Skip()
1179 return
1180 }
1181 in.Delim('{')
1182 for !in.IsDelim('}') {
1183 key := in.UnsafeString()
1184 in.WantColon()
1185 if in.IsNull() {
1186 in.Skip()
1187 in.WantComma()
1188 continue
1189 }
1190 switch key {
1191 case "roomName":
1192 out.RoomName = string(in.String())
1193 case "roomPass":
1194 out.RoomPass = string(in.String())
1195 case "create":
1196 out.Create = bool(in.Bool())
1197 default:
1198 in.AddError(&jlexer.LexerError{
1199 Offset: in.GetPos(),
1200 Reason: "unknown field",
1201 Data: key,
1202 })
1203 }
1204 in.WantComma()
1205 }
1206 in.Delim('}')
1207 if isTopLevel {
1208 in.Consumed()
1209 }
1210}
1211func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol10(out *jwriter.Writer, in RoomRequest) {
1212 out.RawByte('{')
1213 first := true
1214 _ = first
1215 {
1216 const prefix string = ",\"roomName\":"
1217 out.RawString(prefix[1:])
1218 out.String(string(in.RoomName))
1219 }
1220 {
1221 const prefix string = ",\"roomPass\":"
1222 out.RawString(prefix)
1223 out.String(string(in.RoomPass))
1224 }
1225 {
1226 const prefix string = ",\"create\":"
1227 out.RawString(prefix)
1228 out.Bool(bool(in.Create))
1229 }
1230 out.RawByte('}')
1231}
1232
1233// MarshalJSON supports json.Marshaler interface
1234func (v RoomRequest) MarshalJSON() ([]byte, error) {
1235 w := jwriter.Writer{}
1236 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol10(&w, v)
1237 return w.Buffer.BuildBytes(), w.Error
1238}
1239
1240// MarshalEasyJSON supports easyjson.Marshaler interface
1241func (v RoomRequest) MarshalEasyJSON(w *jwriter.Writer) {
1242 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol10(w, v)
1243}
1244
1245// UnmarshalJSON supports json.Unmarshaler interface
1246func (v *RoomRequest) UnmarshalJSON(data []byte) error {
1247 r := jlexer.Lexer{Data: data}
1248 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol10(&r, v)
1249 return r.Error()
1250}
1251
1252// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
1253func (v *RoomRequest) UnmarshalEasyJSON(l *jlexer.Lexer) {
1254 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol10(l, v)
1255}
1256func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol11(in *jlexer.Lexer, out *RevealParams) {
1257 isTopLevel := in.IsStart()
1258 if in.IsNull() {
1259 if isTopLevel {
1260 in.Consumed()
1261 }
1262 in.Skip()
1263 return
1264 }
1265 in.Delim('{')
1266 for !in.IsDelim('}') {
1267 key := in.UnsafeString()
1268 in.WantColon()
1269 if in.IsNull() {
1270 in.Skip()
1271 in.WantComma()
1272 continue
1273 }
1274 switch key {
1275 case "row":
1276 out.Row = int(in.Int())
1277 case "col":
1278 out.Col = int(in.Int())
1279 default:
1280 in.AddError(&jlexer.LexerError{
1281 Offset: in.GetPos(),
1282 Reason: "unknown field",
1283 Data: key,
1284 })
1285 }
1286 in.WantComma()
1287 }
1288 in.Delim('}')
1289 if isTopLevel {
1290 in.Consumed()
1291 }
1292}
1293func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol11(out *jwriter.Writer, in RevealParams) {
1294 out.RawByte('{')
1295 first := true
1296 _ = first
1297 {
1298 const prefix string = ",\"row\":"
1299 out.RawString(prefix[1:])
1300 out.Int(int(in.Row))
1301 }
1302 {
1303 const prefix string = ",\"col\":"
1304 out.RawString(prefix)
1305 out.Int(int(in.Col))
1306 }
1307 out.RawByte('}')
1308}
1309
1310// MarshalJSON supports json.Marshaler interface
1311func (v RevealParams) MarshalJSON() ([]byte, error) {
1312 w := jwriter.Writer{}
1313 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol11(&w, v)
1314 return w.Buffer.BuildBytes(), w.Error
1315}
1316
1317// MarshalEasyJSON supports easyjson.Marshaler interface
1318func (v RevealParams) MarshalEasyJSON(w *jwriter.Writer) {
1319 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol11(w, v)
1320}
1321
1322// UnmarshalJSON supports json.Unmarshaler interface
1323func (v *RevealParams) UnmarshalJSON(data []byte) error {
1324 r := jlexer.Lexer{Data: data}
1325 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol11(&r, v)
1326 return r.Error()
1327}
1328
1329// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
1330func (v *RevealParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
1331 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol11(l, v)
1332}
1333func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol12(in *jlexer.Lexer, out *RemovePackParams) {
1334 isTopLevel := in.IsStart()
1335 if in.IsNull() {
1336 if isTopLevel {
1337 in.Consumed()
1338 }
1339 in.Skip()
1340 return
1341 }
1342 in.Delim('{')
1343 for !in.IsDelim('}') {
1344 key := in.UnsafeString()
1345 in.WantColon()
1346 if in.IsNull() {
1347 in.Skip()
1348 in.WantComma()
1349 continue
1350 }
1351 switch key {
1352 case "num":
1353 out.Num = int(in.Int())
1354 default:
1355 in.AddError(&jlexer.LexerError{
1356 Offset: in.GetPos(),
1357 Reason: "unknown field",
1358 Data: key,
1359 })
1360 }
1361 in.WantComma()
1362 }
1363 in.Delim('}')
1364 if isTopLevel {
1365 in.Consumed()
1366 }
1367}
1368func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol12(out *jwriter.Writer, in RemovePackParams) {
1369 out.RawByte('{')
1370 first := true
1371 _ = first
1372 {
1373 const prefix string = ",\"num\":"
1374 out.RawString(prefix[1:])
1375 out.Int(int(in.Num))
1376 }
1377 out.RawByte('}')
1378}
1379
1380// MarshalJSON supports json.Marshaler interface
1381func (v RemovePackParams) MarshalJSON() ([]byte, error) {
1382 w := jwriter.Writer{}
1383 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol12(&w, v)
1384 return w.Buffer.BuildBytes(), w.Error
1385}
1386
1387// MarshalEasyJSON supports easyjson.Marshaler interface
1388func (v RemovePackParams) MarshalEasyJSON(w *jwriter.Writer) {
1389 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol12(w, v)
1390}
1391
1392// UnmarshalJSON supports json.Unmarshaler interface
1393func (v *RemovePackParams) UnmarshalJSON(data []byte) error {
1394 r := jlexer.Lexer{Data: data}
1395 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol12(&r, v)
1396 return r.Error()
1397}
1398
1399// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
1400func (v *RemovePackParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
1401 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol12(l, v)
1402}
1403func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol13(in *jlexer.Lexer, out *RandomizeTeamsParams) {
1404 isTopLevel := in.IsStart()
1405 if in.IsNull() {
1406 if isTopLevel {
1407 in.Consumed()
1408 }
1409 in.Skip()
1410 return
1411 }
1412 in.Delim('{')
1413 for !in.IsDelim('}') {
1414 key := in.UnsafeString()
1415 in.WantColon()
1416 if in.IsNull() {
1417 in.Skip()
1418 in.WantComma()
1419 continue
1420 }
1421 switch key {
1422 default:
1423 in.AddError(&jlexer.LexerError{
1424 Offset: in.GetPos(),
1425 Reason: "unknown field",
1426 Data: key,
1427 })
1428 }
1429 in.WantComma()
1430 }
1431 in.Delim('}')
1432 if isTopLevel {
1433 in.Consumed()
1434 }
1435}
1436func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol13(out *jwriter.Writer, in RandomizeTeamsParams) {
1437 out.RawByte('{')
1438 first := true
1439 _ = first
1440 out.RawByte('}')
1441}
1442
1443// MarshalJSON supports json.Marshaler interface
1444func (v RandomizeTeamsParams) MarshalJSON() ([]byte, error) {
1445 w := jwriter.Writer{}
1446 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol13(&w, v)
1447 return w.Buffer.BuildBytes(), w.Error
1448}
1449
1450// MarshalEasyJSON supports easyjson.Marshaler interface
1451func (v RandomizeTeamsParams) MarshalEasyJSON(w *jwriter.Writer) {
1452 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol13(w, v)
1453}
1454
1455// UnmarshalJSON supports json.Unmarshaler interface
1456func (v *RandomizeTeamsParams) UnmarshalJSON(data []byte) error {
1457 r := jlexer.Lexer{Data: data}
1458 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol13(&r, v)
1459 return r.Error()
1460}
1461
1462// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
1463func (v *RandomizeTeamsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
1464 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol13(l, v)
1465}
1466func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol14(in *jlexer.Lexer, out *NewGameParams) {
1467 isTopLevel := in.IsStart()
1468 if in.IsNull() {
1469 if isTopLevel {
1470 in.Consumed()
1471 }
1472 in.Skip()
1473 return
1474 }
1475 in.Delim('{')
1476 for !in.IsDelim('}') {
1477 key := in.UnsafeString()
1478 in.WantColon()
1479 if in.IsNull() {
1480 in.Skip()
1481 in.WantComma()
1482 continue
1483 }
1484 switch key {
1485 default:
1486 in.AddError(&jlexer.LexerError{
1487 Offset: in.GetPos(),
1488 Reason: "unknown field",
1489 Data: key,
1490 })
1491 }
1492 in.WantComma()
1493 }
1494 in.Delim('}')
1495 if isTopLevel {
1496 in.Consumed()
1497 }
1498}
1499func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol14(out *jwriter.Writer, in NewGameParams) {
1500 out.RawByte('{')
1501 first := true
1502 _ = first
1503 out.RawByte('}')
1504}
1505
1506// MarshalJSON supports json.Marshaler interface
1507func (v NewGameParams) MarshalJSON() ([]byte, error) {
1508 w := jwriter.Writer{}
1509 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol14(&w, v)
1510 return w.Buffer.BuildBytes(), w.Error
1511}
1512
1513// MarshalEasyJSON supports easyjson.Marshaler interface
1514func (v NewGameParams) MarshalEasyJSON(w *jwriter.Writer) {
1515 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol14(w, v)
1516}
1517
1518// UnmarshalJSON supports json.Unmarshaler interface
1519func (v *NewGameParams) UnmarshalJSON(data []byte) error {
1520 r := jlexer.Lexer{Data: data}
1521 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol14(&r, v)
1522 return r.Error()
1523}
1524
1525// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
1526func (v *NewGameParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
1527 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol14(l, v)
1528}
1529func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol15(in *jlexer.Lexer, out *EndTurnParams) {
1530 isTopLevel := in.IsStart()
1531 if in.IsNull() {
1532 if isTopLevel {
1533 in.Consumed()
1534 }
1535 in.Skip()
1536 return
1537 }
1538 in.Delim('{')
1539 for !in.IsDelim('}') {
1540 key := in.UnsafeString()
1541 in.WantColon()
1542 if in.IsNull() {
1543 in.Skip()
1544 in.WantComma()
1545 continue
1546 }
1547 switch key {
1548 default:
1549 in.AddError(&jlexer.LexerError{
1550 Offset: in.GetPos(),
1551 Reason: "unknown field",
1552 Data: key,
1553 })
1554 }
1555 in.WantComma()
1556 }
1557 in.Delim('}')
1558 if isTopLevel {
1559 in.Consumed()
1560 }
1561}
1562func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol15(out *jwriter.Writer, in EndTurnParams) {
1563 out.RawByte('{')
1564 first := true
1565 _ = first
1566 out.RawByte('}')
1567}
1568
1569// MarshalJSON supports json.Marshaler interface
1570func (v EndTurnParams) MarshalJSON() ([]byte, error) {
1571 w := jwriter.Writer{}
1572 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol15(&w, v)
1573 return w.Buffer.BuildBytes(), w.Error
1574}
1575
1576// MarshalEasyJSON supports easyjson.Marshaler interface
1577func (v EndTurnParams) MarshalEasyJSON(w *jwriter.Writer) {
1578 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol15(w, v)
1579}
1580
1581// UnmarshalJSON supports json.Unmarshaler interface
1582func (v *EndTurnParams) UnmarshalJSON(data []byte) error {
1583 r := jlexer.Lexer{Data: data}
1584 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol15(&r, v)
1585 return r.Error()
1586}
1587
1588// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
1589func (v *EndTurnParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
1590 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol15(l, v)
1591}
1592func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol16(in *jlexer.Lexer, out *ClientNote) {
1593 isTopLevel := in.IsStart()
1594 if in.IsNull() {
1595 if isTopLevel {
1596 in.Consumed()
1597 }
1598 in.Skip()
1599 return
1600 }
1601 in.Delim('{')
1602 for !in.IsDelim('}') {
1603 key := in.UnsafeString()
1604 in.WantColon()
1605 if in.IsNull() {
1606 in.Skip()
1607 in.WantComma()
1608 continue
1609 }
1610 switch key {
1611 case "method":
1612 out.Method = ClientMethod(in.String())
1613 case "version":
1614 out.Version = int(in.Int())
1615 case "params":
1616 (out.Params).UnmarshalEasyJSON(in)
1617 default:
1618 in.AddError(&jlexer.LexerError{
1619 Offset: in.GetPos(),
1620 Reason: "unknown field",
1621 Data: key,
1622 })
1623 }
1624 in.WantComma()
1625 }
1626 in.Delim('}')
1627 if isTopLevel {
1628 in.Consumed()
1629 }
1630}
1631func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol16(out *jwriter.Writer, in ClientNote) {
1632 out.RawByte('{')
1633 first := true
1634 _ = first
1635 {
1636 const prefix string = ",\"method\":"
1637 out.RawString(prefix[1:])
1638 out.String(string(in.Method))
1639 }
1640 {
1641 const prefix string = ",\"version\":"
1642 out.RawString(prefix)
1643 out.Int(int(in.Version))
1644 }
1645 {
1646 const prefix string = ",\"params\":"
1647 out.RawString(prefix)
1648 (in.Params).MarshalEasyJSON(out)
1649 }
1650 out.RawByte('}')
1651}
1652
1653// MarshalJSON supports json.Marshaler interface
1654func (v ClientNote) MarshalJSON() ([]byte, error) {
1655 w := jwriter.Writer{}
1656 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol16(&w, v)
1657 return w.Buffer.BuildBytes(), w.Error
1658}
1659
1660// MarshalEasyJSON supports easyjson.Marshaler interface
1661func (v ClientNote) MarshalEasyJSON(w *jwriter.Writer) {
1662 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol16(w, v)
1663}
1664
1665// UnmarshalJSON supports json.Unmarshaler interface
1666func (v *ClientNote) UnmarshalJSON(data []byte) error {
1667 r := jlexer.Lexer{Data: data}
1668 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol16(&r, v)
1669 return r.Error()
1670}
1671
1672// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
1673func (v *ClientNote) UnmarshalEasyJSON(l *jlexer.Lexer) {
1674 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol16(l, v)
1675}
1676func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol17(in *jlexer.Lexer, out *ChangeTurnTimeParams) {
1677 isTopLevel := in.IsStart()
1678 if in.IsNull() {
1679 if isTopLevel {
1680 in.Consumed()
1681 }
1682 in.Skip()
1683 return
1684 }
1685 in.Delim('{')
1686 for !in.IsDelim('}') {
1687 key := in.UnsafeString()
1688 in.WantColon()
1689 if in.IsNull() {
1690 in.Skip()
1691 in.WantComma()
1692 continue
1693 }
1694 switch key {
1695 case "seconds":
1696 out.Seconds = int(in.Int())
1697 default:
1698 in.AddError(&jlexer.LexerError{
1699 Offset: in.GetPos(),
1700 Reason: "unknown field",
1701 Data: key,
1702 })
1703 }
1704 in.WantComma()
1705 }
1706 in.Delim('}')
1707 if isTopLevel {
1708 in.Consumed()
1709 }
1710}
1711func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol17(out *jwriter.Writer, in ChangeTurnTimeParams) {
1712 out.RawByte('{')
1713 first := true
1714 _ = first
1715 {
1716 const prefix string = ",\"seconds\":"
1717 out.RawString(prefix[1:])
1718 out.Int(int(in.Seconds))
1719 }
1720 out.RawByte('}')
1721}
1722
1723// MarshalJSON supports json.Marshaler interface
1724func (v ChangeTurnTimeParams) MarshalJSON() ([]byte, error) {
1725 w := jwriter.Writer{}
1726 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol17(&w, v)
1727 return w.Buffer.BuildBytes(), w.Error
1728}
1729
1730// MarshalEasyJSON supports easyjson.Marshaler interface
1731func (v ChangeTurnTimeParams) MarshalEasyJSON(w *jwriter.Writer) {
1732 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol17(w, v)
1733}
1734
1735// UnmarshalJSON supports json.Unmarshaler interface
1736func (v *ChangeTurnTimeParams) UnmarshalJSON(data []byte) error {
1737 r := jlexer.Lexer{Data: data}
1738 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol17(&r, v)
1739 return r.Error()
1740}
1741
1742// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
1743func (v *ChangeTurnTimeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
1744 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol17(l, v)
1745}
1746func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol18(in *jlexer.Lexer, out *ChangeTurnModeParams) {
1747 isTopLevel := in.IsStart()
1748 if in.IsNull() {
1749 if isTopLevel {
1750 in.Consumed()
1751 }
1752 in.Skip()
1753 return
1754 }
1755 in.Delim('{')
1756 for !in.IsDelim('}') {
1757 key := in.UnsafeString()
1758 in.WantColon()
1759 if in.IsNull() {
1760 in.Skip()
1761 in.WantComma()
1762 continue
1763 }
1764 switch key {
1765 case "timed":
1766 out.Timed = bool(in.Bool())
1767 default:
1768 in.AddError(&jlexer.LexerError{
1769 Offset: in.GetPos(),
1770 Reason: "unknown field",
1771 Data: key,
1772 })
1773 }
1774 in.WantComma()
1775 }
1776 in.Delim('}')
1777 if isTopLevel {
1778 in.Consumed()
1779 }
1780}
1781func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol18(out *jwriter.Writer, in ChangeTurnModeParams) {
1782 out.RawByte('{')
1783 first := true
1784 _ = first
1785 {
1786 const prefix string = ",\"timed\":"
1787 out.RawString(prefix[1:])
1788 out.Bool(bool(in.Timed))
1789 }
1790 out.RawByte('}')
1791}
1792
1793// MarshalJSON supports json.Marshaler interface
1794func (v ChangeTurnModeParams) MarshalJSON() ([]byte, error) {
1795 w := jwriter.Writer{}
1796 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol18(&w, v)
1797 return w.Buffer.BuildBytes(), w.Error
1798}
1799
1800// MarshalEasyJSON supports easyjson.Marshaler interface
1801func (v ChangeTurnModeParams) MarshalEasyJSON(w *jwriter.Writer) {
1802 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol18(w, v)
1803}
1804
1805// UnmarshalJSON supports json.Unmarshaler interface
1806func (v *ChangeTurnModeParams) UnmarshalJSON(data []byte) error {
1807 r := jlexer.Lexer{Data: data}
1808 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol18(&r, v)
1809 return r.Error()
1810}
1811
1812// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
1813func (v *ChangeTurnModeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
1814 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol18(l, v)
1815}
1816func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol19(in *jlexer.Lexer, out *ChangeTeamParams) {
1817 isTopLevel := in.IsStart()
1818 if in.IsNull() {
1819 if isTopLevel {
1820 in.Consumed()
1821 }
1822 in.Skip()
1823 return
1824 }
1825 in.Delim('{')
1826 for !in.IsDelim('}') {
1827 key := in.UnsafeString()
1828 in.WantColon()
1829 if in.IsNull() {
1830 in.Skip()
1831 in.WantComma()
1832 continue
1833 }
1834 switch key {
1835 case "team":
1836 out.Team = game.Team(in.Int())
1837 default:
1838 in.AddError(&jlexer.LexerError{
1839 Offset: in.GetPos(),
1840 Reason: "unknown field",
1841 Data: key,
1842 })
1843 }
1844 in.WantComma()
1845 }
1846 in.Delim('}')
1847 if isTopLevel {
1848 in.Consumed()
1849 }
1850}
1851func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol19(out *jwriter.Writer, in ChangeTeamParams) {
1852 out.RawByte('{')
1853 first := true
1854 _ = first
1855 {
1856 const prefix string = ",\"team\":"
1857 out.RawString(prefix[1:])
1858 out.Int(int(in.Team))
1859 }
1860 out.RawByte('}')
1861}
1862
1863// MarshalJSON supports json.Marshaler interface
1864func (v ChangeTeamParams) MarshalJSON() ([]byte, error) {
1865 w := jwriter.Writer{}
1866 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol19(&w, v)
1867 return w.Buffer.BuildBytes(), w.Error
1868}
1869
1870// MarshalEasyJSON supports easyjson.Marshaler interface
1871func (v ChangeTeamParams) MarshalEasyJSON(w *jwriter.Writer) {
1872 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol19(w, v)
1873}
1874
1875// UnmarshalJSON supports json.Unmarshaler interface
1876func (v *ChangeTeamParams) UnmarshalJSON(data []byte) error {
1877 r := jlexer.Lexer{Data: data}
1878 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol19(&r, v)
1879 return r.Error()
1880}
1881
1882// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
1883func (v *ChangeTeamParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
1884 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol19(l, v)
1885}
1886func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol20(in *jlexer.Lexer, out *ChangeRoleParams) {
1887 isTopLevel := in.IsStart()
1888 if in.IsNull() {
1889 if isTopLevel {
1890 in.Consumed()
1891 }
1892 in.Skip()
1893 return
1894 }
1895 in.Delim('{')
1896 for !in.IsDelim('}') {
1897 key := in.UnsafeString()
1898 in.WantColon()
1899 if in.IsNull() {
1900 in.Skip()
1901 in.WantComma()
1902 continue
1903 }
1904 switch key {
1905 case "spymaster":
1906 out.Spymaster = bool(in.Bool())
1907 default:
1908 in.AddError(&jlexer.LexerError{
1909 Offset: in.GetPos(),
1910 Reason: "unknown field",
1911 Data: key,
1912 })
1913 }
1914 in.WantComma()
1915 }
1916 in.Delim('}')
1917 if isTopLevel {
1918 in.Consumed()
1919 }
1920}
1921func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol20(out *jwriter.Writer, in ChangeRoleParams) {
1922 out.RawByte('{')
1923 first := true
1924 _ = first
1925 {
1926 const prefix string = ",\"spymaster\":"
1927 out.RawString(prefix[1:])
1928 out.Bool(bool(in.Spymaster))
1929 }
1930 out.RawByte('}')
1931}
1932
1933// MarshalJSON supports json.Marshaler interface
1934func (v ChangeRoleParams) MarshalJSON() ([]byte, error) {
1935 w := jwriter.Writer{}
1936 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol20(&w, v)
1937 return w.Buffer.BuildBytes(), w.Error
1938}
1939
1940// MarshalEasyJSON supports easyjson.Marshaler interface
1941func (v ChangeRoleParams) MarshalEasyJSON(w *jwriter.Writer) {
1942 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol20(w, v)
1943}
1944
1945// UnmarshalJSON supports json.Unmarshaler interface
1946func (v *ChangeRoleParams) UnmarshalJSON(data []byte) error {
1947 r := jlexer.Lexer{Data: data}
1948 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol20(&r, v)
1949 return r.Error()
1950}
1951
1952// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
1953func (v *ChangeRoleParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
1954 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol20(l, v)
1955}
1956func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol21(in *jlexer.Lexer, out *ChangePackParams) {
1957 isTopLevel := in.IsStart()
1958 if in.IsNull() {
1959 if isTopLevel {
1960 in.Consumed()
1961 }
1962 in.Skip()
1963 return
1964 }
1965 in.Delim('{')
1966 for !in.IsDelim('}') {
1967 key := in.UnsafeString()
1968 in.WantColon()
1969 if in.IsNull() {
1970 in.Skip()
1971 in.WantComma()
1972 continue
1973 }
1974 switch key {
1975 case "num":
1976 out.Num = int(in.Int())
1977 case "enable":
1978 out.Enable = bool(in.Bool())
1979 default:
1980 in.AddError(&jlexer.LexerError{
1981 Offset: in.GetPos(),
1982 Reason: "unknown field",
1983 Data: key,
1984 })
1985 }
1986 in.WantComma()
1987 }
1988 in.Delim('}')
1989 if isTopLevel {
1990 in.Consumed()
1991 }
1992}
1993func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol21(out *jwriter.Writer, in ChangePackParams) {
1994 out.RawByte('{')
1995 first := true
1996 _ = first
1997 {
1998 const prefix string = ",\"num\":"
1999 out.RawString(prefix[1:])
2000 out.Int(int(in.Num))
2001 }
2002 {
2003 const prefix string = ",\"enable\":"
2004 out.RawString(prefix)
2005 out.Bool(bool(in.Enable))
2006 }
2007 out.RawByte('}')
2008}
2009
2010// MarshalJSON supports json.Marshaler interface
2011func (v ChangePackParams) MarshalJSON() ([]byte, error) {
2012 w := jwriter.Writer{}
2013 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol21(&w, v)
2014 return w.Buffer.BuildBytes(), w.Error
2015}
2016
2017// MarshalEasyJSON supports easyjson.Marshaler interface
2018func (v ChangePackParams) MarshalEasyJSON(w *jwriter.Writer) {
2019 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol21(w, v)
2020}
2021
2022// UnmarshalJSON supports json.Unmarshaler interface
2023func (v *ChangePackParams) UnmarshalJSON(data []byte) error {
2024 r := jlexer.Lexer{Data: data}
2025 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol21(&r, v)
2026 return r.Error()
2027}
2028
2029// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
2030func (v *ChangePackParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
2031 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol21(l, v)
2032}
2033func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol22(in *jlexer.Lexer, out *ChangeNicknameParams) {
2034 isTopLevel := in.IsStart()
2035 if in.IsNull() {
2036 if isTopLevel {
2037 in.Consumed()
2038 }
2039 in.Skip()
2040 return
2041 }
2042 in.Delim('{')
2043 for !in.IsDelim('}') {
2044 key := in.UnsafeString()
2045 in.WantColon()
2046 if in.IsNull() {
2047 in.Skip()
2048 in.WantComma()
2049 continue
2050 }
2051 switch key {
2052 case "nickname":
2053 out.Nickname = string(in.String())
2054 default:
2055 in.AddError(&jlexer.LexerError{
2056 Offset: in.GetPos(),
2057 Reason: "unknown field",
2058 Data: key,
2059 })
2060 }
2061 in.WantComma()
2062 }
2063 in.Delim('}')
2064 if isTopLevel {
2065 in.Consumed()
2066 }
2067}
2068func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol22(out *jwriter.Writer, in ChangeNicknameParams) {
2069 out.RawByte('{')
2070 first := true
2071 _ = first
2072 {
2073 const prefix string = ",\"nickname\":"
2074 out.RawString(prefix[1:])
2075 out.String(string(in.Nickname))
2076 }
2077 out.RawByte('}')
2078}
2079
2080// MarshalJSON supports json.Marshaler interface
2081func (v ChangeNicknameParams) MarshalJSON() ([]byte, error) {
2082 w := jwriter.Writer{}
2083 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol22(&w, v)
2084 return w.Buffer.BuildBytes(), w.Error
2085}
2086
2087// MarshalEasyJSON supports easyjson.Marshaler interface
2088func (v ChangeNicknameParams) MarshalEasyJSON(w *jwriter.Writer) {
2089 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol22(w, v)
2090}
2091
2092// UnmarshalJSON supports json.Unmarshaler interface
2093func (v *ChangeNicknameParams) UnmarshalJSON(data []byte) error {
2094 r := jlexer.Lexer{Data: data}
2095 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol22(&r, v)
2096 return r.Error()
2097}
2098
2099// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
2100func (v *ChangeNicknameParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
2101 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol22(l, v)
2102}
2103func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol23(in *jlexer.Lexer, out *ChangeHideBombParams) {
2104 isTopLevel := in.IsStart()
2105 if in.IsNull() {
2106 if isTopLevel {
2107 in.Consumed()
2108 }
2109 in.Skip()
2110 return
2111 }
2112 in.Delim('{')
2113 for !in.IsDelim('}') {
2114 key := in.UnsafeString()
2115 in.WantColon()
2116 if in.IsNull() {
2117 in.Skip()
2118 in.WantComma()
2119 continue
2120 }
2121 switch key {
2122 case "hideBomb":
2123 out.HideBomb = bool(in.Bool())
2124 default:
2125 in.AddError(&jlexer.LexerError{
2126 Offset: in.GetPos(),
2127 Reason: "unknown field",
2128 Data: key,
2129 })
2130 }
2131 in.WantComma()
2132 }
2133 in.Delim('}')
2134 if isTopLevel {
2135 in.Consumed()
2136 }
2137}
2138func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol23(out *jwriter.Writer, in ChangeHideBombParams) {
2139 out.RawByte('{')
2140 first := true
2141 _ = first
2142 {
2143 const prefix string = ",\"hideBomb\":"
2144 out.RawString(prefix[1:])
2145 out.Bool(bool(in.HideBomb))
2146 }
2147 out.RawByte('}')
2148}
2149
2150// MarshalJSON supports json.Marshaler interface
2151func (v ChangeHideBombParams) MarshalJSON() ([]byte, error) {
2152 w := jwriter.Writer{}
2153 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol23(&w, v)
2154 return w.Buffer.BuildBytes(), w.Error
2155}
2156
2157// MarshalEasyJSON supports easyjson.Marshaler interface
2158func (v ChangeHideBombParams) MarshalEasyJSON(w *jwriter.Writer) {
2159 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol23(w, v)
2160}
2161
2162// UnmarshalJSON supports json.Unmarshaler interface
2163func (v *ChangeHideBombParams) UnmarshalJSON(data []byte) error {
2164 r := jlexer.Lexer{Data: data}
2165 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol23(&r, v)
2166 return r.Error()
2167}
2168
2169// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
2170func (v *ChangeHideBombParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
2171 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol23(l, v)
2172}
2173func easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol24(in *jlexer.Lexer, out *AddPacksParams) {
2174 isTopLevel := in.IsStart()
2175 if in.IsNull() {
2176 if isTopLevel {
2177 in.Consumed()
2178 }
2179 in.Skip()
2180 return
2181 }
2182 in.Delim('{')
2183 for !in.IsDelim('}') {
2184 key := in.UnsafeString()
2185 in.WantColon()
2186 if in.IsNull() {
2187 in.Skip()
2188 in.WantComma()
2189 continue
2190 }
2191 switch key {
2192 case "packs":
2193 if in.IsNull() {
2194 in.Skip()
2195 out.Packs = nil
2196 } else {
2197 in.Delim('[')
2198 if out.Packs == nil {
2199 if !in.IsDelim(']') {
2200 out.Packs = make([]struct {
2201 Name string `json:"name"`
2202 Words []string `json:"words"`
2203 }, 0, 1)
2204 } else {
2205 out.Packs = []struct {
2206 Name string `json:"name"`
2207 Words []string `json:"words"`
2208 }{}
2209 }
2210 } else {
2211 out.Packs = (out.Packs)[:0]
2212 }
2213 for !in.IsDelim(']') {
2214 var v19 struct {
2215 Name string `json:"name"`
2216 Words []string `json:"words"`
2217 }
2218 easyjsonE4425964Decode(in, &v19)
2219 out.Packs = append(out.Packs, v19)
2220 in.WantComma()
2221 }
2222 in.Delim(']')
2223 }
2224 default:
2225 in.AddError(&jlexer.LexerError{
2226 Offset: in.GetPos(),
2227 Reason: "unknown field",
2228 Data: key,
2229 })
2230 }
2231 in.WantComma()
2232 }
2233 in.Delim('}')
2234 if isTopLevel {
2235 in.Consumed()
2236 }
2237}
2238func easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol24(out *jwriter.Writer, in AddPacksParams) {
2239 out.RawByte('{')
2240 first := true
2241 _ = first
2242 {
2243 const prefix string = ",\"packs\":"
2244 out.RawString(prefix[1:])
2245 if in.Packs == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
2246 out.RawString("null")
2247 } else {
2248 out.RawByte('[')
2249 for v20, v21 := range in.Packs {
2250 if v20 > 0 {
2251 out.RawByte(',')
2252 }
2253 easyjsonE4425964Encode(out, v21)
2254 }
2255 out.RawByte(']')
2256 }
2257 }
2258 out.RawByte('}')
2259}
2260
2261// MarshalJSON supports json.Marshaler interface
2262func (v AddPacksParams) MarshalJSON() ([]byte, error) {
2263 w := jwriter.Writer{}
2264 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol24(&w, v)
2265 return w.Buffer.BuildBytes(), w.Error
2266}
2267
2268// MarshalEasyJSON supports easyjson.Marshaler interface
2269func (v AddPacksParams) MarshalEasyJSON(w *jwriter.Writer) {
2270 easyjsonE4425964EncodeGithubComZikaerohCodiesInternalProtocol24(w, v)
2271}
2272
2273// UnmarshalJSON supports json.Unmarshaler interface
2274func (v *AddPacksParams) UnmarshalJSON(data []byte) error {
2275 r := jlexer.Lexer{Data: data}
2276 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol24(&r, v)
2277 return r.Error()
2278}
2279
2280// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
2281func (v *AddPacksParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
2282 easyjsonE4425964DecodeGithubComZikaerohCodiesInternalProtocol24(l, v)
2283}
2284func easyjsonE4425964Decode(in *jlexer.Lexer, out *struct {
2285 Name string `json:"name"`
2286 Words []string `json:"words"`
2287}) {
2288 isTopLevel := in.IsStart()
2289 if in.IsNull() {
2290 if isTopLevel {
2291 in.Consumed()
2292 }
2293 in.Skip()
2294 return
2295 }
2296 in.Delim('{')
2297 for !in.IsDelim('}') {
2298 key := in.UnsafeString()
2299 in.WantColon()
2300 if in.IsNull() {
2301 in.Skip()
2302 in.WantComma()
2303 continue
2304 }
2305 switch key {
2306 case "name":
2307 out.Name = string(in.String())
2308 case "words":
2309 if in.IsNull() {
2310 in.Skip()
2311 out.Words = nil
2312 } else {
2313 in.Delim('[')
2314 if out.Words == nil {
2315 if !in.IsDelim(']') {
2316 out.Words = make([]string, 0, 4)
2317 } else {
2318 out.Words = []string{}
2319 }
2320 } else {
2321 out.Words = (out.Words)[:0]
2322 }
2323 for !in.IsDelim(']') {
2324 var v22 string
2325 v22 = string(in.String())
2326 out.Words = append(out.Words, v22)
2327 in.WantComma()
2328 }
2329 in.Delim(']')
2330 }
2331 default:
2332 in.AddError(&jlexer.LexerError{
2333 Offset: in.GetPos(),
2334 Reason: "unknown field",
2335 Data: key,
2336 })
2337 }
2338 in.WantComma()
2339 }
2340 in.Delim('}')
2341 if isTopLevel {
2342 in.Consumed()
2343 }
2344}
2345func easyjsonE4425964Encode(out *jwriter.Writer, in struct {
2346 Name string `json:"name"`
2347 Words []string `json:"words"`
2348}) {
2349 out.RawByte('{')
2350 first := true
2351 _ = first
2352 {
2353 const prefix string = ",\"name\":"
2354 out.RawString(prefix[1:])
2355 out.String(string(in.Name))
2356 }
2357 {
2358 const prefix string = ",\"words\":"
2359 out.RawString(prefix)
2360 if in.Words == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
2361 out.RawString("null")
2362 } else {
2363 out.RawByte('[')
2364 for v23, v24 := range in.Words {
2365 if v23 > 0 {
2366 out.RawByte(',')
2367 }
2368 out.String(string(v24))
2369 }
2370 out.RawByte(']')
2371 }
2372 }
2373 out.RawByte('}')
2374}