protobuf-platform 1.0.106 → 1.0.108

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/user/user_pb.js CHANGED
@@ -22,6 +22,7 @@ var global = (function() {
22
22
  }.call(null));
23
23
 
24
24
  goog.exportSymbol('proto.user.GetRoleRequest', null, global);
25
+ goog.exportSymbol('proto.user.GetSegmentRequest', null, global);
25
26
  goog.exportSymbol('proto.user.LoggedInResponse', null, global);
26
27
  goog.exportSymbol('proto.user.LoginRequest', null, global);
27
28
  goog.exportSymbol('proto.user.PaginationRequest', null, global);
@@ -32,6 +33,10 @@ goog.exportSymbol('proto.user.Role', null, global);
32
33
  goog.exportSymbol('proto.user.RolePermissionRequest', null, global);
33
34
  goog.exportSymbol('proto.user.RolePermissionStatusResponse', null, global);
34
35
  goog.exportSymbol('proto.user.RolesItemsResponse', null, global);
36
+ goog.exportSymbol('proto.user.SegmentItemsResponse', null, global);
37
+ goog.exportSymbol('proto.user.SegmentRequest', null, global);
38
+ goog.exportSymbol('proto.user.SegmentResponse', null, global);
39
+ goog.exportSymbol('proto.user.SegmentStatusResponse', null, global);
35
40
  goog.exportSymbol('proto.user.UserDataRequest', null, global);
36
41
  goog.exportSymbol('proto.user.UserDataResponse', null, global);
37
42
  goog.exportSymbol('proto.user.UserSearchParams', null, global);
@@ -351,6 +356,111 @@ if (goog.DEBUG && !COMPILED) {
351
356
  */
352
357
  proto.user.RolesItemsResponse.displayName = 'proto.user.RolesItemsResponse';
353
358
  }
359
+ /**
360
+ * Generated by JsPbCodeGenerator.
361
+ * @param {Array=} opt_data Optional initial data array, typically from a
362
+ * server response, or constructed directly in Javascript. The array is used
363
+ * in place and becomes part of the constructed object. It is not cloned.
364
+ * If no data is provided, the constructed object will be empty, but still
365
+ * valid.
366
+ * @extends {jspb.Message}
367
+ * @constructor
368
+ */
369
+ proto.user.SegmentRequest = function(opt_data) {
370
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
371
+ };
372
+ goog.inherits(proto.user.SegmentRequest, jspb.Message);
373
+ if (goog.DEBUG && !COMPILED) {
374
+ /**
375
+ * @public
376
+ * @override
377
+ */
378
+ proto.user.SegmentRequest.displayName = 'proto.user.SegmentRequest';
379
+ }
380
+ /**
381
+ * Generated by JsPbCodeGenerator.
382
+ * @param {Array=} opt_data Optional initial data array, typically from a
383
+ * server response, or constructed directly in Javascript. The array is used
384
+ * in place and becomes part of the constructed object. It is not cloned.
385
+ * If no data is provided, the constructed object will be empty, but still
386
+ * valid.
387
+ * @extends {jspb.Message}
388
+ * @constructor
389
+ */
390
+ proto.user.GetSegmentRequest = function(opt_data) {
391
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
392
+ };
393
+ goog.inherits(proto.user.GetSegmentRequest, jspb.Message);
394
+ if (goog.DEBUG && !COMPILED) {
395
+ /**
396
+ * @public
397
+ * @override
398
+ */
399
+ proto.user.GetSegmentRequest.displayName = 'proto.user.GetSegmentRequest';
400
+ }
401
+ /**
402
+ * Generated by JsPbCodeGenerator.
403
+ * @param {Array=} opt_data Optional initial data array, typically from a
404
+ * server response, or constructed directly in Javascript. The array is used
405
+ * in place and becomes part of the constructed object. It is not cloned.
406
+ * If no data is provided, the constructed object will be empty, but still
407
+ * valid.
408
+ * @extends {jspb.Message}
409
+ * @constructor
410
+ */
411
+ proto.user.SegmentResponse = function(opt_data) {
412
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
413
+ };
414
+ goog.inherits(proto.user.SegmentResponse, jspb.Message);
415
+ if (goog.DEBUG && !COMPILED) {
416
+ /**
417
+ * @public
418
+ * @override
419
+ */
420
+ proto.user.SegmentResponse.displayName = 'proto.user.SegmentResponse';
421
+ }
422
+ /**
423
+ * Generated by JsPbCodeGenerator.
424
+ * @param {Array=} opt_data Optional initial data array, typically from a
425
+ * server response, or constructed directly in Javascript. The array is used
426
+ * in place and becomes part of the constructed object. It is not cloned.
427
+ * If no data is provided, the constructed object will be empty, but still
428
+ * valid.
429
+ * @extends {jspb.Message}
430
+ * @constructor
431
+ */
432
+ proto.user.SegmentStatusResponse = function(opt_data) {
433
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
434
+ };
435
+ goog.inherits(proto.user.SegmentStatusResponse, jspb.Message);
436
+ if (goog.DEBUG && !COMPILED) {
437
+ /**
438
+ * @public
439
+ * @override
440
+ */
441
+ proto.user.SegmentStatusResponse.displayName = 'proto.user.SegmentStatusResponse';
442
+ }
443
+ /**
444
+ * Generated by JsPbCodeGenerator.
445
+ * @param {Array=} opt_data Optional initial data array, typically from a
446
+ * server response, or constructed directly in Javascript. The array is used
447
+ * in place and becomes part of the constructed object. It is not cloned.
448
+ * If no data is provided, the constructed object will be empty, but still
449
+ * valid.
450
+ * @extends {jspb.Message}
451
+ * @constructor
452
+ */
453
+ proto.user.SegmentItemsResponse = function(opt_data) {
454
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.user.SegmentItemsResponse.repeatedFields_, null);
455
+ };
456
+ goog.inherits(proto.user.SegmentItemsResponse, jspb.Message);
457
+ if (goog.DEBUG && !COMPILED) {
458
+ /**
459
+ * @public
460
+ * @override
461
+ */
462
+ proto.user.SegmentItemsResponse.displayName = 'proto.user.SegmentItemsResponse';
463
+ }
354
464
 
355
465
 
356
466
 
@@ -2242,11 +2352,12 @@ proto.user.UserDataResponse.toObject = function(includeInstance, msg) {
2242
2352
  locale: jspb.Message.getFieldWithDefault(msg, 11, ""),
2243
2353
  permissions: jspb.Message.getFieldWithDefault(msg, 12, ""),
2244
2354
  roleName: jspb.Message.getFieldWithDefault(msg, 13, ""),
2245
- verificationName: jspb.Message.getFieldWithDefault(msg, 14, ""),
2355
+ verificationStatus: jspb.Message.getFieldWithDefault(msg, 14, ""),
2246
2356
  balanceReal: jspb.Message.getFloatingPointFieldWithDefault(msg, 15, 0.0),
2247
2357
  balanceBonus: jspb.Message.getFloatingPointFieldWithDefault(msg, 16, 0.0),
2248
2358
  balanceType: jspb.Message.getFieldWithDefault(msg, 17, ""),
2249
- affiliateId: jspb.Message.getFieldWithDefault(msg, 18, 0)
2359
+ affiliateId: jspb.Message.getFieldWithDefault(msg, 18, 0),
2360
+ timezone: jspb.Message.getFieldWithDefault(msg, 19, "")
2250
2361
  };
