protobuf-platform 1.0.21 → 1.0.23

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,16 @@ 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.CategoryRequest.RequestCase', null, global);
28
+ goog.exportSymbol('proto.game.CategoryResponse', null, global);
29
+ goog.exportSymbol('proto.game.CategoryStatusResponse', null, global);
30
+ goog.exportSymbol('proto.game.File', null, global);
31
+ goog.exportSymbol('proto.game.GetCategoryRequest', null, global);
32
+ goog.exportSymbol('proto.game.GetListCategoryRequest', null, global);
33
+ goog.exportSymbol('proto.game.MetaDataFile', null, global);
24
34
  goog.exportSymbol('proto.game.PingRequest', null, global);
25
35
  goog.exportSymbol('proto.game.PongResponse', null, global);
26
36
  /**
@@ -65,6 +75,195 @@ if (goog.DEBUG && !COMPILED) {
65
75
  */
66
76
  proto.game.PongResponse.displayName = 'proto.game.PongResponse';
67
77
  }
78
+ /**
79
+ * Generated by JsPbCodeGenerator.
80
+ * @param {Array=} opt_data Optional initial data array, typically from a
81
+ * server response, or constructed directly in Javascript. The array is used
82
+ * in place and becomes part of the constructed object. It is not cloned.
83
+ * If no data is provided, the constructed object will be empty, but still
84
+ * valid.
85
+ * @extends {jspb.Message}
86
+ * @constructor
87
+ */
88
+ proto.game.CategoryItem = function(opt_data) {
89
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
90
+ };
91
+ goog.inherits(proto.game.CategoryItem, jspb.Message);
92
+ if (goog.DEBUG && !COMPILED) {
93
+ /**
94
+ * @public
95
+ * @override
96
+ */
97
+ proto.game.CategoryItem.displayName = 'proto.game.CategoryItem';
98
+ }
99
+ /**
100
+ * Generated by JsPbCodeGenerator.
101
+ * @param {Array=} opt_data Optional initial data array, typically from a
102
+ * server response, or constructed directly in Javascript. The array is used
103
+ * in place and becomes part of the constructed object. It is not cloned.
104
+ * If no data is provided, the constructed object will be empty, but still
105
+ * valid.
106
+ * @extends {jspb.Message}
107
+ * @constructor
108
+ */
109
+ proto.game.CategoryRequest = function(opt_data) {
110
+ jspb.Message.initialize(this, opt_data, 0, -1, null, proto.game.CategoryRequest.oneofGroups_);
111
+ };
112
+ goog.inherits(proto.game.CategoryRequest, jspb.Message);
113
+ if (goog.DEBUG && !COMPILED) {
114
+ /**
115
+ * @public
116
+ * @override
117
+ */
118
+ proto.game.CategoryRequest.displayName = 'proto.game.CategoryRequest';
119
+ }
120
+ /**
121
+ * Generated by JsPbCodeGenerator.
122
+ * @param {Array=} opt_data Optional initial data array, typically from a
123
+ * server response, or constructed directly in Javascript. The array is used
124
+ * in place and becomes part of the constructed object. It is not cloned.
125
+ * If no data is provided, the constructed object will be empty, but still
126
+ * valid.
127
+ * @extends {jspb.Message}
128
+ * @constructor
129
+ */
130
+ proto.game.GetCategoryRequest = function(opt_data) {
131
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
132
+ };
133
+ goog.inherits(proto.game.GetCategoryRequest, jspb.Message);
134
+ if (goog.DEBUG && !COMPILED) {
135
+ /**
136
+ * @public
137
+ * @override
138
+ */
139
+ proto.game.GetCategoryRequest.displayName = 'proto.game.GetCategoryRequest';
140
+ }
141
+ /**
142
+ * Generated by JsPbCodeGenerator.
143
+ * @param {Array=} opt_data Optional initial data array, typically from a
144
+ * server response, or constructed directly in Javascript. The array is used
145
+ * in place and becomes part of the constructed object. It is not cloned.
146
+ * If no data is provided, the constructed object will be empty, but still
147
+ * valid.
148
+ * @extends {jspb.Message}
149
+ * @constructor
150
+ */
151
+ proto.game.GetListCategoryRequest = function(opt_data) {
152
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
153
+ };
154
+ goog.inherits(proto.game.GetListCategoryRequest, jspb.Message);
155
+ if (goog.DEBUG && !COMPILED) {
156
+ /**
157
+ * @public
158
+ * @override
159
+ */
160
+ proto.game.GetListCategoryRequest.displayName = 'proto.game.GetListCategoryRequest';
161
+ }
162
+ /**
163
+ * Generated by JsPbCodeGenerator.
164
+ * @param {Array=} opt_data Optional initial data array, typically from a
165
+ * server response, or constructed directly in Javascript. The array is used
166
+ * in place and becomes part of the constructed object. It is not cloned.
167
+ * If no data is provided, the constructed object will be empty, but still
168
+ * valid.
169
+ * @extends {jspb.Message}
170
+ * @constructor
171
+ */
172
+ proto.game.CategoryResponse = function(opt_data) {
173
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
174
+ };
175
+ goog.inherits(proto.game.CategoryResponse, jspb.Message);
176
+ if (goog.DEBUG && !COMPILED) {
177
+ /**
178
+ * @public
179
+ * @override
180
+ */
181
+ proto.game.CategoryResponse.displayName = 'proto.game.CategoryResponse';
182
+ }
183
+ /**
184
+ * Generated by JsPbCodeGenerator.
185
+ * @param {Array=} opt_data Optional initial data array, typically from a
186
+ * server response, or constructed directly in Javascript. The array is used
187
+ * in place and becomes part of the constructed object. It is not cloned.
188
+ * If no data is provided, the constructed object will be empty, but still
189
+ * valid.
190
+ * @extends {jspb.Message}
191
+ * @constructor
192
+ */
193
+ proto.game.CategoryListResponse = function(opt_data) {
194
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.game.CategoryListResponse.repeatedFields_, null);
195
+ };
196
+ goog.inherits(proto.game.CategoryListResponse, jspb.Message);
197
+ if (goog.DEBUG && !COMPILED) {
198
+ /**
199
+ * @public
200
+ * @override
201
+ */
202
+ proto.game.CategoryListResponse.displayName = 'proto.game.CategoryListResponse';
203
+ }
204
+ /**
205
+ * Generated by JsPbCodeGenerator.
206
+ * @param {Array=} opt_data Optional initial data array, typically from a
207
+ * server response, or constructed directly in Javascript. The array is used
208
+ * in place and becomes part of the constructed object. It is not cloned.
209
+ * If no data is provided, the constructed object will be empty, but still
210
+ * valid.
211
+ * @extends {jspb.Message}
212
+ * @constructor
213
+ */
214
+ proto.game.CategoryStatusResponse = function(opt_data) {
215
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
216
+ };
217
+ goog.inherits(proto.game.CategoryStatusResponse, jspb.Message);
218
+ if (goog.DEBUG && !COMPILED) {
219
+ /**
220
+ * @public
221
+ * @override
222
+ */
223
+ proto.game.CategoryStatusResponse.displayName = 'proto.game.CategoryStatusResponse';
224
+ }
225
+ /**
226
+ * Generated by JsPbCodeGenerator.
227
+ * @param {Array=} opt_data Optional initial data array, typically from a
228
+ * server response, or constructed directly in Javascript. The array is used
229
+ * in place and becomes part of the constructed object. It is not cloned.
230
+ * If no data is provided, the constructed object will be empty, but still
231
+ * valid.
232
+ * @extends {jspb.Message}
233
+ * @constructor
234
+ */
235
+ proto.game.MetaDataFile = function(opt_data) {
236
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
237
+ };
238
+ goog.inherits(proto.game.MetaDataFile, jspb.Message);
239
+ if (goog.DEBUG && !COMPILED) {
240
+ /**
241
+ * @public
242
+ * @override
243
+ */
244
+ proto.game.MetaDataFile.displayName = 'proto.game.MetaDataFile';
245
+ }
246
+ /**
247
+ * Generated by JsPbCodeGenerator.
248
+ * @param {Array=} opt_data Optional initial data array, typically from a
249
+ * server response, or constructed directly in Javascript. The array is used
250
+ * in place and becomes part of the constructed object. It is not cloned.
251
+ * If no data is provided, the constructed object will be empty, but still
252
+ * valid.
253
+ * @extends {jspb.Message}
254
+ * @constructor
255
+ */
256
+ proto.game.File = function(opt_data) {
257
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
258
+ };
259
+ goog.inherits(proto.game.File, jspb.Message);
260
+ if (goog.DEBUG && !COMPILED) {
261
+ /**
262
+ * @public
263
+ * @override
264
+ */
265
+ proto.game.File.displayName = 'proto.game.File';
266
+ }
68
267
 
69
268
 
70
269
 
@@ -325,4 +524,2001 @@ proto.game.PongResponse.prototype.setPong = function(value) {
325
524
  };
326
525
 
327
526
 
