protobuf-platform 1.0.21 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/game/game_pb.js CHANGED
@@ -21,6 +21,13 @@ var global = (function() {
21
21
  return Function('return this')();
22
22
  }.call(null));
23
23
 
24
+ goog.exportSymbol('proto.game.CategoryItem', null, global);
25
+ goog.exportSymbol('proto.game.CategoryListResponse', null, global);
26
+ goog.exportSymbol('proto.game.CategoryRequest', null, global);
27
+ goog.exportSymbol('proto.game.CategoryResponse', null, global);
28
+ goog.exportSymbol('proto.game.CategoryStatusResponse', null, global);
29
+ goog.exportSymbol('proto.game.GetCategoryRequest', null, global);
30
+ goog.exportSymbol('proto.game.GetListCategoryRequest', null, global);
24
31
  goog.exportSymbol('proto.game.PingRequest', null, global);
25
32
  goog.exportSymbol('proto.game.PongResponse', null, global);
26
33
  /**
@@ -65,6 +72,153 @@ if (goog.DEBUG && !COMPILED) {
65
72
  */
66
73
  proto.game.PongResponse.displayName = 'proto.game.PongResponse';
67
74
  }
75
+ /**
76
+ * Generated by JsPbCodeGenerator.
77
+ * @param {Array=} opt_data Optional initial data array, typically from a
78
+ * server response, or constructed directly in Javascript. The array is used
79
+ * in place and becomes part of the constructed object. It is not cloned.
80
+ * If no data is provided, the constructed object will be empty, but still
81
+ * valid.
82
+ * @extends {jspb.Message}
83
+ * @constructor
84
+ */
85
+ proto.game.CategoryItem = function(opt_data) {
86
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
87
+ };
88
+ goog.inherits(proto.game.CategoryItem, jspb.Message);
89
+ if (goog.DEBUG && !COMPILED) {
90
+ /**
91
+ * @public
92
+ * @override
93
+ */
94
+ proto.game.CategoryItem.displayName = 'proto.game.CategoryItem';
95
+ }
96
+ /**
97
+ * Generated by JsPbCodeGenerator.
98
+ * @param {Array=} opt_data Optional initial data array, typically from a
99
+ * server response, or constructed directly in Javascript. The array is used
100
+ * in place and becomes part of the constructed object. It is not cloned.
101
+ * If no data is provided, the constructed object will be empty, but still
102
+ * valid.
103
+ * @extends {jspb.Message}
104
+ * @constructor
105
+ */
106
+ proto.game.CategoryRequest = function(opt_data) {
107
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
108
+ };
109
+ goog.inherits(proto.game.CategoryRequest, jspb.Message);
110
+ if (goog.DEBUG && !COMPILED) {
111
+ /**
112
+ * @public
113
+ * @override
114
+ */
115
+ proto.game.CategoryRequest.displayName = 'proto.game.CategoryRequest';
116
+ }
117
+ /**
118
+ * Generated by JsPbCodeGenerator.
119
+ * @param {Array=} opt_data Optional initial data array, typically from a
120
+ * server response, or constructed directly in Javascript. The array is used
121
+ * in place and becomes part of the constructed object. It is not cloned.
122
+ * If no data is provided, the constructed object will be empty, but still
123
+ * valid.
124
+ * @extends {jspb.Message}
125
+ * @constructor
126
+ */
127
+ proto.game.GetCategoryRequest = function(opt_data) {
128
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
129
+ };
130
+ goog.inherits(proto.game.GetCategoryRequest, jspb.Message);
131
+ if (goog.DEBUG && !COMPILED) {
132
+ /**
133
+ * @public
134
+ * @override
135
+ */
136
+ proto.game.GetCategoryRequest.displayName = 'proto.game.GetCategoryRequest';
137
+ }
138
+ /**
139
+ * Generated by JsPbCodeGenerator.
140
+ * @param {Array=} opt_data Optional initial data array, typically from a
141
+ * server response, or constructed directly in Javascript. The array is used
142
+ * in place and becomes part of the constructed object. It is not cloned.
143
+ * If no data is provided, the constructed object will be empty, but still
144
+ * valid.
145
+ * @extends {jspb.Message}
146
+ * @constructor
147
+ */
148
+ proto.game.GetListCategoryRequest = function(opt_data) {
149
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
150
+ };
151
+ goog.inherits(proto.game.GetListCategoryRequest, jspb.Message);
152
+ if (goog.DEBUG && !COMPILED) {
153
+ /**
154
+ * @public
155
+ * @override
156
+ */
157
+ proto.game.GetListCategoryRequest.displayName = 'proto.game.GetListCategoryRequest';
158
+ }
159
+ /**
160
+ * Generated by JsPbCodeGenerator.
161
+ * @param {Array=} opt_data Optional initial data array, typically from a
162
+ * server response, or constructed directly in Javascript. The array is used
163
+ * in place and becomes part of the constructed object. It is not cloned.
164
+ * If no data is provided, the constructed object will be empty, but still
165
+ * valid.
166
+ * @extends {jspb.Message}
167
+ * @constructor
168
+ */
169
+ proto.game.CategoryResponse = function(opt_data) {
170
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
171
+ };
172
+ goog.inherits(proto.game.CategoryResponse, jspb.Message);
173
+ if (goog.DEBUG && !COMPILED) {
174
+ /**
175
+ * @public
176
+ * @override
177
+ */
178
+ proto.game.CategoryResponse.displayName = 'proto.game.CategoryResponse';
179
+ }
180
+ /**
181
+ * Generated by JsPbCodeGenerator.
182
+ * @param {Array=} opt_data Optional initial data array, typically from a
183
+ * server response, or constructed directly in Javascript. The array is used
184
+ * in place and becomes part of the constructed object. It is not cloned.
185
+ * If no data is provided, the constructed object will be empty, but still
186
+ * valid.
187
+ * @extends {jspb.Message}
188
+ * @constructor
189
+ */
190
+ proto.game.CategoryListResponse = function(opt_data) {
191
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.game.CategoryListResponse.repeatedFields_, null);
192
+ };
193
+ goog.inherits(proto.game.CategoryListResponse, jspb.Message);
194
+ if (goog.DEBUG && !COMPILED) {
195
+ /**
196
+ * @public
197
+ * @override
198
+ */
199
+ proto.game.CategoryListResponse.displayName = 'proto.game.CategoryListResponse';
200
+ }
201
+ /**
202
+ * Generated by JsPbCodeGenerator.
203
+ * @param {Array=} opt_data Optional initial data array, typically from a
204
+ * server response, or constructed directly in Javascript. The array is used
205
+ * in place and becomes part of the constructed object. It is not cloned.
206
+ * If no data is provided, the constructed object will be empty, but still
207
+ * valid.
208
+ * @extends {jspb.Message}
209
+ * @constructor
210
+ */
211
+ proto.game.CategoryStatusResponse = function(opt_data) {
212
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
213
+ };
214
+ goog.inherits(proto.game.CategoryStatusResponse, jspb.Message);
215
+ if (goog.DEBUG && !COMPILED) {
216
+ /**
217
+ * @public
218
+ * @override
219
+ */
220
+ proto.game.CategoryStatusResponse.displayName = 'proto.game.CategoryStatusResponse';
221
+ }
68
222
 
69
223
 
70
224
 
@@ -325,4 +479,1559 @@ proto.game.PongResponse.prototype.setPong = function(value) {
325
479
  };
326
480
 
327
481
 