2251
2362
 
2252
2363
  if (includeInstance) {
@@ -2337,7 +2448,7 @@ proto.user.UserDataResponse.deserializeBinaryFromReader = function(msg, reader)
2337
2448
  break;
2338
2449
  case 14:
2339
2450
  var value = /** @type {string} */ (reader.readString());
2340
- msg.setVerificationName(value);
2451
+ msg.setVerificationStatus(value);
2341
2452
  break;
2342
2453
  case 15:
2343
2454
  var value = /** @type {number} */ (reader.readFloat());
@@ -2355,6 +2466,10 @@ proto.user.UserDataResponse.deserializeBinaryFromReader = function(msg, reader)
2355
2466
  var value = /** @type {number} */ (reader.readInt32());
2356
2467
  msg.setAffiliateId(value);
2357
2468
  break;
2469
+ case 19:
2470
+ var value = /** @type {string} */ (reader.readString());
2471
+ msg.setTimezone(value);
2472
+ break;
2358
2473
  default:
2359
2474
  reader.skipField();
2360
2475
  break;
@@ -2510,6 +2625,13 @@ proto.user.UserDataResponse.serializeBinaryToWriter = function(message, writer)
2510
2625
  f
2511
2626
  );
2512
2627
  }
2628
+ f = /** @type {string} */ (jspb.Message.getField(message, 19));
2629
+ if (f != null) {
2630
+ writer.writeString(
2631
+ 19,
2632
+ f
2633
+ );
2634
+ }
2513
2635
  };
2514
2636
 
2515
2637
 
@@ -2946,10 +3068,10 @@ proto.user.UserDataResponse.prototype.hasRoleName = function() {
2946
3068
 
2947
3069
 
2948
3070
  /**
2949
- * optional string verification_name = 14;
3071
+ * optional string verification_status = 14;
2950
3072
  * @return {string}
2951
3073
  */
2952
- proto.user.UserDataResponse.prototype.getVerificationName = function() {
3074
+ proto.user.UserDataResponse.prototype.getVerificationStatus = function() {
2953
3075
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, ""));
2954
3076
  };
2955
3077
 
