protobuf-platform 1.0.54 → 1.0.56

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
@@ -23,13 +23,21 @@ var global = (function() {
23
23
 
24
24
  goog.exportSymbol('proto.game.CategoryItem', null, global);
25
25
  goog.exportSymbol('proto.game.CategoryItemRequest', null, global);
26
- goog.exportSymbol('proto.game.CategoryListResponse', null, global);
26
+ goog.exportSymbol('proto.game.CategoryItemsResponse', null, global);
27
27
  goog.exportSymbol('proto.game.CategoryRequest', null, global);
28
28
  goog.exportSymbol('proto.game.CategoryRequest.RequestCase', null, global);
29
29
  goog.exportSymbol('proto.game.CategoryResponse', null, global);
30
30
  goog.exportSymbol('proto.game.CategoryStatusResponse', null, global);
31
+ goog.exportSymbol('proto.game.CollectionItem', null, global);
32
+ goog.exportSymbol('proto.game.CollectionItemRequest', null, global);
33
+ goog.exportSymbol('proto.game.CollectionItemsResponse', null, global);
34
+ goog.exportSymbol('proto.game.CollectionRequest', null, global);
35
+ goog.exportSymbol('proto.game.CollectionRequest.RequestCase', null, global);
36
+ goog.exportSymbol('proto.game.CollectionResponse', null, global);
37
+ goog.exportSymbol('proto.game.CollectionStatusResponse', null, global);
31
38
  goog.exportSymbol('proto.game.File', null, global);
32
39
  goog.exportSymbol('proto.game.GetCategoryRequest', null, global);
40
+ goog.exportSymbol('proto.game.GetCollectionRequest', null, global);
33
41
  goog.exportSymbol('proto.game.GetFileRequest', null, global);
34
42
  goog.exportSymbol('proto.game.PaginationRequest', null, global);
35
43
  goog.exportSymbol('proto.game.PingRequest', null, global);
@@ -254,16 +262,16 @@ if (goog.DEBUG && !COMPILED) {
254
262
  * @extends {jspb.Message}
255
263
  * @constructor
256
264
  */
257
- proto.game.CategoryListResponse = function(opt_data) {
258
- jspb.Message.initialize(this, opt_data, 0, -1, proto.game.CategoryListResponse.repeatedFields_, null);
265
+ proto.game.CategoryItemsResponse = function(opt_data) {
266
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.game.CategoryItemsResponse.repeatedFields_, null);
259
267
  };
260
- goog.inherits(proto.game.CategoryListResponse, jspb.Message);
268
+ goog.inherits(proto.game.CategoryItemsResponse, jspb.Message);
261
269
  if (goog.DEBUG && !COMPILED) {
262
270
  /**
263
271
  * @public
264
272
  * @override
265
273
  */
266
- proto.game.CategoryListResponse.displayName = 'proto.game.CategoryListResponse';
274
+ proto.game.CategoryItemsResponse.displayName = 'proto.game.CategoryItemsResponse';
267
275
  }
268
276
  /**
269
277
  * Generated by JsPbCodeGenerator.
@@ -286,6 +294,153 @@ if (goog.DEBUG && !COMPILED) {
286
294
  */
287
295
  proto.game.CategoryStatusResponse.displayName = 'proto.game.CategoryStatusResponse';
288
296
  }
297
+ /**
298
+ * Generated by JsPbCodeGenerator.
299
+ * @param {Array=} opt_data Optional initial data array, typically from a
300
+ * server response, or constructed directly in Javascript. The array is used
301
+ * in place and becomes part of the constructed object. It is not cloned.
302
+ * If no data is provided, the constructed object will be empty, but still
303
+ * valid.
304
+ * @extends {jspb.Message}
305
+ * @constructor
306
+ */
307
+ proto.game.CollectionItem = function(opt_data) {
308
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
309
+ };
310
+ goog.inherits(proto.game.CollectionItem, jspb.Message);
311
+ if (goog.DEBUG && !COMPILED) {
312
+ /**
313
+ * @public
314
+ * @override
315
+ */
316
+ proto.game.CollectionItem.displayName = 'proto.game.CollectionItem';
317
+ }
318
+ /**
319
+ * Generated by JsPbCodeGenerator.
320
+ * @param {Array=} opt_data Optional initial data array, typically from a
321
+ * server response, or constructed directly in Javascript. The array is used
322
+ * in place and becomes part of the constructed object. It is not cloned.
323
+ * If no data is provided, the constructed object will be empty, but still
324
+ * valid.
325
+ * @extends {jspb.Message}
326
+ * @constructor
327
+ */
328
+ proto.game.CollectionRequest = function(opt_data) {
329
+ jspb.Message.initialize(this, opt_data, 0, -1, null, proto.game.CollectionRequest.oneofGroups_);
330
+ };
331
+ goog.inherits(proto.game.CollectionRequest, jspb.Message);
332
+ if (goog.DEBUG && !COMPILED) {
333
+ /**
334
+ * @public
335
+ * @override
336
+ */
337
+ proto.game.CollectionRequest.displayName = 'proto.game.CollectionRequest';
338
+ }
339
+ /**
340
+ * Generated by JsPbCodeGenerator.
341
+ * @param {Array=} opt_data Optional initial data array, typically from a
342
+ * server response, or constructed directly in Javascript. The array is used
343
+ * in place and becomes part of the constructed object. It is not cloned.
344
+ * If no data is provided, the constructed object will be empty, but still
345
+ * valid.
346
+ * @extends {jspb.Message}
347
+ * @constructor
348
+ */
349
+ proto.game.CollectionItemRequest = function(opt_data) {
350
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
351
+ };
352
+ goog.inherits(proto.game.CollectionItemRequest, jspb.Message);
353
+ if (goog.DEBUG && !COMPILED) {
354
+ /**
355
+ * @public
356
+ * @override
357
+ */
358
+ proto.game.CollectionItemRequest.displayName = 'proto.game.CollectionItemRequest';
359
+ }
360
+ /**
361
+ * Generated by JsPbCodeGenerator.
362
+ * @param {Array=} opt_data Optional initial data array, typically from a
363
+ * server response, or constructed directly in Javascript. The array is used
364
+ * in place and becomes part of the constructed object. It is not cloned.
365
+ * If no data is provided, the constructed object will be empty, but still
366
+ * valid.
367
+ * @extends {jspb.Message}
368
+ * @constructor
369
+ */
370
+ proto.game.GetCollectionRequest = function(opt_data) {
371
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
372
+ };
373
+ goog.inherits(proto.game.GetCollectionRequest, jspb.Message);
374
+ if (goog.DEBUG && !COMPILED) {
375
+ /**
376
+ * @public
377
+ * @override
378
+ */
379
+ proto.game.GetCollectionRequest.displayName = 'proto.game.GetCollectionRequest';
380
+ }
381
+ /**
382
+ * Generated by JsPbCodeGenerator.
383
+ * @param {Array=} opt_data Optional initial data array, typically from a
384
+ * server response, or constructed directly in Javascript. The array is used
385
+ * in place and becomes part of the constructed object. It is not cloned.
386
+ * If no data is provided, the constructed object will be empty, but still
387
+ * valid.
388
+ * @extends {jspb.Message}
389
+ * @constructor
390
+ */
391
+ proto.game.CollectionResponse = function(opt_data) {
392
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
393
+ };
394
+ goog.inherits(proto.game.CollectionResponse, jspb.Message);
395
+ if (goog.DEBUG && !COMPILED) {
396
+ /**
397
+ * @public
398
+ * @override
399
+ */
400
+ proto.game.CollectionResponse.displayName = 'proto.game.CollectionResponse';
401
+ }
402
+ /**
403
+ * Generated by JsPbCodeGenerator.
404
+ * @param {Array=} opt_data Optional initial data array, typically from a
405
+ * server response, or constructed directly in Javascript. The array is used
406
+ * in place and becomes part of the constructed object. It is not cloned.
407
+ * If no data is provided, the constructed object will be empty, but still
408
+ * valid.
409
+ * @extends {jspb.Message}
410
+ * @constructor
411
+ */
412
+ proto.game.CollectionItemsResponse = function(opt_data) {
413
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.game.CollectionItemsResponse.repeatedFields_, null);
414
+ };
415
+ goog.inherits(proto.game.CollectionItemsResponse, jspb.Message);
416
+ if (goog.DEBUG && !COMPILED) {
417
+ /**
418
+ * @public
419
+ * @override
420
+ */
421
+ proto.game.CollectionItemsResponse.displayName = 'proto.game.CollectionItemsResponse';
422
+ }
423
+ /**
424
+ * Generated by JsPbCodeGenerator.
425
+ * @param {Array=} opt_data Optional initial data array, typically from a
426
+ * server response, or constructed directly in Javascript. The array is used
427
+ * in place and becomes part of the constructed object. It is not cloned.
428
+ * If no data is provided, the constructed object will be empty, but still
429
+ * valid.
430
+ * @extends {jspb.Message}
431
+ * @constructor
432
+ */
433
+ proto.game.CollectionStatusResponse = function(opt_data) {
434
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
435
+ };
436
+ goog.inherits(proto.game.CollectionStatusResponse, jspb.Message);
437
+ if (goog.DEBUG && !COMPILED) {
438
+ /**
439
+ * @public
440
+ * @override
441
+ */
442
+ proto.game.CollectionStatusResponse.displayName = 'proto.game.CollectionStatusResponse';
443
+ }
289
444
 
290
445
 
291
446
 
@@ -2359,7 +2514,7 @@ proto.game.CategoryResponse.prototype.hasData = function() {
2359
2514
  * @private {!Array<number>}
2360
2515
  * @const
2361
2516
  */
2362
- proto.game.CategoryListResponse.repeatedFields_ = [1];
2517
+ proto.game.CategoryItemsResponse.repeatedFields_ = [1];
2363
2518
 
2364
2519
 
2365
2520
 
@@ -2376,8 +2531,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
2376
2531
  * http://goto/soy-param-migration
2377
2532
  * @return {!Object}
2378
2533
  */
2379
- proto.game.CategoryListResponse.prototype.toObject = function(opt_includeInstance) {
2380
- return proto.game.CategoryListResponse.toObject(opt_includeInstance, this);
2534
+ proto.game.CategoryItemsResponse.prototype.toObject = function(opt_includeInstance) {
2535
+ return proto.game.CategoryItemsResponse.toObject(opt_includeInstance, this);
2381
2536
  };
2382
2537
 
2383
2538
 
@@ -2386,11 +2541,11 @@ proto.game.CategoryListResponse.prototype.toObject = function(opt_includeInstanc
2386
2541
  * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2387
2542
  * the JSPB instance for transitional soy proto support:
2388
2543
  * http://goto/soy-param-migration
2389
- * @param {!proto.game.CategoryListResponse} msg The msg instance to transform.
2544
+ * @param {!proto.game.CategoryItemsResponse} msg The msg instance to transform.
2390
2545
  * @return {!Object}
2391
2546
  * @suppress {unusedLocalVariables} f is only used for nested messages
2392
2547
  */
2393
- proto.game.CategoryListResponse.toObject = function(includeInstance, msg) {
2548
+ proto.game.CategoryItemsResponse.toObject = function(includeInstance, msg) {
2394
2549
  var f, obj = {
2395
2550
  itemsList: jspb.Message.toObjectList(msg.getItemsList(),
2396
2551
  proto.game.CategoryItem.toObject, includeInstance),
@@ -2409,23 +2564,23 @@ proto.game.CategoryListResponse.toObject = function(includeInstance, msg) {
2409
2564
  /**
2410
2565
  * Deserializes binary data (in protobuf wire format).
2411
2566
  * @param {jspb.ByteSource} bytes The bytes to deserialize.
2412
- * @return {!proto.game.CategoryListResponse}
2567
+ * @return {!proto.game.CategoryItemsResponse}
2413
2568
  */
2414
- proto.game.CategoryListResponse.deserializeBinary = function(bytes) {
2569
+ proto.game.CategoryItemsResponse.deserializeBinary = function(bytes) {
2415
2570
  var reader = new jspb.BinaryReader(bytes);
2416
- var msg = new proto.game.CategoryListResponse;
2417
- return proto.game.CategoryListResponse.deserializeBinaryFromReader(msg, reader);
2571
+ var msg = new proto.game.CategoryItemsResponse;
2572
+ return proto.game.CategoryItemsResponse.deserializeBinaryFromReader(msg, reader);
2418
2573
  };
2419
2574
 
2420
2575
 
2421
2576
  /**
2422
2577
  * Deserializes binary data (in protobuf wire format) from the
2423
2578
  * given reader into the given message object.
2424
- * @param {!proto.game.CategoryListResponse} msg The message object to deserialize into.
2579
+ * @param {!proto.game.CategoryItemsResponse} msg The message object to deserialize into.
2425
2580
  * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2426
- * @return {!proto.game.CategoryListResponse}
2581
+ * @return {!proto.game.CategoryItemsResponse}
2427
2582
  */
2428
- proto.game.CategoryListResponse.deserializeBinaryFromReader = function(msg, reader) {
2583
+ proto.game.CategoryItemsResponse.deserializeBinaryFromReader = function(msg, reader) {
2429
2584
  while (reader.nextField()) {
2430
2585
  if (reader.isEndGroup()) {
2431
2586
  break;
@@ -2458,9 +2613,9 @@ proto.game.CategoryListResponse.deserializeBinaryFromReader = function(msg, read
2458
2613
  * Serializes the message to binary data (in protobuf wire format).
2459
2614
  * @return {!Uint8Array}
2460
2615
  */
2461
- proto.game.CategoryListResponse.prototype.serializeBinary = function() {
2616
+ proto.game.CategoryItemsResponse.prototype.serializeBinary = function() {
2462
2617
  var writer = new jspb.BinaryWriter();
2463
- proto.game.CategoryListResponse.serializeBinaryToWriter(this, writer);
2618
+ proto.game.CategoryItemsResponse.serializeBinaryToWriter(this, writer);
2464
2619
  return writer.getResultBuffer();
2465
2620
  };
2466
2621
 
@@ -2468,11 +2623,11 @@ proto.game.CategoryListResponse.prototype.serializeBinary = function() {
2468
2623
  /**
2469
2624
  * Serializes the given message to binary data (in protobuf wire
2470
2625
  * format), writing to the given BinaryWriter.
2471
- * @param {!proto.game.CategoryListResponse} message
2626
+ * @param {!proto.game.CategoryItemsResponse} message
2472
2627
  * @param {!jspb.BinaryWriter} writer
2473
2628
  * @suppress {unusedLocalVariables} f is only used for nested messages
2474
2629
  */
2475
- proto.game.CategoryListResponse.serializeBinaryToWriter = function(message, writer) {
2630
+ proto.game.CategoryItemsResponse.serializeBinaryToWriter = function(message, writer) {
2476
2631
  var f = undefined;
2477
2632
  f = message.getItemsList();
2478
2633
  if (f.length > 0) {
@@ -2503,7 +2658,7 @@ proto.game.CategoryListResponse.serializeBinaryToWriter = function(message, writ
2503
2658
  * repeated CategoryItem items = 1;
2504
2659
  * @return {!Array<!proto.game.CategoryItem>}
2505
2660
  */
2506
- proto.game.CategoryListResponse.prototype.getItemsList = function() {
2661
+ proto.game.CategoryItemsResponse.prototype.getItemsList = function() {
2507
2662
  return /** @type{!Array<!proto.game.CategoryItem>} */ (
2508
2663
  jspb.Message.getRepeatedWrapperField(this, proto.game.CategoryItem, 1));
2509
2664
  };
@@ -2511,9 +2666,9 @@ proto.game.CategoryListResponse.prototype.getItemsList = function() {
2511
2666
 
2512
2667
  /**
2513
2668
  * @param {!Array<!proto.game.CategoryItem>} value
2514
- * @return {!proto.game.CategoryListResponse} returns this
2669
+ * @return {!proto.game.CategoryItemsResponse} returns this
2515
2670
  */
2516
- proto.game.CategoryListResponse.prototype.setItemsList = function(value) {
2671
+ proto.game.CategoryItemsResponse.prototype.setItemsList = function(value) {
2517
2672
  return jspb.Message.setRepeatedWrapperField(this, 1, value);
2518
2673
  };
2519
2674
 
@@ -2523,16 +2678,16 @@ proto.game.CategoryListResponse.prototype.setItemsList = function(value) {
2523
2678
  * @param {number=} opt_index
2524
2679
  * @return {!proto.game.CategoryItem}
2525
2680
  */
2526
- proto.game.CategoryListResponse.prototype.addItems = function(opt_value, opt_index) {
2681
+ proto.game.CategoryItemsResponse.prototype.addItems = function(opt_value, opt_index) {
2527
2682
  return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.game.CategoryItem, opt_index);
2528
2683
  };
2529
2684
 
2530
2685
 
2531
2686
  /**
2532
2687
  * Clears the list making it empty but non-null.
2533
- * @return {!proto.game.CategoryListResponse} returns this
2688
+ * @return {!proto.game.CategoryItemsResponse} returns this
2534
2689
  */
2535
- proto.game.CategoryListResponse.prototype.clearItemsList = function() {
2690
+ proto.game.CategoryItemsResponse.prototype.clearItemsList = function() {
2536
2691
  return this.setItemsList([]);
2537
2692
  };
2538
2693
 
@@ -2541,25 +2696,25 @@ proto.game.CategoryListResponse.prototype.clearItemsList = function() {
2541
2696
  * optional int32 total_pages = 2;
2542
2697
  * @return {number}
2543
2698
  */
2544
- proto.game.CategoryListResponse.prototype.getTotalPages = function() {
2699
+ proto.game.CategoryItemsResponse.prototype.getTotalPages = function() {
2545
2700
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
2546
2701
  };
2547
2702
 
2548
2703
 
2549
2704
  /**
2550
2705
  * @param {number} value
2551
- * @return {!proto.game.CategoryListResponse} returns this
2706
+ * @return {!proto.game.CategoryItemsResponse} returns this
2552
2707
  */
2553
- proto.game.CategoryListResponse.prototype.setTotalPages = function(value) {
2708
+ proto.game.CategoryItemsResponse.prototype.setTotalPages = function(value) {
2554
2709
  return jspb.Message.setField(this, 2, value);
2555
2710
  };
2556
2711
 
2557
2712
 
2558
2713
  /**
2559
2714
  * Clears the field making it undefined.
2560
- * @return {!proto.game.CategoryListResponse} returns this
2715
+ * @return {!proto.game.CategoryItemsResponse} returns this
2561
2716
  */
2562
- proto.game.CategoryListResponse.prototype.clearTotalPages = function() {
2717
+ proto.game.CategoryItemsResponse.prototype.clearTotalPages = function() {
2563
2718
  return jspb.Message.setField(this, 2, undefined);
2564
2719
  };
2565
2720
 
@@ -2568,7 +2723,7 @@ proto.game.CategoryListResponse.prototype.clearTotalPages = function() {
2568
2723
  * Returns whether this field is set.
2569
2724
  * @return {boolean}
2570
2725
  */
2571
- proto.game.CategoryListResponse.prototype.hasTotalPages = function() {
2726
+ proto.game.CategoryItemsResponse.prototype.hasTotalPages = function() {
2572
2727
  return jspb.Message.getField(this, 2) != null;
2573
2728
  };
2574
2729
 
@@ -2577,25 +2732,25 @@ proto.game.CategoryListResponse.prototype.hasTotalPages = function() {
2577
2732
  * optional int32 total_items = 3;
2578
2733
  * @return {number}
2579
2734
  */
2580
- proto.game.CategoryListResponse.prototype.getTotalItems = function() {
2735
+ proto.game.CategoryItemsResponse.prototype.getTotalItems = function() {
2581
2736
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
2582
2737
  };
2583
2738
 
2584
2739
 
2585
2740
  /**
2586
2741
  * @param {number} value
2587
- * @return {!proto.game.CategoryListResponse} returns this
2742
+ * @return {!proto.game.CategoryItemsResponse} returns this
2588
2743
  */
2589
- proto.game.CategoryListResponse.prototype.setTotalItems = function(value) {
2744
+ proto.game.CategoryItemsResponse.prototype.setTotalItems = function(value) {
2590
2745
  return jspb.Message.setField(this, 3, value);
2591
2746
  };
2592
2747
 
2593
2748
 
2594
2749
  /**
2595
2750
  * Clears the field making it undefined.
2596
- * @return {!proto.game.CategoryListResponse} returns this
2751
+ * @return {!proto.game.CategoryItemsResponse} returns this
2597
2752
  */
2598
- proto.game.CategoryListResponse.prototype.clearTotalItems = function() {
2753
+ proto.game.CategoryItemsResponse.prototype.clearTotalItems = function() {
2599
2754
  return jspb.Message.setField(this, 3, undefined);
2600
2755
  };
2601
2756
 
@@ -2604,7 +2759,7 @@ proto.game.CategoryListResponse.prototype.clearTotalItems = function() {
2604
2759
  * Returns whether this field is set.
2605
2760
  * @return {boolean}
2606
2761
  */
2607
- proto.game.CategoryListResponse.prototype.hasTotalItems = function() {
2762
+ proto.game.CategoryItemsResponse.prototype.hasTotalItems = function() {
2608
2763
  return jspb.Message.getField(this, 3) != null;
2609
2764
  };
2610
2765
 
@@ -2739,4 +2894,1819 @@ proto.game.CategoryStatusResponse.prototype.setStatus = function(value) {
2739
2894
  };
2740
2895
 
2741
2896
 
2897
+
2898
+
2899
+
2900
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2901
+ /**
2902
+ * Creates an object representation of this proto.
2903
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2904
+ * Optional fields that are not set will be set to undefined.
2905
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2906
+ * For the list of reserved names please see:
2907
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2908
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2909
+ * JSPB instance for transitional soy proto support:
2910
+ * http://goto/soy-param-migration
2911
+ * @return {!Object}
2912
+ */
2913
+ proto.game.CollectionItem.prototype.toObject = function(opt_includeInstance) {
2914
+ return proto.game.CollectionItem.toObject(opt_includeInstance, this);
2915
+ };
2916
+
2917
+
2918
+ /**
2919
+ * Static version of the {@see toObject} method.
2920
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2921
+ * the JSPB instance for transitional soy proto support:
2922
+ * http://goto/soy-param-migration
2923
+ * @param {!proto.game.CollectionItem} msg The msg instance to transform.
2924
+ * @return {!Object}
2925
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2926
+ */
2927
+ proto.game.CollectionItem.toObject = function(includeInstance, msg) {
2928
+ var f, obj = {
2929
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
2930
+ categoryId: jspb.Message.getFieldWithDefault(msg, 2, 0),
2931
+ title: jspb.Message.getFieldWithDefault(msg, 3, ""),
2932
+ slug: jspb.Message.getFieldWithDefault(msg, 4, ""),
2933
+ description: jspb.Message.getFieldWithDefault(msg, 5, ""),
2934
+ isActive: jspb.Message.getFieldWithDefault(msg, 6, 0),
2935
+ image: jspb.Message.getFieldWithDefault(msg, 7, "")
2936
+ };
2937
+
2938
+ if (includeInstance) {
2939
+ obj.$jspbMessageInstance = msg;
2940
+ }
2941
+ return obj;
2942
+ };
2943
+ }
2944
+
2945
+
2946
+ /**
2947
+ * Deserializes binary data (in protobuf wire format).
2948
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2949
+ * @return {!proto.game.CollectionItem}
2950
+ */
2951
+ proto.game.CollectionItem.deserializeBinary = function(bytes) {
2952
+ var reader = new jspb.BinaryReader(bytes);
2953
+ var msg = new proto.game.CollectionItem;
2954
+ return proto.game.CollectionItem.deserializeBinaryFromReader(msg, reader);
2955
+ };
2956
+
2957
+
2958
+ /**
2959
+ * Deserializes binary data (in protobuf wire format) from the
2960
+ * given reader into the given message object.
2961
+ * @param {!proto.game.CollectionItem} msg The message object to deserialize into.
2962
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2963
+ * @return {!proto.game.CollectionItem}
2964
+ */
2965
+ proto.game.CollectionItem.deserializeBinaryFromReader = function(msg, reader) {
2966
+ while (reader.nextField()) {
2967
+ if (reader.isEndGroup()) {
2968
+ break;
2969
+ }
2970
+ var field = reader.getFieldNumber();
2971
+ switch (field) {
2972
+ case 1:
2973
+ var value = /** @type {number} */ (reader.readInt32());
2974
+ msg.setId(value);
2975
+ break;
2976
+ case 2:
2977
+ var value = /** @type {number} */ (reader.readInt32());
2978
+ msg.setCategoryId(value);
2979
+ break;
2980
+ case 3:
2981
+ var value = /** @type {string} */ (reader.readString());
2982
+ msg.setTitle(value);
2983
+ break;
2984
+ case 4:
2985
+ var value = /** @type {string} */ (reader.readString());
2986
+ msg.setSlug(value);
2987
+ break;
2988
+ case 5:
2989
+ var value = /** @type {string} */ (reader.readString());
2990
+ msg.setDescription(value);
2991
+ break;
2992
+ case 6:
2993
+ var value = /** @type {number} */ (reader.readInt32());
2994
+ msg.setIsActive(value);
2995
+ break;
2996
+ case 7:
2997
+ var value = /** @type {string} */ (reader.readString());
2998
+ msg.setImage(value);
2999
+ break;
3000
+ default:
3001
+ reader.skipField();
3002
+ break;
3003
+ }
3004
+ }
3005
+ return msg;
3006
+ };
3007
+
3008
+
3009
+ /**
3010
+ * Serializes the message to binary data (in protobuf wire format).
3011
+ * @return {!Uint8Array}
3012
+ */
3013
+ proto.game.CollectionItem.prototype.serializeBinary = function() {
3014
+ var writer = new jspb.BinaryWriter();
3015
+ proto.game.CollectionItem.serializeBinaryToWriter(this, writer);
3016
+ return writer.getResultBuffer();
3017
+ };
3018
+
3019
+
3020
+ /**
3021
+ * Serializes the given message to binary data (in protobuf wire
3022
+ * format), writing to the given BinaryWriter.
3023
+ * @param {!proto.game.CollectionItem} message
3024
+ * @param {!jspb.BinaryWriter} writer
3025
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3026
+ */
3027
+ proto.game.CollectionItem.serializeBinaryToWriter = function(message, writer) {
3028
+ var f = undefined;
3029
+ f = /** @type {number} */ (jspb.Message.getField(message, 1));
3030
+ if (f != null) {
3031
+ writer.writeInt32(
3032
+ 1,
3033
+ f
3034
+ );
3035
+ }
3036
+ f = /** @type {number} */ (jspb.Message.getField(message, 2));
3037
+ if (f != null) {
3038
+ writer.writeInt32(
3039
+ 2,
3040
+ f
3041
+ );
3042
+ }
3043
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
3044
+ if (f != null) {
3045
+ writer.writeString(
3046
+ 3,
3047
+ f
3048
+ );
3049
+ }
3050
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
3051
+ if (f != null) {
3052
+ writer.writeString(
3053
+ 4,
3054
+ f
3055
+ );
3056
+ }
3057
+ f = /** @type {string} */ (jspb.Message.getField(message, 5));
3058
+ if (f != null) {
3059
+ writer.writeString(
3060
+ 5,
3061
+ f
3062
+ );
3063
+ }
3064
+ f = /** @type {number} */ (jspb.Message.getField(message, 6));
3065
+ if (f != null) {
3066
+ writer.writeInt32(
3067
+ 6,
3068
+ f
3069
+ );
3070
+ }
3071
+ f = /** @type {string} */ (jspb.Message.getField(message, 7));
3072
+ if (f != null) {
3073
+ writer.writeString(
3074
+ 7,
3075
+ f
3076
+ );
3077
+ }
3078
+ };
3079
+
3080
+
3081
+ /**
3082
+ * optional int32 id = 1;
3083
+ * @return {number}
3084
+ */
3085
+ proto.game.CollectionItem.prototype.getId = function() {
3086
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
3087
+ };
3088
+
3089
+
3090
+ /**
3091
+ * @param {number} value
3092
+ * @return {!proto.game.CollectionItem} returns this
3093
+ */
3094
+ proto.game.CollectionItem.prototype.setId = function(value) {
3095
+ return jspb.Message.setField(this, 1, value);
3096
+ };
3097
+
3098
+
3099
+ /**
3100
+ * Clears the field making it undefined.
3101
+ * @return {!proto.game.CollectionItem} returns this
3102
+ */
3103
+ proto.game.CollectionItem.prototype.clearId = function() {
3104
+ return jspb.Message.setField(this, 1, undefined);
3105
+ };
3106
+
3107
+
3108
+ /**
3109
+ * Returns whether this field is set.
3110
+ * @return {boolean}
3111
+ */
3112
+ proto.game.CollectionItem.prototype.hasId = function() {
3113
+ return jspb.Message.getField(this, 1) != null;
3114
+ };
3115
+
3116
+
3117
+ /**
3118
+ * optional int32 category_id = 2;
3119
+ * @return {number}
3120
+ */
3121
+ proto.game.CollectionItem.prototype.getCategoryId = function() {
3122
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
3123
+ };
3124
+
3125
+
3126
+ /**
3127
+ * @param {number} value
3128
+ * @return {!proto.game.CollectionItem} returns this
3129
+ */
3130
+ proto.game.CollectionItem.prototype.setCategoryId = function(value) {
3131
+ return jspb.Message.setField(this, 2, value);
3132
+ };
3133
+
3134
+
3135
+ /**
3136
+ * Clears the field making it undefined.
3137
+ * @return {!proto.game.CollectionItem} returns this
3138
+ */
3139
+ proto.game.CollectionItem.prototype.clearCategoryId = function() {
3140
+ return jspb.Message.setField(this, 2, undefined);
3141
+ };
3142
+
3143
+
3144
+ /**
3145
+ * Returns whether this field is set.
3146
+ * @return {boolean}
3147
+ */
3148
+ proto.game.CollectionItem.prototype.hasCategoryId = function() {
3149
+ return jspb.Message.getField(this, 2) != null;
3150
+ };
3151
+
3152
+
3153
+ /**
3154
+ * optional string title = 3;
3155
+ * @return {string}
3156
+ */
3157
+ proto.game.CollectionItem.prototype.getTitle = function() {
3158
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
3159
+ };
3160
+
3161
+
3162
+ /**
3163
+ * @param {string} value
3164
+ * @return {!proto.game.CollectionItem} returns this
3165
+ */
3166
+ proto.game.CollectionItem.prototype.setTitle = function(value) {
3167
+ return jspb.Message.setField(this, 3, value);
3168
+ };
3169
+
3170
+
3171
+ /**
3172
+ * Clears the field making it undefined.
3173
+ * @return {!proto.game.CollectionItem} returns this
3174
+ */
3175
+ proto.game.CollectionItem.prototype.clearTitle = function() {
3176
+ return jspb.Message.setField(this, 3, undefined);
3177
+ };
3178
+
3179
+
3180
+ /**
3181
+ * Returns whether this field is set.
3182
+ * @return {boolean}
3183
+ */
3184
+ proto.game.CollectionItem.prototype.hasTitle = function() {
3185
+ return jspb.Message.getField(this, 3) != null;
3186
+ };
3187
+
3188
+
3189
+ /**
3190
+ * optional string slug = 4;
3191
+ * @return {string}
3192
+ */
3193
+ proto.game.CollectionItem.prototype.getSlug = function() {
3194
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
3195
+ };
3196
+
3197
+
3198
+ /**
3199
+ * @param {string} value
3200
+ * @return {!proto.game.CollectionItem} returns this
3201
+ */
3202
+ proto.game.CollectionItem.prototype.setSlug = function(value) {
3203
+ return jspb.Message.setField(this, 4, value);
3204
+ };
3205
+
3206
+
3207
+ /**
3208
+ * Clears the field making it undefined.
3209
+ * @return {!proto.game.CollectionItem} returns this
3210
+ */
3211
+ proto.game.CollectionItem.prototype.clearSlug = function() {
3212
+ return jspb.Message.setField(this, 4, undefined);
3213
+ };
3214
+
3215
+
3216
+ /**
3217
+ * Returns whether this field is set.
3218
+ * @return {boolean}
3219
+ */
3220
+ proto.game.CollectionItem.prototype.hasSlug = function() {
3221
+ return jspb.Message.getField(this, 4) != null;
3222
+ };
3223
+
3224
+
3225
+ /**
3226
+ * optional string description = 5;
3227
+ * @return {string}
3228
+ */
3229
+ proto.game.CollectionItem.prototype.getDescription = function() {
3230
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
3231
+ };
3232
+
3233
+
3234
+ /**
3235
+ * @param {string} value
3236
+ * @return {!proto.game.CollectionItem} returns this
3237
+ */
3238
+ proto.game.CollectionItem.prototype.setDescription = function(value) {
3239
+ return jspb.Message.setField(this, 5, value);
3240
+ };
3241
+
3242
+
3243
+ /**
3244
+ * Clears the field making it undefined.
3245
+ * @return {!proto.game.CollectionItem} returns this
3246
+ */
3247
+ proto.game.CollectionItem.prototype.clearDescription = function() {
3248
+ return jspb.Message.setField(this, 5, undefined);
3249
+ };
3250
+
3251
+
3252
+ /**
3253
+ * Returns whether this field is set.
3254
+ * @return {boolean}
3255
+ */
3256
+ proto.game.CollectionItem.prototype.hasDescription = function() {
3257
+ return jspb.Message.getField(this, 5) != null;
3258
+ };
3259
+
3260
+
3261
+ /**
3262
+ * optional int32 is_active = 6;
3263
+ * @return {number}
3264
+ */
3265
+ proto.game.CollectionItem.prototype.getIsActive = function() {
3266
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
3267
+ };
3268
+
3269
+
3270
+ /**
3271
+ * @param {number} value
3272
+ * @return {!proto.game.CollectionItem} returns this
3273
+ */
3274
+ proto.game.CollectionItem.prototype.setIsActive = function(value) {
3275
+ return jspb.Message.setField(this, 6, value);
3276
+ };
3277
+
3278
+
3279
+ /**
3280
+ * Clears the field making it undefined.
3281
+ * @return {!proto.game.CollectionItem} returns this
3282
+ */
3283
+ proto.game.CollectionItem.prototype.clearIsActive = function() {
3284
+ return jspb.Message.setField(this, 6, undefined);
3285
+ };
3286
+
3287
+
3288
+ /**
3289
+ * Returns whether this field is set.
3290
+ * @return {boolean}
3291
+ */
3292
+ proto.game.CollectionItem.prototype.hasIsActive = function() {
3293
+ return jspb.Message.getField(this, 6) != null;
3294
+ };
3295
+
3296
+
3297
+ /**
3298
+ * optional string image = 7;
3299
+ * @return {string}
3300
+ */
3301
+ proto.game.CollectionItem.prototype.getImage = function() {
3302
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
3303
+ };
3304
+
3305
+
3306
+ /**
3307
+ * @param {string} value
3308
+ * @return {!proto.game.CollectionItem} returns this
3309
+ */
3310
+ proto.game.CollectionItem.prototype.setImage = function(value) {
3311
+ return jspb.Message.setField(this, 7, value);
3312
+ };
3313
+
3314
+
3315
+ /**
3316
+ * Clears the field making it undefined.
3317
+ * @return {!proto.game.CollectionItem} returns this
3318
+ */
3319
+ proto.game.CollectionItem.prototype.clearImage = function() {
3320
+ return jspb.Message.setField(this, 7, undefined);
3321
+ };
3322
+
3323
+
3324
+ /**
3325
+ * Returns whether this field is set.
3326
+ * @return {boolean}
3327
+ */
3328
+ proto.game.CollectionItem.prototype.hasImage = function() {
3329
+ return jspb.Message.getField(this, 7) != null;
3330
+ };
3331
+
3332
+
3333
+
3334
+ /**
3335
+ * Oneof group definitions for this message. Each group defines the field
3336
+ * numbers belonging to that group. When of these fields' value is set, all
3337
+ * other fields in the group are cleared. During deserialization, if multiple
3338
+ * fields are encountered for a group, only the last value seen will be kept.
3339
+ * @private {!Array<!Array<number>>}
3340
+ * @const
3341
+ */
3342
+ proto.game.CollectionRequest.oneofGroups_ = [[1,2]];
3343
+
3344
+ /**
3345
+ * @enum {number}
3346
+ */
3347
+ proto.game.CollectionRequest.RequestCase = {
3348
+ REQUEST_NOT_SET: 0,
3349
+ COLLECTION_DATA: 1,
3350
+ FILE: 2
3351
+ };
3352
+
3353
+ /**
3354
+ * @return {proto.game.CollectionRequest.RequestCase}
3355
+ */
3356
+ proto.game.CollectionRequest.prototype.getRequestCase = function() {
3357
+ return /** @type {proto.game.CollectionRequest.RequestCase} */(jspb.Message.computeOneofCase(this, proto.game.CollectionRequest.oneofGroups_[0]));
3358
+ };
3359
+
3360
+
3361
+
3362
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3363
+ /**
3364
+ * Creates an object representation of this proto.
3365
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3366
+ * Optional fields that are not set will be set to undefined.
3367
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3368
+ * For the list of reserved names please see:
3369
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3370
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3371
+ * JSPB instance for transitional soy proto support:
3372
+ * http://goto/soy-param-migration
3373
+ * @return {!Object}
3374
+ */
3375
+ proto.game.CollectionRequest.prototype.toObject = function(opt_includeInstance) {
3376
+ return proto.game.CollectionRequest.toObject(opt_includeInstance, this);
3377
+ };
3378
+
3379
+
3380
+ /**
3381
+ * Static version of the {@see toObject} method.
3382
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3383
+ * the JSPB instance for transitional soy proto support:
3384
+ * http://goto/soy-param-migration
3385
+ * @param {!proto.game.CollectionRequest} msg The msg instance to transform.
3386
+ * @return {!Object}
3387
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3388
+ */
3389
+ proto.game.CollectionRequest.toObject = function(includeInstance, msg) {
3390
+ var f, obj = {
3391
+ collectionData: (f = msg.getCollectionData()) && proto.game.CollectionItemRequest.toObject(includeInstance, f),
3392
+ file: (f = msg.getFile()) && proto.game.File.toObject(includeInstance, f)
3393
+ };
3394
+
3395
+ if (includeInstance) {
3396
+ obj.$jspbMessageInstance = msg;
3397
+ }
3398
+ return obj;
3399
+ };
3400
+ }
3401
+
3402
+
3403
+ /**
3404
+ * Deserializes binary data (in protobuf wire format).
3405
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3406
+ * @return {!proto.game.CollectionRequest}
3407
+ */
3408
+ proto.game.CollectionRequest.deserializeBinary = function(bytes) {
3409
+ var reader = new jspb.BinaryReader(bytes);
3410
+ var msg = new proto.game.CollectionRequest;
3411
+ return proto.game.CollectionRequest.deserializeBinaryFromReader(msg, reader);
3412
+ };
3413
+
3414
+
3415
+ /**
3416
+ * Deserializes binary data (in protobuf wire format) from the
3417
+ * given reader into the given message object.
3418
+ * @param {!proto.game.CollectionRequest} msg The message object to deserialize into.
3419
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3420
+ * @return {!proto.game.CollectionRequest}
3421
+ */
3422
+ proto.game.CollectionRequest.deserializeBinaryFromReader = function(msg, reader) {
3423
+ while (reader.nextField()) {
3424
+ if (reader.isEndGroup()) {
3425
+ break;
3426
+ }
3427
+ var field = reader.getFieldNumber();
3428
+ switch (field) {
3429
+ case 1:
3430
+ var value = new proto.game.CollectionItemRequest;
3431
+ reader.readMessage(value,proto.game.CollectionItemRequest.deserializeBinaryFromReader);
3432
+ msg.setCollectionData(value);
3433
+ break;
3434
+ case 2:
3435
+ var value = new proto.game.File;
3436
+ reader.readMessage(value,proto.game.File.deserializeBinaryFromReader);
3437
+ msg.setFile(value);
3438
+ break;
3439
+ default:
3440
+ reader.skipField();
3441
+ break;
3442
+ }
3443
+ }
3444
+ return msg;
3445
+ };
3446
+
3447
+
3448
+ /**
3449
+ * Serializes the message to binary data (in protobuf wire format).
3450
+ * @return {!Uint8Array}
3451
+ */
3452
+ proto.game.CollectionRequest.prototype.serializeBinary = function() {
3453
+ var writer = new jspb.BinaryWriter();
3454
+ proto.game.CollectionRequest.serializeBinaryToWriter(this, writer);
3455
+ return writer.getResultBuffer();
3456
+ };
3457
+
3458
+
3459
+ /**
3460
+ * Serializes the given message to binary data (in protobuf wire
3461
+ * format), writing to the given BinaryWriter.
3462
+ * @param {!proto.game.CollectionRequest} message
3463
+ * @param {!jspb.BinaryWriter} writer
3464
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3465
+ */
3466
+ proto.game.CollectionRequest.serializeBinaryToWriter = function(message, writer) {
3467
+ var f = undefined;
3468
+ f = message.getCollectionData();
3469
+ if (f != null) {
3470
+ writer.writeMessage(
3471
+ 1,
3472
+ f,
3473
+ proto.game.CollectionItemRequest.serializeBinaryToWriter
3474
+ );
3475
+ }
3476
+ f = message.getFile();
3477
+ if (f != null) {
3478
+ writer.writeMessage(
3479
+ 2,
3480
+ f,
3481
+ proto.game.File.serializeBinaryToWriter
3482
+ );
3483
+ }
3484
+ };
3485
+
3486
+
3487
+ /**
3488
+ * optional CollectionItemRequest collection_data = 1;
3489
+ * @return {?proto.game.CollectionItemRequest}
3490
+ */
3491
+ proto.game.CollectionRequest.prototype.getCollectionData = function() {
3492
+ return /** @type{?proto.game.CollectionItemRequest} */ (
3493
+ jspb.Message.getWrapperField(this, proto.game.CollectionItemRequest, 1));
3494
+ };
3495
+
3496
+
3497
+ /**
3498
+ * @param {?proto.game.CollectionItemRequest|undefined} value
3499
+ * @return {!proto.game.CollectionRequest} returns this
3500
+ */
3501
+ proto.game.CollectionRequest.prototype.setCollectionData = function(value) {
3502
+ return jspb.Message.setOneofWrapperField(this, 1, proto.game.CollectionRequest.oneofGroups_[0], value);
3503
+ };
3504
+
3505
+
3506
+ /**
3507
+ * Clears the message field making it undefined.
3508
+ * @return {!proto.game.CollectionRequest} returns this
3509
+ */
3510
+ proto.game.CollectionRequest.prototype.clearCollectionData = function() {
3511
+ return this.setCollectionData(undefined);
3512
+ };
3513
+
3514
+
3515
+ /**
3516
+ * Returns whether this field is set.
3517
+ * @return {boolean}
3518
+ */
3519
+ proto.game.CollectionRequest.prototype.hasCollectionData = function() {
3520
+ return jspb.Message.getField(this, 1) != null;
3521
+ };
3522
+
3523
+
3524
+ /**
3525
+ * optional File file = 2;
3526
+ * @return {?proto.game.File}
3527
+ */
3528
+ proto.game.CollectionRequest.prototype.getFile = function() {
3529
+ return /** @type{?proto.game.File} */ (
3530
+ jspb.Message.getWrapperField(this, proto.game.File, 2));
3531
+ };
3532
+
3533
+
3534
+ /**
3535
+ * @param {?proto.game.File|undefined} value
3536
+ * @return {!proto.game.CollectionRequest} returns this
3537
+ */
3538
+ proto.game.CollectionRequest.prototype.setFile = function(value) {
3539
+ return jspb.Message.setOneofWrapperField(this, 2, proto.game.CollectionRequest.oneofGroups_[0], value);
3540
+ };
3541
+
3542
+
3543
+ /**
3544
+ * Clears the message field making it undefined.
3545
+ * @return {!proto.game.CollectionRequest} returns this
3546
+ */
3547
+ proto.game.CollectionRequest.prototype.clearFile = function() {
3548
+ return this.setFile(undefined);
3549
+ };
3550
+
3551
+
3552
+ /**
3553
+ * Returns whether this field is set.
3554
+ * @return {boolean}
3555
+ */
3556
+ proto.game.CollectionRequest.prototype.hasFile = function() {
3557
+ return jspb.Message.getField(this, 2) != null;
3558
+ };
3559
+
3560
+
3561
+
3562
+
3563
+
3564
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3565
+ /**
3566
+ * Creates an object representation of this proto.
3567
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3568
+ * Optional fields that are not set will be set to undefined.
3569
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3570
+ * For the list of reserved names please see:
3571
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3572
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3573
+ * JSPB instance for transitional soy proto support:
3574
+ * http://goto/soy-param-migration
3575
+ * @return {!Object}
3576
+ */
3577
+ proto.game.CollectionItemRequest.prototype.toObject = function(opt_includeInstance) {
3578
+ return proto.game.CollectionItemRequest.toObject(opt_includeInstance, this);
3579
+ };
3580
+
3581
+
3582
+ /**
3583
+ * Static version of the {@see toObject} method.
3584
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3585
+ * the JSPB instance for transitional soy proto support:
3586
+ * http://goto/soy-param-migration
3587
+ * @param {!proto.game.CollectionItemRequest} msg The msg instance to transform.
3588
+ * @return {!Object}
3589
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3590
+ */
3591
+ proto.game.CollectionItemRequest.toObject = function(includeInstance, msg) {
3592
+ var f, obj = {
3593
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
3594
+ categoryId: jspb.Message.getFieldWithDefault(msg, 2, 0),
3595
+ title: jspb.Message.getFieldWithDefault(msg, 3, ""),
3596
+ slug: jspb.Message.getFieldWithDefault(msg, 4, ""),
3597
+ description: jspb.Message.getFieldWithDefault(msg, 5, ""),
3598
+ isActive: jspb.Message.getFieldWithDefault(msg, 6, 0),
3599
+ fileName: jspb.Message.getFieldWithDefault(msg, 7, ""),
3600
+ fileType: jspb.Message.getFieldWithDefault(msg, 8, "")
3601
+ };
3602
+
3603
+ if (includeInstance) {
3604
+ obj.$jspbMessageInstance = msg;
3605
+ }
3606
+ return obj;
3607
+ };
3608
+ }
3609
+
3610
+
3611
+ /**
3612
+ * Deserializes binary data (in protobuf wire format).
3613
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3614
+ * @return {!proto.game.CollectionItemRequest}
3615
+ */
3616
+ proto.game.CollectionItemRequest.deserializeBinary = function(bytes) {
3617
+ var reader = new jspb.BinaryReader(bytes);
3618
+ var msg = new proto.game.CollectionItemRequest;
3619
+ return proto.game.CollectionItemRequest.deserializeBinaryFromReader(msg, reader);
3620
+ };
3621
+
3622
+
3623
+ /**
3624
+ * Deserializes binary data (in protobuf wire format) from the
3625
+ * given reader into the given message object.
3626
+ * @param {!proto.game.CollectionItemRequest} msg The message object to deserialize into.
3627
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3628
+ * @return {!proto.game.CollectionItemRequest}
3629
+ */
3630
+ proto.game.CollectionItemRequest.deserializeBinaryFromReader = function(msg, reader) {
3631
+ while (reader.nextField()) {
3632
+ if (reader.isEndGroup()) {
3633
+ break;
3634
+ }
3635
+ var field = reader.getFieldNumber();
3636
+ switch (field) {
3637
+ case 1:
3638
+ var value = /** @type {number} */ (reader.readInt32());
3639
+ msg.setId(value);
3640
+ break;
3641
+ case 2:
3642
+ var value = /** @type {number} */ (reader.readInt32());
3643
+ msg.setCategoryId(value);
3644
+ break;
3645
+ case 3:
3646
+ var value = /** @type {string} */ (reader.readString());
3647
+ msg.setTitle(value);
3648
+ break;
3649
+ case 4:
3650
+ var value = /** @type {string} */ (reader.readString());
3651
+ msg.setSlug(value);
3652
+ break;
3653
+ case 5:
3654
+ var value = /** @type {string} */ (reader.readString());
3655
+ msg.setDescription(value);
3656
+ break;
3657
+ case 6:
3658
+ var value = /** @type {number} */ (reader.readInt32());
3659
+ msg.setIsActive(value);
3660
+ break;
3661
+ case 7:
3662
+ var value = /** @type {string} */ (reader.readString());
3663
+ msg.setFileName(value);
3664
+ break;
3665
+ case 8:
3666
+ var value = /** @type {string} */ (reader.readString());
3667
+ msg.setFileType(value);
3668
+ break;
3669
+ default:
3670
+ reader.skipField();
3671
+ break;
3672
+ }
3673
+ }
3674
+ return msg;
3675
+ };
3676
+
3677
+
3678
+ /**
3679
+ * Serializes the message to binary data (in protobuf wire format).
3680
+ * @return {!Uint8Array}
3681
+ */
3682
+ proto.game.CollectionItemRequest.prototype.serializeBinary = function() {
3683
+ var writer = new jspb.BinaryWriter();
3684
+ proto.game.CollectionItemRequest.serializeBinaryToWriter(this, writer);
3685
+ return writer.getResultBuffer();
3686
+ };
3687
+
3688
+
3689
+ /**
3690
+ * Serializes the given message to binary data (in protobuf wire
3691
+ * format), writing to the given BinaryWriter.
3692
+ * @param {!proto.game.CollectionItemRequest} message
3693
+ * @param {!jspb.BinaryWriter} writer
3694
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3695
+ */
3696
+ proto.game.CollectionItemRequest.serializeBinaryToWriter = function(message, writer) {
3697
+ var f = undefined;
3698
+ f = /** @type {number} */ (jspb.Message.getField(message, 1));
3699
+ if (f != null) {
3700
+ writer.writeInt32(
3701
+ 1,
3702
+ f
3703
+ );
3704
+ }
3705
+ f = /** @type {number} */ (jspb.Message.getField(message, 2));
3706
+ if (f != null) {
3707
+ writer.writeInt32(
3708
+ 2,
3709
+ f
3710
+ );
3711
+ }
3712
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
3713
+ if (f != null) {
3714
+ writer.writeString(
3715
+ 3,
3716
+ f
3717
+ );
3718
+ }
3719
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
3720
+ if (f != null) {
3721
+ writer.writeString(
3722
+ 4,
3723
+ f
3724
+ );
3725
+ }
3726
+ f = /** @type {string} */ (jspb.Message.getField(message, 5));
3727
+ if (f != null) {
3728
+ writer.writeString(
3729
+ 5,
3730
+ f
3731
+ );
3732
+ }
3733
+ f = /** @type {number} */ (jspb.Message.getField(message, 6));
3734
+ if (f != null) {
3735
+ writer.writeInt32(
3736
+ 6,
3737
+ f
3738
+ );
3739
+ }
3740
+ f = /** @type {string} */ (jspb.Message.getField(message, 7));
3741
+ if (f != null) {
3742
+ writer.writeString(
3743
+ 7,
3744
+ f
3745
+ );
3746
+ }
3747
+ f = /** @type {string} */ (jspb.Message.getField(message, 8));
3748
+ if (f != null) {
3749
+ writer.writeString(
3750
+ 8,
3751
+ f
3752
+ );
3753
+ }
3754
+ };
3755
+
3756
+
3757
+ /**
3758
+ * optional int32 id = 1;
3759
+ * @return {number}
3760
+ */
3761
+ proto.game.CollectionItemRequest.prototype.getId = function() {
3762
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
3763
+ };
3764
+
3765
+
3766
+ /**
3767
+ * @param {number} value
3768
+ * @return {!proto.game.CollectionItemRequest} returns this
3769
+ */
3770
+ proto.game.CollectionItemRequest.prototype.setId = function(value) {
3771
+ return jspb.Message.setField(this, 1, value);
3772
+ };
3773
+
3774
+
3775
+ /**
3776
+ * Clears the field making it undefined.
3777
+ * @return {!proto.game.CollectionItemRequest} returns this
3778
+ */
3779
+ proto.game.CollectionItemRequest.prototype.clearId = function() {
3780
+ return jspb.Message.setField(this, 1, undefined);
3781
+ };
3782
+
3783
+
3784
+ /**
3785
+ * Returns whether this field is set.
3786
+ * @return {boolean}
3787
+ */
3788
+ proto.game.CollectionItemRequest.prototype.hasId = function() {
3789
+ return jspb.Message.getField(this, 1) != null;
3790
+ };
3791
+
3792
+
3793
+ /**
3794
+ * optional int32 category_id = 2;
3795
+ * @return {number}
3796
+ */
3797
+ proto.game.CollectionItemRequest.prototype.getCategoryId = function() {
3798
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
3799
+ };
3800
+
3801
+
3802
+ /**
3803
+ * @param {number} value
3804
+ * @return {!proto.game.CollectionItemRequest} returns this
3805
+ */
3806
+ proto.game.CollectionItemRequest.prototype.setCategoryId = function(value) {
3807
+ return jspb.Message.setField(this, 2, value);
3808
+ };
3809
+
3810
+
3811
+ /**
3812
+ * Clears the field making it undefined.
3813
+ * @return {!proto.game.CollectionItemRequest} returns this
3814
+ */
3815
+ proto.game.CollectionItemRequest.prototype.clearCategoryId = function() {
3816
+ return jspb.Message.setField(this, 2, undefined);
3817
+ };
3818
+
3819
+
3820
+ /**
3821
+ * Returns whether this field is set.
3822
+ * @return {boolean}
3823
+ */
3824
+ proto.game.CollectionItemRequest.prototype.hasCategoryId = function() {
3825
+ return jspb.Message.getField(this, 2) != null;
3826
+ };
3827
+
3828
+
3829
+ /**
3830
+ * optional string title = 3;
3831
+ * @return {string}
3832
+ */
3833
+ proto.game.CollectionItemRequest.prototype.getTitle = function() {
3834
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
3835
+ };
3836
+
3837
+
3838
+ /**
3839
+ * @param {string} value
3840
+ * @return {!proto.game.CollectionItemRequest} returns this
3841
+ */
3842
+ proto.game.CollectionItemRequest.prototype.setTitle = function(value) {
3843
+ return jspb.Message.setField(this, 3, value);
3844
+ };
3845
+
3846
+
3847
+ /**
3848
+ * Clears the field making it undefined.
3849
+ * @return {!proto.game.CollectionItemRequest} returns this
3850
+ */
3851
+ proto.game.CollectionItemRequest.prototype.clearTitle = function() {
3852
+ return jspb.Message.setField(this, 3, undefined);
3853
+ };
3854
+
3855
+
3856
+ /**
3857
+ * Returns whether this field is set.
3858
+ * @return {boolean}
3859
+ */
3860
+ proto.game.CollectionItemRequest.prototype.hasTitle = function() {
3861
+ return jspb.Message.getField(this, 3) != null;
3862
+ };
3863
+
3864
+
3865
+ /**
3866
+ * optional string slug = 4;
3867
+ * @return {string}
3868
+ */
3869
+ proto.game.CollectionItemRequest.prototype.getSlug = function() {
3870
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
3871
+ };
3872
+
3873
+
3874
+ /**
3875
+ * @param {string} value
3876
+ * @return {!proto.game.CollectionItemRequest} returns this
3877
+ */
3878
+ proto.game.CollectionItemRequest.prototype.setSlug = function(value) {
3879
+ return jspb.Message.setField(this, 4, value);
3880
+ };
3881
+
3882
+
3883
+ /**
3884
+ * Clears the field making it undefined.
3885
+ * @return {!proto.game.CollectionItemRequest} returns this
3886
+ */
3887
+ proto.game.CollectionItemRequest.prototype.clearSlug = function() {
3888
+ return jspb.Message.setField(this, 4, undefined);
3889
+ };
3890
+
3891
+
3892
+ /**
3893
+ * Returns whether this field is set.
3894
+ * @return {boolean}
3895
+ */
3896
+ proto.game.CollectionItemRequest.prototype.hasSlug = function() {
3897
+ return jspb.Message.getField(this, 4) != null;
3898
+ };
3899
+
3900
+
3901
+ /**
3902
+ * optional string description = 5;
3903
+ * @return {string}
3904
+ */
3905
+ proto.game.CollectionItemRequest.prototype.getDescription = function() {
3906
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
3907
+ };
3908
+
3909
+
3910
+ /**
3911
+ * @param {string} value
3912
+ * @return {!proto.game.CollectionItemRequest} returns this
3913
+ */
3914
+ proto.game.CollectionItemRequest.prototype.setDescription = function(value) {
3915
+ return jspb.Message.setField(this, 5, value);
3916
+ };
3917
+
3918
+
3919
+ /**
3920
+ * Clears the field making it undefined.
3921
+ * @return {!proto.game.CollectionItemRequest} returns this
3922
+ */
3923
+ proto.game.CollectionItemRequest.prototype.clearDescription = function() {
3924
+ return jspb.Message.setField(this, 5, undefined);
3925
+ };
3926
+
3927
+
3928
+ /**
3929
+ * Returns whether this field is set.
3930
+ * @return {boolean}
3931
+ */
3932
+ proto.game.CollectionItemRequest.prototype.hasDescription = function() {
3933
+ return jspb.Message.getField(this, 5) != null;
3934
+ };
3935
+
3936
+
3937
+ /**
3938
+ * optional int32 is_active = 6;
3939
+ * @return {number}
3940
+ */
3941
+ proto.game.CollectionItemRequest.prototype.getIsActive = function() {
3942
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
3943
+ };
3944
+
3945
+
3946
+ /**
3947
+ * @param {number} value
3948
+ * @return {!proto.game.CollectionItemRequest} returns this
3949
+ */
3950
+ proto.game.CollectionItemRequest.prototype.setIsActive = function(value) {
3951
+ return jspb.Message.setField(this, 6, value);
3952
+ };
3953
+
3954
+
3955
+ /**
3956
+ * Clears the field making it undefined.
3957
+ * @return {!proto.game.CollectionItemRequest} returns this
3958
+ */
3959
+ proto.game.CollectionItemRequest.prototype.clearIsActive = function() {
3960
+ return jspb.Message.setField(this, 6, undefined);
3961
+ };
3962
+
3963
+
3964
+ /**
3965
+ * Returns whether this field is set.
3966
+ * @return {boolean}
3967
+ */
3968
+ proto.game.CollectionItemRequest.prototype.hasIsActive = function() {
3969
+ return jspb.Message.getField(this, 6) != null;
3970
+ };
3971
+
3972
+
3973
+ /**
3974
+ * optional string file_name = 7;
3975
+ * @return {string}
3976
+ */
3977
+ proto.game.CollectionItemRequest.prototype.getFileName = function() {
3978
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
3979
+ };
3980
+
3981
+
3982
+ /**
3983
+ * @param {string} value
3984
+ * @return {!proto.game.CollectionItemRequest} returns this
3985
+ */
3986
+ proto.game.CollectionItemRequest.prototype.setFileName = function(value) {
3987
+ return jspb.Message.setField(this, 7, value);
3988
+ };
3989
+
3990
+
3991
+ /**
3992
+ * Clears the field making it undefined.
3993
+ * @return {!proto.game.CollectionItemRequest} returns this
3994
+ */
3995
+ proto.game.CollectionItemRequest.prototype.clearFileName = function() {
3996
+ return jspb.Message.setField(this, 7, undefined);
3997
+ };
3998
+
3999
+
4000
+ /**
4001
+ * Returns whether this field is set.
4002
+ * @return {boolean}
4003
+ */
4004
+ proto.game.CollectionItemRequest.prototype.hasFileName = function() {
4005
+ return jspb.Message.getField(this, 7) != null;
4006
+ };
4007
+
4008
+
4009
+ /**
4010
+ * optional string file_type = 8;
4011
+ * @return {string}
4012
+ */
4013
+ proto.game.CollectionItemRequest.prototype.getFileType = function() {
4014
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
4015
+ };
4016
+
4017
+
4018
+ /**
4019
+ * @param {string} value
4020
+ * @return {!proto.game.CollectionItemRequest} returns this
4021
+ */
4022
+ proto.game.CollectionItemRequest.prototype.setFileType = function(value) {
4023
+ return jspb.Message.setField(this, 8, value);
4024
+ };
4025
+
4026
+
4027
+ /**
4028
+ * Clears the field making it undefined.
4029
+ * @return {!proto.game.CollectionItemRequest} returns this
4030
+ */
4031
+ proto.game.CollectionItemRequest.prototype.clearFileType = function() {
4032
+ return jspb.Message.setField(this, 8, undefined);
4033
+ };
4034
+
4035
+
4036
+ /**
4037
+ * Returns whether this field is set.
4038
+ * @return {boolean}
4039
+ */
4040
+ proto.game.CollectionItemRequest.prototype.hasFileType = function() {
4041
+ return jspb.Message.getField(this, 8) != null;
4042
+ };
4043
+
4044
+
4045
+
4046
+
4047
+
4048
+ if (jspb.Message.GENERATE_TO_OBJECT) {
4049
+ /**
4050
+ * Creates an object representation of this proto.
4051
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
4052
+ * Optional fields that are not set will be set to undefined.
4053
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
4054
+ * For the list of reserved names please see:
4055
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
4056
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
4057
+ * JSPB instance for transitional soy proto support:
4058
+ * http://goto/soy-param-migration
4059
+ * @return {!Object}
4060
+ */
4061
+ proto.game.GetCollectionRequest.prototype.toObject = function(opt_includeInstance) {
4062
+ return proto.game.GetCollectionRequest.toObject(opt_includeInstance, this);
4063
+ };
4064
+
4065
+
4066
+ /**
4067
+ * Static version of the {@see toObject} method.
4068
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
4069
+ * the JSPB instance for transitional soy proto support:
4070
+ * http://goto/soy-param-migration
4071
+ * @param {!proto.game.GetCollectionRequest} msg The msg instance to transform.
4072
+ * @return {!Object}
4073
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4074
+ */
4075
+ proto.game.GetCollectionRequest.toObject = function(includeInstance, msg) {
4076
+ var f, obj = {
4077
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0)
4078
+ };
4079
+
4080
+ if (includeInstance) {
4081
+ obj.$jspbMessageInstance = msg;
4082
+ }
4083
+ return obj;
4084
+ };
4085
+ }
4086
+
4087
+
4088
+ /**
4089
+ * Deserializes binary data (in protobuf wire format).
4090
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
4091
+ * @return {!proto.game.GetCollectionRequest}
4092
+ */
4093
+ proto.game.GetCollectionRequest.deserializeBinary = function(bytes) {
4094
+ var reader = new jspb.BinaryReader(bytes);
4095
+ var msg = new proto.game.GetCollectionRequest;
4096
+ return proto.game.GetCollectionRequest.deserializeBinaryFromReader(msg, reader);
4097
+ };
4098
+
4099
+
4100
+ /**
4101
+ * Deserializes binary data (in protobuf wire format) from the
4102
+ * given reader into the given message object.
4103
+ * @param {!proto.game.GetCollectionRequest} msg The message object to deserialize into.
4104
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
4105
+ * @return {!proto.game.GetCollectionRequest}
4106
+ */
4107
+ proto.game.GetCollectionRequest.deserializeBinaryFromReader = function(msg, reader) {
4108
+ while (reader.nextField()) {
4109
+ if (reader.isEndGroup()) {
4110
+ break;
4111
+ }
4112
+ var field = reader.getFieldNumber();
4113
+ switch (field) {
4114
+ case 1:
4115
+ var value = /** @type {number} */ (reader.readInt32());
4116
+ msg.setId(value);
4117
+ break;
4118
+ default:
4119
+ reader.skipField();
4120
+ break;
4121
+ }
4122
+ }
4123
+ return msg;
4124
+ };
4125
+
4126
+
4127
+ /**
4128
+ * Serializes the message to binary data (in protobuf wire format).
4129
+ * @return {!Uint8Array}
4130
+ */
4131
+ proto.game.GetCollectionRequest.prototype.serializeBinary = function() {
4132
+ var writer = new jspb.BinaryWriter();
4133
+ proto.game.GetCollectionRequest.serializeBinaryToWriter(this, writer);
4134
+ return writer.getResultBuffer();
4135
+ };
4136
+
4137
+
4138
+ /**
4139
+ * Serializes the given message to binary data (in protobuf wire
4140
+ * format), writing to the given BinaryWriter.
4141
+ * @param {!proto.game.GetCollectionRequest} message
4142
+ * @param {!jspb.BinaryWriter} writer
4143
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4144
+ */
4145
+ proto.game.GetCollectionRequest.serializeBinaryToWriter = function(message, writer) {
4146
+ var f = undefined;
4147
+ f = message.getId();
4148
+ if (f !== 0) {
4149
+ writer.writeInt32(
4150
+ 1,
4151
+ f
4152
+ );
4153
+ }
4154
+ };
4155
+
4156
+
4157
+ /**
4158
+ * optional int32 id = 1;
4159
+ * @return {number}
4160
+ */
4161
+ proto.game.GetCollectionRequest.prototype.getId = function() {
4162
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
4163
+ };
4164
+
4165
+
4166
+ /**
4167
+ * @param {number} value
4168
+ * @return {!proto.game.GetCollectionRequest} returns this
4169
+ */
4170
+ proto.game.GetCollectionRequest.prototype.setId = function(value) {
4171
+ return jspb.Message.setProto3IntField(this, 1, value);
4172
+ };
4173
+
4174
+
4175
+
4176
+
4177
+
4178
+ if (jspb.Message.GENERATE_TO_OBJECT) {
4179
+ /**
4180
+ * Creates an object representation of this proto.
4181
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
4182
+ * Optional fields that are not set will be set to undefined.
4183
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
4184
+ * For the list of reserved names please see:
4185
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
4186
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
4187
+ * JSPB instance for transitional soy proto support:
4188
+ * http://goto/soy-param-migration
4189
+ * @return {!Object}
4190
+ */
4191
+ proto.game.CollectionResponse.prototype.toObject = function(opt_includeInstance) {
4192
+ return proto.game.CollectionResponse.toObject(opt_includeInstance, this);
4193
+ };
4194
+
4195
+
4196
+ /**
4197
+ * Static version of the {@see toObject} method.
4198
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
4199
+ * the JSPB instance for transitional soy proto support:
4200
+ * http://goto/soy-param-migration
4201
+ * @param {!proto.game.CollectionResponse} msg The msg instance to transform.
4202
+ * @return {!Object}
4203
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4204
+ */
4205
+ proto.game.CollectionResponse.toObject = function(includeInstance, msg) {
4206
+ var f, obj = {
4207
+ data: (f = msg.getData()) && proto.game.CollectionItem.toObject(includeInstance, f)
4208
+ };
4209
+
4210
+ if (includeInstance) {
4211
+ obj.$jspbMessageInstance = msg;
4212
+ }
4213
+ return obj;
4214
+ };
4215
+ }
4216
+
4217
+
4218
+ /**
4219
+ * Deserializes binary data (in protobuf wire format).
4220
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
4221
+ * @return {!proto.game.CollectionResponse}
4222
+ */
4223
+ proto.game.CollectionResponse.deserializeBinary = function(bytes) {
4224
+ var reader = new jspb.BinaryReader(bytes);
4225
+ var msg = new proto.game.CollectionResponse;
4226
+ return proto.game.CollectionResponse.deserializeBinaryFromReader(msg, reader);
4227
+ };
4228
+
4229
+
4230
+ /**
4231
+ * Deserializes binary data (in protobuf wire format) from the
4232
+ * given reader into the given message object.
4233
+ * @param {!proto.game.CollectionResponse} msg The message object to deserialize into.
4234
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
4235
+ * @return {!proto.game.CollectionResponse}
4236
+ */
4237
+ proto.game.CollectionResponse.deserializeBinaryFromReader = function(msg, reader) {
4238
+ while (reader.nextField()) {
4239
+ if (reader.isEndGroup()) {
4240
+ break;
4241
+ }
4242
+ var field = reader.getFieldNumber();
4243
+ switch (field) {
4244
+ case 1:
4245
+ var value = new proto.game.CollectionItem;
4246
+ reader.readMessage(value,proto.game.CollectionItem.deserializeBinaryFromReader);
4247
+ msg.setData(value);
4248
+ break;
4249
+ default:
4250
+ reader.skipField();
4251
+ break;
4252
+ }
4253
+ }
4254
+ return msg;
4255
+ };
4256
+
4257
+
4258
+ /**
4259
+ * Serializes the message to binary data (in protobuf wire format).
4260
+ * @return {!Uint8Array}
4261
+ */
4262
+ proto.game.CollectionResponse.prototype.serializeBinary = function() {
4263
+ var writer = new jspb.BinaryWriter();
4264
+ proto.game.CollectionResponse.serializeBinaryToWriter(this, writer);
4265
+ return writer.getResultBuffer();
4266
+ };
4267
+
4268
+
4269
+ /**
4270
+ * Serializes the given message to binary data (in protobuf wire
4271
+ * format), writing to the given BinaryWriter.
4272
+ * @param {!proto.game.CollectionResponse} message
4273
+ * @param {!jspb.BinaryWriter} writer
4274
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4275
+ */
4276
+ proto.game.CollectionResponse.serializeBinaryToWriter = function(message, writer) {
4277
+ var f = undefined;
4278
+ f = message.getData();
4279
+ if (f != null) {
4280
+ writer.writeMessage(
4281
+ 1,
4282
+ f,
4283
+ proto.game.CollectionItem.serializeBinaryToWriter
4284
+ );
4285
+ }
4286
+ };
4287
+
4288
+
4289
+ /**
4290
+ * optional CollectionItem data = 1;
4291
+ * @return {?proto.game.CollectionItem}
4292
+ */
4293
+ proto.game.CollectionResponse.prototype.getData = function() {
4294
+ return /** @type{?proto.game.CollectionItem} */ (
4295
+ jspb.Message.getWrapperField(this, proto.game.CollectionItem, 1));
4296
+ };
4297
+
4298
+
4299
+ /**
4300
+ * @param {?proto.game.CollectionItem|undefined} value
4301
+ * @return {!proto.game.CollectionResponse} returns this
4302
+ */
4303
+ proto.game.CollectionResponse.prototype.setData = function(value) {
4304
+ return jspb.Message.setWrapperField(this, 1, value);
4305
+ };
4306
+
4307
+
4308
+ /**
4309
+ * Clears the message field making it undefined.
4310
+ * @return {!proto.game.CollectionResponse} returns this
4311
+ */
4312
+ proto.game.CollectionResponse.prototype.clearData = function() {
4313
+ return this.setData(undefined);
4314
+ };
4315
+
4316
+
4317
+ /**
4318
+ * Returns whether this field is set.
4319
+ * @return {boolean}
4320
+ */
4321
+ proto.game.CollectionResponse.prototype.hasData = function() {
4322
+ return jspb.Message.getField(this, 1) != null;
4323
+ };
4324
+
4325
+
4326
+
4327
+ /**
4328
+ * List of repeated fields within this message type.
4329
+ * @private {!Array<number>}
4330
+ * @const
4331
+ */
4332
+ proto.game.CollectionItemsResponse.repeatedFields_ = [1];
4333
+
4334
+
4335
+
4336
+ if (jspb.Message.GENERATE_TO_OBJECT) {
4337
+ /**
4338
+ * Creates an object representation of this proto.
4339
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
4340
+ * Optional fields that are not set will be set to undefined.
4341
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
4342
+ * For the list of reserved names please see:
4343
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
4344
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
4345
+ * JSPB instance for transitional soy proto support:
4346
+ * http://goto/soy-param-migration
4347
+ * @return {!Object}
4348
+ */
4349
+ proto.game.CollectionItemsResponse.prototype.toObject = function(opt_includeInstance) {
4350
+ return proto.game.CollectionItemsResponse.toObject(opt_includeInstance, this);
4351
+ };
4352
+
4353
+
4354
+ /**
4355
+ * Static version of the {@see toObject} method.
4356
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
4357
+ * the JSPB instance for transitional soy proto support:
4358
+ * http://goto/soy-param-migration
4359
+ * @param {!proto.game.CollectionItemsResponse} msg The msg instance to transform.
4360
+ * @return {!Object}
4361
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4362
+ */
4363
+ proto.game.CollectionItemsResponse.toObject = function(includeInstance, msg) {
4364
+ var f, obj = {
4365
+ itemsList: jspb.Message.toObjectList(msg.getItemsList(),
4366
+ proto.game.CollectionItem.toObject, includeInstance),
4367
+ totalPages: jspb.Message.getFieldWithDefault(msg, 2, 0),
4368
+ totalItems: jspb.Message.getFieldWithDefault(msg, 3, 0)
4369
+ };
4370
+
4371
+ if (includeInstance) {
4372
+ obj.$jspbMessageInstance = msg;
4373
+ }
4374
+ return obj;
4375
+ };
4376
+ }
4377
+
4378
+
4379
+ /**
4380
+ * Deserializes binary data (in protobuf wire format).
4381
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
4382
+ * @return {!proto.game.CollectionItemsResponse}
4383
+ */
4384
+ proto.game.CollectionItemsResponse.deserializeBinary = function(bytes) {
4385
+ var reader = new jspb.BinaryReader(bytes);
4386
+ var msg = new proto.game.CollectionItemsResponse;
4387
+ return proto.game.CollectionItemsResponse.deserializeBinaryFromReader(msg, reader);
4388
+ };
4389
+
4390
+
4391
+ /**
4392
+ * Deserializes binary data (in protobuf wire format) from the
4393
+ * given reader into the given message object.
4394
+ * @param {!proto.game.CollectionItemsResponse} msg The message object to deserialize into.
4395
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
4396
+ * @return {!proto.game.CollectionItemsResponse}
4397
+ */
4398
+ proto.game.CollectionItemsResponse.deserializeBinaryFromReader = function(msg, reader) {
4399
+ while (reader.nextField()) {
4400
+ if (reader.isEndGroup()) {
4401
+ break;
4402
+ }
4403
+ var field = reader.getFieldNumber();
4404
+ switch (field) {
4405
+ case 1:
4406
+ var value = new proto.game.CollectionItem;
4407
+ reader.readMessage(value,proto.game.CollectionItem.deserializeBinaryFromReader);
4408
+ msg.addItems(value);
4409
+ break;
4410
+ case 2:
4411
+ var value = /** @type {number} */ (reader.readInt32());
4412
+ msg.setTotalPages(value);
4413
+ break;
4414
+ case 3:
4415
+ var value = /** @type {number} */ (reader.readInt32());
4416
+ msg.setTotalItems(value);
4417
+ break;
4418
+ default:
4419
+ reader.skipField();
4420
+ break;
4421
+ }
4422
+ }
4423
+ return msg;
4424
+ };
4425
+
4426
+
4427
+ /**
4428
+ * Serializes the message to binary data (in protobuf wire format).
4429
+ * @return {!Uint8Array}
4430
+ */
4431
+ proto.game.CollectionItemsResponse.prototype.serializeBinary = function() {
4432
+ var writer = new jspb.BinaryWriter();
4433
+ proto.game.CollectionItemsResponse.serializeBinaryToWriter(this, writer);
4434
+ return writer.getResultBuffer();
4435
+ };
4436
+
4437
+
4438
+ /**
4439
+ * Serializes the given message to binary data (in protobuf wire
4440
+ * format), writing to the given BinaryWriter.
4441
+ * @param {!proto.game.CollectionItemsResponse} message
4442
+ * @param {!jspb.BinaryWriter} writer
4443
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4444
+ */
4445
+ proto.game.CollectionItemsResponse.serializeBinaryToWriter = function(message, writer) {
4446
+ var f = undefined;
4447
+ f = message.getItemsList();
4448
+ if (f.length > 0) {
4449
+ writer.writeRepeatedMessage(
4450
+ 1,
4451
+ f,
4452
+ proto.game.CollectionItem.serializeBinaryToWriter
4453
+ );
4454
+ }
4455
+ f = /** @type {number} */ (jspb.Message.getField(message, 2));
4456
+ if (f != null) {
4457
+ writer.writeInt32(
4458
+ 2,
4459
+ f
4460
+ );
4461
+ }
4462
+ f = /** @type {number} */ (jspb.Message.getField(message, 3));
4463
+ if (f != null) {
4464
+ writer.writeInt32(
4465
+ 3,
4466
+ f
4467
+ );
4468
+ }
4469
+ };
4470
+
4471
+
4472
+ /**
4473
+ * repeated CollectionItem items = 1;
4474
+ * @return {!Array<!proto.game.CollectionItem>}
4475
+ */
4476
+ proto.game.CollectionItemsResponse.prototype.getItemsList = function() {
4477
+ return /** @type{!Array<!proto.game.CollectionItem>} */ (
4478
+ jspb.Message.getRepeatedWrapperField(this, proto.game.CollectionItem, 1));
4479
+ };
4480
+
4481
+
4482
+ /**
4483
+ * @param {!Array<!proto.game.CollectionItem>} value
4484
+ * @return {!proto.game.CollectionItemsResponse} returns this
4485
+ */
4486
+ proto.game.CollectionItemsResponse.prototype.setItemsList = function(value) {
4487
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
4488
+ };
4489
+
4490
+
4491
+ /**
4492
+ * @param {!proto.game.CollectionItem=} opt_value
4493
+ * @param {number=} opt_index
4494
+ * @return {!proto.game.CollectionItem}
4495
+ */
4496
+ proto.game.CollectionItemsResponse.prototype.addItems = function(opt_value, opt_index) {
4497
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.game.CollectionItem, opt_index);
4498
+ };
4499
+
4500
+
4501
+ /**
4502
+ * Clears the list making it empty but non-null.
4503
+ * @return {!proto.game.CollectionItemsResponse} returns this
4504
+ */
4505
+ proto.game.CollectionItemsResponse.prototype.clearItemsList = function() {
4506
+ return this.setItemsList([]);
4507
+ };
4508
+
4509
+
4510
+ /**
4511
+ * optional int32 total_pages = 2;
4512
+ * @return {number}
4513
+ */
4514
+ proto.game.CollectionItemsResponse.prototype.getTotalPages = function() {
4515
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
4516
+ };
4517
+
4518
+
4519
+ /**
4520
+ * @param {number} value
4521
+ * @return {!proto.game.CollectionItemsResponse} returns this
4522
+ */
4523
+ proto.game.CollectionItemsResponse.prototype.setTotalPages = function(value) {
4524
+ return jspb.Message.setField(this, 2, value);
4525
+ };
4526
+
4527
+
4528
+ /**
4529
+ * Clears the field making it undefined.
4530
+ * @return {!proto.game.CollectionItemsResponse} returns this
4531
+ */
4532
+ proto.game.CollectionItemsResponse.prototype.clearTotalPages = function() {
4533
+ return jspb.Message.setField(this, 2, undefined);
4534
+ };
4535
+
4536
+
4537
+ /**
4538
+ * Returns whether this field is set.
4539
+ * @return {boolean}
4540
+ */
4541
+ proto.game.CollectionItemsResponse.prototype.hasTotalPages = function() {
4542
+ return jspb.Message.getField(this, 2) != null;
4543
+ };
4544
+
4545
+
4546
+ /**
4547
+ * optional int32 total_items = 3;
4548
+ * @return {number}
4549
+ */
4550
+ proto.game.CollectionItemsResponse.prototype.getTotalItems = function() {
4551
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
4552
+ };
4553
+
4554
+
4555
+ /**
4556
+ * @param {number} value
4557
+ * @return {!proto.game.CollectionItemsResponse} returns this
4558
+ */
4559
+ proto.game.CollectionItemsResponse.prototype.setTotalItems = function(value) {
4560
+ return jspb.Message.setField(this, 3, value);
4561
+ };
4562
+
4563
+
4564
+ /**
4565
+ * Clears the field making it undefined.
4566
+ * @return {!proto.game.CollectionItemsResponse} returns this
4567
+ */
4568
+ proto.game.CollectionItemsResponse.prototype.clearTotalItems = function() {
4569
+ return jspb.Message.setField(this, 3, undefined);
4570
+ };
4571
+
4572
+
4573
+ /**
4574
+ * Returns whether this field is set.
4575
+ * @return {boolean}
4576
+ */
4577
+ proto.game.CollectionItemsResponse.prototype.hasTotalItems = function() {
4578
+ return jspb.Message.getField(this, 3) != null;
4579
+ };
4580
+
4581
+
4582
+
4583
+
4584
+
4585
+ if (jspb.Message.GENERATE_TO_OBJECT) {
4586
+ /**
4587
+ * Creates an object representation of this proto.
4588
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
4589
+ * Optional fields that are not set will be set to undefined.
4590
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
4591
+ * For the list of reserved names please see:
4592
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
4593
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
4594
+ * JSPB instance for transitional soy proto support:
4595
+ * http://goto/soy-param-migration
4596
+ * @return {!Object}
4597
+ */
4598
+ proto.game.CollectionStatusResponse.prototype.toObject = function(opt_includeInstance) {
4599
+ return proto.game.CollectionStatusResponse.toObject(opt_includeInstance, this);
4600
+ };
4601
+
4602
+
4603
+ /**
4604
+ * Static version of the {@see toObject} method.
4605
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
4606
+ * the JSPB instance for transitional soy proto support:
4607
+ * http://goto/soy-param-migration
4608
+ * @param {!proto.game.CollectionStatusResponse} msg The msg instance to transform.
4609
+ * @return {!Object}
4610
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4611
+ */
4612
+ proto.game.CollectionStatusResponse.toObject = function(includeInstance, msg) {
4613
+ var f, obj = {
4614
+ status: jspb.Message.getFieldWithDefault(msg, 1, "")
4615
+ };
4616
+
4617
+ if (includeInstance) {
4618
+ obj.$jspbMessageInstance = msg;
4619
+ }
4620
+ return obj;
4621
+ };
4622
+ }
4623
+
4624
+
4625
+ /**
4626
+ * Deserializes binary data (in protobuf wire format).
4627
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
4628
+ * @return {!proto.game.CollectionStatusResponse}
4629
+ */
4630
+ proto.game.CollectionStatusResponse.deserializeBinary = function(bytes) {
4631
+ var reader = new jspb.BinaryReader(bytes);
4632
+ var msg = new proto.game.CollectionStatusResponse;
4633
+ return proto.game.CollectionStatusResponse.deserializeBinaryFromReader(msg, reader);
4634
+ };
4635
+
4636
+
4637
+ /**
4638
+ * Deserializes binary data (in protobuf wire format) from the
4639
+ * given reader into the given message object.
4640
+ * @param {!proto.game.CollectionStatusResponse} msg The message object to deserialize into.
4641
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
4642
+ * @return {!proto.game.CollectionStatusResponse}
4643
+ */
4644
+ proto.game.CollectionStatusResponse.deserializeBinaryFromReader = function(msg, reader) {
4645
+ while (reader.nextField()) {
4646
+ if (reader.isEndGroup()) {
4647
+ break;
4648
+ }
4649
+ var field = reader.getFieldNumber();
4650
+ switch (field) {
4651
+ case 1:
4652
+ var value = /** @type {string} */ (reader.readString());
4653
+ msg.setStatus(value);
4654
+ break;
4655
+ default:
4656
+ reader.skipField();
4657
+ break;
4658
+ }
4659
+ }
4660
+ return msg;
4661
+ };
4662
+
4663
+
4664
+ /**
4665
+ * Serializes the message to binary data (in protobuf wire format).
4666
+ * @return {!Uint8Array}
4667
+ */
4668
+ proto.game.CollectionStatusResponse.prototype.serializeBinary = function() {
4669
+ var writer = new jspb.BinaryWriter();
4670
+ proto.game.CollectionStatusResponse.serializeBinaryToWriter(this, writer);
4671
+ return writer.getResultBuffer();
4672
+ };
4673
+
4674
+
4675
+ /**
4676
+ * Serializes the given message to binary data (in protobuf wire
4677
+ * format), writing to the given BinaryWriter.
4678
+ * @param {!proto.game.CollectionStatusResponse} message
4679
+ * @param {!jspb.BinaryWriter} writer
4680
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4681
+ */
4682
+ proto.game.CollectionStatusResponse.serializeBinaryToWriter = function(message, writer) {
4683
+ var f = undefined;
4684
+ f = message.getStatus();
4685
+ if (f.length > 0) {
4686
+ writer.writeString(
4687
+ 1,
4688
+ f
4689
+ );
4690
+ }
4691
+ };
4692
+
4693
+
4694
+ /**
4695
+ * optional string status = 1;
4696
+ * @return {string}
4697
+ */
4698
+ proto.game.CollectionStatusResponse.prototype.getStatus = function() {
4699
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
4700
+ };
4701
+
4702
+
4703
+ /**
4704
+ * @param {string} value
4705
+ * @return {!proto.game.CollectionStatusResponse} returns this
4706
+ */
4707
+ proto.game.CollectionStatusResponse.prototype.setStatus = function(value) {
4708
+ return jspb.Message.setProto3StringField(this, 1, value);
4709
+ };
4710
+
4711
+
2742
4712
  goog.object.extend(exports, proto.game);