527
+
528
+
529
+
530
+ if (jspb.Message.GENERATE_TO_OBJECT) {
531
+ /**
532
+ * Creates an object representation of this proto.
533
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
534
+ * Optional fields that are not set will be set to undefined.
535
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
536
+ * For the list of reserved names please see:
537
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
538
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
539
+ * JSPB instance for transitional soy proto support:
540
+ * http://goto/soy-param-migration
541
+ * @return {!Object}
542
+ */
543
+ proto.game.CategoryItem.prototype.toObject = function(opt_includeInstance) {
544
+ return proto.game.CategoryItem.toObject(opt_includeInstance, this);
545
+ };
546
+
547
+
548
+ /**
549
+ * Static version of the {@see toObject} method.
550
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
551
+ * the JSPB instance for transitional soy proto support:
552
+ * http://goto/soy-param-migration
553
+ * @param {!proto.game.CategoryItem} msg The msg instance to transform.
554
+ * @return {!Object}
555
+ * @suppress {unusedLocalVariables} f is only used for nested messages
556
+ */
557
+ proto.game.CategoryItem.toObject = function(includeInstance, msg) {
558
+ var f, obj = {
559
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
560
+ title: jspb.Message.getFieldWithDefault(msg, 2, ""),
561
+ slug: jspb.Message.getFieldWithDefault(msg, 3, ""),
562
+ description: jspb.Message.getFieldWithDefault(msg, 4, ""),
563
+ isActive: jspb.Message.getFieldWithDefault(msg, 5, 0),
564
+ imagePath: jspb.Message.getFieldWithDefault(msg, 6, "")
565
+ };
566
+
567
+ if (includeInstance) {
568
+ obj.$jspbMessageInstance = msg;
569
+ }
570
+ return obj;
571
+ };
572
+ }
573
+
574
+
575
+ /**
576
+ * Deserializes binary data (in protobuf wire format).
577
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
578
+ * @return {!proto.game.CategoryItem}
579
+ */
580
+ proto.game.CategoryItem.deserializeBinary = function(bytes) {
581
+ var reader = new jspb.BinaryReader(bytes);
582
+ var msg = new proto.game.CategoryItem;
583
+ return proto.game.CategoryItem.deserializeBinaryFromReader(msg, reader);
584
+ };
585
+
586
+
587
+ /**
588
+ * Deserializes binary data (in protobuf wire format) from the
589
+ * given reader into the given message object.
590
+ * @param {!proto.game.CategoryItem} msg The message object to deserialize into.
591
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
592
+ * @return {!proto.game.CategoryItem}
593
+ */
594
+ proto.game.CategoryItem.deserializeBinaryFromReader = function(msg, reader) {
595
+ while (reader.nextField()) {
596
+ if (reader.isEndGroup()) {
597
+ break;
598
+ }
599
+ var field = reader.getFieldNumber();
600
+ switch (field) {
601
+ case 1:
602
+ var value = /** @type {number} */ (reader.readInt32());
603
+ msg.setId(value);
604
+ break;
605
+ case 2:
606
+ var value = /** @type {string} */ (reader.readString());
607
+ msg.setTitle(value);
608
+ break;
609
+ case 3:
610
+ var value = /** @type {string} */ (reader.readString());
611
+ msg.setSlug(value);
612
+ break;
613
+ case 4:
614
+ var value = /** @type {string} */ (reader.readString());
615
+ msg.setDescription(value);
616
+ break;
617
+ case 5:
618
+ var value = /** @type {number} */ (reader.readInt32());
619
+ msg.setIsActive(value);
620
+ break;
621
+ case 6:
622
+ var value = /** @type {string} */ (reader.readString());
623
+ msg.setImagePath(value);
624
+ break;
625
+ default:
626
+ reader.skipField();
627
+ break;
628
+ }
629
+ }
630
+ return msg;
631
+ };
632
+
633
+
634
+ /**
635
+ * Serializes the message to binary data (in protobuf wire format).
636
+ * @return {!Uint8Array}
637
+ */
638
+ proto.game.CategoryItem.prototype.serializeBinary = function() {
639
+ var writer = new jspb.BinaryWriter();
640
+ proto.game.CategoryItem.serializeBinaryToWriter(this, writer);
641
+ return writer.getResultBuffer();
642
+ };
643
+
644
+
645
+ /**
646
+ * Serializes the given message to binary data (in protobuf wire
647
+ * format), writing to the given BinaryWriter.
648
+ * @param {!proto.game.CategoryItem} message
649
+ * @param {!jspb.BinaryWriter} writer
650
+ * @suppress {unusedLocalVariables} f is only used for nested messages
651
+ */
652
+ proto.game.CategoryItem.serializeBinaryToWriter = function(message, writer) {
653
+ var f = undefined;
654
+ f = /** @type {number} */ (jspb.Message.getField(message, 1));
655
+ if (f != null) {
656
+ writer.writeInt32(
657
+ 1,
658
+ f
659
+ );
660
+ }
661
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
662
+ if (f != null) {
663
+ writer.writeString(
664
+ 2,
665
+ f
666
+ );
667
+ }
668
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
669
+ if (f != null) {
670
+ writer.writeString(
671
+ 3,
672
+ f
673
+ );
674
+ }
675
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
676
+ if (f != null) {
677
+ writer.writeString(
678
+ 4,
679
+ f
680
+ );
681
+ }
682
+ f = /** @type {number} */ (jspb.Message.getField(message, 5));
683
+ if (f != null) {
684
+ writer.writeInt32(
685
+ 5,
686
+ f
687
+ );
688
+ }
689
+ f = /** @type {string} */ (jspb.Message.getField(message, 6));
690
+ if (f != null) {
691
+ writer.writeString(
692
+ 6,
693
+ f
694
+ );
695
+ }
696
+ };
697
+
698
+
699
+ /**
700
+ * optional int32 id = 1;
701
+ * @return {number}
702
+ */
703
+ proto.game.CategoryItem.prototype.getId = function() {
704
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
705
+ };
706
+
707
+
708
+ /**
709
+ * @param {number} value
710
+ * @return {!proto.game.CategoryItem} returns this
711
+ */
712
+ proto.game.CategoryItem.prototype.setId = function(value) {
713
+ return jspb.Message.setField(this, 1, value);
714
+ };
715
+
716
+
717
+ /**
718
+ * Clears the field making it undefined.
719
+ * @return {!proto.game.CategoryItem} returns this
720
+ */
721
+ proto.game.CategoryItem.prototype.clearId = function() {
722
+ return jspb.Message.setField(this, 1, undefined);
723
+ };
724
+
725
+
726
+ /**
727
+ * Returns whether this field is set.
728
+ * @return {boolean}
729
+ */
730
+ proto.game.CategoryItem.prototype.hasId = function() {
731
+ return jspb.Message.getField(this, 1) != null;
732
+ };
733
+
734
+
735
+ /**
736
+ * optional string title = 2;
737
+ * @return {string}
738
+ */
739
+ proto.game.CategoryItem.prototype.getTitle = function() {
740
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
741
+ };
742
+
743
+
744
+ /**
745
+ * @param {string} value
746
+ * @return {!proto.game.CategoryItem} returns this
747
+ */
748
+ proto.game.CategoryItem.prototype.setTitle = function(value) {
749
+ return jspb.Message.setField(this, 2, value);
750
+ };
751
+
752
+
753
+ /**
754
+ * Clears the field making it undefined.
755
+ * @return {!proto.game.CategoryItem} returns this
756
+ */
757
+ proto.game.CategoryItem.prototype.clearTitle = function() {
758
+ return jspb.Message.setField(this, 2, undefined);
759
+ };
760
+
761
+
762
+ /**
763
+ * Returns whether this field is set.
764
+ * @return {boolean}
765
+ */
766
+ proto.game.CategoryItem.prototype.hasTitle = function() {
767
+ return jspb.Message.getField(this, 2) != null;
768
+ };
769
+
770
+
771
+ /**
772
+ * optional string slug = 3;
773
+ * @return {string}
774
+ */
775
+ proto.game.CategoryItem.prototype.getSlug = function() {
776
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
777
+ };
778
+
779
+
780
+ /**
781
+ * @param {string} value
782
+ * @return {!proto.game.CategoryItem} returns this
783
+ */
784
+ proto.game.CategoryItem.prototype.setSlug = function(value) {
785
+ return jspb.Message.setField(this, 3, value);
786
+ };
787
+
788
+
789
+ /**
790
+ * Clears the field making it undefined.
791
+ * @return {!proto.game.CategoryItem} returns this
792
+ */
793
+ proto.game.CategoryItem.prototype.clearSlug = function() {
794
+ return jspb.Message.setField(this, 3, undefined);
795
+ };
796
+
797
+
798
+ /**
799
+ * Returns whether this field is set.
800
+ * @return {boolean}
801
+ */
802
+ proto.game.CategoryItem.prototype.hasSlug = function() {
803
+ return jspb.Message.getField(this, 3) != null;
804
+ };
805
+
806
+
807
+ /**
808
+ * optional string description = 4;
809
+ * @return {string}
810
+ */
811
+ proto.game.CategoryItem.prototype.getDescription = function() {
812
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
813
+ };
814
+
815
+
816
+ /**
817
+ * @param {string} value
818
+ * @return {!proto.game.CategoryItem} returns this
819
+ */
820
+ proto.game.CategoryItem.prototype.setDescription = function(value) {
821
+ return jspb.Message.setField(this, 4, value);
822
+ };
823
+
824
+
825
+ /**
826
+ * Clears the field making it undefined.
827
+ * @return {!proto.game.CategoryItem} returns this
828
+ */
829
+ proto.game.CategoryItem.prototype.clearDescription = function() {
830
+ return jspb.Message.setField(this, 4, undefined);
831
+ };
832
+
833
+
834
+ /**
835
+ * Returns whether this field is set.
836
+ * @return {boolean}
837
+ */
838
+ proto.game.CategoryItem.prototype.hasDescription = function() {
839
+ return jspb.Message.getField(this, 4) != null;
840
+ };
841
+
842
+
843
+ /**
844
+ * optional int32 is_active = 5;
845
+ * @return {number}
846
+ */
847
+ proto.game.CategoryItem.prototype.getIsActive = function() {
848
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
849
+ };
850
+
851
+
852
+ /**
853
+ * @param {number} value
854
+ * @return {!proto.game.CategoryItem} returns this
855
+ */
856
+ proto.game.CategoryItem.prototype.setIsActive = function(value) {
857
+ return jspb.Message.setField(this, 5, value);
858
+ };
859
+
860
+
861
+ /**
862
+ * Clears the field making it undefined.
863
+ * @return {!proto.game.CategoryItem} returns this
864
+ */
865
+ proto.game.CategoryItem.prototype.clearIsActive = function() {
866
+ return jspb.Message.setField(this, 5, undefined);
867
+ };
868
+
869
+
870
+ /**
871
+ * Returns whether this field is set.
872
+ * @return {boolean}
873
+ */
874
+ proto.game.CategoryItem.prototype.hasIsActive = function() {
875
+ return jspb.Message.getField(this, 5) != null;
876
+ };
877
+
878
+
879
+ /**
880
+ * optional string image_path = 6;
881
+ * @return {string}
882
+ */
883
+ proto.game.CategoryItem.prototype.getImagePath = function() {
884
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
885
+ };
886
+
887
+
888
+ /**
889
+ * @param {string} value
890
+ * @return {!proto.game.CategoryItem} returns this
891
+ */
892
+ proto.game.CategoryItem.prototype.setImagePath = function(value) {
893
+ return jspb.Message.setField(this, 6, value);
894
+ };
895
+
896
+
897
+ /**
898
+ * Clears the field making it undefined.
899
+ * @return {!proto.game.CategoryItem} returns this
900
+ */
901
+ proto.game.CategoryItem.prototype.clearImagePath = function() {
902
+ return jspb.Message.setField(this, 6, undefined);
903
+ };
904
+
905
+
906
+ /**
907
+ * Returns whether this field is set.
908
+ * @return {boolean}
909
+ */
910
+ proto.game.CategoryItem.prototype.hasImagePath = function() {
911
+ return jspb.Message.getField(this, 6) != null;
912
+ };
913
+
914
+
915
+
916
+ /**
917
+ * Oneof group definitions for this message. Each group defines the field
918
+ * numbers belonging to that group. When of these fields' value is set, all
919
+ * other fields in the group are cleared. During deserialization, if multiple
920
+ * fields are encountered for a group, only the last value seen will be kept.
921
+ * @private {!Array<!Array<number>>}
922
+ * @const
923
+ */
924
+ proto.game.CategoryRequest.oneofGroups_ = [[6,7]];
925
+
926
+ /**
927
+ * @enum {number}
928
+ */
929
+ proto.game.CategoryRequest.RequestCase = {
930
+ REQUEST_NOT_SET: 0,
931
+ METADATA: 6,
932
+ FILE: 7
933
+ };
934
+
935
+ /**
936
+ * @return {proto.game.CategoryRequest.RequestCase}
937
+ */
938
+ proto.game.CategoryRequest.prototype.getRequestCase = function() {
939
+ return /** @type {proto.game.CategoryRequest.RequestCase} */(jspb.Message.computeOneofCase(this, proto.game.CategoryRequest.oneofGroups_[0]));
940
+ };
941
+
942
+
943
+
944
+ if (jspb.Message.GENERATE_TO_OBJECT) {
945
+ /**
946
+ * Creates an object representation of this proto.
947
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
948
+ * Optional fields that are not set will be set to undefined.
949
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
950
+ * For the list of reserved names please see:
951
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
952
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
953
+ * JSPB instance for transitional soy proto support:
954
+ * http://goto/soy-param-migration
955
+ * @return {!Object}
956
+ */
957
+ proto.game.CategoryRequest.prototype.toObject = function(opt_includeInstance) {
958
+ return proto.game.CategoryRequest.toObject(opt_includeInstance, this);
959
+ };
960
+
961
+
962
+ /**
963
+ * Static version of the {@see toObject} method.
964
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
965
+ * the JSPB instance for transitional soy proto support:
966
+ * http://goto/soy-param-migration
967
+ * @param {!proto.game.CategoryRequest} msg The msg instance to transform.
968
+ * @return {!Object}
969
+ * @suppress {unusedLocalVariables} f is only used for nested messages
970
+ */
971
+ proto.game.CategoryRequest.toObject = function(includeInstance, msg) {
972
+ var f, obj = {
973
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
974
+ title: jspb.Message.getFieldWithDefault(msg, 2, ""),
975
+ slug: jspb.Message.getFieldWithDefault(msg, 3, ""),
976
+ description: jspb.Message.getFieldWithDefault(msg, 4, ""),
977
+ isActive: jspb.Message.getFieldWithDefault(msg, 5, 0),
978
+ metadata: (f = msg.getMetadata()) && proto.game.MetaDataFile.toObject(includeInstance, f),
979
+ file: (f = msg.getFile()) && proto.game.File.toObject(includeInstance, f)
980
+ };
981
+
982
+ if (includeInstance) {
983
+ obj.$jspbMessageInstance = msg;
984
+ }
985
+ return obj;
986
+ };
987
+ }
988
+
989
+
990
+ /**
991
+ * Deserializes binary data (in protobuf wire format).
992
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
993
+ * @return {!proto.game.CategoryRequest}
994
+ */
995
+ proto.game.CategoryRequest.deserializeBinary = function(bytes) {
996
+ var reader = new jspb.BinaryReader(bytes);
997
+ var msg = new proto.game.CategoryRequest;
998
+ return proto.game.CategoryRequest.deserializeBinaryFromReader(msg, reader);
999
+ };
1000
+
1001
+
1002
+ /**
1003
+ * Deserializes binary data (in protobuf wire format) from the
1004
+ * given reader into the given message object.
1005
+ * @param {!proto.game.CategoryRequest} msg The message object to deserialize into.
1006
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1007
+ * @return {!proto.game.CategoryRequest}
1008
+ */
1009
+ proto.game.CategoryRequest.deserializeBinaryFromReader = function(msg, reader) {
1010
+ while (reader.nextField()) {
1011
+ if (reader.isEndGroup()) {
1012
+ break;
1013
+ }
1014
+ var field = reader.getFieldNumber();
1015
+ switch (field) {
1016
+ case 1:
1017
+ var value = /** @type {number} */ (reader.readInt32());
1018
+ msg.setId(value);
1019
+ break;
1020
+ case 2:
1021
+ var value = /** @type {string} */ (reader.readString());
1022
+ msg.setTitle(value);
1023
+ break;
1024
+ case 3:
1025
+ var value = /** @type {string} */ (reader.readString());
1026
+ msg.setSlug(value);
1027
+ break;
1028
+ case 4:
1029
+ var value = /** @type {string} */ (reader.readString());
1030
+ msg.setDescription(value);
1031
+ break;
1032
+ case 5:
1033
+ var value = /** @type {number} */ (reader.readInt32());
1034
+ msg.setIsActive(value);
1035
+ break;
1036
+ case 6:
1037
+ var value = new proto.game.MetaDataFile;
1038
+ reader.readMessage(value,proto.game.MetaDataFile.deserializeBinaryFromReader);
1039
+ msg.setMetadata(value);
1040
+ break;
1041
+ case 7:
1042
+ var value = new proto.game.File;
1043
+ reader.readMessage(value,proto.game.File.deserializeBinaryFromReader);
1044
+ msg.setFile(value);
1045
+ break;
1046
+ default:
1047
+ reader.skipField();
1048
+ break;
1049
+ }
1050
+ }
1051
+ return msg;
1052
+ };
1053
+
1054
+
1055
+ /**
1056
+ * Serializes the message to binary data (in protobuf wire format).
1057
+ * @return {!Uint8Array}
1058
+ */
1059
+ proto.game.CategoryRequest.prototype.serializeBinary = function() {
1060
+ var writer = new jspb.BinaryWriter();
1061
+ proto.game.CategoryRequest.serializeBinaryToWriter(this, writer);
1062
+ return writer.getResultBuffer();
1063
+ };
1064
+
1065
+
1066
+ /**
1067
+ * Serializes the given message to binary data (in protobuf wire
1068
+ * format), writing to the given BinaryWriter.
1069
+ * @param {!proto.game.CategoryRequest} message
1070
+ * @param {!jspb.BinaryWriter} writer
1071
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1072
+ */
1073
+ proto.game.CategoryRequest.serializeBinaryToWriter = function(message, writer) {
1074
+ var f = undefined;
1075
+ f = /** @type {number} */ (jspb.Message.getField(message, 1));
1076
+ if (f != null) {
1077
+ writer.writeInt32(
1078
+ 1,
1079
+ f
1080
+ );
1081
+ }
1082
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
1083
+ if (f != null) {
1084
+ writer.writeString(
1085
+ 2,
1086
+ f
1087
+ );
1088
+ }
1089
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
1090
+ if (f != null) {
1091
+ writer.writeString(
1092
+ 3,
1093
+ f
1094
+ );
1095
+ }
1096
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
1097
+ if (f != null) {
1098
+ writer.writeString(
1099
+ 4,
1100
+ f
1101
+ );
1102
+ }
1103
+ f = /** @type {number} */ (jspb.Message.getField(message, 5));
1104
+ if (f != null) {
1105
+ writer.writeInt32(
1106
+ 5,
1107
+ f
1108
+ );
1109
+ }
1110
+ f = message.getMetadata();
1111
+ if (f != null) {
1112
+ writer.writeMessage(
1113
+ 6,
1114
+ f,
1115
+ proto.game.MetaDataFile.serializeBinaryToWriter
1116
+ );
1117
+ }
1118
+ f = message.getFile();
1119
+ if (f != null) {
1120
+ writer.writeMessage(
1121
+ 7,
1122
+ f,
1123
+ proto.game.File.serializeBinaryToWriter
1124
+ );
1125
+ }
1126
+ };
1127
+
1128
+
1129
+ /**
1130
+ * optional int32 id = 1;
1131
+ * @return {number}
1132
+ */
1133
+ proto.game.CategoryRequest.prototype.getId = function() {
1134
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1135
+ };
1136
+
1137
+
1138
+ /**
1139
+ * @param {number} value
1140
+ * @return {!proto.game.CategoryRequest} returns this
1141
+ */
1142
+ proto.game.CategoryRequest.prototype.setId = function(value) {
1143
+ return jspb.Message.setField(this, 1, value);
1144
+ };
1145
+
1146
+
1147
+ /**
1148
+ * Clears the field making it undefined.
1149
+ * @return {!proto.game.CategoryRequest} returns this
1150
+ */
1151
+ proto.game.CategoryRequest.prototype.clearId = function() {
1152
+ return jspb.Message.setField(this, 1, undefined);
1153
+ };
1154
+
1155
+
1156
+ /**
1157
+ * Returns whether this field is set.
1158
+ * @return {boolean}
1159
+ */
1160
+ proto.game.CategoryRequest.prototype.hasId = function() {
1161
+ return jspb.Message.getField(this, 1) != null;
1162
+ };
1163
+
1164
+
1165
+ /**
1166
+ * optional string title = 2;
1167
+ * @return {string}
1168
+ */
1169
+ proto.game.CategoryRequest.prototype.getTitle = function() {
1170
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1171
+ };
1172
+
1173
+
1174
+ /**
1175
+ * @param {string} value
1176
+ * @return {!proto.game.CategoryRequest} returns this
1177
+ */
1178
+ proto.game.CategoryRequest.prototype.setTitle = function(value) {
1179
+ return jspb.Message.setField(this, 2, value);
1180
+ };
1181
+
1182
+
1183
+ /**
1184
+ * Clears the field making it undefined.
1185
+ * @return {!proto.game.CategoryRequest} returns this
1186
+ */
1187
+ proto.game.CategoryRequest.prototype.clearTitle = function() {
1188
+ return jspb.Message.setField(this, 2, undefined);
1189
+ };
1190
+
1191
+
1192
+ /**
1193
+ * Returns whether this field is set.
1194
+ * @return {boolean}
1195
+ */
1196
+ proto.game.CategoryRequest.prototype.hasTitle = function() {
1197
+ return jspb.Message.getField(this, 2) != null;
1198
+ };
1199
+
1200
+
1201
+ /**
1202
+ * optional string slug = 3;
1203
+ * @return {string}
1204
+ */
1205
+ proto.game.CategoryRequest.prototype.getSlug = function() {
1206
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1207
+ };
1208
+
1209
+
1210
+ /**
1211
+ * @param {string} value
1212
+ * @return {!proto.game.CategoryRequest} returns this
1213
+ */
1214
+ proto.game.CategoryRequest.prototype.setSlug = function(value) {
1215
+ return jspb.Message.setField(this, 3, value);
1216
+ };
1217
+
1218
+
1219
+ /**
1220
+ * Clears the field making it undefined.
1221
+ * @return {!proto.game.CategoryRequest} returns this
1222
+ */
1223
+ proto.game.CategoryRequest.prototype.clearSlug = function() {
1224
+ return jspb.Message.setField(this, 3, undefined);
1225
+ };
1226
+
1227
+
1228
+ /**
1229
+ * Returns whether this field is set.
1230
+ * @return {boolean}
1231
+ */
1232
+ proto.game.CategoryRequest.prototype.hasSlug = function() {
1233
+ return jspb.Message.getField(this, 3) != null;
1234
+ };
1235
+
1236
+
1237
+ /**
1238
+ * optional string description = 4;
1239
+ * @return {string}
1240
+ */
1241
+ proto.game.CategoryRequest.prototype.getDescription = function() {
1242
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
1243
+ };
1244
+
1245
+
1246
+ /**
1247
+ * @param {string} value
1248
+ * @return {!proto.game.CategoryRequest} returns this
1249
+ */
1250
+ proto.game.CategoryRequest.prototype.setDescription = function(value) {
1251
+ return jspb.Message.setField(this, 4, value);
1252
+ };
1253
+
1254
+
1255
+ /**
1256
+ * Clears the field making it undefined.
1257
+ * @return {!proto.game.CategoryRequest} returns this
1258
+ */
1259
+ proto.game.CategoryRequest.prototype.clearDescription = function() {
1260
+ return jspb.Message.setField(this, 4, undefined);
1261
+ };
1262
+
1263
+
1264
+ /**
1265
+ * Returns whether this field is set.
1266
+ * @return {boolean}
1267
+ */
1268
+ proto.game.CategoryRequest.prototype.hasDescription = function() {
1269
+ return jspb.Message.getField(this, 4) != null;
1270
+ };
1271
+
1272
+
1273
+ /**
1274
+ * optional int32 is_active = 5;
1275
+ * @return {number}
1276
+ */
1277
+ proto.game.CategoryRequest.prototype.getIsActive = function() {
1278
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
1279
+ };
1280
+
1281
+
1282
+ /**
1283
+ * @param {number} value
1284
+ * @return {!proto.game.CategoryRequest} returns this
1285
+ */
1286
+ proto.game.CategoryRequest.prototype.setIsActive = function(value) {
1287
+ return jspb.Message.setField(this, 5, value);
1288
+ };
1289
+
1290
+
1291
+ /**
1292
+ * Clears the field making it undefined.
1293
+ * @return {!proto.game.CategoryRequest} returns this
1294
+ */
1295
+ proto.game.CategoryRequest.prototype.clearIsActive = function() {
1296
+ return jspb.Message.setField(this, 5, undefined);
1297
+ };
1298
+
1299
+
1300
+ /**
1301
+ * Returns whether this field is set.
1302
+ * @return {boolean}
1303
+ */
1304
+ proto.game.CategoryRequest.prototype.hasIsActive = function() {
1305
+ return jspb.Message.getField(this, 5) != null;
1306
+ };
1307
+
1308
+
1309
+ /**
1310
+ * optional MetaDataFile metadata = 6;
1311
+ * @return {?proto.game.MetaDataFile}
1312
+ */
1313
+ proto.game.CategoryRequest.prototype.getMetadata = function() {
1314
+ return /** @type{?proto.game.MetaDataFile} */ (
1315
+ jspb.Message.getWrapperField(this, proto.game.MetaDataFile, 6));
1316
+ };
1317
+
1318
+
1319
+ /**
1320
+ * @param {?proto.game.MetaDataFile|undefined} value
1321
+ * @return {!proto.game.CategoryRequest} returns this
1322
+ */
1323
+ proto.game.CategoryRequest.prototype.setMetadata = function(value) {
1324
+ return jspb.Message.setOneofWrapperField(this, 6, proto.game.CategoryRequest.oneofGroups_[0], value);
1325
+ };
1326
+
1327
+
1328
+ /**
1329
+ * Clears the message field making it undefined.
1330
+ * @return {!proto.game.CategoryRequest} returns this
1331
+ */
1332
+ proto.game.CategoryRequest.prototype.clearMetadata = function() {
1333
+ return this.setMetadata(undefined);
1334
+ };
1335
+
1336
+
1337
+ /**
1338
+ * Returns whether this field is set.
1339
+ * @return {boolean}
1340
+ */
1341
+ proto.game.CategoryRequest.prototype.hasMetadata = function() {
1342
+ return jspb.Message.getField(this, 6) != null;
1343
+ };
1344
+
1345
+
1346
+ /**
1347
+ * optional File file = 7;
1348
+ * @return {?proto.game.File}
1349
+ */
1350
+ proto.game.CategoryRequest.prototype.getFile = function() {
1351
+ return /** @type{?proto.game.File} */ (
1352
+ jspb.Message.getWrapperField(this, proto.game.File, 7));
1353
+ };
1354
+
1355
+
1356
+ /**
1357
+ * @param {?proto.game.File|undefined} value
1358
+ * @return {!proto.game.CategoryRequest} returns this
1359
+ */
1360
+ proto.game.CategoryRequest.prototype.setFile = function(value) {
1361
+ return jspb.Message.setOneofWrapperField(this, 7, proto.game.CategoryRequest.oneofGroups_[0], value);
1362
+ };
1363
+
1364
+
1365
+ /**
1366
+ * Clears the message field making it undefined.
1367
+ * @return {!proto.game.CategoryRequest} returns this
1368
+ */
1369
+ proto.game.CategoryRequest.prototype.clearFile = function() {
1370
+ return this.setFile(undefined);
1371
+ };
1372
+
1373
+
1374
+ /**
1375
+ * Returns whether this field is set.
1376
+ * @return {boolean}
1377
+ */
1378
+ proto.game.CategoryRequest.prototype.hasFile = function() {
1379
+ return jspb.Message.getField(this, 7) != null;
1380
+ };
1381
+
1382
+
1383
+
1384
+
1385
+
1386
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1387
+ /**
1388
+ * Creates an object representation of this proto.
1389
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1390
+ * Optional fields that are not set will be set to undefined.
1391
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1392
+ * For the list of reserved names please see:
1393
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1394
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1395
+ * JSPB instance for transitional soy proto support:
1396
+ * http://goto/soy-param-migration
1397
+ * @return {!Object}
1398
+ */
1399
+ proto.game.GetCategoryRequest.prototype.toObject = function(opt_includeInstance) {
1400
+ return proto.game.GetCategoryRequest.toObject(opt_includeInstance, this);
1401
+ };
1402
+
1403
+
1404
+ /**
1405
+ * Static version of the {@see toObject} method.
1406
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1407
+ * the JSPB instance for transitional soy proto support:
1408
+ * http://goto/soy-param-migration
1409
+ * @param {!proto.game.GetCategoryRequest} msg The msg instance to transform.
1410
+ * @return {!Object}
1411
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1412
+ */
1413
+ proto.game.GetCategoryRequest.toObject = function(includeInstance, msg) {
1414
+ var f, obj = {
1415
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0)
1416
+ };
1417
+
1418
+ if (includeInstance) {
1419
+ obj.$jspbMessageInstance = msg;
1420
+ }
1421
+ return obj;
1422
+ };
1423
+ }
1424
+
1425
+
1426
+ /**
1427
+ * Deserializes binary data (in protobuf wire format).
1428
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1429
+ * @return {!proto.game.GetCategoryRequest}
1430
+ */
1431
+ proto.game.GetCategoryRequest.deserializeBinary = function(bytes) {
1432
+ var reader = new jspb.BinaryReader(bytes);
1433
+ var msg = new proto.game.GetCategoryRequest;
1434
+ return proto.game.GetCategoryRequest.deserializeBinaryFromReader(msg, reader);
1435
+ };
1436
+
1437
+
1438
+ /**
1439
+ * Deserializes binary data (in protobuf wire format) from the
1440
+ * given reader into the given message object.
1441
+ * @param {!proto.game.GetCategoryRequest} msg The message object to deserialize into.
1442
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1443
+ * @return {!proto.game.GetCategoryRequest}
1444
+ */
1445
+ proto.game.GetCategoryRequest.deserializeBinaryFromReader = function(msg, reader) {
1446
+ while (reader.nextField()) {
1447
+ if (reader.isEndGroup()) {
1448
+ break;
1449
+ }
1450
+ var field = reader.getFieldNumber();
1451
+ switch (field) {
1452
+ case 1:
1453
+ var value = /** @type {number} */ (reader.readInt32());
1454
+ msg.setId(value);
1455
+ break;
1456
+ default:
1457
+ reader.skipField();
1458
+ break;
1459
+ }
1460
+ }
1461
+ return msg;
1462
+ };
1463
+
1464
+
1465
+ /**
1466
+ * Serializes the message to binary data (in protobuf wire format).
1467
+ * @return {!Uint8Array}
1468
+ */
1469
+ proto.game.GetCategoryRequest.prototype.serializeBinary = function() {
1470
+ var writer = new jspb.BinaryWriter();
1471
+ proto.game.GetCategoryRequest.serializeBinaryToWriter(this, writer);
1472
+ return writer.getResultBuffer();
1473
+ };
1474
+
1475
+
1476
+ /**
1477
+ * Serializes the given message to binary data (in protobuf wire
1478
+ * format), writing to the given BinaryWriter.
1479
+ * @param {!proto.game.GetCategoryRequest} message
1480
+ * @param {!jspb.BinaryWriter} writer
1481
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1482
+ */
1483
+ proto.game.GetCategoryRequest.serializeBinaryToWriter = function(message, writer) {
1484
+ var f = undefined;
1485
+ f = message.getId();
1486
+ if (f !== 0) {
1487
+ writer.writeInt32(
1488
+ 1,
1489
+ f
1490
+ );
1491
+ }
1492
+ };
1493
+
1494
+
1495
+ /**
1496
+ * optional int32 id = 1;
1497
+ * @return {number}
1498
+ */
1499
+ proto.game.GetCategoryRequest.prototype.getId = function() {
1500
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1501
+ };
1502
+
1503
+
1504
+ /**
1505
+ * @param {number} value
1506
+ * @return {!proto.game.GetCategoryRequest} returns this
1507
+ */
1508
+ proto.game.GetCategoryRequest.prototype.setId = function(value) {
1509
+ return jspb.Message.setProto3IntField(this, 1, value);
1510
+ };
1511
+
1512
+
1513
+
1514
+
1515
+
1516
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1517
+ /**
1518
+ * Creates an object representation of this proto.
1519
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1520
+ * Optional fields that are not set will be set to undefined.
1521
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1522
+ * For the list of reserved names please see:
1523
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1524
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1525
+ * JSPB instance for transitional soy proto support:
1526
+ * http://goto/soy-param-migration
1527
+ * @return {!Object}
1528
+ */
1529
+ proto.game.GetListCategoryRequest.prototype.toObject = function(opt_includeInstance) {
1530
+ return proto.game.GetListCategoryRequest.toObject(opt_includeInstance, this);
1531
+ };
1532
+
1533
+
1534
+ /**
1535
+ * Static version of the {@see toObject} method.
1536
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1537
+ * the JSPB instance for transitional soy proto support:
1538
+ * http://goto/soy-param-migration
1539
+ * @param {!proto.game.GetListCategoryRequest} msg The msg instance to transform.
1540
+ * @return {!Object}
1541
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1542
+ */
1543
+ proto.game.GetListCategoryRequest.toObject = function(includeInstance, msg) {
1544
+ var f, obj = {
1545
+ limit: jspb.Message.getFieldWithDefault(msg, 1, 0),
1546
+ offset: jspb.Message.getFieldWithDefault(msg, 2, 0)
1547
+ };
1548
+
1549
+ if (includeInstance) {
1550
+ obj.$jspbMessageInstance = msg;
1551
+ }
1552
+ return obj;
1553
+ };
1554
+ }
1555
+
1556
+
1557
+ /**
1558
+ * Deserializes binary data (in protobuf wire format).
1559
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1560
+ * @return {!proto.game.GetListCategoryRequest}
1561
+ */
1562
+ proto.game.GetListCategoryRequest.deserializeBinary = function(bytes) {
1563
+ var reader = new jspb.BinaryReader(bytes);
1564
+ var msg = new proto.game.GetListCategoryRequest;
1565
+ return proto.game.GetListCategoryRequest.deserializeBinaryFromReader(msg, reader);
1566
+ };
1567
+
1568
+
1569
+ /**
1570
+ * Deserializes binary data (in protobuf wire format) from the
1571
+ * given reader into the given message object.
1572
+ * @param {!proto.game.GetListCategoryRequest} msg The message object to deserialize into.
1573
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1574
+ * @return {!proto.game.GetListCategoryRequest}
1575
+ */
1576
+ proto.game.GetListCategoryRequest.deserializeBinaryFromReader = function(msg, reader) {
1577
+ while (reader.nextField()) {
1578
+ if (reader.isEndGroup()) {
1579
+ break;
1580
+ }
1581
+ var field = reader.getFieldNumber();
1582
+ switch (field) {
1583
+ case 1:
1584
+ var value = /** @type {number} */ (reader.readInt32());
1585
+ msg.setLimit(value);
1586
+ break;
1587
+ case 2:
1588
+ var value = /** @type {number} */ (reader.readInt32());
1589
+ msg.setOffset(value);
1590
+ break;
1591
+ default:
1592
+ reader.skipField();
1593
+ break;
1594
+ }
1595
+ }
1596
+ return msg;
1597
+ };
1598
+
1599
+
1600
+ /**
1601
+ * Serializes the message to binary data (in protobuf wire format).
1602
+ * @return {!Uint8Array}
1603
+ */
1604
+ proto.game.GetListCategoryRequest.prototype.serializeBinary = function() {
1605
+ var writer = new jspb.BinaryWriter();
1606
+ proto.game.GetListCategoryRequest.serializeBinaryToWriter(this, writer);
1607
+ return writer.getResultBuffer();
1608
+ };
1609
+
1610
+
1611
+ /**
1612
+ * Serializes the given message to binary data (in protobuf wire
1613
+ * format), writing to the given BinaryWriter.
1614
+ * @param {!proto.game.GetListCategoryRequest} message
1615
+ * @param {!jspb.BinaryWriter} writer
1616
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1617
+ */
1618
+ proto.game.GetListCategoryRequest.serializeBinaryToWriter = function(message, writer) {
1619
+ var f = undefined;
1620
+ f = message.getLimit();
1621
+ if (f !== 0) {
1622
+ writer.writeInt32(
1623
+ 1,
1624
+ f
1625
+ );
1626
+ }
1627
+ f = message.getOffset();
1628
+ if (f !== 0) {
1629
+ writer.writeInt32(
1630
+ 2,
1631
+ f
1632
+ );
1633
+ }
1634
+ };
1635
+
1636
+
1637
+ /**
1638
+ * optional int32 limit = 1;
1639
+ * @return {number}
1640
+ */
1641
+ proto.game.GetListCategoryRequest.prototype.getLimit = function() {
1642
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1643
+ };
1644
+
1645
+
1646
+ /**
1647
+ * @param {number} value
1648
+ * @return {!proto.game.GetListCategoryRequest} returns this
1649
+ */
1650
+ proto.game.GetListCategoryRequest.prototype.setLimit = function(value) {
1651
+ return jspb.Message.setProto3IntField(this, 1, value);
1652
+ };
1653
+
1654
+
1655
+ /**
1656
+ * optional int32 offset = 2;
1657
+ * @return {number}
1658
+ */
1659
+ proto.game.GetListCategoryRequest.prototype.getOffset = function() {
1660
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
1661
+ };
1662
+
1663
+
1664
+ /**
1665
+ * @param {number} value
1666
+ * @return {!proto.game.GetListCategoryRequest} returns this
1667
+ */
1668
+ proto.game.GetListCategoryRequest.prototype.setOffset = function(value) {
1669
+ return jspb.Message.setProto3IntField(this, 2, value);
1670
+ };
1671
+
1672
+
1673
+
1674
+
1675
+
1676
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1677
+ /**
1678
+ * Creates an object representation of this proto.
1679
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1680
+ * Optional fields that are not set will be set to undefined.
1681
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1682
+ * For the list of reserved names please see:
1683
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1684
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1685
+ * JSPB instance for transitional soy proto support:
1686
+ * http://goto/soy-param-migration
1687
+ * @return {!Object}
1688
+ */
1689
+ proto.game.CategoryResponse.prototype.toObject = function(opt_includeInstance) {
1690
+ return proto.game.CategoryResponse.toObject(opt_includeInstance, this);
1691
+ };
1692
+
1693
+
1694
+ /**
1695
+ * Static version of the {@see toObject} method.
1696
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1697
+ * the JSPB instance for transitional soy proto support:
1698
+ * http://goto/soy-param-migration
1699
+ * @param {!proto.game.CategoryResponse} msg The msg instance to transform.
1700
+ * @return {!Object}
1701
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1702
+ */
1703
+ proto.game.CategoryResponse.toObject = function(includeInstance, msg) {
1704
+ var f, obj = {
1705
+ data: (f = msg.getData()) && proto.game.CategoryItem.toObject(includeInstance, f)
1706
+ };
1707
+
1708
+ if (includeInstance) {
1709
+ obj.$jspbMessageInstance = msg;
1710
+ }
1711
+ return obj;
1712
+ };
1713
+ }
1714
+
1715
+
1716
+ /**
1717
+ * Deserializes binary data (in protobuf wire format).
1718
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1719
+ * @return {!proto.game.CategoryResponse}
1720
+ */
1721
+ proto.game.CategoryResponse.deserializeBinary = function(bytes) {
1722
+ var reader = new jspb.BinaryReader(bytes);
1723
+ var msg = new proto.game.CategoryResponse;
1724
+ return proto.game.CategoryResponse.deserializeBinaryFromReader(msg, reader);
1725
+ };
1726
+
1727
+
1728
+ /**
1729
+ * Deserializes binary data (in protobuf wire format) from the
1730
+ * given reader into the given message object.
1731
+ * @param {!proto.game.CategoryResponse} msg The message object to deserialize into.
1732
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1733
+ * @return {!proto.game.CategoryResponse}
1734
+ */
1735
+ proto.game.CategoryResponse.deserializeBinaryFromReader = function(msg, reader) {
1736
+ while (reader.nextField()) {
1737
+ if (reader.isEndGroup()) {
1738
+ break;
1739
+ }
1740
+ var field = reader.getFieldNumber();
1741
+ switch (field) {
1742
+ case 1:
1743
+ var value = new proto.game.CategoryItem;
1744
+ reader.readMessage(value,proto.game.CategoryItem.deserializeBinaryFromReader);
1745
+ msg.setData(value);
1746
+ break;
1747
+ default:
1748
+ reader.skipField();
1749
+ break;
1750
+ }
1751
+ }
1752
+ return msg;
1753
+ };
1754
+
1755
+
1756
+ /**
1757
+ * Serializes the message to binary data (in protobuf wire format).
1758
+ * @return {!Uint8Array}
1759
+ */
1760
+ proto.game.CategoryResponse.prototype.serializeBinary = function() {
1761
+ var writer = new jspb.BinaryWriter();
1762
+ proto.game.CategoryResponse.serializeBinaryToWriter(this, writer);
1763
+ return writer.getResultBuffer();
1764
+ };
1765
+
1766
+
1767
+ /**
1768
+ * Serializes the given message to binary data (in protobuf wire
1769
+ * format), writing to the given BinaryWriter.
1770
+ * @param {!proto.game.CategoryResponse} message
1771
+ * @param {!jspb.BinaryWriter} writer
1772
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1773
+ */
1774
+ proto.game.CategoryResponse.serializeBinaryToWriter = function(message, writer) {
1775
+ var f = undefined;
1776
+ f = message.getData();
1777
+ if (f != null) {
1778
+ writer.writeMessage(
1779
+ 1,
1780
+ f,
1781
+ proto.game.CategoryItem.serializeBinaryToWriter
1782
+ );
1783
+ }
1784
+ };
1785
+
1786
+
1787
+ /**
1788
+ * optional CategoryItem data = 1;
1789
+ * @return {?proto.game.CategoryItem}
1790
+ */
1791
+ proto.game.CategoryResponse.prototype.getData = function() {
1792
+ return /** @type{?proto.game.CategoryItem} */ (
1793
+ jspb.Message.getWrapperField(this, proto.game.CategoryItem, 1));
1794
+ };
1795
+
1796
+
1797
+ /**
1798
+ * @param {?proto.game.CategoryItem|undefined} value
1799
+ * @return {!proto.game.CategoryResponse} returns this
1800
+ */
1801
+ proto.game.CategoryResponse.prototype.setData = function(value) {
1802
+ return jspb.Message.setWrapperField(this, 1, value);
1803
+ };
1804
+
1805
+
1806
+ /**
1807
+ * Clears the message field making it undefined.
1808
+ * @return {!proto.game.CategoryResponse} returns this
1809
+ */
1810
+ proto.game.CategoryResponse.prototype.clearData = function() {
1811
+ return this.setData(undefined);
1812
+ };
1813
+
1814
+
1815
+ /**
1816
+ * Returns whether this field is set.
1817
+ * @return {boolean}
1818
+ */
1819
+ proto.game.CategoryResponse.prototype.hasData = function() {
1820
+ return jspb.Message.getField(this, 1) != null;
1821
+ };
1822
+
1823
+
1824
+
1825
+ /**
1826
+ * List of repeated fields within this message type.
1827
+ * @private {!Array<number>}
1828
+ * @const
1829
+ */
1830
+ proto.game.CategoryListResponse.repeatedFields_ = [1];
1831
+
1832
+
1833
+
1834
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1835
+ /**
1836
+ * Creates an object representation of this proto.
1837
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1838
+ * Optional fields that are not set will be set to undefined.
1839
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1840
+ * For the list of reserved names please see:
1841
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1842
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1843
+ * JSPB instance for transitional soy proto support:
1844
+ * http://goto/soy-param-migration
1845
+ * @return {!Object}
1846
+ */
1847
+ proto.game.CategoryListResponse.prototype.toObject = function(opt_includeInstance) {
1848
+ return proto.game.CategoryListResponse.toObject(opt_includeInstance, this);
1849
+ };
1850
+
1851
+
1852
+ /**
1853
+ * Static version of the {@see toObject} method.
1854
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1855
+ * the JSPB instance for transitional soy proto support:
1856
+ * http://goto/soy-param-migration
1857
+ * @param {!proto.game.CategoryListResponse} msg The msg instance to transform.
1858
+ * @return {!Object}
1859
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1860
+ */
1861
+ proto.game.CategoryListResponse.toObject = function(includeInstance, msg) {
1862
+ var f, obj = {
1863
+ itemsList: jspb.Message.toObjectList(msg.getItemsList(),
1864
+ proto.game.CategoryItem.toObject, includeInstance),
1865
+ totalPages: jspb.Message.getFieldWithDefault(msg, 2, 0),
1866
+ totalItems: jspb.Message.getFieldWithDefault(msg, 3, 0)
1867
+ };
1868
+
1869
+ if (includeInstance) {
1870
+ obj.$jspbMessageInstance = msg;
1871
+ }
1872
+ return obj;
1873
+ };
1874
+ }
1875
+
1876
+
1877
+ /**
1878
+ * Deserializes binary data (in protobuf wire format).
1879
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1880
+ * @return {!proto.game.CategoryListResponse}
1881
+ */
1882
+ proto.game.CategoryListResponse.deserializeBinary = function(bytes) {
1883
+ var reader = new jspb.BinaryReader(bytes);
1884
+ var msg = new proto.game.CategoryListResponse;
1885
+ return proto.game.CategoryListResponse.deserializeBinaryFromReader(msg, reader);
1886
+ };
1887
+
1888
+
1889
+ /**
1890
+ * Deserializes binary data (in protobuf wire format) from the
1891
+ * given reader into the given message object.
1892
+ * @param {!proto.game.CategoryListResponse} msg The message object to deserialize into.
1893
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1894
+ * @return {!proto.game.CategoryListResponse}
1895
+ */
1896
+ proto.game.CategoryListResponse.deserializeBinaryFromReader = function(msg, reader) {
1897
+ while (reader.nextField()) {
1898
+ if (reader.isEndGroup()) {
1899
+ break;
1900
+ }
1901
+ var field = reader.getFieldNumber();
1902
+ switch (field) {
1903
+ case 1:
1904
+ var value = new proto.game.CategoryItem;
1905
+ reader.readMessage(value,proto.game.CategoryItem.deserializeBinaryFromReader);
1906
+ msg.addItems(value);
1907
+ break;
1908
+ case 2:
1909
+ var value = /** @type {number} */ (reader.readInt32());
1910
+ msg.setTotalPages(value);
1911
+ break;
1912
+ case 3:
1913
+ var value = /** @type {number} */ (reader.readInt32());
1914
+ msg.setTotalItems(value);
1915
+ break;
1916
+ default:
1917
+ reader.skipField();
1918
+ break;
1919
+ }
1920
+ }
1921
+ return msg;
1922
+ };
1923
+
1924
+
1925
+ /**
1926
+ * Serializes the message to binary data (in protobuf wire format).
1927
+ * @return {!Uint8Array}
1928
+ */
1929
+ proto.game.CategoryListResponse.prototype.serializeBinary = function() {
1930
+ var writer = new jspb.BinaryWriter();
1931
+ proto.game.CategoryListResponse.serializeBinaryToWriter(this, writer);
1932
+ return writer.getResultBuffer();
1933
+ };
1934
+
1935
+
1936
+ /**
1937
+ * Serializes the given message to binary data (in protobuf wire
1938
+ * format), writing to the given BinaryWriter.
1939
+ * @param {!proto.game.CategoryListResponse} message
1940
+ * @param {!jspb.BinaryWriter} writer
1941
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1942
+ */
1943
+ proto.game.CategoryListResponse.serializeBinaryToWriter = function(message, writer) {
1944
+ var f = undefined;
1945
+ f = message.getItemsList();
1946
+ if (f.length > 0) {
1947
+ writer.writeRepeatedMessage(
1948
+ 1,
1949
+ f,
1950
+ proto.game.CategoryItem.serializeBinaryToWriter
1951
+ );
1952
+ }
1953
+ f = /** @type {number} */ (jspb.Message.getField(message, 2));
1954
+ if (f != null) {
1955
+ writer.writeInt32(
1956
+ 2,
1957
+ f
1958
+ );
1959
+ }
1960
+ f = /** @type {number} */ (jspb.Message.getField(message, 3));
1961
+ if (f != null) {
1962
+ writer.writeInt32(
1963
+ 3,
1964
+ f
1965
+ );
1966
+ }
1967
+ };
1968
+
1969
+
1970
+ /**
1971
+ * repeated CategoryItem items = 1;
1972
+ * @return {!Array<!proto.game.CategoryItem>}
1973
+ */
1974
+ proto.game.CategoryListResponse.prototype.getItemsList = function() {
1975
+ return /** @type{!Array<!proto.game.CategoryItem>} */ (
1976
+ jspb.Message.getRepeatedWrapperField(this, proto.game.CategoryItem, 1));
1977
+ };
1978
+
1979
+
1980
+ /**
1981
+ * @param {!Array<!proto.game.CategoryItem>} value
1982
+ * @return {!proto.game.CategoryListResponse} returns this
1983
+ */
1984
+ proto.game.CategoryListResponse.prototype.setItemsList = function(value) {
1985
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
1986
+ };
1987
+
1988
+
1989
+ /**
1990
+ * @param {!proto.game.CategoryItem=} opt_value
1991
+ * @param {number=} opt_index
1992
+ * @return {!proto.game.CategoryItem}
1993
+ */
1994
+ proto.game.CategoryListResponse.prototype.addItems = function(opt_value, opt_index) {
1995
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.game.CategoryItem, opt_index);
1996
+ };
1997
+
1998
+
1999
+ /**
2000
+ * Clears the list making it empty but non-null.
2001
+ * @return {!proto.game.CategoryListResponse} returns this
2002
+ */
2003
+ proto.game.CategoryListResponse.prototype.clearItemsList = function() {
2004
+ return this.setItemsList([]);
2005
+ };
2006
+
2007
+
2008
+ /**
2009
+ * optional int32 total_pages = 2;
2010
+ * @return {number}
2011
+ */
2012
+ proto.game.CategoryListResponse.prototype.getTotalPages = function() {
2013
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
2014
+ };
2015
+
2016
+
2017
+ /**
2018
+ * @param {number} value
2019
+ * @return {!proto.game.CategoryListResponse} returns this
2020
+ */
2021
+ proto.game.CategoryListResponse.prototype.setTotalPages = function(value) {
2022
+ return jspb.Message.setField(this, 2, value);
2023
+ };
2024
+
2025
+
2026
+ /**
2027
+ * Clears the field making it undefined.
2028
+ * @return {!proto.game.CategoryListResponse} returns this
2029
+ */
2030
+ proto.game.CategoryListResponse.prototype.clearTotalPages = function() {
2031
+ return jspb.Message.setField(this, 2, undefined);
2032
+ };
2033
+
2034
+
2035
+ /**
2036
+ * Returns whether this field is set.
2037
+ * @return {boolean}
2038
+ */
2039
+ proto.game.CategoryListResponse.prototype.hasTotalPages = function() {
2040
+ return jspb.Message.getField(this, 2) != null;
2041
+ };
2042
+
2043
+
2044
+ /**
2045
+ * optional int32 total_items = 3;
2046
+ * @return {number}
2047
+ */
2048
+ proto.game.CategoryListResponse.prototype.getTotalItems = function() {
2049
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
2050
+ };
2051
+
2052
+
2053
+ /**
2054
+ * @param {number} value
2055
+ * @return {!proto.game.CategoryListResponse} returns this
2056
+ */
2057
+ proto.game.CategoryListResponse.prototype.setTotalItems = function(value) {
2058
+ return jspb.Message.setField(this, 3, value);
2059
+ };
2060
+
2061
+
2062
+ /**
2063
+ * Clears the field making it undefined.
2064
+ * @return {!proto.game.CategoryListResponse} returns this
2065
+ */
2066
+ proto.game.CategoryListResponse.prototype.clearTotalItems = function() {
2067
+ return jspb.Message.setField(this, 3, undefined);
2068
+ };
2069
+
2070
+
2071
+ /**
2072
+ * Returns whether this field is set.
2073
+ * @return {boolean}
2074
+ */
2075
+ proto.game.CategoryListResponse.prototype.hasTotalItems = function() {
2076
+ return jspb.Message.getField(this, 3) != null;
2077
+ };
2078
+
2079
+
2080
+
2081
+
2082
+
2083
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2084
+ /**
2085
+ * Creates an object representation of this proto.
2086
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2087
+ * Optional fields that are not set will be set to undefined.
2088
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2089
+ * For the list of reserved names please see:
2090
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2091
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2092
+ * JSPB instance for transitional soy proto support:
2093
+ * http://goto/soy-param-migration
2094
+ * @return {!Object}
2095
+ */
2096
+ proto.game.CategoryStatusResponse.prototype.toObject = function(opt_includeInstance) {
2097
+ return proto.game.CategoryStatusResponse.toObject(opt_includeInstance, this);
2098
+ };
2099
+
2100
+
2101
+ /**
2102
+ * Static version of the {@see toObject} method.
2103
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2104
+ * the JSPB instance for transitional soy proto support:
2105
+ * http://goto/soy-param-migration
2106
+ * @param {!proto.game.CategoryStatusResponse} msg The msg instance to transform.
2107
+ * @return {!Object}
2108
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2109
+ */
2110
+ proto.game.CategoryStatusResponse.toObject = function(includeInstance, msg) {
2111
+ var f, obj = {
2112
+ status: jspb.Message.getFieldWithDefault(msg, 1, "")
2113
+ };
2114
+
2115
+ if (includeInstance) {
2116
+ obj.$jspbMessageInstance = msg;
2117
+ }
2118
+ return obj;
2119
+ };
2120
+ }
2121
+
2122
+
2123
+ /**
2124
+ * Deserializes binary data (in protobuf wire format).
2125
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2126
+ * @return {!proto.game.CategoryStatusResponse}
2127
+ */
2128
+ proto.game.CategoryStatusResponse.deserializeBinary = function(bytes) {
2129
+ var reader = new jspb.BinaryReader(bytes);
2130
+ var msg = new proto.game.CategoryStatusResponse;
2131
+ return proto.game.CategoryStatusResponse.deserializeBinaryFromReader(msg, reader);
2132
+ };
2133
+
2134
+
2135
+ /**
2136
+ * Deserializes binary data (in protobuf wire format) from the
2137
+ * given reader into the given message object.
2138
+ * @param {!proto.game.CategoryStatusResponse} msg The message object to deserialize into.
2139
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2140
+ * @return {!proto.game.CategoryStatusResponse}
2141
+ */
2142
+ proto.game.CategoryStatusResponse.deserializeBinaryFromReader = function(msg, reader) {
2143
+ while (reader.nextField()) {
2144
+ if (reader.isEndGroup()) {
2145
+ break;
2146
+ }
2147
+ var field = reader.getFieldNumber();
2148
+ switch (field) {
2149
+ case 1:
2150
+ var value = /** @type {string} */ (reader.readString());
2151
+ msg.setStatus(value);
2152
+ break;
2153
+ default:
2154
+ reader.skipField();
2155
+ break;
2156
+ }
2157
+ }
2158
+ return msg;
2159
+ };
2160
+
2161
+
2162
+ /**
2163
+ * Serializes the message to binary data (in protobuf wire format).
2164
+ * @return {!Uint8Array}
2165
+ */
2166
+ proto.game.CategoryStatusResponse.prototype.serializeBinary = function() {
2167
+ var writer = new jspb.BinaryWriter();
2168
+ proto.game.CategoryStatusResponse.serializeBinaryToWriter(this, writer);
2169
+ return writer.getResultBuffer();
2170
+ };
2171
+
2172
+
2173
+ /**
2174
+ * Serializes the given message to binary data (in protobuf wire
2175
+ * format), writing to the given BinaryWriter.
2176
+ * @param {!proto.game.CategoryStatusResponse} message
2177
+ * @param {!jspb.BinaryWriter} writer
2178
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2179
+ */
2180
+ proto.game.CategoryStatusResponse.serializeBinaryToWriter = function(message, writer) {
2181
+ var f = undefined;
2182
+ f = message.getStatus();
2183
+ if (f.length > 0) {
2184
+ writer.writeString(
2185
+ 1,
2186
+ f
2187
+ );
2188
+ }
2189
+ };
2190
+
2191
+
2192
+ /**
2193
+ * optional string status = 1;
2194
+ * @return {string}
2195
+ */
2196
+ proto.game.CategoryStatusResponse.prototype.getStatus = function() {
2197
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2198
+ };
2199
+
2200
+
2201
+ /**
2202
+ * @param {string} value
2203
+ * @return {!proto.game.CategoryStatusResponse} returns this
2204
+ */
2205
+ proto.game.CategoryStatusResponse.prototype.setStatus = function(value) {
2206
+ return jspb.Message.setProto3StringField(this, 1, value);
2207
+ };
2208
+
2209
+
2210
+
2211
+
2212
+
2213
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2214
+ /**
2215
+ * Creates an object representation of this proto.
2216
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2217
+ * Optional fields that are not set will be set to undefined.
2218
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2219
+ * For the list of reserved names please see:
2220
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2221
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2222
+ * JSPB instance for transitional soy proto support:
2223
+ * http://goto/soy-param-migration
2224
+ * @return {!Object}
2225
+ */
2226
+ proto.game.MetaDataFile.prototype.toObject = function(opt_includeInstance) {
2227
+ return proto.game.MetaDataFile.toObject(opt_includeInstance, this);
2228
+ };
2229
+
2230
+
2231
+ /**
2232
+ * Static version of the {@see toObject} method.
2233
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2234
+ * the JSPB instance for transitional soy proto support:
2235
+ * http://goto/soy-param-migration
2236
+ * @param {!proto.game.MetaDataFile} msg The msg instance to transform.
2237
+ * @return {!Object}
2238
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2239
+ */
2240
+ proto.game.MetaDataFile.toObject = function(includeInstance, msg) {
2241
+ var f, obj = {
2242
+ name: jspb.Message.getFieldWithDefault(msg, 1, ""),
2243
+ type: jspb.Message.getFieldWithDefault(msg, 2, "")
2244
+ };
2245
+
2246
+ if (includeInstance) {
2247
+ obj.$jspbMessageInstance = msg;
2248
+ }
2249
+ return obj;
2250
+ };
2251
+ }
2252
+
2253
+
2254
+ /**
2255
+ * Deserializes binary data (in protobuf wire format).
2256
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2257
+ * @return {!proto.game.MetaDataFile}
2258
+ */
2259
+ proto.game.MetaDataFile.deserializeBinary = function(bytes) {
2260
+ var reader = new jspb.BinaryReader(bytes);
2261
+ var msg = new proto.game.MetaDataFile;
2262
+ return proto.game.MetaDataFile.deserializeBinaryFromReader(msg, reader);
2263
+ };
2264
+
2265
+
2266
+ /**
2267
+ * Deserializes binary data (in protobuf wire format) from the
2268
+ * given reader into the given message object.
2269
+ * @param {!proto.game.MetaDataFile} msg The message object to deserialize into.
2270
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2271
+ * @return {!proto.game.MetaDataFile}
2272
+ */
2273
+ proto.game.MetaDataFile.deserializeBinaryFromReader = function(msg, reader) {
2274
+ while (reader.nextField()) {
2275
+ if (reader.isEndGroup()) {
2276
+ break;
2277
+ }
2278
+ var field = reader.getFieldNumber();
2279
+ switch (field) {
2280
+ case 1:
2281
+ var value = /** @type {string} */ (reader.readString());
2282
+ msg.setName(value);
2283
+ break;
2284
+ case 2:
2285
+ var value = /** @type {string} */ (reader.readString());
2286
+ msg.setType(value);
2287
+ break;
2288
+ default:
2289
+ reader.skipField();
2290
+ break;
2291
+ }
2292
+ }
2293
+ return msg;
2294
+ };
2295
+
2296
+
2297
+ /**
2298
+ * Serializes the message to binary data (in protobuf wire format).
2299
+ * @return {!Uint8Array}
2300
+ */
2301
+ proto.game.MetaDataFile.prototype.serializeBinary = function() {
2302
+ var writer = new jspb.BinaryWriter();
2303
+ proto.game.MetaDataFile.serializeBinaryToWriter(this, writer);
2304
+ return writer.getResultBuffer();
2305
+ };
2306
+
2307
+
2308
+ /**
2309
+ * Serializes the given message to binary data (in protobuf wire
2310
+ * format), writing to the given BinaryWriter.
2311
+ * @param {!proto.game.MetaDataFile} message
2312
+ * @param {!jspb.BinaryWriter} writer
2313
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2314
+ */
2315
+ proto.game.MetaDataFile.serializeBinaryToWriter = function(message, writer) {
2316
+ var f = undefined;
2317
+ f = message.getName();
2318
+ if (f.length > 0) {
2319
+ writer.writeString(
2320
+ 1,
2321
+ f
2322
+ );
2323
+ }
2324
+ f = message.getType();
2325
+ if (f.length > 0) {
2326
+ writer.writeString(
2327
+ 2,
2328
+ f
2329
+ );
2330
+ }
2331
+ };
2332
+
2333
+
2334
+ /**
2335
+ * optional string name = 1;
2336
+ * @return {string}
2337
+ */
2338
+ proto.game.MetaDataFile.prototype.getName = function() {
2339
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2340
+ };
2341
+
2342
+
2343
+ /**
2344
+ * @param {string} value
2345
+ * @return {!proto.game.MetaDataFile} returns this
2346
+ */
2347
+ proto.game.MetaDataFile.prototype.setName = function(value) {
2348
+ return jspb.Message.setProto3StringField(this, 1, value);
2349
+ };
2350
+
2351
+
2352
+ /**
2353
+ * optional string type = 2;
2354
+ * @return {string}
2355
+ */
2356
+ proto.game.MetaDataFile.prototype.getType = function() {
2357
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2358
+ };
2359
+
2360
+
2361
+ /**
2362
+ * @param {string} value
2363
+ * @return {!proto.game.MetaDataFile} returns this
2364
+ */
2365
+ proto.game.MetaDataFile.prototype.setType = function(value) {
2366
+ return jspb.Message.setProto3StringField(this, 2, value);
2367
+ };
2368
+
2369
+
2370
+
2371
+
2372
+
2373
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2374
+ /**
2375
+ * Creates an object representation of this proto.
2376
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2377
+ * Optional fields that are not set will be set to undefined.
2378
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2379
+ * For the list of reserved names please see:
2380
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2381
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2382
+ * JSPB instance for transitional soy proto support:
2383
+ * http://goto/soy-param-migration
2384
+ * @return {!Object}
2385
+ */
2386
+ proto.game.File.prototype.toObject = function(opt_includeInstance) {
2387
+ return proto.game.File.toObject(opt_includeInstance, this);
2388
+ };
2389
+
2390
+
2391
+ /**
2392
+ * Static version of the {@see toObject} method.
2393
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2394
+ * the JSPB instance for transitional soy proto support:
2395
+ * http://goto/soy-param-migration
2396
+ * @param {!proto.game.File} msg The msg instance to transform.
2397
+ * @return {!Object}
2398
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2399
+ */
2400
+ proto.game.File.toObject = function(includeInstance, msg) {
2401
+ var f, obj = {
2402
+ content: msg.getContent_asB64()
2403
+ };
2404
+
2405
+ if (includeInstance) {
2406
+ obj.$jspbMessageInstance = msg;
2407
+ }
2408
+ return obj;
2409
+ };
2410
+ }
2411
+
2412
+
2413
+ /**
2414
+ * Deserializes binary data (in protobuf wire format).
2415
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2416
+ * @return {!proto.game.File}
2417
+ */
2418
+ proto.game.File.deserializeBinary = function(bytes) {
2419
+ var reader = new jspb.BinaryReader(bytes);
2420
+ var msg = new proto.game.File;
2421
+ return proto.game.File.deserializeBinaryFromReader(msg, reader);
2422
+ };
2423
+
2424
+
2425
+ /**
2426
+ * Deserializes binary data (in protobuf wire format) from the
2427
+ * given reader into the given message object.
2428
+ * @param {!proto.game.File} msg The message object to deserialize into.
2429
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2430
+ * @return {!proto.game.File}
2431
+ */
2432
+ proto.game.File.deserializeBinaryFromReader = function(msg, reader) {
2433
+ while (reader.nextField()) {
2434
+ if (reader.isEndGroup()) {
2435
+ break;
2436
+ }
2437
+ var field = reader.getFieldNumber();
2438
+ switch (field) {
2439
+ case 1:
2440
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
2441
+ msg.setContent(value);
2442
+ break;
2443
+ default:
2444
+ reader.skipField();
2445
+ break;
2446
+ }
2447
+ }
2448
+ return msg;
2449
+ };
2450
+
2451
+
2452
+ /**
2453
+ * Serializes the message to binary data (in protobuf wire format).
2454
+ * @return {!Uint8Array}
2455
+ */
2456
+ proto.game.File.prototype.serializeBinary = function() {
2457
+ var writer = new jspb.BinaryWriter();
2458
+ proto.game.File.serializeBinaryToWriter(this, writer);
2459
+ return writer.getResultBuffer();
2460
+ };
2461
+
2462
+
2463
+ /**
2464
+ * Serializes the given message to binary data (in protobuf wire
2465
+ * format), writing to the given BinaryWriter.
2466
+ * @param {!proto.game.File} message
2467
+ * @param {!jspb.BinaryWriter} writer
2468
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2469
+ */
2470
+ proto.game.File.serializeBinaryToWriter = function(message, writer) {
2471
+ var f = undefined;
2472
+ f = message.getContent_asU8();
2473
+ if (f.length > 0) {
2474
+ writer.writeBytes(
2475
+ 1,
2476
+ f
2477
+ );
2478
+ }
2479
+ };
2480
+
2481
+
2482
+ /**
2483
+ * optional bytes content = 1;
2484
+ * @return {!(string|Uint8Array)}
2485
+ */
2486
+ proto.game.File.prototype.getContent = function() {
2487
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2488
+ };
2489
+
2490
+
2491
+ /**
2492
+ * optional bytes content = 1;
2493
+ * This is a type-conversion wrapper around `getContent()`
2494
+ * @return {string}
2495
+ */
2496
+ proto.game.File.prototype.getContent_asB64 = function() {
2497
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
2498
+ this.getContent()));
2499
+ };
2500
+
2501
+
2502
+ /**
2503
+ * optional bytes content = 1;
2504
+ * Note that Uint8Array is not supported on all browsers.
2505
+ * @see http://caniuse.com/Uint8Array
2506
+ * This is a type-conversion wrapper around `getContent()`
2507
+ * @return {!Uint8Array}
2508
+ */
2509
+ proto.game.File.prototype.getContent_asU8 = function() {
2510
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
2511
+ this.getContent()));
2512
+ };
2513
+
2514
+
2515
+ /**
2516
+ * @param {!(string|Uint8Array)} value
2517
+ * @return {!proto.game.File} returns this
2518
+ */
2519
+ proto.game.File.prototype.setContent = function(value) {
2520
+ return jspb.Message.setProto3BytesField(this, 1, value);
2521
+ };
2522
+
2523
+
328
2524
  goog.object.extend(exports, proto.game);