@@ -2958,7 +3080,7 @@ proto.user.UserDataResponse.prototype.getVerificationName = function() {
2958
3080
  * @param {string} value
2959
3081
  * @return {!proto.user.UserDataResponse} returns this
2960
3082
  */
2961
- proto.user.UserDataResponse.prototype.setVerificationName = function(value) {
3083
+ proto.user.UserDataResponse.prototype.setVerificationStatus = function(value) {
2962
3084
  return jspb.Message.setField(this, 14, value);
2963
3085
  };
2964
3086
 
@@ -2967,7 +3089,7 @@ proto.user.UserDataResponse.prototype.setVerificationName = function(value) {
2967
3089
  * Clears the field making it undefined.
2968
3090
  * @return {!proto.user.UserDataResponse} returns this
2969
3091
  */
2970
- proto.user.UserDataResponse.prototype.clearVerificationName = function() {
3092
+ proto.user.UserDataResponse.prototype.clearVerificationStatus = function() {
2971
3093
  return jspb.Message.setField(this, 14, undefined);
2972
3094
  };
2973
3095
 
@@ -2976,7 +3098,7 @@ proto.user.UserDataResponse.prototype.clearVerificationName = function() {
2976
3098
  * Returns whether this field is set.
2977
3099
  * @return {boolean}
2978
3100
  */
2979
- proto.user.UserDataResponse.prototype.hasVerificationName = function() {
3101
+ proto.user.UserDataResponse.prototype.hasVerificationStatus = function() {
2980
3102
  return jspb.Message.getField(this, 14) != null;
2981
3103
  };
2982
3104
 
@@ -3125,6 +3247,42 @@ proto.user.UserDataResponse.prototype.hasAffiliateId = function() {
3125
3247
  };
3126
3248
 
3127
3249
 
3250
+ /**
3251
+ * optional string timezone = 19;
3252
+ * @return {string}
3253
+ */
3254
+ proto.user.UserDataResponse.prototype.getTimezone = function() {
3255
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 19, ""));
3256
+ };
3257
+
3258
+
3259
+ /**
3260
+ * @param {string} value
3261
+ * @return {!proto.user.UserDataResponse} returns this
3262
+ */
3263
+ proto.user.UserDataResponse.prototype.setTimezone = function(value) {
3264
+ return jspb.Message.setField(this, 19, value);
3265
+ };
3266
+
3267
+
3268
+ /**
3269
+ * Clears the field making it undefined.
3270
+ * @return {!proto.user.UserDataResponse} returns this
3271
+ */
3272
+ proto.user.UserDataResponse.prototype.clearTimezone = function() {
3273
+ return jspb.Message.setField(this, 19, undefined);
3274
+ };
3275
+
3276
+
3277
+ /**
3278
+ * Returns whether this field is set.
3279
+ * @return {boolean}
3280
+ */
3281
+ proto.user.UserDataResponse.prototype.hasTimezone = function() {
3282
+ return jspb.Message.getField(this, 19) != null;
3283
+ };
3284
+
3285
+
3128
3286
 
3129
3287
  /**
3130
3288
  * List of repeated fields within this message type.
@@ -4433,4 +4591,1248 @@ proto.user.RolesItemsResponse.prototype.setTotalPages = function(value) {
4433
4591
  };
4434
4592
 
4435
4593
 
4594
+
4595
+
4596
+
4597
+ if (jspb.Message.GENERATE_TO_OBJECT) {
4598
+ /**
4599
+ * Creates an object representation of this proto.
4600
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
4601
+ * Optional fields that are not set will be set to undefined.
4602
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
4603
+ * For the list of reserved names please see:
4604
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
4605
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
4606
+ * JSPB instance for transitional soy proto support:
4607
+ * http://goto/soy-param-migration
4608
+ * @return {!Object}
4609
+ */
4610
+ proto.user.SegmentRequest.prototype.toObject = function(opt_includeInstance) {
4611
+ return proto.user.SegmentRequest.toObject(opt_includeInstance, this);
4612
+ };
4613
+
4614
+
4615
+ /**
4616
+ * Static version of the {@see toObject} method.
4617
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
4618
+ * the JSPB instance for transitional soy proto support:
4619
+ * http://goto/soy-param-migration
4620
+ * @param {!proto.user.SegmentRequest} msg The msg instance to transform.
4621
+ * @return {!Object}
4622
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4623
+ */
4624
+ proto.user.SegmentRequest.toObject = function(includeInstance, msg) {
4625
+ var f, obj = {
4626
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
4627
+ title: jspb.Message.getFieldWithDefault(msg, 2, ""),
4628
+ description: jspb.Message.getFieldWithDefault(msg, 3, ""),
4629
+ type: jspb.Message.getFieldWithDefault(msg, 4, ""),
4630
+ isActive: jspb.Message.getBooleanFieldWithDefault(msg, 5, false)
4631
+ };
4632
+
4633
+ if (includeInstance) {
4634
+ obj.$jspbMessageInstance = msg;
4635
+ }
4636
+ return obj;
4637
+ };
4638
+ }
4639
+
4640
+
4641
+ /**
4642
+ * Deserializes binary data (in protobuf wire format).
4643
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
4644
+ * @return {!proto.user.SegmentRequest}
4645
+ */
4646
+ proto.user.SegmentRequest.deserializeBinary = function(bytes) {
4647
+ var reader = new jspb.BinaryReader(bytes);
4648
+ var msg = new proto.user.SegmentRequest;
4649
+ return proto.user.SegmentRequest.deserializeBinaryFromReader(msg, reader);
4650
+ };
4651
+
4652
+
4653
+ /**
4654
+ * Deserializes binary data (in protobuf wire format) from the
4655
+ * given reader into the given message object.
4656
+ * @param {!proto.user.SegmentRequest} msg The message object to deserialize into.
4657
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
4658
+ * @return {!proto.user.SegmentRequest}
4659
+ */
4660
+ proto.user.SegmentRequest.deserializeBinaryFromReader = function(msg, reader) {
4661
+ while (reader.nextField()) {
4662
+ if (reader.isEndGroup()) {
4663
+ break;
4664
+ }
4665
+ var field = reader.getFieldNumber();
4666
+ switch (field) {
4667
+ case 1:
4668
+ var value = /** @type {number} */ (reader.readInt32());
4669
+ msg.setId(value);
4670
+ break;
4671
+ case 2:
4672
+ var value = /** @type {string} */ (reader.readString());
4673
+ msg.setTitle(value);
4674
+ break;
4675
+ case 3:
4676
+ var value = /** @type {string} */ (reader.readString());
4677
+ msg.setDescription(value);
4678
+ break;
4679
+ case 4:
4680
+ var value = /** @type {string} */ (reader.readString());
4681
+ msg.setType(value);
4682
+ break;
4683
+ case 5:
4684
+ var value = /** @type {boolean} */ (reader.readBool());
4685
+ msg.setIsActive(value);
4686
+ break;
4687
+ default:
4688
+ reader.skipField();
4689
+ break;
4690
+ }
4691
+ }
4692
+ return msg;
4693
+ };
4694
+
4695
+
4696
+ /**
4697
+ * Serializes the message to binary data (in protobuf wire format).
4698
+ * @return {!Uint8Array}
4699
+ */
4700
+ proto.user.SegmentRequest.prototype.serializeBinary = function() {
4701
+ var writer = new jspb.BinaryWriter();
4702
+ proto.user.SegmentRequest.serializeBinaryToWriter(this, writer);
4703
+ return writer.getResultBuffer();
4704
+ };
4705
+
4706
+
4707
+ /**
4708
+ * Serializes the given message to binary data (in protobuf wire
4709
+ * format), writing to the given BinaryWriter.
4710
+ * @param {!proto.user.SegmentRequest} message
4711
+ * @param {!jspb.BinaryWriter} writer
4712
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4713
+ */
4714
+ proto.user.SegmentRequest.serializeBinaryToWriter = function(message, writer) {
4715
+ var f = undefined;
4716
+ f = /** @type {number} */ (jspb.Message.getField(message, 1));
4717
+ if (f != null) {
4718
+ writer.writeInt32(
4719
+ 1,
4720
+ f
4721
+ );
4722
+ }
4723
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
4724
+ if (f != null) {
4725
+ writer.writeString(
4726
+ 2,
4727
+ f
4728
+ );
4729
+ }
4730
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
4731
+ if (f != null) {
4732
+ writer.writeString(
4733
+ 3,
4734
+ f
4735
+ );
4736
+ }
4737
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
4738
+ if (f != null) {
4739
+ writer.writeString(
4740
+ 4,
4741
+ f
4742
+ );
4743
+ }
4744
+ f = /** @type {boolean} */ (jspb.Message.getField(message, 5));
4745
+ if (f != null) {
4746
+ writer.writeBool(
4747
+ 5,
4748
+ f
4749
+ );
4750
+ }
4751
+ };
4752
+
4753
+
4754
+ /**
4755
+ * optional int32 id = 1;
4756
+ * @return {number}
4757
+ */
4758
+ proto.user.SegmentRequest.prototype.getId = function() {
4759
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
4760
+ };
4761
+
4762
+
4763
+ /**
4764
+ * @param {number} value
4765
+ * @return {!proto.user.SegmentRequest} returns this
4766
+ */
4767
+ proto.user.SegmentRequest.prototype.setId = function(value) {
4768
+ return jspb.Message.setField(this, 1, value);
4769
+ };
4770
+
4771
+
4772
+ /**
4773
+ * Clears the field making it undefined.
4774
+ * @return {!proto.user.SegmentRequest} returns this
4775
+ */
4776
+ proto.user.SegmentRequest.prototype.clearId = function() {
4777
+ return jspb.Message.setField(this, 1, undefined);
4778
+ };
4779
+
4780
+
4781
+ /**
4782
+ * Returns whether this field is set.
4783
+ * @return {boolean}
4784
+ */
4785
+ proto.user.SegmentRequest.prototype.hasId = function() {
4786
+ return jspb.Message.getField(this, 1) != null;
4787
+ };
4788
+
4789
+
4790
+ /**
4791
+ * optional string title = 2;
4792
+ * @return {string}
4793
+ */
4794
+ proto.user.SegmentRequest.prototype.getTitle = function() {
4795
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
4796
+ };
4797
+
4798
+
4799
+ /**
4800
+ * @param {string} value
4801
+ * @return {!proto.user.SegmentRequest} returns this
4802
+ */
4803
+ proto.user.SegmentRequest.prototype.setTitle = function(value) {
4804
+ return jspb.Message.setField(this, 2, value);
4805
+ };
4806
+
4807
+
4808
+ /**
4809
+ * Clears the field making it undefined.
4810
+ * @return {!proto.user.SegmentRequest} returns this
4811
+ */
4812
+ proto.user.SegmentRequest.prototype.clearTitle = function() {
4813
+ return jspb.Message.setField(this, 2, undefined);
4814
+ };
4815
+
4816
+
4817
+ /**
4818
+ * Returns whether this field is set.
4819
+ * @return {boolean}
4820
+ */
4821
+ proto.user.SegmentRequest.prototype.hasTitle = function() {
4822
+ return jspb.Message.getField(this, 2) != null;
4823
+ };
4824
+
4825
+
4826
+ /**
4827
+ * optional string description = 3;
4828
+ * @return {string}
4829
+ */
4830
+ proto.user.SegmentRequest.prototype.getDescription = function() {
4831
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
4832
+ };
4833
+
4834
+
4835
+ /**
4836
+ * @param {string} value
4837
+ * @return {!proto.user.SegmentRequest} returns this
4838
+ */
4839
+ proto.user.SegmentRequest.prototype.setDescription = function(value) {
4840
+ return jspb.Message.setField(this, 3, value);
4841
+ };
4842
+
4843
+
4844
+ /**
4845
+ * Clears the field making it undefined.
4846
+ * @return {!proto.user.SegmentRequest} returns this
4847
+ */
4848
+ proto.user.SegmentRequest.prototype.clearDescription = function() {
4849
+ return jspb.Message.setField(this, 3, undefined);
4850
+ };
4851
+
4852
+
4853
+ /**
4854
+ * Returns whether this field is set.
4855
+ * @return {boolean}
4856
+ */
4857
+ proto.user.SegmentRequest.prototype.hasDescription = function() {
4858
+ return jspb.Message.getField(this, 3) != null;
4859
+ };
4860
+
4861
+
4862
+ /**
4863
+ * optional string type = 4;
4864
+ * @return {string}
4865
+ */
4866
+ proto.user.SegmentRequest.prototype.getType = function() {
4867
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
4868
+ };
4869
+
4870
+
4871
+ /**
4872
+ * @param {string} value
4873
+ * @return {!proto.user.SegmentRequest} returns this
4874
+ */
4875
+ proto.user.SegmentRequest.prototype.setType = function(value) {
4876
+ return jspb.Message.setField(this, 4, value);
4877
+ };
4878
+
4879
+
4880
+ /**
4881
+ * Clears the field making it undefined.
4882
+ * @return {!proto.user.SegmentRequest} returns this
4883
+ */
4884
+ proto.user.SegmentRequest.prototype.clearType = function() {
4885
+ return jspb.Message.setField(this, 4, undefined);
4886
+ };
4887
+
4888
+
4889
+ /**
4890
+ * Returns whether this field is set.
4891
+ * @return {boolean}
4892
+ */
4893
+ proto.user.SegmentRequest.prototype.hasType = function() {
4894
+ return jspb.Message.getField(this, 4) != null;
4895
+ };
4896
+
4897
+
4898
+ /**
4899
+ * optional bool is_active = 5;
4900
+ * @return {boolean}
4901
+ */
4902
+ proto.user.SegmentRequest.prototype.getIsActive = function() {
4903
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false));
4904
+ };
4905
+
4906
+
4907
+ /**
4908
+ * @param {boolean} value
4909
+ * @return {!proto.user.SegmentRequest} returns this
4910
+ */
4911
+ proto.user.SegmentRequest.prototype.setIsActive = function(value) {
4912
+ return jspb.Message.setField(this, 5, value);
4913
+ };
4914
+
4915
+
4916
+ /**
4917
+ * Clears the field making it undefined.
4918
+ * @return {!proto.user.SegmentRequest} returns this
4919
+ */
4920
+ proto.user.SegmentRequest.prototype.clearIsActive = function() {
4921
+ return jspb.Message.setField(this, 5, undefined);
4922
+ };
4923
+
4924
+
4925
+ /**
4926
+ * Returns whether this field is set.
4927
+ * @return {boolean}
4928
+ */
4929
+ proto.user.SegmentRequest.prototype.hasIsActive = function() {
4930
+ return jspb.Message.getField(this, 5) != null;
4931
+ };
4932
+
4933
+
4934
+
4935
+
4936
+
4937
+ if (jspb.Message.GENERATE_TO_OBJECT) {
4938
+ /**
4939
+ * Creates an object representation of this proto.
4940
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
4941
+ * Optional fields that are not set will be set to undefined.
4942
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
4943
+ * For the list of reserved names please see:
4944
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
4945
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
4946
+ * JSPB instance for transitional soy proto support:
4947
+ * http://goto/soy-param-migration
4948
+ * @return {!Object}
4949
+ */
4950
+ proto.user.GetSegmentRequest.prototype.toObject = function(opt_includeInstance) {
4951
+ return proto.user.GetSegmentRequest.toObject(opt_includeInstance, this);
4952
+ };
4953
+
4954
+
4955
+ /**
4956
+ * Static version of the {@see toObject} method.
4957
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
4958
+ * the JSPB instance for transitional soy proto support:
4959
+ * http://goto/soy-param-migration
4960
+ * @param {!proto.user.GetSegmentRequest} msg The msg instance to transform.
4961
+ * @return {!Object}
4962
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4963
+ */
4964
+ proto.user.GetSegmentRequest.toObject = function(includeInstance, msg) {
4965
+ var f, obj = {
4966
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0)
4967
+ };
4968
+
4969
+ if (includeInstance) {
4970
+ obj.$jspbMessageInstance = msg;
4971
+ }
4972
+ return obj;
4973
+ };
4974
+ }
4975
+
4976
+
4977
+ /**
4978
+ * Deserializes binary data (in protobuf wire format).
4979
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
4980
+ * @return {!proto.user.GetSegmentRequest}
4981
+ */
4982
+ proto.user.GetSegmentRequest.deserializeBinary = function(bytes) {
4983
+ var reader = new jspb.BinaryReader(bytes);
4984
+ var msg = new proto.user.GetSegmentRequest;
4985
+ return proto.user.GetSegmentRequest.deserializeBinaryFromReader(msg, reader);
4986
+ };
4987
+
4988
+
4989
+ /**
4990
+ * Deserializes binary data (in protobuf wire format) from the
4991
+ * given reader into the given message object.
4992
+ * @param {!proto.user.GetSegmentRequest} msg The message object to deserialize into.
4993
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
4994
+ * @return {!proto.user.GetSegmentRequest}
4995
+ */
4996
+ proto.user.GetSegmentRequest.deserializeBinaryFromReader = function(msg, reader) {
4997
+ while (reader.nextField()) {
4998
+ if (reader.isEndGroup()) {
4999
+ break;
5000
+ }
5001
+ var field = reader.getFieldNumber();
5002
+ switch (field) {
5003
+ case 1:
5004
+ var value = /** @type {number} */ (reader.readInt32());
5005
+ msg.setId(value);
5006
+ break;
5007
+ default:
5008
+ reader.skipField();
5009
+ break;
5010
+ }
5011
+ }
5012
+ return msg;
5013
+ };
5014
+
5015
+
5016
+ /**
5017
+ * Serializes the message to binary data (in protobuf wire format).
5018
+ * @return {!Uint8Array}
5019
+ */
5020
+ proto.user.GetSegmentRequest.prototype.serializeBinary = function() {
5021
+ var writer = new jspb.BinaryWriter();
5022
+ proto.user.GetSegmentRequest.serializeBinaryToWriter(this, writer);
5023
+ return writer.getResultBuffer();
5024
+ };
5025
+
5026
+
5027
+ /**
5028
+ * Serializes the given message to binary data (in protobuf wire
5029
+ * format), writing to the given BinaryWriter.
5030
+ * @param {!proto.user.GetSegmentRequest} message
5031
+ * @param {!jspb.BinaryWriter} writer
5032
+ * @suppress {unusedLocalVariables} f is only used for nested messages
5033
+ */
5034
+ proto.user.GetSegmentRequest.serializeBinaryToWriter = function(message, writer) {
5035
+ var f = undefined;
5036
+ f = message.getId();
5037
+ if (f !== 0) {
5038
+ writer.writeInt32(
5039
+ 1,
5040
+ f
5041
+ );
5042
+ }
5043
+ };
5044
+
5045
+
5046
+ /**
5047
+ * optional int32 id = 1;
5048
+ * @return {number}
5049
+ */
5050
+ proto.user.GetSegmentRequest.prototype.getId = function() {
5051
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
5052
+ };
5053
+
5054
+
5055
+ /**
5056
+ * @param {number} value
5057
+ * @return {!proto.user.GetSegmentRequest} returns this
5058
+ */
5059
+ proto.user.GetSegmentRequest.prototype.setId = function(value) {
5060
+ return jspb.Message.setProto3IntField(this, 1, value);
5061
+ };
5062
+
5063
+
5064
+
5065
+
5066
+
5067
+ if (jspb.Message.GENERATE_TO_OBJECT) {
5068
+ /**
5069
+ * Creates an object representation of this proto.
5070
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
5071
+ * Optional fields that are not set will be set to undefined.
5072
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
5073
+ * For the list of reserved names please see:
5074
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
5075
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
5076
+ * JSPB instance for transitional soy proto support:
5077
+ * http://goto/soy-param-migration
5078
+ * @return {!Object}
5079
+ */
5080
+ proto.user.SegmentResponse.prototype.toObject = function(opt_includeInstance) {
5081
+ return proto.user.SegmentResponse.toObject(opt_includeInstance, this);
5082
+ };
5083
+
5084
+
5085
+ /**
5086
+ * Static version of the {@see toObject} method.
5087
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
5088
+ * the JSPB instance for transitional soy proto support:
5089
+ * http://goto/soy-param-migration
5090
+ * @param {!proto.user.SegmentResponse} msg The msg instance to transform.
5091
+ * @return {!Object}
5092
+ * @suppress {unusedLocalVariables} f is only used for nested messages
5093
+ */
5094
+ proto.user.SegmentResponse.toObject = function(includeInstance, msg) {
5095
+ var f, obj = {
5096
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
5097
+ title: jspb.Message.getFieldWithDefault(msg, 2, ""),
5098
+ description: jspb.Message.getFieldWithDefault(msg, 3, ""),
5099
+ type: jspb.Message.getFieldWithDefault(msg, 4, ""),
5100
+ isActive: jspb.Message.getBooleanFieldWithDefault(msg, 5, false),
5101
+ countOfUsers: jspb.Message.getFieldWithDefault(msg, 6, 0)
5102
+ };
5103
+
5104
+ if (includeInstance) {
5105
+ obj.$jspbMessageInstance = msg;
5106
+ }
5107
+ return obj;
5108
+ };
5109
+ }
5110
+
5111
+
5112
+ /**
5113
+ * Deserializes binary data (in protobuf wire format).
5114
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
5115
+ * @return {!proto.user.SegmentResponse}
5116
+ */
5117
+ proto.user.SegmentResponse.deserializeBinary = function(bytes) {
5118
+ var reader = new jspb.BinaryReader(bytes);
5119
+ var msg = new proto.user.SegmentResponse;
5120
+ return proto.user.SegmentResponse.deserializeBinaryFromReader(msg, reader);
5121
+ };
5122
+
5123
+
5124
+ /**
5125
+ * Deserializes binary data (in protobuf wire format) from the
5126
+ * given reader into the given message object.
5127
+ * @param {!proto.user.SegmentResponse} msg The message object to deserialize into.
5128
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
5129
+ * @return {!proto.user.SegmentResponse}
5130
+ */
5131
+ proto.user.SegmentResponse.deserializeBinaryFromReader = function(msg, reader) {
5132
+ while (reader.nextField()) {
5133
+ if (reader.isEndGroup()) {
5134
+ break;
5135
+ }
5136
+ var field = reader.getFieldNumber();
5137
+ switch (field) {
5138
+ case 1:
5139
+ var value = /** @type {number} */ (reader.readInt32());
5140
+ msg.setId(value);
5141
+ break;
5142
+ case 2:
5143
+ var value = /** @type {string} */ (reader.readString());
5144
+ msg.setTitle(value);
5145
+ break;
5146
+ case 3:
5147
+ var value = /** @type {string} */ (reader.readString());
5148
+ msg.setDescription(value);
5149
+ break;
5150
+ case 4:
5151
+ var value = /** @type {string} */ (reader.readString());
5152
+ msg.setType(value);
5153
+ break;
5154
+ case 5:
5155
+ var value = /** @type {boolean} */ (reader.readBool());
5156
+ msg.setIsActive(value);
5157
+ break;
5158
+ case 6:
5159
+ var value = /** @type {number} */ (reader.readInt32());
5160
+ msg.setCountOfUsers(value);
5161
+ break;
5162
+ default:
5163
+ reader.skipField();
5164
+ break;
5165
+ }
5166
+ }
5167
+ return msg;
5168
+ };
5169
+
5170
+
5171
+ /**
5172
+ * Serializes the message to binary data (in protobuf wire format).
5173
+ * @return {!Uint8Array}
5174
+ */
5175
+ proto.user.SegmentResponse.prototype.serializeBinary = function() {
5176
+ var writer = new jspb.BinaryWriter();
5177
+ proto.user.SegmentResponse.serializeBinaryToWriter(this, writer);
5178
+ return writer.getResultBuffer();
5179
+ };
5180
+
5181
+
5182
+ /**
5183
+ * Serializes the given message to binary data (in protobuf wire
5184
+ * format), writing to the given BinaryWriter.
5185
+ * @param {!proto.user.SegmentResponse} message
5186
+ * @param {!jspb.BinaryWriter} writer
5187
+ * @suppress {unusedLocalVariables} f is only used for nested messages
5188
+ */
5189
+ proto.user.SegmentResponse.serializeBinaryToWriter = function(message, writer) {
5190
+ var f = undefined;
5191
+ f = /** @type {number} */ (jspb.Message.getField(message, 1));
5192
+ if (f != null) {
5193
+ writer.writeInt32(
5194
+ 1,
5195
+ f
5196
+ );
5197
+ }
5198
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
5199
+ if (f != null) {
5200
+ writer.writeString(
5201
+ 2,
5202
+ f
5203
+ );
5204
+ }
5205
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
5206
+ if (f != null) {
5207
+ writer.writeString(
5208
+ 3,
5209
+ f
5210
+ );
5211
+ }
5212
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
5213
+ if (f != null) {
5214
+ writer.writeString(
5215
+ 4,
5216
+ f
5217
+ );
5218
+ }
5219
+ f = /** @type {boolean} */ (jspb.Message.getField(message, 5));
5220
+ if (f != null) {
5221
+ writer.writeBool(
5222
+ 5,
5223
+ f
5224
+ );
5225
+ }
5226
+ f = /** @type {number} */ (jspb.Message.getField(message, 6));
5227
+ if (f != null) {
5228
+ writer.writeInt32(
5229
+ 6,
5230
+ f
5231
+ );
5232
+ }
5233
+ };
5234
+
5235
+
5236
+ /**
5237
+ * optional int32 id = 1;
5238
+ * @return {number}
5239
+ */
5240
+ proto.user.SegmentResponse.prototype.getId = function() {
5241
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
5242
+ };
5243
+
5244
+
5245
+ /**
5246
+ * @param {number} value
5247
+ * @return {!proto.user.SegmentResponse} returns this
5248
+ */
5249
+ proto.user.SegmentResponse.prototype.setId = function(value) {
5250
+ return jspb.Message.setField(this, 1, value);
5251
+ };
5252
+
5253
+
5254
+ /**
5255
+ * Clears the field making it undefined.
5256
+ * @return {!proto.user.SegmentResponse} returns this
5257
+ */
5258
+ proto.user.SegmentResponse.prototype.clearId = function() {
5259
+ return jspb.Message.setField(this, 1, undefined);
5260
+ };
5261
+
5262
+
5263
+ /**
5264
+ * Returns whether this field is set.
5265
+ * @return {boolean}
5266
+ */
5267
+ proto.user.SegmentResponse.prototype.hasId = function() {
5268
+ return jspb.Message.getField(this, 1) != null;
5269
+ };
5270
+
5271
+
5272
+ /**
5273
+ * optional string title = 2;
5274
+ * @return {string}
5275
+ */
5276
+ proto.user.SegmentResponse.prototype.getTitle = function() {
5277
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
5278
+ };
5279
+
5280
+
5281
+ /**
5282
+ * @param {string} value
5283
+ * @return {!proto.user.SegmentResponse} returns this
5284
+ */
5285
+ proto.user.SegmentResponse.prototype.setTitle = function(value) {
5286
+ return jspb.Message.setField(this, 2, value);
5287
+ };
5288
+
5289
+
5290
+ /**
5291
+ * Clears the field making it undefined.
5292
+ * @return {!proto.user.SegmentResponse} returns this
5293
+ */
5294
+ proto.user.SegmentResponse.prototype.clearTitle = function() {
5295
+ return jspb.Message.setField(this, 2, undefined);
5296
+ };
5297
+
5298
+
5299
+ /**
5300
+ * Returns whether this field is set.
5301
+ * @return {boolean}
5302
+ */
5303
+ proto.user.SegmentResponse.prototype.hasTitle = function() {
5304
+ return jspb.Message.getField(this, 2) != null;
5305
+ };
5306
+
5307
+
5308
+ /**
5309
+ * optional string description = 3;
5310
+ * @return {string}
5311
+ */
5312
+ proto.user.SegmentResponse.prototype.getDescription = function() {
5313
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
5314
+ };
5315
+
5316
+
5317
+ /**
5318
+ * @param {string} value
5319
+ * @return {!proto.user.SegmentResponse} returns this
5320
+ */
5321
+ proto.user.SegmentResponse.prototype.setDescription = function(value) {
5322
+ return jspb.Message.setField(this, 3, value);
5323
+ };
5324
+
5325
+
5326
+ /**
5327
+ * Clears the field making it undefined.
5328
+ * @return {!proto.user.SegmentResponse} returns this
5329
+ */
5330
+ proto.user.SegmentResponse.prototype.clearDescription = function() {
5331
+ return jspb.Message.setField(this, 3, undefined);
5332
+ };
5333
+
5334
+
5335
+ /**
5336
+ * Returns whether this field is set.
5337
+ * @return {boolean}
5338
+ */
5339
+ proto.user.SegmentResponse.prototype.hasDescription = function() {
5340
+ return jspb.Message.getField(this, 3) != null;
5341
+ };
5342
+
5343
+
5344
+ /**
5345
+ * optional string type = 4;
5346
+ * @return {string}
5347
+ */
5348
+ proto.user.SegmentResponse.prototype.getType = function() {
5349
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
5350
+ };
5351
+
5352
+
5353
+ /**
5354
+ * @param {string} value
5355
+ * @return {!proto.user.SegmentResponse} returns this
5356
+ */
5357
+ proto.user.SegmentResponse.prototype.setType = function(value) {
5358
+ return jspb.Message.setField(this, 4, value);
5359
+ };
5360
+
5361
+
5362
+ /**
5363
+ * Clears the field making it undefined.
5364
+ * @return {!proto.user.SegmentResponse} returns this
5365
+ */
5366
+ proto.user.SegmentResponse.prototype.clearType = function() {
5367
+ return jspb.Message.setField(this, 4, undefined);
5368
+ };
5369
+
5370
+
5371
+ /**
5372
+ * Returns whether this field is set.
5373
+ * @return {boolean}
5374
+ */
5375
+ proto.user.SegmentResponse.prototype.hasType = function() {
5376
+ return jspb.Message.getField(this, 4) != null;
5377
+ };
5378
+
5379
+
5380
+ /**
5381
+ * optional bool is_active = 5;
5382
+ * @return {boolean}
5383
+ */
5384
+ proto.user.SegmentResponse.prototype.getIsActive = function() {
5385
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false));
5386
+ };
5387
+
5388
+
5389
+ /**
5390
+ * @param {boolean} value
5391
+ * @return {!proto.user.SegmentResponse} returns this
5392
+ */
5393
+ proto.user.SegmentResponse.prototype.setIsActive = function(value) {
5394
+ return jspb.Message.setField(this, 5, value);
5395
+ };
5396
+
5397
+
5398
+ /**
5399
+ * Clears the field making it undefined.
5400
+ * @return {!proto.user.SegmentResponse} returns this
5401
+ */
5402
+ proto.user.SegmentResponse.prototype.clearIsActive = function() {
5403
+ return jspb.Message.setField(this, 5, undefined);
5404
+ };
5405
+
5406
+
5407
+ /**
5408
+ * Returns whether this field is set.
5409
+ * @return {boolean}
5410
+ */
5411
+ proto.user.SegmentResponse.prototype.hasIsActive = function() {
5412
+ return jspb.Message.getField(this, 5) != null;
5413
+ };
5414
+
5415
+
5416
+ /**
5417
+ * optional int32 count_of_users = 6;
5418
+ * @return {number}
5419
+ */
5420
+ proto.user.SegmentResponse.prototype.getCountOfUsers = function() {
5421
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
5422
+ };
5423
+
5424
+
5425
+ /**
5426
+ * @param {number} value
5427
+ * @return {!proto.user.SegmentResponse} returns this
5428
+ */
5429
+ proto.user.SegmentResponse.prototype.setCountOfUsers = function(value) {
5430
+ return jspb.Message.setField(this, 6, value);
5431
+ };
5432
+
5433
+
5434
+ /**
5435
+ * Clears the field making it undefined.
5436
+ * @return {!proto.user.SegmentResponse} returns this
5437
+ */
5438
+ proto.user.SegmentResponse.prototype.clearCountOfUsers = function() {
5439
+ return jspb.Message.setField(this, 6, undefined);
5440
+ };
5441
+
5442
+
5443
+ /**
5444
+ * Returns whether this field is set.
5445
+ * @return {boolean}
5446
+ */
5447
+ proto.user.SegmentResponse.prototype.hasCountOfUsers = function() {
5448
+ return jspb.Message.getField(this, 6) != null;
5449
+ };
5450
+
5451
+
5452
+
5453
+
5454
+
5455
+ if (jspb.Message.GENERATE_TO_OBJECT) {
5456
+ /**
5457
+ * Creates an object representation of this proto.
5458
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
5459
+ * Optional fields that are not set will be set to undefined.
5460
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
5461
+ * For the list of reserved names please see:
5462
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
5463
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
5464
+ * JSPB instance for transitional soy proto support:
5465
+ * http://goto/soy-param-migration
5466
+ * @return {!Object}
5467
+ */
5468
+ proto.user.SegmentStatusResponse.prototype.toObject = function(opt_includeInstance) {
5469
+ return proto.user.SegmentStatusResponse.toObject(opt_includeInstance, this);
5470
+ };
5471
+
5472
+
5473
+ /**
5474
+ * Static version of the {@see toObject} method.
5475
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
5476
+ * the JSPB instance for transitional soy proto support:
5477
+ * http://goto/soy-param-migration
5478
+ * @param {!proto.user.SegmentStatusResponse} msg The msg instance to transform.
5479
+ * @return {!Object}
5480
+ * @suppress {unusedLocalVariables} f is only used for nested messages
5481
+ */
5482
+ proto.user.SegmentStatusResponse.toObject = function(includeInstance, msg) {
5483
+ var f, obj = {
5484
+ status: jspb.Message.getFieldWithDefault(msg, 1, "")
5485
+ };
5486
+
5487
+ if (includeInstance) {
5488
+ obj.$jspbMessageInstance = msg;
5489
+ }
5490
+ return obj;
5491
+ };
5492
+ }
5493
+
5494
+
5495
+ /**
5496
+ * Deserializes binary data (in protobuf wire format).
5497
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
5498
+ * @return {!proto.user.SegmentStatusResponse}
5499
+ */
5500
+ proto.user.SegmentStatusResponse.deserializeBinary = function(bytes) {
5501
+ var reader = new jspb.BinaryReader(bytes);
5502
+ var msg = new proto.user.SegmentStatusResponse;
5503
+ return proto.user.SegmentStatusResponse.deserializeBinaryFromReader(msg, reader);
5504
+ };
5505
+
5506
+
5507
+ /**
5508
+ * Deserializes binary data (in protobuf wire format) from the
5509
+ * given reader into the given message object.
5510
+ * @param {!proto.user.SegmentStatusResponse} msg The message object to deserialize into.
5511
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
5512
+ * @return {!proto.user.SegmentStatusResponse}
5513
+ */
5514
+ proto.user.SegmentStatusResponse.deserializeBinaryFromReader = function(msg, reader) {
5515
+ while (reader.nextField()) {
5516
+ if (reader.isEndGroup()) {
5517
+ break;
5518
+ }
5519
+ var field = reader.getFieldNumber();
5520
+ switch (field) {
5521
+ case 1:
5522
+ var value = /** @type {string} */ (reader.readString());
5523
+ msg.setStatus(value);
5524
+ break;
5525
+ default:
5526
+ reader.skipField();
5527
+ break;
5528
+ }
5529
+ }
5530
+ return msg;
5531
+ };
5532
+
5533
+
5534
+ /**
5535
+ * Serializes the message to binary data (in protobuf wire format).
5536
+ * @return {!Uint8Array}
5537
+ */
5538
+ proto.user.SegmentStatusResponse.prototype.serializeBinary = function() {
5539
+ var writer = new jspb.BinaryWriter();
5540
+ proto.user.SegmentStatusResponse.serializeBinaryToWriter(this, writer);
5541
+ return writer.getResultBuffer();
5542
+ };
5543
+
5544
+
5545
+ /**
5546
+ * Serializes the given message to binary data (in protobuf wire
5547
+ * format), writing to the given BinaryWriter.
5548
+ * @param {!proto.user.SegmentStatusResponse} message
5549
+ * @param {!jspb.BinaryWriter} writer
5550
+ * @suppress {unusedLocalVariables} f is only used for nested messages
5551
+ */
5552
+ proto.user.SegmentStatusResponse.serializeBinaryToWriter = function(message, writer) {
5553
+ var f = undefined;
5554
+ f = message.getStatus();
5555
+ if (f.length > 0) {
5556
+ writer.writeString(
5557
+ 1,
5558
+ f
5559
+ );
5560
+ }
5561
+ };
5562
+
5563
+
5564
+ /**
5565
+ * optional string status = 1;
5566
+ * @return {string}
5567
+ */
5568
+ proto.user.SegmentStatusResponse.prototype.getStatus = function() {
5569
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
5570
+ };
5571
+
5572
+
5573
+ /**
5574
+ * @param {string} value
5575
+ * @return {!proto.user.SegmentStatusResponse} returns this
5576
+ */
5577
+ proto.user.SegmentStatusResponse.prototype.setStatus = function(value) {
5578
+ return jspb.Message.setProto3StringField(this, 1, value);
5579
+ };
5580
+
5581
+
5582
+
5583
+ /**
5584
+ * List of repeated fields within this message type.
5585
+ * @private {!Array<number>}
5586
+ * @const
5587
+ */
5588
+ proto.user.SegmentItemsResponse.repeatedFields_ = [1];
5589
+
5590
+
5591
+
5592
+ if (jspb.Message.GENERATE_TO_OBJECT) {
5593
+ /**
5594
+ * Creates an object representation of this proto.
5595
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
5596
+ * Optional fields that are not set will be set to undefined.
5597
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
5598
+ * For the list of reserved names please see:
5599
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
5600
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
5601
+ * JSPB instance for transitional soy proto support:
5602
+ * http://goto/soy-param-migration
5603
+ * @return {!Object}
5604
+ */
5605
+ proto.user.SegmentItemsResponse.prototype.toObject = function(opt_includeInstance) {
5606
+ return proto.user.SegmentItemsResponse.toObject(opt_includeInstance, this);
5607
+ };
5608
+
5609
+
5610
+ /**
5611
+ * Static version of the {@see toObject} method.
5612
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
5613
+ * the JSPB instance for transitional soy proto support:
5614
+ * http://goto/soy-param-migration
5615
+ * @param {!proto.user.SegmentItemsResponse} msg The msg instance to transform.
5616
+ * @return {!Object}
5617
+ * @suppress {unusedLocalVariables} f is only used for nested messages
5618
+ */
5619
+ proto.user.SegmentItemsResponse.toObject = function(includeInstance, msg) {
5620
+ var f, obj = {
5621
+ itemsList: jspb.Message.toObjectList(msg.getItemsList(),
5622
+ proto.user.SegmentResponse.toObject, includeInstance),
5623
+ totalPages: jspb.Message.getFieldWithDefault(msg, 2, 0),
5624
+ totalItems: jspb.Message.getFieldWithDefault(msg, 3, 0)
5625
+ };
5626
+
5627
+ if (includeInstance) {
5628
+ obj.$jspbMessageInstance = msg;
5629
+ }
5630
+ return obj;
5631
+ };
5632
+ }
5633
+
5634
+
5635
+ /**
5636
+ * Deserializes binary data (in protobuf wire format).
5637
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
5638
+ * @return {!proto.user.SegmentItemsResponse}
5639
+ */
5640
+ proto.user.SegmentItemsResponse.deserializeBinary = function(bytes) {
5641
+ var reader = new jspb.BinaryReader(bytes);
5642
+ var msg = new proto.user.SegmentItemsResponse;
5643
+ return proto.user.SegmentItemsResponse.deserializeBinaryFromReader(msg, reader);
5644
+ };
5645
+
5646
+
5647
+ /**
5648
+ * Deserializes binary data (in protobuf wire format) from the
5649
+ * given reader into the given message object.
5650
+ * @param {!proto.user.SegmentItemsResponse} msg The message object to deserialize into.
5651
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
5652
+ * @return {!proto.user.SegmentItemsResponse}
5653
+ */
5654
+ proto.user.SegmentItemsResponse.deserializeBinaryFromReader = function(msg, reader) {
5655
+ while (reader.nextField()) {
5656
+ if (reader.isEndGroup()) {
5657
+ break;
5658
+ }
5659
+ var field = reader.getFieldNumber();
5660
+ switch (field) {
5661
+ case 1:
5662
+ var value = new proto.user.SegmentResponse;
5663
+ reader.readMessage(value,proto.user.SegmentResponse.deserializeBinaryFromReader);
5664
+ msg.addItems(value);
5665
+ break;
5666
+ case 2:
5667
+ var value = /** @type {number} */ (reader.readInt32());
5668
+ msg.setTotalPages(value);
5669
+ break;
5670
+ case 3:
5671
+ var value = /** @type {number} */ (reader.readInt32());
5672
+ msg.setTotalItems(value);
5673
+ break;
5674
+ default:
5675
+ reader.skipField();
5676
+ break;
5677
+ }
5678
+ }
5679
+ return msg;
5680
+ };
5681
+
5682
+
5683
+ /**
5684
+ * Serializes the message to binary data (in protobuf wire format).
5685
+ * @return {!Uint8Array}
5686
+ */
5687
+ proto.user.SegmentItemsResponse.prototype.serializeBinary = function() {
5688
+ var writer = new jspb.BinaryWriter();
5689
+ proto.user.SegmentItemsResponse.serializeBinaryToWriter(this, writer);
5690
+ return writer.getResultBuffer();
5691
+ };
5692
+
5693
+
5694
+ /**
5695
+ * Serializes the given message to binary data (in protobuf wire
5696
+ * format), writing to the given BinaryWriter.
5697
+ * @param {!proto.user.SegmentItemsResponse} message
5698
+ * @param {!jspb.BinaryWriter} writer
5699
+ * @suppress {unusedLocalVariables} f is only used for nested messages
5700
+ */
5701
+ proto.user.SegmentItemsResponse.serializeBinaryToWriter = function(message, writer) {
5702
+ var f = undefined;
5703
+ f = message.getItemsList();
5704
+ if (f.length > 0) {
5705
+ writer.writeRepeatedMessage(
5706
+ 1,
5707
+ f,
5708
+ proto.user.SegmentResponse.serializeBinaryToWriter
5709
+ );
5710
+ }
5711
+ f = /** @type {number} */ (jspb.Message.getField(message, 2));
5712
+ if (f != null) {
5713
+ writer.writeInt32(
5714
+ 2,
5715
+ f
5716
+ );
5717
+ }
5718
+ f = /** @type {number} */ (jspb.Message.getField(message, 3));
5719
+ if (f != null) {
5720
+ writer.writeInt32(
5721
+ 3,
5722
+ f
5723
+ );
5724
+ }
5725
+ };
5726
+
5727
+
5728
+ /**
5729
+ * repeated SegmentResponse items = 1;
5730
+ * @return {!Array<!proto.user.SegmentResponse>}
5731
+ */
5732
+ proto.user.SegmentItemsResponse.prototype.getItemsList = function() {
5733
+ return /** @type{!Array<!proto.user.SegmentResponse>} */ (
5734
+ jspb.Message.getRepeatedWrapperField(this, proto.user.SegmentResponse, 1));
5735
+ };
5736
+
5737
+
5738
+ /**
5739
+ * @param {!Array<!proto.user.SegmentResponse>} value
5740
+ * @return {!proto.user.SegmentItemsResponse} returns this
5741
+ */
5742
+ proto.user.SegmentItemsResponse.prototype.setItemsList = function(value) {
5743
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
5744
+ };
5745
+
5746
+
5747
+ /**
5748
+ * @param {!proto.user.SegmentResponse=} opt_value
5749
+ * @param {number=} opt_index
5750
+ * @return {!proto.user.SegmentResponse}
5751
+ */
5752
+ proto.user.SegmentItemsResponse.prototype.addItems = function(opt_value, opt_index) {
5753
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.user.SegmentResponse, opt_index);
5754
+ };
5755
+
5756
+
5757
+ /**
5758
+ * Clears the list making it empty but non-null.
5759
+ * @return {!proto.user.SegmentItemsResponse} returns this
5760
+ */
5761
+ proto.user.SegmentItemsResponse.prototype.clearItemsList = function() {
5762
+ return this.setItemsList([]);
5763
+ };
5764
+
5765
+
5766
+ /**
5767
+ * optional int32 total_pages = 2;
5768
+ * @return {number}
5769
+ */
5770
+ proto.user.SegmentItemsResponse.prototype.getTotalPages = function() {
5771
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
5772
+ };
5773
+
5774
+
5775
+ /**
5776
+ * @param {number} value
5777
+ * @return {!proto.user.SegmentItemsResponse} returns this
5778
+ */
5779
+ proto.user.SegmentItemsResponse.prototype.setTotalPages = function(value) {
5780
+ return jspb.Message.setField(this, 2, value);
5781
+ };
5782
+
5783
+
5784
+ /**
5785
+ * Clears the field making it undefined.
5786
+ * @return {!proto.user.SegmentItemsResponse} returns this
5787
+ */
5788
+ proto.user.SegmentItemsResponse.prototype.clearTotalPages = function() {
5789
+ return jspb.Message.setField(this, 2, undefined);
5790
+ };
5791
+
5792
+
5793
+ /**
5794
+ * Returns whether this field is set.
5795
+ * @return {boolean}
5796
+ */
5797
+ proto.user.SegmentItemsResponse.prototype.hasTotalPages = function() {
5798
+ return jspb.Message.getField(this, 2) != null;
5799
+ };
5800
+
5801
+
5802
+ /**
5803
+ * optional int32 total_items = 3;
5804
+ * @return {number}
5805
+ */
5806
+ proto.user.SegmentItemsResponse.prototype.getTotalItems = function() {
5807
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
5808
+ };
5809
+
5810
+
5811
+ /**
5812
+ * @param {number} value
5813
+ * @return {!proto.user.SegmentItemsResponse} returns this
5814
+ */
5815
+ proto.user.SegmentItemsResponse.prototype.setTotalItems = function(value) {
5816
+ return jspb.Message.setField(this, 3, value);
5817
+ };
5818
+
5819
+
5820
+ /**
5821
+ * Clears the field making it undefined.
5822
+ * @return {!proto.user.SegmentItemsResponse} returns this
5823
+ */
5824
+ proto.user.SegmentItemsResponse.prototype.clearTotalItems = function() {
5825
+ return jspb.Message.setField(this, 3, undefined);
5826
+ };
5827
+
5828
+
5829
+ /**
5830
+ * Returns whether this field is set.
5831
+ * @return {boolean}
5832
+ */
5833
+ proto.user.SegmentItemsResponse.prototype.hasTotalItems = function() {
5834
+ return jspb.Message.getField(this, 3) != null;
5835
+ };
5836
+
5837
+
4436
5838
  goog.object.extend(exports, proto.user);