482
+
483
+
484
+
485
+ if (jspb.Message.GENERATE_TO_OBJECT) {
486
+ /**
487
+ * Creates an object representation of this proto.
488
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
489
+ * Optional fields that are not set will be set to undefined.
490
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
491
+ * For the list of reserved names please see:
492
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
493
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
494
+ * JSPB instance for transitional soy proto support:
495
+ * http://goto/soy-param-migration
496
+ * @return {!Object}
497
+ */
498
+ proto.game.CategoryItem.prototype.toObject = function(opt_includeInstance) {
499
+ return proto.game.CategoryItem.toObject(opt_includeInstance, this);
500
+ };
501
+
502
+
503
+ /**
504
+ * Static version of the {@see toObject} method.
505
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
506
+ * the JSPB instance for transitional soy proto support:
507
+ * http://goto/soy-param-migration
508
+ * @param {!proto.game.CategoryItem} msg The msg instance to transform.
509
+ * @return {!Object}
510
+ * @suppress {unusedLocalVariables} f is only used for nested messages
511
+ */
512
+ proto.game.CategoryItem.toObject = function(includeInstance, msg) {
513
+ var f, obj = {
514
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
515
+ title: jspb.Message.getFieldWithDefault(msg, 2, ""),
516
+ slug: jspb.Message.getFieldWithDefault(msg, 3, ""),
517
+ description: jspb.Message.getFieldWithDefault(msg, 4, ""),
518
+ isActive: jspb.Message.getFieldWithDefault(msg, 5, 0),
519
+ imagePath: jspb.Message.getFieldWithDefault(msg, 6, "")
520
+ };
521
+
522
+ if (includeInstance) {
523
+ obj.$jspbMessageInstance = msg;
524
+ }
525
+ return obj;
526
+ };
527
+ }
528
+
529
+
530
+ /**
531
+ * Deserializes binary data (in protobuf wire format).
532
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
533
+ * @return {!proto.game.CategoryItem}
534
+ */
535
+ proto.game.CategoryItem.deserializeBinary = function(bytes) {
536
+ var reader = new jspb.BinaryReader(bytes);
537
+ var msg = new proto.game.CategoryItem;
538
+ return proto.game.CategoryItem.deserializeBinaryFromReader(msg, reader);
539
+ };
540
+
541
+
542
+ /**
543
+ * Deserializes binary data (in protobuf wire format) from the
544
+ * given reader into the given message object.
545
+ * @param {!proto.game.CategoryItem} msg The message object to deserialize into.
546
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
547
+ * @return {!proto.game.CategoryItem}
548
+ */
549
+ proto.game.CategoryItem.deserializeBinaryFromReader = function(msg, reader) {
550
+ while (reader.nextField()) {
551
+ if (reader.isEndGroup()) {
552
+ break;
553
+ }
554
+ var field = reader.getFieldNumber();
555
+ switch (field) {
556
+ case 1:
557
+ var value = /** @type {number} */ (reader.readInt32());
558
+ msg.setId(value);
559
+ break;
560
+ case 2:
561
+ var value = /** @type {string} */ (reader.readString());
562
+ msg.setTitle(value);
563
+ break;
564
+ case 3:
565
+ var value = /** @type {string} */ (reader.readString());
566
+ msg.setSlug(value);
567
+ break;
568
+ case 4:
569
+ var value = /** @type {string} */ (reader.readString());
570
+ msg.setDescription(value);
571
+ break;
572
+ case 5:
573
+ var value = /** @type {number} */ (reader.readInt32());
574
+ msg.setIsActive(value);
575
+ break;
576
+ case 6:
577
+ var value = /** @type {string} */ (reader.readString());
578
+ msg.setImagePath(value);
579
+ break;
580
+ default:
581
+ reader.skipField();
582
+ break;
583
+ }
584
+ }
585
+ return msg;
586
+ };
587
+
588
+
589
+ /**
590
+ * Serializes the message to binary data (in protobuf wire format).
591
+ * @return {!Uint8Array}
592
+ */
593
+ proto.game.CategoryItem.prototype.serializeBinary = function() {
594
+ var writer = new jspb.BinaryWriter();
595
+ proto.game.CategoryItem.serializeBinaryToWriter(this, writer);
596
+ return writer.getResultBuffer();
597
+ };
598
+
599
+
600
+ /**
601
+ * Serializes the given message to binary data (in protobuf wire
602
+ * format), writing to the given BinaryWriter.
603
+ * @param {!proto.game.CategoryItem} message
604
+ * @param {!jspb.BinaryWriter} writer
605
+ * @suppress {unusedLocalVariables} f is only used for nested messages
606
+ */
607
+ proto.game.CategoryItem.serializeBinaryToWriter = function(message, writer) {
608
+ var f = undefined;
609
+ f = /** @type {number} */ (jspb.Message.getField(message, 1));
610
+ if (f != null) {
611
+ writer.writeInt32(
612
+ 1,
613
+ f
614
+ );
615
+ }
616
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
617
+ if (f != null) {
618
+ writer.writeString(
619
+ 2,
620
+ f
621
+ );
622
+ }
623
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
624
+ if (f != null) {
625
+ writer.writeString(
626
+ 3,
627
+ f
628
+ );
629
+ }
630
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
631
+ if (f != null) {
632
+ writer.writeString(
633
+ 4,
634
+ f
635
+ );
636
+ }
637
+ f = /** @type {number} */ (jspb.Message.getField(message, 5));
638
+ if (f != null) {
639
+ writer.writeInt32(
640
+ 5,
641
+ f
642
+ );
643
+ }
644
+ f = /** @type {string} */ (jspb.Message.getField(message, 6));
645
+ if (f != null) {
646
+ writer.writeString(
647
+ 6,
648
+ f
649
+ );
650
+ }
651
+ };
652
+
653
+
654
+ /**
655
+ * optional int32 id = 1;
656
+ * @return {number}
657
+ */
658
+ proto.game.CategoryItem.prototype.getId = function() {
659
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
660
+ };
661
+
662
+
663
+ /**
664
+ * @param {number} value
665
+ * @return {!proto.game.CategoryItem} returns this
666
+ */
667
+ proto.game.CategoryItem.prototype.setId = function(value) {
668
+ return jspb.Message.setField(this, 1, value);
669
+ };
670
+
671
+
672
+ /**
673
+ * Clears the field making it undefined.
674
+ * @return {!proto.game.CategoryItem} returns this
675
+ */
676
+ proto.game.CategoryItem.prototype.clearId = function() {
677
+ return jspb.Message.setField(this, 1, undefined);
678
+ };
679
+
680
+
681
+ /**
682
+ * Returns whether this field is set.
683
+ * @return {boolean}
684
+ */
685
+ proto.game.CategoryItem.prototype.hasId = function() {
686
+ return jspb.Message.getField(this, 1) != null;
687
+ };
688
+
689
+
690
+ /**
691
+ * optional string title = 2;
692
+ * @return {string}
693
+ */
694
+ proto.game.CategoryItem.prototype.getTitle = function() {
695
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
696
+ };
697
+
698
+
699
+ /**
700
+ * @param {string} value
701
+ * @return {!proto.game.CategoryItem} returns this
702
+ */
703
+ proto.game.CategoryItem.prototype.setTitle = function(value) {
704
+ return jspb.Message.setField(this, 2, value);
705
+ };
706
+
707
+
708
+ /**
709
+ * Clears the field making it undefined.
710
+ * @return {!proto.game.CategoryItem} returns this
711
+ */
712
+ proto.game.CategoryItem.prototype.clearTitle = function() {
713
+ return jspb.Message.setField(this, 2, undefined);
714
+ };
715
+
716
+
717
+ /**
718
+ * Returns whether this field is set.
719
+ * @return {boolean}
720
+ */
721
+ proto.game.CategoryItem.prototype.hasTitle = function() {
722
+ return jspb.Message.getField(this, 2) != null;
723
+ };
724
+
725
+
726
+ /**
727
+ * optional string slug = 3;
728
+ * @return {string}
729
+ */
730
+ proto.game.CategoryItem.prototype.getSlug = function() {
731
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
732
+ };
733
+
734
+
735
+ /**
736
+ * @param {string} value
737
+ * @return {!proto.game.CategoryItem} returns this
738
+ */
739
+ proto.game.CategoryItem.prototype.setSlug = function(value) {
740
+ return jspb.Message.setField(this, 3, value);
741
+ };
742
+
743
+
744
+ /**
745
+ * Clears the field making it undefined.
746
+ * @return {!proto.game.CategoryItem} returns this
747
+ */
748
+ proto.game.CategoryItem.prototype.clearSlug = function() {
749
+ return jspb.Message.setField(this, 3, undefined);
750
+ };
751
+
752
+
753
+ /**
754
+ * Returns whether this field is set.
755
+ * @return {boolean}
756
+ */
757
+ proto.game.CategoryItem.prototype.hasSlug = function() {
758
+ return jspb.Message.getField(this, 3) != null;
759
+ };
760
+
761
+
762
+ /**
763
+ * optional string description = 4;
764
+ * @return {string}
765
+ */
766
+ proto.game.CategoryItem.prototype.getDescription = function() {
767
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
768
+ };
769
+
770
+
771
+ /**
772
+ * @param {string} value
773
+ * @return {!proto.game.CategoryItem} returns this
774
+ */
775
+ proto.game.CategoryItem.prototype.setDescription = function(value) {
776
+ return jspb.Message.setField(this, 4, value);
777
+ };
778
+
779
+
780
+ /**
781
+ * Clears the field making it undefined.
782
+ * @return {!proto.game.CategoryItem} returns this
783
+ */
784
+ proto.game.CategoryItem.prototype.clearDescription = function() {
785
+ return jspb.Message.setField(this, 4, undefined);
786
+ };
787
+
788
+
789
+ /**
790
+ * Returns whether this field is set.
791
+ * @return {boolean}
792
+ */
793
+ proto.game.CategoryItem.prototype.hasDescription = function() {
794
+ return jspb.Message.getField(this, 4) != null;
795
+ };
796
+
797
+
798
+ /**
799
+ * optional int32 is_active = 5;
800
+ * @return {number}
801
+ */
802
+ proto.game.CategoryItem.prototype.getIsActive = function() {
803
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
804
+ };
805
+
806
+
807
+ /**
808
+ * @param {number} value
809
+ * @return {!proto.game.CategoryItem} returns this
810
+ */
811
+ proto.game.CategoryItem.prototype.setIsActive = function(value) {
812
+ return jspb.Message.setField(this, 5, value);
813
+ };
814
+
815
+
816
+ /**
817
+ * Clears the field making it undefined.
818
+ * @return {!proto.game.CategoryItem} returns this
819
+ */
820
+ proto.game.CategoryItem.prototype.clearIsActive = function() {
821
+ return jspb.Message.setField(this, 5, undefined);
822
+ };
823
+
824
+
825
+ /**
826
+ * Returns whether this field is set.
827
+ * @return {boolean}
828
+ */
829
+ proto.game.CategoryItem.prototype.hasIsActive = function() {
830
+ return jspb.Message.getField(this, 5) != null;
831
+ };
832
+
833
+
834
+ /**
835
+ * optional string image_path = 6;
836
+ * @return {string}
837
+ */
838
+ proto.game.CategoryItem.prototype.getImagePath = function() {
839
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
840
+ };
841
+
842
+
843
+ /**
844
+ * @param {string} value
845
+ * @return {!proto.game.CategoryItem} returns this
846
+ */
847
+ proto.game.CategoryItem.prototype.setImagePath = function(value) {
848
+ return jspb.Message.setField(this, 6, value);
849
+ };
850
+
851
+
852
+ /**
853
+ * Clears the field making it undefined.
854
+ * @return {!proto.game.CategoryItem} returns this
855
+ */
856
+ proto.game.CategoryItem.prototype.clearImagePath = function() {
857
+ return jspb.Message.setField(this, 6, undefined);
858
+ };
859
+
860
+
861
+ /**
862
+ * Returns whether this field is set.
863
+ * @return {boolean}
864
+ */
865
+ proto.game.CategoryItem.prototype.hasImagePath = function() {
866
+ return jspb.Message.getField(this, 6) != null;
867
+ };
868
+
869
+
870
+
871
+
872
+
873
+ if (jspb.Message.GENERATE_TO_OBJECT) {
874
+ /**
875
+ * Creates an object representation of this proto.
876
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
877
+ * Optional fields that are not set will be set to undefined.
878
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
879
+ * For the list of reserved names please see:
880
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
881
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
882
+ * JSPB instance for transitional soy proto support:
883
+ * http://goto/soy-param-migration
884
+ * @return {!Object}
885
+ */
886
+ proto.game.CategoryRequest.prototype.toObject = function(opt_includeInstance) {
887
+ return proto.game.CategoryRequest.toObject(opt_includeInstance, this);
888
+ };
889
+
890
+
891
+ /**
892
+ * Static version of the {@see toObject} method.
893
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
894
+ * the JSPB instance for transitional soy proto support:
895
+ * http://goto/soy-param-migration
896
+ * @param {!proto.game.CategoryRequest} msg The msg instance to transform.
897
+ * @return {!Object}
898
+ * @suppress {unusedLocalVariables} f is only used for nested messages
899
+ */
900
+ proto.game.CategoryRequest.toObject = function(includeInstance, msg) {
901
+ var f, obj = {
902
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
903
+ title: jspb.Message.getFieldWithDefault(msg, 2, ""),
904
+ slug: jspb.Message.getFieldWithDefault(msg, 3, ""),
905
+ description: jspb.Message.getFieldWithDefault(msg, 4, ""),
906
+ isActive: jspb.Message.getFieldWithDefault(msg, 5, 0)
907
+ };
908
+
909
+ if (includeInstance) {
910
+ obj.$jspbMessageInstance = msg;
911
+ }
912
+ return obj;
913
+ };
914
+ }
915
+
916
+
917
+ /**
918
+ * Deserializes binary data (in protobuf wire format).
919
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
920
+ * @return {!proto.game.CategoryRequest}
921
+ */
922
+ proto.game.CategoryRequest.deserializeBinary = function(bytes) {
923
+ var reader = new jspb.BinaryReader(bytes);
924
+ var msg = new proto.game.CategoryRequest;
925
+ return proto.game.CategoryRequest.deserializeBinaryFromReader(msg, reader);
926
+ };
927
+
928
+
929
+ /**
930
+ * Deserializes binary data (in protobuf wire format) from the
931
+ * given reader into the given message object.
932
+ * @param {!proto.game.CategoryRequest} msg The message object to deserialize into.
933
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
934
+ * @return {!proto.game.CategoryRequest}
935
+ */
936
+ proto.game.CategoryRequest.deserializeBinaryFromReader = function(msg, reader) {
937
+ while (reader.nextField()) {
938
+ if (reader.isEndGroup()) {
939
+ break;
940
+ }
941
+ var field = reader.getFieldNumber();
942
+ switch (field) {
943
+ case 1:
944
+ var value = /** @type {number} */ (reader.readInt32());
945
+ msg.setId(value);
946
+ break;
947
+ case 2:
948
+ var value = /** @type {string} */ (reader.readString());
949
+ msg.setTitle(value);
950
+ break;
951
+ case 3:
952
+ var value = /** @type {string} */ (reader.readString());
953
+ msg.setSlug(value);
954
+ break;
955
+ case 4:
956
+ var value = /** @type {string} */ (reader.readString());
957
+ msg.setDescription(value);
958
+ break;
959
+ case 5:
960
+ var value = /** @type {number} */ (reader.readInt32());
961
+ msg.setIsActive(value);
962
+ break;
963
+ default:
964
+ reader.skipField();
965
+ break;
966
+ }
967
+ }
968
+ return msg;
969
+ };
970
+
971
+
972
+ /**
973
+ * Serializes the message to binary data (in protobuf wire format).
974
+ * @return {!Uint8Array}
975
+ */
976
+ proto.game.CategoryRequest.prototype.serializeBinary = function() {
977
+ var writer = new jspb.BinaryWriter();
978
+ proto.game.CategoryRequest.serializeBinaryToWriter(this, writer);
979
+ return writer.getResultBuffer();
980
+ };
981
+
982
+
983
+ /**
984
+ * Serializes the given message to binary data (in protobuf wire
985
+ * format), writing to the given BinaryWriter.
986
+ * @param {!proto.game.CategoryRequest} message
987
+ * @param {!jspb.BinaryWriter} writer
988
+ * @suppress {unusedLocalVariables} f is only used for nested messages
989
+ */
990
+ proto.game.CategoryRequest.serializeBinaryToWriter = function(message, writer) {
991
+ var f = undefined;
992
+ f = /** @type {number} */ (jspb.Message.getField(message, 1));
993
+ if (f != null) {
994
+ writer.writeInt32(
995
+ 1,
996
+ f
997
+ );
998
+ }
999
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
1000
+ if (f != null) {
1001
+ writer.writeString(
1002
+ 2,
1003
+ f
1004
+ );
1005
+ }
1006
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
1007
+ if (f != null) {
1008
+ writer.writeString(
1009
+ 3,
1010
+ f
1011
+ );
1012
+ }
1013
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
1014
+ if (f != null) {
1015
+ writer.writeString(
1016
+ 4,
1017
+ f
1018
+ );
1019
+ }
1020
+ f = /** @type {number} */ (jspb.Message.getField(message, 5));
1021
+ if (f != null) {
1022
+ writer.writeInt32(
1023
+ 5,
1024
+ f
1025
+ );
1026
+ }
1027
+ };
1028
+
1029
+
1030
+ /**
1031
+ * optional int32 id = 1;
1032
+ * @return {number}
1033
+ */
1034
+ proto.game.CategoryRequest.prototype.getId = function() {
1035
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1036
+ };
1037
+
1038
+
1039
+ /**
1040
+ * @param {number} value
1041
+ * @return {!proto.game.CategoryRequest} returns this
1042
+ */
1043
+ proto.game.CategoryRequest.prototype.setId = function(value) {
1044
+ return jspb.Message.setField(this, 1, value);
1045
+ };
1046
+
1047
+
1048
+ /**
1049
+ * Clears the field making it undefined.
1050
+ * @return {!proto.game.CategoryRequest} returns this
1051
+ */
1052
+ proto.game.CategoryRequest.prototype.clearId = function() {
1053
+ return jspb.Message.setField(this, 1, undefined);
1054
+ };
1055
+
1056
+
1057
+ /**
1058
+ * Returns whether this field is set.
1059
+ * @return {boolean}
1060
+ */
1061
+ proto.game.CategoryRequest.prototype.hasId = function() {
1062
+ return jspb.Message.getField(this, 1) != null;
1063
+ };
1064
+
1065
+
1066
+ /**
1067
+ * optional string title = 2;
1068
+ * @return {string}
1069
+ */
1070
+ proto.game.CategoryRequest.prototype.getTitle = function() {
1071
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1072
+ };
1073
+
1074
+
1075
+ /**
1076
+ * @param {string} value
1077
+ * @return {!proto.game.CategoryRequest} returns this
1078
+ */
1079
+ proto.game.CategoryRequest.prototype.setTitle = function(value) {
1080
+ return jspb.Message.setField(this, 2, value);
1081
+ };
1082
+
1083
+
1084
+ /**
1085
+ * Clears the field making it undefined.
1086
+ * @return {!proto.game.CategoryRequest} returns this
1087
+ */
1088
+ proto.game.CategoryRequest.prototype.clearTitle = function() {
1089
+ return jspb.Message.setField(this, 2, undefined);
1090
+ };
1091
+
1092
+
1093
+ /**
1094
+ * Returns whether this field is set.
1095
+ * @return {boolean}
1096
+ */
1097
+ proto.game.CategoryRequest.prototype.hasTitle = function() {
1098
+ return jspb.Message.getField(this, 2) != null;
1099
+ };
1100
+
1101
+
1102
+ /**
1103
+ * optional string slug = 3;
1104
+ * @return {string}
1105
+ */
1106
+ proto.game.CategoryRequest.prototype.getSlug = function() {
1107
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1108
+ };
1109
+
1110
+
1111
+ /**
1112
+ * @param {string} value
1113
+ * @return {!proto.game.CategoryRequest} returns this
1114
+ */
1115
+ proto.game.CategoryRequest.prototype.setSlug = function(value) {
1116
+ return jspb.Message.setField(this, 3, value);
1117
+ };
1118
+
1119
+
1120
+ /**
1121
+ * Clears the field making it undefined.
1122
+ * @return {!proto.game.CategoryRequest} returns this
1123
+ */
1124
+ proto.game.CategoryRequest.prototype.clearSlug = function() {
1125
+ return jspb.Message.setField(this, 3, undefined);
1126
+ };
1127
+
1128
+
1129
+ /**
1130
+ * Returns whether this field is set.
1131
+ * @return {boolean}
1132
+ */
1133
+ proto.game.CategoryRequest.prototype.hasSlug = function() {
1134
+ return jspb.Message.getField(this, 3) != null;
1135
+ };
1136
+
1137
+
1138
+ /**
1139
+ * optional string description = 4;
1140
+ * @return {string}
1141
+ */
1142
+ proto.game.CategoryRequest.prototype.getDescription = function() {
1143
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
1144
+ };
1145
+
1146
+
1147
+ /**
1148
+ * @param {string} value
1149
+ * @return {!proto.game.CategoryRequest} returns this
1150
+ */
1151
+ proto.game.CategoryRequest.prototype.setDescription = function(value) {
1152
+ return jspb.Message.setField(this, 4, value);
1153
+ };
1154
+
1155
+
1156
+ /**
1157
+ * Clears the field making it undefined.
1158
+ * @return {!proto.game.CategoryRequest} returns this
1159
+ */
1160
+ proto.game.CategoryRequest.prototype.clearDescription = function() {
1161
+ return jspb.Message.setField(this, 4, undefined);
1162
+ };
1163
+
1164
+
1165
+ /**
1166
+ * Returns whether this field is set.
1167
+ * @return {boolean}
1168
+ */
1169
+ proto.game.CategoryRequest.prototype.hasDescription = function() {
1170
+ return jspb.Message.getField(this, 4) != null;
1171
+ };
1172
+
1173
+
1174
+ /**
1175
+ * optional int32 is_active = 5;
1176
+ * @return {number}
1177
+ */
1178
+ proto.game.CategoryRequest.prototype.getIsActive = function() {
1179
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
1180
+ };
1181
+
1182
+
1183
+ /**
1184
+ * @param {number} value
1185
+ * @return {!proto.game.CategoryRequest} returns this
1186
+ */
1187
+ proto.game.CategoryRequest.prototype.setIsActive = function(value) {
1188
+ return jspb.Message.setField(this, 5, value);
1189
+ };
1190
+
1191
+
1192
+ /**
1193
+ * Clears the field making it undefined.
1194
+ * @return {!proto.game.CategoryRequest} returns this
1195
+ */
1196
+ proto.game.CategoryRequest.prototype.clearIsActive = function() {
1197
+ return jspb.Message.setField(this, 5, undefined);
1198
+ };
1199
+
1200
+
1201
+ /**
1202
+ * Returns whether this field is set.
1203
+ * @return {boolean}
1204
+ */
1205
+ proto.game.CategoryRequest.prototype.hasIsActive = function() {
1206
+ return jspb.Message.getField(this, 5) != null;
1207
+ };
1208
+
1209
+
1210
+
1211
+
1212
+
1213
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1214
+ /**
1215
+ * Creates an object representation of this proto.
1216
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1217
+ * Optional fields that are not set will be set to undefined.
1218
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1219
+ * For the list of reserved names please see:
1220
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1221
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1222
+ * JSPB instance for transitional soy proto support:
1223
+ * http://goto/soy-param-migration
1224
+ * @return {!Object}
1225
+ */
1226
+ proto.game.GetCategoryRequest.prototype.toObject = function(opt_includeInstance) {
1227
+ return proto.game.GetCategoryRequest.toObject(opt_includeInstance, this);
1228
+ };
1229
+
1230
+
1231
+ /**
1232
+ * Static version of the {@see toObject} method.
1233
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1234
+ * the JSPB instance for transitional soy proto support:
1235
+ * http://goto/soy-param-migration
1236
+ * @param {!proto.game.GetCategoryRequest} msg The msg instance to transform.
1237
+ * @return {!Object}
1238
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1239
+ */
1240
+ proto.game.GetCategoryRequest.toObject = function(includeInstance, msg) {
1241
+ var f, obj = {
1242
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0)
1243
+ };
1244
+
1245
+ if (includeInstance) {
1246
+ obj.$jspbMessageInstance = msg;
1247
+ }
1248
+ return obj;
1249
+ };
1250
+ }
1251
+
1252
+
1253
+ /**
1254
+ * Deserializes binary data (in protobuf wire format).
1255
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1256
+ * @return {!proto.game.GetCategoryRequest}
1257
+ */
1258
+ proto.game.GetCategoryRequest.deserializeBinary = function(bytes) {
1259
+ var reader = new jspb.BinaryReader(bytes);
1260
+ var msg = new proto.game.GetCategoryRequest;
1261
+ return proto.game.GetCategoryRequest.deserializeBinaryFromReader(msg, reader);
1262
+ };
1263
+
1264
+
1265
+ /**
1266
+ * Deserializes binary data (in protobuf wire format) from the
1267
+ * given reader into the given message object.
1268
+ * @param {!proto.game.GetCategoryRequest} msg The message object to deserialize into.
1269
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1270
+ * @return {!proto.game.GetCategoryRequest}
1271
+ */
1272
+ proto.game.GetCategoryRequest.deserializeBinaryFromReader = function(msg, reader) {
1273
+ while (reader.nextField()) {
1274
+ if (reader.isEndGroup()) {
1275
+ break;
1276
+ }
1277
+ var field = reader.getFieldNumber();
1278
+ switch (field) {
1279
+ case 1:
1280
+ var value = /** @type {number} */ (reader.readInt32());
1281
+ msg.setId(value);
1282
+ break;
1283
+ default:
1284
+ reader.skipField();
1285
+ break;
1286
+ }
1287
+ }
1288
+ return msg;
1289
+ };
1290
+
1291
+
1292
+ /**
1293
+ * Serializes the message to binary data (in protobuf wire format).
1294
+ * @return {!Uint8Array}
1295
+ */
1296
+ proto.game.GetCategoryRequest.prototype.serializeBinary = function() {
1297
+ var writer = new jspb.BinaryWriter();
1298
+ proto.game.GetCategoryRequest.serializeBinaryToWriter(this, writer);
1299
+ return writer.getResultBuffer();
1300
+ };
1301
+
1302
+
1303
+ /**
1304
+ * Serializes the given message to binary data (in protobuf wire
1305
+ * format), writing to the given BinaryWriter.
1306
+ * @param {!proto.game.GetCategoryRequest} message
1307
+ * @param {!jspb.BinaryWriter} writer
1308
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1309
+ */
1310
+ proto.game.GetCategoryRequest.serializeBinaryToWriter = function(message, writer) {
1311
+ var f = undefined;
1312
+ f = message.getId();
1313
+ if (f !== 0) {
1314
+ writer.writeInt32(
1315
+ 1,
1316
+ f
1317
+ );
1318
+ }
1319
+ };
1320
+
1321
+
1322
+ /**
1323
+ * optional int32 id = 1;
1324
+ * @return {number}
1325
+ */
1326
+ proto.game.GetCategoryRequest.prototype.getId = function() {
1327
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1328
+ };
1329
+
1330
+
1331
+ /**
1332
+ * @param {number} value
1333
+ * @return {!proto.game.GetCategoryRequest} returns this
1334
+ */
1335
+ proto.game.GetCategoryRequest.prototype.setId = function(value) {
1336
+ return jspb.Message.setProto3IntField(this, 1, value);
1337
+ };
1338
+
1339
+
1340
+
1341
+
1342
+
1343
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1344
+ /**
1345
+ * Creates an object representation of this proto.
1346
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1347
+ * Optional fields that are not set will be set to undefined.
1348
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1349
+ * For the list of reserved names please see:
1350
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1351
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1352
+ * JSPB instance for transitional soy proto support:
1353
+ * http://goto/soy-param-migration
1354
+ * @return {!Object}
1355
+ */
1356
+ proto.game.GetListCategoryRequest.prototype.toObject = function(opt_includeInstance) {
1357
+ return proto.game.GetListCategoryRequest.toObject(opt_includeInstance, this);
1358
+ };
1359
+
1360
+
1361
+ /**
1362
+ * Static version of the {@see toObject} method.
1363
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1364
+ * the JSPB instance for transitional soy proto support:
1365
+ * http://goto/soy-param-migration
1366
+ * @param {!proto.game.GetListCategoryRequest} msg The msg instance to transform.
1367
+ * @return {!Object}
1368
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1369
+ */
1370
+ proto.game.GetListCategoryRequest.toObject = function(includeInstance, msg) {
1371
+ var f, obj = {
1372
+ limit: jspb.Message.getFieldWithDefault(msg, 1, 0),
1373
+ offset: jspb.Message.getFieldWithDefault(msg, 2, 0)
1374
+ };
1375
+
1376
+ if (includeInstance) {
1377
+ obj.$jspbMessageInstance = msg;
1378
+ }
1379
+ return obj;
1380
+ };
1381
+ }
1382
+
1383
+
1384
+ /**
1385
+ * Deserializes binary data (in protobuf wire format).
1386
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1387
+ * @return {!proto.game.GetListCategoryRequest}
1388
+ */
1389
+ proto.game.GetListCategoryRequest.deserializeBinary = function(bytes) {
1390
+ var reader = new jspb.BinaryReader(bytes);
1391
+ var msg = new proto.game.GetListCategoryRequest;
1392
+ return proto.game.GetListCategoryRequest.deserializeBinaryFromReader(msg, reader);
1393
+ };
1394
+
1395
+
1396
+ /**
1397
+ * Deserializes binary data (in protobuf wire format) from the
1398
+ * given reader into the given message object.
1399
+ * @param {!proto.game.GetListCategoryRequest} msg The message object to deserialize into.
1400
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1401
+ * @return {!proto.game.GetListCategoryRequest}
1402
+ */
1403
+ proto.game.GetListCategoryRequest.deserializeBinaryFromReader = function(msg, reader) {
1404
+ while (reader.nextField()) {
1405
+ if (reader.isEndGroup()) {
1406
+ break;
1407
+ }
1408
+ var field = reader.getFieldNumber();
1409
+ switch (field) {
1410
+ case 1:
1411
+ var value = /** @type {number} */ (reader.readInt32());
1412
+ msg.setLimit(value);
1413
+ break;
1414
+ case 2:
1415
+ var value = /** @type {number} */ (reader.readInt32());
1416
+ msg.setOffset(value);
1417
+ break;
1418
+ default:
1419
+ reader.skipField();
1420
+ break;
1421
+ }
1422
+ }
1423
+ return msg;
1424
+ };
1425
+
1426
+
1427
+ /**
1428
+ * Serializes the message to binary data (in protobuf wire format).
1429
+ * @return {!Uint8Array}
1430
+ */
1431
+ proto.game.GetListCategoryRequest.prototype.serializeBinary = function() {
1432
+ var writer = new jspb.BinaryWriter();
1433
+ proto.game.GetListCategoryRequest.serializeBinaryToWriter(this, writer);
1434
+ return writer.getResultBuffer();
1435
+ };
1436
+
1437
+
1438
+ /**
1439
+ * Serializes the given message to binary data (in protobuf wire
1440
+ * format), writing to the given BinaryWriter.
1441
+ * @param {!proto.game.GetListCategoryRequest} message
1442
+ * @param {!jspb.BinaryWriter} writer
1443
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1444
+ */
1445
+ proto.game.GetListCategoryRequest.serializeBinaryToWriter = function(message, writer) {
1446
+ var f = undefined;
1447
+ f = message.getLimit();
1448
+ if (f !== 0) {
1449
+ writer.writeInt32(
1450
+ 1,
1451
+ f
1452
+ );
1453
+ }
1454
+ f = message.getOffset();
1455
+ if (f !== 0) {
1456
+ writer.writeInt32(
1457
+ 2,
1458
+ f
1459
+ );
1460
+ }
1461
+ };
1462
+
1463
+
1464
+ /**
1465
+ * optional int32 limit = 1;
1466
+ * @return {number}
1467
+ */
1468
+ proto.game.GetListCategoryRequest.prototype.getLimit = function() {
1469
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1470
+ };
1471
+
1472
+
1473
+ /**
1474
+ * @param {number} value
1475
+ * @return {!proto.game.GetListCategoryRequest} returns this
1476
+ */
1477
+ proto.game.GetListCategoryRequest.prototype.setLimit = function(value) {
1478
+ return jspb.Message.setProto3IntField(this, 1, value);
1479
+ };
1480
+
1481
+
1482
+ /**
1483
+ * optional int32 offset = 2;
1484
+ * @return {number}
1485
+ */
1486
+ proto.game.GetListCategoryRequest.prototype.getOffset = function() {
1487
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
1488
+ };
1489
+
1490
+
1491
+ /**
1492
+ * @param {number} value
1493
+ * @return {!proto.game.GetListCategoryRequest} returns this
1494
+ */
1495
+ proto.game.GetListCategoryRequest.prototype.setOffset = function(value) {
1496
+ return jspb.Message.setProto3IntField(this, 2, value);
1497
+ };
1498
+
1499
+
1500
+
1501
+
1502
+
1503
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1504
+ /**
1505
+ * Creates an object representation of this proto.
1506
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1507
+ * Optional fields that are not set will be set to undefined.
1508
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1509
+ * For the list of reserved names please see:
1510
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1511
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1512
+ * JSPB instance for transitional soy proto support:
1513
+ * http://goto/soy-param-migration
1514
+ * @return {!Object}
1515
+ */
1516
+ proto.game.CategoryResponse.prototype.toObject = function(opt_includeInstance) {
1517
+ return proto.game.CategoryResponse.toObject(opt_includeInstance, this);
1518
+ };
1519
+
1520
+
1521
+ /**
1522
+ * Static version of the {@see toObject} method.
1523
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1524
+ * the JSPB instance for transitional soy proto support:
1525
+ * http://goto/soy-param-migration
1526
+ * @param {!proto.game.CategoryResponse} msg The msg instance to transform.
1527
+ * @return {!Object}
1528
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1529
+ */
1530
+ proto.game.CategoryResponse.toObject = function(includeInstance, msg) {
1531
+ var f, obj = {
1532
+ data: (f = msg.getData()) && proto.game.CategoryItem.toObject(includeInstance, f)
1533
+ };
1534
+
1535
+ if (includeInstance) {
1536
+ obj.$jspbMessageInstance = msg;
1537
+ }
1538
+ return obj;
1539
+ };
1540
+ }
1541
+
1542
+
1543
+ /**
1544
+ * Deserializes binary data (in protobuf wire format).
1545
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1546
+ * @return {!proto.game.CategoryResponse}
1547
+ */
1548
+ proto.game.CategoryResponse.deserializeBinary = function(bytes) {
1549
+ var reader = new jspb.BinaryReader(bytes);
1550
+ var msg = new proto.game.CategoryResponse;
1551
+ return proto.game.CategoryResponse.deserializeBinaryFromReader(msg, reader);
1552
+ };
1553
+
1554
+
1555
+ /**
1556
+ * Deserializes binary data (in protobuf wire format) from the
1557
+ * given reader into the given message object.
1558
+ * @param {!proto.game.CategoryResponse} msg The message object to deserialize into.
1559
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1560
+ * @return {!proto.game.CategoryResponse}
1561
+ */
1562
+ proto.game.CategoryResponse.deserializeBinaryFromReader = function(msg, reader) {
1563
+ while (reader.nextField()) {
1564
+ if (reader.isEndGroup()) {
1565
+ break;
1566
+ }
1567
+ var field = reader.getFieldNumber();
1568
+ switch (field) {
1569
+ case 1:
1570
+ var value = new proto.game.CategoryItem;
1571
+ reader.readMessage(value,proto.game.CategoryItem.deserializeBinaryFromReader);
1572
+ msg.setData(value);
1573
+ break;
1574
+ default:
1575
+ reader.skipField();
1576
+ break;
1577
+ }
1578
+ }
1579
+ return msg;
1580
+ };
1581
+
1582
+
1583
+ /**
1584
+ * Serializes the message to binary data (in protobuf wire format).
1585
+ * @return {!Uint8Array}
1586
+ */
1587
+ proto.game.CategoryResponse.prototype.serializeBinary = function() {
1588
+ var writer = new jspb.BinaryWriter();
1589
+ proto.game.CategoryResponse.serializeBinaryToWriter(this, writer);
1590
+ return writer.getResultBuffer();
1591
+ };
1592
+
1593
+
1594
+ /**
1595
+ * Serializes the given message to binary data (in protobuf wire
1596
+ * format), writing to the given BinaryWriter.
1597
+ * @param {!proto.game.CategoryResponse} message
1598
+ * @param {!jspb.BinaryWriter} writer
1599
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1600
+ */
1601
+ proto.game.CategoryResponse.serializeBinaryToWriter = function(message, writer) {
1602
+ var f = undefined;
1603
+ f = message.getData();
1604
+ if (f != null) {
1605
+ writer.writeMessage(
1606
+ 1,
1607
+ f,
1608
+ proto.game.CategoryItem.serializeBinaryToWriter
1609
+ );
1610
+ }
1611
+ };
1612
+
1613
+
1614
+ /**
1615
+ * optional CategoryItem data = 1;
1616
+ * @return {?proto.game.CategoryItem}
1617
+ */
1618
+ proto.game.CategoryResponse.prototype.getData = function() {
1619
+ return /** @type{?proto.game.CategoryItem} */ (
1620
+ jspb.Message.getWrapperField(this, proto.game.CategoryItem, 1));
1621
+ };
1622
+
1623
+
1624
+ /**
1625
+ * @param {?proto.game.CategoryItem|undefined} value
1626
+ * @return {!proto.game.CategoryResponse} returns this
1627
+ */
1628
+ proto.game.CategoryResponse.prototype.setData = function(value) {
1629
+ return jspb.Message.setWrapperField(this, 1, value);
1630
+ };
1631
+
1632
+
1633
+ /**
1634
+ * Clears the message field making it undefined.
1635
+ * @return {!proto.game.CategoryResponse} returns this
1636
+ */
1637
+ proto.game.CategoryResponse.prototype.clearData = function() {
1638
+ return this.setData(undefined);
1639
+ };
1640
+
1641
+
1642
+ /**
1643
+ * Returns whether this field is set.
1644
+ * @return {boolean}
1645
+ */
1646
+ proto.game.CategoryResponse.prototype.hasData = function() {
1647
+ return jspb.Message.getField(this, 1) != null;
1648
+ };
1649
+
1650
+
1651
+
1652
+ /**
1653
+ * List of repeated fields within this message type.
1654
+ * @private {!Array<number>}
1655
+ * @const
1656
+ */
1657
+ proto.game.CategoryListResponse.repeatedFields_ = [1];
1658
+
1659
+
1660
+
1661
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1662
+ /**
1663
+ * Creates an object representation of this proto.
1664
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1665
+ * Optional fields that are not set will be set to undefined.
1666
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1667
+ * For the list of reserved names please see:
1668
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1669
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1670
+ * JSPB instance for transitional soy proto support:
1671
+ * http://goto/soy-param-migration
1672
+ * @return {!Object}
1673
+ */
1674
+ proto.game.CategoryListResponse.prototype.toObject = function(opt_includeInstance) {
1675
+ return proto.game.CategoryListResponse.toObject(opt_includeInstance, this);
1676
+ };
1677
+
1678
+
1679
+ /**
1680
+ * Static version of the {@see toObject} method.
1681
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1682
+ * the JSPB instance for transitional soy proto support:
1683
+ * http://goto/soy-param-migration
1684
+ * @param {!proto.game.CategoryListResponse} msg The msg instance to transform.
1685
+ * @return {!Object}
1686
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1687
+ */
1688
+ proto.game.CategoryListResponse.toObject = function(includeInstance, msg) {
1689
+ var f, obj = {
1690
+ itemsList: jspb.Message.toObjectList(msg.getItemsList(),
1691
+ proto.game.CategoryItem.toObject, includeInstance),
1692
+ totalPages: jspb.Message.getFieldWithDefault(msg, 2, 0),
1693
+ totalItems: jspb.Message.getFieldWithDefault(msg, 3, 0)
1694
+ };
1695
+
1696
+ if (includeInstance) {
1697
+ obj.$jspbMessageInstance = msg;
1698
+ }
1699
+ return obj;
1700
+ };
1701
+ }
1702
+
1703
+
1704
+ /**
1705
+ * Deserializes binary data (in protobuf wire format).
1706
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1707
+ * @return {!proto.game.CategoryListResponse}
1708
+ */
1709
+ proto.game.CategoryListResponse.deserializeBinary = function(bytes) {
1710
+ var reader = new jspb.BinaryReader(bytes);
1711
+ var msg = new proto.game.CategoryListResponse;
1712
+ return proto.game.CategoryListResponse.deserializeBinaryFromReader(msg, reader);
1713
+ };
1714
+
1715
+
1716
+ /**
1717
+ * Deserializes binary data (in protobuf wire format) from the
1718
+ * given reader into the given message object.
1719
+ * @param {!proto.game.CategoryListResponse} msg The message object to deserialize into.
1720
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1721
+ * @return {!proto.game.CategoryListResponse}
1722
+ */
1723
+ proto.game.CategoryListResponse.deserializeBinaryFromReader = function(msg, reader) {
1724
+ while (reader.nextField()) {
1725
+ if (reader.isEndGroup()) {
1726
+ break;
1727
+ }
1728
+ var field = reader.getFieldNumber();
1729
+ switch (field) {
1730
+ case 1:
1731
+ var value = new proto.game.CategoryItem;
1732
+ reader.readMessage(value,proto.game.CategoryItem.deserializeBinaryFromReader);
1733
+ msg.addItems(value);
1734
+ break;
1735
+ case 2:
1736
+ var value = /** @type {number} */ (reader.readInt32());
1737
+ msg.setTotalPages(value);
1738
+ break;
1739
+ case 3:
1740
+ var value = /** @type {number} */ (reader.readInt32());
1741
+ msg.setTotalItems(value);
1742
+ break;
1743
+ default:
1744
+ reader.skipField();
1745
+ break;
1746
+ }
1747
+ }
1748
+ return msg;
1749
+ };
1750
+
1751
+
1752
+ /**
1753
+ * Serializes the message to binary data (in protobuf wire format).
1754
+ * @return {!Uint8Array}
1755
+ */
1756
+ proto.game.CategoryListResponse.prototype.serializeBinary = function() {
1757
+ var writer = new jspb.BinaryWriter();
1758
+ proto.game.CategoryListResponse.serializeBinaryToWriter(this, writer);
1759
+ return writer.getResultBuffer();
1760
+ };
1761
+
1762
+
1763
+ /**
1764
+ * Serializes the given message to binary data (in protobuf wire
1765
+ * format), writing to the given BinaryWriter.
1766
+ * @param {!proto.game.CategoryListResponse} message
1767
+ * @param {!jspb.BinaryWriter} writer
1768
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1769
+ */
1770
+ proto.game.CategoryListResponse.serializeBinaryToWriter = function(message, writer) {
1771
+ var f = undefined;
1772
+ f = message.getItemsList();
1773
+ if (f.length > 0) {
1774
+ writer.writeRepeatedMessage(
1775
+ 1,
1776
+ f,
1777
+ proto.game.CategoryItem.serializeBinaryToWriter
1778
+ );
1779
+ }
1780
+ f = /** @type {number} */ (jspb.Message.getField(message, 2));
1781
+ if (f != null) {
1782
+ writer.writeInt32(
1783
+ 2,
1784
+ f
1785
+ );
1786
+ }
1787
+ f = /** @type {number} */ (jspb.Message.getField(message, 3));
1788
+ if (f != null) {
1789
+ writer.writeInt32(
1790
+ 3,
1791
+ f
1792
+ );
1793
+ }
1794
+ };
1795
+
1796
+
1797
+ /**
1798
+ * repeated CategoryItem items = 1;
1799
+ * @return {!Array<!proto.game.CategoryItem>}
1800
+ */
1801
+ proto.game.CategoryListResponse.prototype.getItemsList = function() {
1802
+ return /** @type{!Array<!proto.game.CategoryItem>} */ (
1803
+ jspb.Message.getRepeatedWrapperField(this, proto.game.CategoryItem, 1));
1804
+ };
1805
+
1806
+
1807
+ /**
1808
+ * @param {!Array<!proto.game.CategoryItem>} value
1809
+ * @return {!proto.game.CategoryListResponse} returns this
1810
+ */
1811
+ proto.game.CategoryListResponse.prototype.setItemsList = function(value) {
1812
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
1813
+ };
1814
+
1815
+
1816
+ /**
1817
+ * @param {!proto.game.CategoryItem=} opt_value
1818
+ * @param {number=} opt_index
1819
+ * @return {!proto.game.CategoryItem}
1820
+ */
1821
+ proto.game.CategoryListResponse.prototype.addItems = function(opt_value, opt_index) {
1822
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.game.CategoryItem, opt_index);
1823
+ };
1824
+
1825
+
1826
+ /**
1827
+ * Clears the list making it empty but non-null.
1828
+ * @return {!proto.game.CategoryListResponse} returns this
1829
+ */
1830
+ proto.game.CategoryListResponse.prototype.clearItemsList = function() {
1831
+ return this.setItemsList([]);
1832
+ };
1833
+
1834
+
1835
+ /**
1836
+ * optional int32 total_pages = 2;
1837
+ * @return {number}
1838
+ */
1839
+ proto.game.CategoryListResponse.prototype.getTotalPages = function() {
1840
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
1841
+ };
1842
+
1843
+
1844
+ /**
1845
+ * @param {number} value
1846
+ * @return {!proto.game.CategoryListResponse} returns this
1847
+ */
1848
+ proto.game.CategoryListResponse.prototype.setTotalPages = function(value) {
1849
+ return jspb.Message.setField(this, 2, value);
1850
+ };
1851
+
1852
+
1853
+ /**
1854
+ * Clears the field making it undefined.
1855
+ * @return {!proto.game.CategoryListResponse} returns this
1856
+ */
1857
+ proto.game.CategoryListResponse.prototype.clearTotalPages = function() {
1858
+ return jspb.Message.setField(this, 2, undefined);
1859
+ };
1860
+
1861
+
1862
+ /**
1863
+ * Returns whether this field is set.
1864
+ * @return {boolean}
1865
+ */
1866
+ proto.game.CategoryListResponse.prototype.hasTotalPages = function() {
1867
+ return jspb.Message.getField(this, 2) != null;
1868
+ };
1869
+
1870
+
1871
+ /**
1872
+ * optional int32 total_items = 3;
1873
+ * @return {number}
1874
+ */
1875
+ proto.game.CategoryListResponse.prototype.getTotalItems = function() {
1876
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
1877
+ };
1878
+
1879
+
1880
+ /**
1881
+ * @param {number} value
1882
+ * @return {!proto.game.CategoryListResponse} returns this
1883
+ */
1884
+ proto.game.CategoryListResponse.prototype.setTotalItems = function(value) {
1885
+ return jspb.Message.setField(this, 3, value);
1886
+ };
1887
+
1888
+
1889
+ /**
1890
+ * Clears the field making it undefined.
1891
+ * @return {!proto.game.CategoryListResponse} returns this
1892
+ */
1893
+ proto.game.CategoryListResponse.prototype.clearTotalItems = function() {
1894
+ return jspb.Message.setField(this, 3, undefined);
1895
+ };
1896
+
1897
+
1898
+ /**
1899
+ * Returns whether this field is set.
1900
+ * @return {boolean}
1901
+ */
1902
+ proto.game.CategoryListResponse.prototype.hasTotalItems = function() {
1903
+ return jspb.Message.getField(this, 3) != null;
1904
+ };
1905
+
1906
+
1907
+
1908
+
1909
+
1910
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1911
+ /**
1912
+ * Creates an object representation of this proto.
1913
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1914
+ * Optional fields that are not set will be set to undefined.
1915
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1916
+ * For the list of reserved names please see:
1917
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1918
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1919
+ * JSPB instance for transitional soy proto support:
1920
+ * http://goto/soy-param-migration
1921
+ * @return {!Object}
1922
+ */
1923
+ proto.game.CategoryStatusResponse.prototype.toObject = function(opt_includeInstance) {
1924
+ return proto.game.CategoryStatusResponse.toObject(opt_includeInstance, this);
1925
+ };
1926
+
1927
+
1928
+ /**
1929
+ * Static version of the {@see toObject} method.
1930
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1931
+ * the JSPB instance for transitional soy proto support:
1932
+ * http://goto/soy-param-migration
1933
+ * @param {!proto.game.CategoryStatusResponse} msg The msg instance to transform.
1934
+ * @return {!Object}
1935
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1936
+ */
1937
+ proto.game.CategoryStatusResponse.toObject = function(includeInstance, msg) {
1938
+ var f, obj = {
1939
+ status: jspb.Message.getFieldWithDefault(msg, 1, "")
1940
+ };
1941
+
1942
+ if (includeInstance) {
1943
+ obj.$jspbMessageInstance = msg;
1944
+ }
1945
+ return obj;
1946
+ };
1947
+ }
1948
+
1949
+
1950
+ /**
1951
+ * Deserializes binary data (in protobuf wire format).
1952
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1953
+ * @return {!proto.game.CategoryStatusResponse}
1954
+ */
1955
+ proto.game.CategoryStatusResponse.deserializeBinary = function(bytes) {
1956
+ var reader = new jspb.BinaryReader(bytes);
1957
+ var msg = new proto.game.CategoryStatusResponse;
1958
+ return proto.game.CategoryStatusResponse.deserializeBinaryFromReader(msg, reader);
1959
+ };
1960
+
1961
+
1962
+ /**
1963
+ * Deserializes binary data (in protobuf wire format) from the
1964
+ * given reader into the given message object.
1965
+ * @param {!proto.game.CategoryStatusResponse} msg The message object to deserialize into.
1966
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1967
+ * @return {!proto.game.CategoryStatusResponse}
1968
+ */
1969
+ proto.game.CategoryStatusResponse.deserializeBinaryFromReader = function(msg, reader) {
1970
+ while (reader.nextField()) {
1971
+ if (reader.isEndGroup()) {
1972
+ break;
1973
+ }
1974
+ var field = reader.getFieldNumber();
1975
+ switch (field) {
1976
+ case 1:
1977
+ var value = /** @type {string} */ (reader.readString());
1978
+ msg.setStatus(value);
1979
+ break;
1980
+ default:
1981
+ reader.skipField();
1982
+ break;
1983
+ }
1984
+ }
1985
+ return msg;
1986
+ };
1987
+
1988
+
1989
+ /**
1990
+ * Serializes the message to binary data (in protobuf wire format).
1991
+ * @return {!Uint8Array}
1992
+ */
1993
+ proto.game.CategoryStatusResponse.prototype.serializeBinary = function() {
1994
+ var writer = new jspb.BinaryWriter();
1995
+ proto.game.CategoryStatusResponse.serializeBinaryToWriter(this, writer);
1996
+ return writer.getResultBuffer();
1997
+ };
1998
+
1999
+
2000
+ /**
2001
+ * Serializes the given message to binary data (in protobuf wire
2002
+ * format), writing to the given BinaryWriter.
2003
+ * @param {!proto.game.CategoryStatusResponse} message
2004
+ * @param {!jspb.BinaryWriter} writer
2005
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2006
+ */
2007
+ proto.game.CategoryStatusResponse.serializeBinaryToWriter = function(message, writer) {
2008
+ var f = undefined;
2009
+ f = message.getStatus();
2010
+ if (f.length > 0) {
2011
+ writer.writeString(
2012
+ 1,
2013
+ f
2014
+ );
2015
+ }
2016
+ };
2017
+
2018
+
2019
+ /**
2020
+ * optional string status = 1;
2021
+ * @return {string}
2022
+ */
2023
+ proto.game.CategoryStatusResponse.prototype.getStatus = function() {
2024
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2025
+ };
2026
+
2027
+
2028
+ /**
2029
+ * @param {string} value
2030
+ * @return {!proto.game.CategoryStatusResponse} returns this
2031
+ */
2032
+ proto.game.CategoryStatusResponse.prototype.setStatus = function(value) {
2033
+ return jspb.Message.setProto3StringField(this, 1, value);
2034
+ };
2035
+
2036
+
328
2037
  goog.object.extend(exports, proto.game);